Commit Graph

10797 Commits

Author SHA1 Message Date
bmeurer@chromium.org
4780c99790 Add a common templatized implementation of OS::DumpBacktrace() and OS::StackWalk() to platform-posix.h and use it for Linux, Mac OS X and FreeBSD.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15644 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-12 12:02:26 +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
yangguo@chromium.org
e002207321 Fall back to generic on access checks in JSON.stringify.
BUG=259366
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15641 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-12 10:04:35 +00:00
titzer@chromium.org
2b9836af8c Remove special-casing of EAGER and SOFT deoptimization calling conventions, allowing calling address to always be available to deoptimization entries.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15640 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-12 07:26:00 +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
titzer@chromium.org
28aca51e8f Refactor JavaScriptFrame::function() to return a JSFunction* and remove associated casts.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 16:45:58 +00:00
danno@chromium.org
d1d5f59d87 Fix build breakage after 15630
Use EXTRA_CALL_FRAME rather than NO_EXTRA_FRAME in
ElementsTransitionAndStoreIC_Miss.

TBR=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15637 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 16:25:58 +00:00
hpayer@chromium.org
90056df999 Use filler maps for folded allocations when verify heap is turned on.
BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15636 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 15:29:02 +00:00
bmeurer@chromium.org
6c13f097d6 Turn ElementsTransitionAndStore stub into a HydrogenCodeStub.
R=danno@chromium.org, mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15635 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 14:29:00 +00:00
mvstanton@chromium.org
9b856d724d Bogus assert needs to be removed on non-ia32 platforms
BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15634 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 14:26:01 +00:00
verwaest@chromium.org
a7d38e483b Support grow-stub by >1 if the target is holey.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15633 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 14:21:14 +00:00
titzer@chromium.org
9e7819fac4 Added %NeverOptimize runtime call that can disable optimizations for a method for tests.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 14:17:56 +00:00
hpayer@chromium.org
90a8ac78bd Remove filler map when folding allocations and turn on allocation folding.
BUG=
R=titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 13:53:54 +00:00
bmeurer@chromium.org
c0603d2974 Enable compiled transitions by default.
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 13:53:06 +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
olivf@chromium.org
a5a144c7c0 Implement X87 stack tracking and x87 multiplication
BUG=
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15628 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 13:07:04 +00:00
bmeurer@chromium.org
b2f909cf3e Turn array index dehoisting into a proper HPhase.
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15627 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 12:03:43 +00:00
verwaest@chromium.org
a5397dce98 Keep IC monomorphic on transition, even if previously not STANDARD_STORE.
BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 11:54:43 +00:00
rossberg@chromium.org
b17713e405 Introduce type Bounds record
Refactoring in anticipation of handling variable bounds.

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 11:47:05 +00:00
hpayer@chromium.org
99d541a486 Allocation folding integrated into the GVN phase.
BUG=
R=mstarzinger@chromium.org, titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15624 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 11:41:33 +00:00
bmeurer@chromium.org
e3676e9135 Cleanup common POSIX functionality.
The Mutex implementation is the same for all 6 POSIX platformats, just
like of them use the sched_yield() to implement Thread::YieldCPU().

R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15623 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 11:37:08 +00:00
hpayer@chromium.org
fba07ddd23 Perform new space evacuation based on marking bits.
BUG=
R=titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 11:24:38 +00:00
rossberg@chromium.org
3d9586c431 This adds the following array iterator methods:
Array.prototype.values
Array.prototype.keys
Array.prototype.entries

These all return an Array Iterator object which has a next
method.

http://people.mozilla.org/~jorendorff/es6-draft.html#sec-15.4.5

BUG=v8:2722
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15620 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 11:20:54 +00:00
jochen@chromium.org
2809793a4f Only depend on icudata on windows.
On windows, this triggers the dll to be copied to the correct
locations. On other platforms, icudata is compiled in, and depending on
it results in an invalid linker archive ordering.

BUG=v8:2745
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 11:01:00 +00:00
jochen@chromium.org
97409c2363 Move InitializeICU() to the V8 API and use it.
I can't get rid of the enable_i18n flag yet, as we need to be able to
turn off all extensions for creating the snapshot.

BUG=v8:2745
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 09:58:54 +00:00
mvstanton@chromium.org
b61dfd4a82 A bug in AllocationSite::GetMode(from, to) meant that we didn't update
boilerplates for SMI to SMI_HOLEY transitions.

BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15617 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 09:39:22 +00:00
hpayer@chromium.org
c518bee54e Implemented lazy sweeping of new space.
BUG=
R=titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 09:17:03 +00:00
bmeurer@chromium.org
c294a40e0a Turn canonicalization into a proper HPhase.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15613 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 08:21:50 +00:00
verwaest@chromium.org
e6721cdcb4 Fix StoreIsUninitialized, and add Soft Deopt if keyed store is uninitialized.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15612 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 07:52:57 +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
bmeurer@chromium.org
695b18c050 Turn merge removable simulates into a proper HPhase.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15609 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 16:34:28 +00:00
dslomov@chromium.org
5eb63e483d Change DataView accessors behavior for insufficient args.
ES6 spec for DataView is not fully finished, but Blink, WebKit and
Firefox agree in that for DataView use of getters/setters with no
arguments should result in exceptions, while undefined offset argument
is the same as zero.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15607 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 16:18:59 +00:00
verwaest@chromium.org
6efe8ca229 Flag rewriting an IC while writing to a global constant property as a failure caused by the constant property turning mutable.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 16:06:30 +00:00
olivf@chromium.org
e84649d85e Fix unary op type feedback.
BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 16:03:00 +00:00
verwaest@chromium.org
d1155a1f09 Revert "Allow NORMAL ICs to go polymorphic."
BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15604 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 16:00:48 +00:00
olivf@chromium.org
01b4c2831e Use static_cast instead of reinterpret_cast
BUG=
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15603 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 16:00:08 +00:00
rodolph.perfetta@gmail.com
762157d697 ARM: Implement memcpy using NEON.
Add support for a few NEON and ARM SIMD instructions and use them for various
memcpy operations.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 15:32:39 +00:00
palfia@homejinni.com
c04a72e76b MIPS: Replace custom builtin invocation instructions by a generic version.
Port r15582 (585c121)

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 15:26:38 +00:00
verwaest@chromium.org
51aa0c13da Allow NORMAL ICs to go polymorphic.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 15:24:15 +00:00
danno@chromium.org
5bace7178d Prepare push to trunk. Now working on version 3.20.5.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 14:49:05 +00:00
bmeurer@chromium.org
5664bcaed3 Refactor compute minus zero checks into a proper HPhase.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 14:08:19 +00:00
bmeurer@chromium.org
854e9b99fb Insert HTrapAllocationMemento only when required for TransitionElementsKindStub.
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15594 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 13:24:51 +00:00
verwaest@chromium.org
cc877e4836 Turn polymorphic calls using the same prototype monomorphic.
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 13:05:41 +00:00
loislo@chromium.org
487a61934f Improve test-cpu-profiler.cc tests stability
The tests sometimes fail on bots as they don't have time to collect enough samples. This change makes them use counter of samples taken when v8 is either in JS or EXTERNAL state and repeat sampling until desired threshold is reached.

BUG=v8:2628
R=loislo@chromium.org, yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15592 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 12:56: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
bmeurer@chromium.org
bdff9c70b8 Use BuildGrowElementsCapacity for the TransitionElementsKind stub.
R=danno@chromium.org, dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 12:19:02 +00:00
verwaest@chromium.org
22d7a85519 Unify Count Operation assignment with other assignments
This relands 15578, disables 1 test in harmony observe re bug v8:2774

R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 12:02:18 +00:00
olivf@chromium.org
9a61947869 Fix missing spaces
BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15587 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 12:01:29 +00:00
olivf@chromium.org
c5f20ef8dc Type::GetName(...) for inspecting Types in the debugger
BUG=
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15586 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 11:20:00 +00:00
jochen@chromium.org
865ce5806f Factor out toolset definitions in a separate gypi file
That way, third-party libraries use the correct toolset settings.

BUG=v8:2745
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 11:15:16 +00:00
palfia@homejinni.com
7c8883f3ce MIPS: Adjust default Heap sizes.
This change decreases the default Heap sizes on MIPS (sets the
same sizes as on Android).

Most MIPS hw has smaller RAM size than 700MB, which can lead
to test failures, if a test does not set the  Heap sizes explicitly
(like cctest/test-mark-compact/MarkCompactCollector).

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15583 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 10:01:30 +00:00
olivf@chromium.org
857178ad23 Replace custom builtin invocation instructions by a generic version
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15582 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 09:02:23 +00:00
dslomov@chromium.org
6071894047 Revert "Unify the Count Operation assignment with other assignments."
This reverts commit r15578.

This change made mjsunit/harmony/object-observe.js flaky.

TBR=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-10 07:53:16 +00:00
dslomov@chromium.org
cfa91762ac Allow parameterless typed array constructors.
ES6 spec tacitly allows them, and they are allowed in Firefox and in
WebKit/Blink.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-09 19:34:21 +00:00
verwaest@chromium.org
5eeed4636d Unify the Count Operation assignment with other assignments.
This does not enable inlining of setters (yet).

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-09 17:08:47 +00:00
palfia@homejinni.com
b7a2c88f0f MIPS: Do not omit the write-barrier if the input value is a smi.
Port r15573 (3954d53)

Original commit message:
ARM: Do not omit the write-barrier if the input value is a smi.
The input value isn't what is written into the field if the representation is double. A heap-number is written to the field instead; which requires a write-barrier.

BUG=chromium:254570

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-09 15:58:31 +00:00
palfia@homejinni.com
17e228d3dd MIPS: Implement Polymorphic Store ICs.
Port r15566 (a76585e)

Original commit message:
- Makes a common superclass for Load and Store stub compiler.
- Splits all non-normal Store ICs into handler and IC.
- Ensures monomorphic store ICs go polymorphic.
- Feeds polymorphic type feedback into count operation.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15576 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-09 15:54:43 +00:00
mvstanton@chromium.org
3f1fc1d3ab Bugfix: AllocationSite objects need to be walkable by the heap snapshot
generator.

BUG=
R=machenbach@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-09 14:16:59 +00:00
yangguo@chromium.org
b99ca1ab12 Do not implicitly convert receivers for builtin functions when inspecting frames.
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-09 13:58:11 +00:00
verwaest@chromium.org
a1dfbc4627 ARM: Do not omit the write-barrier if the input value is a smi.
The input value isn't what is written into the field if the representation is double. A heap-number is written to the field instead; which requires a write-barrier.

BUG=chromium:254570
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-09 12:31:59 +00:00
jochen@chromium.org
518ca395cc Initialize ICU data files in d8 and disable i18n for other code samples
BUG=v8:2745
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15572 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-09 12:26:07 +00:00
rossberg@chromium.org
189c0782d3 Unrevert^2 "Derive synthetic type bounds for expressions""
Reenables https://codereview.chromium.org/17842004 (again).

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15571 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-09 11:48:47 +00:00
verwaest@chromium.org
125b7d0848 Add support to turn polymorphic loads from the same prototype into a monomorphic load.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15569 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-09 09:59:23 +00:00
hpayer@chromium.org
42c82d5e4f Do not iterate the new space on marking deque overflow.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15567 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-09 08:40:34 +00:00
verwaest@chromium.org
a9fd01d567 - Makes a common superclass for Load and Store stub compiler.
- Splits all non-normal Store ICs into handler and IC.
- Ensures monomorphic store ICs go polymorphic.
- Feeds polymorphic type feedback into count operation.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-09 08:22:41 +00:00
jochen@chromium.org
c2b039970e Don't use the identifiers TRUE and FALSE
icu uses the same identifiers, so we can't just #undef them

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15565 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-09 07:19:51 +00:00
palfia@homejinni.com
6edaa525eb MIPS: Fix debug mode failures introduced by r15561.
The commit r15561 introduced a lot of debug mode test failures
on MIPS. This change solves these failures by making
the FP-saved version of StoreBufferOverflowStub available
at snapshot time. This stub was added to ARM by commit r14359.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15564 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-09 00:00:15 +00:00
palfia@homejinni.com
0565ca5604 MIPS: Rename AllocationSite::payload to AllocationSite::transition_info
Port r15556 (3cd37fff)

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 18:00:24 +00:00
palfia@homejinni.com
82d8580215 MIPS: Bugfix: The general array constructor stub did not handle the case properly when it is called with a function pointer in the type cell, instead assuming that an AllocationSite object should be present.
Port r15555 (262c081)

Original commit message:
The case where this can happen is if the cell is uninitialized, then the
first constructor call made is to the Array function of a different
context. In that case, we'll store the function pointer in the cell,
and then go ahead and call the array constructor stub too. The bug is
fixed by checking for the AllocationSite object map. If not found, the
constructor stub goes forward with a default ElementsKind, just as in
several other cases.

A test in allocation-site-info.js was beefed up to make sure the state
chain described above is traversed.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15562 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 17:58:03 +00:00
palfia@homejinni.com
28d1314362 MIPS: Create AllocationSite objects, pointed to by AllocationSiteInfo.
Port r15545 (8cf04c4)

Original commit message:
This creates a platform where we can do additional things with allocation sites,
other than just aid in reducing array transitions.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15561 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 17:01:12 +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
verwaest@chromium.org
b5f63ae659 Revert "Introduce a handle zapping setting, and enable it by default for release and debug" due to performance impact.
R=jochen@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15558 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 15:28:25 +00:00
jochen@chromium.org
ae2709f800 Fix an implicit cast from int64 to double in the i18n extension
On MSVS, this throws an error

BUG=v8:2745
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 15:22:12 +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
mvstanton@chromium.org
c1e19bfc35 Bugfix: The general array constructor stub did not handle the case
properly when it is called with a function pointer in the type cell,
instead assuming that an AllocationSite object should be present. The
case where this can happen is if the cell is uninitialized, then the
first constructor call made is to the Array function of a different
context. In that case, we'll store the function pointer in the cell,
and then go ahead and call the array constructor stub too. The bug is
fixed by checking for the AllocationSite object map. If not found, the
constructor stub goes forward with a default ElementsKind, just as in
several other cases.

A test in allocation-site-info.js was beefed up to make sure the state
chain described above is traversed.

BUG=
R=hpayer@chromium.org, hpayer@google.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15555 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 14:41:54 +00:00
ulan@chromium.org
2c33325114 Fix estimation of released pages when collecting evacuation candidates.
Do at least two GCs in LowMemoryNotification.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15554 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 14:41:33 +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
ulan@chromium.org
7ab931ee62 Fix early exit condition for LowMemoryNotification.
When computing next_gc_likely_to_collect_more do not take into account already
free nodes in PostGarbageCollectionProcessing.

This reduces the number of full GC in LowMemoryNotification from 7 to ~2.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 11:51:34 +00:00
jochen@chromium.org
ab5addd86d Introduce a handle zapping setting, and enable it by default for release and debug
The checks are split out from "extra checks" which are too expensive to
turn on by default.

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15548 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 11:29:55 +00:00
jkummerow@chromium.org
f0811f4e6f Fix and cleanup can_be_minus_zero computation
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15546 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 11:15:24 +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
bmeurer@chromium.org
47df386841 Turn the representation changes into a proper HPhase.
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 09:02:09 +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
bmeurer@chromium.org
99f171a128 Turn redundant bounds checks elimination into a proper HPhase.
R=dslomov@chromium.org, mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15537 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 08:36:28 +00:00
mstarzinger@chromium.org
a634b527fb Prepare push to trunk. Now working on version 3.20.4.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15536 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 08:35:11 +00:00
bmeurer@chromium.org
b899185790 Turn infer types into proper HPhase.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 08:33:03 +00:00
bmeurer@chromium.org
e5b69658e4 Turn redundant phi elimination into proper HPhase.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 08:18:29 +00:00
hpayer@chromium.org
6c4594b7cd Refactor MacroAssembler::Allocate a little bit for X64
R=hpayer@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15532 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 08:10:12 +00:00
bmeurer@chromium.org
5fd94c9ba1 Turn stack check elimination into proper HPhase.
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 07:03:57 +00:00
loislo@chromium.org
5571dc4273 CPUProfiler: Improve line numbers support in profiler.
1) report line number even if a script has no resource_name (evals);
  a) do that for already compiled functions in log.cc;
  b) do that for fresh evals in compiler.cc;

2) Implement the test for LineNumbers and make it fast and stable, otherwise we have to wait for tick samples;
  a) move processor_->Join() call into new Processor::StopSynchronously method;
  b) Process all the CodeEvents even if we are stopping Processor thread;
  c) make getters for generator and processor;

3) Fix the test for Jit that didn't expect line numbers;

4) Minor refactoring:
  a) in ProcessTicks;
  b) rename enqueue_order_ to last_code_event_id_ for better readability;
  c) rename dequeue_order_ to last_processed_code_event_id_ and make it a member for better readability;

BUG=
TEST=test-profile-generator/LineNumber
R=jkummerow@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-07 11:42:30 +00:00
bmeurer@chromium.org
17e58e8198 Turn dead code elimination into a proper HPhase.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15529 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-07 06:00:15 +00:00
yurys@chromium.org
696090196d Delete deprecated CPU profiler code that supports filtering by security token
The methods that allow to filter CPU profile by security token were introduced to support console.profiles in WebKit. Now that console.profiles is removed and corresponding V8 API methods have been deprecated in 3.19 branch(https://code.google.com/p/v8/source/browse/branches/3.19/include/v8-profiler.h) it is safe to remove all that code.

BUG=None
R=jkummerow@chromium.org, loislo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15528 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-06 09:12:09 +00:00
palfia@homejinni.com
a925b6b8de MIPS: Refactoring and cleanup of control instructions.
Port r15513 (6f50861)

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 16:13:32 +00:00
palfia@homejinni.com
79ce581420 MIPS: Generate StoreGlobal stubs with Hydrogen.
Port r15512 (bdf9918)

Original commit message:
- 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.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 14:51:57 +00:00
palfia@homejinni.com
075863538b MIPS: Convert UnaryOpStub to a HydrogenCodeStub.
Port r15506 (d0ea1f6)

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15524 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 14:48:50 +00:00
yangguo@chromium.org
fa001d1b6a Refactored code a bit to improve StringReplace performance
1. Use inline macro to mitigate the side effect emulation overhead
2. Refactor Zone::DeleteAll() to merge two loops together

R=bmeurer@chromium.org, yangguo@chromium.org

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

Patch from Weiliang Lin <weiliang.lin2@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 12:57:38 +00:00
yangguo@chromium.org
a3b6452d02 Unload debugger on isolate deinit.
R=hpayer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 12:52:20 +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
dslomov@chromium.org
7e0ee5301e Add internal fields to JSArrayBufferViews (JSTypedArray and JSDataView)
In Blink, JSTypedArray and JSDataView objects act as "wrappers" for C++
objects. Wrapping protocol in Blink requires all wrapper JavaScript objects
to have a certain amount of internal fields that Blink uses for
book-keeping (essentially a pointer to C++ object and some type
information). This change adds those internal fields to JSTypedArray and
JSDataView, in a similiar way to how it is done for JSArrayBuffer.

R=titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 10:12:36 +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
709600afc3 Switch to RETURN_IF_EMPTY_HANDLE for empty handle checks.
This makes sure that every place where we assume an empty handle is
indicating a pending exception gets asserted accordingly.

R=machenbach@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 09:49:53 +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
danno@chromium.org
d00a14392d Add trampoline to enable pointer -> handle code calls
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 09:36:11 +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
rossberg@chromium.org
437f8b0c24 Unrevert "Remove BinaryOp::result_type""
Reenables https://code.google.com/p/v8/source/detail?r=15265

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15505 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 08:49:37 +00:00
rossberg@chromium.org
929e193fc2 Tweak error message
R=yangguo@chromium.org
BUG=v8:2758

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 08:34:31 +00:00
jkummerow@chromium.org
7456e290f3 Fix stack alignment corruption for MinGW32 build
Contributed by Peter Varga <pvarga@inf.u-szeged.hu>

BUG=
TEST=cctest/test-assembler-ia32/StackAlignmentForSSE2,cctest/test-assembler-x64/StackAlignmentForSSE2,cctest/test-platform/StackAlignment
R=jkummerow@chromium.org

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

Patch from Peter Varga <pvarga@inf.u-szeged.hu>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 08:34:17 +00:00
hpayer@chromium.org
8983f669e4 Set GVN ChangesNewSpacePromotion for OSR Entry.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 08:17:30 +00:00
jkummerow@chromium.org
c255fba681 Merge two lines into one for V8_TARGET_ARCH_${arch} and V8_HOST_ARCH_${arch}
R=jkummerow@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15500 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 08:15:32 +00:00
machenbach@chromium.org
deefeb15d9 Prepare push to trunk. Now working on version 3.20.3.
R=hpayer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15497 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 07:05:12 +00:00
bmeurer@chromium.org
8767fdbb28 Turn range analysis into proper HPhase.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-04 19:25:16 +00:00
yurys@chromium.org
44981e4f5e Remove deprecated heap profiler methods from V8 public API
v8::HeapProfiler::FindHeapSnapshot was already deprecated when 3.19 branch was created (https://code.google.com/p/v8/source/browse/branches/3.19/include/v8-profiler.h).

BUG=None
R=loislo@chromium.org, yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-04 16:34:07 +00:00
alph@chromium.org
cc97192cb1 Change the type of system root nodes in heap snapshot to kSynthetic
R=mstarzinger@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-04 16:32:18 +00:00
yurys@chromium.org
53cf35405a Remove #include "heap-snapshot-generator-inl.h" from v8.h
This reduces number of dependent .cc files to 9 (was whole v8).

BUG=None
R=loislo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-04 16:32:12 +00:00
palfia@homejinni.com
d64472814a MIPS: Fix bug in StringConstructCode builtin.
BUG=

TEST=webkit/dfg-to-string-bad-toString, webkit/dfg-to-string-bad-valueOf,
webkit/dfg-to-string-int-or-string, webkit/dfg-to-string-side-effect,
webkit/dfg-to-string-bad-toString, webkit/dfg-to-string-bad-valueOf,
webkit/dfg-to-string-toString-in-string, webkit/dfg-to-string-int,
webkit/dfg-to-string-valueOf-in-string

Review URL: https://codereview.chromium.org/18668004
Patch from Dusan Milosavljevic <Dusan.Milosavljevic@rt-rk.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-04 15:19:03 +00:00
titzer@chromium.org
bddf08b0b1 Factor out OSR-related graph-building functionality from hydrogen.cc.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-04 09:20:07 +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
yurys@chromium.org
282926a760 Fix Mac compilation after r15484
BUG=None
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15485 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 17:26:01 +00:00
yurys@chromium.org
9ef762b683 Do not store fp and sp values in TickSample
Their values are not used neither by the tick processor nor by CpuProfiler so it is just a waste of space.

TickSample used to be a transport for grabbed register values to TickSample::Trace, now they are passed in a special structure RegisterState which is allocated on the stack for the sampling period.

Some common pieces were moved from platform-dependent code into Sampler::SampleStack and TickSample::Init.

BUG=None
R=jkummerow@chromium.org, loislo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15484 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 16:20:59 +00:00
jkummerow@chromium.org
91be57a469 Revert "Fix stack alignment corruption for MinGW32 build"
due to compile failures.

This reverts r15480.

R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 15:45:57 +00:00
yurys@chromium.org
678c9dc940 Remove #include "cpu-profiler-inl.h" from v8.h
This significantly reduces amount of files to be recompiled after changes in cpu-profiler.h and its dependencies.

BUG=None
R=loislo@chromium.org, yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 15:39:18 +00:00
jkummerow@chromium.org
77c582d253 Format stack layout comments for X64
R=jkummerow@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 15:36:49 +00:00
jkummerow@chromium.org
45681dbd76 Fix stack alignment corruption for MinGW32 build
Contributed by Peter Varga <pvarga@inf.u-szeged.hu>

BUG=
TEST=cctest/test-assembler-ia32/StackAlignmentForSSE2,cctest/test-assembler-x64/StackAlignmentForSSE2,cctest/test-platform/StackAlignment
R=jkummerow@chromium.org

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

Patch from Peter Varga <pvarga@inf.u-szeged.hu>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15480 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 15:34:50 +00:00
jkummerow@chromium.org
84833a59ba Mark i18n functions as native and set proper names
BUG=v8:2745
R=jkummerow@chromium.org

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

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15478 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 15:30:27 +00:00
mstarzinger@chromium.org
5a71b17379 GDBJIT: Remove codes when they are garbage collected.
R=mstarzinger@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 15:29:59 +00:00
jkummerow@chromium.org
b89693572a Fix typo in api.cc
BUG=v8:2745
R=jkummerow@chromium.org

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

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 15:27:47 +00:00
mstarzinger@chromium.org
0a6b0645cf Fix GDBJIT compilation on Mac after r15467.
R=machenbach@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 14:58:27 +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
45264ffbf6 Fix compilation on x64 after r15466
R=mstarzinger@chromium.org

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

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 14:21:21 +00:00
yurys@chromium.org
559e1d4540 Correctly report stack trace when current function is FunctionApply builtin
When pc is inside FunctionApply builtin function the top frame may be either
2) Internal stack frame created by FunctionApply itself.
In this case we know its caller's pc and can correctly resolve calling function.
1) Frame of the calling JavaScript function that invoked .apply(). In this case we have no practical reliable way to find out the caller's pc so we mark the caller's frame as 'unresolved'.

All this logic is implemented in ProfileGenerator. SafeStackFrameIterator is extended to provide type of the current top stack frame (iteration actually starts from the caller's frame as we know top function from pc).

BUG=252097
R=jkummerow@chromium.org, loislo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15468 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 14:04:37 +00:00
mstarzinger@chromium.org
13b60ec639 Fix GDBJIT for Linux after r15460.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15466 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 11:57:38 +00:00
bmeurer@chromium.org
e3f34a58b2 Reintroduce runtime zone to Isolate.
In case tcmalloc is not being used, the malloc()/free() overhead
can be significant for several runtime functions like StringReplace.
Therefore we reintroduce the runtime_zone into Isolate and reenable
the segment caching functionality of Zone.

There's now also a simpler version of ZoneScope w/o nesting capabilities.

BUG=v8:2759
R=danno@chromium.org, yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15465 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 11:40:30 +00:00
jkummerow@chromium.org
56ab3e3404 Import the v8-i18n extension into v8
This adds the gyp flag v8_enable_i18n_support (off by default), and the
v8 flag FLAG_enable_i18n (on by default, but without effect if
v8_enable_i18n_support is off).

BUG=v8:2745
R=cira@chromium.org, danno@chromium.org, jkummerow@chromium.org

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

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 11:22:29 +00:00
yangguo@chromium.org
f23ed09eef Fix small mistake in d8.js.
R=mvstanton@chromium.org
BUG=v8:2756

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15463 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 10:38:20 +00:00
yangguo@chromium.org
ae126e1231 Log deopts with --log-timer-events.
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 10:10:27 +00:00
mstarzinger@chromium.org
9bd3128736 Don't return frame by reference in ProcessTopOptimizedFrame.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 09:47:22 +00:00
danno@chromium.org
57f46c0190 Make MachO gdbjit support compile again
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-03 08:29:46 +00:00
jkummerow@chromium.org
de80207a4b Fix default type feedback returned from the oracle
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 16:31:39 +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
yurys@chromium.org
b0943ce158 Use stored Isolate pointer instead of Isolate::Current()
Fixed a couple of places where stored pointer to the isolate can be used instead of reading from thread local storage.

BUG=None
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15457 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 15:44:30 +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
titzer@chromium.org
63abcc515b Remove HFixedArrayBaseLength instruction and replace with regular HLoadNamedField.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 15:31:17 +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
jkummerow@chromium.org
a2d4cf9de7 Not consider the use representation in unintiliazed ArrayLiteral which always requires SMI
R=jkummerow@chromium.org

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

Patch from Weiliang Lin <weiliang.lin2@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 15:00:13 +00:00
jkummerow@chromium.org
83fb6823db Prepare push to trunk. Now working on version 3.20.2.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15447 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 14:41:58 +00:00
bmeurer@chromium.org
ed12ed4793 Fix invalid condition introduced with revision 15441.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15445 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 12:16:30 +00:00
rossberg@chromium.org
731a2aba34 Revert "Remove BinaryOp::result_type"
This reverts https://code.google.com/p/v8/source/detail?r=15265, due to performance regression.

TBR=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15444 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 11:57:43 +00:00
rossberg@chromium.org
aa2ebf6da7 Revert "Derive synthetic type bounds for expressions"
TBR=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 11:50:56 +00:00
bmeurer@chromium.org
f60609bd1b Turn UInt32 analysis into a proper HPhase.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 10:53:08 +00:00
yangguo@chromium.org
92523a4553 Join threads after stopping.
R=hpayer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15439 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 09:04:45 +00:00
bmeurer@chromium.org
aadcf381db Turn escape analysis into a proper HPhase.
R=danno@chromium.org, mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 08:29:33 +00:00
bmeurer@chromium.org
7a820bec9d Properly cleanup the transcendental subcaches.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 08:27:27 +00:00
yurys@chromium.org
4c5508b42f Correctly report callstack when current function is FunctionCall builtin
When current function is FunctionCall builtin we have no reliable way to determine its caller function (in many cases the top of the sampled stack contains address of the caller but sometimes it does not). Instead of dropping the sample or its two top frames we simply mark the caller frame as '(unresolved function)'. It seems like a better approach that dropping whole sample as knowing the top function and the rest of the stack the user should be able to figure out what the caller was.

This change adds builtin id to CodeEntry objects. It will be used later to add similar top frame analysis for FunctionApply and probably other builtins.

BUG=None
TBR=loislo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 07:51:09 +00:00
bmeurer@chromium.org
75bb6b9ed8 Cleanup the default Isolate's entry stack.
This adds an ASSERT that the entry_stack_ of the Isolate is
empty upon destruction. The default Isolate is an exception
here, as it may still contain an entry stack item upon
destruction.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15435 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 07:21:07 +00:00
yurys@chromium.org
c4b6e08ac3 Revert "Correctly report callstack when current function is FunctionCall builtin"
This reverts commit r15426. The new test fails in Debug mode.

BUG=None
TBR=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 06:26:07 +00:00
loislo@chromium.org
a0140093ba CPUProfiler: propagate scriptId to the front-end
Each CpuProfileNode has resource_name string property.
It cost us N * strlen(resource_name) where N is number of functions in the collected profile.
We could transfer script_id instead of resource_name so it would reduce transfer
size and help us to solve the problem with evals and sourceURL.

BUG=none
TEST=test-cpu-profiler/CollectCpuProfile
R=jkummerow@chromium.org, yurys@chromium.org

Committed: https://code.google.com/p/v8/source/detail?r=15429

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-02 06:14:01 +00:00
palfia@homejinni.com
64a56607fb MIPS: Fix register usage in ProfileEntryHookStub
Different register must be used to pass the test on target hardware.

BUG=
TEST=cctest/test-api/SetFunctionEntryHook

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 21:05:03 +00:00
loislo@chromium.org
f470bbbb4f Revert "CPUProfiler: propagate scriptId to the front-end"
This reverts commit d575f6bc8b262dac08f02913ae6e7c504c9dd900.

Check is failing on debug bots.

TBR= yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 19:22:45 +00:00
loislo@chromium.org
bc9f6c607f CPUProfiler: propagate scriptId to the front-end
Each CpuProfileNode has resource_name string property.
It cost us N * strlen(resource_name) where N is number of functions in the collected profile.
We could transfer script_id instead of resource_name so it would reduce transfer
size and help us to solve the problem with evals and sourceURL.

BUG=none
TEST=test-cpu-profiler/CollectCpuProfile
R=jkummerow@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 15:15:57 +00:00
yangguo@chromium.org
4afe85e42f Also delete optimization jobs in the output queue when stopping thread.
R=hpayer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 15:12:59 +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
yurys@chromium.org
91dc6dd632 Correctly report callstack when current function is FunctionCall builtin
When current function is FunctionCall builtin we have no reliable way to determine its caller function (in many cases the top of the sampled stack contains address of the caller but sometimes it does not). Instead of dropping the sample or its two top frames we simply mark the caller frame as '(unresolved function)'. It seems like a better approach that dropping whole sample as knowing the top function and the rest of the stack the user should be able to figure out what the caller was.

This change adds builtin id to CodeEntry objects. It will be used later to add similar top frame analysis for FunctionApply and probably other builtins.

BUG=None
R=jkummerow@chromium.org, loislo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 14:57:58 +00:00
rossberg@chromium.org
fd484c9df9 Derive synthetic type bounds for expressions
Currently synthesizes Smi as the lower bound for numeric operations (except for +, which might result in a string). That would need to change in places where we want to track constants as type feedback.

Does not do anything about variables yet.

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 13:59:18 +00:00
mstarzinger@chromium.org
493d1f1c21 Implement WeakMap.prototype.clear function.
R=rossberg@chromium.org
BUG=v8:2753
TEST=mjsunit/harmony/collections

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 13:56:48 +00:00
prybin@chromium.org
488da00542 Debug: support breakpoints set in the middle of statement (try #2 after rollback)
Review URL: https://codereview.chromium.org/18349004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 13:44:10 +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
prybin@chromium.org
fe22b45965 Revert "Debug: support breakpoints set in the middle of statement"
Review URL: https://codereview.chromium.org/18326007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 13:05:21 +00:00
mstarzinger@chromium.org
de07db147f Ensure CheckInitialized is present independent of define.
This makes sure that the same symbols are present, independent of which
defines have been used while building V8. Otherwise only embedders with
compatible defines would be able to link against that binary.

R=danno@chromium.org
BUG=chromium:255779

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 12:57:15 +00:00
prybin@chromium.org
f997bacb16 Debug: support breakpoints set in the middle of statement
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 12:54:13 +00:00
yurys@chromium.org
0ac0edb707 Test that profiler is stopped when isolate is being disposed
The only way to get v8::CpuProfiler instance in the V8 public API is to call v8::Iolate::GetCpuProfiler(). The method will return NULL if the isolate has not been initialized yet or has been torn down already. It is the client's reponsibility to make sure that CPU profiling has been stopped before disposing of the isolate.

This CL adds a test for this and several ASSRTS enforcing that assumptions. This allowed to be sure that heap is always setup when CPU profiling is being started. Based on that the number of places where already compiled functions are reported to the profiler event processor boils down to the single place (CpuProfiler::StartProcessorIfNotStarted). I'm going to rely on this assumption in further changes.

BUG=None
R=loislo@chromium.org, yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 12:32:52 +00:00
bmeurer@chromium.org
c146178079 Plug leaked mutexes in OptimizingCompilerThread.
BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 12:30:26 +00:00
bmeurer@chromium.org
d7618796f6 No need to pass profiles to ProfilerEventsProcessor.
Following up on https://codereview.chromium.org/18353002, there's
no need to pass the profiles to ProfilerEventsProcessor's constructor.

BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 12:24:26 +00:00
bmeurer@chromium.org
73d32d2fb7 Fix compiler error about unused profiles_ field in ProfilerEventsProcessor.
BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15412 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 12:11:29 +00:00
bmeurer@chromium.org
769f4a7033 Plug leaked string stream debug object cache in Isolate.
BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15411 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 12:07:53 +00:00
yangguo@chromium.org
cc2f01d31f Restore message when rethrowing in TryCatch.
Based on a patch contributed by Andrew Paprocki <andrew@ishiboo.com>.

R=jkummerow@chromium.org
BUG=
TEST=cctest/test-api/TryCatchNestedSyntax

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15408 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 10:54:39 +00:00
loislo@chromium.org
ca90f4b058 CpuProfiler: eliminate 2 layers of 4 for CodeCreateEvent calls.
The bodies of methods in ProfilerEventProcessor were moved into CpuProfiler.
Multiple NewCodeEntry methods in CpuProfilesCollection were replaced with one which
simply passes arguments to the CodeEntry constructor.
And CpuProfiler just calls this method when it needs a CodeEntry object.

This NewCodeEntry method is required because CpuProfilesCollection keeps ownership of CodeEntry objects.

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

Committed: https://code.google.com/p/v8/source/detail?r=15405

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 10:12:03 +00:00
loislo@chromium.org
baa3a7e47b Revert "CpuProfiler: eliminate 2 layers of 4 for CodeCreateEvent calls."
This reverts commit 76adf84b83ec3c0b261cbc29369ce4ac83f9d002.

windows compilation failed

BUG=none
TBR=yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 09:51:44 +00:00
loislo@chromium.org
eb14637367 CpuProfiler: eliminate 2 layers of 4 for CodeCreateEvent calls.
The bodies of methods in ProfilerEventProcessor were moved into CpuProfiler.
Multiple NewCodeEntry methods in CpuProfilesCollection were replaced with one which
simply passes arguments to the CodeEntry constructor.
And CpuProfiler just calls this method when it needs a CodeEntry object.

This NewCodeEntry method is required because CpuProfilesCollection keeps ownership of CodeEntry objects.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 09:39:15 +00:00
yangguo@chromium.org
daf4101aa4 Fix infinite loop in regress-opt-after-deopt.
%CompleteOptimization attempts to install optimized functions
that the parallel thread has put on the output queue, as long as
the function is marked with a builtin.  However, activating the
debugger will set all functions to the lazy recompile builtin,
without the function being on the parallel recompilation pipeline.
So we wait for the function to finish parallel recompilation
while it's marked by a builtin that's unrelated to parallel
recompilation.

R=hpayer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-01 09:14:15 +00:00
palfia@homejinni.com
b2f6ef4f98 MIPS: Fix wrong checkin.
This commit fixes r15396.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 19:52:44 +00:00
palfia@homejinni.com
ecfdd87c8b MIPS: Improved function entry hook coverage.
Port r15384 (d553efd)

Original commit message:
Adds more coverage for function entry hook, sufficient to capture profiles
that are contiguous from C++, through JS and back out to C++.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15396 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 18:34:08 +00:00
palfia@homejinni.com
081a9d1791 MIPS: Hydrogen array constructor cleanup and improvements.
Port r15383 (3e90aaf)

Original commit message:
* Cleanup of LCallNewArray::PrintDataTo() method
* Created HCallNewArray::PrintDataTo()
* Created many more tests in array-constructor-feedback.js
* Removed redundant instructions in
GenerateRecordCallTarget
* Bugfix in CreateArrayDispatchOneArgument: on a call to
new Array(0), we'd like to set the type feedback cell to
a packed elements kind, but we shouldn't do it if the
cell contains the megamorphic sentinel.
* When used from crankshaft, ArrayConstructorStubs can
avoid verifying that the function being called is the
array function from the current native context, relying
instead on the fact that crankshaft issues an
HCheckFunction to protect the constructor call. (this
new minor key is used in LCodeGen::DoCallNewArray(), and
influences code generation in
CodeStubGraphBuilderBase::BuildArrayConstructor()).
* Optimization: the array constructor specialized for
FAST_SMI_ELEMENTS can save some instructions by looking
up the correct map on the passed in constructor, rather
than indexing into the array of cached maps per element
kind.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15395 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 17:16:17 +00:00
mstarzinger@chromium.org
c28a6c9ea2 Use HInstructionIterator more broadly for hydrogen.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15394 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 16:31:11 +00:00
mstarzinger@chromium.org
8b976da60e First simplistic implementation of escape analysis.
R=jkummerow@chromium.org, titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 16:09:54 +00:00
jkummerow@chromium.org
05b94f13c8 Add %_DebugBreakInOptimizedCode() pseudo function call to insert int3/stop instructions into optimized code
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 15:48:38 +00:00
jkummerow@chromium.org
c7a9bffbcf Clean up the usage of V8_TARGET_ARCH_${arch} and V8_HOST_ARCH_${arch}
R=jkummerow@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 15:34:48 +00:00
jkummerow@chromium.org
d8fbf59a7d Use macros instead of using number directly for x64
R=jkummerow@chromium.org

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

Patch from Weiliang Lin <weiliang.lin2@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 15:26:01 +00:00
jkummerow@chromium.org
2fb7ab5530 Introduce a notion of "v8_code" in gyp config files.
This allows for compiling third-party code (such as ICU) with less
strict flags.

BUG=v8:2745
R=jkummerow@chromium.org

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

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 15:22:46 +00:00
mstarzinger@chromium.org
f1f628ea09 Prepare push to trunk. Now working on version 3.20.1.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15385 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 13:58:15 +00:00
danno@chromium.org
1642f32d1c Improved function entry hook coverage
Adds more coverage for function entry hook, sufficient to capture profiles that are contiguous from C++, through JS and back out to C++.

R=danno@chromium.org

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

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

Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 13:40:41 +00:00
mvstanton@chromium.org
83519ec87a Hydrogen array constructor cleanup and improvements
* Cleanup of LCallNewArray::PrintDataTo() method
* Created HCallNewArray::PrintDataTo()
* Created many more tests in array-constructor-feedback.js
* Removed redundant instructions in
  GenerateRecordCallTarget
* Bugfix in CreateArrayDispatchOneArgument: on a call to
  new Array(0), we'd like to set the type feedback cell to
  a packed elements kind, but we shouldn't do it if the
  cell contains the megamorphic sentinel.
* When used from crankshaft, ArrayConstructorStubs can
  avoid verifying that the function being called is the
  array function from the current native context, relying
  instead on the fact that crankshaft issues an
  HCheckFunction to protect the constructor call. (this
  new minor key is used in LCodeGen::DoCallNewArray(), and
  influences code generation in
  CodeStubGraphBuilderBase::BuildArrayConstructor()).
* Optimization: the array constructor specialized for
  FAST_SMI_ELEMENTS can save some instructions by looking
  up the correct map on the passed in constructor, rather
  than indexing into the array of cached maps per element
  kind.

BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 13:16:14 +00:00
alph@chromium.org
7b57b624d1 Heap snapshot: Update user roots definition.
Do not define an object as a user root if its context is not
present in Global handles.

R=mstarzinger@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 12:53:52 +00:00
bmeurer@chromium.org
e029039b69 Fix GCC 4.2 errors introduced with revision 15379.
BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 12:28:39 +00:00
bmeurer@chromium.org
382ec92f2a Make use of templatized convienience functions for adding Hydrogen instructions.
Building on the previous changes from https://codereview.chromium.org/18050004/
this patch makes even more use of the templatized functions for adding
Hydrogen instructions.

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15379 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 11:44:16 +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
yangguo@chromium.org
41cac47d57 Avoid data race in debug mode on the parallel thread.
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15376 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 11:24:27 +00:00
jkummerow@chromium.org
bf632a8364 Fast-forward version number on bleeding_edge to 3.20.0
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 10:55:25 +00:00
bmeurer@chromium.org
f11af230e8 Refactor HInferRepresentation into an HPhase and use the phase zone.
Rename HInferRepresentation to HInferRepresentationPhase,
following naming scheme suggested by danno@chromium.org in
https://codereview.chromium.org/17458002

The HInferRepresentationPhase now uses the phase zone for all its
allocations.

Depends on https://codereview.chromium.org/17587008

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 07:40:35 +00:00
bmeurer@chromium.org
a46528e820 Fix zone usage within LAllocator.
Previously all allocations in the register allocator were done on the
chunk (and graph) zone, even those that did not need to survive past
the register allocation. Now only allocations that need to survive
use the chunk zone, all other allocations use a separate zone local
to the LAllocator.

Depends on https://codereview.chromium.org/18022002

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 07:36:43 +00:00
palfia@homejinni.com
ee67afee93 MIPS: The check for internalized strings relied on the fact that we had less than 64 distinct InstanceTypes.
Port r15358 (3af77be)

Original commit message:
The check for internalized strings relied on the fact that we had less
than 64 distinct InstanceTypes. We are hitting that boundary, so this
check needs to be more comprehensive. In fact, two bits need to be
tested: verify that kNotStringTag isn't set, and that kInternalizedTag
is set.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15368 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 19:19:48 +00:00
danno@chromium.org
eb2fc68835 Remove superfluous HInnerAllocatedObject in BuildEmitDeepCopy
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 16:07:55 +00:00
danno@chromium.org
5b1ccfb952 Type handling for special cases and optimization
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 15:31:49 +00:00
ulan@chromium.org
475131b2b9 Revert r15361 "Improved function entry hook coverage" because of ARM build error.
R=siggi@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 15:31:06 +00:00
hpayer@chromium.org
2957b2fdf8 Fix check style breakage.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15363 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 15:17:55 +00:00
yangguo@chromium.org
3ff7ab9ead Fix constructor call of relocation lock.
R=yangguo@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 14:44:36 +00:00
danno@chromium.org
8494f3bf25 Improved function entry hook coverage
Adds more coverage for function entry hook, sufficient to capture profiles that are contiguous from C++, through JS and back out to C++.

R=danno@chromium.org

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

Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 14:39:37 +00:00
danno@chromium.org
f95ddc8891 Add templatized convienience functions for adding hydrogen instructions
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15360 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 14:36:14 +00:00
danno@chromium.org
3b60d6de8e Make sure HCallNewArray uses right ElementsKind
Close a small gc window that exists between when a HNewArrayCall instruction is
created and the ElementsKind type feedback for the construction function is
accesses.

R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15359 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 14:22:07 +00:00
mvstanton@chromium.org
6aed526733 The check for internalized strings relied on the fact that we had less
than 64 distinct InstanceTypes. We are hitting that boundary, so this
check needs to be more comprehensive. In fact, two bits need to be
tested: verify that kNotStringTag isn't set, and that kInternalizedTag
is set.

BUG=
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15358 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 13:39:44 +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
bmeurer@chromium.org
2f81a79d5a Refactor Hydrogen environment liveness analysis into an HPhase.
Rename EnvironmentSlotLivenessAnalyzer to HEnvironmentLivenessAnalysisPhase,
following naming scheme suggested by danno@chromium.org in
https://codereview.chromium.org/17458002

The environment slot liveness analysis now uses the phase zone for
all its allocations.

Depends on https://codereview.chromium.org/18034003

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15356 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 13:15:10 +00:00
bmeurer@chromium.org
32f5e099d4 Add templatized Run() method for Hydrogen phases.
Depends upon https://codereview.chromium.org/17657004

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 13:13:18 +00:00
bmeurer@chromium.org
dce010395d Turn zone_excess_limit_ into a constant.
The zone_excess_limit_ is not changed at runtime, and there seems to
be no obvious reason to do so in the future.

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 13:10:43 +00:00
bmeurer@chromium.org
98786ae073 Refactor Hydrogen GVN into an HPhase and use the phase zone.
The HGlobalValueNumberer class is renamed to HGlobalValueNumberingPhase,
following the naming scheme suggested by danno@chromium.org in
https://codereview.chromium.org/17458002

The GVN phase now uses the phase zone for all its allocations.

Depends upon https://codereview.chromium.org/18022002

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15353 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 13:09:08 +00:00
bmeurer@chromium.org
073b1d1dfb Move phase_zone from CompilationInfo to CompilationPhase.
Each CompilationPhase has its own zone, used for phase local
allocations. The zone of CompilationInfo should only be used
for non phase local allocations.

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15352 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 13:03:01 +00:00
bmeurer@chromium.org
63812f9dc3 Fix the compilation of gdbjit
R=bmeurer@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 11:38:37 +00:00
yurys@chromium.org
52d848bce7 Extract StackFrameIteratorBase
This change introduces StackFrameIteratorBase which owns singleton frame instances and encapsulates some basic iterator functionality. It has two actual implementations: StackFrameIterator and SafeStackFrameIterator.

All logic specific to frame iteration at a random point (basically checks that fp and sp extracted from stack frames are within current stack boundaries) used only by CPU profiler is now concentrated in SafeStackFrameIterator.

Generic stack iteration used in all other places is put into StackFrameIterator. Also this iterator unlike SafeStackFrameIterator iterates through stack handlers.

StackAddressValidator and ExitFrameValidator classes were removed in favor of inline checks and simple methods.

BUG=None
R=loislo@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15349 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 09:34:31 +00:00
yurys@chromium.org
4aeccdb23e Do not iterate stack handlers in SafeStackFrameIterator
CPU profiler doesn't use stack handlers so there is no need to iterate through them while traversing stack. This change SafeStackFrameIterator always iterate only frames and removes checks corresponding to the handlers iteration.

The problem described in the bug occurred because of a false assumption in SafeStackFrameIterator that if Isolate::c_entry_fp is not NULL then the top frame on the stack is always a C++ frame. It is false because we may have entered JS code again, in which case JS_ENTRY code stub generated by JSEntryStub::GenerateBody() will save current c_entry_fp value but not reset it to NULL and after that it will create ENTRY stack frame and JS_ENTRY handler on the stack and put the latter into Isolate::handler(top). This means that if we start iterating from c_entry_fp frame and try to compare the frame's sp with Isolate::handler()->address() it will turn out that frame->sp() > handler->address() and the condition in SafeStackFrameIterator::CanIterateHandles is not held.

BUG=252097
R=loislo@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 09:28:11 +00:00
dslomov@chromium.org
ef189ecd82 Do not allow invocation of ArrayBuffer and array buffer views' constructors as functions.
ES6 bug 695 (https://bugs.ecmascript.org/show_bug.cgi?id=695).
This never worked in WebKit, so no compatibility issues.

R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15346 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-27 07:42:08 +00:00
palfia@homejinni.com
90d0b6cd97 MIPS: Avoid Unnecessary Smi Checks.
Port r15344 (9fd1942)

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15345 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 20:22:41 +00:00
olivf@chromium.org
21cd74eaa2 Avoid Unnecessary Smi Checks
BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 17:37:55 +00:00
mstarzinger@chromium.org
df181f2c11 Remove obsolete free-space checks from MarkCompactCollector.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 16:37:15 +00:00
peter.rybin@gmail.com
f0c7bc37a9 Fix misleading names and comments in mute local variables debugger helper
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15342 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 16:18:00 +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
loislo@chromium.org
3da5ba9ac3 CPUProfiler: Simplify CodeEntry constructor calls.
In almost all the places where we create CodeEntry we use default values.
Lets move them into arguments default values.

BUG=none
TEST=no logic changes.
R=yangguo@chromium.org, yurys@chromium.org

Committed: https://code.google.com/p/v8/source/detail?r=15333

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15340 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 16:04:25 +00:00
mstarzinger@chromium.org
bd0deb9443 Remove obsolete unchecked accessors in JSFunction.
R=hpayer@chromium.org
BUG=v8:1490

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 14:04:25 +00:00
bmeurer@chromium.org
9e0f0a73dc Get rid of ZoneScope completely.
There's no need to differentiate between an actual Zone and its
scope. Instead we bind the lifetime of the Zone memory to the
lifetime of the Zone itself, which is way easier to understand
than having to dig through the code looking for zone scopes.

Depends on https://codereview.chromium.org/17826004/

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15337 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 13:36:16 +00:00
bmeurer@chromium.org
8e9b934e7e Get rid of the ZoneScopeMode.
No one is using the DONT_DELETE_ON_EXIT mode for ZoneScopes anymore, so
we can safely assume that all ZoneScopes are DELETE_ON_EXIT now.

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15336 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 12:54:12 +00:00
loislo@chromium.org
06200a3113 Revert "CPUProfiler: Simplify CodeEntry constructor calls."
This reverts commit a6cc1e3b563c0d0689da35dbf8163545c8146ddd.

One test starts failing on Windows.

BUG=none
TBR= yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 12:38:10 +00:00
jkummerow@chromium.org
3634b61d21 ia32: Restore missing temp register for LNumberTagU
BUG=v8:2692
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15334 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 12:03:22 +00:00
loislo@chromium.org
4292ac5932 CPUProfiler: Simplify CodeEntry constructor calls.
In almost all the places where we create CodeEntry we use default values.
Lets move them into arguments default values.

BUG=none
TEST=no logic changes.
R=yangguo@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15333 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 09:55:33 +00:00
rossberg@chromium.org
e60acec321 Introduce Unsigned32 and RegExp types
Also, renamed Integer31 back to Smi, and Integer32 to Signed32.

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15332 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 09:51:57 +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
bmeurer@chromium.org
49b9ef269b Remove useless ZoneScopes from Parser.
R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15330 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-26 08:05:41 +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
mvstanton@chromium.org
081134ecd1 Removed flag optimize-constructed-arrays.
This eliminates a large amount of hand-written assembly in the platforms.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 16:31:07 +00:00
loislo@chromium.org
53eb53f4af CPUProfiler: It is not clear why we are using Handle<Object> for scriptId. Lets flip it into Smi/int.
By the nature it is integer. So we can work with it as with Smi internaly and use int in the external API.

BUG=none
TEST=existing tests
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15327 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 14:57:47 +00:00
peter.rybin@gmail.com
42a10a9dfe Allow debugger evaluate expressions to mute local variables
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 13:48:43 +00:00
prybin@chromium.org
cecbe44e42 Provide list of step-in source positions in JS Debug API
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15322 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 13:42:44 +00:00
bmeurer@chromium.org
9f05d61a1d Split HPhase for Lithium and Hydrogen using common CompilationPhase base.
Add new base class CompilationPhase, which is the base for both HPhase, LPhase and LAllocatorPhase. HPhase is now for Hydrogen passes only, LPhase is for Lithium passes and LAllocatorPhase is for LAllocator phases.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15321 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 12:22:26 +00:00
alph@chromium.org
bd5fafd58a Handle AccessorPair struct in heap snapshot.
R=svenpanne@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15320 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 11:55:33 +00:00
olivf@chromium.org
eac9b2191b Fix to_boolean type feedback for unary and binary ops
BUG=
R=jkummerow@chromium.org, rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 11:49:46 +00:00
yurys@chromium.org
c846dabcb0 Get rid of Isolate::safe_stack_iterator_counter
This change removes per-isolate counter of active SafeStackFrameIterators. The counter is used by stack frames implementations to avoid accessing pointers to heap objects when traversing stack for CPU profiler (so called "safe" mode). Each StackFrame instance is owned by single iterator and has a pointer to it so we can simply mark the iterator as "safe" or not and read the field in the stack frames instead of going into the isolate.

BUG=None
R=loislo@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15317 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 10:09:19 +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
66efb96621 Fix compilation error introduced with r15287.
REGEXP was added to Code::Kind after TO_BOOLEAN_IC, but NUMBER_OF_KINDS,
which is used as array size for table[] in ReportCodeKindStatistics, was
still TO_BOOLEAN_IC + 1 (indirectly via LAST_IC_KIND).

BUG=
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15315 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 09:09:25 +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
mstarzinger@chromium.org
6d92511162 Reland "Remove IsInitialized checks from inlined API functions."
The initialization sequence in Blink has been adapted to use explicit
isolate initialization instead of through calling v8::Null() as the
first API call.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 08:11:50 +00:00
hpayer@chromium.org
7ba980f2b1 Added pretenuring support for fast literal allocation in old data space.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 07:47:53 +00:00
yurys@chromium.org
ebdf62c238 Merge SafeStackTraceFrameIterator into SafeStackFrameIterator
SafeStackFrameIterator was used solely to implement SafeStackTraceFrameIterator. This CL simply merges them and updates usage of SafeStackTraceFrameIterator to use SafeStackFrameIterator (a bit shorter name).

BUG=None
R=loislo@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15305 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 07:14:06 +00:00
palfia@homejinni.com
63eff64fd5 MIPS: Fix mjsunit/regress/regress-2653.
Insert proper padding after lazy deoptimization points. This change
makes sure, that patching does not overwrite the code after the
lazy deoptimization point.

TEST=mjsunit/regress/regress-2653

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15304 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 00:09:32 +00:00
palfia@homejinni.com
55dbbbfd72 MIPS: Fix Kraken gaussian blur test regression.
The regression was introduced in r13848 by accidental removal of one
additional line.

TEST=
BUG=

Review URL: https://codereview.chromium.org/17570007
Patch from Dusan Milosavljevic <Dusan.Milosavljevic@rt-rk.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15303 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 18:33:42 +00:00
palfia@homejinni.com
a24617a945 MIPS: Rename Literal::handle to Literal::value
Port r15280 (1a287b2)

Original commit message:
Just a completely mechanical change...

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15302 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 18:28:06 +00:00
mstarzinger@chromium.org
bd90e71b01 Fix ugly typo in HValue::UpdateRepresentation.
R=jkummerow@chromium.org
TEST=mjsunit/math-min-max --extra-flags="--gc-interval=500"

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 14:34:07 +00:00
svenpanne@chromium.org
6c879c8a30 Removed some useless/dead code regarding CompileTimeValues.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 14:26:32 +00:00
danno@chromium.org
a0f41ad31a In revision 15142, the V8_USE_UNSAFE_HANDLES define is removed.
So in the vtune support code ( in vtune-jit.cc file)v8::Handle<T* value> consturctor cannot be invoked directly.
We use "->ToString()" to create the Handle<String> object  to fix the compilation error.

R=danno@chromium.org

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

Patch from Chunyang Dai <chunyang.dai@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15299 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 14:21:14 +00:00
dslomov@chromium.org
e6e0ee0708 Update typed arrays behavior to match ES6 rev 15. Remove TO_POSITIVE_INTEGER and throw on negative length arguments.
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 13:58:52 +00:00
bmeurer@chromium.org
13a7c993d0 Add phase zone to CompilationInfo and use it in GVN pass.
The phase_zone of CompilationInfo is intended for local allocations that
are freed at the end of the phase.

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15294 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 13:37:46 +00:00
yurys@chromium.org
264b7255e1 Move ExitFrame::ComputeStackPointer from frames-<arch>.cc to frames.cc
The method has identical implementation for all architectures. Moved it into frames.cc

Drive-by: deleted SafeStackFrameIterator::is_working_iterator_, SafeStackFrameIterator::iteration_done_ is used instead.

BUG=None
R=loislo@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15293 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 13:27:48 +00:00
bmeurer@chromium.org
3481344df8 Drop (mis)use of HPhase in full code gen.
The full code generator is not a proper Hydrogen phase. The full code
gen ticks are tracked in a special member of HStatistics, so HPhase is
most probably misused at this point.

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15291 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 13:25:44 +00:00
yangguo@chromium.org
c63a5255b4 Do not use deprecated MakeWeak in d8.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15290 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 13:15:07 +00:00
bmeurer@chromium.org
00f6a8903b Fix HStatistics::Print() output to fit into 80 columns.
BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15289 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 13:07:20 +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
mstarzinger@chromium.org
b632a4be86 Deprecate one virtual marking visitor for mark-compact GC.
R=hpayer@google.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15286 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 12:39:02 +00:00
dslomov@chromium.org
4308fb462d API for DataView.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15282 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 11:23:50 +00:00
mstarzinger@chromium.org
48c16454b1 Revert "Remove IsInitialized checks from inlined API functions."
This reverts r15277 due to failures in layout tests. Apparently Blink
still initializes the Isolate by calling v8::Null() as the first API
function on some paths.

TBR=svenpanne@chromium.org
TEST=webkit:crypto/worker-random-values-concurrent.html

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15281 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 11:10:40 +00:00
rossberg@chromium.org
007837365d Rename Literal::handle to Literal::value
Just a completely mechanical change...

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15280 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 10:37:59 +00:00
yurys@chromium.org
a8a9fa807a Update the TSan-specific atomics implementation to match the current API.
BUG=128314

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

Patch from Alexander Potapenko <glider@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 09:35:30 +00:00
mstarzinger@chromium.org
9ef18efff6 Remove IsInitialized checks from inlined API functions.
R=marja@chromium.org, svenpanne@chromium.org
TEST=cctest/test-api

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15277 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 08:58:01 +00:00
loislo@chromium.org
9d95db6fad CPUProfiler: remove copy&paste from CodeCreateEvent.
This is the next patch on the way of simplifying profiler API.
It is extracting the common parts of the serialization process.

TEST=current test set
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15276 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 08:40:38 +00:00
yurys@chromium.org
f830fbea3c Simplify stack iterators implementation
In order to fix https://code.google.com/p/chromium/issues/detail?id=252097 I
need to change SafeStackTraceFrameIterator. Stack iterators hierarchy looks
excessively complicated and I'd like to flatten it a bit by removing some
intermediate classes. In particular there are two hierarchies sharing
JavaScriptFrameIteratorTemp<T> template for no good reason.

This change extracts some of JavaScriptFrameIteratorTemp functionality directly
into SafeStackTraceFrameIterator. This made it obvious that a few checks were
performed twice.

The rest of JavaScriptFrameIteratorTemp<T> is merged with
JavaScriptFrameIterator. Now that the class is not a template some of its
implementation is moved from frames-inl.h into frames.cc

So in this change I removed JavaScriptFrameIterator and
SafeJavaScriptFrameIterator. As the next step I'm going to merge
SafeStackFrameIterator into SafeStackTraceFrameIterator.

BUG=None
R=loislo@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15275 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-24 08:38:37 +00:00
palfia@homejinni.com
ed4d3c8c66 MIPS: Use AST's type field and merge types for unary, binary & compare ICs.
Port r15264 (d4c3767)

Missing fixed_right_arg().has_value cases added also.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 20:31:06 +00:00
jkummerow@chromium.org
96e818136c Use kPointerSize to compute the size of StubCache::Entry for X64
R=jkummerow@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15272 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 16:19:51 +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
jkummerow@chromium.org
a4d2759d49 Distinguish times_8 and times_pointer_size for X64
R=jkummerow@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 12:57:19 +00:00
jkummerow@chromium.org
cbc8ed7110 HBoundsCheck shouldn't ignore Tagged input representations unconditionally
BUG=v8:2740
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15267 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 12:50:02 +00:00
yurys@chromium.org
7f1750580c V8 API: Add a missing NULL check into Isolate::GetCurrentContext().
There is a missing NULL check for: "internal_isolate->context() != NULL".
Right now before calling this method one should call v8::Context::InContext()
first to perform this check, otherwise we may crash. But this static method
will do this check on the current isolate, which may not be the same as a given one.

BUG=249655
R=yurys@chromium.org,mvstanton@chromium.org

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

Patch from Andrey Adaykin <aandrey@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 12:34:47 +00:00
rossberg@chromium.org
04e1278529 Remove BinaryOp::result_type
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 12:16:14 +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
yangguo@chromium.org
b7b92bd9ac Short-circuit embedded cons strings.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 09:24:30 +00:00
yangguo@chromium.org
cbf6244029 Use mutex instead of busy wait when installing optimized function.
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 08:38:12 +00:00
yangguo@chromium.org
2e10e3e336 Clean up queued compilation tasks when quitting.
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15261 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 08:37:05 +00:00
yurys@chromium.org
6f09cb471b Delete deprecated methods from v8-profiler.h
All these methods were already marked as V8_DEPRECATED in V8 Version 3.18.0 (see https://code.google.com/p/v8/source/browse/trunk/include/v8-profiler.h?r=14304) so it is time to delete them.

BUG=None
R=loislo@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 07:56:22 +00:00
plind44@gmail.com
0bc8ef88dd MIPS: Let NaN flow as double into HBranch + some minor improvements
Port r15246 (cb18dce2)

BUG=
R=plind44@gmail.com

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

Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-21 02:43:13 +00:00
palfia@homejinni.com
54483c4880 MIPS: Generators: Avoid calling into runtime if operand stack is empty
Port r15240 (909f716e)

Original commit message:
This patch makes yield sites save the resume continuation and context
inline.  If the operand stack is empty, we can avoid a call into the
runtime.  This also makes the SuspendJSGeneratorObject runtime function
less magical: it just has to save the operand stack and stack handlers.

This speeds up the following case by a factor of 3 or so:

  function* until(n) {
    for (var i = 0; i < n; i++)
      yield i;
  }

  function sum(iter) {
    var sum = 0;
    for (var x of iter) sum += x;
    return sum;
  }

  for (var i = 0; i < 10000; i++) sum(until(1000))

Also, there is no more sentinel value as the generators will resume in
the right place already, allowing me to remove the hack added to the
--debug-code check in r14437.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15258 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 23:43:10 +00:00
palfia@homejinni.com
b58d0d2af7 MIPS: Lithium codegen should not pass around block_ids.
Port r15235 (95a844b)

Original commit message:
Rather encapsulate the basic block to assembly label mapping in the LInstruction.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 20:18:58 +00:00
danno@chromium.org
fd08ac7c26 Handle MONOMORPIC loads where type feedback is code stub
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15254 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 16:54:09 +00:00
jkummerow@chromium.org
0e54a418db Add counters for requested/inserted/executed soft deopts
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15253 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 16:53:22 +00:00
palfia@homejinni.com
6a91645a84 MIPS: Fix stack frame reconstruction for generators with formal arguments.
Port r15230 (e2bbe01)

Original commit message:
The formal parameter count was always being treated as an untagged
integer, but it is actually a Smi on ia32 and arm.

BUG=v8:2355
TEST=mjsunit/harmony/generators-iteration

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15250 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 15:29:22 +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
verwaest@chromium.org
6ae544eca7 Also apply InferControlFlowRange to smi-based tests.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15248 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 14:20:15 +00:00
verwaest@chromium.org
917ac7d413 Improve range analysis for smi phi
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 14:11:52 +00:00
olivf@chromium.org
29d3461529 Let NaN flow as double into HBranch + some minor improvements
BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15246 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 13:51:03 +00:00
verwaest@chromium.org
2b485416ed Properly assign heapobject to constant functions.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15245 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 13:46:29 +00:00
verwaest@chromium.org
4922e3d206 Flexible representation for BuildIncrement, but CannotBeTagged.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15244 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 13:22:46 +00:00
verwaest@chromium.org
b17e759dc1 Add soft-deopt for uninitialized assignment
R=hpayer@google.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15241 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 13:09:43 +00:00
wingo@igalia.com
646a34e1e0 Generators: Avoid calling into runtime if operand stack is empty
This patch makes yield sites save the resume continuation and context
inline.  If the operand stack is empty, we can avoid a call into the
runtime.  This also makes the SuspendJSGeneratorObject runtime function
less magical: it just has to save the operand stack and stack handlers.

This speeds up the following case by a factor of 3 or so:

  function* until(n) {
    for (var i = 0; i < n; i++)
      yield i;
  }

  function sum(iter) {
    var sum = 0;
    for (var x of iter) sum += x;
    return sum;
  }

  for (var i = 0; i < 10000; i++) sum(until(1000))

Also, there is no more sentinel value as the generators will resume in
the right place already, allowing me to remove the hack added to the
--debug-code check in r14437.

R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 12:59:45 +00:00
dcarney@chromium.org
8202410cca deprecate old style callbacks
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15239 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 12:53:19 +00:00
mstarzinger@chromium.org
697bee6157 Use +kCallerSPOffset instead of -kMarkerOffset to compute the args pointer
R=mstarzinger@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15238 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 12:51:36 +00:00
verwaest@chromium.org
149d31eb14 Fix the flags used to probe the megamorphic code cache.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 12:07:56 +00:00
olivf@chromium.org
4ee7a92d83 Lithium codegen should not pass around block_ids. Rather encapsulate the basic block to assembly label mapping in the LInstruction.
BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15235 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 11:50:50 +00:00
hpayer@chromium.org
6ed90f08ed Report store buffer overflows to v8 counters.
BUG=
R=jkummerow@chromium.org, mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15234 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 11:47:58 +00:00
dcarney@chromium.org
3a5e4c45a6 windows test fix for 15221
TBR=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 11:03:04 +00:00
wingo@igalia.com
f7ba3a7bb1 Fix stack frame reconstruction for generators with formal arguments
The formal parameter count was always being treated as an untagged
integer, but it is actually a Smi on ia32 and arm.

R=mstarzinger@chromium.org
BUG=v8:2355
TEST=mjsunit/harmony/generators-iteration

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 10:48:34 +00:00
mstarzinger@chromium.org
ea87d08557 Revert r14930 and r14935 temporarily.
This is a temporary revert to track down a potential perf regression
introduced in r14930. The following two changes were reverted:
- "Deprecate HAllocateObject in favor of HAllocate."
- "Added pretenuring support for call new."

R=danno@chromium.org
BUG=chromium:247504

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 10:48:14 +00:00
hpayer@chromium.org
d51a0d06e3 Make isolate id getter public.
BUG=
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 10:05:33 +00:00
verwaest@chromium.org
e829fb4fa2 Merge assignment handling for Assignment and CompoundAssignment
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15226 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 09:19:19 +00:00
dcarney@chromium.org
b9e5c586a8 symbols should be in the startup snapshot
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15225 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 09:10:19 +00:00
rossberg@chromium.org
eb099a1a8c Introduce Type::Intersect function
Also, fix bugs in Type::Union and Type::Maybe.

(This subsumes the in-flight fix for Union in https://codereview.chromium.org/16925008/, including test cases).

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 09:10:10 +00:00
yangguo@chromium.org
0d409f5213 Directly use C++ builtin of ArrayPush for String.prototype.split.
R=svenpanne@chromium.org
BUG=v8:2737

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15223 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 08:13:21 +00:00
yurys@chromium.org
3b53f7dc61 Fix data race in v8::internal::UnboundQueue
This change modifies memory accesses to ensure proper load/store ordering.

BUG=249750
R=dvyukov@google.com, jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15219 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 06:23:34 +00:00
yurys@chromium.org
07ae09c124 Nuke OS::ReleaseStore, use Release_Store instead
The operation is already implemented in atomicops.h No need to duplicate the code.

BUG=None
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 06:16:24 +00:00
yurys@chromium.org
e64c79c2e7 Fix typo in #undef parameter
BUG=None
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 06:13:03 +00:00
verwaest@chromium.org
2ca5c6cd03 Fix using monomorphic store instruction for polymorphic stores.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15214 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 18:07:35 +00:00
plind44@gmail.com
127af45629 MIPS: Fix test-cpu-profiler/SampleWhenFrameIsNotSetup flakiness on MIPS simulator.
BUG=v8:2628

TEST=cctest/test-cpu-profiler/SampleWhenFrameIsNotSetup
R=jkummerow@chromium.org, yurys@chromium.org

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

Patch from Dusan Milosavljevic <Dusan.Milosavljevic@rt-rk.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15213 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 17:20:25 +00:00
plind44@gmail.com
f76e55fb38 MIPS: Use type feedback for Array (non-constructor) call sites.
Port r15201 (8c56d50)

BUG=
R=plind44@gmail.com

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

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15211 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 17:08:46 +00:00
mstarzinger@chromium.org
ade5b02606 Lower limit for external allocation and improve tracing.
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15210 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 17:01:43 +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
aea73c155d Remove unused counters
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15208 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 16:50:38 +00:00
mvstanton@chromium.org
7f0f022792 Bugfix in hydrogen array literal code generation.
If an array literal contains some non-constant elements, is of type SMI, and
then the boilerplate transitions to double or fast sometime after we've
crankshafted the code, then we could incorrectly store smis in double arrays.

BUG=
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15207 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 13:48:50 +00:00
svenpanne@chromium.org
010d9aba16 Avoid relying on monkey-patchable things in String.prototype.split.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15206 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 12:25:40 +00:00
dslomov@chromium.org
51f3e2f055 Do not use weak handles for ArrayBuffers.
Instead of allocating weak handles to free ArrayBuffer backing store, dispose of memory while walking the weak list of ArrayBuffers on GC.

Also, free all array buffers on isolate tear-down.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15205 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 11:53:30 +00:00
jkummerow@chromium.org
7821715dc1 Always reset allowed OSR nesting level when reverting interrupt code patches.
Also, --trap-on-deopt should only affect optimized functions, not hydrogen stubs.

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 09:38:28 +00:00
jkummerow@chromium.org
3ca50a576a x64: LAddI must use LEAL, not LEAQ
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15203 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 09:36:38 +00:00
mvstanton@chromium.org
c70b41684d Use type feedback for Array (non-constructor) call sites.
BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15201 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 09:25:24 +00:00
svenpanne@chromium.org
3f69800acc Removed ReplaceResultBuilder.
Most of its code was dead, and the remaining part was a simple
one-liner, which is now inlined at its single call-site.

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15200 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 08:59:56 +00:00
hpayer@chromium.org
137a8c5181 Move static flag modifications to V8::InitializeOncePerProcessImpl().
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 08:57:26 +00:00
mstarzinger@chromium.org
6510948b2c Make Zone::allocation_size work with parallel zones.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 07:48:41 +00:00
yangguo@chromium.org
6e420a66be Tweak type info threshold.
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15196 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-18 14:36:17 +00:00
mstarzinger@chromium.org
0524263a27 Remove obsolete elements kind check for array literals.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-18 13:32:06 +00:00
yangguo@chromium.org
496af21047 Turn on parallel recompilation.
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-18 13:06:22 +00:00
dslomov@chromium.org
3af076a406 Prepare push to trunk. Now working on 3.19.19.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15190 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-18 11:42:34 +00:00
svenpanne@chromium.org
fb7310b1fd Fixed read-only attribute of Function.length in strict mode.
R=cira@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-18 07:51:50 +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
c9624a44cd MIPS: Fix constant function transition. Insert return instruction before returning.
Port r15180 (2f9dcce3)

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-17 16:37:15 +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
verwaest@chromium.org
7a229ccf39 Emit deprecated check for constant function transitions.
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15183 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-17 16:10:01 +00:00
plind44@gmail.com
5ad53577db Add Gergely Kis to MIPS owners file.
BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15182 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-17 15:19:44 +00:00
palfia@homejinni.com
93609033e1 MIPS: Optimise Math.floor(x/y) to use integer division for MIPS.
Use div instruction if some divisors do not have magic number.

Based on commit r11427 (318a9598).

This commit also ports commit r15161 (554d45c1).

BUG=

Review URL: https://codereview.chromium.org/16951016
Patch from Dusan Milosavljevic <Dusan.Milosavljevic@rt-rk.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15181 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-17 15:06:41 +00:00
verwaest@chromium.org
202df2e758 Fix constant function transition. Insert return instruction before returning.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-17 13:50:56 +00:00
mstarzinger@chromium.org
5fe01da568 Fix bogus replay of arguments object binding in LChunkBuilder.
R=jkummerow@chromium.org
BUG=chromium:249894
TEST=webkit:fast/js/regress/inline-arguments-access.html

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-17 11:11:41 +00:00
jkummerow@chromium.org
681cfe9cad Fix MathFloorOfDiv optimization on non-SDIV ARM
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 18:15:49 +00:00
verwaest@chromium.org
328aeb14fb Revert "Improved range analysis for bitwise operations."
This reverts commit r15170

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 17:25:03 +00:00
jkummerow@chromium.org
47ba2b2dd8 Migrate BinaryOpICs and UnaryOpICs to new type rep
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15172 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 17:02:39 +00:00
palfia@homejinni.com
60c2218ae3 MIPS: Refactor only: Rename JSGlobaPropertyCell to PropertyCell
Port r15165 (daf37483)

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15171 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 17:00:24 +00:00
verwaest@chromium.org
98167ed0a8 Improved range analysis for bitwise operations.
R=fschneider@chromium.org, verwaest@chromium.org

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

Patch from Stephen Adams <sra@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15170 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 16:55:34 +00:00