platform/upstream/v8.git
10 years agoShorten autogenerated error message for functions only.
yangguo@chromium.org [Fri, 9 May 2014 13:14:09 +0000 (13:14 +0000)]
Shorten autogenerated error message for functions only.

R=yangguo@chromium.org, Yang, rossberg@chromium.org
BUG=v8:3019, chromium:331971
LOG=Y

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

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRequire SSE2 support for the ia32 port.
yangguo@chromium.org [Fri, 9 May 2014 13:01:50 +0000 (13:01 +0000)]
Require SSE2 support for the ia32 port.

R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21223 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoPresubmit checks recover:
ishell@chromium.org [Fri, 9 May 2014 12:59:24 +0000 (12:59 +0000)]
Presubmit checks recover:
1) runtime/references checks temporarily disabled (56 items left)
2) other errors fixed

R=jkummerow@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoReland - Arm64: Ensure that csp is always aligned to 16 byte values even if jssp...
rmcilroy@chromium.org [Fri, 9 May 2014 12:51:52 +0000 (12:51 +0000)]
Reland - Arm64: Ensure that csp is always aligned to 16 byte values even if jssp is not.

Even although the Arm64 specification specifies that csp
only needs to be aligned to 16 bytes if it is dereferenced, some
implementations show poor performance.

Also makes the following change:
 - Enable CPU support for arm64 to enable probing of cpu implementer and cpu part.
 - Add ALWAYS_ALIGN_CSP CpuFeature for Arm64 and set it based on runtime probing of the cpu imp
 - Rename PrepareForPush and PrepareForPop to PushPreamble and PopPostamble and move PopPostabl

Original Review URL: https://codereview.chromium.org/264773004

R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21221 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoAdd flag to set minimum semi-space size.
hpayer@chromium.org [Fri, 9 May 2014 12:37:11 +0000 (12:37 +0000)]
Add flag to set minimum semi-space size.

BUG=
R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRevert of Prevent calls to ReturnValue::Set with pointer-valued types. (https://coder...
vogelheim@chromium.org [Fri, 9 May 2014 12:33:29 +0000 (12:33 +0000)]
Revert of Prevent calls to ReturnValue::Set with pointer-valued types. (https://codereview.chromium.org/240013004/)

Reason for revert:
Looks like this broke the "V8 Linux64 ASAN" build.

Original issue's description:
> Prevent calls to ReturnValue::Set with pointer-valued types.
>
> Currently, this code will compile:
>   SomePointer* p = ...;
>   ReturnValue r = ...;
>   r.Set(p);
>
> What happens is that ReturnValue::Set has no pointer-ish overloads, but
> a bool one, and hence C++ will convert the pointer to a bool and use
> the Set(bool) overload. In other words, the example above is equivalent
> to: r.Set(p ? true : false); Which probably isn't what the author had
> in mind. This change adds a Set(void*) overload whose body forces a
> compile error, to prevent this from happening inadvertently. The only
> use of this indeed turned out to be an error.
>
> (Said error was fixed/removed in crrev.com/267393002.)
>
> BUG=
> R=dcarney@chromium.org
>
> Committed: https://code.google.com/p/v8/source/detail?r=21217

R=ishell@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21219 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoFix new space array check limit.
bmeurer@chromium.org [Fri, 9 May 2014 12:19:59 +0000 (12:19 +0000)]
Fix new space array check limit.

Also inline BuildNewSpaceArrayCheck() into its caller, because
the name BuildNewSpaceArrayCheck was confusing anyway, since
it has nothing do with new space actually.

R=hpayer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoPrevent calls to ReturnValue::Set with pointer-valued types.
vogelheim@chromium.org [Fri, 9 May 2014 12:07:38 +0000 (12:07 +0000)]
Prevent calls to ReturnValue::Set with pointer-valued types.

Currently, this code will compile:
  SomePointer* p = ...;
  ReturnValue r = ...;
  r.Set(p);

What happens is that ReturnValue::Set has no pointer-ish overloads, but
a bool one, and hence C++ will convert the pointer to a bool and use
the Set(bool) overload. In other words, the example above is equivalent
to: r.Set(p ? true : false); Which probably isn't what the author had
in mind. This change adds a Set(void*) overload whose body forces a
compile error, to prevent this from happening inadvertently. The only
use of this indeed turned out to be an error.

(Wait for issue 364025 before submitting.)

BUG=
R=dcarney@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoEliminate further write barriers for old space allocations.
bmeurer@chromium.org [Fri, 9 May 2014 12:06:48 +0000 (12:06 +0000)]
Eliminate further write barriers for old space allocations.

Storing a map or an immortal immovable object to old space
allocations requires no write barriers if the object is the
new space dominator.

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

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21216 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoUse HType::NonPrimitive() for unclassified HeapObjects (i.e. Maps).
bmeurer@chromium.org [Fri, 9 May 2014 12:05:56 +0000 (12:05 +0000)]
Use HType::NonPrimitive() for unclassified HeapObjects (i.e. Maps).

R=verwaest@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoFixed d8 shutdown.
svenpanne@chromium.org [Fri, 9 May 2014 11:29:29 +0000 (11:29 +0000)]
Fixed d8 shutdown.

It is crucial that the Isolate is cleanly disposed, otherwise the
optimizing compiler thread happily continues to run.

R=yangguo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21214 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoSync change log and version file with trunk.
machenbach@chromium.org [Fri, 9 May 2014 11:17:45 +0000 (11:17 +0000)]
Sync change log and version file with trunk.

BUG=
R=ishell@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21213 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoClean up Debugger::NotifyMessageHandler.
yangguo@chromium.org [Fri, 9 May 2014 09:24:32 +0000 (09:24 +0000)]
Clean up Debugger::NotifyMessageHandler.

R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21210 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoMake new space iterable for --log-gc and --heap-stats options
jarin@chromium.org [Fri, 9 May 2014 09:23:10 +0000 (09:23 +0000)]
Make new space iterable for --log-gc and --heap-stats options

R=hpayer@chromium.org
BUG=370827
TEST=test/mjsunit/regress/regress-370827.js
LOG=N

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21209 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoClean up stack guard interrupts.
yangguo@chromium.org [Fri, 9 May 2014 09:13:12 +0000 (09:13 +0000)]
Clean up stack guard interrupts.

R=jkummerow@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21208 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoCleaned up the weak lists hanging off the heap a bit.
svenpanne@chromium.org [Fri, 9 May 2014 09:02:40 +0000 (09:02 +0000)]
Cleaned up the weak lists hanging off the heap a bit.

 * Route all access to the 3 weak lists through getters/setters.

 * Removed superfluous visiting already done by ProcessWeakReferences.

R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21207 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoUse ReplaceCode instead of set_code in debug.cc.
yangguo@chromium.org [Fri, 9 May 2014 08:42:17 +0000 (08:42 +0000)]
Use ReplaceCode instead of set_code in debug.cc.

R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21206 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoReland "Removed default Isolate."
svenpanne@chromium.org [Fri, 9 May 2014 08:40:18 +0000 (08:40 +0000)]
Reland "Removed default Isolate."

Changes compared to original CL: Until the Serializer/Isolate chaos is
cleaned up, we can't initalize/dispose cctests in a tidy way, see
cctest.cc.

BUG=359977
LOG=y
R=dcarney@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21205 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoSimplify ConfigureHeap and change --max_new_space_size to --max_semi_space_size.
hpayer@chromium.org [Fri, 9 May 2014 08:38:27 +0000 (08:38 +0000)]
Simplify ConfigureHeap and change --max_new_space_size to --max_semi_space_size.

BUG=
R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoImprove Array.shift() performance for small arrays.
bmeurer@chromium.org [Fri, 9 May 2014 08:28:25 +0000 (08:28 +0000)]
Improve Array.shift() performance for small arrays.

TEST=mjsunit/array-shift,mjsunit/array-shift2,mjsunit/array-shift3
R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21203 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRestore behavior of PrepareForBreakpoints which was broken by r21145.
rmcilroy@chromium.org [Thu, 8 May 2014 18:00:26 +0000 (18:00 +0000)]
Restore behavior of PrepareForBreakpoints which was broken by r21145.

Rename Debug::MaybeRecompileFunctionForDebugging to
EnsureFunctionHasDebugBreakSlots and ensure that it does
nothing if the function is unoptimized code with debug
break slots, otherwise, if the shared code has no
debug break slots, it recompile that shared code and
sets the function code to that shared code.

Also removes two incorrect ASSERTs.

R=yangguo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21201 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoSkip generated runtime tests that require i18nsupport as needed
jkummerow@chromium.org [Thu, 8 May 2014 14:34:37 +0000 (14:34 +0000)]
Skip generated runtime tests that require i18nsupport as needed

R=ishell@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21200 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoAdd test case generator for runtime functions
jkummerow@chromium.org [Thu, 8 May 2014 13:11:59 +0000 (13:11 +0000)]
Add test case generator for runtime functions

R=dslomov@chromium.org, machenbach@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21199 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoDevTools: Unflake test-cpu-profiler/JsNativeJsRuntimeJsSample
alph@chromium.org [Thu, 8 May 2014 09:47:17 +0000 (09:47 +0000)]
DevTools: Unflake test-cpu-profiler/JsNativeJsRuntimeJsSample

BUG=v8:3308
LOG=N
R=bmeurer@chromium.org, jochen@chromium.org, yurys@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoHarden yet more runtime functions
jkummerow@chromium.org [Thu, 8 May 2014 09:33:11 +0000 (09:33 +0000)]
Harden yet more runtime functions

R=dslomov@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoFix index register assignment in LoadFieldByIndex for arm, arm64, and mips.
ulan@chromium.org [Thu, 8 May 2014 08:51:51 +0000 (08:51 +0000)]
Fix index register assignment in LoadFieldByIndex for arm, arm64, and mips.

This instruciton clobbers the index register.

BUG=368243
LOG=N
TEST=mjsunit/regress/regress-368243
R=jkummerow@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21196 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoUnbreak samples and tools.
svenpanne@chromium.org [Thu, 8 May 2014 06:52:35 +0000 (06:52 +0000)]
Unbreak samples and tools.

Removed a related TODO in d8.cc on the way.

BUG=v8::3318
LOG=y
R=dcarney@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21195 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoBroaden test expectation for ARM64.
mstarzinger@chromium.org [Wed, 7 May 2014 16:13:04 +0000 (16:13 +0000)]
Broaden test expectation for ARM64.

R=machenbach@chromium.org
BUG=v8:3154
TEST=cctest/test-heap/ReleaseOverReservedPages

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21192 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoCommenting out an assert to investigate mac test failure.
mvstanton@chromium.org [Wed, 7 May 2014 15:28:30 +0000 (15:28 +0000)]
Commenting out an assert to investigate mac test failure.

R=machenbach@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21191 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRefactor mjsunit/fuzz-natives-* into a separate test suite.
jkummerow@chromium.org [Wed, 7 May 2014 12:31:26 +0000 (12:31 +0000)]
Refactor mjsunit/fuzz-natives-* into a separate test suite.

R=machenbach@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21190 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRemove GenerateBooleanCheck() since we have a boolean map now.
bmeurer@chromium.org [Wed, 7 May 2014 12:18:23 +0000 (12:18 +0000)]
Remove GenerateBooleanCheck() since we have a boolean map now.

R=verwaest@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoAdd back a dummy --harmony-promises flag
jochen@chromium.org [Wed, 7 May 2014 11:07:18 +0000 (11:07 +0000)]
Add back a dummy --harmony-promises flag

This is mainly meant to help with the transition of chrome using the
flag to promises being enabled by default

BUG=none
LOG=n
R=rossberg@chromium.org, svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoTurn CHECK()s into ASSERT()s.
bmeurer@chromium.org [Wed, 7 May 2014 08:42:20 +0000 (08:42 +0000)]
Turn CHECK()s into ASSERT()s.

R=machenbach@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoFix constructors for HLoadNamedField.
bmeurer@chromium.org [Wed, 7 May 2014 08:41:35 +0000 (08:41 +0000)]
Fix constructors for HLoadNamedField.

Also try to determine an appropriate HType for tracked fields,
instead of (incorrectly) using HType::NonPrimitive() everywhere.

R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21186 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoMerge counters and v8-counters
jochen@chromium.org [Wed, 7 May 2014 07:15:24 +0000 (07:15 +0000)]
Merge counters and v8-counters

BUG=none
LOG=n
R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRevert "Arm64: Ensure that csp is always aligned to 16 byte values even if jssp is...
bmeurer@chromium.org [Wed, 7 May 2014 06:40:50 +0000 (06:40 +0000)]
Revert "Arm64: Ensure that csp is always aligned to 16 byte values even if jssp is not." and "Arm64: Fix check errors on Arm64 debug after r21177.".

This reverts commit r21177 and r21179 for breaking the arm64 build.

TBR=rmcilroy@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21184 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoFix invalid ASSERT() in HasStableMapValue().
bmeurer@chromium.org [Wed, 7 May 2014 06:24:29 +0000 (06:24 +0000)]
Fix invalid ASSERT() in HasStableMapValue().

R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21183 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoMIPS: Fix for 3303 MultithreadedParallelIsolates has a race condition.
palfia@homejinni.com [Tue, 6 May 2014 19:24:11 +0000 (19:24 +0000)]
MIPS: Fix for 3303 MultithreadedParallelIsolates has a race condition.

Port r21165 (50673b25)

Original commit message:
The fix is to make the code aging sequence hang off the isolate.

BUG=
R=plind44@gmail.com

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoArm64: Fix check errors on Arm64 debug after r21177.
rmcilroy@chromium.org [Tue, 6 May 2014 19:07:31 +0000 (19:07 +0000)]
Arm64: Fix check errors on Arm64 debug after r21177.

r21177 added extra AssertStackConsistency() checks which
increased code size on debug and caused the assembler buffer
to be too large.  Increased some of these buffers to
compensate.

Also, ProfileEntryHoolStub could use the wrong number of
instructions for kProfileEntryHookCallSize depending upon
whether debug code was being emitted or ALWAYS_ALIGN_CSP was
enabled.  Fixed this by taking ALWAYS_ALIGN_CSP into account
and ensuring that no debug code is emitted during
MaybeCallEntryHook().

TBR=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRevert "Prevent liveedit on or under generators with open activations"
rossberg@chromium.org [Tue, 6 May 2014 16:02:18 +0000 (16:02 +0000)]
Revert "Prevent liveedit on or under generators with open activations"

Seems to crash some tests on buildbots.

TBR=ishell@chromium.org
CC=wingo@igalia.com,yangguo@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21178 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoArm64: Ensure that csp is always aligned to 16 byte values even if jssp is not.
rmcilroy@chromium.org [Tue, 6 May 2014 15:56:17 +0000 (15:56 +0000)]
Arm64: Ensure that csp is always aligned to 16 byte values even if jssp is not.

Even although the Arm64 specification specifies that csp
only needs to be aligned to 16 bytes if it is dereferenced, some implementations show poor performance if csp is every set to a non-aligned value.  This CL ensures that csp is always aligned to 16 byte values on these platforms and adds checks to ensure this in debug mode.

Also makes the following change:
 - Enable CPU support for arm64 to enable probing of cpu implementer and cpu part.
 - Add ALWAYS_ALIGN_CSP CpuFeature for Arm64 and set it based on runtime probing of the cpu implementer.
 - Rename PrepareForPush and PrepareForPop to PushPreamble and PopPostamble and move PopPostable after the pop.
 -

R=jacob.bramley@arm.com, ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21177 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRemove strange v8_target_arch=="mac" conditions from gyp files
jochen@chromium.org [Tue, 6 May 2014 15:25:51 +0000 (15:25 +0000)]
Remove strange v8_target_arch=="mac" conditions from gyp files

mac is not an architecture, and it doesn't make sense to compile in both
the ia32 and x64 archs at the same time

BUG=none
R=jkummerow@chromium.org
LOG=n

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoImport features.gypi into BUILD.gn
jochen@chromium.org [Tue, 6 May 2014 15:01:24 +0000 (15:01 +0000)]
Import features.gypi into BUILD.gn

BUG=none
R=brettw@chromium.org
LOG=n

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21175 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoPrevent liveedit on or under generators with open activations
wingo@igalia.com [Tue, 6 May 2014 14:57:52 +0000 (14:57 +0000)]
Prevent liveedit on or under generators with open activations

R=yangguo@chromium.org
LOG=N
TEST=mjsunit/harmony/generators-debug-liveedit.js
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRe^3-land "Ship promises and weak collections"
rossberg@chromium.org [Tue, 6 May 2014 14:48:34 +0000 (14:48 +0000)]
Re^3-land "Ship promises and weak collections"

R=jochen@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoARM64: Sign extension on MemOperand for keyed ops
m.m.capewell@googlemail.com [Tue, 6 May 2014 14:28:29 +0000 (14:28 +0000)]
ARM64: Sign extension on MemOperand for keyed ops

SXTW extend mode is usually cheaper on loads and stores than arithmetic,
so move it to the memory accesses where possible for Keyed loads and
stores.

BUG=
R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21172 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoFixed jump in non-SSE4.1 implementation of LMathFloor instruction on x64.
ishell@chromium.org [Tue, 6 May 2014 14:20:46 +0000 (14:20 +0000)]
Fixed jump in non-SSE4.1 implementation of LMathFloor instruction on x64.

BUG=chromium:370384
LOG=N
R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21171 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRevert "Removed default Isolate."
svenpanne@chromium.org [Tue, 6 May 2014 13:06:12 +0000 (13:06 +0000)]
Revert "Removed default Isolate."

This reverts commit r21167, cctest/test-serialize has to be fixed first.

TBR=dcarney@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21170 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoOnly force creating initial maps when we have prototypes.
verwaest@chromium.org [Tue, 6 May 2014 12:16:24 +0000 (12:16 +0000)]
Only force creating initial maps when we have prototypes.

BUG=
R=ishell@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21169 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoARM64: Introduce TempDoubleRegister as a lithium operand constraint.
baptiste.afsa@arm.com [Tue, 6 May 2014 12:11:00 +0000 (12:11 +0000)]
ARM64: Introduce TempDoubleRegister as a lithium operand constraint.

R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21168 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRemoved default Isolate.
svenpanne@chromium.org [Tue, 6 May 2014 11:48:26 +0000 (11:48 +0000)]
Removed default Isolate.

There is probably room for more cleanup after this...

BUG=359977
LOG=y
R=dcarney@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21167 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoPass in the map while creating JSFunction, and set prototype in the client.
verwaest@chromium.org [Tue, 6 May 2014 11:26:35 +0000 (11:26 +0000)]
Pass in the map while creating JSFunction, and set prototype in the client.

BUG=
R=ishell@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21166 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoFix for 3303 MultithreadedParallelIsolates has a race condition.
mvstanton@chromium.org [Tue, 6 May 2014 11:25:37 +0000 (11:25 +0000)]
Fix for 3303 MultithreadedParallelIsolates has a race condition.

The fix is to make the code aging sequence hang off the isolate.

BUG=v8:3303
R=svenpanne@chromium.org
LOG=N

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoProduce cached data only for scripts which compile without errors.
marja@chromium.org [Tue, 6 May 2014 11:22:54 +0000 (11:22 +0000)]
Produce cached data only for scripts which compile without errors.

ScriptCompiler::CompileUnbound handles cached data only when there was no
compilation error, so, if we produce the data for erroneous scripts, the
ScriptData object is leaked.

In addition, producing cached data for erroneous scripts makes little sense.

R=ulan@chromium.org
BUG=370327
LOG=N

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21164 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoMove generated math methods from platform to codegen
jochen@chromium.org [Tue, 6 May 2014 11:14:37 +0000 (11:14 +0000)]
Move generated math methods from platform to codegen

BUG=none
R=mstarzinger@chromium.org
LOG=n

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21163 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoPass dependency to HLoadNamedField for array length load
verwaest@chromium.org [Tue, 6 May 2014 11:05:52 +0000 (11:05 +0000)]
Pass dependency to HLoadNamedField for array length load

BUG=
R=verwaest@chromium.org

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

Patch from Jing Bao <jing.bao@intel.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoARM64: Use the shifter operand to merge in previous shift instructions.
m.m.capewell@googlemail.com [Tue, 6 May 2014 11:00:28 +0000 (11:00 +0000)]
ARM64: Use the shifter operand to merge in previous shift instructions.

When possible, we transform sequences of code of the form
    lsl x8, x9, #imm
    add x0, x1, x8
into
    add x0, x1, x9 LSL #imm

R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRemove broken %_Log functionality.
mstarzinger@chromium.org [Tue, 6 May 2014 09:28:08 +0000 (09:28 +0000)]
Remove broken %_Log functionality.

R=yangguo@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21160 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years ago[Android]: Update Makefile.android to use platform-14 as minimum.
rmcilroy@chromium.org [Tue, 6 May 2014 09:08:32 +0000 (09:08 +0000)]
[Android]: Update Makefile.android to use platform-14 as minimum.

The version of the NDK in Chromium only has platform/android-14 and above
(since Chrome only supports API 14 and above).  To make it easier for
developers to use the Chromium NDK to build V8, this CL updates the default
platform version to 14.

R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoDo not call setters of read-only accessors.
ulan@chromium.org [Tue, 6 May 2014 08:34:48 +0000 (08:34 +0000)]
Do not call setters of read-only accessors.

BUG=
TEST=mjsunit/readonly-accessor
R=jkummerow@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21158 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoMake sure CPU profiler collects a sample on start.
alph@chromium.org [Tue, 6 May 2014 08:18:09 +0000 (08:18 +0000)]
Make sure CPU profiler collects a sample on start.

BUG=369035
LOG=N
R=bmeurer@chromium.org, yurys@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21157 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoARM64: Use default-NaN mode to canonicalize NaNs.
Jacob.Bramley@arm.com [Tue, 6 May 2014 08:05:27 +0000 (08:05 +0000)]
ARM64: Use default-NaN mode to canonicalize NaNs.

BUG=
R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21156 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoFix Mac64-debug issue introduced with r21154.
bmeurer@chromium.org [Tue, 6 May 2014 07:49:21 +0000 (07:49 +0000)]
Fix Mac64-debug issue introduced with r21154.

R=ishell@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21155 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoNext bunch of fixes for check elimination.
bmeurer@chromium.org [Tue, 6 May 2014 07:05:07 +0000 (07:05 +0000)]
Next bunch of fixes for check elimination.

- Canonicalize HCheckMapValue with constant map to
  HCheckMaps, and get rid of the special treatment
  during check elimination.
- Track only stable object maps for HConstants and
  add CHECK()s to verify state during code generation.

R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21154 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoTighten up Object.observe code to ASSERT that it never deals with globals
adamk@chromium.org [Mon, 5 May 2014 21:44:36 +0000 (21:44 +0000)]
Tighten up Object.observe code to ASSERT that it never deals with globals

After r21126, Object.observe no longer allows observing the global proxy
object. This patch replaces codepaths that used to handle that case with
asserts showing that no such observation happens.

R=verwaest@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21151 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoStore JSGlobalProxy's identity hash directly on the proxy itself
adamk@chromium.org [Mon, 5 May 2014 18:27:57 +0000 (18:27 +0000)]
Store JSGlobalProxy's identity hash directly on the proxy itself

Previously, the hash was stored on the underlying global object, since
it was stored in the hidden property table. This patch moves to an
implementation modeled on JSProxy, adding a new 'hash' field to JSGlobalProxy.

This allows storing the global proxy in a Map, Set, WeakMap, or WeakSet and
accessing it even after the proxy has been attached to a new global, which
is Firefox's current behavior and was the consensus of a recent thread on public-script-coord:
http://lists.w3.org/Archives/Public/public-script-coord/2014AprJun/0012.html

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoSet max new space size in tests to proper MB value.
hpayer@chromium.org [Mon, 5 May 2014 16:48:33 +0000 (16:48 +0000)]
Set max new space size in tests to proper MB value.

Revert "Limit old space size in test which require a large new space."

This reverts commit r21103.

Revert "Remove max space limits in tests."

This reverts commit r21104.

BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoFLAG_max_new_space_size is in MB.
hpayer@chromium.org [Mon, 5 May 2014 16:33:23 +0000 (16:33 +0000)]
FLAG_max_new_space_size is in MB.

Plus, cleanup of the space - generation mess. More to do there...

BUG=
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRemove old branch logic from push scripts.
machenbach@chromium.org [Mon, 5 May 2014 15:16:26 +0000 (15:16 +0000)]
Remove old branch logic from push scripts.

The old temporary branch is not needed anymore. All scripts create a different branch after creating the temporary branch.

This also fixes logging subprocesses and logs a warning to track down script failures due to wrong branches.

BUG=
R=jarin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRemove symbol preparse data altogether.
marja@chromium.org [Mon, 5 May 2014 14:55:13 +0000 (14:55 +0000)]
Remove symbol preparse data altogether.

Removing it seems to be a clear win on mobile: producing symbol data makes cold
parsing 20-30% slower, and having symbol data doesn't make warm parsing any
faster.

Notes:
- V8 used to produce symbol data, but because of a bug, it was never used until
recently. (See fix https://codereview.chromium.org/172753002 which takes the
symbol data into use again.)
- On desktop, warm parsing is faster if we have symbol data, and producing it
during cold parsing doesn't make parsing substantially slower. However, this
doesn't seem to be the case on mobile.
- The preparse data (cached data) will now contain only the positions of the
lazy functions.

BUG=
R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRelocate suspended generator activations when enabling debug mode
wingo@igalia.com [Mon, 5 May 2014 14:31:51 +0000 (14:31 +0000)]
Relocate suspended generator activations when enabling debug mode

R=yangguo@chromium.org
BUG=v8:3289
LOG=N

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoFix cctest.status typo
jochen@chromium.org [Mon, 5 May 2014 13:56:39 +0000 (13:56 +0000)]
Fix cctest.status typo

TBR=ishell@chromium.org
BUG=none
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoMark test-cpu-profiler/JsNativeJsRuntimeJsSample as flaky
jochen@chromium.org [Mon, 5 May 2014 13:29:10 +0000 (13:29 +0000)]
Mark test-cpu-profiler/JsNativeJsRuntimeJsSample as flaky

BUG=v8:3308
LOG=n
TBR=yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRevert r21141.
jochen@chromium.org [Mon, 5 May 2014 13:28:21 +0000 (13:28 +0000)]
Revert r21141.

Relocate suspended generator activations when enabling debug mode

BUG=v8:3289
LOG=N
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRelocate suspended generator activations when enabling debug mode
wingo@igalia.com [Mon, 5 May 2014 12:57:14 +0000 (12:57 +0000)]
Relocate suspended generator activations when enabling debug mode

R=yangguo@chromium.org
BUG=v8:3289
LOG=N

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoAdd a basic gn file for V8
jochen@chromium.org [Mon, 5 May 2014 11:06:26 +0000 (11:06 +0000)]
Add a basic gn file for V8

Currently, the gn support is incomplete and only works from within a
chromium checkout.

See https://code.google.com/p/chromium/wiki/gn for details

We move the BUILD.gn file to v8 nevertheless to make renaming files
easier, as the chromium CQ already now checks the gn build.

BUG=none
R=brettw@chromium.org, machenbach@chromium.org
LOG=y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoDon't add code dependencies eagerly for HCheckMaps.
bmeurer@chromium.org [Mon, 5 May 2014 11:03:14 +0000 (11:03 +0000)]
Don't add code dependencies eagerly for HCheckMaps.

Instead of adding code dependencies on stable during
graph creation, we now add them during code generation
for those HCheckMaps that survived dead code elimination.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21139 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoMap::TransitionElementsTo() extracted from JSObject::GetElementsTransitionMap().
ishell@chromium.org [Mon, 5 May 2014 09:57:45 +0000 (09:57 +0000)]
Map::TransitionElementsTo() extracted from JSObject::GetElementsTransitionMap().

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoInlined IsFoundByRuntimeProbingOnly.
svenpanne@chromium.org [Mon, 5 May 2014 09:52:03 +0000 (09:52 +0000)]
Inlined IsFoundByRuntimeProbingOnly.

It is only used internally at a single place.

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRemove Message::GetScriptData declaration
yurys@chromium.org [Mon, 5 May 2014 07:43:29 +0000 (07:43 +0000)]
Remove Message::GetScriptData declaration

This is a left-over after r20683

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoAlways initialize the debugger eagerly.
yangguo@chromium.org [Mon, 5 May 2014 07:10:38 +0000 (07:10 +0000)]
Always initialize the debugger eagerly.

There is no point doing it lazily, since compiling and executing the tiniest piece of code triggers lazy init.
Also removed some dead code.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRevert "Version 3.26.30 (based on bleeding_edge revision r21129)"
machenbach@chromium.org [Mon, 5 May 2014 07:02:13 +0000 (07:02 +0000)]
Revert "Version 3.26.30 (based on bleeding_edge revision r21129)"

This reverts commit r21130, a faulty automated commit.

BUG=
TBR=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21134 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoVarious cleanups in check elimination.
bmeurer@chromium.org [Mon, 5 May 2014 06:53:19 +0000 (06:53 +0000)]
Various cleanups in check elimination.

- Move IsMapAccess() to HObjectAccess.
- Collect the actual objects instead of HStoreNamedFields in
  effects, and also consider HTransitionElementsKind.
- Fix ownership of HCheckMaps::maps() and HLoadNamedField::maps().
- Avoid heavy copying of the same map sets all the time during
  check elimination, and do something useful with the memory
  instead by slightly bumping the maximum number of tracked
  objects.
- Slightly optimize UniqueSet::Contains().

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21133 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoVersion 3.26.30 (based on bleeding_edge revision r21129)
machenbach@chromium.org [Mon, 5 May 2014 00:04:56 +0000 (00:04 +0000)]
Version 3.26.30 (based on bleeding_edge revision r21129)

Introduce a microtask suppression scope and move microtask methods to isolate (Chromium issue 369503).

Re-enable Object.observe and add enforcement for security invariants.

Move cache line size calculation directly into CPU::FlushICache (Chromium issue 359977).

Generation of our home-grown memmove doesn't depend on serializer state anymore (Chromium issue 359977).

Fix |RunMicrotasks()| leaking reference to the last context being run on.

Object.defineProperty shouldn't be a hint that we're constructing a dictionary (Chromium issue 362870).

Performance and stability improvements on all platforms.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21130 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoFix ObjectNotifierPerformChange leak after r21126
adamk@chromium.org [Fri, 2 May 2014 21:29:15 +0000 (21:29 +0000)]
Fix ObjectNotifierPerformChange leak after r21126

Due to overlapping names of natives and runtime functions, the wrong
context was used for Notifier.prototype.performChange. The leak test
has been augmented to properly cover the leaky case, and the test
now passes.

Also tightened up type checks in runtime.cc and removed Object.observe
functions from knownIssues in fuzz-natives-part2.js.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21129 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoIntroduce a microtask suppression scope and move microtask methods to isolate
jochen@chromium.org [Fri, 2 May 2014 19:30:54 +0000 (19:30 +0000)]
Introduce a microtask suppression scope and move microtask methods to isolate

BUG=369503
R=adamk@chromium.org
LOG=y
TEST=cctest/test-api/SetAutorunMicrotasks

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21128 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoBuild cleanup following r21126. Marking Native* methods in object-observe.js as known...
rafaelw@chromium.org [Fri, 2 May 2014 17:31:27 +0000 (17:31 +0000)]
Build cleanup following r21126. Marking Native* methods in object-observe.js as knownProblems in fuzz-natives

TBR=verwaest

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21127 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoDon't leak contexts in Object.observe
rafaelw@chromium.org [Fri, 2 May 2014 16:13:10 +0000 (16:13 +0000)]
Don't leak contexts in Object.observe

The Object.observe API may construct internal structures as a result of API calls. These structures can persist as long as an object that was once observed persists. This patch ensures that these structures are created in the correct context so as to avoid leaking contexts

R=verwaest@chromium.org, dcarney
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21126 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoUpdate test expectations after re-enabling Object.observe
rafaelw@chromium.org [Fri, 2 May 2014 14:17:13 +0000 (14:17 +0000)]
Update test expectations after re-enabling Object.observe

TBR=verwaest

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21125 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoRe-enable Object.observe and add enforcement for security invariants.
rafaelw@chromium.org [Fri, 2 May 2014 13:55:11 +0000 (13:55 +0000)]
Re-enable Object.observe and add enforcement for security invariants.

This patch reverts r21062 which disabled Object.observe and the relevant tests.

It also adds enforcement for the following three invariants:

1) No observer may receive a change record describing changes to an object which is in different security origin (context have differing security tokens)

2) No observer may receive a change record whose context's security token is different from that of the object described by the change.

3) Object.getNotifier will return null if the caller and the provided object are in differing security origins

Further, it ensures that the global object can never be observed nor a notifier retrieved for it.

Tests are included.
R=verwaest@chromium.org, rossberg
LOG=Y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoFix for a GCMole issue introduced in r21117.
ishell@chromium.org [Fri, 2 May 2014 13:03:39 +0000 (13:03 +0000)]
Fix for a GCMole issue introduced in r21117.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21121 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agov8:3303 MultithreadedParallelIsolates has a race condition
mvstanton@chromium.org [Fri, 2 May 2014 12:59:48 +0000 (12:59 +0000)]
v8:3303 MultithreadedParallelIsolates has a race condition

Disabling test until bug is fixed.
R=svenpanne@chromium.org
BUG=v8:3303
LOG=N

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoMove cache line size calculation directly into CPU::FlushICache.
svenpanne@chromium.org [Fri, 2 May 2014 12:35:51 +0000 (12:35 +0000)]
Move cache line size calculation directly into CPU::FlushICache.

This disentagles the initialization/dependency mess quite a bit and
makes things vastly simpler. If the 'mrs' on every flush is too
expensive (which it is hopefully not), the cache line sizes will have
to be instance variables of the CPU class and FlushICache will have to
be a member function. This would involve some more or less tricky
refactorings, which we shouldn't do until we are *really* forced to
do.

BUG=359977
LOG=y
R=rodolph.perfetta@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoChecks for empty array case added before casting elements to FixedDoubleArray.
ishell@chromium.org [Fri, 2 May 2014 11:30:24 +0000 (11:30 +0000)]
Checks for empty array case added before casting elements to FixedDoubleArray.

BUG=chromium:369450
LOG=N
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoMap::Normalize() introduced as single entry point for map normalization and Map:...
ishell@chromium.org [Fri, 2 May 2014 10:27:12 +0000 (10:27 +0000)]
Map::Normalize() introduced as single entry point for map normalization and Map::NotifyLeafMapLayoutChange() made private.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoGeneration of our home-grown memmove doesn't depend on serializer state anymore.
svenpanne@chromium.org [Fri, 2 May 2014 10:14:37 +0000 (10:14 +0000)]
Generation of our home-grown memmove doesn't depend on serializer state anymore.

The serializer state has to be per-Isolate, but at the point where we
generate our memmoves we don't really have an Isolate. Furthermore,
there was no fundamental reason why we shouldn't use our home-grown
memmove during mksnapshot time.

Perhaps we can totally remove our own memmove nowadays, but this would
be a separate CL.

BUG=359977
LOG=y
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoMake zone_allocator actually usable.
bmeurer@chromium.org [Fri, 2 May 2014 08:41:06 +0000 (08:41 +0000)]
Make zone_allocator actually usable.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoFix crash in debug builds introduced with r21110.
bmeurer@chromium.org [Fri, 2 May 2014 08:08:23 +0000 (08:08 +0000)]
Fix crash in debug builds introduced with r21110.

Basically we should not check for map deprecation during
code selection, because that may run on the concurrent
compiler thread. So the fix is to move this logic to the
code generation phase instead, which is always run on the
main thread.

R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoFix |RunMicrotasks()| leaking reference to the last context being run on.
haraken@chromium.org [Fri, 2 May 2014 08:00:47 +0000 (08:00 +0000)]
Fix |RunMicrotasks()| leaking reference to the last context being run on.

RunMicrotasks() executes pending tasks and swaps the old array with a new array. However, the new array contains the reference to the current context as its creation context. This prevents the context from gc-ed until RunMicrotasks() is executed in the different context.

BUG=crbug.com/367016
LOG=y
R=rafaelw@chromium.org, rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

10 years agoDon't add code dependencies on transitioning stores eagerly.
bmeurer@chromium.org [Fri, 2 May 2014 06:37:54 +0000 (06:37 +0000)]
Don't add code dependencies on transitioning stores eagerly.

R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00