Commit Graph

392 Commits

Author SHA1 Message Date
bakkot
9bbba1441a Sloppy-mode function declarations in blocks are now hoisted appropriately.
In ES2016, function declarations nested in blocks are formally allowed. This was
never a part of ECMAScript, but was a common extension. Unfortunately
implementations differed in the exact semantics. Annex B.3.3 in the spec tries
to standardize the parts which are common to different implementations, but does
so with some fairly complicated semantics.

This CL addresses three issues related to annex B.3.3:
* When the outer function had a complex parameter list, no hoisting whatsoever was
  being performed.
* Hoisting was not blocked by parameters of the same name.
* Hoisting was not blocked by nested lexical declarations of the same name.

We had tests which checked for the second, but they were incorrectly passing due to
the first. This CL adds more complete tests.

BUG=v8:5151, v8:5111

Review-Url: https://codereview.chromium.org/2099623003
Cr-Commit-Position: refs/heads/master@{#37405}
2016-06-29 20:55:35 +00:00
neis
f96be554b9 Fix order of conversions in String.prototype.substr.
The start argument must be converted to an integer before the length argument is
converted.  (Consequently, the start argument is converted even when the length
is 0.)  This matters because conversion is observable.

Also rewrite the function in a way that closely resembles the spec text.

R=littledan@chromium.org
BUG=v8:5140

Review-Url: https://codereview.chromium.org/2109583002
Cr-Commit-Position: refs/heads/master@{#37378}
2016-06-29 09:53:48 +00:00
neis
40641fbc03 [regexp] Fix writing of lastIndex in JSRegExp::Initialize.
The lastIndex property must be written with the semantics of a strict [[Set]],
so an exception must be thrown when the attributes don't allow writing.  We used
to ignore the attributes.

R=littledan@chromium.org, yangguo@chromium.org
BUG=v8:5138

Review-Url: https://codereview.chromium.org/2109593002
Cr-Commit-Position: refs/heads/master@{#37369}
2016-06-29 08:48:03 +00:00
bakkot
e32d89ce86 Removes unused lines from the test262 status file after roll.
https://crrev.com/d3a95b8a78eefabf884a60bc3d6aac5830b44eb3
The removed tests are a mix of renamed files and tests which have been
removed after the spec was relaxed.

Also marks one test as a test262 failure rather than our failure.

Review-Url: https://codereview.chromium.org/2098833002
Cr-Commit-Position: refs/heads/master@{#37257}
2016-06-24 18:56:07 +00:00
machenbach
3f0ada1d84 Revert of Amends the TypedArray constructor to use the path for primitives for all (patchset #3 id:40001 of https://codereview.chromium.org/2096873002/ )
Reason for revert:
[Sheriff] Breaks layout tests. Please rebase upstream if intended:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/7691

Original issue's description:
> Amends the TypedArray constructor to use the path for primitives for all
> types of primitives, not just undefined, booleans, numbers, and strings.
> (The missing cases were null and Symbol.) This is required by the
> specification, and there are test262 tests which we were failing due to
> this bug.
>
> BUG=v8:5124
>
> Committed: https://crrev.com/f788bd9cce19815cba746e47bb65abfe25c16208
> Cr-Commit-Position: refs/heads/master@{#37234}

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

Review-Url: https://codereview.chromium.org/2091693004
Cr-Commit-Position: refs/heads/master@{#37236}
2016-06-24 06:34:26 +00:00
bakkot
f788bd9cce Amends the TypedArray constructor to use the path for primitives for all
types of primitives, not just undefined, booleans, numbers, and strings.
(The missing cases were null and Symbol.) This is required by the
specification, and there are test262 tests which we were failing due to
this bug.

BUG=v8:5124

Review-Url: https://codereview.chromium.org/2096873002
Cr-Commit-Position: refs/heads/master@{#37234}
2016-06-24 00:27:04 +00:00
bakkot
9f2a18b729 TypedArray.prototype.set uses internal length property, not real one.
TypedArrays store their true length in an internal slot. This is
normally reflected in the .length property, but that property is
configurable. Algorithms which need the length of a typed array are to
use the internal slot, not the property; TypedArray.prototype.set was
not doing this.

BUG=v8:5133

Review-Url: https://codereview.chromium.org/2091153002
Cr-Commit-Position: refs/heads/master@{#37232}
2016-06-23 23:00:24 +00:00
littledan
7fdbd6bf10 Reland of Test262 roll (patchset #1 id:1 of https://codereview.chromium.org/2094613004/ )
Reason for revert:
Reland fixing msan and tsan

Original issue's description:
> Revert of Test262 roll (patchset #15 id:280001 of https://codereview.chromium.org/2068263002/ )
>
> Reason for revert:
> Broke msan and tsan; need to add an extra skip
>
> Original issue's description:
> > Test262 roll
> >
> > This roll does not include a test harness change; infrastructure issues
> > still need to be worked out.
> >
> > Committed: https://crrev.com/d3a95b8a78eefabf884a60bc3d6aac5830b44eb3
> > Cr-Commit-Position: refs/heads/master@{#37225}
>
> TBR=adamk@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/8ea2cbea2e65dc506d50a25a81e610f37bc751ec
> Cr-Commit-Position: refs/heads/master@{#37226}

TBR=adamk@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/2097573003
Cr-Commit-Position: refs/heads/master@{#37227}
2016-06-23 19:34:46 +00:00
littledan
8ea2cbea2e Revert of Test262 roll (patchset #15 id:280001 of https://codereview.chromium.org/2068263002/ )
Reason for revert:
Broke msan and tsan; need to add an extra skip

Original issue's description:
> Test262 roll
>
> This roll does not include a test harness change; infrastructure issues
> still need to be worked out.
>
> Committed: https://crrev.com/d3a95b8a78eefabf884a60bc3d6aac5830b44eb3
> Cr-Commit-Position: refs/heads/master@{#37225}

TBR=adamk@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/2094613004
Cr-Commit-Position: refs/heads/master@{#37226}
2016-06-23 19:31:28 +00:00
littledan
d3a95b8a78 Test262 roll
This roll does not include a test harness change; infrastructure issues
still need to be worked out.

Review-Url: https://codereview.chromium.org/2068263002
Cr-Commit-Position: refs/heads/master@{#37225}
2016-06-23 18:41:50 +00:00
jwolfe
d8147eb98c Reland: change most cases of variable redeclaration from TypeError to SyntaxError.
Reland of https://codereview.chromium.org/2048703002/

Code like `let a; eval("var a;");` should throw a SyntaxError, not a TypeError
(this caused a test262 failure.). However, the code `eval("function NaN() {}");`
should actually throw a TypeError. This patch changes most cases of
redeclaration errors from TypeError to SyntaxError. See the test
mjsunit/regress/redeclaration-error-types for a thorough analysis with spec
references.

The relevant sections of the spec are ES#sec-globaldeclarationinstantiation and
ES#sec-evaldeclarationinstantiation

BUG=v8:4955
LOG=y
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
R=adamk

Review-Url: https://codereview.chromium.org/2086063002
Cr-Commit-Position: refs/heads/master@{#37156}
2016-06-21 20:19:59 +00:00
adamk
43a10a0c4a Disable Array.prototype.values
It still seems to break things in the wild, see attached Chromium
bug for details.

BUG=v8:4247, chromium:615873

Review-Url: https://codereview.chromium.org/2076763003
Cr-Commit-Position: refs/heads/master@{#37064}
2016-06-17 10:40:12 +00:00
littledan
85c2c8d847 Revert of change most cases of variable redeclaration from TypeError to SyntaxError (patchset #8 id:140001 of https://codereview.chromium.org/2048703002/ )
Reason for revert:
This is going to break the LayoutTest inspector-protocol/console/console-let-const-with-api.html as seen in https://build.chromium.org/p/tryserver.v8/builders/v8_linux_blink_rel/builds/2247 . Please run this test manually, using instructions at https://www.chromium.org/developers/testing/webkit-layout-tests , and fix on the Chrome side if needed before resubmitting this patch.

Original issue's description:
> change most cases of variable redeclaration from TypeError to SyntaxError.
>
> Code like `let a; eval("var a;");` should throw a SyntaxError, not a TypeError
> (this caused a test262 failure.). However, the code `eval("function NaN() {}");`
> should actually throw a TypeError. This patch changes most cases of
> redeclaration errors from TypeError to SyntaxError. See the test
> mjsunit/regress/redeclaration-error-types for a thorough analysis with spec
> references.
>
> The relevant sections of the spec are ES#sec-globaldeclarationinstantiation and
> ES#sec-evaldeclarationinstantiation
>
> BUG=v8:4955
> LOG=y
>
> Committed: https://crrev.com/2b787561763d0f7e8dab698652715a742cf78291
> Cr-Commit-Position: refs/heads/master@{#36940}

TBR=adamk@chromium.org,jwolfe@igalia.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4955

Review-Url: https://codereview.chromium.org/2064793002
Cr-Commit-Position: refs/heads/master@{#36941}
2016-06-13 18:23:57 +00:00
jwolfe
2b78756176 change most cases of variable redeclaration from TypeError to SyntaxError.
Code like `let a; eval("var a;");` should throw a SyntaxError, not a TypeError
(this caused a test262 failure.). However, the code `eval("function NaN() {}");`
should actually throw a TypeError. This patch changes most cases of
redeclaration errors from TypeError to SyntaxError. See the test
mjsunit/regress/redeclaration-error-types for a thorough analysis with spec
references.

The relevant sections of the spec are ES#sec-globaldeclarationinstantiation and
ES#sec-evaldeclarationinstantiation

BUG=v8:4955
LOG=y

Review-Url: https://codereview.chromium.org/2048703002
Cr-Commit-Position: refs/heads/master@{#36940}
2016-06-13 18:14:41 +00:00
gsathya
e681eea1f1 Parser: Desugar default derived constructor to spread/rest
This patch declares a new rest parameter for the derived constructor,
and passes it to base constructor after calling PrepareSpreadArguments.

This patch also updates the test262.status to account for
the now passing test.

BUG=v8:4890

Review-Url: https://codereview.chromium.org/2056993004
Cr-Commit-Position: refs/heads/master@{#36939}
2016-06-13 18:10:06 +00:00
machenbach
0d65554c05 [gn] Port test262 archiving to gn
This calls the action that archives test262 in gn. In gn
we can't specify an action output outside the product
directory. This works around it with an extra action
stamp file in the product directory, while the archive
remains in the test directory.

We don't want to generate the archive in the product
directory, as some legacy archiving scripts might include
it and it's too large. It should only be included in the
swarming tasks that are going to use it for testing.

BUG=chromium:474921

Review-Url: https://codereview.chromium.org/2034713005
Cr-Commit-Position: refs/heads/master@{#36731}
2016-06-06 08:56:58 +00:00
neis
f0c4de9696 [test] Remove obsolete status file entries.
R=rossberg@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2026543002
Cr-Commit-Position: refs/heads/master@{#36588}
2016-05-30 13:22:51 +00:00
adamk
e9435eb9a5 Remove broken source/code caching support for Modules in d8
The busted logic caused us to go down the SCRIPT path internally,
causing us to fail the test262 tests that attempt to induce parse
errors at the top level.

R=littledan@chromium.org
BUG=v8:4985

Review-Url: https://codereview.chromium.org/2008743002
Cr-Commit-Position: refs/heads/master@{#36563}
2016-05-27 19:22:52 +00:00
adamk
2f8948a587 [test262] Remove non-existent tests from status, relabel current paths
R=littledan@chromium.org
BUG=v8:4628

Review-Url: https://codereview.chromium.org/2017753002
Cr-Commit-Position: refs/heads/master@{#36559}
2016-05-27 18:45:46 +00:00
gsathya
91e2039df0 TypedArray: Make byteOffset, byteLength, and length configurable
Removes the DONT_DELETE enum bit from the properties to make them
configurable.

Also, updates the regress-typedarray-length test to --
- Check for true boolean return value on deletion of these
  properties.
- Check for undefined return value on trying to access these
  properties after deletion.

BUG=v8:4902
LOG=Y

Review-Url: https://codereview.chromium.org/2001393004
Cr-Commit-Position: refs/heads/master@{#36528}
2016-05-25 19:09:56 +00:00
adamk
d84dbc7125 Make %ThrowTypeError% function(s) strict
Bootstrapper previously created %ThrowTypeError% before the strict
function maps existed, so making that function strict required a small
amount of code reordering.

This fixes a few test262 tests, but we're still non-compliant due to the
fact that we have two functions instead of one (see issue 4034).

BUG=v8:4925
LOG=y

Review-Url: https://codereview.chromium.org/2006733004
Cr-Commit-Position: refs/heads/master@{#36526}
2016-05-25 17:03:18 +00:00
adamk
36275367da Reorder test262.status slightly to blame the correct bug for Function.name
R=littledan@chromium.org

Review-Url: https://codereview.chromium.org/2007703003
Cr-Commit-Position: refs/heads/master@{#36487}
2016-05-24 17:48:49 +00:00
jshin
67d393a3de Move case conversion with ICU to 'staged'.
Move it to HARMONY_STAGED from HARMONY_INPROGRESS.

Update test262.status now that case mapping tests are passing with
'--harmony' specified.

BUG=v8:4476,v8:4477
LOG=Y
TEST=test262/{built-ins,intl402}/Strings/*, webkit/fast/js/*,
     mjsunit/string-case, intl/general/case*
CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_noi18n_rel_ng

Review-Url: https://codereview.chromium.org/1990083002
Cr-Commit-Position: refs/heads/master@{#36379}
2016-05-19 18:53:29 +00:00
jshin
b348d47bb9 Use ICU case conversion/transliterator for case conversion
When I18N is enabled, use ICU's case conversion API and transliteration
API [1] to implement String.prototype.to{Upper,Lower}Case and
String.prototype.toLocale{Upper,Lower}Case.

* ICU-based case conversion was implemented in runtime-i18n.cc/i18n.js
* The above 4 functions are overridden with those in i18n.js when
  --icu_case_mapping flag is turned on. To control the override by the flag,
  they're overriden in icu-case-mapping.js

Previously, toLocale{U,L}Case just called to{U,L}Case so that they didn't
support locale-sensitive case conversion for Turkic languages (az, tr),
Greek (el) and Lithuanian (lt).

Before ICU APIs for the most general case are called, a fast-path for Latin-1
is tried. It's taken from Blink and adopted as necessary. This fast path
is always tried for to{U,L}Case. For toLocale{U,L}Case, it's only taken
when a locale (explicitly specified or default) is not in {az, el, lt, tr}.

With these changes, a build with --icu_case_mapping=true passes a bunch
of tests in test262/intl402/Strings/* and intl/* that failed before.

Handling of pure ASCII strings (aligned at word boundary) are not as fast
as Unibrow's implementation that uses word-by-word case conversion. OTOH,
Latin-1 input handling is faster than Unibrow. General Unicode input
handling is slower but more accurate.

See https://docs.google.com/spreadsheets/d/1KJCJxKc1FxFXjwmYqABS0_2cNdPetvnd8gY8_HGSbrg/edit?usp=sharing for the benchmark.

This CL started with http://crrev.com/1544023002#ps200001 by littledan@,
but has changed significantly since.

[1] See why transliteration API is needed for uppercasing in Greek.
    http://bugs.icu-project.org/trac/ticket/10582

R=yangguo
BUG=v8:4476,v8:4477
LOG=Y
TEST=test262/{built-ins,intl402}/Strings/*, webkit/fast/js/*, mjsunit/string-case,
     intl/general/case*

Review-Url: https://codereview.chromium.org/1812673005
Cr-Commit-Position: refs/heads/master@{#36187}
2016-05-11 19:03:04 +00:00
Adam Klein
5b8845bd9d Skip new module test262 tests that fail on the waterfall
BUG=v8:4985
LOG=n
TBR=littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#35956}
2016-05-03 01:55:04 +00:00
littledan
c81616fbfe test262 roll
R=adamk

Review-Url: https://codereview.chromium.org/1931653003
Cr-Commit-Position: refs/heads/master@{#35955}
2016-05-02 23:02:38 +00:00
littledan
4f374bbc94 Use InternalArrays from certain Intl code
The ECMA 402 implementation previously pushed directly to real
Arrays, which risks having observably incorrect behavior in the
presence of monkey patching. This patch uses InternalArrays instead
to avoid that hazard.

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

Review-Url: https://codereview.chromium.org/1923803002
Cr-Commit-Position: refs/heads/master@{#35949}
2016-05-02 18:19:25 +00:00
adamk
96746cc7c7 Avoid infinite loop in RegExp.prototype[Symbol.split]
Our implementation of the spec got one comparison wrong, at
step 19.d.iii (we were comparing against 'q' instead of 'p').

R=littledan@chromium.org
BUG=chromium:607566
LOG=n

Review-Url: https://codereview.chromium.org/1940643002
Cr-Commit-Position: refs/heads/master@{#35947}
2016-05-02 17:33:32 +00:00
machenbach
3bf44848c3 [gn] Move build to gypfiles
This prepares for pulling chromium's build as dependency for
gn. After this, the files in build and gypfiles need to stay
in sync until chromium is updated.

BUG=chromium:474921
LOG=n

Review-Url: https://codereview.chromium.org/1848553003
Cr-Commit-Position: refs/heads/master@{#35898}
2016-04-29 10:11:11 +00:00
littledan
f32e30240d Detach ArrayBuffer in test262
New incoming test262 tests check what happens on detached ("neutered")
ArrayBuffers. This patch makes the test262 infrastructure define
detaching an ArrayBuffer in terms of %ArrayBufferNeuter, passing the
--allow-natives-syntax flag, when it is needed.

BUG=v8:4193
LOG=N
R=adamk,machenbach

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

Cr-Commit-Position: refs/heads/master@{#35676}
2016-04-20 19:44:05 +00:00
littledan
8b7b5a6f45 Pass the --module flag to test262 tests with modules enabled
This causes an incoming test262 test to pass, as part of the next
test262 roll.

R=adamk,machenbach
BUG=v8:1569
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35667}
2016-04-20 15:44:30 +00:00
machenbach
9c927d0f01 [test] Set default locale in test runner
BUG=v8:4437,v8:2899,chromium:604310
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#35614}
2016-04-19 11:27:08 +00:00
littledan
277f5bd0a3 Further ES2015 RegExp spec compliance fixes
- RegExp.prototype.toString() doesn't have any special handling of
  RegExp instances and simply calls the source and flags getters
- Use the original values of global and sticky, rather than based
  on the current flag getters, as specified in
  https://github.com/tc39/ecma262/pull/494

R=yangguo@chromium.org,adamk
LOG=Y
BUG=v8:4602

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

Cr-Commit-Position: refs/heads/master@{#35225}
2016-04-04 07:06:18 +00:00
littledan
31e806ebd1 Revert of Remove RegExp.prototype.source getter compat workaround (patchset #2 id:20001 of https://codereview.chromium.org/1837843002/ )
Reason for revert:
TC39 decided that this compatibility fix should be standardized.

Original issue's description:
> Remove RegExp.prototype.source getter compat workaround
>
> The getter RegExp.prototype.source is specified in ES2015 to throw when
> called on a non-RegExp instance, such as RegExp.prototype. We had previously
> put in a compatibility workaround for all RegExp getters to make them
> throw on access specifically with RegExp.prototype as the receiver; however,
> we only have evidence that this is needed for properties other than source.
> This patch removes the compatibility workaround for get RegExp.prototype.source
> and gives it semantics precisely as per the ES2015 specification.
>
> R=adamk
> BUG=chromium:581577,v8:4827
> LOG=Y
>
> Committed: https://crrev.com/80803aa89e31839b8f73959776fa7e1923c6b461
> Cr-Commit-Position: refs/heads/master@{#35086}

R=adamk@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:581577,v8:4827
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#35180}
2016-04-01 00:37:25 +00:00
adamk
d0cb7cf556 Stage --harmony-regexp-exec
R=littledan@chromium.org
BUG=v8:4602
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#35120}
2016-03-29 21:50:25 +00:00
adamk
360586f2f9 Add fast paths for native RegExps in ES2015 subclass-aware code
This patch adds fast paths for @@replace and @@split that call into
the old, side-effect free (and faster) versions of those builtin
operations when possible (roughly, when the receiver is a RegExp
and the 'exec' method is untampered). Also add some micro-optimizations
that further improve performance.

Taken altogether, this takes us from a ~70% regression on the Octane
RegExp benchmark to a ~9% regression.

The test262.status lines for RegExps has been reorganized to make it
clearer the status of individual tests. More work will likely be
required to increase spec compliance before the --harmony-regexp-exec
flag is shipped; some of that work is happening on the spec side.

BUG=v8:4602
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#35118}
2016-03-29 20:42:54 +00:00
yangguo
4c1d670e98 [regexp, intl] Intl should not cause side effects to the RegExp object.
R=jochen@chromium.org
BUG=v8:4361
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35099}
2016-03-29 11:57:03 +00:00
littledan
80803aa89e Remove RegExp.prototype.source getter compat workaround
The getter RegExp.prototype.source is specified in ES2015 to throw when
called on a non-RegExp instance, such as RegExp.prototype. We had previously
put in a compatibility workaround for all RegExp getters to make them
throw on access specifically with RegExp.prototype as the receiver; however,
we only have evidence that this is needed for properties other than source.
This patch removes the compatibility workaround for get RegExp.prototype.source
and gives it semantics precisely as per the ES2015 specification.

R=adamk
BUG=chromium:581577,v8:4827
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#35086}
2016-03-28 20:43:02 +00:00
ishell
4e8670d1fa [es6] Stage tail call elimination.
BUG=v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35007}
2016-03-22 20:54:34 +00:00
littledan
64b2b1ac33 Fix match default behavior on strings for ES2015 semantics
String.prototype.match is specified to call out to the current
value of RegExp.prototype[Symbol.match] when passed a string argument,
rather than the original value. This patch updates the RegExp code
to do that.

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

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

Cr-Commit-Position: refs/heads/master@{#35001}
2016-03-22 17:25:51 +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
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
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
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
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
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
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
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
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
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
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
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
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
littledan
2fa1c88442 Implement TypedArray(typedarray) constructor
The ES2016 draft spec defines a sort of fast path for constructing
a TypedArray based on another TypedArray. This patch implements that
alternative path in TypedArray construction. It is verified by
test262 tests, which now pass. This patch also has a slight cleanup
of TypedArray code by using a macro for TypedArray type checks, as
is done for other types.

This patch includes a minor spec violation: In the same-type case, the
spec indicates that the underlying ArrayBuffer should be copied until
the end, and this is fixed up by making the [[ArrayLength]] shorter.
This is observable with the buffer getter. This patch just copies the
used part of the underlying ArrayBuffer.

R=adamk
BUG=v8:4726
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34443}
2016-03-02 18:06:29 +00:00
oth
49587f68b5 [interpreter] Update test262.status.
Marks additional generator tests as failing.

BUG=V8:4680
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34410}
2016-03-01 20:51:07 +00:00
oth
318a09ea59 [interpreter] Unbreak test262 tests using constants.
Fixes a bug in the constant pool padding calculation.

BUG=v8:4680
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34403}
2016-03-01 18:05:40 +00:00
caitpotter88
008981cf12 [esnext] stage Object.values/entries, Object.getOwnPropertyDescriptors
BUG=v8:4663, v8:4725
LOG=N
R=littledan@chromium.org, adamk@chromium.org

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

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

R=adamk
LOG=Y
BUG=v8:4782

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

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

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

Cr-Commit-Position: refs/heads/master@{#34348}
2016-02-28 12:27:26 +00:00
littledan
abe61bdeac Reland of Test262 roll, 2016-2-23 (patchset #1 id:1 of https://codereview.chromium.org/1736223002/ )
Reason for revert:
Intl change relanded https://codereview.chromium.org/1745483002/

Original issue's description:
> Revert of Test262 roll, 2016-2-23 (patchset #2 id:20001 of https://codereview.chromium.org/1738033002/ )
>
> Reason for revert:
> An Intl change that this depends on breaks a bot
>
> Original issue's description:
> > Test262 roll, 2016-2-23
> >
> > R=adamk
> >
> > Committed: https://crrev.com/34492040fbfb04fead21416245c8696b9847e751
> > Cr-Commit-Position: refs/heads/master@{#34312}
>
> TBR=adamk@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/3b829ad80628bf521aa78255c2e5e20040a57b5f
> Cr-Commit-Position: refs/heads/master@{#34313}

TBR=adamk@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/1739533006

Cr-Commit-Position: refs/heads/master@{#34338}
2016-02-26 19:43:58 +00:00
rmcilroy
81f12a74f0 [Interpreter]: Update test262.status for Ignition.
Moves skips to explicit fails and groups errors be failure reason. Almost all failures
are due to lack of generator support.

BUG=v8:4680
LOG=N
TBR=oth@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34334}
2016-02-26 18:00:50 +00:00
littledan
3b829ad806 Revert of Test262 roll, 2016-2-23 (patchset #2 id:20001 of https://codereview.chromium.org/1738033002/ )
Reason for revert:
An Intl change that this depends on breaks a bot

Original issue's description:
> Test262 roll, 2016-2-23
>
> R=adamk
>
> Committed: https://crrev.com/34492040fbfb04fead21416245c8696b9847e751
> Cr-Commit-Position: refs/heads/master@{#34312}

TBR=adamk@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/1736223002

Cr-Commit-Position: refs/heads/master@{#34313}
2016-02-26 05:25:51 +00:00
littledan
34492040fb Test262 roll, 2016-2-23
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#34312}
2016-02-26 05:08:16 +00:00
machenbach
6809588a9a [Swarming] Only try to untar test262 on swarming.
Follow up after:
https://codereview.chromium.org/1713993002/

BUG=chromium:535160
LOG=n
TBR=tandrii@chromium.org, jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34281}
2016-02-25 10:32:42 +00:00
littledan
1aee75551e Ensure IteratorClose is called for errors in non-declaring assignments
There was a bug in for-of loops without newly declared variables: If,
in performing the assignment, an exception were thrown, then
IteratorClose would not be called. The problem was that the assignment
is done as part of assign_each, which happens before the loop is put
back in the state which is recognized to be breaking/throwing/returning
early.

This patch modifies the for-of desugaring by setting the loop state
before, rather than after, evaluating the assign_each portion, which is
responsible for evaluating the assignment in for-of loops which do not
have a declaration.

This patch, together with https://codereview.chromium.org/1728973002 ,
allow all test262 iterator return-related tests to pass.

R=rossberg
BUG=v8:4776
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34262}
2016-02-24 18:52:29 +00:00
littledan
5f67e34aed Fix priority of exceptions being thrown from for-of loops
In the for-of desugaring, IteratorClose is a subtle thing to get right.
When return exists, the logic for which exception to throw is as follows:
1. Get the 'return' property and property any exception that might come from
  the property read
2. Call return, not yet propagating an exception if it's thrown.
3. If we are closing the iterator due to an exception, propagate that error.
4. If return threw, propagate that error.
5. Check if return's return value was not an object, and throw if so

Previously, we were effectively doing step 5 even if an exception "had already
been thrown" by step 3. Because this took place in a finally block, the exception
"won the race" and was the one propagated to the user. The fix is a simple change
to the desugaring to do step 5 only if step 3 didn't happen.

R=rossberg
BUG=v8:4775
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34261}
2016-02-24 18:21:44 +00:00
littledan
cc6d938444 Stage ES2015 iterator finalization
This patch moves for-of closing to staging. There are a couple of
minor semantics bugs remaining in finalization along edge cases, but
we don't know of any stability issues.

BUG=v8:3566
R=rossberg
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34254}
2016-02-24 16:20:53 +00:00
ssanfilippo
1c1b70c98d [Swarming] work around slow calls in archive.py
Apparently, the tarfile Python module spends a lot of time in
grp.getgrid for retrieving a piece information (the name of the
primary group) which we don't need anyway. There is no
proper way to disable these slow calls, but there's a workaround
which relies on the way in which grp (and pwd) is used.

In fact, pwd and grp are imported in this fashion:

    try:
        import grp, pwd
    except ImportError:
        grp = pwd = None

and then used with the following pattern [2]:

      if grp:
          try:
              tarinfo.gname = grp.getgrgid(tarinfo.gid)[0]
          except KeyError:
              pass

By setting grp and pwd to None, thus skipping the calls, I was
able to achieve a 35x speedup on my workstation.

The user and group names are set to test262 when building the tar.

The downside to this approach is that we are relying on an
implementation detail, which is not in the public API.
However, the blamelist shows that the relevant bits of the module
have not been updated since 2003 [3], so we might as well assume
that the workaround will keep working, on cPython 2.x at least.

---

[1] https://hg.python.org/cpython/file/2.7/Lib/tarfile.py#l56
[2] https://hg.python.org/cpython/file/2.7/Lib/tarfile.py#l1933
[3] https://hg.python.org/cpython/rev/f9a5ed092660

BUG=chromium:535160
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34245}
2016-02-24 11:04:22 +00:00
littledan
8798ef2d1c Ensure Array.prototype.indexOf returns +0 rather than -0
A recent ES2016 draft spec clarification indicates that, if -0 is
passed into Array.prototype.indexOf or Array.prototype.lastIndexOf
as the starting index, and the result is found at index 0, then +0
rather than -0 should be returned. This patch ensures that V8 has
that result, which is consistent with what some other browsers
return. The patch allows a couple test262 tests to pass.

R=adamk
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34229}
2016-02-23 23:33:25 +00:00
littledan
b22b258874 ES2015 web compat workaround: RegExp.prototype.flags => ""
It turns out that some old polyfill library uses
RegExp.prototype.flags as a way of feature testing. It's not clear
how widespread this is. For now, as a minimal workaround, we can
return undefined from getters like RegExp.prototype.global when
the receiver is RegExp.prototype. This patch implements that strategy
but omits a UseCounter to make backports easier.

R=adamk
CC=yangguo@chromium.org
BUG=chromium:581577
LOG=Y
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#34201}
2016-02-23 01:49:03 +00:00
littledan
0b53b7d36b Remove Reflect.enumerate
The Proxy enumerate trap and Reflect.enumerate are removed from the
ES2016 draft specification. This patch removes the Reflect.enumerate
function, and a follow-on patch will be responsible for the Proxy
trap changes.

R=adamk
LOG=Y
BUG=v8:4768

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

Cr-Commit-Position: refs/heads/master@{#34196}
2016-02-22 19:10:43 +00:00
mvstanton
deb7d5b090 ES6: Desugaring of instanceof to support @@hasInstance
This is a rework of the instanceof operator to support ES6 semantics
(as per section 12.10.4 of the spec:
https://tc39.github.io/ecma262/#sec-instanceofoperator).

It's behind flag --harmony-instanceof for now, which is turned on for staging.

BUG=v8:4447
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34170}
2016-02-19 19:20:38 +00:00
machenbach
6cecb3eb77 [Swarming] Speed up test262 upload/download.
This experimentally implements taring/untaring the test data
for test262 on the v8-side before test isolation and when
running the tests.

It archives on demand only if the tar is outdated compared
to the contained files. This comes with a cost of ~1s extra
to run gyp on linux and ~6s extra on windows. Ninja is
lightning fast afterwards in detecting changes. Also, we
archive only when test_isolation_mode is set and when
the test262_run target is required.

The archiving itself costs ~30s on all platforms. But as the
files will change seldom this shouldn't have a big impact.

Extraction on the test runner side is below 2s on mac and
linux. The speedup is enormous. Around 5 minutes were spent
on download on swarming slaves before, which is now only
a few seconds. So total test time for release (no variants),
e.g. goes from 8 to 3 minutes.

BUG=chromium:535160
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34155}
2016-02-19 14:41:29 +00:00
littledan
44f9c6a638 Make Date.prototype.toGMTString an alias for Date.prototype.toUTCString
In ES2015, Date.prototype.toGMTString is simply an alias of
Date.prototype.toUTCString, so it has the same identity as a function and
doesn't have its own name. Firefox has already shipped this behavior.
Previously, we copied JSC behavior by making it a separate function.
This change makes an addition test262 test pass.

BUG=v8:4708
LOG=Y
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#34131}
2016-02-19 02:18:54 +00:00
oth
e768bcca24 [interpreter] Support for ES6 super keyword.
Adds support for ES6 super keyword and performing loads, stores, and
calls to super class members.

Implements SetHomeObject and enables ThisFunctionVariable.

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

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

Cr-Commit-Position: refs/heads/master@{#33977}
2016-02-15 08:19:07 +00:00
adamk
f539f5c88b Stage --harmony-function-name
BUG=v8:3699
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#33919}
2016-02-11 19:13:12 +00:00
mvstanton
d69ce04d03 Implement symbol @@hasInstance for ES6 instanceof support.
BUG=

Committed: https://crrev.com/5833e8e8a437cd66405784263ccc45e73470fd42
Cr-Commit-Position: refs/heads/master@{#33870}

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

Cr-Commit-Position: refs/heads/master@{#33890}
2016-02-11 11:59:22 +00:00
machenbach
99a58d30d2 Revert of Implement symbol @@hasInstance for ES6 instanceof support. (patchset #2 id:20001 of https://codereview.chromium.org/1683043003/ )
Reason for revert:
[Sheriff] Breaks:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20nosnap%20-%20debug/builds/1382/

Original issue's description:
> Implement symbol @@hasInstance for ES6 instanceof support.
>
> BUG=
>
> Committed: https://crrev.com/5833e8e8a437cd66405784263ccc45e73470fd42
> Cr-Commit-Position: refs/heads/master@{#33870}

TBR=bmeurer@chromium.org,mvstanton@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/1686123002

Cr-Commit-Position: refs/heads/master@{#33871}
2016-02-10 16:22:01 +00:00
mvstanton
5833e8e8a4 Implement symbol @@hasInstance for ES6 instanceof support.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33870}
2016-02-10 14:34:51 +00:00
littledan
43cd128eff Stage --harmony-species flag, enabling Symbol.species
This patch moves Symbol.species support to the "experimental JavaScript
features" flag. While @@species is still a performance hit, it doesn't seem
like it would make the web unusably slow; shipping would still have to
wait on fixing the performance regression, but staging this version should
yield valuable web compatibility information.

R=cbruni
BUG=v8:4093
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#33827}
2016-02-08 21:18:17 +00:00
mythria
90721a51a3 [Interpreter] Adds support for const/let variables to interpreter.
Adds implementation and tests to support const/let variables in the
interpreter.

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

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

Cr-Commit-Position: refs/heads/master@{#33819}
2016-02-08 14:14:57 +00:00
neis
dbd8640813 [generators] Implement Generator.prototype.return.
Note: This is currently only used by yield*, we still need to support it in
other places (such as for-of loops).  It can be used manually of course.

(This CL does not touch the full-codegen implementation of yield* because that
code is already dead.  The yield* desugaring already supports return and doesn't
need to be touched.)

BUG=v8:3566
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#33744}
2016-02-04 17:14:15 +00:00
littledan
7232c9f267 Mark an invalid test262 test as allowed to fail
R=neis

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

Cr-Commit-Position: refs/heads/master@{#33740}
2016-02-04 15:36:21 +00:00
mythria
9aa612cb2c [Interpreter] Adds support for rest parameters to interpreter.
Adds implementation and tests for rest parameters to interpreter.

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

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

Cr-Commit-Position: refs/heads/master@{#33722}
2016-02-04 10:03:17 +00:00
mythria
8d3e1ca357 [Interpreter] Adds support for with statement to interpreter.
Adds implementation and tests for with statement to interprter.

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

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

Cr-Commit-Position: refs/heads/master@{#33705}
2016-02-03 14:41:37 +00:00
Adam Klein
2f813aa669 Also skip allocation-limit test on tsan builders
TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33647}
2016-02-01 19:58:22 +00:00
Adam Klein
37e2bb0109 Skip test262/built-ins/ArrayBuffer/allocation-limit under msan
BUG=v8:4639
LOG=n
TBR=littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33646}
2016-02-01 19:52:17 +00:00
littledan
bce83db2e2 Test262 roll to the state as of 2016-19-1
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#33645}
2016-02-01 19:03:32 +00:00
yangguo
33d2338515 [regexp] Change test262 expectation for noi18n build.
TBR=machenbach@chromium.org
NOTRY=true
NOTREECHECKS=true

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

Cr-Commit-Position: refs/heads/master@{#33608}
2016-01-29 10:39:32 +00:00
yangguo
54d9d19855 [regexp] stage unicode regexps.
R=littledan@chromium.org, rossberg@chromium.org
BUG=v8:2952
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#33604}
2016-01-29 09:24:00 +00:00
littledan
8c663eea0c Stage RegExp subclassing
This patch stages the first part of RegExp subclassing--defining
Symbol.{match,replace,search,split}, but keeping their original
definitions which are restricted to a RegExp receiver and do not
call out to the core 'exec' method. This is being staged separately
because the two sets of extension points are separate features with
separate functionality. The amount of behavior which is held behind
the flag is very small, just exposing the symbols as properties of
Symbol--the behavior that the String methods call out to these Symbol
properties has already been shipping unflagged.

R=yangguo@chromium.org
BUG=v8:4305,v8:4343,v8:4344,v8:4345
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#33534}
2016-01-27 05:47:06 +00:00
adamk
e8b6b14be1 [test262] Re-order and re-tag some Function.name related tests
This makes it easier to see what behavior each test is verifying.

BUG=v8:3699
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33529}
2016-01-26 22:36:19 +00:00
mstarzinger
21b6e077fa [interpreter] Fix lookup of overlapping handler ranges.
This fixes corner cases where the start offsets of exception handler
regions within the handler table fall together. This assumption was
based on full-codegen code and no longer holds with the interpreter.
The tables however are still well nested and code has been added to
verify that in debug mode.

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

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

Cr-Commit-Position: refs/heads/master@{#33495}
2016-01-25 16:18:53 +00:00
mstarzinger
b707ca4b54 [interpreter] Deprecate --ignition-fallback-on-catch flag.
The current support for try-catch in the interpreter can handle most of
the cases appearing in our test suite. Also the flag in question did not
detect try-finally constructs. This removes the flag and instead extends
the test expectations.

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

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

Cr-Commit-Position: refs/heads/master@{#33494}
2016-01-25 15:57:51 +00:00
rmcilroy
9602f4b2d2 [Interpreter] Remove skips which have been fixed with Exceptions and For...Of.
BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33489}
2016-01-25 12:23:38 +00:00
adamk
8aeb6080e1 Sloppy mode webcompat: allow conflicting function declarations in blocks
The web appears to depend on being able to redeclare functions-in-blocks
in sloppy mode (examples seen so far tend to redeclare identical functions,
most likely accidentally).

This patch opens a minimal hole: two same-named function declarations
in the same scope are allowed, only in sloppy mode.

BUG=v8:4693, chromium:579395
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#33478}
2016-01-23 00:40:53 +00:00
mstarzinger
00b0a53685 [interpreter] Re-enable some tests that pass by now.
These tests have been disabled while support for try-finally was work in
progress. By now control flow is connected properly and the tests pass.

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

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

Cr-Commit-Position: refs/heads/master@{#33474}
2016-01-22 17:11:17 +00:00
mstarzinger
0b3066b8f5 [interpreter] First implementation of stack unwinding.
This implements a first prototype of stack unwinding for interpreted
frames. The unwinding machinery performs a range-based lookup in the
given handler table and potentially continues dispatching at the handler
offset. Note that this does not yet correctly restore the context to the
correct value when the handler is being entered.

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

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

Cr-Commit-Position: refs/heads/master@{#33414}
2016-01-20 18:10:40 +00:00
mythria
232e28d65e [Interpreter] Marks that 'throw' has returned a value.
This is to fix some of the failing test262 tests with ignition flag.
In few test262 tests, there is a throw from the script scope. Rewriter::Rewrite
pass converts expression statements into assignment statements in script scope.
This causes interpreter to fail because assignment expression expects a result
in accumulator but throw statement does not return a value. To fix this, we
now mark that accumulator contains a value when visiting throw statement.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33408}
2016-01-20 13:49:18 +00:00