Commit Graph

7554 Commits

Author SHA1 Message Date
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
yurys
e225675ea6 Revert of Simplify WeakMap and WeakSet tests slightly. (patchset #1 id:1 of https://codereview.chromium.org/903463002/)
Reason for revert:
Revert this patch as the original CL has to be reverted to due to shared win build 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:
> Simplify WeakMap and WeakSet tests slightly.
>
> R=rossberg@chromium.org
> TEST=cctest/test-weakmaps,cctest/test-weaksets
>
> Committed: https://crrev.com/a90d7a871da19d33e93c8779186408c8d1615cac
> Cr-Commit-Position: refs/heads/master@{#26428}

TBR=rossberg@chromium.org,mstarzinger@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#26429}
2015-02-04 15:11:38 +00:00
mstarzinger
a90d7a871d Simplify WeakMap and WeakSet tests slightly.
R=rossberg@chromium.org
TEST=cctest/test-weakmaps,cctest/test-weaksets

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

Cr-Commit-Position: refs/heads/master@{#26428}
2015-02-04 13:37:02 +00:00
dcarney
8064582626 Move the contents of api-natives.js to c++
R=verwaest@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26426}
2015-02-04 13:01:44 +00:00
yurys
ee7ed39ac8 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

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

Cr-Commit-Position: refs/heads/master@{#26425}
2015-02-04 12:53:05 +00:00
dcarney
4116900d8f [turbofan] Don't allocate UnallocatedOperands in Zone memory during instruction selection
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26424}
2015-02-04 12:39:07 +00:00
dslomov
275e088abe Fix assertion in full codegen for holed 'this'.
R=rossberg@chromium.org
BUG=chromium:455141
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26423}
2015-02-04 12:14:33 +00:00
mvstanton
6fc97a1965 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.

R=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26420}
2015-02-04 09:46:22 +00:00
marja
c7851da4ae 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=

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

Cr-Commit-Position: refs/heads/master@{#26419}
2015-02-04 09:34:26 +00:00
caitpotter88
600474ad44 Fix test-api/ObjectProtoToStringES6
Fixes tree closure caused by r26415

BUG=v8:3502
R=arv@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26416}
2015-02-03 22:18:21 +00:00
caitpotter88
b5c43674f9 Update harmony ObjectProtoToString() to 2/2/2015 spec
Applies to API implementation of O.p.toString

- Removes special handling of non-string @@toStringTag values (use builtinTag)
- Removes special handling of @@toStringTags which match [[Class]] names (remove ~ prefix)
- Add tests for non-string @@toStringTag values in test-api.cc

BUG=v8:3502
R=arv@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26415}
2015-02-03 21:05:25 +00:00
jarin
4f786befb7 Infer HConstant::NotInNewSpace only if the supplied handle is null.
BUG=chromium:449291
LOG=n
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26413}
2015-02-03 17:48:35 +00:00
caitpotter88
858b9b6a7e Update harmony Object.prototype.toString to 2/2/2015 spec
- Removes special handling of non-string @@toStringTag values (use builtinTag)
- Removes special handling of @@toStringTags which match [[Class]] names (remove ~ prefix)

BUG=v8:3502
R=arv@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26411}
2015-02-03 17:45:20 +00:00
dslomov
6f97a4948f new classes: special construct stub for derived classs and TDZ for this.
R=arv@chromium.org,rossberg@chromium.org
BUG=v8:3834
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26409}
2015-02-03 17:43:03 +00:00
mstarzinger
9d6f55b08a Turn throws into basic block terminators.
R=bmeurer@chromium.org
TEST=cctest/test-run-jsexceptions/Throw

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

Cr-Commit-Position: refs/heads/master@{#26406}
2015-02-03 15:22:55 +00:00
Benedikt Meurer
d8cfbc633d [turbofan] Split pure nodes in the scheduler if beneficial.
If a (pure) node has two or more uses, but there exists a path from the
common dominator of these uses to end, which does not contain a use,
then we split the node such that no unnecessary computation takes place.
Note however, that this only applies if the node cannot be hoisted out
of a loop.

BUG=v8:3864
LOG=n
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26404}
2015-02-03 14:51:08 +00:00
yurys
aeec653f49 Revert of Add WeakMap to v8.h (patchset #3 id:40001 of https://codereview.chromium.org/886473005/)
Reason for revert:
Broke compilation on component build http://build.chromium.org/p/client.v8/builders/V8%20Win32%20-%20nosnap%20-%20shared/builds/5007/steps/compile/logs/stdio

Original issue's description:
> Add WeakMap 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/37d4c57630636f21e3add8d3d1c7c978ff5fc8e0
> Cr-Commit-Position: refs/heads/master@{#26401}

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

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

Cr-Commit-Position: refs/heads/master@{#26402}
2015-02-03 14:42:49 +00:00
yurys
37d4c57630 Add WeakMap 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/886473005

Cr-Commit-Position: refs/heads/master@{#26401}
2015-02-03 14:28:20 +00:00
mstarzinger
77d612691d First stab at try-catch and try-finally in TurboFan.
R=titzer@chromium.org,jarin@chromium.org
TEST=cctest/test-run-jsexceptions

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

Cr-Commit-Position: refs/heads/master@{#26398}
2015-02-03 13:10:01 +00:00
dcarney
70bba702e0 follow up named interceptor miss with api callback getter
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26395}
2015-02-03 10:56:27 +00:00
ishell
ba8409d2f6 Avoid issuing write barriers for unboxed double fields in Heap::CopyJSObject().
Review URL: https://codereview.chromium.org/880043003

Cr-Commit-Position: refs/heads/master@{#26394}
2015-02-03 10:28:33 +00:00
kozyatinskiy
4e9e1eedf1 [V8] Added line, column and script symbols for SyntaxError
For exception in promise we generate v8::Message API object from exception object. And in cases of Syntax or Reference Error we don't have enough information in exception object - we can't restore Error location from top stack frame.
In this patch three aditional private fields introduced for exception object. In case of Syntax Error we store line, column and script on Exception object and receive this information when restoring message.

BUG=443140
LOG=Y
R=yurys@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26393}
2015-02-03 08:57:36 +00:00
balazs.kilvady
7cb12037d3 MIPS: Skip mozilla/js1_5/extensions/regress-355497 in simulator.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26392}
2015-02-03 06:31:55 +00:00
bmeurer
f6e02e195c Compute the same hash for all NaN values.
Both SameValue and SameValueZero consider different NaNs equal, so we
better assign the same hash value to all NaNs.

BUG=v8:3859
LOG=y
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26391}
2015-02-03 06:29:18 +00:00
verwaest
9cce4ff285 Clear pending exception on stack overflow in the parser
BUG=450960
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26390}
2015-02-03 06:22:36 +00:00
verwaest
1de7dff2ef Check global object behind global proxy for extensibility
BUG=454091
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26380}
2015-02-02 12:49:12 +00:00
titzer
79cad15cb0 Speed up tests for OSR of for-in and for-of loops.
R=marja@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26378}
2015-02-02 11:52:07 +00:00
dcarney
81091e62b9 [turbofan] push virtual register field down to InstructionOperand
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26377}
2015-02-02 11:38:46 +00:00
balazs.kilvady
eaa2c63a96 MIPS: Remove unnecessary printf lines from assembler tests.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26368}
2015-01-30 19:43:45 +00:00
balazs.kilvady
320d42e58a MIPS: Reland "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.".
Port c65ae4f10c

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26367}
2015-01-30 19:13:38 +00:00
caitpotter88
9355457b55 Implement parsing of ES6 Rest Parameters
BUG=v8:2159
LOG=N
R=marja@chromium.org, arv@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26362}
2015-01-30 15:21:50 +00:00
mvstanton
3df0a9ae77 CallIC used an invalid mechanism to detect if it was in optimized code.
BUG=453481
LOG=N
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26361}
2015-01-30 15:07:14 +00:00
jarin
da90aabc07 Always emit bailout id for inlining property access (even for keyed access).
R=ulan@chromium.org
BUG=chromium:453805
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26359}
2015-01-30 14:35:43 +00:00
jarin
0cd991ebc0 Do not inline array push for arrays with dictionary mode elements.
BUG=chromium:452878
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26357}
2015-01-30 13:51:43 +00:00
bmeurer
5d12b2855d Fix the test-code-stubs tests.
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26356}
2015-01-30 13:36:13 +00:00
titzer
e25a0f7e4e [turbofan] Fix usage of ThisFunction parameter in OSR.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26355}
2015-01-30 13:09:44 +00:00
ishell
32fe247d91 Layout descriptor sharing issue fixed.
BUG=chromium:437713, v8:3832
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26354}
2015-01-30 12:55:25 +00:00
Benedikt Meurer
cba14fbef7 Make GCC happy with test-cpu-profiler.
TBR=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26347}
2015-01-30 09:49:09 +00:00
bmeurer
c65ae4f10c Reland "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.".
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26346}
2015-01-30 09:29:41 +00:00
dcarney
491eb81780 Add MEGAMORPHIC state support for KeyedLoadIC
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26345}
2015-01-30 09:17:16 +00:00
michael_dawson
f1ba8d8f86 Contribution of PowerPC port (continuation of 422063005) - AIX Common1
Contribution of PowerPC port (continuation of 422063005 and 817143002). This patch covers
the key changes needed to the common files needed to support AIX. Subsequent
patches will cover:
- changes to update the ppc directories so they are current with the changes
in the rest of the project.
- remaining AIX changes not resolved by 4.8 compiler
- individual optimizations for PPC

This is based off of the GitHub repository
https://github.com/andrewlow/v8ppc

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

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

Cr-Commit-Position: refs/heads/master@{#26343}
2015-01-30 08:02:08 +00:00
Benedikt Meurer
883852293a Revert "Make GCC happy again." and "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.".
This reverts commit 6a4c0a3bae and commit
0deaa4b629 for breaking GCC bots.

TBR=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26342}
2015-01-30 07:19:57 +00:00
bmeurer
0deaa4b629 Initial switch to Chromium-style CHECK_* and DCHECK_* macros.
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26340}
2015-01-30 06:25:36 +00:00
adamk
0c928d533a Implemented new syntax for ImportDeclarations
Also had to split ParseImportsList and ParseExportClause into separate
methods as they have different rules about reserved words and arguments/eval.

Added lots more test cases, including some export cases that were missed before
due to incorrect checking of reserved words.

BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26338}
2015-01-30 03:27:06 +00:00
arv
13616615fd Lexical declarations should not be allowed in Statement
For example let and class should only be allowed inside function/block/script.

We have to continue to support const in statements in sloppy mode for backwards compatibility.

BUG=3831
LOG=Y
R=dslomov@chromium.org, adamk

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

Cr-Commit-Position: refs/heads/master@{#26337}
2015-01-30 03:10:13 +00:00
arv
b004b1d821 Move object literal checking into checker classes
This removes the duplicate property check from object literals.

Instead we repurpose the ObjectLiteralChecker into two cases, implemented
by two subclasses to ObjectLiteralCheckerBase called ObjectLiteralChecker
and ClassLiteralChecker.

The object literal checker now only checks for duplicate __proto__ fields in
object literals.

The class literal checker checks for duplicate constructors, non constructor
fields named constructor as well as static properties named prototype.

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

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

Cr-Commit-Position: refs/heads/master@{#26336}
2015-01-29 23:12:43 +00:00
machenbach
24bfa90b31 Revert of Use a WeakCell in the CallIC type vector. (patchset #4 id:80001 of https://codereview.chromium.org/881433002/)
Reason for revert:
Breaks a regression test on linux isloates, and linux with gcc 4.8.

Original issue's description:
> Use a WeakCell in the CallIC type vector.
>
> This allows us to clear the IC on a more sedate schedule, just
> like Load and Store ICs.
>
> R=ulan@chromium.org
> BUG=
>
> Committed: https://crrev.com/bcc79d33ca6d97d9ecfcfcf110a6ea84a0225389
> Cr-Commit-Position: refs/heads/master@{#26332}

TBR=ulan@chromium.org,mvstanton@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26334}
2015-01-29 18:01:23 +00:00
titzer
11311c083a [turbofan] Fix OSR compilations of for-in.
R=mstarzinger@chromium.org
LOG=Y
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26333}
2015-01-29 17:40:23 +00:00
mvstanton
bcc79d33ca Use a WeakCell in the CallIC type vector.
This allows us to clear the IC on a more sedate schedule, just
like Load and Store ICs.

R=ulan@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26332}
2015-01-29 17:36:51 +00:00
dcarney
f5ca41450a store InstructionOperands directly in Instruction
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26329}
2015-01-29 16:00:19 +00:00
aperez
91b87e7a28 Do not create unresolved variables when parsing arrow functions lazily
Arrow function parameter lists are parsed as expressions. When an identifier
is found a VariableProxy is created and added to the list of unresolved
variables for the scope. When parsing a function lazily, the scope has been
already resolved, so with this patch only the VariableProxy is created,
without adding it as an unresolved variable in the scope.

BUG=v8:3501
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26328}
2015-01-29 15:53:15 +00:00
jarin
a4b163a940 [turbofan] Make sure there is space for lazy deopt patching before the constant pool.
BUG=chromium:446647
LOG=n
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26327}
2015-01-29 15:30:32 +00:00
kozyatinskiy
eaae397c42 [V8] Added Script::is_debugger_script flag for embedders
In DevTools we need one more flag for script origin - is debugger script. We already have "is shared origin" flag. The new flag added by analogy with the old but new has accessor in script object.

R=yurys@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26324}
2015-01-29 14:01:33 +00:00
danno
328cf76e35 [turbofan] Improve JSON output
Review URL: https://codereview.chromium.org/882973002

Cr-Commit-Position: refs/heads/master@{#26323}
2015-01-29 12:15:14 +00:00
titzer
f5479ca675 [turbofan] Gracefully bail out if OSR encounters a loop too deeply nested.
R=jarin@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26318}
2015-01-29 09:46:36 +00:00
bmeurer
1df5fed50a [turbofan] Cleanup the NodeProperties.
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26316}
2015-01-29 09:18:09 +00:00