Commit Graph

1061 Commits

Author SHA1 Message Date
rossberg@chromium.org
ac2b8c04f3 Proxies: Make 'with' work, plus minor other fixes
Also fixes internal exception handling in several places of the runtime.

R=yangguo@chromium.org
BUG=v8:1543

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-19 14:07:23 +00:00
mvstanton@chromium.org
ec8c6f4692 Rename AllocationSiteInfo to AllocationMemento
This is just a rename change with the exception of a bug found along the way in
CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub(). There, the
intent is to get the boilerplate object from an AllocationSite. But the wrong
HObjectAccess was used. It only succeeds because it happened to be the same
offset :).

BUG=
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-19 13:30:49 +00:00
mstarzinger@chromium.org
13f7c56e05 Handlify JSFunction::SetPrototype method.
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-18 07:59:48 +00:00
mstarzinger@chromium.org
dfc945d594 Handlify JSReceiver/JSObject::DeleteProperty method.
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15730 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-17 16:38:49 +00:00
titzer@chromium.org
b1373531ba Add support for empty hydrogen filter that matches only the top-level JSFunction.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-17 16:21:03 +00:00
mvstanton@chromium.org
b9f0c06ab2 The gc should be able to traverse all AllocationSites for decision making. The sites are threaded into a weak list. Special problems include:
* Allocations of AllocationSites occur in generated code, so generated code needs to be able to add to the list. For now I have a special hydrogen instruction, though it would be nice to use general purpose instructions.
* The snapshot contains AllocationSites, and these need to be re-threaded into the list on deserialization.

Something nice is that the AllocationSites are only created in old space, so a special new space visitor isn't required.

BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-17 11:50:24 +00:00
mvstanton@chromium.org
4465c83104 Calls to HCheckFunction can be eliminated if the value is an HConstant.
Reland "Calls to HCheckFunction can be eliminated if the value is an HConstant"
(https://codereview.chromium.org/18751003/).

The CL failed because of heap snapshot issues. alph@chromium.org just checked in
a fix for that (https://code.google.com/p/v8/source/detail?r=15694).

BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15704 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-17 08:46:01 +00:00
adamk@chromium.org
625a0e9759 Add map transition for observed objects
This patch enables objects to undergo a single transition when they become observed, avoiding the need to create a new map for every observed objects.

Observed objects which become unobserved does not cause another map transition and unobserved does not clear the observed bit on the map. The unobserved object.

R=verwaest@chromium.org

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

Patch from Rafael Weinstein <rafaelw@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15650 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-13 00:20:40 +00:00
yangguo@chromium.org
bd04a838a7 Check for scheduled exceptions after a failed-access-check callback.
R=verwaest@chromium.org
BUG=v8:2524

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15643 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-12 11:42:07 +00:00
olivf@chromium.org
bdf4fc96b0 Encapsulate compare nil ic_state.
BUG=
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15639 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 17:20:57 +00:00
mvstanton@chromium.org
10615aef7b AllocationSites: when updating allocation site transition information,
be careful to merge feedback appropriately. For example, one array may
have gone holey, and then another allocated at the same place instead
went DOUBLE but remained packed. In this case the ElementsKind
ultimately stored in the AllocationSite should be HOLEY_DOUBLE.

BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15629 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 13:08:36 +00:00
adamk@chromium.org
25ca62b6ad HasRealIndexedProperty doesn't work on JSGlobalProxy
HasRealIndexedProperty didn't unwrap the JSGlobalProxy and therefore always
returned false.

BUG=257748
R=adamk@chromium.org, rossberg@chromium.org

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

Patch from Adam Barth <abarth@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 19:03:58 +00:00
mvstanton@chromium.org
448b268962 Revert "Calls to HCheckFunction can be eliminated if the value is an HConstant"
This reverts commit 3f96122cc572f7a0b638c30f65328c3cb3666795.

BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 12:19:37 +00:00
rossberg@chromium.org
b04abd892f Fix stupidity
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 15:41:06 +00:00
rossberg@chromium.org
65170b3b9e Revert^2 "Derive synthetic type bounds for expressions""
Reverts https://codereview.chromium.org/17842004 (again), due to SS regression.

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15559 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 15:38:39 +00:00
mvstanton@chromium.org
23695eb86e Rename AllocationSite::payload to AllocationSite::transition_info
BUG=
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 15:00:12 +00:00
rossberg@chromium.org
1d51b7a760 Unrevert "Derive synthetic type bounds for expressions"
Reenables https://codereview.chromium.org/17842004

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 13:19:58 +00:00
rossberg@chromium.org
2461d2a540 Add Type::cast
R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 13:07:41 +00:00
mvstanton@chromium.org
67d9051bcd Create AllocationSite objects, pointed to by AllocationSiteInfo.
This creates a platform where we can do additional things with allocation sites,
other than just aid in reducing array transitions.

BUG=
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 10:02:16 +00:00
yangguo@chromium.org
c1c10b452f Remove bogus assertion in parallel recompilation.
Functions that are optimized by the parallel thread and ready for installing
are not necessarily marked as in-recompilation-queue. For example, OSR could
have replaced the code by optimized code.

R=hpayer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 09:29:49 +00:00
mvstanton@chromium.org
eea586f2a1 Calls to HCheckFunction can be eliminated if the value is an HConstant
function, and that function handle matches the target handle.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 09:00:59 +00:00
danno@chromium.org
bd50e6d38f Refactoring and cleanup of control instructions
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 10:40:14 +00:00
danno@chromium.org
345cc98a25 Generate StoreGlobal stubs with Hydrogen
- Constants globals are inlined into Hydrogen code using code dependencies that invalidate the Crankshafted code when global PropertyCells or the global object change.
- The more general case generates code that is just as good as the hand-written assembly stubs on all platforms.

R=rossberg@chromium.org, ulan@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15512 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 10:34:02 +00:00
yangguo@chromium.org
02674ee414 Keep two empty lines between declarations for cpp files
R=yangguo@chromium.org

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

Patch from Haitao Feng <haitao.feng@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 09:52:11 +00:00
mstarzinger@chromium.org
328191d093 Handlify GlobalObject::EnsurePropertyCell method.
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 09:38:29 +00:00
olivf@chromium.org
240c7aced9 Convert UnaryOpStub to a HydrogenCodeStub
BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 09:26:22 +00:00
olivf@chromium.org
950a372834 Revert "Convert UnaryOpStub to a HydrogenCodeStub"
The problem is the HCallConstantFunction which is not context sensitive, so we leak the builtin. We first need a Hydrogen version of __ IvokeBuiltin.

BUG=
R=danno@chromium.org, machenbach@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 19:57:25 +00:00
olivf@chromium.org
0d2fed8f26 Convert UnaryOpStub to a HydrogenCodeStub
BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 14:56:53 +00:00
mstarzinger@chromium.org
e67fb1e1fe Handlify JSObject::DefineAccessor method.
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 16:24:23 +00:00
mstarzinger@chromium.org
6bde251534 Handlify JSObject::SetPrototype method.
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 15:32:46 +00:00
yangguo@chromium.org
15c28b8006 Fix debuggersupport=off build.
R=ulan@chromium.org
BUG=v8:2754

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15453 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 15:30:33 +00:00
ulan@chromium.org
74d147a25d Enable weak embedded maps in optimized code.
If the top optimized code in call stack is at the point that does not support
deoptimization, then treat the maps in the code as strong pointers.

Note that other optimized code in call stack must support deoptimization
because of the call instruction with side-effects.

BUG=217858,v8:2073
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 15:15:58 +00:00
danno@chromium.org
77c20c30a3 Revert r15419: "Generate StoreGlobal stubs with Hydrogen"
TBR=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 15:12:21 +00:00
danno@chromium.org
a3bce19868 Generate StoreGlobal stubs with Hydrogen
- Constants globals are inlined into Hydrogen code using code dependencies that invalidate the Crankshafted code when global PropertyCells or the global object change.
- The more general case generates code that is just as good as the hand-written assembly stubs on all platforms.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 13:22:13 +00:00
yangguo@chromium.org
85d7a36ee0 Abort optimization when debugger is turned on.
BUG=v8:2751
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15378 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 11:34:51 +00:00
danno@chromium.org
c35dbc30cb Generalize utilities to allow code templatization
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15357 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 13:36:15 +00:00
danno@chromium.org
00709075ea Add DependentCode to PropertyCells
R=mstarzinger@chromium.org, ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 16:17:12 +00:00
titzer@chromium.org
bfa9fe95dc Change PC for OSR entries to point to something more sensible (i.e. the first UnknownOsrValue), removing the need to record spilled OSR values and the need for duplicate deopt entries.
Review URL: https://codereview.chromium.org/16381006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 08:43:27 +00:00
svenpanne@chromium.org
a92d237948 Allow users of the V8 API to distinguish between unset and undefined HiddenValues
BUG=v8:2746
R=svenpanne@chromium.org

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

Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15329 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 08:00:05 +00:00
bmeurer@chromium.org
477f872c34 Fix GCC error about comma at end of enumerator list.
TBR=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15316 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 09:34:22 +00:00
bmeurer@chromium.org
e7adf305fe Cleanup Code::Kind2String().
Use CODE_KIND_LIST() to automatically generate the case statements for
Code::Kind2String().

BUG=
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15314 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 08:51:49 +00:00
loislo@chromium.org
1a15f8f768 CPUProfiler: Simplify logging part of CreateCodeEvent functions.
We have 5 overloaded functions with name CreateCodeEvent.
All these functions have many common parts. I'd like to eliminate the difference between them.

TEST=existing tests
R=yangguo@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15287 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 12:55:19 +00:00
dslomov@chromium.org
91eb5f8d25 DataView implementation.
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 13:02:38 +00:00
rossberg@chromium.org
0977c60984 Use AST's type field and merge types for unary, binary & compare ICs
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 11:10:06 +00:00
yurys@chromium.org
c7b3ef0e05 Make sure ExternalCallbackScope is always created when VM state changes to EXTERNAL
ExternalCallbackScope is used to let CPU profiler know which API callback is being executed. Whenever such callback is called we should create VMState<ETERNAL> and ExternalCallbackScope. This patch fixes several places where VMState<ETERNAL> went without ExternalCallbackScope.

BUG=244580
R=dcarney@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15249 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 14:47:35 +00:00
mstarzinger@chromium.org
a527f451bc Deprecate old code aging mechanism.
The old code aging mechanism is too agressive with flushing as it leads
to many functions being flushed and recompiled over and over again. By
now the new code aging mechanism has stabilized enough to deprecate the
old fallback mechanism.

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15209 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 17:00:01 +00:00
jkummerow@chromium.org
07596dd7b8 Fix Runtime_SetProperty to properly handle OOM failures
BUG=chromium:249873
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15186 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-17 17:42:27 +00:00
palfia@homejinni.com
f8fc5c443e Allow running mjsunit/manual-parallel-recompile on single-core systems.
- Add an %IsParallelSupported() builtin function to  make possible to check support of parallel processing from JavaScripts.
- Change the test script that if parallel recompilation is forced on a single core CPU, expect that it won't be recompiled in parallel.
- Change the  JSFunction::MarkForParallelRecompilation() to fall back gracefully if parallel recompilation is not supported.

BUG=v8:2733
TEST=mjsunit/manual-parallel-recompile

Review URL: https://codereview.chromium.org/17277002
Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15184 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-17 16:27:18 +00:00
danno@chromium.org
61a23ceb4d Refactor only: Rename JSGlobaPropertyCell to PropertyCell
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 16:06:12 +00:00
rossberg@chromium.org
94f651bc1b Migrate Compare ICs to new type rep
(Does not yet use common AST expression type field.)

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-12 17:20:37 +00:00