danno@chromium.org
f0c4b87f34
Implement KeyedStoreICs to grow arrays on out-of-bound stores.
...
Supports growing non-COW JSArray by a single element if the backing store has room, and initial allocation of a backing store for the store to index zero of an empty array to kPreallocatedArrayElements elements (e.g. the [] array literal).
Review URL: https://chromiumcodereview.appspot.com/9310117
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-10 12:36:05 +00:00
svenpanne@chromium.org
fd2731a7e6
Replaced LookupResult::IsProperty by LookupResult::IsFound where possible.
...
Yak shaving for map sharing with accessor properties contd.: When CALLBACKS can
have map transitions, simply looking at the property type is not sufficient
anymore to decide if a property is there or not. One has to look at the actual
contents of the descriptor entry then, but this breaks down sometimes when the
lookup is being done with a NULL holder. Luckily enough, we can oftren replace
IsProperty by the simpler IsFound, because we inspect the type immediately
afterwards, anyway.
Review URL: https://chromiumcodereview.appspot.com/9280007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-23 12:01:47 +00:00
erik.corry@gmail.com
40a433c9e0
Split NumberDictionary into a randomly seeded and an unseeded
...
version. We don't want to randomize the stub cache.
Review URL: http://codereview.chromium.org/9174023
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-16 09:44:35 +00:00
ulan@chromium.org
746ef93362
Move handlified functions from handles.cc to objects.cc
...
BUG=
TEST=
Review URL: http://codereview.chromium.org/9008012
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-05 17:16:19 +00:00
fschneider@chromium.org
b6b4af9d89
Filter out maps from different global context when collecting type feedback.
...
This avoid leaking memory because optimized code may hold on to maps
from different tabs otherwise.
BUG=v8:1823, 102895
Review URL: http://codereview.chromium.org/8892002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-14 14:01:54 +00:00
fschneider@chromium.org
066822a2cf
Port to x64 and ARM and some refactoring of ia32.
...
Review URL: http://codereview.chromium.org/8111006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 12:11:08 +00:00
ulan@chromium.org
fa8a71df9a
Handlify CompileConstructStub. Based on 8391045.
...
R=kmillikin@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8399032
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9837 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 14:08:43 +00:00
kmillikin@chromium.org
0df252b38b
Handlify the remaining CallStubCompiler functions.
...
Also, handlify functions for loading with interceptors and callbacks.
Remove some unneeded code. Rename Foreign::address() because it
confusingly shadows HeapObject::address() which does something quite
different.
R=vegorov@chromium.org ,ulan@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8391045
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 12:37:29 +00:00
keuchel@chromium.org
a9a97d010e
Remove kInvalidStrictFlag and make gcc-4.5 happy again.
...
Review URL: http://codereview.chromium.org/8403036
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 09:10:29 +00:00
ulan@chromium.org
405d57fe00
Handlify CompileStoreCallback, CompileStoreInterceptor.
...
R=kmillikin@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8390045
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9803 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 12:35:12 +00:00
ulan@chromium.org
beb0bbe3a9
Handlify simple functions of [keyed] store stub compiler.
...
Handlified functions: CompileStoreField, CompileStoreGlobal, CompileStoreElement, CompileStorePolymorphic.
Based on 8375053.
R=kmillikin@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8393003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 10:45:24 +00:00
ulan@chromium.org
a2fff744e0
Handlify CompileLoadGlobal, CompileLoadElement, CompileLoadPolymorphic.
...
R=kmillikin@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8375053
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9788 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 09:58:32 +00:00
ulan@chromium.org
abeb5a4d93
Handlify simple functions of [keyed] load stub compiler.
...
Handlified functions: CompileLoadNonexistent, CompileLoadField,
CompileLoadConstant, CompileLoadArrayLength, CompileLoadStringLength,
CompileLoadFunctionPrototype.
R=kmillikin@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8383033
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 12:26:07 +00:00
kmillikin@chromium.org
e05c04e5fa
Handlify CallStubCompiler::CompileCallField.
...
This function relies on a number of helpers for checking prototypes and
probing dictionaries. It is not possible to wrap these helpers to retry
after allocation failure in a safe way---the assembler has no way to undo
what it has already assembled.
These functions have all been duplicated with handle and raw versions. The
raw versions will eventually be removed completely.
R=ulan@chromium.org ,vegorov@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8332003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 09:24:49 +00:00
kmillikin@chromium.org
ef31d0480a
Handlify the remaining stub compiler functions for call ICs.
...
Handlify StubCompiler functions for CallIC and KeyedCallIC cases
Megamorphic, Arguments, DebugBreak, and DebugPrepareStepIn.
R=ulan@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8372029
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9750 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 10:55:00 +00:00
kmillikin@chromium.org
ec007b46d1
Handlify call cases for pre-monomorphic, normal, and miss.
...
These cases turn out to be easy. There is a lingering raw pointer
implementation of TryCompileCallMiss because it's need by some of the
unconverted call stubs.
R=ulan@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8366036
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9749 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 09:33:11 +00:00
ulan@chromium.org
ae6e6a689c
Handlify KeyedIC::ComputeStub.
...
BUG=
TEST=
Review URL: http://codereview.chromium.org/8356041
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9741 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 11:42:54 +00:00
kmillikin@chromium.org
937006f761
Handlify StubCompiler::CompileCallInitialize.
...
CallIC::GenerateInitialize and KeyedCallIC::GenerateInitialize are
verified safe for GC.
R=ulan@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8361028
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:19:16 +00:00
kmillikin@chromium.org
1959409f6d
Fix presubmit failure.
...
TBR=ulan@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8364004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9730 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 17:28:14 +00:00
kmillikin@chromium.org
e3792a6830
Handlify the stub cache lookup and patching for CallIC and KeyedCallIC.
...
R=ulan@chromium.org ,vegorov@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8357010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 17:08:53 +00:00
ulan@chromium.org
a5da9320d2
Reset failure flag before retrying stub compilation.
...
BUG=
TEST=
Review URL: http://codereview.chromium.org/8365003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 16:39:26 +00:00
ulan@chromium.org
997ad6387a
Handlify upper layers of KeyedStoreIC.
...
BUG=
TEST=
Review URL: http://codereview.chromium.org/8356039
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9727 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 13:54:16 +00:00
ulan@chromium.org
f985b15aae
Handlify upper layers of KeyedLoadIC.
...
BUG=
TEST=
Review URL: http://codereview.chromium.org/8352003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 09:35:47 +00:00
ulan@chromium.org
80e3843dc3
Handlify upper layers of StoreIC based on 8337008.
...
BUG=
TEST=
Review URL: http://codereview.chromium.org/8341008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9692 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 09:17:01 +00:00
ulan@chromium.org
feeb0b0211
Handlify upper layers of LoadIC.
...
BUG=
TEST=
Review URL: http://codereview.chromium.org/8337008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 12:19:18 +00:00
jkummerow@chromium.org
184fdcf28b
Track elements_kind transitions in KeyedStoreICs.
...
Review URL: http://codereview.chromium.org/8166017
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-11 09:33:00 +00:00
erik.corry@gmail.com
af20990e0e
Don't need to protect pregenerated stubs from flushing from the
...
cache. They are in a different cache that is not flushed. Keep
the marking of pregenerated stubs for assertion purposes.
Review URL: http://codereview.chromium.org/8065028
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-29 11:52:05 +00:00
erik.corry@gmail.com
bbcafaa2d5
Make sure we don't flush the pregenerated stubs, since they need
...
to be always present, so that we can call them from other stubs
without trying to generate stubs while we are generating stubs.
Review URL: http://codereview.chromium.org/8052029
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 10:32:12 +00:00
kmillikin@chromium.org
40cd59f238
Remove in-loop tracking for call ICs.
...
We passed this flag around in a lot of places and had differenc call
ICs based on it, but never did any real specialization based on its
value.
R=fschneider@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/7869009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-13 12:53:28 +00:00
kmillikin@chromium.org
636991a0b3
Use the BitField class for Code::Flags.
...
Use the BitField helper class for the code flags, so that we do not have to
define both a shift and a mask explicitly. This makes changing the flags
layout simpler.
Also, make the 'mask' and 'max' members of BitField into constants, because
they are constant and so that they can be used as constant expressions.
E.g., so they can be used in declaring other const members or in static
asserts.
R=fschneider@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/7787028
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-12 10:50:50 +00:00
vitalyr@chromium.org
633e615b89
Improve memory usage of receiver type feedback.
...
Some AST nodes (Property, Call, etc.) store either a list of receiver
types or a monomorphic receiver type. This patch merges the two fields
using a small pointer list. GetMonomorphicReceiverType() is now a
purely convenience function returning the first and only recorded
type.
This saves about 500K (of about 39M) on average when compiling V8
benchmark as measured by a simple patch adding a zone allocation
counter (https://gist.github.com/1149397 ).
R=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/7655017
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 14:23:37 +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
jkummerow@chromium.org
39b06d8850
Add support for dictionary elements to polymorphic crankshaft code.
...
Review URL: http://codereview.chromium.org/7285001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 08:40:31 +00:00
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
svenpanne@chromium.org
9a1d430f32
Added two convenience methods to access an int/double argument from within a
...
runtime function and use these in various places.
Review URL: http://codereview.chromium.org/7003114
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 12:15:30 +00:00
danno@chromium.org
bc4156ca7c
Refactor platform-specific code for determining shared stub for keyed load/stores.
...
R=ager@chromium.org
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7044083
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8253 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 07:49:49 +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
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
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
jkummerow@chromium.org
bc8f6943bb
Support Float64Arrays
...
BUG=None
TEST=mjsunit/external-arrays.js; updated cctest; existing unit tests
Review URL: http://codereview.chromium.org/6879009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-21 07:15:43 +00:00
vitalyr@chromium.org
a051955678
Clean up runtime functions.
...
Make all functions called from generated code declared using
RUNTIME_FUNCTION macro. This makes them all look consistent and allows
experimenting with various calling conventions.
Review URL: http://codereview.chromium.org/6756029
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7439 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-30 14:17:39 +00:00
ager@chromium.org
d495f4934c
Cleanup usage of HEAP and FACTORY in the cache stub compiler.
...
Review URL: http://codereview.chromium.org/6770011
Patch from Karl Klose <karlklose@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7423 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-30 08:18:56 +00:00
ager@chromium.org
1bdc8031fa
Introduce accessors on builtins instance and use them to avoid TLS access when getting builtins.
...
R=vitalyr@chromium.org
Review URL: http://codereview.chromium.org/6717018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7327 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-23 13:40:07 +00:00
ager@chromium.org
4f5de28a9b
Avoid TLS access for counters.
...
Get rid of the COUNTERS macro and fetch the counters from a locally
stored isolate instead.
R=karlklose@chromium.org
Review URL: http://codereview.chromium.org/6723014
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7321 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-23 11:13:07 +00:00
danno@chromium.org
88854cd712
Remember and reuse derived map for external arrays
...
Ensure that all objects that had the same map before attaching an external array have the same map once the external array is attached.
BUG=75639
TEST=fast/canvas/webgl/uninitialized-test.html
Review URL: http://codereview.chromium.org/6685073
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-23 09:57:12 +00:00