Function.prototype.toMethod was removed from ES6.
This removes the function and updates the tests to either
use %ToMethod or a dedicated syntax (using concise method
or a class).
BUG=v8:3330
LOG=N
R=dslomov@chromium.org, adamk
Review URL: https://codereview.chromium.org/914713002
Cr-Commit-Position: refs/heads/master@{#26559}
super() is only allowed in a class constructor.
super.p is allowed in methods, accessors and constructors.
The parser now checks the FunctionState to see what kind of function
we are currently inside.
BUG=v8:3330
LOG=N
R=dslomov@chromium.org, marja@chromium.org
Review URL: https://codereview.chromium.org/915563003
Cr-Commit-Position: refs/heads/master@{#26557}
Adding the line "// MODULE" to an mjsunit file will now cause
run-tests.py to prefix the test case with "--module" in the
d8 commandline.
d8 has itself been updated to treat files preceded with "--module" as
modules (that is, it compiles them with ScriptCompiler::CompileModule,
and turns on --harmony-modules).
Review URL: https://codereview.chromium.org/902263002
Cr-Commit-Position: refs/heads/master@{#26555}
Port 86cae1633c
Original commit message:
1) Deoptimizer::Reason was replaced with Deoptimizer::DeoptInfo
because it also has raw position. Also the old name clashes with DeoptReason enum.
2) c_entry_fp assignment call was added to EntryGenerator::Generate
So we can calculate sp and have a chance to record the stack for the deopting function.
btw it makes the test stable.
3) new kind of CodeEvents was added to cpu-profiler
4) GetDeoptInfo method was extracted from PrintDeoptLocation.
So it could be reused in cpu profiler.
BUG=452067
LOG=n
Review URL: https://codereview.chromium.org/907383003
Cr-Commit-Position: refs/heads/master@{#26554}
Port 5d68529be2
Original commit message:
Scope, like Parser, must be able to operate independent of Isolate and the V8
heap (for background parsing). After the heap-independent phase, there is a heap
dependent phase, during which we do operations such as scope anaylysis.
This CL makes the phases explicit by not telling Scope about the Isolate too
early (during the heap-independent phase, Scope should know nothing about
Isolate). This decreases the probability of accidental code changes which would
add heap-dependent operations into the heap-independent phase.
BUG=
Review URL: https://codereview.chromium.org/911073004
Cr-Commit-Position: refs/heads/master@{#26553}
To do so, extract startup_data_util from d8 and use it those executables.
BUG=
Review URL: https://codereview.chromium.org/913703002
Cr-Commit-Position: refs/heads/master@{#26547}
Scope, like Parser, must be able to operate independent of Isolate and the V8
heap (for background parsing). After the heap-independent phase, there is a heap
dependent phase, during which we do operations such as scope anaylysis.
This CL makes the phases explicit by not telling Scope about the Isolate too
early (during the heap-independent phase, Scope should know nothing about
Isolate). This decreases the probability of accidental code changes which would
add heap-dependent operations into the heap-independent phase.
R=rossberg@chromium.org
BUG=
Review URL: https://codereview.chromium.org/909093003
Cr-Commit-Position: refs/heads/master@{#26546}
1) Deoptimizer::Reason was replaced with Deoptimizer::DeoptInfo
because it also has raw position. Also the old name clashes with DeoptReason enum.
2) c_entry_fp assignment call was added to EntryGenerator::Generate
So we can calculate sp and have a chance to record the stack for the deopting function.
btw it makes the test stable.
3) new kind of CodeEvents was added to cpu-profiler
4) GetDeoptInfo method was extracted from PrintDeoptLocation.
So it could be reused in cpu profiler.
BUG=452067
LOG=n
Review URL: https://codereview.chromium.org/910773002
Cr-Commit-Position: refs/heads/master@{#26545}
It's unnecessary; PreParser can just use normal Scopes for the things it needs
to track. Note: the only functionalities of PreParserScope were keeping track of
the scope stack, and for each scope, the scope type and language mode. Those are
now done by Scope. PreParser doesn't yet put variables into scopes (that will be
done in a follow up).
R=rossberg@chromium.org
BUG=
Review URL: https://codereview.chromium.org/912563004
Cr-Commit-Position: refs/heads/master@{#26544}
Several tiny changes for the upcoming TurboFan-genrated handlers/stubs:
* Relaxed the type of code_stub().
* Made GetCodeKind() public, it effectly was like this, anyway.
* Const-corrected GetStubType().
Review URL: https://codereview.chromium.org/915583002
Cr-Commit-Position: refs/heads/master@{#26542}
Also enabled concurrent linking with gold on Linux.
Mostly copy and paste from Chromium with customization for
V8 where necessary.
BUG=v8:3880
LOG=n
Review URL: https://codereview.chromium.org/896703003
Cr-Commit-Position: refs/heads/master@{#26536}
Port feb2890711
Original commit message:
Adds Switch and Case operators to TurboFan and handles them
appropriately in instruction selection and code generation.
BUG=
Review URL: https://codereview.chromium.org/896973005
Cr-Commit-Position: refs/heads/master@{#26535}
This function is defined in feb2890711.
(https://codereview.chromium.org/892513003).
original commit message:
[turbofan] Initial support for Switch.
Adds Switch and Case operators to TurboFan and handles them
appropriately in instruction selection and code generation.
BUG=
Review URL: https://codereview.chromium.org/902943005
Cr-Commit-Position: refs/heads/master@{#26533}
port 2491a639bf (r26463)
original commit message:
Externalize deoptimization reasons.
1) The hardcoded strings were converted into DeoptReason enum.
2) Deopt comment were converted into a pair location and deopt reason entries so
the deopt reason tracking mode would less affect the size of the RelocInfo table and heap.
3) DeoptReason entry in RelocInfo reuses kCommentTag value and generates short entry in RelocInfo table.
BUG=
Review URL: https://codereview.chromium.org/867243005
Cr-Commit-Position: refs/heads/master@{#26526}
port 6fc97a1965 (r26420)
original commit message:
Retry "Use a WeakCell in the CallIC type vector."
The first try failed because I needed to make a better distinction
between clearing ICs according to policy at GC time or unconditional
clearing (say, via %ClearFunctionTypeFeedback).
It was also blocked by an issue in super constructor calls.
This fix (https://codereview.chromium.org/892113002/) needs to land
before checking in this CL.
BUG=
R=weiliang.lin@intel.com
Review URL: https://codereview.chromium.org/865713004
Cr-Commit-Position: refs/heads/master@{#26517}
Adds Switch and Case operators to TurboFan and handles them
appropriately in instruction selection and code generation.
BUG=v8:3872
LOG=n
Review URL: https://codereview.chromium.org/892513003
Cr-Commit-Position: refs/heads/master@{#26515}
port c7851da4ae (r26419)
original commit message:
Introduce LanguageMode, drop StrictMode.
This enables adding more language modes in the future.
For maximum flexibility, LanguageMode is a bitmask, so we're not restricted to
use a sequence of language modes which are progressively stricter, but we can
express the language mode as combination of features.
For now, LanguageMode can only be "sloppy" or "strict", and there are
STATIC_ASSERTS in places which need to change when more modes are added.
LanguageMode is a bit like the old LanguageMode when "extended" mode was still
around (see https://codereview.chromium.org/8417035 and
https://codereview.chromium.org/181543002 ) except that it's transmitted through
all the layers (there's no StrictModeFlag).
BUG=
R=weiliang.lin@intel.com
Review URL: https://codereview.chromium.org/902053005
Cr-Commit-Position: refs/heads/master@{#26514}