Commit Graph

28098 Commits

Author SHA1 Message Date
sigurds
4efbeac115 [turbofan] Improve escape analysis.
* Treat Select nodes as escaping
* Correctly void virtual field information
  after a store to a non-const index
* Add a shortcut if all allocates escape
* Add a shortcut if no allocates are discovered
* Only reduce FrameState/StateValues nodes if they
  have virtual allocates as input (transitively)
* Fix bug in FrameState/StateValues duplication
* Add check to verifier: First 3 inputs of FrameState
  must be StateValues

R=mstarzinger@chromium.org
BUG=v8:4586
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33406}
2016-01-20 13:26:31 +00:00
cbruni
ed24dfe80d [runtime] Do not use the enum-cache for keys retrieval.
Currently we fail to properly handle shadowed properties. If the
receiver defines a non-enumerable property that reappears on the
prototype as enumerable it incorrectly shows up in [[Enumerate]].
By extending the KeyAccumulator to track non-enumerable properties
we can now properly filter them out when seeing them further up in
the prototype-chain.

BUG=v8:705
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#33405}
2016-01-20 12:37:18 +00:00
hablich
654a63e1e1 Revert of [builtins] Migrate Object.getOwnPropertyDescriptor to C++. (patchset #1 id:1 of https://codereview.chromium.org/1606783002/ )
Reason for revert:
Breaks roll: https://codereview.chromium.org/1603953002/

Original issue's description:
> [builtins] Migrate Object.getOwnPropertyDescriptor to C++.
>
> The implementation of Object.getOwnPropertyDescriptor always called into
> C++ anyway, so there's no need to have this JavaScript wrapper around at
> all.
>
> R=yangguo@chromium.org
>
> Committed: https://crrev.com/3fdd37b028f4711d0f6dcb038f575ce08ef0cfa3
> Cr-Commit-Position: refs/heads/master@{#33379}

TBR=yangguo@chromium.org,bmeurer@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.

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

Cr-Commit-Position: refs/heads/master@{#33404}
2016-01-20 12:30:08 +00:00
hablich
8f67a6e710 Revert of [runtime] Introduce maps for the likely cases of FromPropertyDescriptor. (patchset #1 id:1 of https://codereview.chromium.org/1607943003/ )
Reason for revert:
Predecessor CL suspect for roll breakage: https://codereview.chromium.org/1610563002

Original issue's description:
> [runtime] Introduce maps for the likely cases of FromPropertyDescriptor.
>
> This change improves performance for the common case of
> Object.getOwnPropertyDescriptor by up 3x-4x, where we just
> return a property descriptor object for a regular data or
> accessor property.
>
> R=yangguo@chromium.org
>
> Committed: https://crrev.com/ffa9e82235b20c523ebb1151c6196bc6232296b9
> Cr-Commit-Position: refs/heads/master@{#33398}

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

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

Cr-Commit-Position: refs/heads/master@{#33403}
2016-01-20 11:55:44 +00:00
mstarzinger
24a8476904 [interpreter] Deprecate the --ignition-fake-try-catch flag.
This removes the above flag definition. The flag is no longer needed as
the default implementation is more than capable of faking presence of
handling of try-catch and try-finally constructs by now.

R=rmcilroy@chromium.org
BUG=v8:4674
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33402}
2016-01-20 11:35:59 +00:00
mstarzinger
1f506030cb [interpreter] Simplify ConstantArrayBuilder interface a bit.
R=oth@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33401}
2016-01-20 11:31:56 +00:00
mstarzinger
82716f1cea [interpreter] Implement exception handler table building.
This implements a first version of exception handler table construction
within the interpreter. Note that the local control flow for try-catch
and try-finally statements is still off, and also stack unwinding does
not yet respect interpreter frames. But generated handler tables should
be populated correctly already.

R=oth@chromium.org
BUG=v8:4674
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33400}
2016-01-20 10:47:19 +00:00
hablich
98cd565ff2 Revert of [runtime] Migrate Object.getOwnPropertyNames to C++. (patchset #2 id:20001 of https://codereview.chromium.org/1605803002/ )
Reason for revert:
Breaks roll: https://codereview.chromium.org/1603953002/

Original issue's description:
> [runtime] Migrate Object.getOwnPropertyNames to C++.
>
> The Object.getOwnPropertyNames method always calls into C++ anyway,
> so there's no point in having the JavaScript wrapper around at all.
>
> Drive-by-fix: Inline GetOwnEnumerablePropertyNames into its single
> call site.
>
> R=yangguo@chromium.org
>
> Committed: https://crrev.com/bf027fe756f62b4abcac8aa08134c8c5ed055620
> Cr-Commit-Position: refs/heads/master@{#33380}

TBR=yangguo@chromium.org,bmeurer@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.

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

Cr-Commit-Position: refs/heads/master@{#33399}
2016-01-20 08:44:15 +00:00
bmeurer
ffa9e82235 [runtime] Introduce maps for the likely cases of FromPropertyDescriptor.
This change improves performance for the common case of
Object.getOwnPropertyDescriptor by up 3x-4x, where we just
return a property descriptor object for a regular data or
accessor property.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33398}
2016-01-20 07:56:27 +00:00
v8-autoroll
24292e1282 Update V8 DEPS.
Rolling v8/tools/clang to 9c45873bbb82dc33f5f88f5c7dbc06ee9ecc7e8f

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

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

Cr-Commit-Position: refs/heads/master@{#33397}
2016-01-20 04:28:27 +00:00
adamk
c04ef1ffcb Fix handling of escaped "let" and "static" tokens
The old handling of escaped keywords erroneously treated escaped versions
of "let" and "static" as ESCAPED_KEYWORD, leading to erroneous errors in
sloppy mode. Moreover, though the class literal parsing code attempted
to fix up the parsing of escaped versions of "static" to allow it in the
right places, that code wasn't complete.

Fixing the scanner to mark escaped "static" as ESCAPED_STRICT_RESERVED_WORD
allows simplifying the class literal parsing code. A little extra code
was needed to properly handle the new treatment of escaped "let".

Note that "yield" is still broken (that is, we're overly restrictive of
escaped "yield" in sloppy mode).

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

Cr-Commit-Position: refs/heads/master@{#33396}
2016-01-19 21:24:59 +00:00
mlippautz
1e0fd2a5b9 Remove rule prohibiting including src/v8.h
The dust has settled and it can now be used like any other header file

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33395}
2016-01-19 20:06:31 +00:00
hpayer
d0f0767faa Revert of Tenure descriptor arrays. (patchset #1 id:1 of https://codereview.chromium.org/1526663002/ )
Reason for revert:
Regresses memory consumption.

BUG=571180,571657
LOG=n

Original issue's description:
> Tenure descriptor arrays.
>
> BUG=
>
> Committed: https://crrev.com/74bc69166de8cfb967e79b5c8cc31c2a76490dc8
> Cr-Commit-Position: refs/heads/master@{#32846}

TBR=ishell@chromium.org,ulan@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.

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

Cr-Commit-Position: refs/heads/master@{#33394}
2016-01-19 17:56:17 +00:00
littledan
837e374eac Separate String.prototype.replace into RegExp.prototype[Symbol.replace]
This patch implements one aspect of ES2015 RegExp subclassing:
String.prototype.replace is separated into two parts, a method on
RegExp.prototype in case the first argument is a RegExp, and the
String.prototype.replace method, which handles the string pattern
case. This separation is described in the ES2015 specification.
Most of the patch is simply moving code from string.js to regexp.js.

R=yangguo
LOG=Y
BUG=v8:4343

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

Cr-Commit-Position: refs/heads/master@{#33393}
2016-01-19 17:33:44 +00:00
mbrandy
0f041e60c5 PPC: [turbofan] Add the TruncateFloat32ToInt32 operator to turbofan.
Port fc53eed14b

Original commit message:
    The new operator converts a float32 input to int32 through truncation.

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

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

Cr-Commit-Position: refs/heads/master@{#33392}
2016-01-19 17:09:07 +00:00
machenbach
63b602c843 [swarming] Roll luci-go/isolate to 5c67f7b670b5.
BUG=chromium:535160
LOG=n
TBR=tandrii@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33391}
2016-01-19 17:03:56 +00:00
balazs.kilvady
d9af984e70 MIPS: Use the Lsa() macro/r6 instruction in existing code.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33390}
2016-01-19 16:32:28 +00:00
oth
68654b6476 [Interpreter] Preparation for wide registers.
o Adds wide variants of bytecodes that have operands describing ranges
  of registers. The upcoming wide register support does not suppport
  re-mapping ranges.
o Adds kRegPair16 and kRegTriple16 operands required for new wide
  bytecodes and renames Count8/Count16 operands to RegCount8/RegCount16.
o Removes Exchange bytecodes

BUG=v8:4675
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#33389}
2016-01-19 16:07:00 +00:00
rmcilroy
603acc3f49 [Interpreter] Ensure that block breaks are within the correct context scope.
Fixes a bug where the context would be popped before labeled block break target
location.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33388}
2016-01-19 15:51:14 +00:00
ivica.bogosavljevic
e68ffc767d Add cctest/test-run-wasm-js/Run_JSSelect_0...6 to skip list for big-endian
Newly added tests cctest/test-run-wasm-js/Run_JSSelect_0...6 cause failures
on MIPS bigendian and are skipped until a solution is found.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33387}
2016-01-19 15:42:58 +00:00
jkummerow
2dde677feb [Crankshaft] ia32/x64: Fix environment handling for LMulI
This is the ia32/x64 version of https://codereview.chromium.org/873703002,
which fixed the same problem on arm/arm64.

BUG=chromium:553441
LOG=n
R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33386}
2016-01-19 14:40:51 +00:00
nikolaos
722909f38e Clean up dead code after spread desugaring
After 1564083002, spread expressions are desugared and should not
survive in the AST after parsing. This patch removes dead code
related to this.  It also eliminates the kSpread bailout reason
and the concat_iterable_to_array_builtin.

R=bmeurer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33385}
2016-01-19 12:06:30 +00:00
rmcilroy
43c02e49d8 [Interpreter] Change ignition fallback flag to only fallback on catch, not eval.
Now that we support eval in Ignition, remove the fallback for eval checks
and make the flag only fallback on catch blocks.

BUG=v8:4280,v8:4676
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33384}
2016-01-19 11:33:50 +00:00
jkummerow
009b351427 [WATCHLISTS] CC v8-$arch-ports automatically on platform-specific CLs
Automate ALL the repetitive workflows!

Drive-by: fix 'interpreter' watchlist definition.

NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#33383}
2016-01-19 09:18:41 +00:00
mlippautz
10429d9f53 Revert "[heap] Make survival counters concurrent (atomic)"
This reverts commit 7cf64f4017.

Tanks octane. Will use a different approach here.

BUG=chromium:578871, chromium:524425
LOG=N
TBR=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33382}
2016-01-19 08:46:14 +00:00
titzer
6d38478849 [wasm] Use TruncationMode::kJavaScript when coming from asm.js.
R=ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33381}
2016-01-19 08:29:28 +00:00
bmeurer
bf027fe756 [runtime] Migrate Object.getOwnPropertyNames to C++.
The Object.getOwnPropertyNames method always calls into C++ anyway,
so there's no point in having the JavaScript wrapper around at all.

Drive-by-fix: Inline GetOwnEnumerablePropertyNames into its single
call site.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33380}
2016-01-19 07:35:01 +00:00
bmeurer
3fdd37b028 [builtins] Migrate Object.getOwnPropertyDescriptor to C++.
The implementation of Object.getOwnPropertyDescriptor always called into
C++ anyway, so there's no need to have this JavaScript wrapper around at
all.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33379}
2016-01-19 06:55:28 +00:00
v8-autoroll
8e918ea2ad Update V8 DEPS.
Rolling v8/tools/clang to c3b604840a63c06fa1c0c652119860e97fd57abe

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

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

Cr-Commit-Position: refs/heads/master@{#33378}
2016-01-19 04:29:59 +00:00
verwaest
90952d768b [runtime] Stop cloning AccessorInfo, just rely on PropertyAttributes for readonly.
The old mechanism was a left-over from a previous time where the runtime
would rely on the presence or absence of the setter to figure out
whether or not the property is mutable. This is unnecessary by now.

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

Cr-Commit-Position: refs/heads/master@{#33377}
2016-01-18 20:00:04 +00:00
verwaest
c7c6093590 [runtime] Reuse MakeAccessor in MakeModuleExport
Previously MakeModuleExport invalidly set "all-can-*" to true. Also module export setters need to throw (in strict-mode) according to ES6 9.4.6.6 and 9.4.6.9.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33376}
2016-01-18 18:48:43 +00:00
Ben L. Titzer
2e16d9862a [wasm] Disable asm-wasm test (requires SSE 4.1).
R=jkummerow@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33375}
2016-01-18 18:47:35 +00:00
titzer
5ad6f6de07 [wasm] Add test for non-misaligned OOB access.
R=ahaas@chromium.org,bradnelson@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33374}
2016-01-18 17:34:08 +00:00
mstarzinger
e26aa58b1a [interpreter] Add field for handler table to bytecode array.
This adds a handler table field to the header of our BytecodeArray
objects. The field will eventually hold a range-based handler table
similar to full-codegen code, to support exception handlong within
interpreted code.

R=oth@chromium.org
BUG=v8:4674
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33373}
2016-01-18 17:21:01 +00:00
titzer
60d9733a57 [wasm] Enable WASM JavaScript API tests.
LOG=Y
BUG=chromium:575167

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

Cr-Commit-Position: refs/heads/master@{#33372}
2016-01-18 17:19:56 +00:00
mythria
8ae9fb69c2 [Interpreter] Fixes VisitObjectLiteral to reserve consecutive registers in innerscope.
VisitObjectLiteral has two parts. First it creates a literal and then
sets properties or accessor properties. Setting properties requires a
runtime call and it expects the literal object which was created in the
first part is contiguous with other registers it allocates. Since these
are allocated in a different scope they are not always contiguous.
This causes problems with mjsunit/setter-on-constructor-prototype.js.
This cl fixes by allocating contiguous registers in the inner scope.
Literal value is copied into the newly allocated register so that all
the required registers are always contiguous.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33371}
2016-01-18 17:18:52 +00:00
Ben L. Titzer
81e796ff36 [wasm] Disable failing tests on arm.
R=ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33370}
2016-01-18 17:07:05 +00:00
ahaas
900b293348 Revert of [turbofan] Implement rounding of floats on x64 and ia32 without sse4.1. (patchset #2 id:20001 of https://codereview.chromium.org/1584663007/ )
Reason for revert:
Code is incorrect for -0.

Original issue's description:
> [turbofan] Implement rounding of floats on x64 and ia32 without sse4.1.
>
> The implementation sets the rounding mode flag and then uses the
> cvtsd2si and cvtsi2sd instructions (convert between float and int) to do
> the rounding. Input values outside int range either don't have to be
> rounded anyways, or are rounded by calculating input + 2^52 - 2^52 for
> positive inputs, or input -2^52 + 2^52 for negative inputs. The original
> rounding mode is restored afterwards.
>
> R=titzer@chromium.org
>
> B=575379
>
> Committed: https://crrev.com/fa5d09e547abe79a8c82f780deb980c53ad78beb
> Cr-Commit-Position: refs/heads/master@{#33367}

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

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

Cr-Commit-Position: refs/heads/master@{#33369}
2016-01-18 16:28:00 +00:00
yangguo
4836180143 [regexp] do not include irregexp interpreter by default.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33368}
2016-01-18 16:12:29 +00:00
ahaas
fa5d09e547 [turbofan] Implement rounding of floats on x64 and ia32 without sse4.1.
The implementation sets the rounding mode flag and then uses the
cvtsd2si and cvtsi2sd instructions (convert between float and int) to do
the rounding. Input values outside int range either don't have to be
rounded anyways, or are rounded by calculating input + 2^52 - 2^52 for
positive inputs, or input -2^52 + 2^52 for negative inputs. The original
rounding mode is restored afterwards.

R=titzer@chromium.org

B=575379

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

Cr-Commit-Position: refs/heads/master@{#33367}
2016-01-18 16:10:09 +00:00
titzer
b577ecfd6a [wasm] Create a wrapper function for WASM.asmCompileRun().
R=bradnelson@chromium.org, ahaas@chromium.org
LOG=Y
BUG=chromium:575372

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

Cr-Commit-Position: refs/heads/master@{#33366}
2016-01-18 15:39:44 +00:00
nikolaos
9ed5596ade Fix re-indexing for literals in do-expressions
This became temporarily a big issue, because spreads are desugared
into do-expressions.  This patch fixes the problem with having
spreads as parameter initializers in arrow expressions, e.g., this
line would crash:

    [], ((x = [...[42]]) => x)();

R=rossberg@chromium.org
BUG=chromium:578038
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33365}
2016-01-18 15:20:58 +00:00
verwaest
e4b41d64e5 [runtime] remove left-over distinction between AccessorInfo and ExecutableAccessorInfo
Review URL: https://codereview.chromium.org/1600353003

Cr-Commit-Position: refs/heads/master@{#33364}
2016-01-18 15:09:08 +00:00
cbruni
5346972186 Use default argument count for runtime function calls.
In many places we over-specify runtime-calls by explicitly mentioning
again the argument count. Except for var-args runtime-functions we can
easily deduce this from the parameters in runtime.h.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33363}
2016-01-18 14:48:24 +00:00
titzer
bb552d4c8c [wasm] Add more thorough tests for WASM->JS and JS->WASM parameters.
R=ahaas@chromium.org,bradnelson@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33362}
2016-01-18 14:29:28 +00:00
balazs.kilvady
ccb3181c0b MIPS: Refine 'r6 compact branch optimization.'
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33361}
2016-01-18 14:28:20 +00:00
neis
faf5e68169 Make generators non-constructable.
BUG=v8:4163,v8:4630
LOG=y

R=rossberg

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

Cr-Commit-Position: refs/heads/master@{#33360}
2016-01-18 13:11:06 +00:00
cbruni
ec30425a77 [proxy] Reload the initial map after prototype lookup on constructable
Proxy.

If a constructable Proxy changes the target's prototype during the
prototype lookup the target's initial map stays uninitialized half-way
during object construction.

LOG=n
BUG=chromium:578039

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

Cr-Commit-Position: refs/heads/master@{#33359}
2016-01-18 12:49:29 +00:00
jochen
9b7035d96c LookupIterator should find private symbols on JSProxies
BUG=chromium:571365
R=verwaest@chromium.org,neis@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33358}
2016-01-18 12:41:30 +00:00
rmcilroy
1ea0b91a83 [Interpreter] Make ForInPrepare take a kRegTriple8 and ForInNext take kRegPair8 for cache state
Make ForInPrepare take a kRegTriple8 operand and ForInNext take kRegPair8
operand for cache state. This is to ensure that the cache state output of
ForInPrepare is in consecutive registers to allow us to deopt the
ForInPrepare node from TF->Ignition (to be done in a followup CL).

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33357}
2016-01-18 12:40:22 +00:00