Commit Graph

132 Commits

Author SHA1 Message Date
vegorov@chromium.org
ac36cb4504 Merge experimental/gc branch to the bleeding_edge.
Review URL: http://codereview.chromium.org/7945009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-19 18:36:47 +00:00
erik.corry@gmail.com
44d931c9d5 Add asserts to ensure that we:
1) Don't make a call to C without having a valid frame on the stack.
2) Don't generate a call to a stub while generating a stub, unless we can be
sure that the stub we are calling has already been generated (the stub
generation code is not reentrant wrt. GC).
Review URL: http://codereview.chromium.org/7891042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9297 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-15 11:30:45 +00:00
yangguo@chromium.org
1be99a9627 Generated code for substring slices in x64 and arm.
Review URL: http://codereview.chromium.org/7795018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 15:24:26 +00:00
yangguo@chromium.org
3077e8aa2f Generated code for substring slices in ia32.
Review URL: http://codereview.chromium.org/7744052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9064 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 08:22:41 +00:00
jkummerow@chromium.org
5262061eac Convert a bunch of ASSERTs to STATIC_ASSERTs
making our debug binaries ever so slightly faster

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 13:02:35 +00:00
svenpanne@chromium.org
3d4ab9be07 Implement type recording for ToBoolean on x64.
Handle oddballs on ia32 via root indices, similar to other platforms. Added a
special case for Smi types on ia32 to make lithium code generation on both Intel
platforms more similar.
Review URL: http://codereview.chromium.org/7544012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-01 12:53:24 +00:00
danno@chromium.org
07def3cb1e Unify handling of element IC stubs.
In the process, add shared stubs for DictionaryValue lookups that are handled in the same way as fast elements and external array elements.

Includes code for MIPS, which compiles and run polymorph-arrays.js successfully.

R=jkummerow@chromium.org
BUG=none
TEST=test/mjsunit/polymorph-arrays.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-08 10:46:10 +00:00
vegorov@chromium.org
e3b1fe2c14 Fix ABI for API calls on ia32.
Instead of relying on eax value after the call load returned handle value directly from the slot that was preallocated for it.

R=vitalyr@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-05 11:36:52 +00:00
jkummerow@chromium.org
2fe5afedf3 Cleanup: use JumpIf[Not]Smi() whenever we can
Review URL: http://codereview.chromium.org/7191007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8322 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-17 18:32:36 +00:00
kmillikin@chromium.org
e9a1ffde92 Stop using with explicitly to implement try/catch.
The AST for TryCatch gives us enough structure that we do not need to expand
it to explicitly include a with.  Try/catch is still handled the same as
before at runtime.

R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-08 13:55:33 +00:00
danno@chromium.org
eee5e6c3fc Add complete ElementsKind information directly to Map for objects with elements.
Review URL: http://codereview.chromium.org/6966041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-03 07:41:37 +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
ager@chromium.org
cc4a2d7e76 Fix a number of IC stubs to correctly set the call kind.
Make the call kind and call wrapper arguments explicit to force
developers to make a choice. This would have avoided the bug in the
first case.

R=fschneider@chromium.org
TEST=mjsunit/strict-mode-implicit-receiver.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 13:23:17 +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
danno@chromium.org
70d5e6d582 Add bit_field3 to Map objects
Reuse instance_descriptor field in the map to store additional flags when there are no descriptors. When descriptors get added to the map, move the flags to the DescriptorArray and access through indirection.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 15:59:38 +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
danno@chromium.org
ecc25bfb47 Add enumeration to specify if smi check needed
R==ager@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-17 12:05:06 +00:00
danno@chromium.org
daa1be1226 Support conversion of clamped double values for pixel arrays in Crankshaft.
BUG=1313
TEST=test/mjsunit/external-array.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7901 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-16 14:10:56 +00:00
sgjesse@chromium.org
4e18d50834 Add constant splitting for user controlled constants in the full compiler
This is IA32 only for now.

Added a random value to each assembler instance (JIT cookie) to be used for constant splitting. Added safe versions of setting a register with an immediate value and for pushing an immediate value. Used these functions where user controlled immediate values could be emitted in the code stream. I also used it for immediates which are an argument number even though the number of formal arguments is currently limited to 16k.

I found no compares directly with user controlled constants.

I am not sure whether the test is that useful, but it might catch some changes missing constant splitting.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 14:16:24 +00:00
vitalyr@chromium.org
26bf1dfd4a Kill some dead code.
Review URL: http://codereview.chromium.org/6995048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 13:45:30 +00:00
fschneider@chromium.org
48077e89e9 Remove support for branch hints from the IA32 and X64 assembler.
They were not on by default and should not be needed on modern
platforms.
Review URL: http://codereview.chromium.org/7001025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 13:26:07 +00:00
jkummerow@chromium.org
e90d16953c Remove NearLabel, replacing remaining occurrences with Label
TEST=compiles, existing tests pass

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-11 09:12:16 +00:00
svenpanne@chromium.org
1b833ff35e Additional minor cleanup regarding CallWrapper: Use the null object pattern.
Review URL: http://codereview.chromium.org/6909026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 15:12:40 +00:00
svenpanne@chromium.org
5197bff4f2 Unified CallWrapper and PostCallGenerator classes, the former is a
generalization of the latter. This makes CallWrapper architecture-independant,
so it can be pulled up into assembler.h, nuking 3 copy-n-paste classes. Only a
small improvement, but nevertheless...
Review URL: http://codereview.chromium.org/6893156

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 09:30:06 +00:00
whesse@chromium.org
d96dc0755b Add AST ID to RelocInfo for type-recording ICs. Changes 7644 and 7632, combined.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-27 15:02:59 +00:00
ricow@chromium.org
69a4c52bbf Revert revisions 7644 and 7632, they are causing assertion failures in interactive_ui_tests debug mode.
Review URL: http://codereview.chromium.org/6873076

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-19 16:04:49 +00:00
whesse@chromium.org
46164ee24e Record AST ids in relocation info at spots where we collect dynamic type feedback.
Review URL: http://codereview.chromium.org/6793016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 13:18:53 +00:00
ager@chromium.org
95c76ed464 Remove some dead code.
- virtual-frame*
- register-allocator*
- jump-target*
- most of codegen*
- AstOptimizer and fields on AST

There is a lot of additional cleanup that we should do but this gets
rid of a lot.

R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 14:42:37 +00:00
vegorov@chromium.org
8a8d3bbbee In LCodeGen::DoDeferredLInstanceOfKnownGlobal emit safepoint with registers for the call to stub.
Review URL: http://codereview.chromium.org/6793017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 13:32:45 +00:00
vitalyr@chromium.org
0b40589e73 Fix multi-isolate build:
o Make ia32 macro assembler work without an isolate and use it in the
  custom memcpy creation code.
o Remove isolate-dependent code from the custom memcpy and modulo
  functions creation code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 14:46:30 +00:00
ager@chromium.org
b69591bc0f Require an isolate parameter for most external reference creation to
avoid TLS access in connection with external references.

Make the isolate accessible via the assembler.

Only for ia32 at this point. If this looks OK to you I will port it.

R=vitalyr@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7305 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-22 13:20:04 +00:00
vitalyr@chromium.org
7976ca2cbc Merge isolates to bleeding_edge.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 20:35:07 +00:00
vitalyr@chromium.org
76e226f832 Revert r7268: it borked the history.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 19:41:05 +00:00
vitalyr@chromium.org
6ff7fdebd3 Merge isolates to bleeding_edge.
Review URL: http://codereview.chromium.org/6685088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 18:49:56 +00:00
lrn@chromium.org
0c74af3d0f Fix Issue 1234.
Ensure that there is always enough bytes between consequtive calls in
unoptimized code to write a call instruction at the return points
without overlapping.

This handles the case where two return points were only four bytes
apart (because the latter call was to a register).

BUG=v8:1234

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-08 11:21:38 +00:00
ager@chromium.org
ea0dda89bb Unifying the handling of storing and loading from safepoint stack
slots across architectures.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-21 11:29:45 +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
whesse@chromium.org
602d5cf427 Fix a bug that occurs when functions are defined with more than 16,382 parameters.
Review URL: http://codereview.chromium.org/6447007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-09 12:46:22 +00:00
danno@chromium.org
a2fb4a12bb Create specialized code stubs for PixelArray loads.
Review URL: http://codereview.chromium.org/6287030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6614 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-03 12:50:50 +00:00
whesse@chromium.org
962d7019aa Speed up FastAsciiArrayJoin on ia32 by improving hand-written assembly code.
Review URL: http://codereview.chromium.org/6148007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6310 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 10:57:49 +00:00
vitalyr@chromium.org
5e86c6c752 Use near labels in write barrier code.
Review URL: http://codereview.chromium.org/5939003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 17:45:26 +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
ager@chromium.org
4c6f79ecec Fix crashes during GC caused by partially initialized objects. The
inline allocation code used the expected number of properties to
calculate the number of inobject properties for an object instead of
getting the actual number from the initial map.

It is safer to use the inobject property count from the initial map in
any case because that is the amount the instances will get. I think
this disconnect got introduced when adding shrinking of objects.

Unfortuntely I haven't been able to create a simple reproduction for a
test case but this fixes the webpage that exhibits the crash. I'll see
if I can create a reproduction tomorrow.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-24 06:26:36 +00:00
whesse@chromium.org
1d11e32a01 Add a fast case to Array.join when all the elements and the separator are flat ascii strings.
Review URL: http://codereview.chromium.org/5122005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-19 09:25:46 +00:00
serya@chromium.org
8454123682 Fixing lint errors.
Review URL: http://codereview.chromium.org/5065002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-16 15:23:47 +00:00