Commit Graph

86 Commits

Author SHA1 Message Date
karlklose@chromium.org
f4e4bc43a8 Merge arguments branch to bleeding edge (second try).
Review URL: http://codereview.chromium.org/7187007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8315 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-16 14:12:58 +00:00
karlklose@chromium.org
cc19d1e278 Revert "Merge arguments branch to bleeding merge."
This reverts commit ceb31498b9d69edca3260820fb4047045891ce6d.

TBR=kmillikin@chromium.org

Review URL: http://codereview.chromium.org/7172030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-16 06:37:49 +00:00
karlklose@chromium.org
6cfeb2d400 Merge arguments branch to bleeding merge.
Review URL: http://codereview.chromium.org/7167006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 15:09:28 +00:00
danno@chromium.org
9f432cd159 Dispatch on ElementsKind rather than ExternalArrayType when generating ICs and Crankshaft code for many element operations. This is preparation to be able to share more code in the various element accessor implementations.
Merge logic to maintain external array and fast element stub caches.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/7112010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8244 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 15:19:37 +00:00
mikhail.naganov@gmail.com
3b2470d296 Fix presubmit errors catched by a more recent version of cpplint.py.
Mainly, there were errors concerning blank lines before and after class access
control sections [whitespace/blank_line].

BEFORE an access control section (e.g. public:, private:) there should be a
blank line (except for the section right after the class declaration).

AFTER an access control section there should be no blank line.

TBR=ager@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-07 07:17:46 +00:00
erik.corry@gmail.com
7a1a72c701 Revert 8122 (stub call asserts) while test failures are investigated.
Review URL: http://codereview.chromium.org/7050039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8125 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 15:21:25 +00:00
erik.corry@gmail.com
c5fc4b9099 Add asserts and state tracking to ensure that we do not call
into C++ without having a valid stack frame that can be
traversed at GC.
Also add asserts to track that we do not try to generate a stub
while we are generating a stub, since the stub creation code is
not GC safe.
Review URL: http://codereview.chromium.org/7084032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 12:38:45 +00:00
erik.corry@gmail.com
210fed7be8 Untank the build.
Review URL: http://codereview.chromium.org/6992061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-25 12:40:04 +00:00
erik.corry@gmail.com
e5fc9762f6 Add comment better explaining the calling-stubs-from-stubs issue.
Review URL: http://codereview.chromium.org/7031046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8059 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-25 12:26:15 +00:00
ager@chromium.org
6f775f2fb0 Fix calls of strict mode function with an implicit receiver.
Only IA32 version for now. I'll start porting.

Strict mode functions are to get 'undefined' as the receiver when
called with an implicit receiver. Modes are bad! It forces us to have
checks on all function calls.

This change attempts to limit the cost by passing information about
whether or not a call is with an implicit or explicit receiver in ecx
as part of the calling convention. The cost is setting ecx on all
calls and checking ecx on entry to strict mode functions.

Implicit/explicit receiver state has to be maintained by ICs. Various
stubs have to not clobber ecx or save and restore it.

CallFunction stub needs to check if the receiver is implicit when it
doesn't know from the context.

Review URL: http://codereview.chromium.org/7039036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8040 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 14:01:36 +00:00
fschneider@chromium.org
5552dbccdd Rename TypeRecording...Stub into ...Stub.
There is no need for this long name.
Review URL: http://codereview.chromium.org/7063017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 12:20:16 +00:00
danno@chromium.org
123500999f Reland 7917:
Better support for 'polymorphic' JS and external arrays

Allow  keyed store/load stubs to switch between external array and fast JS arrays without forcing a state transition to the generic stub.

There CL consists of two pieces of functionality. First, code stubs for fast element arrays don't immediately transition to the MEGAMORPHIC state when there's a map mismatch. Second, two ICs are cached per map for fast elements, the MONOMORPHIC version, and a new MEGAMORPHIC version that handles two or more different maps and dispatches to shared stubs to perform the array operation.

Review URL: http://codereview.chromium.org/7036016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 13:17:29 +00:00
danno@chromium.org
83c84a43e8 Revert 7917
TBR=danno@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7918 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 18:47:10 +00:00
danno@chromium.org
5a9b2b3c5f Better support for 'polymorphic' JS and external arrays
Allow  keyed store/load stubs to switch between external array and fast JS arrays without forcing a state transition to the generic stub.

There CL consists of two pieces of functionality. First, code stubs for fast element arrays don't immediately transition to the MEGAMORPHIC state when there's a map mismatch. Second, two ICs are cached per map for fast elements, the MONOMORPHIC version, and a new MEGAMORPHIC version that handles two or more different maps. Currently, the only array types supported by the MEGAMORPHIC stub are fast elements for objects and JSArrays.

BUG=
TEST=

Review URL: http://codereview.chromium.org/6894003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 17:29:13 +00:00
sgjesse@chromium.org
7510bffc4b Submit code-stubs-mips.cc.
This submission required a small change to arch-indep code to declare
code stub DirectCEntry for mips.

It also required updates to macro-assembler-mips.cc & h and frames-mips.h.

I also made a small change to frames-mips.cc.

This code submission will compile, but is not testable until the majority
of the mips port is in place. It has been tested externally.

BUG=
TEST=

Review URL: http://codereview.chromium.org//7034008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7893 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-16 08:38:19 +00:00
vitalyr@chromium.org
07ed2f1263 Compare IC: add SYMBOLS state.
Review URL: http://codereview.chromium.org/6960011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7824 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-09 13:30:04 +00:00
svenpanne@chromium.org
5cd715cbc3 A tiny contribution for the IWYU day: Include allocation.h in every
header which uses BASE_EMBEDDED and/or AllStatic. Note that still only
45 out of 135 headers in src/ can be used stand-alone, but at least
this is a little bit more than before...
Review URL: http://codereview.chromium.org/6931031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7798 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-06 06:50:20 +00:00
vegorov@chromium.org
9a9211e22d Unroll more StringDictionary lookup probes both for positive and negative dictionary lookups.
Review URL: http://codereview.chromium.org/6932010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7795 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-05 12:30:57 +00:00
vitalyr@chromium.org
4ca7b50990 Compare IC: add STRINGS state.
BUG=1340

Review URL: http://codereview.chromium.org/6937001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7783 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-04 18:30:37 +00:00
svenpanne@chromium.org
238349f2a7 Removed dead code: GenericUnaryOpStub is not used anymore, as a consequence, NegativeZeroHandling and UnaryOpFlags are dead, too.
Review URL: http://codereview.chromium.org/6903124

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7731 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 17:49:53 +00:00
svenpanne@chromium.org
e013d4f0a4 Type recording for unary ops
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7707 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-28 17:49:55 +00:00
fschneider@chromium.org
544a436425 Remove code from the deprecated GenericBinaryOpStub.
All platforms are now using the TypeRecordingBinaryOpStub.

I also removed the ARM IntegerModStub which was called from
the GenericBinaryOpStub.
Review URL: http://codereview.chromium.org/6826032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-11 09:39:21 +00:00
sgjesse@chromium.org
2531480d10 Re-establish mips basic infrastructure.
This commit adds current working versions of assembler, macro-assembler,
disassembler, and simulator.

All other mips arch files are replaced with stubbed-out versions that
will build.

Arch independent files are updated as needed to support building and
running mips.

The only test is cctest/test-assembler-mips, and this passes on the
simulator and on mips hardware.

TEST=none
BUG=none

Patch by Paul Lind from MIPS.

Review URL: http://codereview.chromium.org/6730029/


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7388 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-28 13:05:36 +00:00
dimich@chromium.org
0f496238e4 Fix compilation on Windows post-7252
Review URL: http://codereview.chromium.org/6708014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7253 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-17 21:14:47 +00:00
mmaly@chromium.org
4cbf3478d8 Implement strict mode ThrowTypeError functions for arguments object.
* Reverse order of arguments in-object fields for length and callee.
* Introduce arguments ThrowTypeError functions (caller/callee).
* Create strict mode arguments boilerplate object.
* Strict mode "new arguments object" stub.
* Runtime arguments object allocation.
* Update es5conform test expectations.

Review URL: http://codereview.chromium.org/6698015/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-17 20:28:41 +00:00
mmaly@chromium.org
55906eb46e Implement fast path for strict closure creation.
Review URL: http://codereview.chromium.org/6677036/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7251 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-17 20:28:30 +00:00
vitalyr@chromium.org
8700f796e4 Remove unused StringCharCodeAt stub.
Review URL: http://codereview.chromium.org/6690014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7163 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-14 16:54:51 +00:00
sgjesse@chromium.org
061fa8be11 Add the possibility for a code stub to be non-movable
Non-moveable code-stube are allocated in large object space. They are only required on ARM where the different C-entry stubs are required to never move.

This gets rid of pre-computing these stubs and hope that they never move. Also for crankshaft the C-entry stub which saved doubles is not generated in the snapshot so it ends up being generated at runtime and potentially move.
Review URL: http://codereview.chromium.org/6626072

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7097 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-09 10:38:19 +00:00
lrn@chromium.org
b4fd72b335 Change native RegExp call code to properly set C++ structures and
to handle exceptions on return from RegExp.

BUG=1108
TEST=

Review URL: http://codereview.chromium.org/6489001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6794 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-15 13:53:51 +00:00
antonm@chromium.org
aecb05354b Landing for Zaheer Ahmad.
Direct call api functions (arm implementation)

See: http://codereview.chromium.org/6170001/

Review URL: http://codereview.chromium.org/6286078

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6639 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 13:43:38 +00:00
fschneider@chromium.org
24843d6310 Introduce ToNumber stub and use it in non-optimized code for to-number conversion.
This stub is used for increment/decrement operations and unary plus.
The resulting code is more compact and faster than calling a JS builtin.


Review URL: http://codereview.chromium.org/6350021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-28 14:18:26 +00:00
kmillikin@chromium.org
013860d42e Revert "Reapply change to with/arguments interaction."
Revert this change again.  Somewhat mysteriously we sometimes get empty
contexts that we do not expect in the context chain.

Review URL: http://codereview.chromium.org/6372013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6465 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 13:01:45 +00:00
sgjesse@chromium.org
161d631b5e Change ARM exit frame layout and alingment handling
Change the ARM exit frame to have the same layout as the IA32 exit frame. This basically re-arranges the order of fp and sp and changes the sp location of the entry frame to hold the sp used by the gc and not the sp for popping the arguments. This removes the option of tearing down the frame and returning using one ldm instruction.

The main motivation for this is to avoid pushing an alignment word before generating the entry frame. The GC handling of optimized frames process the registers pushed as part of a safepoint and asumes that these are at the top of the frame, so if an alignment word is pushed this processing will be one off.

The alignment handling in the C entry stub have also been simplified. Now the value of lr is stored to a stack slot already reserved avoiding pushing it and keeping track of "frame skew".

This does result in more instructions in the exit frame on ARM, but we can look into improving this later.
Review URL: http://codereview.chromium.org/6247019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6448 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 07:49:39 +00:00
kmillikin@chromium.org
8a9eeaf8da Reapply change to with/arguments interaction.
This is svn r6415 with a bugfix.

The bug was that we can have scopes with 0 heap slots (functions with
such scopes do not need a local context) and scopes with at least
Context::MIN_CONTEXT_SLOTS.  The code generator only allocated a local
context if there were strictly more than Context::MIN_CONTEXT_SLOTS.
Before the change to with/arguments, it was impossible to actually get
a function scope with exactly Context::MIN_CONTEXT_SLOTS because every
such scope included a heap-allocated arguments (and arguments shadow)
slot.

Review URL: http://codereview.chromium.org/6248014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-21 11:28:35 +00:00
sgjesse@chromium.org
426f13e084 Fix GC issue in instanceof stub
The the call of the builtin in InstanceofStub was not correctly protected with an internal frame leading to the return address being handled as a pointer during GC.

Marked the Instanceof stub as allowing stub calls (the RecordWriteStub was removed some days ago).

This issue was not caught by the assertion designed for this when debug mode is run with --debug-code (which out tests always does) as generating code for Abort set the allow stub calls flag to true. This has been fixed by restoring the allow stub calls flag correctly.
Review URL: http://codereview.chromium.org/6097010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 10:37:26 +00:00
kmillikin@chromium.org
8945e02d86 Fix disassembly comment for CallFunctionStub.
The comment was printing the entire minor key but labeling it with 'argc'.

Review URL: http://codereview.chromium.org/6120001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6208 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 14:13:40 +00:00
sgjesse@chromium.org
7311e10fdb Optimize instanceof further
If the instance of is performed against what is beliwed to be a constant global function inline the instance of check and have the call to the instanceof stub in deferred code. The inlined check will be patched by the instanceof stub when called from deferred code. This is indicated by the lithium instruction LInstanceOfKnownGlobal.

To help the patching the delta from the return address to the patch site is placed just below the return address in the edi slot of the pushad/popad ares. This is safe because the edi register (which is pushed last) is a temporary for the lithium instruction.

As the instanceof stub can call other JavaScript an additional marking for saving all double registers have been added.

Also tweaked the instanceof stub to produce true/false objects instead of 0/1 for the case with deferred code.
Review URL: http://codereview.chromium.org/5990005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 11:17:37 +00:00
whesse@chromium.org
1c63e53675 Fix assert error in r6083 by allowing stub calls from TranscendentalCacheStub.
Review URL: http://codereview.chromium.org/6021004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-21 15:10:45 +00:00
sgjesse@chromium.org
d559d8c6c0 IA32: Optimize instanceof
The instanceoff stub now supports arguments in registers and checks for null,
smi and string values without going to runtime.

Needs porting to X64 and ARM.
Review URL: http://codereview.chromium.org/5828004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 08:58:42 +00:00
whesse@chromium.org
564d65958f Mark TranscendentalCacheSSE2Stub as allowing internal stub calls. Mark pextrd instruction as requiring SSE 4.1.
Review URL: http://codereview.chromium.org/5901001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6033 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 16:10:13 +00:00
whesse@chromium.org
c23c244add Reapply change 5989, adding untagged double calls to Math.pow, with problem in generated code for TranscendentalCacheSSE2Stub (unguarded SSE 4.1 code) fixed.
Review URL: http://codereview.chromium.org/5726008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-14 13:21:29 +00:00
whesse@chromium.org
fdf44a4bc7 Revert change 5989, which causes failures in some benchmarks.
Review URL: http://codereview.chromium.org/5804003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5991 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-13 16:34:59 +00:00
whesse@chromium.org
1a008f28d5 Allow optimizing compiler to compute Math.log using untagged doubles.
Review URL: http://codereview.chromium.org/5741003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5989 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-13 14:37:19 +00:00
kasperl@chromium.org
90b3370374 Update V8 to version 3.0 (re-land r5920).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 11:31:57 +00:00
kasperl@chromium.org
51b494d096 Revert r5920. Will re-land shortly.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 11:01:02 +00:00
kasperl@chromium.org
e5860bd6a8 Update V8 to version 3.0.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 09:11:56 +00:00
serya@chromium.org
3b248841da Removing redundant stubs for API functions.
Review URL: http://codereview.chromium.org/4695003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5827 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-15 17:12:34 +00:00
serya@chromium.org
82fc8fe39a Direct call API functions (ia32 implementation).
Review URL: http://codereview.chromium.org/4456002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-09 14:01:23 +00:00
erik.corry@gmail.com
0dcaac1939 Make Failure inherit from MaybeObject instead of Object.
Review URL: http://codereview.chromium.org/3970005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-25 15:22:03 +00:00
serya@chromium.org
fed1246d45 Fixing build failure - added a missed file.
Review URL: http://codereview.chromium.org/3965004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-21 14:53:19 +00:00