kmillikin@chromium.org
3d15415414
Simplify deferred code by removing some unneeded or redundant stuff.
...
Review URL: http://codereview.chromium.org/113895
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2065 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-27 15:13:00 +00:00
kmillikin@chromium.org
9c829fafe9
Change the register allocator so that it no longer tracks references
...
to the platform-specific reserved registers. They are always in use
for their intended purpose, cannot appear in the virtual frame, and
can be freely used without allocation in the code generator.
Review URL: http://codereview.chromium.org/113837
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2061 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-27 07:53:47 +00:00
erik.corry@gmail.com
01f7c87f22
This patch much improves our tracking of whether function is
...
called from within a loop or not. In the past we lost the
information if a call site went megamorphic before a lazily
compiled callee was called for the first time. Now we track
that correctly (this is an issue that affects richards).
We still don't manage to track the in-loop state through a
constructor call, since constructor calls use LoadICs instead
of CallICs. This issue affects delta-blue. So in this patch
we assume that lazy compilations that don't happen through a
CallIC happen from inside a loop. I have an idea to fix this
but this patch is big enough already.
With our improved tracking of in-loop state I have switched
off the inlining of in-object loads for code that is not in
a loop. This benefits compile speed. One issue is that
eagerly compiled code now doesn't get the in-object loads
inlined. We need to eagerly compile less code to fix this.
Review URL: http://codereview.chromium.org/115744
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 18:29:02 +00:00
mikhail.naganov@gmail.com
30a0a7de43
Split nested namespaces declaration in two lines in accordance with C++ Style Guide.
...
This issue was raised by Brett Wilson while reviewing my changelist for readability. Craig Silverstein (one of C++ SG maintainers) confirmed that we should declare one namespace per line. Our way of namespaces closing seems not violating style guides (there is no clear agreement on it), so I left it intact.
Review URL: http://codereview.chromium.org/115756
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 10:05:56 +00:00
sgjesse@chromium.org
3e76ba9a78
Propagate information on whether a non function was called as constructor or not.The Arguments object passed to the callback now has IsConstructCall set accordingly.BUG= http://crbug.com/3285
...
Review URL: http://codereview.chromium.org/113634
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 19:33:44 +00:00
iposva@chromium.org
f1774010e7
Fix unmotivated change which causes mismatch between function
...
declaration and definition.
Review URL: http://codereview.chromium.org/113640
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 16:39:26 +00:00
whesse@chromium.org
1ac2603eb7
Add the REX prefix to 64-bit assembly operands. Move some inline functions.
...
Review URL: http://codereview.chromium.org/115568
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2017 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 14:14:44 +00:00
whesse@chromium.org
59fab02e3e
Implement constructor and destructor of 64-bit assembler
...
Review URL: http://codereview.chromium.org/113631
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2014 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 12:17:23 +00:00
kmillikin@chromium.org
bcff796134
Size reduction of VirtualFrame objects. Remove the code generator and
...
macro assembler pointers and all derived state.
Review URL: http://codereview.chromium.org/115564
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2011 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 11:14:18 +00:00
kmillikin@chromium.org
2ab1dedb03
Increase the size of VirtualFrame members to allow a larger number of
...
parameters, stack-allocated locals, or expression stack elements.
Review URL: http://codereview.chromium.org/115535
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2002 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-19 20:29:23 +00:00
whesse@chromium.org
8987c93a12
Remove code that adjusts synced and copied flags in MergeTo.
...
Review URL: http://codereview.chromium.org/113524
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1998 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-19 09:20:57 +00:00
kmillikin@chromium.org
0dda60a96d
Inline some simple member functions of VirtualFrame.
...
Review URL: http://codereview.chromium.org/113525
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-18 14:32:43 +00:00
kmillikin@chromium.org
a77d81c59b
Fix a failure to correctly set the static type on a frame element at a
...
backward jump. The frame entering the backward block is not used, so
the this is mostly just a bookkeeping change.
Review URL: http://codereview.chromium.org/115464
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1989 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-18 13:16:35 +00:00
ager@chromium.org
ef85ba46b0
First round of size reduction for JumpTargets. Reduce their size by
...
two words: there is no reason to keep a pointer to the current code
generator and macro assembler in the JumpTarget.
Review URL: http://codereview.chromium.org/113458
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1987 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-18 12:26:59 +00:00
bak@chromium.org
81af5beefa
Changed FuncNameInferrer and ScopeInfo to support zone allocation.
...
Yields a 2% speedup when running compiler-benchmark.
Review URL: http://codereview.chromium.org/113519
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-18 09:41:16 +00:00
kmillikin@chromium.org
20b3a4deaa
Allow a few more (multiple-entry) deferred code snippets to take the
...
fast-merge path by manually giving them an expected entry frame.
Review URL: http://codereview.chromium.org/113518
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1984 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-18 07:57:29 +00:00
iposva@chromium.org
5b72959f3e
Remove space at end of line.
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1979 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-15 23:05:21 +00:00
iposva@chromium.org
b5c6dc35f9
- Fix numeric overflow handling when compiling count operations.
...
In certain situations the overflow checking corrupted the value
being calculated.
Review URL: http://codereview.chromium.org/115423
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1978 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-15 22:36:26 +00:00
kmillikin@chromium.org
dc9473d817
Try to preallocate the scratch registers used for inlined keyed loads
...
to allow fast entry to the deferred code if possible.
Review URL: http://codereview.chromium.org/113457
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1968 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-15 12:43:00 +00:00
kmillikin@chromium.org
f579685469
Remove the redundant flags is_bound_ and is_linked_ from the
...
JumpTarget class in favor of using other internal state.
Review URL: http://codereview.chromium.org/113456
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1966 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-15 11:17:29 +00:00
ager@chromium.org
a3f30f5a3a
Clean up the Result class. Reduce the size of Result from four words
...
to one by keeping a stack of active code generators and by using
indirection to handles.
Mainly a cleanup. No visible performance impact.
Review URL: http://codereview.chromium.org/113455
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1965 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-15 11:09:51 +00:00
whesse@chromium.org
0eb8d35a6d
Polish code of VirtualFrame::MoveMemoryToRegister
...
Review URL: http://codereview.chromium.org/113451
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-15 09:38:11 +00:00
kmillikin@chromium.org
6e5de93ad3
Bypass an expensive computation of a basic block's entry frame for a
...
common case of a single forward edge (a fall-through). This includes
exits from deferred code.
The fall-through frame is used, after removing constants and copies
above the high-water mark.
Review URL: http://codereview.chromium.org/113400
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1960 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-15 08:08:52 +00:00
whesse@chromium.org
4a12504f89
Improve algorithm for detaching and attaching a virtual frame to the code
...
generator. Inline copying of a register file.
Review URL: http://codereview.chromium.org/113402
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 16:06:04 +00:00
ager@chromium.org
af59c3d68f
Reapply revision 1949. Stupid error.
...
Add virtual destructor to jump targets to make compiler happy.
Review URL: http://codereview.chromium.org/113396
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1951 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 12:18:25 +00:00
ager@chromium.org
c9eda02def
Revert revision 1949.
...
Review URL: http://codereview.chromium.org/115350
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 11:55:18 +00:00
ager@chromium.org
f4778b007f
Reduce the memory used by frame elements from two words to one by
...
encoding the values in one word and by using an indirection table for
handles.
This reduces compilation time by roughly 10% and we should be able to make the slow case equality checking of frame elements faster as well.
Review URL: http://codereview.chromium.org/115347
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 11:43:09 +00:00
bak@chromium.org
9e02f380f0
Removed the delete calls to ZoneObjects.
...
Review URL: http://codereview.chromium.org/115348
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1948 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 11:36:10 +00:00
bak@chromium.org
c70ec7a3d2
- Make VirtualFrame and JumpTarget zone allocated.
...
- Compacted the VirtualFrame representation.
-> Improved the compiler speed with 10%
Review URL: http://codereview.chromium.org/115345
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1947 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 11:03:55 +00:00
kmillikin@chromium.org
f48a6bf30f
Add more detailed timers of the various compilation passes. The
...
aggregate compilation time timer is the same as it was before.
Review URL: http://codereview.chromium.org/115344
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1946 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 10:29:48 +00:00
kmillikin@chromium.org
ebbaeb3655
Initial bypass of JumpTarget::ComputeEntryFrame for deferred code
...
entry labels where it is statically safe.
Review URL: http://codereview.chromium.org/115296
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1943 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 07:38:44 +00:00
erik.corry@gmail.com
4a120eccdc
Fix asterisk spacing.
...
Review URL: http://codereview.chromium.org/113333
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1932 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-13 12:34:35 +00:00
kmillikin@chromium.org
60c42717f3
Refactor JumpTarget::Combine.
...
Review URL: http://codereview.chromium.org/113329
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-13 10:29:49 +00:00
kmillikin@chromium.org
18f69a7171
Fix for issue 341. In the stub for instanceof, we could try to read
...
an object's map before we were sure it was a heap object.
Review URL: http://codereview.chromium.org/115236
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-12 11:40:14 +00:00
lrn@chromium.org
142fe3431a
X64: General fixes - added inline definitions and changed some places to intptr_t.
...
Review URL: http://codereview.chromium.org/113199
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-12 10:33:40 +00:00
kmillikin@chromium.org
bcab3697f6
Simplify JumpTarget::ComputeEntryFrame. Eliminate a separate pass
...
over the frame elements to find registers used (before allocating
undetermined elements) and another pass to set the frame's register
indices (after allocating all elements).
Review URL: http://codereview.chromium.org/114018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-11 13:57:19 +00:00
kmillikin@chromium.org
5fab2d08f2
A register allocation bugfix.
...
The function that prepares a virtual frame slot for writing (in order
to preserve the copy-on-write semantics of aliased frame elements) can
allocate registers, which may spill one from the frame. If we're
unlucky, the spilled register can be the source register for the frame
element write. In that case, ensure we do the write from memory.
Review URL: http://codereview.chromium.org/115125
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1904 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-08 17:48:19 +00:00
mikhail.naganov@gmail.com
3e82fce446
Restore stack backtrace tests removed in revision 1785.
...
To re-enable tests, instead of compiled code patching, inlined code is used.
Inlined code is only installed in test.
Review URL: http://codereview.chromium.org/108015
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1892 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-07 09:24:43 +00:00
deanm@chromium.org
eb906555fc
Cleanup include guards:
...
- Fix some typos / guards that didn't match the filename.
- Fix some style inconsistencies.
- Add guards to files that were missing them.
- Add the directory name to the guard.
Review URL: http://codereview.chromium.org/99343
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-04 13:36:43 +00:00
feng@chromium.org
ecd705813f
A simple fix of issue http://code.google.com/p/chromium/issues/detail?id=3285
...
NPN_Construct allows a NPObject to be called as a construct. For example, the
test case
var s = new app.Packages.java.lang.Integer(5);
app.Packages.java.lang.Integer is a NPObject, and it implements NPN_Construct.
This fix allows a JSObject created by an API function be called as a construct
if it can be called
as a function. This is done by generating the same code for
var s = new app.Packages.java.lang.Integer(5); as
var s = app.Packages.java.lang.Integer(5);
and the caller handles both case correctly. A more sophiscated fix is to one
extra JSConstructCall
frame and allow CallAsConstructor in Builtin::HandleApiCallAsFunction.
This change itself shouldn't affect the semantic of normal case such as:
var a = {};
var s = new a();
A TypeError exception will be thrown in CALL_NON_FUNCTION (runtime.js).
Another part of fix is in the binding code, V8NPObject, which makes
NPN_InvokeDefault or NPN_Construct
call depending on which function is available.
Review URL: http://codereview.chromium.org/100243
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1837 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-01 19:01:19 +00:00
erik.corry@gmail.com
ad23017469
When strings can change from an ASCII representation to a
...
UC16 representation we need to be careful about flat strings.
Flat strings can be sliced or cons strings that have a flat
string under them, so when we ask a flat cons or a slice whether
it is ASCII or not we should ask the underlying string about
its representation. This should fix
http://code.google.com/p/chromium/issues/detail?id=10971
Review URL: http://codereview.chromium.org/100249
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1830 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-01 11:16:29 +00:00
whesse@chromium.org
714e525b40
Improve register allocation of left shift operation. Add tests
...
for all shift operations.
Review URL: http://codereview.chromium.org/101016
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-30 09:21:50 +00:00
erik.corry@gmail.com
9a9e09ee73
Unbreak IA32 generated code coverage.
...
Review URL: http://codereview.chromium.org/100156
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 11:04:28 +00:00
whesse@chromium.org
bd45424f02
Fix lint error
...
Review URL: http://codereview.chromium.org/100105
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1809 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-28 15:14:44 +00:00
whesse@chromium.org
62c4153442
Change MergeTo code for virtual frames to use register indices.
...
Review URL: http://codereview.chromium.org/99052
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1808 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-28 13:53:15 +00:00
kmillikin@chromium.org
d30bc90b9c
Inline the inobject property case for named property loads.
...
Review URL: http://codereview.chromium.org/99120
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-28 10:40:36 +00:00
kmillikin@chromium.org
cc0c8d178f
Materializing a frame element on the stack by pushing it can cause the
...
stack pointer to change by more than one in a corner case. If we push
a constant smi larger than 16 bits, we push it via a temporary
register. Allocating the temporary can cause a register to be spilled
from the frame somewhere above the stack pointer.
As a fix, do not use pushes to materialize ranges of elements of size
larger than one.
Review URL: http://codereview.chromium.org/92121
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 11:26:49 +00:00
christian.plesner.hansen@gmail.com
1f7e96743d
- Extended lazy loading to general objects, not just functions.
...
- Added lazily loaded JSON object.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 08:13:09 +00:00
lrn@chromium.org
a4d756a1c8
Move backend specific files to separate directories.
...
Move ia32 and arm specific files to subdirectories to make it easier to add more backends.
Review URL: http://codereview.chromium.org/92068
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-23 12:06:38 +00:00