Commit Graph

7509 Commits

Author SHA1 Message Date
dslomov
8aed43e82c new classes: implement new.target passing to superclass constructor.
R=arv@chromium.org,rossberg@chromium.org
BUG=v8:3834
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26560}
2015-02-11 01:23:11 +00:00
arv
68e4897586 Remove Function.prototype.toMethod
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}
2015-02-10 22:13:43 +00:00
Erik Arvidsson
eaad793c2f Fix usage of super in js perf test
BUG=none
LOG=N
R=adamk@chromium.org, adamk, dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26558}
2015-02-10 21:15:56 +00:00
arv
9acfd4fe08 super is only allowed in methods, accessors and constructor
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}
2015-02-10 19:51:39 +00:00
adamk
a18b797fd9 Enable compiling mjsunit tests as ES6 modules
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}
2015-02-10 19:11:55 +00:00
vogelheim
2ea8df76ba Fix cctest + unittest to work with an external snapshot.
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}
2015-02-10 15:38:09 +00:00
marja
5d68529be2 Parsing: Make Scope not know about Isolate.
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}
2015-02-10 14:39:21 +00:00
loislo
86cae1633c Propagate DeoptInfo to cpu-profiler
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}
2015-02-10 14:33:00 +00:00
titzer
1db760de7d Reduce the number of iterations in some OSR tests by using an explicit %OptimizeOsr().
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26540}
2015-02-10 09:53:22 +00:00
balazs.kilvady
e094f909fc MIPS: Assembler support for internal references.
Port 49cbe537e7

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26534}
2015-02-09 20:50:03 +00:00
jochen
30674bdeb4 Introduce a compile method that takes context extensions
BUG=chromium:456192
R=yangguo@chromium.org
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#26530}
2015-02-09 15:16:33 +00:00
yangguo
7819c593e8 Add payload checksum to code cache data.
R=jochen@chromium.org
BUG=chromium:441896
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26529}
2015-02-09 14:49:47 +00:00
dcarney
6f97beb51e [turbofan] make zone allocation of InstructionOperand explicit
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26528}
2015-02-09 14:20:19 +00:00
titzer
9030a2674b Remove some busy-OSR loops from tests using %OptimizeOsr().
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26527}
2015-02-09 14:11:23 +00:00
dcarney
4045b72ce3 [turbofan] remove one level of indirection in phi inputs
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26524}
2015-02-09 13:02:53 +00:00
titzer
4c302ca290 Make it easier to test OSR with %OptimizeOsr() runtime call.
This call triggers OSR for the current function. And also allows explicitly testing OSR on the top-level code.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26523}
2015-02-09 12:47:43 +00:00
dcarney
313b24dbc2 add support for all can read interceptors
R=verwaest@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26522}
2015-02-09 11:33:50 +00:00
dcarney
9896fab0df fix transition of typedarrays in ics
R=verwaest@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26518}
2015-02-09 09:50:15 +00:00
bmeurer
feb2890711 [turbofan] Initial support for Switch.
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}
2015-02-09 08:56:12 +00:00
arv
8a809a9c86 Rename ParseSourceElements in preparser too
BUG=None
R=adamk
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26498}
2015-02-06 23:26:35 +00:00
arv
64abe65210 Allow eval and arguments as property names
We incorrectly disallowed eval and arguments in accessor and method
names. This was because we checked the name inside the
ParseFunctionLiteral. We now flag accessors so that lazy parsing of
these functions are treated correctly.

BUG=v8:1984
R=adamk, dslomov@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26497}
2015-02-06 18:04:21 +00:00
adamk
70079dab13 Add basic compilation support for modules
This adds an "experimental" API hook (v8::ScriptCompiler::CompileModule)
allowing compilation of modules. The code gen is incredibly basic: the
module body is represented by a Block in the AST. But this at least gets
more of the pipeline working, and opens the door to writing mjsunit tests
(once d8 is modified to support module compilation).

BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26496}
2015-02-06 17:52:38 +00:00
loislo
fb73392bfd Simplify cpu-profiler test code with help of wrappers.
BTW: a few fixes for string comparison

BUG=none
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26495}
2015-02-06 16:51:07 +00:00
marja
5c56665059 PreParser / Parser consistency: Make PreParser aware of Zone and AstValueFactory.
Previously it just had hacks to have NULLs instead of them and pretended to know
nothing about Zone. The hacks provide no real benefit (probably historically
based on some weird misconception about the relationship between Zone and
Isolate), and make it harder for the PreParser to start to know more about
variables and scoping.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26494}
2015-02-06 15:58:47 +00:00
yangguo
7f4d207c8b Add hash fields to code cache header.
R=jochen@chromium.org
BUG=chromium:441896
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26490}
2015-02-06 15:20:52 +00:00
titzer
c6c1d8ffd6 [turbofan] Fix loop analysis bug with certain phi structures.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26489}
2015-02-06 15:19:51 +00:00
cdai2
2b0427a912 x87: currently Turbofan is not supported by X87 so this test case is disabled.
BUG=
R=mstarzinger@chromium.org, weiliang.lin@intel.com

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

Cr-Commit-Position: refs/heads/master@{#26487}
2015-02-06 14:59:54 +00:00
bmeurer
008f4732f7 [x64] Assembler support for internal references and RIP relative addressing.
R=dcarney@chromium.org
BUG=v8:3872
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26486}
2015-02-06 12:48:52 +00:00
Dan Carney
878963a8a5 split interceptor tests off of test-api
BUG=
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26484}
2015-02-06 12:08:07 +00:00
dslomov
158a87659f new classes: assert that constructors are not callable and rewrite 'return;'
R=arv@chromium.org
BUG=v8:3834
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26483}
2015-02-06 10:35:13 +00:00
dcarney
996fa7d36e [turbofan] Remove global InstructionOperand caches.
Review URL: https://codereview.chromium.org/904693002

Cr-Commit-Position: refs/heads/master@{#26479}
2015-02-06 09:00:50 +00:00
bmeurer
5c119485b4 [ia32] Assembler support for internal references.
BUG=v8:3872
LOG=n
R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26478}
2015-02-06 08:51:51 +00:00
Benedikt Meurer
49cbe537e7 [arm] Assembler support for internal references.
BUG=v8:3872
LOG=n
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26475}
2015-02-06 07:21:23 +00:00
Erik Arvidsson
b67b3c5401 Accessor functions should have no prototype property
This also removes some convenience functions that were not used.

BUG=v8:3700
LOG=N
R=adamk@chromium.org, adamk

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

Cr-Commit-Position: refs/heads/master@{#26472}
2015-02-05 23:34:28 +00:00
michael_dawson
308d913a92 Contribution of PowerPC port (continuation of 422063005) - PPC dir update
Contribution of PowerPC port (continuation of 422063005, 817143002 and 866843003)
This patch brings the ppc directories up to date with our repo. We have
removed 5 individual optimizations which require changes in both the ppc and common
directories so they can be more easily reviewed on their own in subsequent patches.

Subsequent patches will cover:
- individual optimizations for PPC (5)
- remaining AIX changes not resolved by 4.8 compiler (4.8 is only recently available
for AIX)
- incremental updates required to ppc directories due to platform specific changes
made in google repos while we complete the above steps.

With the update there are still some timeouts seen when run in simulated mode which
may be a result of the missing optimizations.  Once we have the optimizations in
we will review the simulation results and address/exclude tests as necessary so that
the simulated runs are clean.

	new file:   src/compiler/ppc/code-generator-ppc.cc
	new file:   src/compiler/ppc/instruction-codes-ppc.h
	new file:   src/compiler/ppc/instruction-selector-ppc.cc
	new file:   src/compiler/ppc/linkage-ppc.cc
	modified:   src/ic/ppc/handler-compiler-ppc.cc
	modified:   src/ic/ppc/ic-compiler-ppc.cc
	modified:   src/ic/ppc/ic-ppc.cc
	modified:   src/ic/ppc/stub-cache-ppc.cc
	modified:   src/ppc/assembler-ppc.cc
	modified:   src/ppc/assembler-ppc.h
	modified:   src/ppc/builtins-ppc.cc
	modified:   src/ppc/code-stubs-ppc.cc
	modified:   src/ppc/code-stubs-ppc.h
	modified:   src/ppc/codegen-ppc.cc
	modified:   src/ppc/constants-ppc.h
	modified:   src/ppc/deoptimizer-ppc.cc
	modified:   src/ppc/disasm-ppc.cc
	modified:   src/ppc/full-codegen-ppc.cc
	modified:   src/ppc/interface-descriptors-ppc.cc
	modified:   src/ppc/lithium-codegen-ppc.cc
	modified:   src/ppc/lithium-codegen-ppc.h
	modified:   src/ppc/lithium-ppc.cc
	modified:   src/ppc/lithium-ppc.h
	modified:   src/ppc/macro-assembler-ppc.cc
	modified:   src/ppc/macro-assembler-ppc.h
	modified:   src/ppc/regexp-macro-assembler-ppc.cc
	modified:   src/ppc/regexp-macro-assembler-ppc.h
	modified:   src/ppc/simulator-ppc.cc
	modified:   src/ppc/simulator-ppc.h
	new file:   test/unittests/compiler/ppc/instruction-selector-ppc-unittest.cc

R=danno@chromium.org, svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26471}
2015-02-05 19:02:07 +00:00
ulan
3cd88975a1 Remove IC age from Code.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26468}
2015-02-05 16:40:43 +00:00
dslomov
8241147f46 Protect against uninitialized lexical variables at top-level.
R=rossberg@chromium.org
BUG=chromium:452510
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26466}
2015-02-05 16:35:24 +00:00
marja
299b369cc9 Split --harmony-unicode and --harmony-unicode-regexps.
This way we can ship \u{..} escapes in strings / identifiers before shipping /u
regexps.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26461}
2015-02-05 14:17:09 +00:00
marja
d21b9a1422 Add strong mode.
It doesn't do anything for now, but it implies strict mode. Added tests to
test-parsing.cc to test that.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26460}
2015-02-05 14:11:47 +00:00
danno
f184ff0650 [turbofan]: Improved source position information
Make sure the initial graph is fully populated with source position information and automatically propagate that information down through newly allocated nodes during reduction passes in the most unobtrusive way that's currently possible.

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

Cr-Commit-Position: refs/heads/master@{#26459}
2015-02-05 13:16:55 +00:00
mstarzinger
df986d08b7 Fix try-finally for dead AST-branches in TurboFan.
R=jarin@chromium.org
TEST=mjsunit/regress/regress-crbug-455644
BUG=chromium:455644
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26458}
2015-02-05 12:29:33 +00:00
jkummerow
bfe7f4af14 Fix HConstant(double, ...) constructor
It must always populate int32_value_, even if that's lossy, because other code (specifically, constant folding for truncating operations) relies on it.

BUG=v8:3865
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#26453}
2015-02-05 10:28:13 +00:00
yurys
a559367956 Add NativeWeakMap to v8.h
A new map wich references its keys weakly is added to v8.h. Internally it uses the same storage as JSWeakMap but doesn't depend on the JavaScript part of WeakMap implementation in weak-collection.js, hence it can be instantiated without entering any context.

BUG=chromium:437416
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26451}
2015-02-05 09:40:27 +00:00
marja
0e3b5386ae Scanner / Unicode decoding: use size_t instead of unsigned.
size_t is the correct data type for this purpose. Our APIs (in particular
ExternalSourceStream::GetMoreData) are already using it, and there were some
static_casts to convert between them.

This CL doesn't intend to fix all of V8, just the minimal sense-making part
around scanner character streams.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26449}
2015-02-05 07:54:34 +00:00
Benedikt Meurer
9dff8185dd Revert "[turbofan] Make Factory::NewNumber() always return the minus_zero_value."
This reverts commit f578d35ba8 because
(immutable) heap numbers are surprisingly mutable in V8. Someone else
might want to cleanup the mess, otherwise we'll just keep it this way.

TBR=jkummerow@chromium.org
BUG=chromium:454894
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#26447}
2015-02-05 04:58:49 +00:00
caitpotter88
49ef549807 templates: Don't check IsLineTerminator() if character is negative
BUG=455212
LOG=N
R=arv@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26442}
2015-02-04 21:05:48 +00:00
arv
cd661fdc27 Fix issue with multiple properties and emit store.
We used to have a parse error for conflicting property keys. This check
was removed to match ES6 (SpiderMonkey & Chakra already made this change).
Since this check was removed we ended up with a few new cases when
generating code. For example, accessors always generated code even if
those should have been shadowed by a data property.

BUG=v8:3856
LOG=Y
R=adamk, dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26441}
2015-02-04 20:44:12 +00:00
arv
176b68d11a Class methods should be non enumerable
Class methods and accessors (both prototype and static) should be
non enumerable.

BUG=v8:3330
LOG=Y
R=dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26437}
2015-02-04 17:23:17 +00:00
marja
39010859f8 test-parsing.cc: Test fix.
The syntax of this test snippet was so wrong ("function function") that it
wasn't testing what it was supposed to test.

R=rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26433}
2015-02-04 16:31:47 +00:00
yurys
1f7e3b3483 Revert of Add WeakKeyMap to v8.h (patchset #2 id:20001 of https://codereview.chromium.org/891473005/)
Reason for revert:
Revert this patch due to shared win build compilation failure

http://build.chromium.org/p/client.v8/builders/V8%20Win32%20-%20nosnap%20-%20shared/builds/5030/steps/compile/logs/stdio

Original issue's description:
> Add WeakKeyMap to v8.h
>
> A new map wich references its keys weakly is added to v8.h. Internally it uses the same storage as JSWeakMap but doesn't depend on the JavaScript part of WeakMap implementation in weak-collection.js, hence it can be instantiated without entering any context.
>
> BUG=chromium:437416
> LOG=Y
>
> Committed: https://crrev.com/ee7ed39ac8327124e74dd7ad5f1de0dede988cb7
> Cr-Commit-Position: refs/heads/master@{#26425}

TBR=jochen@chromium.org,mstarzinger@chromium.org,rossberg@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:437416

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

Cr-Commit-Position: refs/heads/master@{#26430}
2015-02-04 15:12:52 +00:00