Commit Graph

33843 Commits

Author SHA1 Message Date
bakkot
5c8c6fa160 [parser] Clean up ParserBase typedefs
The ParserTypes class has typedefs provided by the preparser or the
parser (e.g. PreParserExpression vs Expression*). Some of those typedefs
had gotten stale and were getting in the way, especially on gcc. We
also were making inconsistent use of aliases in parser-base.h; now their
use is much more consistent.

Review-Url: https://codereview.chromium.org/2305523002
Cr-Commit-Position: refs/heads/master@{#39101}
2016-09-01 18:26:40 +00:00
machenbach
903172e4fc [mb] Add more developer defaults to mb config.
BUG=chromium:625791

Review-Url: https://codereview.chromium.org/2304623002
Cr-Commit-Position: refs/heads/master@{#39100}
2016-09-01 18:06:24 +00:00
littledan
af1d06a9bc This patch updates to the latest test262 version
A number of known failures are marked. To support test262's
new tests which simulate multiple script tags, this patch
calls out to the d8 realm API from the harness adaptation code.

Review-Url: https://codereview.chromium.org/2290023002
Cr-Commit-Position: refs/heads/master@{#39099}
2016-09-01 17:43:31 +00:00
ulan
d09e026a9e Revert of [heap] Simplify heuristics for incremental step size. (patchset #5 id:180001 of https://codereview.chromium.org/2290333002/ )
Reason for revert:
Regressed GC times in v8.infinite_scroll_tbmv2 benchmarks.

Original issue's description:
> [heap] Simplify heuristics for incremental step size.
>
> This patch removes the code for speeding up marking.
>
> Now the step size depends on allocated bytes and
> invoked write barriers.
>
> We also ensure that the step size is large enough to
> justify the overhead of interrupting the generated code.
>
> BUG=chromium:616434
> LOG=NO
>
> Committed: https://crrev.com/71a793e4b1026e69d4009df0a419fe260fe1a235
> Cr-Commit-Position: refs/heads/master@{#39067}

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

Review-Url: https://codereview.chromium.org/2304613002
Cr-Commit-Position: refs/heads/master@{#39098}
2016-09-01 17:29:39 +00:00
mtrofin
5f8a6ec4b1 [wasm] consolidate wasm and asm.js module compilation sequence
This unblocks avoiding the separate code template.
In the upcoming CL doing away with code templates, We need to track instances
through the module object, which needs to be separate from the compiled module
data, which is then shared with the first instance.

This CL ensures we have the object available in the asm.js scenario, too.

Note that this CL also unifies the error messaging when module
decoding fails.

BUG=v8:5316

Review-Url: https://codereview.chromium.org/2299873002
Cr-Commit-Position: refs/heads/master@{#39097}
2016-09-01 16:47:39 +00:00
jkummerow
f93ee70c88 Revert of [stubs] Port KeyedLoadIC_Generic stub to TurboFan (patchset #4 id:60001 of https://codereview.chromium.org/2245683002/ )
Reason for revert:
Suspected to cause webgl_conformance_tests failures:

WebglConformance_conformance_textures_misc_tex_image_with_format_and_type (gpu_tests.webgl_conformance_integration_test.WebGLConformanceIntegrationTest) ... [21956:1299:0901/082859:INFO:CONSOLE(11)] "Uncaught TypeError: Cannot read property 'charCodeAt' of undefined", source:  (11)
[21956:1299:0901/082859:INFO:CONSOLE(174)] "Uncaught TypeError: Cannot read property 'charCodeAt' of undefined", source: http://127.0.0.1:56892/js/pnglib.js (174)

Original issue's description:
> [stubs] Port KeyedLoadIC_Generic stub to TurboFan
>
> And also handle dictionary elements loads in the dispatcher.
>
> Committed: https://crrev.com/fd5fe3b2a40cc7a9b044416798c3c2aa734469ff
> Cr-Commit-Position: refs/heads/master@{#39070}

TBR=verwaest@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/2303793002
Cr-Commit-Position: refs/heads/master@{#39096}
2016-09-01 16:08:00 +00:00
jkummerow
9fe4efe5b8 Revert of [api] Add interceptor for defineProperty(). (patchset #9 id:160001 of https://codereview.chromium.org/2272383002/ )
Reason for revert:
Breaks cctest/test-api-interceptors/QueryInterceptor on the waterfall

Original issue's description:
> [api] Add interceptor for defineProperty().
>
> With the Indexed/GenericNamedPropertyDefinerCallback it is possible to intercept Object.defineProperty() calls.
>
> Requests that call JSReceiver::OrdinaryDefineOwnProperty() internally, also trigger the interceptor. This includes Object.freeze(), Object.preventExtensions(), and Object.seal().
>
> BUG=
>
> Committed: https://crrev.com/b9d985975cf3bab0ded0cec9fafd3799f9bde29a
> Cr-Commit-Position: refs/heads/master@{#39094}

TBR=jochen@chromium.org,franzih@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/2303533004
Cr-Commit-Position: refs/heads/master@{#39095}
2016-09-01 16:04:00 +00:00
franzih
b9d985975c [api] Add interceptor for defineProperty().
With the Indexed/GenericNamedPropertyDefinerCallback it is possible to intercept Object.defineProperty() calls.

Requests that call JSReceiver::OrdinaryDefineOwnProperty() internally, also trigger the interceptor. This includes Object.freeze(), Object.preventExtensions(), and Object.seal().

BUG=

Review-Url: https://codereview.chromium.org/2272383002
Cr-Commit-Position: refs/heads/master@{#39094}
2016-09-01 15:18:30 +00:00
franzih
8acb7ab9f1 [api] Add PropertyDescriptor and DefineProperty().
BUG=

Review-Url: https://codereview.chromium.org/2244123005
Cr-Commit-Position: refs/heads/master@{#39093}
2016-09-01 15:09:59 +00:00
jochen
50d54ee2e3 Rename SloppyBlockWithEvalContextExtension to ContextExtension
The plan is to also use it for With and Catch scopes, so all kinds of
contexts have a pointer back to their ScopeInfo

R=neis@chromium.org,marja@chromium.org
BUG=v8:5215

Review-Url: https://codereview.chromium.org/2301913002
Cr-Commit-Position: refs/heads/master@{#39092}
2016-09-01 15:04:01 +00:00
jgruber
69debbb50c Don't ignore passed attributes in InstallGetterSetter
Up until now, the passed attributes were completely ignored and we
defaulted to DONT_ENUM every time.

BUG=

Review-Url: https://codereview.chromium.org/2297193005
Cr-Commit-Position: refs/heads/master@{#39091}
2016-09-01 14:52:59 +00:00
franzih
8225465b09 [api] Add documentation for PropertyQueryCallback.
Also add tests that document the behavior of the PropertyQueryCallback.

BUG=v8:5260

Review-Url: https://codereview.chromium.org/2286323002
Cr-Commit-Position: refs/heads/master@{#39090}
2016-09-01 14:41:56 +00:00
ahaas
79e685e277 [wasm] Validate the index of set local in AnalyzeLoopAssignment
BUG=chromium:642867
R=titzer@chromium.org
TEST=loop-assignment-analysis-unittest.cc:regress_642867

Review-Url: https://codereview.chromium.org/2290233008
Cr-Commit-Position: refs/heads/master@{#39089}
2016-09-01 14:05:50 +00:00
jgruber
7711b1a16f [regexp] Port RegExp getters and setters
BUG=v8:5339

Committed: https://crrev.com/ac0eb5e05af40e16ae9402bb8a62600b32cc2ec9
Review-Url: https://codereview.chromium.org/2305573002
Cr-Original-Commit-Position: refs/heads/master@{#39076}
Cr-Commit-Position: refs/heads/master@{#39088}
2016-09-01 13:41:28 +00:00
slan
efecae18b8 [ARMv8] ARMv8 builds are capable of ARMv7 instructions.
Correct a small bug which throws a compile-time assertion for ARMv8
builds since this change:
  https://codereview.chromium.org/2223433002

This does not add full support for ARMv8 instructions; it simply sets
the CAN_USE_ARMV7_INSTRUCTIONS define on ARMv8 builds.

BUG=

Review-Url: https://codereview.chromium.org/2293253004
Cr-Commit-Position: refs/heads/master@{#39087}
2016-09-01 13:31:44 +00:00
jyan
d8792ab02c Fix compilation error on gcc 4.8.5 on s390x
This fixes "error: array subscript is below array bounds" error
message generated by gcc 4.8.5

R=mvstanton@chromium.org, bmeurer@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2299763002
Cr-Commit-Position: refs/heads/master@{#39086}
2016-09-01 13:30:53 +00:00
machenbach
6c25d789ba Revert of [regexp] Port RegExp getters and setters (patchset #4 id:60001 of https://codereview.chromium.org/2305573002/ )
Reason for revert:
Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/9437

Original issue's description:
> [regexp] Port RegExp getters and setters
>
> BUG=v8:5339
>
> Committed: https://crrev.com/ac0eb5e05af40e16ae9402bb8a62600b32cc2ec9
> Cr-Commit-Position: refs/heads/master@{#39076}

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

Review-Url: https://codereview.chromium.org/2301963002
Cr-Commit-Position: refs/heads/master@{#39085}
2016-09-01 12:50:40 +00:00
bgeron
ce365be102 [turbofan] In store-store elimination, revisit as often as necessary.
There used to be too much pruning.

BUG=v8:5321

Review-Url: https://codereview.chromium.org/2295823002
Cr-Commit-Position: refs/heads/master@{#39084}
2016-09-01 12:30:10 +00:00
machenbach
324a9ace25 [gn] Switch linux branch builder to gn
BUG=chromium:474921
NOTRY=true
TBR=jochen,vogelheim

Review-Url: https://codereview.chromium.org/2306573002
Cr-Commit-Position: refs/heads/master@{#39083}
2016-09-01 12:28:07 +00:00
machenbach
9c9d1e18c7 [mb] Copy MB from Chromium repo
This prepares deletion of MB on the Chromium side.

This runs validation of the v8 configs as presubmit and
removes some obsolete code that required chromium.

BUG=chromium:616035

Review-Url: https://codereview.chromium.org/2299953002
Cr-Commit-Position: refs/heads/master@{#39082}
2016-09-01 12:20:20 +00:00
machenbach
bbe5c5490c [gn] Switch arm simulators to gn
BUG=chromium:474921

Review-Url: https://codereview.chromium.org/2304533002
Cr-Commit-Position: refs/heads/master@{#39081}
2016-09-01 12:18:57 +00:00
marja
8e7241fdde Include only stuff you need, part 6: Fix cctest.h.
Rebuilding (after touching certain files) is crazy slow because
includes are out of control. Many of these files we need to rebuild are
cctests which pull in more includes than they need.

BUG=v8:5294

Review-Url: https://codereview.chromium.org/2304553002
Cr-Commit-Position: refs/heads/master@{#39080}
2016-09-01 12:02:16 +00:00
marja
c2369e9efe Move ParseVariableDeclarations to ParserBase.
This enables PreParser to declare variables in the future without
duplicating the parsing logic.

BUG=

Review-Url: https://codereview.chromium.org/2297563007
Cr-Commit-Position: refs/heads/master@{#39079}
2016-09-01 11:56:56 +00:00
ishell
281e4d0e34 Remove unused VariableLocation::GLOBAL.
Review-Url: https://codereview.chromium.org/2299973002
Cr-Commit-Position: refs/heads/master@{#39078}
2016-09-01 11:50:25 +00:00
ulan
b828be0de8 [heap] Print more info in incremental marking tracing.
BUG=

Review-Url: https://codereview.chromium.org/2299543010
Cr-Commit-Position: refs/heads/master@{#39077}
2016-09-01 11:23:49 +00:00
jgruber
ac0eb5e05a [regexp] Port RegExp getters and setters
BUG=v8:5339

Review-Url: https://codereview.chromium.org/2305573002
Cr-Commit-Position: refs/heads/master@{#39076}
2016-09-01 11:22:21 +00:00
bmeurer
9f37e303c3 [turbofan] Properly look through FinishRegion in alias analysis.
For two FinishRegion nodes, the alias analysis returned "may alias" even
without properly looking through them.

Drive-by-fix: Add meaningful output for --trace-turbo-load-elimination.

R=jarin@chromium.org
BUG=v8:5267

Review-Url: https://codereview.chromium.org/2301903002
Cr-Commit-Position: refs/heads/master@{#39075}
2016-09-01 10:50:27 +00:00
jgruber
0aa80be16b [regexp] Port RegExpConstructor
BUG=v8:5339

Review-Url: https://codereview.chromium.org/2302773002
Cr-Commit-Position: refs/heads/master@{#39074}
2016-09-01 10:39:36 +00:00
jarin
39d65198ed [turbofan] Fix Math.sign.
Review-Url: https://codereview.chromium.org/2294143004
Cr-Commit-Position: refs/heads/master@{#39073}
2016-09-01 10:26:12 +00:00
nikolaos
5d6eabb0eb [parser] Refactor bookmark in SkipLazyFunctionBody
This patch refactors the scanner bookmark in SkipLazyFunctionBody,
so that it is only used locally, instead of being passed to several
other methods.  It is replaced by a "may_abort" parameter and an
appropriate result denoting whether lazy parsing has been aborted.

It also applies the hack of aborting lazy parsing for arrow
functions that are considered to be "initialization functions".

R=adamk@chromium.org, vogelheim@chromium.org
BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2297733002
Cr-Commit-Position: refs/heads/master@{#39072}
2016-09-01 10:23:18 +00:00
ahaas
5e7428b5b1 [wasm] Read global names only if their name length is valid.
BUG=chromium:642987
R=titzer@chromium.org
TEST=module-decoder-unittest.cc:GlobalWithInvalidNameLength

Review-Url: https://codereview.chromium.org/2301873002
Cr-Commit-Position: refs/heads/master@{#39071}
2016-09-01 09:52:40 +00:00
jkummerow
fd5fe3b2a4 [stubs] Port KeyedLoadIC_Generic stub to TurboFan
And also handle dictionary elements loads in the dispatcher.

Review-Url: https://codereview.chromium.org/2245683002
Cr-Commit-Position: refs/heads/master@{#39070}
2016-09-01 09:39:20 +00:00
neis
b3b574cd8c [modules] Ignore the surrounding script scope.
This is more consistent with how we handle eval scripts.

R=jochen@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2289293006
Cr-Commit-Position: refs/heads/master@{#39069}
2016-09-01 09:16:27 +00:00
nikolaos
9d818bea60 [parser] Hide expression classifiers in parser implementation
This patch removes the explicit classifier parameters from all
parsing methods and makes expression classifiers implicit in
the (pre)parser's implementation.  In this way, the implementation
is simplified and a proper stack of classifiers is enforced.

R=adamk@chromium.org,littledan@chromium.org
BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2289663002
Cr-Commit-Position: refs/heads/master@{#39068}
2016-09-01 08:58:46 +00:00
ulan
71a793e4b1 [heap] Simplify heuristics for incremental step size.
This patch removes the code for speeding up marking.

Now the step size depends on allocated bytes and
invoked write barriers.

We also ensure that the step size is large enough to
justify the overhead of interrupting the generated code.

BUG=chromium:616434
LOG=NO

Review-Url: https://codereview.chromium.org/2290333002
Cr-Commit-Position: refs/heads/master@{#39067}
2016-09-01 08:32:38 +00:00
jarin
706cbe3840 [turbofan] Improve message for unexpected opcode in simplified lowering.
The main goal is to have the opcode number on the stack, so that we can
extract it from minidumps.

Review-Url: https://codereview.chromium.org/2301853002
Cr-Commit-Position: refs/heads/master@{#39066}
2016-09-01 07:53:14 +00:00
bmeurer
432790c92c [turbofan] Only check semantic axis for Type::None.
R=jarin@chromium.org
BUG=chromium:643073

Review-Url: https://codereview.chromium.org/2299903002
Cr-Commit-Position: refs/heads/master@{#39065}
2016-09-01 07:11:21 +00:00
mvstanton
b8dec98dab [turbofan] Base more write barrier decisions on machine representation.
This furthers our goal of avoiding using the representation dimension of
the Type class.

BUG=v8:5270

Review-Url: https://codereview.chromium.org/2295883004
Cr-Commit-Position: refs/heads/master@{#39064}
2016-09-01 07:06:15 +00:00
bmeurer
83e1410320 [turbofan] Float32Constant/Float64Constant cannot occur in JS level graph.
Now that the hole NaN is no longer represented as Float64Constant early
on, we should never see such a constant node in any JS-level graph, but
we will only see them after representation selection. Change Typer and
SimplifiedLowering appropriately (and fix the invalid tests).

R=jarin@chromium.org
BUG=v8:5267

Review-Url: https://codereview.chromium.org/2299883003
Cr-Commit-Position: refs/heads/master@{#39063}
2016-09-01 06:27:06 +00:00
bmeurer
64a7bd3877 [turbofan] Don't treat the hole NaN as constant inside the compiler.
We use a signaling NaN to represent the hole in
FAST_HOLEY_DOUBLE_ELEMENTS backing stores, but on Intel processors, the
C++ compiler may decide to (or be forced to due to calling conventions)
use X87 registers for double values. However transfering to X87
registers automatically quietens the NaNs and there's no way to disable
this. Therefore we should just always load the hole NaN from the canonical
place identified by the address_of_hole_nan external reference instead,
which might even be more efficient in some cases.

R=jarin@chromium.org, jkummerow@chromium.org
BUG=v8:5332

Review-Url: https://codereview.chromium.org/2303643002
Cr-Commit-Position: refs/heads/master@{#39062}
2016-09-01 06:02:19 +00:00
v8-autoroll
2f6f21bf54 Update V8 DEPS.
Rolling v8/build to 87f8ed60519428c429030cd9ccb3feaf9f616881

Rolling v8/third_party/WebKit/Source/platform/inspector_protocol to a78b8834da38e5bca9eb5f0d8c28ffe4561dd224

Rolling v8/tools/clang to bd3311be3d35277e6d839596873e906b0b069ab5

Rolling v8/tools/mb to 2f9349ee2aec6dd7b167b26cbbcac2891a9649ab

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

Review-Url: https://codereview.chromium.org/2307433002
Cr-Commit-Position: refs/heads/master@{#39061}
2016-09-01 03:32:54 +00:00
bjaideep
3b40d4f2e5 PPC/s390: Remove CONST_LEGACY VariableMode
Port 7516fe1eaa

Original commit message:

    The only remaining use of this VariableMode is for the names of sloppy
    named function expressions. This patch instead uses CONST for such
    bindings (just as we do in strict mode) and instead marks those
    Variables specially. During code generation a new helper method,
    Variable::throw_on_const_assignment(), is called to decide whether
    to throw or silently ignore the assignment.

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

Review-Url: https://codereview.chromium.org/2299043002
Cr-Commit-Position: refs/heads/master@{#39060}
2016-09-01 03:06:59 +00:00
zhengxing.li
1722786cd3 X87: Remove CONST_LEGACY VariableMode.
port 7516fe1eaa (r39052)

  original commit message:
  The only remaining use of this VariableMode is for the names of sloppy
  named function expressions. This patch instead uses CONST for such
  bindings (just as we do in strict mode) and instead marks those
  Variables specially. During code generation a new helper method,
  Variable::throw_on_const_assignment(), is called to decide whether
  to throw or silently ignore the assignment.

BUG=

Review-Url: https://codereview.chromium.org/2299103002
Cr-Commit-Position: refs/heads/master@{#39059}
2016-09-01 02:49:46 +00:00
machenbach
081d4870d0 Revert of [inspector] Initial import of v8_inspector. (patchset #3 id:40001 of https://codereview.chromium.org/2292573002/ )
Reason for revert:
Presubmit

Original issue's description:
> [inspector] Initial import of v8_inspector.
>
> BUG=chromium:635948
> NOPRESUBMIT=true (for code style)
>
> Committed: https://crrev.com/e29594ea3c5c41de0844e71f7a82c990a8da71ee
> Cr-Commit-Position: refs/heads/master@{#39057}

TBR=jochen@chromium.org,pfeldman@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:635948

Review-Url: https://codereview.chromium.org/2300823002
Cr-Commit-Position: refs/heads/master@{#39058}
2016-08-31 21:48:40 +00:00
dgozman
e29594ea3c [inspector] Initial import of v8_inspector.
BUG=chromium:635948
NOPRESUBMIT=true (for code style)

Review-Url: https://codereview.chromium.org/2292573002
Cr-Commit-Position: refs/heads/master@{#39057}
2016-08-31 21:34:59 +00:00
bakkot
8d5a267b19 Refactor object/class literal property name parsing
This patch arranges that property names are parsed in a single pass,
reporting the name as well as the type of the property, instead of
parsing qualifiers like 'static' or 'get' initially as names and then
re-parsing. This change is easier to reason about, very slightly (4%)
faster in some cases (although slower in other, less common ones, though
this slowdown will be fixed in an upcoming patch), and is a prerequisite
for separating the parsing of object and class literal properties, which
will become increasingly important as ECMAScript adds more class features.

This is a reland of https://codereview.chromium.org/2278153004/,
which fixes the issue causing the revert and adds more tests.

Review-Url: https://codereview.chromium.org/2300503002
Cr-Commit-Position: refs/heads/master@{#39056}
2016-08-31 21:14:14 +00:00
alph
607c2c3293 Introduce v8.execute tracing category with RunMicrotasks event.
The event is used by DevTools to mark microtask execution intervals.
To reduces the overhead the event is only emitted when there are
microtasks to run.

BUG=642228

Review-Url: https://codereview.chromium.org/2289593005
Cr-Commit-Position: refs/heads/master@{#39055}
2016-08-31 20:52:07 +00:00
mlippautz
b15bda38a6 [heap] MemoryChunk cleanup
BUG=
R=ulan@chromium.org

Review-Url: https://codereview.chromium.org/2286613002
Cr-Commit-Position: refs/heads/master@{#39054}
2016-08-31 19:45:39 +00:00
marja
d6f3fa67af Parser::Declare follow-up to r38979.
BUG=

Review-Url: https://codereview.chromium.org/2292223004
Cr-Commit-Position: refs/heads/master@{#39053}
2016-08-31 18:58:48 +00:00
adamk
7516fe1eaa Remove CONST_LEGACY VariableMode
The only remaining use of this VariableMode is for the names of sloppy
named function expressions. This patch instead uses CONST for such
bindings (just as we do in strict mode) and instead marks those
Variables specially. During code generation a new helper method,
Variable::throw_on_const_assignment(), is called to decide whether
to throw or silently ignore the assignment.

Review-Url: https://codereview.chromium.org/2233673003
Cr-Commit-Position: refs/heads/master@{#39052}
2016-08-31 18:50:26 +00:00