Commit Graph

11489 Commits

Author SHA1 Message Date
oth
9383d14b9f [interpreter] Disable mjsunit/ignition/elided-instruction
BUG=v8:4680
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34991}
2016-03-22 14:40:45 +00:00
bmeurer
43fe7d6854 [builtins] Add support for JS builtins written in TurboFan.
This CL adds support for builtins with JavaScript linkage written using
the TurboFan CodeStubAssembler, but with a JSCall descriptor (which was
already supported thanks to a previous patch by Ben Smith). As a first
example, we convert the Math.sqrt builtin and thereby get rid of the
%_MathSqrt intrinsic, which causes trouble for the representation
selection pass in the JavaScript pipeline.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34989}
2016-03-22 13:25:54 +00:00
epertoso
d158bf14b3 [Interpreter] TurboFan implementation of intrinsics.
Introduces a bytecode whose handler executes the equivalent of %_IsArray and %_IsJSReceiver without a runtime call.

BUG=v8:4822
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#34983}
2016-03-22 11:36:05 +00:00
mythria
27338320f4 [Interpreter] Fixes CopyBytecodeArray to copy interrupt_budget field.
Fixes CopyBytecodeArray to set the interrupt_budget field.

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

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

Cr-Commit-Position: refs/heads/master@{#34982}
2016-03-22 11:05:21 +00:00
jarin
e1bd9af173 [turbofan] Add more sanity checks to representation inference.
The CL also add guard nodes to places where we assume that certain
values are numbers.

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

Cr-Commit-Position: refs/heads/master@{#34977}
2016-03-22 06:50:52 +00:00
bmeurer
1d0df88b11 [intrinsics] Remove unused intrinsic %_IncrementStatsCounter.
This was once meant to be used for JavaScript code stubs, but since we
found a better way to do code stubs using TurboFan, we don't need this
runtime entry and intrinsic anymore.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34976}
2016-03-22 06:35:39 +00:00
zhengxing.li
400f6c5038 X87: Extends testb and cmpb/cmpw instruction support in the ia32 assembler.
port 22523f25b1 (r34925)

  original commit message:
  This is in preparation for a CL that does the equivalent of http://crrev.com/1780193003 for ia32.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34974}
2016-03-22 05:39:56 +00:00
bradnelson
cca5c3f630 Fix conversion to float32, typing issue, split apart asm-wasm tests.
Add missing conversions from other types to f32 in fround.
Restrict fround() to only float, double, signed, unsigned (no unions / intish).
Restrict Bitwise operations to intish, particularly |0, when not applied to a foreign function.

Adding more exhaustive tests of stdlib Math, move to a separate file.
Adding tests of interesting values for the stdlib asm.js functions.

BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203
TEST=test-asm-validator,asm-wasm
R=titzer@chromium.org,rossberg@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34967}
2016-03-21 20:34:40 +00:00
caitpotter88
e6f4b7491c [parser] implement error reporting for Scanner
Enables the Scanner to provide a better error message when errors occur
in escape sequences, numbers, strings, etc.

BUG=v8:4829, v8:3230
LOG=N
R=adamk@chromium.org, littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34966}
2016-03-21 20:27:44 +00:00
adamk
249bf75e0c Remove runtime flags for Proxy and Reflect
Both of them shipped in Chrome 49 without incident.

Also move relevant tests from harmony/ to es6/.

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

Cr-Commit-Position: refs/heads/master@{#34964}
2016-03-21 19:40:02 +00:00
ishell
e6dca379b6 [crankshaft] Check if the function is callable before generating a tail call via Call builtin.
This is necessary to ensure that "Called non callable" exception will get a proper message and stack trace even for calls at tail position.

BUG=chromium:595615, v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34962}
2016-03-21 19:24:28 +00:00
yangguo
5dedb164eb [regexp] require exact match for unicode property names.
R=littledan@chromium.org
BUG=v8:4810
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34961}
2016-03-21 19:22:24 +00:00
vogelheim
09ac4f295c Revert of Parser: Make skipping HTML comments optional. (patchset #6 id:140001 of https://codereview.chromium.org/1801203002/ )
Reason for revert:
Violates ES6 spec (crbug.com/4850), and implementation was over-eager. Will revert for now.

Original issue's description:
> Parser: Make skipping HTML comments optional.
>
> API change: This adds a new flag skip_html_comments to v8::ScriptOriginOptions. This flag controls whether V8 will attempt to honour HTML-style comments in JS sources.
>
> (That is: Gracefully ignore <!-- ... ---> in JS sources, which was a popular technique in the early days of JavaScript, to prevent non-JS-enabled browsers from displaying script sources to uses.)
>
> The flag defaults to 'true' when using v8::ScriptOrigin constructor, which preserves the existing behaviour. Embedders which are happy with the existing behaviour will thus not need any changes.
>
> BUG=chromium:573887
> LOG=Y
>
> Committed: https://crrev.com/91d344288aa51ed03eaaa1cb3e368ac1e82f0173
> Cr-Commit-Position: refs/heads/master@{#34904}

TBR=jochen@chromium.org,rossberg@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:573887, v8:4850
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34958}
2016-03-21 17:50:22 +00:00
ishell
35a14c75e3 Disable ES6 tail call elimination for native functions.
We don't want them to disappear from the stack traces.

BUG=v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34957}
2016-03-21 17:44:57 +00:00
oth
48d082af38 [interpreter] Add support for scalable operands.
This change introduces wide prefix bytecodes to support wide (16-bit)
and extra-wide (32-bit) operands. It retires the previous
wide-bytecodes and reduces the number of operand types.

Operands are now either scalable or fixed size. Scalable operands
increase in width when a bytecode is prefixed with wide or extra-wide.

The bytecode handler table is extended to 256*3 entries. The
first 256 entries are used for bytecodes with 8-bit operands,
the second 256 entries are used for bytecodes with operands that
scale to 16-bits, and the third group of 256 entries are used for
bytecodes with operands that scale to 32-bits.

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

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

Cr-Commit-Position: refs/heads/master@{#34955}
2016-03-21 17:09:49 +00:00
jyan
faaf8512bf S390: Disable gcc generation of mul-add in cctests
Generated code performs distinct floating multiply and add/subtract
operations. Tests fail when GCC uses mul-add to calculate the
expected result since these instructions provide higher accuracy due
to the lack of an intermediate round.

R=machenbach@chromium.org, mbrandy@us.ibm.com, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34953}
2016-03-21 16:43:35 +00:00
mlippautz
fdb0784d0a [heap] Remove LocalStoreBuffer and add slots in parallel
Now that we have page-local remembered sets (due to refilling in page
granularity) we can perform all updates on the sets during compaction in
parallel without caching slots locally.

BUG=chromium:524425
LOG=N
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34952}
2016-03-21 16:01:01 +00:00
machenbach
6734df936a [test] Skip some flaky cpu profiler tests on windows.
BUG=v8:2999,v8:4751
LOG=n
NOTRY=true
TBR=hablich@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34943}
2016-03-21 14:17:56 +00:00
mstarzinger
02a015b1c1 [es6] Rebaseline tests of 'instanceof' error messages.
This rebaselines all our internal tests for error messages thrown by the
implementation of 'instanceof' to the new ES6 semantics. It also applies
a minor rephrasing to the messages in question.

R=rossberg@chromium.org
BUG=v8:4447
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34940}
2016-03-21 14:01:50 +00:00
ishell
1c34e5f822 Run some slow tail call tests only for fast configurations.
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34935}
2016-03-21 13:06:03 +00:00
mstarzinger
f1d04af52f [interpreter] Prepare for shipping --harmony-instanceof.
R=rmcilroy@chromium.org
TEST=cctest/test-interpreter/InterpreterInstanceOf
BUG=v8:4447
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34933}
2016-03-21 12:09:05 +00:00
ishell
ac83355748 [interpreter] Disable some slow tail call tests.
TBR=machenbach@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34929}
2016-03-21 11:20:14 +00:00
epertoso
22523f25b1 Extends testb and cmpb/cmpw instruction support in the ia32 assembler.
This is in preparation for a CL that does the equivalent of http://crrev.com/1780193003 for ia32.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34925}
2016-03-21 10:09:26 +00:00
bmeurer
b7aa4c3ab3 [stubs] Split ToNumberStub into reusable subparts.
Split ToNumberStub into the entry ToNumberStub, and two new stubs,
StringToNumberStub and NonNumberToNumberStub, which can be used when we
already know something about the input (i.e. in various branches of the
code stubs, or in TurboFan graphs).

Also introduce an appropriate StringToNumber simplified operator for
TurboFan, that is pure and is lowered to an invocation of the newly
added StringToNumberStub.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34922}
2016-03-21 09:05:49 +00:00
ishell
acbb968ded [crankshaft] Fixing ES6 tail call elimination.
In case when F inlined normal call to G which tail calls H we should not write translation for G for the tail call site.
Otherwise we will see G in a stack trace inside H.

This CL also enables all existing tests related to ES6 tail call elimination and adds more combinations.

TBR=bmeurer@chromium.org
BUG=v8:4698
LOG=N

Committed: https://crrev.com/689980f7d4dfd4c29492f616d7b616b86ec9af91
Cr-Commit-Position: refs/heads/master@{#34830}

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

Cr-Commit-Position: refs/heads/master@{#34920}
2016-03-21 08:48:37 +00:00
jarin
811137ffe5 [turbofan] Use the type from the typer instead of computing new type in representation inference.
Review URL: https://codereview.chromium.org/1799023003

Cr-Commit-Position: refs/heads/master@{#34917}
2016-03-21 06:29:43 +00:00
bmeurer
cc04776632 [json] Allow any callable object for toJSON.
Previously only JSFunctions seemed to be valid for toJSON, which doesn't
match the ES6 specification that allows any object with [[Call]]
internal method (i.e. any Callable in V8 terminology), including bound
functions and proxies.

BUG=chromium:595738, chromium:535408
R=yangguo@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34913}
2016-03-20 19:35:28 +00:00
akos.palfi
04c4bbb445 Disable AstDecoderTest.All*MemCombinations for big-endian.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34912}
2016-03-19 23:18:43 +00:00
adamk
3c5d6caac2 Pass all parser flags from Parser to PreParser
This revealed one Mozilla test that depended upon a lack
of early error for "with ({}) function ...". The test
has been marked as failing.

R=littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34910}
2016-03-19 00:55:10 +00:00
adamk
6a8de15322 Several mjsunit cleanups
- Move default parameters tests from harmony/ to es6/ and remove
    non-existent --harmony-default-parameters flag.
  - Remove some non-existent tests from mjsunit.status

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

Cr-Commit-Position: refs/heads/master@{#34908}
2016-03-18 23:20:44 +00:00
bradnelson
e7f7d2c943 Number lines in test-asm-validator from 1.
Dropping newlines in the test macros used in test-asm-validator.
This will make the tests number from 1, rather than 39,
making them easier to read.

LOG=N
BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=test-asm-validator
R=aseemgarg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34907}
2016-03-18 23:15:34 +00:00
littledan
0d2e28cb24 Revert of Restore per-TypedArray-class length accessors as a perf workaround (patchset #2 id:20001 of https://codereview.chromium.org/1624383003/ )
Reason for revert:
This patch actually seemed to cause a further GameBoy regression! Reverting it seems to address the regression.

Original issue's description:
> Restore per-TypedArray-class length accessors as a perf workaround
>
> This patch is a workaround to the performance regression caused by
> implementing the ES2015 TypedArray prototype chain: Include a
> per-TypedArray-subclass length getter so that the superclass getter does
> not become polymorphic. The patch appears to fix a regression in the
> Gameboy Octane benchmark.
>
> BUG=chromium:579905
> R=adamk
> LOG=Y
>
> Committed: https://crrev.com/03ce7711e474a0ef74f723b30ae1527c89dec010
> Cr-Commit-Position: refs/heads/master@{#33501}

R=adamk@chromium.org
BUG=chromium:579905,chromium:593634
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34906}
2016-03-18 18:29:37 +00:00
vogelheim
91d344288a Parser: Make skipping HTML comments optional.
API change: This adds a new flag skip_html_comments to v8::ScriptOriginOptions. This flag controls whether V8 will attempt to honour HTML-style comments in JS sources.

(That is: Gracefully ignore <!-- ... ---> in JS sources, which was a popular technique in the early days of JavaScript, to prevent non-JS-enabled browsers from displaying script sources to uses.)

The flag defaults to 'true' when using v8::ScriptOrigin constructor, which preserves the existing behaviour. Embedders which are happy with the existing behaviour will thus not need any changes.

BUG=chromium:573887
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34904}
2016-03-18 17:24:19 +00:00
yangguo
1e2d0e1136 [regexp] catch stack overflow when parsing back references.
R=jkummerow@chromium.org
BUG=chromium:595657
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34894}
2016-03-18 14:52:41 +00:00
verwaest
c6f9883d53 Remove oob elements collected from the prototype chain by trimming in GetArrayKeys
BUG=chromium:594953
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34893}
2016-03-18 14:37:36 +00:00
caitpotter88
17c92fe6bb [es7] implement exponentiation operator proposal
Implements Stage 4 proposal from http://rwaldron.github.io/exponentiation-operator/,
without adding any knowledge of the feature to compiler backends.

BUG=v8:3915
LOG=Y
R=adamk@chromium.org, rossberg@chromium.org, littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34890}
2016-03-18 13:54:05 +00:00
Ilija.Pavlovic
a4e5d1541a MIPS64: Fix test Cvt_s_uw_Trunc_uw_s.
The higher word (bits 32 - 63) of FPU register is set on zero before
storing result.

TEST=cctest/test-macro-assembler-mips64/Cvt_s_uw_Trunc_uw_s
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34889}
2016-03-18 13:22:03 +00:00
mstarzinger
8ba35e73ba [compiler] Remove redundant unoptimized compile trigger.
The trigger point in question is by now obsolete. The optimized compile
job will itself ensure that deoptimization support is present on the
incoming SharedFunctionInfo, this will make sure to produce baseline
code when necessary. The ScopeInfo is also installed at that point in
time.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34887}
2016-03-18 12:09:30 +00:00
akos.palfi
2bc32f222b Update cctest.status file for big-endian.
Adjust the status file after https://codereview.chromium.org/1784343004

Also removed the tests that are not failing anymore on big-endian.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34886}
2016-03-18 11:47:34 +00:00
mvstanton
84af5e4426 ES6: instanceof error messages need updating.
We need one message in case the function is not an object, and
another if it was an object but not callable.

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

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

Cr-Commit-Position: refs/heads/master@{#34883}
2016-03-18 10:39:28 +00:00
adamk
2c9e38e09e Pass legacy const runtime flag to preparser appropriately
It was never being set to false in production (though it was in test-parsing.cc,
due to that test having its own flag-setting logic).

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

Cr-Commit-Position: refs/heads/master@{#34878}
2016-03-18 01:09:17 +00:00
littledan
7acee1ef61 Throw the right exceptions from setting elements in Array.prototype.concat
This patch fixes two bugs in Array.prototype.concat in conjunction with
subclassing Arrays:
- Create a new property rather than calling Set when adding elements to
  the output array. This means setters are not called.
- If there is an exception thrown from DefineProperty, propagate it
  outwards properly, rather than swallowing it. This can occur, e.g., with
  a Proxy as the new output array.

R=adamk
LOG=Y
BUG=chromium:595319

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

Cr-Commit-Position: refs/heads/master@{#34876}
2016-03-17 22:42:00 +00:00
mlippautz
0395c50c60 Reland of "[platform] Change default platform max thread pool size 4 -> 8"
This reverts commit 4857110ce6.

This change was flushing out another issue which is fixed in
  https://codereview.chromium.org/1783283003/

BUG=v8:2999
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34874}
2016-03-17 20:22:50 +00:00
mvstanton
992ae64de0 Provide optimized support for the %GetOrdinaryHasInstance intrinsic.
This new intrinsic is used by the desugared ES6 instanceof implementation for
the cases when the F[@@hasInstance] property is null or undefined.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34866}
2016-03-17 15:46:59 +00:00
mvstanton
2aa070be4f InstanceOfStub incorrectly interprets the hole as a prototype.
Repair this to match what the runtime correctly does, by first checking if the
function is a constructor before we access the prototype.

R=verwaest@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34863}
2016-03-17 14:32:23 +00:00
balazs.kilvady
7b9dca76b8 MIPS: Disable asm-wasm mjsunit tests.
Port 879d254d54

Original commit message:
Landing this again, excluding arm as it fail and arm64
out of caution that other wasm arm64 tests are also disabled.

BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=mjsunit/asm-wasm
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34860}
2016-03-17 14:03:27 +00:00
yangguo
6e8958fff4 [serializer] ensure that immortal immovable roots are correctly deserialized.
Immortal immovable roots must be allocated on the first page of the space.
If serializing the root list exceeds the first page, immortal immovable root
objects might end up outside of the first page. That could cause missing
write barriers.

We now iterate the root list twice. The first time we only serialize immortal
immovable root objects. The second time we serialize the rest.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34859}
2016-03-17 13:16:25 +00:00
mvstanton
d47a4063c0 ES6: Object.setPrototypeOf(func, null) breaks instanceof
The way desugared instanceof called OrdinaryHasInstance if the lookup of
@@hasInstance failed was incorrect.

BUG=v8:4774
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34855}
2016-03-17 12:41:07 +00:00
ahaas
122862f6e9 [wasm] Turn on tests for float-to-int conversion in test-run-wasm-64.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34854}
2016-03-17 12:39:25 +00:00
mlippautz
da3b266150 [heap] Move to two-level free-list
Before this CL, free memory (FreeSpace) has been managed through a global free
list that contains single-linked lists of FreeSpace nodes for each size class.

We move away from this approach to a global two-level doubly-linked list that
refers to singly-linked lists of FreeSpace nodes on the corresponding pages.
This way we can refill on a page-level granularity. Furthermore, it also enables
constant-time eviction of pages from the free list.

BUG=chromium:524425
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34853}
2016-03-17 11:11:05 +00:00
yangguo
f507bc1c72 [serializer] Add API to warm up startup snapshot with an additional script.
A startup snapshot is considered cold when it does not contain any
function code. We can now create a warm startup snapshot from a cold one
by running a warm-up script. Functions exercised by the warm-up script
are compiled and its code included in the warm startup snapshot. Side
effects caused by the warm-up script does not persist.

R=vogelheim@chromium.org
BUG=v8:4836
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34849}
2016-03-17 10:34:16 +00:00
jarin
c2e82d6e82 [crankshaft] Fix inlining to always connect both branches of test context.
BUG=v8:4839
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34848}
2016-03-17 10:00:21 +00:00
zhengxing.li
b9b55bdc9e X87: Assembler changes for enabling GrowHeap in Wasm
port e1a7c1e76c (r34836)

  original commit message:
   - New RelocInfo mode WASM_MEMORY_REFERENCE as a marker for wasm code objects that need to be relocated on a heap change
   - RelocInfo mode recorded for immediates that use the memory buffer as base
   - Tests to verify address patching works

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34845}
2016-03-17 08:40:08 +00:00
mythria
46fabc1ea5 [Interpreter] Skips debug-scope-on-return on ignition and msan.
Skips mjsunit/ignition/debug-scope-on-return on ignition and msan

TBR=rmcilroy@chromium.org,machenbach@chromium.org
BUG=v8:4280
LOG=N
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34841}
2016-03-16 20:41:12 +00:00
caitpotter88
14188ea07f [parser] report illegal token error in ParseMemberExpressionContinuation()
Report correct error message when a scanner error occurs while parsing a tagged
template within an expression context.

BUG=v8:4829, v8:3230
LOG=N
R=adamk@chromium.org, littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34839}
2016-03-16 20:26:00 +00:00
gdeepti
e1a7c1e76c Assembler changes for enabling GrowHeap in Wasm
- New RelocInfo mode WASM_MEMORY_REFERENCE as a marker for wasm code objects that need to be relocated on a heap change
 - RelocInfo mode recorded for immediates that use the memory buffer as base
 - Tests to verify address patching works

BUG=

Committed: https://crrev.com/cc815b69c17da368107ed77306a5bb161170c834
Cr-Commit-Position: refs/heads/master@{#34831}

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

Cr-Commit-Position: refs/heads/master@{#34836}
2016-03-16 18:15:49 +00:00
machenbach
d64b41ded6 Revert of [crankshaft] Fixing ES6 tail call elimination. (patchset #7 id:200001 of https://codereview.chromium.org/1780043004/ )
Reason for revert:
[Sheriff] Leads to mac gc stress crashes:
https://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/4975

Original issue's description:
> [crankshaft] Fixing ES6 tail call elimination.
>
> In case when F inlined normal call to G which tail calls H we should not write translation for G for the tail call site.
> Otherwise we will see G in a stack trace inside H.
>
> This CL also enables all existing tests related to ES6 tail call elimination.
>
> TBR=bmeurer@chromium.org
> BUG=v8:4698
> LOG=N
>
> Committed: https://crrev.com/689980f7d4dfd4c29492f616d7b616b86ec9af91
> Cr-Commit-Position: refs/heads/master@{#34830}

TBR=mstarzinger@chromium.org,ishell@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4698

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

Cr-Commit-Position: refs/heads/master@{#34835}
2016-03-16 18:13:48 +00:00
machenbach
894bc100c3 Revert of Assembler changes for enabling GrowHeap in Wasm (patchset #13 id:260001 of https://codereview.chromium.org/1759873002/ )
Reason for revert:
Breaks compile:
https://build.chromium.org/p/client.v8/builders/V8%20Mac64/builds/7740

Probably had outdated tryjobs

Original issue's description:
> Assembler changes for enabling GrowHeap in Wasm
>  - New RelocInfo mode WASM_MEMORY_REFERENCE as a marker for wasm code objects that need to be relocated on a heap change
>  - RelocInfo mode recorded for immediates that use the memory buffer as base
>  - Tests to verify address patching works
>
> BUG=
>
> Committed: https://crrev.com/cc815b69c17da368107ed77306a5bb161170c834
> Cr-Commit-Position: refs/heads/master@{#34831}

TBR=titzer@chromium.org,yangguo@chromium.org,bradnelson@chromium.org,bradnelson@google.com,marija.antic@imgtec.com,gdeepti@google.com
# 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/1808823002

Cr-Commit-Position: refs/heads/master@{#34832}
2016-03-16 17:28:44 +00:00
gdeepti
cc815b69c1 Assembler changes for enabling GrowHeap in Wasm
- New RelocInfo mode WASM_MEMORY_REFERENCE as a marker for wasm code objects that need to be relocated on a heap change
 - RelocInfo mode recorded for immediates that use the memory buffer as base
 - Tests to verify address patching works

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34831}
2016-03-16 17:11:42 +00:00
ishell
689980f7d4 [crankshaft] Fixing ES6 tail call elimination.
In case when F inlined normal call to G which tail calls H we should not write translation for G for the tail call site.
Otherwise we will see G in a stack trace inside H.

This CL also enables all existing tests related to ES6 tail call elimination.

TBR=bmeurer@chromium.org
BUG=v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34830}
2016-03-16 17:06:41 +00:00
littledan
f9db79ebdb Ship ES2015 restrictions on function declaration locations
Function declarations were previously permitted by V8 in many locations
which no ECMAScript specification allowed; the ECMAScript 2015 spec
enumerates a few locations (in blocks, as well as after labels and in
conditionals when in sloppy mode). This patch ships the flag to restrict
the usage of function declarations to those contexts.

R=adamk
LOG=Y
BUG=v8:4824
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#34828}
2016-03-16 16:39:23 +00:00
mythria
2fefc4827e [Interpreter] Pops the context to the correct level on return.
We need to pop the context to correct level on return as well. This was incorrectly
removed in this cl: https://codereview.chromium.org/1768123002/. For example
when we have a try-catch-finally block and catch does a return, the return
does not happen immediately. It should execute finally block before it
returns. Return statement should pop the context to the correct level as
expected by finally block.

BUG=594369,v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34822}
2016-03-16 15:52:53 +00:00
mbrandy
eb0a2324a1 PPC: [wasm] Int64Lowering of Int64Sub.
Port 33c08596e1

Original commit message:
    Int64Sub is lowered to a new turbofan operator, Int32SubPair. The new
    operator takes 4 inputs an generates 2 outputs. The inputs are the low
    word of the left input, high word of the left input, the low word of the
    right input, and high word of the right input. The ouputs are the low
    and high word of the result of the subtraction.

    The implementation is very similar to the implementation of Int64Add.

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

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

Cr-Commit-Position: refs/heads/master@{#34821}
2016-03-16 15:26:25 +00:00
yangguo
4513e07787 Reland of Allow Math.random to be called when creating a custom startup snapshot. (patchset #1 id:1 of https://codereview.chromium.org/1798863003/ )
Reason for revert:
This seems not to change performance.

Original issue's description:
> Revert of Allow Math.random to be called when creating a custom startup snapshot. (patchset #2 id:20001 of https://codereview.chromium.org/1780173002/ )
>
> Reason for revert:
> Regresses performance on base64 benchmark.
>
> Original issue's description:
> > Allow Math.random to be called when creating a custom startup snapshot.
> >
> > R=jkummerow@chromium.org
> > BUG=v8:4810
> > LOG=N
> >
> > Committed: https://crrev.com/6a7ec6a3bf779cdd41c66a768fd7a37195ed7b7f
> > Cr-Commit-Position: refs/heads/master@{#34705}
>
> TBR=jkummerow@chromium.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=v8:4810, chromium:594484
> LOG=N
>
> Committed: https://crrev.com/b7be51cd33bc81d768dbf5632ba0c68843448e37
> Cr-Commit-Position: refs/heads/master@{#34739}

TBR=jkummerow@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=v8:4810, chromium:594484
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34820}
2016-03-16 15:03:05 +00:00
rmcilroy
18109232c1 [Interpreter] Add bytecode generator expectations for super calls.
BUG=v8:4682
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34819}
2016-03-16 14:42:55 +00:00
machenbach
0485d53806 [test] Mark slow test.
TBR=jkummerow@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34815}
2016-03-16 13:37:14 +00:00
neis
19e7f82902 [test262] Remove more entries referring to non-existent files.
R=littledan@chromium.org
BUG=v8:3455
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34814}
2016-03-16 13:37:13 +00:00
zhengxing.li
43f65e89f2 X87: Change the test case for X87 Run_WasmF32SConvertI64/Run_WasmF64SConvertI64.
The CL #34701 (https://codereview.chromium.org/1779123002/) added the Run_WasmF32SConvertI64/Run_WasmF64SConvertI64 test cases and X87 failed at them.

  The reason is same as the CL #33630 (Issue 1649323002: X87: Change the test case for X87 RunRoundInt32ToFloat32), please refer: https://codereview.chromium.org/1649323002.

  Here is the key comments from CL #33630:
  Some new test cases use CheckFloatEq(...) and CheckDoubleEq(...) function for result check. When GCC compiling the CheckFloatEq() and CheckDoubleEq() function,
  those inlined functions has different behavior comparing with GCC ia32 build and x87 build.
  The major difference is sse float register still has single precision rounding semantic. While X87 register has no such rounding precsion semantic when directly use register value.
  The V8 turbofan JITTed has exactly same result in both X87 and IA32 port.

  For CHECK_EQ(a, b) function, if a and b are double or float, it will has similar behaviors like CheckFloatEq(...) and CheckDoubleEq(...) function when compiled by GCC and causes the test case fail.

  So we add the following sentence to do type case to keep the same precision for Run_WasmF32SConvertI64/Run_WasmF64SConvertI64. Such as: volatile double expect = static_cast<float>(*i).

  ahaas put those codes in CHECK_FLOAT_EQ and CHECK_DOUBLE_EQ macros in CL #34534 (https://codereview.chromium.org/1773513002 ).

  So this CL replaced the CHECK_EQ in Run_WasmF32SConvertI64/Run_WasmF64SConvertI64 to CHECK_FLOAT_EQ/CHECK_DOUBLE_EQ for x87 can pass Run_WasmF32SConvertI64/Run_WasmF64SConvertI64 tests.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34813}
2016-03-16 13:14:21 +00:00
ahaas
7f19628a5b [wasm] Int64Lowering of Word64Ctz.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34811}
2016-03-16 12:16:00 +00:00
ahaas
5c16cac96d [wasm] Int64Lowering of Word64Clz.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34809}
2016-03-16 11:03:07 +00:00
ahaas
33c08596e1 [wasm] Int64Lowering of Int64Sub on ia32 and arm.
Int64Sub is lowered to a new turbofan operator, Int32SubPair. The new
operator takes 4 inputs an generates 2 outputs. The inputs are the low
word of the left input, high word of the left input, the low word of the
right input, and high word of the right input. The ouputs are the low
and high word of the result of the subtraction.

The implementation is very similar to the implementation of Int64Add.

@v8-arm-ports: please take a careful look at the implementation of sbc
in the simulator.

R=titzer@chromium.org, v8-arm-ports@googlegroups.com

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

Cr-Commit-Position: refs/heads/master@{#34808}
2016-03-16 10:58:05 +00:00
jkummerow
84dd29bb3c Fix polymorphic keyed load handler selection for string elements
The monomorphic case already carefully ensures that we don't try to use
a regular elements load stub on string wrapper elements. The polymorphic
path must perform an equivalent check.

BUG=chromium:594955
LOG=n
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34807}
2016-03-16 10:56:16 +00:00
machenbach
7f363d5d47 [test] Remove feature to mark flaky tests.
The feature was removed from the bots a while ago. It was
superseeded by the flaky-test detection which reruns tests.

Remaining tests still marked as flaky most certainly pass
since a while.

Referencing all the bugs whose expectations lines get
removed by this.

BUG=v8:3838,v8:3525,v8:3125
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34804}
2016-03-16 07:35:47 +00:00
zhengxing.li
7e66b57acb X87: [wasm] Int64Lowering of Int64Add on ia32 and arm.
port 1b23079936 (r34747)

  original commit message:
  Int64Add is lowered to a new turbofan operator, Int32AddPair. The new
  operator takes 4 inputs an generates 2 outputs. The inputs are the low
  word of the left input, high word of the left input, the low word of the
  right input, and high word of the right input. The ouputs are the low
  and high word of the result of the addition.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34803}
2016-03-16 03:14:25 +00:00
adamk
108efd7f54 Remove Scope::scope_contains_with_ bit
This part of Scope has existed since V8's initial check in, but from what
I can tell it's not required to implement "with". The only tests that
depend upon it are tests of the debugger and the Scope mirrors, but the
resulting test behavior after removing the bit still seems perfectly
reasonable to me. In fact, with the included fix for scope name collection,
the scope mirror is actually improved with this change.

As a bi-product, this fixes the attached bug, about the contains_with
bit having inconsistent values in some arrow function compilation
scenarios.

BUG=chromium:592353
LOG=n
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#34802}
2016-03-15 22:41:59 +00:00
littledan
80b1b2a45b Put RegExp js code in strict mode
src/js/regexp.js was one of the few files that was left in sloppy
mode. The ES2017 draft specification requires that writes to
lastIndex throw when the property is non-writable, and test262
tests enforce this behavior. This patch puts that file in strict
mode.

BUG=v8:4504
R=yangguo@chromium.org
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34801}
2016-03-15 22:27:09 +00:00
cbruni
96a2bd8ae8 [builtins] Fix Array.prototype.concat bug
Array.prototype.concat did not work correct with complex elements on the
receiver or the prototype chain.

BUG=chromium:594574
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#34798}
2016-03-15 20:29:28 +00:00
jyan
3b5e84ab0e S390: Initial test changes and files checkin.
R=danno@chromium.org,jkummerow@chromium.org,jochen@chromium.org,joransiu@ca.ibm.com,michael_dawson@ca.ibm.com,mbrandy@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34795}
2016-03-15 18:09:36 +00:00
mythria
c838363251 [Interpreter] Updates InlineTwice in test-run-inlining to match other tests.
Updates InlineTwice to declare a function and then return a function
instead of using function expressions by wrapping a function with '('
and ')'. The earlier implementation would cause the function to
compile immediately instead of lazy compile. Also updates cctest.status

BUG=v8:4280,v8:4837,v8:4680
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34790}
2016-03-15 14:28:57 +00:00
jyan
6b503884ae S390: Check in OWNER file on to s390 directory
R=danno@chromium.org,jkummerow@chromium.org,jochen@chromium.org,joransiu@ca.ibm.com,michael_dawson@ca.ibm.com,mbrandy@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34789}
2016-03-15 14:25:38 +00:00
rmcilroy
6cfa6c7108 [Interpreter] Add two skips back for a flaky test and failure on msan.
BUG=v8:4680
LOG=N
TBR=machenbach@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34788}
2016-03-15 13:21:04 +00:00
ahaas
ccbf004293 [wasm] Int64Lowering of F64ReinterpretI64.
The implementation is done by storing to and then loading from memory.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34785}
2016-03-15 12:46:51 +00:00
ahaas
b484cc12f3 [wasm] Int64Lowering of I64ReinterpretF64.
The implementation is done by storing to and loading from memory.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34784}
2016-03-15 12:18:12 +00:00
ahaas
3a2cc90cb4 [wasm] Turn off tests for mips and x87.
The tests require the implementation of Int32PairAdd and Word32PairShl.

R=titzer@chromium.org, v8-mips-ports@googlegroups.com

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

Cr-Commit-Position: refs/heads/master@{#34782}
2016-03-15 11:04:47 +00:00
yangguo
d0d73999a1 [interpreter, debugger] fix remaining cctest failures.
R=rmcilroy@chromium.org, vogelheim@chromium.org
BUG=v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34781}
2016-03-15 11:01:09 +00:00
ishell
2ee59e5e28 [turbofan] Fix double object allocation when inlining a construct call of a derived class or an Api function.
Review URL: https://codereview.chromium.org/1798373002

Cr-Commit-Position: refs/heads/master@{#34780}
2016-03-15 11:01:08 +00:00
ahaas
2e6f3e8607 [wasm] Int64Lowering of Word64Popcnt.
Word64Popcnt is lowered to Word32Popcnt(low-word) + Word32Popcnt(high_word).
Since the optional Word64Popcnt operator does not exist on 32 bit platforms,
I introduced a new operator "Word64PopcntPlaceholder" which is generated
in the WasmCompiler and then lowered in the Int64Lowering.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34777}
2016-03-15 10:42:08 +00:00
machenbach
ecc70d69d4 [Ignition] Skip tests.
BUG=v8:4280
LOG=n
TBR=rmcilroy@chromium.org, mstarzinger@chromium.org
NOTRY=true
NOPRESUBMIT=true

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

Cr-Commit-Position: refs/heads/master@{#34774}
2016-03-15 10:25:42 +00:00
machenbach
1f33d80292 [Ignition] Skip tests.
BUG=v8:4280
LOG=n
TBR=rmcilroy@chromium.org, mstarzinger@chromium.org
NOTRY=true
NOPRESUBMIT=true

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

Cr-Commit-Position: refs/heads/master@{#34773}
2016-03-15 10:05:14 +00:00
machenbach
6d44d1db66 [Ignition] Skip tests.
BUG=v8:4280
LOG=n
TBR=rmcilroy@chromium.org, mstarzinger@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34772}
2016-03-15 09:27:45 +00:00
yangguo
3c1dc424d3 [ignition, debugger] correctly set position for return with elided bytecode.
We may not emit bytecode for the evaluation of the to-be-returned
expression. In that case we cannot set two return positions for a return
statement (one before and one after the expression evaluation). This
sets the interpreter apart from full-codegen.

Make sure that we always have the second of the two return positions.

Note that we end up with separate test cases for ignition and FCG.

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

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

Cr-Commit-Position: refs/heads/master@{#34771}
2016-03-15 08:28:03 +00:00
ahaas
049341f054 [wasm] Implementation of Word32PairShr and Word32PairSar on arm.
Implementation of https://codereview.chromium.org/1768233002 on arm.

R=titzer@chromium.org, v8-arm-ports@googlegroups.com

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

Cr-Commit-Position: refs/heads/master@{#34769}
2016-03-15 07:17:38 +00:00
ahaas
29e0e8e9e3 [wasm] Int64Lowering of I64Div and I64Rem.
On 32-bit systems these instructions are compiled to calls to
C functions. The TF node for the function call is already generated in
the wasm compiler, the lowering of the I64 parameters is done in the
Int64Lowering. We use the return value of the C function to determine
whether the calculation should trap or not.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34768}
2016-03-15 06:52:53 +00:00
ahaas
c4c34eba30 [wasm] Int64Lowering: changing to DFS.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34767}
2016-03-15 06:27:00 +00:00
adamk
5a202cce6e Remove --harmony-modules flag and let embedder decide when modules are used
Modules already have a separate entrypoint into the engine (at the moment,
this is v8::ScriptCompiler::CompileModule, though that will change to
something like ParseModule). This meant that requiring a commandline flag
simply added an extra complexity burden on embedders. By removing the v8
flag, this lets embedders use their own flagging mechanism (such as d8's
"--module", or Blink's RuntimeEnabledFeatures) to control whether
modules are to be used.

Also remove old modules tests that were being skipped (since they test
very old, pre-ES2015 modules syntax).

R=littledan@chromium.org
BUG=v8:1569, chromium:594639
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#34764}
2016-03-15 00:45:00 +00:00
littledan
f3568ca400 Make test262 test runner check for which exception is thrown
test262 "negative" test expectations list which exception is thrown. The ES2017
draft specification is very specific about which exception class is thrown
from which path, and V8 works hard to be correct with respect to that spec.

Previously, the test262 test runner would accept any nonzero status code,
such as from a crash, or a FAIL printed out, for a negative test. This
patch makes negative tests check for the right answer using a quick-and-dirty
parsing of the exception printing from d8 to find the exception class.
It invokes d8 in a way to get a status code of 0 from thrown exceptions
so that 'negative' tests aren't actually implemented by negating the output.

Amazingly, this didn't catch any test262 failures, but I verified the extra
checking interactively by changing a negative test to expect a different type
and saw it fail.

BUG=v8:4803
R=machenbach
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34763}
2016-03-14 21:20:37 +00:00
yangguo
bae3efface [serializer] add options to compile eagerly and pre-age for code cache.
R=vogelheim@chromium.org
BUG=chromium:594551
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34761}
2016-03-14 18:57:04 +00:00
mstarzinger
27a9009a7c [interpreter] Fix label binding for unreached labels.
This fixes the label binding mechanism that forwards a label to another
already bound target label. For source labels that are not being reached
by a jump, we should not try to patch jump sites. We still bind the
source label to reflect the target position though, just in case this
binding method will be used for backwards branches in the future.

R=rmcilroy@chromium.org
TEST=webkit/fast/js/parser-syntax-check

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

Cr-Commit-Position: refs/heads/master@{#34759}
2016-03-14 18:29:11 +00:00
titzer
ad91d1c6ca [wasm] Add I64Eqz operator.
R=ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34757}
2016-03-14 17:55:22 +00:00
bradnelson
ace6f1364a Fixing +fround(x) in asm typer.
The rules for handling foreign functions were interfering with handling
of standard functions (such as fround).

Adding more tests around abs()

BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203
TEST=test-asm-validator,asm-wasm
R=titzer@chromium.org,rossberg@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34756}
2016-03-14 17:29:25 +00:00
ahaas
2ddfe43a44 [wasm] Fixed register allocation for Word32PairShl on arm.
The previous register allocation allowed invalid register aliasing in
cases where in the TF graph the node was used for multiple inputs of the
Word32PairShl node.

Additionally I renamed PairLsl to LslPair in the code generation for
consistency.

R=titzer@chromium.org, v8-arm-ports@googlegroups.com

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

Cr-Commit-Position: refs/heads/master@{#34755}
2016-03-14 17:24:10 +00:00
caitpotter88
3088979d5c [runtime] fix getting element keys from SLOW_SLOPPY_ARGUMENTS_ELEMENTS
BUG=v8:4825
LOG=N
R=jkummerow@chromium.org, cbruni@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34754}
2016-03-14 17:10:50 +00:00
mstarzinger
a02b7aaa6d [testing] Move the last JS tests out of "preparser".
This moves the last remaining JS file based tests out of the "preparser"
suite. The tests in question all are expected to parse normally and not
throw any exception. This also deprecates the ability of the test suite
to run anything else outside Python templated tests.

R=adamk@chromium.org
TEST=preparser

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

Cr-Commit-Position: refs/heads/master@{#34753}
2016-03-14 17:10:49 +00:00
mstarzinger
51a22bdabc [testing] Extend interpreter testing to webkit suite.
This also runs the webkit test suite against Ignition. By now most of
the tests pass, the failing ones have been blacklisted.

R=machenbach@chromium.org
TEST=webkit

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

Cr-Commit-Position: refs/heads/master@{#34749}
2016-03-14 16:12:50 +00:00
ahaas
1b23079936 [wasm] Int64Lowering of Int64Add on ia32 and arm.
Int64Add is lowered to a new turbofan operator, Int32AddPair. The new
operator takes 4 inputs an generates 2 outputs. The inputs are the low
word of the left input, high word of the left input, the low word of the
right input, and high word of the right input. The ouputs are the low
and high word of the result of the addition.

R=titzer@chromium.org, v8-arm-ports@googlegroups.com

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

Cr-Commit-Position: refs/heads/master@{#34747}
2016-03-14 15:34:19 +00:00
martyn.capewell
2cd9877b6d [turbofan] ARM: Reduce out-of-line NaN code size
Reduce the amount of code generated for OutOfLineLoadFloat* by computing
sqrt(-1) rather than move the NaN as an immediate. Add support for single
precision floating point immediate moves to enable this.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34746}
2016-03-14 15:31:04 +00:00
verwaest
d358357478 Replace PushIfAbsent by a Stack object
This significantly speeds up String(array).
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34745}
2016-03-14 14:45:03 +00:00
hpayer
ad51e8b1e8 [heap] Black allocation.
When black allocation is active, all objects allocated in old space are allocated black. Important: With that change, you cannot assume anymore that new objects are white right after their allocation. Currently, black allocation is enabled when incremental marking is started.

This feature can be turned off via flag: --noblack-allocation

BUG=chromium:561449
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34743}
2016-03-14 14:03:01 +00:00
titzer
4233050f77 [wasm] Refactor tests for i64.
Move all tests that use i64 values into test-run-wasm-64.cc. Introduce
macros that enable tests as they are implemented on 32 bit platforms.

R=ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34742}
2016-03-14 13:24:36 +00:00
yangguo
b7be51cd33 Revert of Allow Math.random to be called when creating a custom startup snapshot. (patchset #2 id:20001 of https://codereview.chromium.org/1780173002/ )
Reason for revert:
Regresses performance on base64 benchmark.

Original issue's description:
> Allow Math.random to be called when creating a custom startup snapshot.
>
> R=jkummerow@chromium.org
> BUG=v8:4810
> LOG=N
>
> Committed: https://crrev.com/6a7ec6a3bf779cdd41c66a768fd7a37195ed7b7f
> Cr-Commit-Position: refs/heads/master@{#34705}

TBR=jkummerow@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=v8:4810, chromium:594484
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34739}
2016-03-14 10:27:19 +00:00
ahaas
d57d14b978 [wasm] Int64Lowering of I64XConvertFXX instructions.
On 32-bit systems I64XConvertFXX instructions are compiled to calls to
C functions. The TF node for the function call is already generated in
the wasm compiler, the lowering of the I64 parameter is done in the
Int64Lowering. We use the return value of the C function to determine
whether the conversion should trap or not.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34738}
2016-03-14 10:14:18 +00:00
jarin
4d4bd54f0a [turbofan] Fix operand calculation for constant materialization from frame.
BUG=chromium:582702
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34736}
2016-03-13 20:21:41 +00:00
littledan
0e3bd2758f Improve test262.status
This patch removes some [PASS, FAIL_OK] lines which consistently pass,
and it declares some tests to be test bugs as appropriate.

R=adamk

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

Cr-Commit-Position: refs/heads/master@{#34733}
2016-03-11 18:58:40 +00:00
adamk
b16fc86389 Remove --harmony-tostring runtime flag
ES2015 Object.prototype.toString semantics were enabled in version 4.9,
which has been in stable Chrome for nearly two weeks at this point.

R=littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34732}
2016-03-11 18:20:48 +00:00
titzer
90eb63418b [wasm] Fix OpcodeLength() calculation.
R=bradnelson@chromium.org,binji@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34730}
2016-03-11 18:02:19 +00:00
mythria
d1e3b72ede [Interpreter] Fixes cctest/test-serialize/SerializeInternalReference for ignition.
Updates cctest.status and also updates the test
cctest/test-serialize/SerializeInternalReference to return success when
FLAG_ignition is true. This test tests for internal references and is not
relevant for interpreter.

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

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

Cr-Commit-Position: refs/heads/master@{#34723}
2016-03-11 13:35:49 +00:00
neis
f06f49c852 Adapt membrane example to ES6 proxies.
R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34720}
2016-03-11 13:10:17 +00:00
vogelheim
de4f3d3eff Fix expression positions for for-loops.
FullCodegen generates 2 statement positions for the loop init block, like so:

  for(var i = 0; i....
      ^   ^

This change removes the first of those, updates unit tests,
and removes text expectations for Ignition.

---
An alternative would be to emulate the existing behaviour in Ignition, but:
- The new behaviour seems more logical,
- Ignition generates no bytecodes for the 'var', meaning there is no code position to attach the break position to.

BUG=v8:4690
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34717}
2016-03-11 12:02:51 +00:00
ishell
690c7a854a [turbofan] Avoid dereferencing empty handle when inlining a tail call.
BUG=chromium:593697,v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34716}
2016-03-11 11:41:29 +00:00
mstarzinger
6a629ff7a9 [testing] Convert "non-alphanum" to be a "message" test.
This converts another test case that is expected to throw a TypeError
but no SyntaxError to have better test coverage (exact message is being
checked now).

R=machenbach@chromium.org
TEST=message,preparser

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

Cr-Commit-Position: refs/heads/master@{#34715}
2016-03-11 11:36:40 +00:00
mstarzinger
57ef4f4f3a [testing] Convert some "preparser" tests into "message".
This converts existing "preparser" tests that expect a certain exception
message to be produced into "message" tests. Thereby we get much better
coverage because the former test suite degraded by now to just check
whether each test case threw or not, the exception message was not being
checked at all.

This also deprecates the ability of "preparser" to specify that single
test cases based on JS files are expected to throw, "messages" is far
superior, use that test suite instead.

R=machenbach@chromium.org
TEST=message,preparser

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

Cr-Commit-Position: refs/heads/master@{#34713}
2016-03-11 11:00:12 +00:00
m0609.shim
c0aa9054ce Fix histogram timer to generate ProfViz compatible log.
After histrogram timer added time recaling functionality,
some events, e.g. parse, histogram timer generates event log ending with 'MicroSeconds'.

Since ProfViz can't recorgnize it, this patch cuts off 'MicroSeconds' postfix.

R=vogelheim@chromium.org, yangguo@chromium.org
BUG=chromium:
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34710}
2016-03-11 10:05:24 +00:00
mstarzinger
28634e574e [testing] Extend interpreter testing to message suite.
This also runs the message test suite against Ignition. By now most of
the source positions (and exception messages) are accurate, the failing
ones have been blacklisted.

R=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34708}
2016-03-11 08:46:38 +00:00
machenbach
0ca38a6df8 Revert of Replace PushIfAbsent by a Stack object and move StringBuilderJoin to JS (patchset #6 id:100001 of https://codereview.chromium.org/1775403008/ )
Reason for revert:
[Sheriff] This lets a gc stress test time out:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20gc%20stress/builds/2337/steps/Mjsunit%20%28flakes%29/logs/regress-542823

The test ran in <2sec before this. Please fix the test as well on a reland.

Original issue's description:
> Replace PushIfAbsent by a Stack object and move StringBuilderJoin to JS
>
> This significantly speeds up String(array).
> BUG=
>
> Committed: https://crrev.com/c91faa0b39b62025460eb9f8b578e20d88f3549e
> Cr-Commit-Position: refs/heads/master@{#34696}

TBR=cbruni@chromium.org,adamk@chromium.org,bmeurer@chromium.org,verwaest@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/1785003004

Cr-Commit-Position: refs/heads/master@{#34706}
2016-03-11 08:41:34 +00:00
yangguo
6a7ec6a3bf Allow Math.random to be called when creating a custom startup snapshot.
R=jkummerow@chromium.org
BUG=v8:4810
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34705}
2016-03-11 08:08:30 +00:00
yangguo
5be770b59f [regexp] extend property classes by unicode blocks.
R=littledan@chromium.org
BUG=v8:4810
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34702}
2016-03-11 07:20:09 +00:00
ahaas
0d3c78d118 [wasm] I'm adding the float-to-int64 tests again.
R=binji@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34701}
2016-03-11 07:10:22 +00:00
littledan
611add5255 Minor library function fixes for TypedArray spec compliance
- Make separate iterator functions for TypedArrays which do a type check
  (and in the future should check for detached TypedArrays)
- Share the toString method with Arrays

BUG=v8:4785
R=adamk
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34698}
2016-03-10 23:38:16 +00:00
verwaest
c91faa0b39 Replace PushIfAbsent by a Stack object and move StringBuilderJoin to JS
This significantly speeds up String(array).
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34696}
2016-03-10 23:24:24 +00:00
yangguo
aba76874db [regexp] support \p in character classes.
R=littledan@chromium.org
BUG=v8:4743
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34695}
2016-03-10 23:24:23 +00:00
littledan
d9c45337a4 Check that Promise subclasses have callable resolve/reject
This check is guaranteed by the Promise spec and tested by test262
tests. It only has to run for subclasses. This patch adds the check
to the Promise code.

BUG=v8:4633
R=adamk
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34693}
2016-03-10 23:22:31 +00:00
adamk
dea9559457 Remove destructuring and default arguments runtime flags
These flags have been on by default since version 4.9, which has been
in stable Chrome for over a week now, demonstrating that they're
here to stay.

Also moved the tests out of harmony/ and into es6/.

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

Cr-Commit-Position: refs/heads/master@{#34692}
2016-03-10 23:22:30 +00:00
neis
cd6a5a45ad Fix corner case in iterator finalization for array destructuring.
The comment was correct but the code didn't match :(
Must not close when .value throws.

R=adamk@chromium.org
BUG=v8:3566
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34691}
2016-03-10 19:13:48 +00:00
neis
57a1897c7d [test262] Remove entry on non-existent test from status file.
R=littledan@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34690}
2016-03-10 18:58:11 +00:00
kozyatinskiy
63f35c26d6 [debugger] Removed unused GetStepInPositions method
This method was added as part of DevTools experiment.
Experiment UI was removed in https://codereview.chromium.org/201293007 2 years ago.
Experiment backend was removed in https://codereview.chromium.org/1785533002/.

R=yangguo@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34688}
2016-03-10 18:12:47 +00:00
titzer
a42b24514e [wasm] GC should ignore unboxed stack parameters in WASM frames.
R=mstarzinger@chromium.org,bradnelson@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34682}
2016-03-10 15:14:56 +00:00
mstarzinger
5bd307fa72 [compiler] Sidestep the interpreter for generator literals.
This is because compiler.cc is awesome. There are cases where we do not
yet have a SharedFunctionInfo that can tell us whether we are compiling
a generator function, we query the FunctionLiteral instead.

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

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

Cr-Commit-Position: refs/heads/master@{#34677}
2016-03-10 14:35:40 +00:00
mstarzinger
855176533c [compiler] Sidestep optimizing of generator resumers.
This ensures our optimizing compilers as well as the interpreter are
never tasked with compiling the generator-resuming builtin methods. The
corresponding intrinsics for those methods are not supported and it is
not possible to provide a C++ reference implementation for them. We do
this by assigning builtin function ids to them that we can recognize
during the compiler dispatch.

Note that this also affects the interpreter, because methods having a
builtin function id assigned are not interpreted ({function_data} field
is overlapping). If this ever changes we can still do an early check in
the compiler dispatch (similar to the optimizing compilers) easily.

This applies to the following methods:
- Generator.prototype.next (calls Runtime_GeneratorNext).
- Generator.prototype.return (calls Runtime_GeneratorReturn).
- Generator.prototype.throw (calls Runtime_GeneratorThrow).

R=neis@chromium.org
BUG=v8:4681
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34675}
2016-03-10 14:07:10 +00:00
balazs.kilvady
04a735c7e7 MIPS: Improve Lsa/Dlsa implementations.
Make the low level assembler implementation exact and protected to disallow explicit usage.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34673}
2016-03-10 13:41:34 +00:00
mstarzinger
899105c0bc [compiler] Sidestep the interpreter for generator functions.
This ensures the interpreter is not tasked with compiling generator
functions. It currently does not support suspending activations at
yielding points, but we still want to be able to activate it for the
rest of JavaScript in the meantime.

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

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

Cr-Commit-Position: refs/heads/master@{#34672}
2016-03-10 13:21:51 +00:00
rossberg
4614c7caaf [strong] Remove all remainders of strong mode
R=mstarzinger@chromium.org,bmeurer@chromium.org,adamk@chromium.org
BUG=v8:3956
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34669}
2016-03-10 12:45:42 +00:00
jfb
abbdca947f wasm: use strings for section names
This will require an equivalent sexpr-wasm change.

See:
https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#high-level-structure

R=titzer@chromium.org, binji@chronium.org

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

Cr-Commit-Position: refs/heads/master@{#34668}
2016-03-10 12:37:19 +00:00
jacob.bramley
6b6236587d [arm] Basic simulation of msr and mrs.
Only CPSR_f is supported, and then only for the flags that we actually
simulate (NZCV). This isn't currently used, but will be useful for some
tests.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34662}
2016-03-10 11:39:04 +00:00
yangguo
fe92166111 [serializer] allow test-serialize/PartialSerializerCustomContext to optimize.
Previously, optimization has been disabled because of an assertion
failure, which requires the context to be linked into the weak native
context list of the heap.

R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34661}
2016-03-10 11:18:50 +00:00
machenbach
bc78ab674c [Ignition] Remove outdated test expectation.
BUG=v8:4680
LOG=n
NOTRY=true
TBR=rmcilroy@chromium.org
NOTREECHECKS=true
NOPRESUBMIT=true

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

Cr-Commit-Position: refs/heads/master@{#34659}
2016-03-10 10:54:18 +00:00
yangguo
a65edb8be6 Improve test-serialize test cases.
Changes include:
 - better test coverage for builds with snapshot
 - write snapshot blobs to buffer instead of test serialization files
 - renamed tests

R=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34657}
2016-03-10 09:58:26 +00:00
zhengxing.li
25279332c7 X87: [wasm] Int64Lowering of I64ShrU and I64ShrS on ia32.
port 240b7db9c7 (r34630)

  original commit message:
  I implemented I64ShrU and I64ShrS the same as I64Shl in https://codereview.chromium.org/1756863002

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34656}
2016-03-10 09:39:41 +00:00
neis
3062af70eb Implement iterator finalization in array destructuring.
We must close the iterator whenever the destructuring didn't exhaust it, unless an iterator operation (eg. next) threw.  We do this by wrapping the iterator use in a try-catch-finally similar to the desugaring of for-of.

This is behind --harmony-iterator-close.

R=adamk@chromium.org
BUG=v8:3566
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34654}
2016-03-10 09:34:36 +00:00
littledan
43adcd3c65 String.prototype[Symbol.iterator] does RequireObjectCoercible(this)
BUG=v8:4348
R=adamk
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34647}
2016-03-10 00:59:20 +00:00
titzer
4cb568ec5f [wasm] Encode function signatures, bodies, and names as separate sections.
R=binji@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34641}
2016-03-09 22:51:50 +00:00
adamk
c48c1736c7 Expose Array.prototype.values behind a flag and stage it
BUG=v8:4247
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#34640}
2016-03-09 22:47:03 +00:00
binji
29cd25be1d [Wasm] Move data segment data inline to the data segment section
BUG=
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34639}
2016-03-09 19:43:14 +00:00
yangguo
48f9c16184 [regexp] allow loose matching for property names.
As described in unicode database file PropertyValueAliases.txt

R=littledan@chromium.org
BUG=v8:4743
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34638}
2016-03-09 19:07:46 +00:00
binji
ca0dbaece0 [wasm] All strings are length-prefixed and inline
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34637}
2016-03-09 18:56:30 +00:00
littledan
ca5deb1ff8 Ensure appropriate bounds checking for Array subclass concat
When an Array subclass is used as the receiver for concat, or with
certain usages of @@species, the output that's constructed is of
a different type with new slow path logic. This slow path still
made references to elements, so it's important that bounds checking
for a too-long result still be done. This patch repairs that bounds
checking.

R=cbruni
LOG=Y
BUG=chromium:592340

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

Cr-Commit-Position: refs/heads/master@{#34636}
2016-03-09 18:54:44 +00:00
titzer
f99624a98e [wasm] Encode immediates to Load and Store as varint.
R=binji@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34635}
2016-03-09 18:54:43 +00:00
jkummerow
32b3d3e931 [arm/arm64][stubs] Fix d16-d31 preservation on stub failure
Reading the registers' values back from the FrameDescription
should use the same offset computation as storing them into it.
The offsets must also match what the deoptimizer expects, which
is rx at offset rx.code() * kDoubleSize, even if some registers
are not saved (leaving gaps).

BUG=v8:4800
LOG=n
R=danno@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34633}
2016-03-09 17:36:07 +00:00
ahaas
240b7db9c7 [wasm] Int64Lowering of I64ShrU and I64ShrS on ia32.
I implemented I64ShrU and I64ShrS the same as I64Shl in https://codereview.chromium.org/1756863002

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34630}
2016-03-09 16:38:43 +00:00
ahaas
d7ddd35c29 [wasm] Int64Lowering of I64XConvertI32.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34629}
2016-03-09 16:21:08 +00:00
yangguo
d1f68f776e [regexp] fix bogus assertion in CharacterRange constructor.
The CharacterRange constructor checks the input for validity. However,
CharacterRange::Singleton also uses the constructor and may have
kEndMarker as input, causing the check to fail.

The solution is to move the check to CharacterRange::Range and
consistently use it across the code base.

R=jkummerow@chromium.org
BUG=chromium:593282
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34626}
2016-03-09 15:55:38 +00:00
ishell
209eb337b1 Parallelize test/mjsunit/es6/tail-call-megatest.js in order to avoid timeouts on slow architectures.
Review URL: https://codereview.chromium.org/1778663004

Cr-Commit-Position: refs/heads/master@{#34622}
2016-03-09 14:08:57 +00:00
titzer
8e9c019bf2 [wasm] Memory is exported on the module.exports object.
R=ahaas@chromium.org,bradnelson@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34621}
2016-03-09 13:32:53 +00:00
Ilija.Pavlovic
b29846c283 MIPS: Tests for convert and truncate instructions.
Implementation new test cases for conversion instructions Cvt_s_uw,
Cvt_s_ul, Cvt_d_ul and truncate instructions Trunc_uw_s, Trunc_ul_s,
Trunc_ul_d, Trunc_l_d, Trunc_l_ud, Trunc_w_d.

TEST=cctest/test-macro-assembler-mips/cvt_s_w_Trunc_uw_s, others
     cctest/test-macro-assembler-mips64/Cvt_s_uw_Trunc_uw_s, others
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34618}
2016-03-09 12:44:23 +00:00
titzer
0974bf278c [wasm] Create a proper map for functions created from WASM.
R=verwaest@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34617}
2016-03-09 12:42:46 +00:00
jarin
69c84fe460 [turbofan] Fix deoptimization stack layout for fast literal comparisons.
BUG=chromium:592341
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34615}
2016-03-09 12:36:09 +00:00
caitpotter88
a8a0a62edb [js-perf-test] fixup error in JSTests.json
BUG=
LOG=N
NOTRY=true
R=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34611}
2016-03-09 11:58:00 +00:00
ishell
c29a4560bb [turbofan] [deoptimizer] Support inlining of ES6 tail calls.
In case when F was called with incompatible number of arguments (and therefore
the arguments adator frame was created), F inlines a tail call of G which then
deopts the deoptimizer should also remove the arguments adaptor frame for F.

This CL adds required machinery to the deoptimizer.

BUG=v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34610}
2016-03-09 11:35:37 +00:00
mythria
e260bd5356 [Interpreter] Fixes a bug when popping context to correct level on break/continue.
The current implementation does not consider the case when the context of
the control scope and the current context differ. It is possible that they are
different in some cases for example: with statements. This cl fixes this.

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

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

Cr-Commit-Position: refs/heads/master@{#34609}
2016-03-09 11:05:49 +00:00
bmeurer
679d9503cf [undetectable] Really get comparisons of document.all right now.
According to https://www.w3.org/TR/html5/obsolete.html#dom-document-all,
comparisons of document.all to other values such as strings or objects,
are unaffected. In fact document.all only gets special treatment in
comparisons with null or undefined according to HTML. Especially setting
the undetectable doesn't make two distinct JSReceivers equal.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34608}
2016-03-09 10:43:48 +00:00
jarin
9867a8a26e [turbofan] Fix register constraint for memory barrier.
After fixing the memory barrier for maps (https://codereview.chromium.org/1714513003), we are using a temp register for the map case. The temp register should not be aliased with the stored value (otherwise we perform the mem barrier check with a wrong value). This CL makes sure it is not aliased.

BUG=chromium:590074
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34607}
2016-03-09 09:39:51 +00:00
binji
78f6f838f0 [Wasm] Convert many of the fixed-size values to LEB128.
This CL modifies the following to be LEB128:
* Function table indices
* Import table signature indices
* Export table function indices
* Function signature param count
* br/br_if break depth
* br_table target count
* block/loop expression count

Still to do:
* Import/export names (LEB128 count + inline data)
* Data segments (LEB128 offset + size + inline data)
* Function header stuff (should seperate into function sig and body sections)
* Memory access alignment + offset (still discussing)

BUG=
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34603}
2016-03-08 22:56:18 +00:00
verwaest
fd40570419 Don't do any special normalization if a boilerplate contains function literals.
This mechanism was used to ensure that functions ended up as constants on the map of prototypes defined using object literals, e.g.,:

function.prototype = {
  method: function() { ... }
}

Nowadays we treat prototypes specially, and make all their functions constants when an object turns prototype. Hence this special custom code isn't necessary anymore.

This also affects boilerplates that do not become prototypes. Their functions will not be constants but fields instead. Calling their methods will slow down. However, multiple instances of the same boilerplate will stay monomorphic. We'll have to see what the impact is for such objects, but preliminary benchmarks do not show this as an important regression.

BUG=chromium:593008
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34602}
2016-03-08 22:13:49 +00:00
titzer
d61a0c5a4a [wasm] Support a two-level namespace for imports.
R=binji@chromium.org,dschuff@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34600}
2016-03-08 19:57:10 +00:00
littledan
3f8af30ee7 Ensure the @@species protector is updated for accessors
The initial species protector hooked into property declaration in an
incomplete place, and missed definitions of accessors. This patch repairs
them by calling out to update the protector from an additional location.

R=adamk
CC=verwaest,cbruni
BUG=v8:4093
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34599}
2016-03-08 19:55:28 +00:00
verwaest
7736102034 Add GetProperty/GetElement to JSReceiver and use it where possible
Also move GetProperty with string-name to JSReceiver

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34596}
2016-03-08 17:30:42 +00:00
zhengxing.li
8f506ac6a6 X87: [wasm] Int64Lowering of I64Shl on ia32.
port ddc626e1cf (r34546)

  original commit message:
  I64Shl is lowered to a new turbofan operator, WasmWord64Shl. The new
  operator takes 3 inputs, the low-word input, the high-word input, and
  the shift, and produces 2 output, the low-word output and the high-word
  output.

  At the moment I implemented the lowering only for ia32, but I think the
  CL is already big enough. I will add the other platforms in separate
  CLs.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34591}
2016-03-08 15:02:56 +00:00
titzer
5c1c98e829 [wasm] Rename _WASMEXP_ object to Wasm.
R=ahaas@chromium.org,binji@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34587}
2016-03-08 14:48:27 +00:00
ahaas
7634d1aac1 [wasm] Some cleanup in the Int64Lowering.
I removed some stale comments and added a missing unit test.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34586}
2016-03-08 14:12:40 +00:00
ahaas
4122df2615 [wasm] Use MachineOperatorBuilder::word() instead of kPointerSize to determine the word size.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34581}
2016-03-08 12:42:38 +00:00
mythria
01f603d2b2 [Interpreter] Fixes translation from bailout id to code offset.
BailoutId points to the next bytecode in the bytecode array. Code offset
is set to one less than the bail out id. This would point to the end of the
current instruction. Since we use it only for summarizing the frame and to
compute the source position, it should be safe to set it to the end of current
instruction.

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

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

Cr-Commit-Position: refs/heads/master@{#34580}
2016-03-08 12:09:11 +00:00
mstarzinger
46bd989a3a [compiler] Unify naming of methods in compiler API.
This is a pure refactoring and renaming of methods in the compiler API
with the goal to increase readability. Also the compiler API is moved to
the top of the file, as it is the central piece in that file.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34579}
2016-03-08 12:09:10 +00:00
neis
998a6e5b92 Fix completion value of empty catch block in the presence of destructuring.
R=adamk@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34575}
2016-03-08 09:36:18 +00:00
yangguo
5586ff666e [interpreter, debugger] add some missing statement positions.
R=rmcilroy@chromium.org, vogelheim@chromium.org
BUG=v8:4690
LOG=N

Committed: https://crrev.com/4a7722c9930a42ba0e8feeece286d74834211a7e
Cr-Commit-Position: refs/heads/master@{#34569}

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

Cr-Commit-Position: refs/heads/master@{#34573}
2016-03-08 09:09:15 +00:00
mstarzinger
2669224274 [compiler] Remove support for concurrent OSR.
R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34572}
2016-03-08 09:02:44 +00:00
yangguo
059c163695 Revert of [interpreter, debugger] add some missing statement positions. (patchset #1 id:1 of https://codereview.chromium.org/1770773002/ )
Reason for revert:
failing tests with ignition.

Original issue's description:
> [interpreter, debugger] add some missing statement positions.
>
> R=rmcilroy@chromium.org, vogelheim@chromium.org
> BUG=v8:4690
> LOG=N
>
> Committed: https://crrev.com/4a7722c9930a42ba0e8feeece286d74834211a7e
> Cr-Commit-Position: refs/heads/master@{#34569}

TBR=rmcilroy@chromium.org,vogelheim@chromium.org,mstarzinger@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4690

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

Cr-Commit-Position: refs/heads/master@{#34570}
2016-03-08 08:30:28 +00:00
yangguo
4a7722c993 [interpreter, debugger] add some missing statement positions.
R=rmcilroy@chromium.org, vogelheim@chromium.org
BUG=v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34569}
2016-03-08 07:53:02 +00:00
ishell
2aae579cf0 [turbofan] Further fixing ES6 tail call elimination in Turbofan.
In case when F tail calls G we should also remove the potential arguments adaptor frame for F.

This CL introduces two new machine instructions ArchTailCallCodeObjectFromJSFunction and ArchTailCallJSFunctionFromJSFunction which (unlike existing ArchTailCallCodeObject and ArchTailCallJSFunction) also drop arguments adaptor frame if it exists right before jumping to the target function.

BUG=v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34566}
2016-03-08 00:12:11 +00:00
titzer
56157fe819 [wasm] Allow Uint8Array in _WASMEXP_.instantiateModule()
R=dschuff@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34565}
2016-03-07 21:09:54 +00:00
titzer
835c5e6beb [wasm] Rework encoding of local declarations.
Local declarations were previously encoded as an optional set of
4 uint16 values as part of the function declaration. This CL
implements the current design of moving these declarations to
a list of pairs of (type, count) that is part of the body.

R=bradnelson@chromium.org,binji@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34564}
2016-03-07 21:05:15 +00:00
yangguo
13d18c0079 [regexp] extend property classes by script category.
R=littledan@chromium.org
BUG=v8:4743
LOG=N

Committed: https://crrev.com/22f6735ccbe2e341d341e61b9c38ce308b8da655
Cr-Commit-Position: refs/heads/master@{#34553}

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

Cr-Commit-Position: refs/heads/master@{#34562}
2016-03-07 20:10:55 +00:00
titzer
c38cd1698b [wasm] Use the JavaScript WasmModuleBuilder utility in JS tests.
R=ahaas@chromium.org,binji@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34559}
2016-03-07 19:34:29 +00:00
cbruni
065ae3dd5e [key-accumulator] Starting to reimplement the key-accumulator
Introducing the KeyAccumulator accidentally removed some crucial fast-paths.
This CL starts rewriting the KeyAccumulator, step-by-step introducing the
special cases again.

BUG=chromium:545503, v8:4758
LOG=y

Committed: https://crrev.com/9c61327ecb2ee41f34232632e0cac93202bae6b7
Cr-Commit-Position: refs/heads/master@{#34532}

Committed: https://crrev.com/b954c872aac60657b400079b7333216ea658dc8a
Cr-Commit-Position: refs/heads/master@{#34548}

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

Cr-Commit-Position: refs/heads/master@{#34558}
2016-03-07 19:25:50 +00:00
ahaas
5446dab6cb [turbofan] Implementation of Word32PairShl on arm.
Implementation of https://codereview.chromium.org/1756863002 on arm.

R=titzer@chromium.org, v8-arm-ports@googlegroups.com

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

Cr-Commit-Position: refs/heads/master@{#34557}
2016-03-07 18:47:11 +00:00
caitpotter88
705cb7fb70 [esnext] add microbenchmarks for Object.values(), Object.entries()
Add microbenchmark for these methods.
BUG=v8:4663
LOG=N
R=adamk@chromium.org, littledan@chrommium.org

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

Cr-Commit-Position: refs/heads/master@{#34556}
2016-03-07 18:47:10 +00:00
yangguo
7dc13c2a8c Revert of [regexp] extend property classes by script category. (patchset #1 id:1 of https://codereview.chromium.org/1774513002/ )
Reason for revert:
wrong noi18n expectations

Original issue's description:
> [regexp] extend property classes by script category.
>
> R=littledan@chromium.org
> BUG=v8:4743
> LOG=N
>
> Committed: https://crrev.com/22f6735ccbe2e341d341e61b9c38ce308b8da655
> Cr-Commit-Position: refs/heads/master@{#34553}

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

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

Cr-Commit-Position: refs/heads/master@{#34554}
2016-03-07 18:13:33 +00:00
yangguo
22f6735ccb [regexp] extend property classes by script category.
R=littledan@chromium.org
BUG=v8:4743
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34553}
2016-03-07 17:40:21 +00:00
cbruni
4fdf56448b Revert of [key-accumulator] Starting to reimplement the key-accumulator (patchset #15 id:280001 of https://codereview.chromium.org/1707743002/ )
Reason for revert:
gcmole again

Original issue's description:
> [key-accumulator] Starting to reimplement the key-accumulator
>
> Introducing the KeyAccumulator accidentally removed some crucial fast-paths.
> This CL starts rewriting the KeyAccumulator, step-by-step introducing the
> special cases again.
>
> BUG=chromium:545503, v8:4758
> LOG=y
>
> Committed: https://crrev.com/9c61327ecb2ee41f34232632e0cac93202bae6b7
> Cr-Commit-Position: refs/heads/master@{#34532}
>
> Committed: https://crrev.com/b954c872aac60657b400079b7333216ea658dc8a
> Cr-Commit-Position: refs/heads/master@{#34548}

TBR=verwaest@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:545503, v8:4758

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

Cr-Commit-Position: refs/heads/master@{#34551}
2016-03-07 16:37:59 +00:00
cbruni
b954c872aa [key-accumulator] Starting to reimplement the key-accumulator
Introducing the KeyAccumulator accidentally removed some crucial fast-paths.
This CL starts rewriting the KeyAccumulator, step-by-step introducing the
special cases again.

BUG=chromium:545503, v8:4758
LOG=y

Committed: https://crrev.com/9c61327ecb2ee41f34232632e0cac93202bae6b7
Cr-Commit-Position: refs/heads/master@{#34532}

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

Cr-Commit-Position: refs/heads/master@{#34548}
2016-03-07 16:13:03 +00:00
littledan
e99d292909 Base the right RegExp brand checks on Symbol.match
The ES2015 specification requires that String.prototype.startsWith,
String.prototype.endsWith and String.prototype.includes use the IsRegExp
internal algorithm to determine whether to throw a TypeError to prevent
a RegExp from being accidentally cast to a String for those methods.
That internal algorithm checks the presence/truthiness of Symbol.match
to make its determination. This patch switches the builtins to use
this correct test, rather than checking for the [[RegExpMatcher]]
internal slot as the builtins previously did.

R=yangguo

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

Cr-Commit-Position: refs/heads/master@{#34547}
2016-03-07 16:05:56 +00:00
ahaas
ddc626e1cf [wasm] Int64Lowering of I64Shl on ia32.
I64Shl is lowered to a new turbofan operator, WasmWord64Shl. The new
operator takes 3 inputs, the low-word input, the high-word input, and
the shift, and produces 2 output, the low-word output and the high-word
output.

At the moment I implemented the lowering only for ia32, but I think the
CL is already big enough. I will add the other platforms in separate
CLs.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34546}
2016-03-07 15:19:44 +00:00
mythria
b455e2b2a0 [Interpreter] Updated mjsunit.status
Updated mjsunit.status.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34545}
2016-03-07 15:13:03 +00:00
zhengxing.li
e906c9caef X87: Disable the test-run-profiler/Inlining test case for X87.
The CL #34376 (https://codereview.chromium.org/1740073002 ) added the Inlining test case and X87 failed at it.

  The reason is:
  For TEST(Inlining) test case, when level3 function is inlined, the key optimized crankshaft code will like below code normally:
  ............
  0x21d53b7f    63  ff571b         call [edi+0x1b]           <-----------  should call action() here
                    ;;; <@32,#27> lazy-bailout
                    ;;; <@36,#31> ---- B3 ----
                    ;;; <@37,#31> gap
  0x21d53b82    66  89c1           mov ecx,eax               <-----------  Both the inlined function’s pc_offset from DeoptimizationInputData and the pc_offset from sample stack points to here, the same pc address
  ............

  So the TEST(Inlining) test case can get the expected inlined code entry and pass..

  In fact, the exact code sequence should like the following in crankshaft:
  ............
  0x21d53b7f    63  ff571b         call [edi+0x1b]                 <-----------  should call action()
  0xxxxxxxxx    xxxx               GenerateBodyInstructionPost()   <-----------  the pc_offset from sample stack points to here
                    ;;; <@32,#27> lazy-bailout
                    ;;; <@36,#31> ---- B3 ----
                    ;;; <@37,#31> gap
  0x21d53b82    66  89c1           mov ecx,eax                     <-----------  the inlined function’s pc_offset from DeoptimizationInputData points to here.
  ............

  For most of architectures in V8, the GenerateBodyInstructionPost()  is empty, so both the inlined function’s pc_offset from DeoptimizationInputData and the pc_offset from sample stack points to  the same pc address .

  But if some architecture has special requirement and need to put some instruction after call instruction, the GenerateBodyInstructionPost() will do that work and generate instructions,  the inlined function’s pc_offset from DeoptimizationInputData and The pc_offset  from sample stack will points to  the different  pc address, the TEST(Inlining) test case can’t get the expected inlined code entry and failed.

  For all current architectures in v8, only x87 have this requirement.

  After communicated with Alexei Filippov <alph@chromium.org> in E-mail, we decided to disable the Inlining test case for x87 now and try to find a solution.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34544}
2016-03-07 14:57:06 +00:00
ishell
22938040fd [crankshaft] Support ES6 tail call elimination.
HInvokeFunction and HApplyArguments instructions now support tail calling.

Inlining of calls at tail position is not supported yet and therefore still disabled.

The tail-call-megatest was modified so that the usages of "arguments" object do not disable Crankshaft.

TBR=bmeurer@chromium.org
BUG=v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34542}
2016-03-07 14:34:48 +00:00
yangguo
9113402b53 [debugger] break at each initialization in a multiple var declaration.
R=rossberg@chromium.org
BUG=v8:4807
LOG=N

Committed: https://crrev.com/ee98147ea0d994bcfb0d14d43f490ee828d2426f
Cr-Commit-Position: refs/heads/master@{#34531}

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

Cr-Commit-Position: refs/heads/master@{#34540}
2016-03-07 13:41:18 +00:00
machenbach
c6dbb071a3 Revert of [debugger] break at each initialization in a multiple var declaration. (patchset #1 id:1 of https://codereview.chromium.org/1768973002/ )
Reason for revert:
[Sheriff] Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/5160

Original issue's description:
> [debugger] break at each initialization in a multiple var declaration.
>
> R=rossberg@chromium.org
> BUG=v8:4807
> LOG=N
>
> Committed: https://crrev.com/ee98147ea0d994bcfb0d14d43f490ee828d2426f
> Cr-Commit-Position: refs/heads/master@{#34531}

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

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

Cr-Commit-Position: refs/heads/master@{#34538}
2016-03-07 12:53:55 +00:00
cbruni
18db9af622 Revert of [key-accumulator] Starting to reimplement the key-accumulator (patchset #14 id:260001 of https://codereview.chromium.org/1707743002/ )
Reason for revert:
gcmole failure https://build.chromium.org/p/client.v8/builders/V8%20Linux/builds/8598

Original issue's description:
> [key-accumulator] Starting to reimplement the key-accumulator
>
> Introducing the KeyAccumulator accidentally removed some crucial fast-paths.
> This CL starts rewriting the KeyAccumulator, step-by-step introducing the
> special cases again.
>
> BUG=chromium:545503, v8:4758
> LOG=y
>
> Committed: https://crrev.com/9c61327ecb2ee41f34232632e0cac93202bae6b7
> Cr-Commit-Position: refs/heads/master@{#34532}

TBR=verwaest@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:545503, v8:4758

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

Cr-Commit-Position: refs/heads/master@{#34537}
2016-03-07 12:45:58 +00:00
ahaas
a5d4188849 x87: fix the use of CheckFloatEq and CheckDoubleEq in test.
Instead of using CheckFloatEq and CheckDoubleEq directly, I introduced
a macro which first stores the expected result in a volatile variable.

Here are some comments of previous CLs:

The reason is same as the CL #31808 (issue 1430943002, X87: Change the test case for X87 float operations), please refer: https://codereview.chromium.org/1430943002/.

  Here is the key comments from CL #31808
  Some new test cases use CheckFloatEq(...) and CheckDoubleEq(...) function for result check. When GCC compiling the CheckFloatEq() and CheckDoubleEq() function,
  those inlined functions has different behavior comparing with GCC ia32 build and x87 build.
  The major difference is sse float register still has single precision rounding semantic. While X87 register has no such rounding precsion semantic when directly use register value.
  The V8 turbofan JITTed has exactly same result in both X87 and IA32 port.

  So we add the following sentence to do type cast to keep the same precision for RunCallInt64ToFloat32/RunCallInt64ToFloat64. Such as: volatile double expect = static_cast<float>(*i).

R=titzer@chromium.org, weiliang.lin@intel.com

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

Cr-Commit-Position: refs/heads/master@{#34534}
2016-03-07 12:30:23 +00:00
cbruni
9c61327ecb [key-accumulator] Starting to reimplement the key-accumulator
Introducing the KeyAccumulator accidentally removed some crucial fast-paths.
This CL starts rewriting the KeyAccumulator, step-by-step introducing the
special cases again.

BUG=chromium:545503, v8:4758
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#34532}
2016-03-07 12:16:25 +00:00
yangguo
ee98147ea0 [debugger] break at each initialization in a multiple var declaration.
R=rossberg@chromium.org
BUG=v8:4807
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34531}
2016-03-07 12:00:16 +00:00
yangguo
f9d7c711af [regexp] Fix off-by-one in CharacterRange::Negate.
Character ranges starting at 1 are not correctly negated.

R=jkummerow@chromium.org
BUG=chromium:592343
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34528}
2016-03-07 11:00:01 +00:00
mythria
e06d57b05d [Interpreter] Removes TestNotEqualsStrict bytecode from interpreter.
TestNotEqualsStrict is converted to a TestEqualsStrict and logical not
by the parser. Also, CompareIC does not have an implementation for
TestNotEqualsStrict. Hence, removing this bytecode.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34527}
2016-03-07 10:50:44 +00:00
Ben L. Titzer
fc936302fd [wasm] One more fix to test-wasm-module-builder.js
TBR=machenbach@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34525}
2016-03-07 10:14:25 +00:00
Ben L. Titzer
f8e761c6fd [wasm] Fix stupid arguments.
TBR=machenbach@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34524}
2016-03-07 10:09:18 +00:00
machenbach
701e520b2b Reland of [wasm] Add a JavaScript utility to make it easier to build WASM modules from JavaScript. (patchset #1 id:1 of https://codereview.chromium.org/1768963002/ )
Reason for revert:
Fix landed in head.

Original issue's description:
> Revert of [wasm] Add a JavaScript utility to make it easier to build WASM modules from JavaScript. (patchset #1 id:1 of https://codereview.chromium.org/1774463002/ )
>
> Reason for revert:
> [Sheriff] Problem is not fixed:
> https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20shared/builds/8799
>
> Original issue's description:
> > [wasm] Add a JavaScript utility to make it easier to build WASM modules from JavaScript.
> >
> > This is a reland of https://codereview.chromium.org/1762203002/
> >
> > R=ahaas@chromium.org,binji@chromium.org,seththompson@chromium.org
> > BUG=
> >
> > Committed: https://crrev.com/aa5770805060a347c6b650634c736ba34ab61728
> > Cr-Commit-Position: refs/heads/master@{#34519}
>
> TBR=ahaas@chromium.org,binji@chromium.org,seththompson@chromium.org,titzer@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=

TBR=ahaas@chromium.org,binji@chromium.org,seththompson@chromium.org,titzer@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/1769863002

Cr-Commit-Position: refs/heads/master@{#34523}
2016-03-07 10:03:01 +00:00
machenbach
6242b3893d Revert of [wasm] Add a JavaScript utility to make it easier to build WASM modules from JavaScript. (patchset #1 id:1 of https://codereview.chromium.org/1774463002/ )
Reason for revert:
[Sheriff] Problem is not fixed:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20shared/builds/8799

Original issue's description:
> [wasm] Add a JavaScript utility to make it easier to build WASM modules from JavaScript.
>
> This is a reland of https://codereview.chromium.org/1762203002/
>
> R=ahaas@chromium.org,binji@chromium.org,seththompson@chromium.org
> BUG=
>
> Committed: https://crrev.com/aa5770805060a347c6b650634c736ba34ab61728
> Cr-Commit-Position: refs/heads/master@{#34519}

TBR=ahaas@chromium.org,binji@chromium.org,seththompson@chromium.org,titzer@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/1768963002

Cr-Commit-Position: refs/heads/master@{#34522}
2016-03-07 10:01:23 +00:00
Ben L. Titzer
79ebb2124d [wasm] Fix arguments in test-wasm-module-builder.cc
Cr-Commit-Position: refs/heads/master@{#34521}
2016-03-07 09:59:28 +00:00
titzer
aa57708050 [wasm] Add a JavaScript utility to make it easier to build WASM modules from JavaScript.
This is a reland of https://codereview.chromium.org/1762203002/

R=ahaas@chromium.org,binji@chromium.org,seththompson@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34519}
2016-03-07 09:46:37 +00:00
neis
f24dffea4c Get rid of the different kinds of yield in the AST & full-codegen.
Now there is just one kind, corresponding to what was called "initial" before.
Replacement for "suspend": when the parser sees a yield in JS code, it
will turn it into a Yield node but wrap its argument in an iterator result
object.  Replacement for "final": the parser simply inserts a return statement
instead.

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

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

Cr-Commit-Position: refs/heads/master@{#34515}
2016-03-06 09:20:12 +00:00
adamk
6479b01aff Revert of [wasm] Add a JavaScript utility to make it easier to build WASM modules from JavaScript. (patchset #2 id:20001 of https://codereview.chromium.org/1762203002/ )
Reason for revert:
New test test-wasm-module-builder fails on Linux - shared bot:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20shared/builds/8793

Original issue's description:
> [wasm] Add a JavaScript utility to make it easier to build WASM modules from JavaScript.
>
> R=binji@chromium.org,seththompson@chromium.org
> BUG=
>
> Committed: https://crrev.com/d130c6bdc6a424b068614592a0b79a34750af0fc
> Cr-Commit-Position: refs/heads/master@{#34513}

TBR=binji@chromium.org,seththompson@chromium.org,titzer@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/1771553002

Cr-Commit-Position: refs/heads/master@{#34514}
2016-03-05 02:21:20 +00:00
titzer
d130c6bdc6 [wasm] Add a JavaScript utility to make it easier to build WASM modules from JavaScript.
R=binji@chromium.org,seththompson@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34513}
2016-03-05 01:48:12 +00:00
titzer
bcfa400306 [wasm] Remove TableSwitch and replace with br_table.
R=rossberg@chromium.org,binji@chromium.org,bradnelson@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34511}
2016-03-04 23:49:09 +00:00
binji
af193e7534 [wasm] Update {i32,i64}.const to use signed leb128
Reland of https://codereview.chromium.org/1765673002

R=titzer@chromium.org
R=bradnelson@chromium.org
LOG=n
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34506}
2016-03-04 19:06:34 +00:00
mbrandy
9f8c21164c Additional fixes for external callback logging in profiler.
For platforms that use function descriptors (currently AIX and
PPC64BE), log an external callback's entrypoint address rather than
its function descriptor address.

R=jkummerow@chromium.org, michael_dawson@ca.ibm.com
TEST=cctest/test-cpu-profiler/JsNativeJsSample
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34505}
2016-03-04 18:57:30 +00:00
dgozman
9a1387f6a9 Introduce v8::MicrotasksScope.
This scope is used to control microtasks execution when MicrotasksPolicy::kScoped is engaged.

Attempt #2. First one was reverted due to chromium breakage: SetAutorunMicrotasks(false) was broken.

BUG=chromium:585949
LOG=Y
TEST=ScopedMicrotasks

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

Cr-Commit-Position: refs/heads/master@{#34504}
2016-03-04 17:42:17 +00:00
machenbach
12b196490f Revert of Reland "[api] Don't go to javascript to construct API functions" (patchset #1 id:1 of https://codereview.chromium.org/1756973002/ )
Reason for revert:
[Sheriff] Breaks blink tests. Please fix upstream first.
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/5125

Original issue's description:
> Reland "[api] Don't go to javascript to construct API functions"
>
> BUG=
> R=verwaest@chromium.org
>
> Committed: https://crrev.com/d5d4f0b80f585878130bffb40ff8e960646823d8
> Cr-Commit-Position: refs/heads/master@{#34496}

TBR=verwaest@chromium.org,bmeurer@chromium.org,jochen@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/1767663002

Cr-Commit-Position: refs/heads/master@{#34502}
2016-03-04 15:55:15 +00:00
neis
86c955fee0 Fix Array.prototype.sort on proxies.
BUG=chromium:591699
LOG=n
R=rossberg

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

Cr-Commit-Position: refs/heads/master@{#34498}
2016-03-04 14:43:52 +00:00
verwaest
433fd6c078 [runtime] Clean up symbol access in identity hash code
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34497}
2016-03-04 14:39:10 +00:00
jochen
d5d4f0b80f Reland "[api] Don't go to javascript to construct API functions"
BUG=
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34496}
2016-03-04 14:03:49 +00:00
verwaest
6fecd1795d [LookupIterator] Avoid additional descriptor lookup in TransitionToAccessorProperty
BUG=588893, 325923
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34493}
2016-03-04 12:19:03 +00:00
verwaest
683223b4ba Reland "Speed up the LookupIterator"
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34492}
2016-03-04 11:53:24 +00:00
ahaas
b1e345905a [wasm] Int64Lowering of FXXXConvertI64 instructions.
On 32-bit systems FXXXConvertI64 instructions are compiled to calls to
C functions. The TF node for the function call is already generated in
the wasm compiler, the lowering of the I64 parameter is done in the
Int64Lowering.

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

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

Cr-Commit-Position: refs/heads/master@{#34487}
2016-03-04 09:51:49 +00:00
bmeurer
5912e0f014 [compiler] Introduce code stubs for string relational comparisons.
Add StringLessThanStub, StringLessThanOrEqualStub, StringGreaterThanStub
and StringGreaterThanOrEqualStub, based on the CodeStubAssembler, and
hook them up with TurboFan (and Ignition). The stubs are currently
essentially comparable with the StringCompareStub, which is now
obsolete. We can later extend these stubs to cover more interesting
cases (i.e. two byte sequential string comparisons, etc.).

R=epertoso@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34485}
2016-03-04 09:39:30 +00:00
machenbach
ec0f451b64 Revert of [wasm] Update {i32,i64}.const to use signed leb128 (patchset #3 id:40001 of https://codereview.chromium.org/1765673002/ )
Reason for revert:
[Sheriff] Breaks chromium win compile:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Win/builds/3844/steps/compile/logs/stdio

Original issue's description:
> [wasm] Update {i32,i64}.const to use signed leb128
>
> R=titzer@chromium.org
> R=bradnelson@chromium.org
> LOG=n
>
> Committed: https://crrev.com/4b613a67e0aa4e073946f5f0dd95ee9366c8ca86
> Cr-Commit-Position: refs/heads/master@{#34471}

TBR=bradnelson@chromium.org,titzer@chromium.org,binji@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/1760363003

Cr-Commit-Position: refs/heads/master@{#34482}
2016-03-04 09:03:30 +00:00
machenbach
043345a621 Revert of Introduce v8::MicrotasksScope. (patchset #6 id:100001 of https://codereview.chromium.org/1741893003/ )
Reason for revert:
[Sheriff] Speculative. Seems to break a bunch of webkit tests and causes timeouts:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/5103

Please rebase upstream if intended.

Original issue's description:
> Introduce v8::MicrotasksScope.
>
> This scope is used to control microtasks execution when MicrotasksPolicy::kScoped is engaged.
>
> BUG=chromium:585949
> LOG=Y
> TEST=ScopedMicrotasks
>
> Committed: https://crrev.com/db77cec242dbdf8ee26da8232fa930270429f253
> Cr-Commit-Position: refs/heads/master@{#34472}

TBR=jochen@chromium.org,adamk@chromium.org,dgozman@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:585949

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

Cr-Commit-Position: refs/heads/master@{#34480}
2016-03-04 07:31:17 +00:00
bradnelson
56c0798a01 Disable zlib wasm embenchen for now, fails gc stress.
BUG=
TBR=titzer@chromium.org
LOG=N
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34477}
2016-03-04 05:53:29 +00:00
bradnelson
530cc16460 Handle stack frames differently inside and on the boundary of wasm.
Frames entering of inside wasm don't have a function or context argument.
Adding distinct wasm frame and function types to express this.

Fixes a GC issue on several embenchen wasm tests, reenabling them.

BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=mjsunit/wasm/embenchen
R=titzer@chromium.org,aseemgarg@chromium.org,jfb@chromium.org,yangguo@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34476}
2016-03-04 04:45:45 +00:00
adamk
edeaab7da0 Ship ES2015 Function.name reform
BUG=v8:3699, chromium:588803
LOG=y
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#34474}
2016-03-04 04:04:13 +00:00
dgozman
db77cec242 Introduce v8::MicrotasksScope.
This scope is used to control microtasks execution when MicrotasksPolicy::kScoped is engaged.

BUG=chromium:585949
LOG=Y
TEST=ScopedMicrotasks

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

Cr-Commit-Position: refs/heads/master@{#34472}
2016-03-04 04:02:37 +00:00
binji
4b613a67e0 [wasm] Update {i32,i64}.const to use signed leb128
R=titzer@chromium.org
R=bradnelson@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34471}
2016-03-04 00:12:45 +00:00
littledan
0e7f095c6d Restrict FunctionDeclarations in Statement position
ES2015 generally bans FunctionDeclarations in positions which expect a Statement,
as opposed to a StatementListItem, such as a FunctionDeclaration which constitutes
the body of a for loop. However, Annex B 3.2 and 3.4 make exceptions for labeled
function declarations and function declarations as the body of an if statement in
sloppy mode, in the latter case specifying that the semantics are as if the
function declaration occurred in a block. Chrome has historically permitted
further extensions, for the body of any flow control construct.

This patch addresses both the syntactic and semantic mismatches between V8 and
the spec. For the semantic mismatch, function declarations as the body of if
statements change from unconditionally hoisting in certain cases to acquiring
the sloppy mode function in block semantics (based on Annex B 3.3). For the
extra syntax permitted, this patch adds a flag,
--harmony-restrictive-declarations, which excludes disallowed function declaration
cases. A new UseCounter, LegacyFunctionDeclaration, is added to count how often
function declarations occur as the body of other constructs in sloppy mode. With
this patch, the code generally follows the form of the specification with respect
to parsing FunctionDeclarations, rather than allowing them in arbitrary Statement
positions, and makes it more clear where our extensions occur.

BUG=v8:4647
R=adamk
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34470}
2016-03-03 21:34:26 +00:00
adamk
045fa997b7 Handle ES2015 Function.name in CallSite::GetMethodName
CallSite depends on using the function name to get ahold of the property
name from which an exception was thrown. This fix properly handles the
ES2015 names for getters and setters. The new tests pass both with
--harmony-function-name off and on.

BUG=v8:3699
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34469}
2016-03-03 20:19:41 +00:00
bradnelson
fe6f290c87 Disable primes with asm->wasm as it fails under gc-stress.
BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=mjsunit/wasm/embenchen
R=titzer@chromium.org,aseemgarg@chromium.org
LOG=N
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34468}
2016-03-03 19:51:11 +00:00
alan.li
4c57e05d5f MIPS64: Fix 'Fix 'MIPS: use DAHI/DATH for li macro on mips64r6.''
This CL fixes the bugs caused by the following CL:
50a394d -- MIPS64: Fix 'MIPS: use DAHI/DATH for li macro on mips64r6.'
  Port 1f5b84e467
  MIPS: use DAHI/DATH for li macro on mips64r6.

LUI instruction would sign extend into higher 32bits, in that case we might need to use DAHI, DATI to overwrite the extension.

The bug will occur when we are loading some addresses such as 0x00007fffffffxxxx.

BUG=
TEST=test-run-native-calls/Run_Int32_Select_*, test-run-native-calls/Run_Int32_WeightedSum_*, test-run-native-calls/Run_Int32_WeightedSum_*, test-run-native-calls/Run_Int32_Select_*

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

Cr-Commit-Position: refs/heads/master@{#34467}
2016-03-03 18:55:02 +00:00
bradnelson
dbc0f99b94 Enabling some embenchen tests running through asm->wasm.
BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=mjsunit/asm-wasm
R=titzer@chromium.org,aseemgarg@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34466}
2016-03-03 18:53:05 +00:00
jfb
df269e6e54 WebAssembly: skip unknown sections, add names
Sets the code up so it'll be easier to have section names as strings instead of
hard-coded numbers. Using strings will require synchronizing with sexpr-wasm.

Mostly NFC (besides now skipping *all* unknown sections).

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34464}
2016-03-03 16:53:17 +00:00
caitpotter88
18b9c1ce70 [proxies] throw TypeError if is_callable Map bit is unset
Per ProxyCreate() (https://tc39.github.io/ecma262/#sec-proxycreate), a Proxy
is only given a [[Call]] slot if the target has a [[Call]] slot as well. This
was previously implemented correctly for [[Construct]], but not for [[Call]].

BUG=v8:4797, v8:4796, v8:1543
LOG=N
R=cbruni@chromium.org, neis@chromium.org, adamk@chromium.org, littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34461}
2016-03-03 15:23:05 +00:00
bmeurer
2689548e38 [compiler] Introduce StringEqualStub and StringNotEqualStub.
These new stubs perform exactly the same job as the string equality case
for the CompareIC, but are platform independent and usable outside of
fullcodegen and Crankshaft. We use them in the StrictEqualStub and the
StrictNotEqualStub instead of falling back to the runtime immediately
for String comparisons, and we also use them in TurboFan to perform
String equality or inequality comparisons.

These stubs currently handle only internalized and one byte strings w/o
going to C++, but it should be easy to add support for more string cases
later, i.e. utilizing already flattened cons strings or comparing two
byte strings as well.

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

Cr-Commit-Position: refs/heads/master@{#34459}
2016-03-03 10:18:49 +00:00
weiliang.lin
9d0cf920bd [wasm] add rotate opcodes
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34455}
2016-03-03 05:11:10 +00:00
bradnelson
4db99810da Add wasm internal opcodes for asm.js stdlib functions we're missing.
BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=mjsunit/asm-wasm
R=aseemgarg@chromium.org,titzer@chromium.org,yangguo@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34452}
2016-03-03 01:23:22 +00:00
bradnelson
f521e7e43e Reset isolate exceptions in libfuzzer wasm tests.
BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=wasm-fuzzer
R=titzer@chromium.org,kcc@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34451}
2016-03-03 00:05:03 +00:00