Commit Graph

296 Commits

Author SHA1 Message Date
mvstanton@chromium.org
e3e7daf01c We need to know if a load, store or call IC is assumed
to be on the global object. Previously, this information
was stored in RelocInfo. A more logical place for this kind
of structural information is ExtraICState. Storing it there
makes it easier for us to gather type feedback from these
sites too.

R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/96083005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18466 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-07 14:14:34 +00:00
verwaest@chromium.org
4615e9edac Reland v8:18458 "Load the global proxy from the context of the target function."
BUG=
R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/104013008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-07 10:46:39 +00:00
rossberg@chromium.org
2879f2104c Revert "Load the global proxy from the context of the target function."
This reverts commit https://code.google.com/p/v8/source/detail?r=18458, since it exhibits a bug that breaks some tests.

TBR=verwaest@chromium.org
BUG=

Review URL: https://codereview.chromium.org/93863006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-07 09:55:25 +00:00
verwaest@chromium.org
5b40c38679 Load the global proxy from the context of the target function.
BUG=
R=dcarney@chromium.org

Review URL: https://codereview.chromium.org/111613003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-07 08:21:17 +00:00
jkummerow@chromium.org
315b0c6a30 Delete unused TypeInfo class
R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/105313008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-20 13:33:20 +00:00
jkummerow@chromium.org
28cab36838 Ensure that Code objects' kind specific flags are initialized properly.
Also, have the stub cache set a valid MajorKey on stubs it creates.
Getting weird random bits frightens and confuses the poor simple type feedback oracle.

R=hpayer@chromium.org

Review URL: https://codereview.chromium.org/108443004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18309 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-13 10:27:19 +00:00
yurys@chromium.org
cd5ea74700 Replace 'operator*' with explicit 'get' method on SmartPointer
Made operator* return reference to the raw type, not pointer. New method 'get()' should be used when raw pointer is needed.

Also removed useless inline modifier from the SmaprtPointer methods and added const modifier to the methods that don't change smart pointer.

Made ~SmartPointerBase protected to avoid accidental calls of the non-virtual base class's destructor.

drive-by: fixed use after free in src/factory.cc

BUG=None
LOG=N
R=alph@chromium.org, svenpanne@chromium.org

Review URL: https://codereview.chromium.org/101763003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18275 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-09 07:41:20 +00:00
mvstanton@chromium.org
30c77be771 Removed pieces of extra_ic_state scattered around the stub compiler class hierarchy, and pushed down to a extra_ic_state in the base class.
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/98853002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-02 11:59:44 +00:00
verwaest@chromium.org
4d5ec5e656 Reupload CallIC changes.
Relands https://codereview.chromium.org/91963003/ with fix for the invalid receiver patching in case of the global object / interceptor.
BUG=
R=ishell@chromium.org

Review URL: https://chromiumcodereview.appspot.com/96763002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-29 12:57:47 +00:00
yangguo@chromium.org
09c63bc961 Revert r18131 and r18139 "Clean up in the CallStubCompiler".
and "Fix register usage."

TBR=verwaest@chromium.org

Review URL: https://codereview.chromium.org/96573002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-29 09:02:00 +00:00
verwaest@chromium.org
268f224f92 Remove strictmode from FindHandler.
R=mvstanton@chromium.org

Review URL: https://chromiumcodereview.appspot.com/95433002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-28 18:13:30 +00:00
verwaest@chromium.org
60d995fc99 Fetch strictmode in the interceptor setter from the IC.
R=mvstanton@chromium.org

Review URL: https://chromiumcodereview.appspot.com/95373002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-28 18:11:15 +00:00
mvstanton@chromium.org
e066a3667d Move responsibility for definition of ExtraICState bits into the ICs.
Currently it's in the Code object for some ICs and in ICs for other ICs.
This should make it easier to alter bits as needed.

2) Recover an extra bit in the code object to give us 6 bits for the extra ic state. We'll need it soon to store contextual state.

3) Cleanup code that treated StrictMode enum and ExtraICState enum as interchangeble.

R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/91803003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-28 15:32:55 +00:00
verwaest@chromium.org
bb86f02462 Cleanup in the CallStubCompiler.
BUG=
R=ishell@chromium.org

Review URL: https://chromiumcodereview.appspot.com/91963003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18131 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-28 15:26:04 +00:00
verwaest@chromium.org
bbef8af130 Use the HandlerFrontendHeader in most call compilers.
R=ishell@chromium.org

Review URL: https://chromiumcodereview.appspot.com/83753002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18125 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-28 13:56:49 +00:00
verwaest@chromium.org
90cecd65dc Only use Type for compiling load handlers.
BUG=
R=ishell@chromium.org

Review URL: https://chromiumcodereview.appspot.com/80693002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18025 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-22 15:08:22 +00:00
verwaest@chromium.org
016113d945 Use Type in CheckPrototypes.
R=ishell@chromium.org

Review URL: https://chromiumcodereview.appspot.com/78023002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-22 15:06:20 +00:00
verwaest@chromium.org
40d255ec82 Move template instance check from Object to FunctionTemplateInfo::IsTemplateFor
BUG=
R=dcarney@chromium.org

Review URL: https://chromiumcodereview.appspot.com/67613005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 13:38:15 +00:00
bmeurer@chromium.org
b39db7bbf3 Remove unused StubType's, freeing 2 bits in Code objects.
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/75973005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 12:04:54 +00:00
verwaest@chromium.org
38630a765f Convert PatchCache (and related methods) to use types rather than objects/maps.
R=rossberg@chromium.org

Review URL: https://chromiumcodereview.appspot.com/75413002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-18 17:18:14 +00:00
danno@chromium.org
4ed2538262 Generate KeyedLoadDictionaryElementStub with Hydrogen
R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/19492007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17804 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-15 17:53:35 +00:00
verwaest@chromium.org
c3270daae6 Replace miss_mode flag with explicit Load/Store Force Generic methods.
R=ishell@chromium.org

Review URL: https://chromiumcodereview.appspot.com/70233009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-15 09:34:44 +00:00
verwaest@chromium.org
6befb8d5cd Also support smi in load-ICs.
BUG=
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/68523009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-14 16:37:36 +00:00
verwaest@chromium.org
93f2ed48d9 Handle all object types (minus smi) in load/store ICs
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/62953007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-14 16:25:31 +00:00
vegorov@chromium.org
adae3f77ec Allow redirecting disassembly and deoptimization traces into a file.
This is controlled by two flags:

--redirect_code_traces
--redirect_code_traces_to=<filename>

When redirection is enabled but --redirect_code_traces_to is not specified traces are written to a file code-<pid>-<isolate>.asm. This mangling scheme matches hydrogen.cfg and allows easy discovery of compilation artifacts in a multi-V8 environment (e.g. when compilation is traced from inside Chromium).

D8 defines --redirect_code_traces_to=code.asm similar to hydrogen.cfg redirection.

BUG=
R=danno@chromium.org

Review URL: https://codereview.chromium.org/43273004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17571 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-07 16:35:27 +00:00
verwaest@chromium.org
442e77d536 Turn Load/StoreGlobal into a handler.
BUG=
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/26968004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-07 10:17:13 +00:00
jkummerow@chromium.org
d0c5614f9d Proper fix for the issue exposed by r17459
This reverts r17462 and instead fixes StubCache::ComputeLoadNonexistent by replacing s/IsGlobalObject/IsJSGlobalObject/ there.

R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/59103005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-05 11:01:31 +00:00
jkummerow@chromium.org
2ebfd6e90e Add missing negative dictionary lookup to NonexistentHandlerFrontend
BUG=v8:2980
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/57433003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-04 14:14:09 +00:00
mstarzinger@chromium.org
b47dd2b58c Make PropertyCell::UpdatedType return a handle.
R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/31933003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17312 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-22 08:24:35 +00:00
mstarzinger@chromium.org
19b2ee1c40 Handlify PropertyCell::SetValueInferType and friends.
This finally gets rid of the pesky trampoline in SetValueInferType and
enforces the layering between PropertyCell and Heap. It requires full
handlification of NewGlobalObject as well, which is only used when the
snapshot is created at compile-time.

R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/28783002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17297 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-21 13:55:24 +00:00
verwaest@chromium.org
095ce23d58 Remove BaseLoad/StoreStub compilers, and the stub-cache interface duplication.
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/26873002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-11 14:05:23 +00:00
verwaest@chromium.org
04e1462f9e Centralize handler caching and probing in ic.cc.
Also purge invalid POLYMORPHIC stubs. In a next step the compilers should probably be merged and the "Compute*" on the stub-cache removed.

BUG=
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/25548009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-11 13:48:14 +00:00
yangguo@chromium.org
995ea2bd82 Handlify JSObject::GetProperty????Interceptor.
R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/25669004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-10 15:27:02 +00:00
verwaest@chromium.org
7f6270dbf2 Don't use StubType to probe the code caches.
There is only one stub-type in the cache at all times. By ignoring the type up-front, we can in a later phase move cache probing before even computing the type.

BUG=
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/25520003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-02 17:23:30 +00:00
verwaest@chromium.org
54b3745503 Encapsulate extra_ic_state in CallICs.
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/25263002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-01 13:17:04 +00:00
verwaest@chromium.org
b38b81bbfe Always cache the original target in a handle on the IC.
This requires us to always open a handle-scope in the miss handlers.

BUG=
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/25238002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-01 09:47:18 +00:00
verwaest@chromium.org
63b584474f Reduce code duplication in IC updating.
BUG=
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/25033003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-01 09:30:07 +00:00
verwaest@chromium.org
0f715540a2 Tag handlers as HANDLER rather than STUB.
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/25044002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17012 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-30 13:53:21 +00:00
verwaest@chromium.org
0bff3fa74b Remove duplicate way of encoding the holder in the flags.
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/24316002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-20 11:22:23 +00:00
mstarzinger@chromium.org
16a22a96c3 Handlify JSReceiver::SetProperty and friends.
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/23601031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-17 11:01:43 +00:00
verwaest@chromium.org
223ac69ff6 Rename StubType MAP_TRANSITION to TRANSITION.
R=mvstanton@chromium.org

Review URL: https://chromiumcodereview.appspot.com/24120007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-16 09:30:43 +00:00
verwaest@chromium.org
e9c4a49866 Reland Handle non-JSObject heap objects using slow-path IC stub guarded by the map.
R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23578030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-12 22:04:04 +00:00
verwaest@chromium.org
ff412d8c37 Revert "Handle non-JSObject heap objects using slow-path IC stub guarded by the map."
TBR=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23475039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16692 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-12 16:57:37 +00:00
verwaest@chromium.org
f375e0514b Handle non-JSObject heap objects using slow-path IC stub guarded by the map.
BUG=chromium:280632
R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23691056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16689 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-12 16:12:04 +00:00
mstarzinger@chromium.org
34edb73332 Refactoring PropertyCallbackInfo & FunctionCallbackInfo, step 1.
The goal is to unify PropertyCallbackInfo and FunctionCallbackInfo so that they
contain the same fields.

The field order will be:
holder
isolate
return value default value
return value
data
this

This step 1 reorders the PropertyCallbackInfo fields.

BUG=
R=dcarney@chromium.org, mstarzinger@chromium.org

Committed: http://code.google.com/p/v8/source/detail?r=16673

Review URL: https://codereview.chromium.org/23620036

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-12 14:32:14 +00:00
mstarzinger@chromium.org
e6d10e4243 Revert "Refactoring PropertyCallbackInfo & FunctionCallbackInfo, step 1."
TBR=marja@chromium.org

Review URL: https://codereview.chromium.org/23431019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-12 10:03:56 +00:00
mstarzinger@chromium.org
541840f8c1 Refactoring PropertyCallbackInfo & FunctionCallbackInfo, step 1.
The goal is to unify PropertyCallbackInfo and FunctionCallbackInfo so that they
contain the same fields.

The field order will be:
holder
isolate
return value default value
return value
data
this

This step 1 reorders the PropertyCallbackInfo fields.

BUG=
R=dcarney@chromium.org, mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/23620036

Patch from Marja Hölttä <marja@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-12 09:09:39 +00:00
mstarzinger@chromium.org
ebbd9c8ed7 Revert "Unify computation of load stubs in stub cache."
TBR=verwaest@chromium.org

Review URL: https://codereview.chromium.org/24095005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-11 16:27:41 +00:00
mstarzinger@chromium.org
45a65d870d Unify computation of load stubs in stub cache.
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/23647011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-11 15:44:09 +00:00
mstarzinger@chromium.org
5dc202d274 Revert "Handlify JSObject::AddProperty method" for performance.
TBR=verwaest@chromium.org

Review URL: https://codereview.chromium.org/23464069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16655 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-11 13:42:57 +00:00