Commit Graph

29031 Commits

Author SHA1 Message Date
yangguo
7b693cc4ab [interpreter] Fix test-serialize/SerializeToplevelIsolates.
R=rmcilroy@chromium.org
BUG=v8:4680
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34389}
2016-03-01 13:47:07 +00:00
yangguo
d9fe836dd4 [debugger] fix break locations for assignments and return.
We used to emit debug break location on block entry. This cannot be
ported to the interpreted as we do not emit bytecode for block entry.
This made no sense to begin with though, but accidentally added
break locations for var declarations.

With this change, the debugger no longer breaks at var declarations
without initialization. This is in accordance with the fact that the
interpreter does not emit bytecode for uninitialized var declarations.

Also fix the bytecode to match full-codegen's behavior wrt return
positions:
- there is a break location before the return statement, with the source
  position of the return statement.
- right before the actual return, there is another break location. The
  source position points to the end of the function.

R=rmcilroy@chromium.org, vogelheim@chromium.org
TBR=rossberg@chromium.org
BUG=v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34388}
2016-03-01 12:47:55 +00:00
neis
0ad44590e0 [json] Fix iteration over object keys in InternalizeJSONProperty.
We must not use for-of since that could be observed.

R=yangguo@chromium.org
BUG=v8:4769
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34387}
2016-03-01 11:53:28 +00:00
neis
85d1a55e83 Fix spec-compliance bug in ArrayIteratorPrototype.
ArrayIteratorPrototype must not provide Symbol.iterator.

R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34386}
2016-03-01 11:51:52 +00:00
ssanfilippo
dc71deb077 [Interpreter] Silence runtime errors in generate-bytecode-expectations.
Runtime errors will be suppressed in --rebaseline mode, unless the
--verbose flag is passed.

The reasoning behind (rebaseline && !verbose) and not just (verbose)
is to suppress harmless noise while updating the expectation for
existing, known good snippets, without hiding actually relevant
errors when the tool is used to write new expectation files.

In fact, some tests are supposed to produce a runtime error, which
might nevertheless alarm a developer who is just --rebaseline'ing.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34385}
2016-03-01 10:43:22 +00:00
neis
ef8fa8521c Fix accidental bug in yield* desugaring.
The for-of-finalization CL incorrectly removed the input argument from
BuildIteratorClose.  I'm reverting this, adding a regression test, and fixing an
existing test that was wrong.

BUG=
R=rossberg

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

Cr-Commit-Position: refs/heads/master@{#34384}
2016-03-01 09:39:18 +00:00
neis
c4f39389ea Fix spec-compliance bug in Array.prototype.join.
The code used to [[Get]] the first element twice instead of once, which can be
observed (one of the kangax tests does so).

R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34383}
2016-03-01 09:07:38 +00:00
nikolaos
de817ef9c7 Fix issue with re-scoping in do expressions
R=rossberg@chromium.org
BUG=v8:4783
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34382}
2016-03-01 09:04:38 +00:00
jochen
b576da4059 Add include/ to include dir list for gcmole
BUG=
R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34381}
2016-03-01 09:03:03 +00:00
verwaest
b5487307db Revert of [crankshaft] Inline hasOwnProperty when used in fast-case for-in (patchset #1 id:40001 of https://codereview.chromium.org/1742253002/ )
Reason for revert:
ARM64 GCStress failure

Original issue's description:
> [crankshaft] Inline hasOwnProperty when used in fast-case for-in
>
> e.g.,
>
> for (var k in o) {
>   if (!o.hasOwnProperty(k)) continue;
>   ...
> }
>
> without enumerable properties on the prototype chain of o.
>
> BUG=
>
> Committed: https://crrev.com/dec80752eb344dfeb85588e61ac0afd22b11aadb
> Cr-Commit-Position: refs/heads/master@{#34379}

TBR=bmeurer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34380}
2016-03-01 09:01:29 +00:00
verwaest
dec80752eb [crankshaft] Inline hasOwnProperty when used in fast-case for-in
e.g.,

for (var k in o) {
  if (!o.hasOwnProperty(k)) continue;
  ...
}

without enumerable properties on the prototype chain of o.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34379}
2016-03-01 07:21:01 +00:00
bmeurer
b4b9fc2927 [compiler] Fix a bunch of wrong word size assumptions.
Operations on word size data must be word sized, and not word32.
Currently this only generates worse code, but in the future, it
might even generate wrong code, so we should better get this right
from the beginning.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34378}
2016-03-01 07:10:26 +00:00
bmeurer
74d6c64cc0 [for-in] Record slow path feedback only when we hit %ForInFilter.
The only place in fullcodegen, where we know for sure that a for-in loop
entered the slow-path is right before the potential call to %ForInFilter.
So there's no point in also updating the mode eagerly during ForInPrepare.

R=yangguo@chromium.org
BUG=v8:3650
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34377}
2016-03-01 06:10:40 +00:00
alph
b01cd96eb5 Make CPU profiler unwind the inlined functions stack.
BUG=575466
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34376}
2016-03-01 06:00:08 +00:00
aseemgarg
4537f09374 Replace __init__ function in asm-wasm-builder with the start function section
BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=mjsunit/asm-wasm
R=titzer@chromium.org,bradnelson@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34375}
2016-03-01 05:50:55 +00:00
v8-autoroll
a4462be1bb Update V8 DEPS.
Rolling v8/base/trace_event/common to e40c41030f44cbd5b6f54081436620f43c3bb08a

Rolling v8/tools/clang to d53e60b4f31f03a6f719b13ed2de7389a4d89be4

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34374}
2016-03-01 04:22:51 +00:00
littledan
2765a0609a Make %TypedArray%.from spec-compliant
This patch fixes %TypedArray%.from to follow the ES2016 draft spec
more precisely. Specifically, the input is first converted to an
ArrayLike, and then afterwards, the mapping function is run and the
results written into the TypedArray. This fixes a test262 test.

R=adamk
LOG=Y
BUG=v8:4782

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

Cr-Commit-Position: refs/heads/master@{#34373}
2016-03-01 02:41:42 +00:00
zhengxing.li
4a6f15124f X87: [turbofan] Don't use the CompareIC in JSGenericLowering.
port d00da47b61462681b48e48bdff4a80a33da1a6d6(r34335)

  original commit message:
  The CompareICStub produces an untagged raw word value, which has to be
  translated to true or false manually in the TurboFan code. But for lazy
  bailout after the CompareIC, we immediately go back to fullcodegen or
  Ignition with the raw value, to a location where both fullcodegen and
  Ignition expect a boolean value, which might crash or in the worst case
  (depending on the exact computation inside the CompareIC) could lead to
  arbitrary memory access.

  Short-term fix is to use the proper runtime functions (unified with the
  interpreter now) for comparisons. Next task is to provide optimized
  versions of these based on the CodeStubAssembler, which can then be used
  via code stubs in TurboFan or directly in handlers in the interpreter.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34372}
2016-03-01 02:37:12 +00:00
mbrandy
0a287e230b PPC: [compiler] Drop the CompareNilIC.
Port fb59ea3334

Original commit message:
    Since both null and undefined are also marked as undetectable now, we
    can just test that bit instead of having the CompareNilIC try to collect
    feedback to speed up the general case (without the undetectable bit
    being used).

    Drive-by-fix: Update the type system to match the new handling of
    undetectable in the runtime.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34371}
2016-02-29 20:27:52 +00:00
cbruni
8d12b61144 [counters] Only initialize the RuntimeCallStats when --runtime_call_stat is
specified.

BUG=chromium:590668
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34370}
2016-02-29 19:13:15 +00:00
adamk
65b23ac721 [cleanup] Move ForEach vector feedback slots to ForInStatement
The "each" slot is only actually used by ForIn, so this simply cleans
up a TODO of mine and removes an IsForOfStatement() call.

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

Cr-Commit-Position: refs/heads/master@{#34369}
2016-02-29 19:10:09 +00:00
titzer
c5b2f1536b [wasm] Add support and unittests for decoding signed LEB128.
R=bradnelson@chromium.org,ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34368}
2016-02-29 18:42:26 +00:00
shenhan
2b29b63031 OS::ArmUsingHardFloat returns bogus value for clang-built chrome.
This caused a runtime crash for Chrome built with clang on all
ChromeOs
arm32 platforms - ChromeOs chrome is using hardfp while this routine
returns false.

The fix is straightforward.

BUG=chromium:586219
TEST=built arm32 hardfp using clang and passed all tests.
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34367}
2016-02-29 18:30:22 +00:00
neis
a40d5d544d Remove [[Enumerate]] leftovers.
R=littledan@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34366}
2016-02-29 17:02:50 +00:00
danno
f1d49ca3f2 [turbofan] Ensure that JS -> WASM calls align the csp on arm64
This is done by ensuring that the Arm64ClaimCSP instruction calls
AlignAndSetCSPForFrame when it's generated when the StackPointer() is set to
jssp.

LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34365}
2016-02-29 16:52:36 +00:00
cbruni
b00386f97c [js-perf-test] Adding micro benchmarks for for-in and keys patterns.
In order to track certain critical code-patters we will start adding
micro-benchmarks that reflect common requests on http://jsperf.com.
In this first CL a number of property enumeration methods are added,
in the hope to get a clearer picture on future regressions.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34364}
2016-02-29 14:55:50 +00:00
mtrofin
f8eb4e6952 [turbofan] More "auto" keyword cleanup
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34363}
2016-02-29 14:29:43 +00:00
verwaest
dd6f62e6ce [runtime] inline fast-path ToName, ToUint32 (used by ToArrayIndex)
This speeds up hasOwnProperty 5-10%

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34362}
2016-02-29 13:20:03 +00:00
bmeurer
d1df58e8d7 [stubs] Introduce a proper ToBooleanStub.
Rename the existing (patching) ToBooleanStub to ToBooleanICStub to match
our naming convention, and add a new TurboFan-powered ToBooleanStub,
which just does the ToBoolean conversion without any runtime call or
code patching, so we can use it for Ignition (and TurboFan).

Drive-by-fix: Add an Oddball::to_boolean field similar to the ones we
already have for to_string and to_number, so we don't need to actually
dispatch on the concrete Oddball at all.

R=epertoso@chromium.org, rmcilroy@chromium.org, yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34361}
2016-02-29 12:17:26 +00:00
verwaest
4d659edfcd Disable flaky SampleWhenFrameIsNotSetup
BUG=v8:2999, v8:4751
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34360}
2016-02-29 12:14:17 +00:00
verwaest
437616e335 [crankshaft] Check checked_function->ActualValue() in BuildWrapReceiver
Given that an additional map-check is inserted for function, we need to
check the underlying value.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34359}
2016-02-29 11:33:41 +00:00
bmeurer
c268aea4fb [turbofan] Unship try-catch.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34358}
2016-02-29 11:10:43 +00:00
jochen
e8c914f18f [api] Assume that v8/include is in the include path for all public headers
Probably easier to use for embedders.

BUG=
R=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34357}
2016-02-29 11:03:02 +00:00
verwaest
d5cb0ce4e9 Move hasOwnProperty to builtins.cc
This gets rid of the JavaScript wrapper. That way we can more quickly handle non-JSReceivers and indexed properties; and don't need to optimize the JavaScript wrapper either.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34356}
2016-02-29 10:55:35 +00:00
baptiste.afsa
c7339e6ee4 [arm64] Make sure that memory allocated for assembler tests is executable.
Fix some crashes when tests are run on real hardware.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34355}
2016-02-29 10:52:34 +00:00
baptiste.afsa
27a75f7ad0 [arm64] Prevent the compiler to use fmadd/fmsub while compiling cctest.
This ensures that the generated code output will match the reference code output
and fixes some failures when running tests natively.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34354}
2016-02-29 09:16:14 +00:00
zhengxing.li
e99ad69147 X87: [crankshaft] [ia32] Remove dynamic frame alignment optimization.
port fcb83f2015afe63449f7ab070558e0c7f2accb47(r34273)

  original commit message:
  This optimization does not give us much (see perf try bot results associated with this CL) but complicates things a lot. The main motivation is to avoid additional complexity in tail call optim

  There are some pieces left in the deoptimizer, but I'll address this in a separate CL.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34353}
2016-02-29 03:36:23 +00:00
zhengxing.li
2aa5341050 X87: [runtime] Unify comparison operator runtime entries.
port 55b4df7357557eb16377ad9227e4e0a4224b7885(r34303)

  original commit message:
  Only use one set of %StrictEquals/%StrictNotEquals and
  %Equals/%NotEquals runtime entries for both the interpreter
  and the old-style CompareICStub. The long-term plan is to
  update the CompareICStub to also return boolean values, and
  even allow some more code sharing with the interpreter there.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34352}
2016-02-29 03:30:23 +00:00
titzer
008888c8cb [wasm] Allocate WasmModule and WasmModuleInstance vectors inline.
R=bradnelson@chromium.org,ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34351}
2016-02-28 19:05:42 +00:00
titzer
91802542d5 [wasm] Rename ExprBoolNot to ExprI32Eqz.
R=bradnelson@chromium.org, binji@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34350}
2016-02-28 19:02:24 +00:00
machenbach
9c6f024d38 [release] Wait longer when tagging releases.
This is just a band-aid workaround.

TBR=hablich@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34349}
2016-02-28 12:31:56 +00:00
machenbach
6fcf83a1a3 [Swarming] Correctly handle test262 archiving for local checkouts.
BUG=chromium:535160,v8:4792
LOG=n
TBR=tandrii@chromium.org, jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34348}
2016-02-28 12:27:26 +00:00
hablich
020dbfe432 [Release] Update V8 version to 5.1
TBR=machenbach@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34347}
2016-02-28 00:55:04 +00:00
titzer
06241221a6 [wasm] Add a magic word and a version number to the binary.
R=binji@chromium.org,jfb@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34346}
2016-02-28 00:37:29 +00:00
titzer
8344687c76 [wasm] Properly plumb the origin of the WASM module from asm.js translation.
R=bradnelson@chromium.org,aseemgarg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34345}
2016-02-27 20:40:06 +00:00
bmeurer
fb59ea3334 [compiler] Drop the CompareNilIC.
Since both null and undefined are also marked as undetectable now, we
can just test that bit instead of having the CompareNilIC try to collect
feedback to speed up the general case (without the undetectable bit
being used).

Drive-by-fix: Update the type system to match the new handling of
undetectable in the runtime.

R=danno@chromium.org

Committed: https://crrev.com/666aec0348c8793e61c8633dee7ad29a514239ba
Cr-Commit-Position: refs/heads/master@{#34237}

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

Cr-Commit-Position: refs/heads/master@{#34344}
2016-02-27 19:13:46 +00:00
v8-autoroll
8401e94892 Update V8 DEPS.
Rolling v8/tools/clang to e67c4fe288f02e1d208961b757ff78d5b3e51782

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34343}
2016-02-27 04:18:38 +00:00
titzer
d035d6172a [wasm] Add an export table.
R=binji@chromium.org,jfb@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34342}
2016-02-27 01:54:30 +00:00
mbrandy
c1507e1587 PPC: [turbofan] Don't use the CompareIC in JSGenericLowering.
Port d00da47b61

Original commit message:
    The CompareICStub produces an untagged raw word value, which has to be
    translated to true or false manually in the TurboFan code. But for lazy
    bailout after the CompareIC, we immediately go back to fullcodegen or
    Ignition with the raw value, to a location where both fullcodegen and
    Ignition expect a boolean value, which might crash or in the worst case
    (depending on the exact computation inside the CompareIC) could lead to
    arbitrary memory access.

    Short-term fix is to use the proper runtime functions (unified with the
    interpreter now) for comparisons. Next task is to provide optimized
    versions of these based on the CodeStubAssembler, which can then be used
    via code stubs in TurboFan or directly in handlers in the interpreter.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:4788
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34341}
2016-02-26 22:14:58 +00:00
mbrandy
76b6615947 Revert of PPC: [compiler] Drop the CompareNilIC. (patchset #1 id:1 of https://codereview.chromium.org/1733663003/ )
Reason for revert:
Original commit reverted.

Original issue's description:
> PPC: [compiler] Drop the CompareNilIC.
>
> Port 666aec0348
>
> Original commit message:
>     Since both null and undefined are also marked as undetectable now, we
>     can just test that bit instead of having the CompareNilIC try to collect
>     feedback to speed up the general case (without the undetectable bit
>     being used).
>
>     Drive-by-fix: Update the type system to match the new handling of
>     undetectable in the runtime.
>
> R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
> BUG=
>
> Committed: https://crrev.com/546ea6b8393a894f07597ade5ec1c7db02c1e425
> Cr-Commit-Position: refs/heads/master@{#34266}

TBR=bmeurer@chromium.org,joransiu@ca.ibm.com,jyan@ca.ibm.com,michael_dawson@ca.ibm.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34340}
2016-02-26 21:46:17 +00:00