Commit Graph

7730 Commits

Author SHA1 Message Date
mstarzinger
b1d2097dca [turbofan] Disable test-run-jsexceptions/DeoptFinallyReturn
Reason for disabling failure on ARM64 simulator in no-snap mode.

TBR=dslomov@chromium.org
TEST=cctest/test-run-jsexceptions/DeoptFinallyReturn
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#26970}
2015-03-03 18:32:44 +00:00
dslomov
9ff21de548 Revert of Implement subclassing Arrays. (patchset #8 id:130001 of https://codereview.chromium.org/975463002/)
Reason for revert:
Arm compilation again.

Aaaarrrrrghhhhhh!!!

Original issue's description:
> Implement subclassing Arrays.
>
> R=mvstanton@chromium.org,arv@chromium.org,rossberg@chromium.org
> BUG=v8:3930
> LOG=Y
>
> Committed: https://crrev.com/6898da1a28d64d1fb2962804ba566f6d618ffc70
> Cr-Commit-Position: refs/heads/master@{#26960}
>
> Committed: https://crrev.com/8d29cc11a56e77297792fe100986a80b65de0051
> Cr-Commit-Position: refs/heads/master@{#26963}
>
> Committed: https://crrev.com/0705045b50a29cf1273e9e6b86fe6a627d8dcb43
> Cr-Commit-Position: refs/heads/master@{#26966}

TBR=arv@chromium.org,mvstanton@chromium.org,rossberg@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3930

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

Cr-Commit-Position: refs/heads/master@{#26969}
2015-03-03 17:48:12 +00:00
mstarzinger
d016387e81 [turbofan] Add test coverage for deopt within try-catch.
This just contains test, no fixes. Note that some of the tests are
still disabled because they either fail or we don't want ClusterFuzz
to pick up the flag yet.

R=jarin@chromium.org
TEST=cctest/test-run-jsexceptions/Deopt,mjsunit/compiler/try-deopt

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

Cr-Commit-Position: refs/heads/master@{#26968}
2015-03-03 17:23:42 +00:00
dslomov
0705045b50 Implement subclassing Arrays.
R=mvstanton@chromium.org,arv@chromium.org,rossberg@chromium.org
BUG=v8:3930
LOG=Y

Committed: https://crrev.com/6898da1a28d64d1fb2962804ba566f6d618ffc70
Cr-Commit-Position: refs/heads/master@{#26960}

Committed: https://crrev.com/8d29cc11a56e77297792fe100986a80b65de0051
Cr-Commit-Position: refs/heads/master@{#26963}

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

Cr-Commit-Position: refs/heads/master@{#26966}
2015-03-03 17:14:14 +00:00
dslomov
7bf9ef1e39 Revert of Implement subclassing Arrays. (patchset #7 id:110001 of https://codereview.chromium.org/975463002/)
Reason for revert:
Arm buildre complains again (why v8_linux_arm_dbg does not complain?)

Original issue's description:
> Implement subclassing Arrays.
>
> R=mvstanton@chromium.org,arv@chromium.org,rossberg@chromium.org
> BUG=v8:3930
> LOG=Y
>
> Committed: https://crrev.com/6898da1a28d64d1fb2962804ba566f6d618ffc70
> Cr-Commit-Position: refs/heads/master@{#26960}
>
> Committed: https://crrev.com/8d29cc11a56e77297792fe100986a80b65de0051
> Cr-Commit-Position: refs/heads/master@{#26963}

TBR=arv@chromium.org,mvstanton@chromium.org,rossberg@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3930

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

Cr-Commit-Position: refs/heads/master@{#26965}
2015-03-03 16:41:52 +00:00
yangguo
32979cf6d8 Use locker when creating snapshot if necessary.
R=vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26964}
2015-03-03 16:14:15 +00:00
dslomov
8d29cc11a5 Implement subclassing Arrays.
R=mvstanton@chromium.org,arv@chromium.org,rossberg@chromium.org
BUG=v8:3930
LOG=Y

Committed: https://crrev.com/6898da1a28d64d1fb2962804ba566f6d618ffc70
Cr-Commit-Position: refs/heads/master@{#26960}

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

Cr-Commit-Position: refs/heads/master@{#26963}
2015-03-03 16:10:41 +00:00
mvstanton
01e2ba6e19 Revert of Implement subclassing Arrays. (patchset #6 id:90001 of https://codereview.chromium.org/975463002/)
Reason for revert:
ARM build failure...

Original issue's description:
> Implement subclassing Arrays.
>
> R=mvstanton@chromium.org,arv@chromium.org,rossberg@chromium.org
> BUG=v8:3930
> LOG=Y
>
> Committed: https://crrev.com/6898da1a28d64d1fb2962804ba566f6d618ffc70
> Cr-Commit-Position: refs/heads/master@{#26960}

TBR=arv@chromium.org,rossberg@chromium.org,dslomov@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3930

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

Cr-Commit-Position: refs/heads/master@{#26961}
2015-03-03 14:56:09 +00:00
dslomov
6898da1a28 Implement subclassing Arrays.
R=mvstanton@chromium.org,arv@chromium.org,rossberg@chromium.org
BUG=v8:3930
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26960}
2015-03-03 13:40:39 +00:00
bmeurer
a19cfb0ea5 [turbofan] Support inlining of unguarded loops.
Also allow inlining of native functions.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26959}
2015-03-03 13:09:53 +00:00
jarin
d0b8839b35 [turbofan] Take type into account when determining Word32 phi representation.
BUG=
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26958}
2015-03-03 12:23:21 +00:00
mstarzinger
4acbc93dbf Move stack unwinding logic into the runtime.
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26957}
2015-03-03 12:03:14 +00:00
michael_dawson
a3465838bc Contribution of PowerPC port (continuation of 422063005) - currency
Contribution of PowerPC port (continuation of 422063005, 817143002,
866843003, and 901083004. This patch updates the ppc directories
to make them current with changes in common code, removes the
optimization to use the ool constant pool, and excludes tests that
don't pass under the ppc simulator given a 240s timeout.

Subsequent patches will cover:
   - remaining optimizations for PPC
   - 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.

	modified:   src/compiler/ppc/code-generator-ppc.cc
	modified:   src/ic/ppc/handler-compiler-ppc.cc
	modified:   src/ppc/assembler-ppc-inl.h
	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/debug-ppc.cc
	modified:   src/ppc/deoptimizer-ppc.cc
	modified:   src/ppc/frames-ppc.cc
	modified:   src/ppc/frames-ppc.h
	modified:   src/ppc/full-codegen-ppc.cc
	modified:   src/ppc/lithium-codegen-ppc.cc
	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:   test/cctest/cctest.status
	modified:   test/mjsunit/mjsunit.status

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

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26951}
2015-03-03 07:05:00 +00:00
bmeurer
8df194c14a [turbofan] Fix ControlFlowOptimizer to also handle non-control nodes in the control chain.
Review URL: https://codereview.chromium.org/971223002

Cr-Commit-Position: refs/heads/master@{#26949}
2015-03-03 06:11:52 +00:00
Benedikt Meurer
e1c2c9016e [turbofan] Strength reduction of Word32And with Int32Mul.
- (x * (K << L)) & (-1 << L) => x * (K << L)
- ((K << L) * x) & (-1 << L) => x * (K << L)

R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26942}
2015-03-02 13:54:09 +00:00
Dan Carney
1fcedda668 convert object::* to return maybe values
BUG=v8:3929
LOG=y
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26940}
2015-03-02 13:13:31 +00:00
Benedikt Meurer
5f3914fc19 [turbofan] Use the typer to statically detect Smis.
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26939}
2015-03-02 13:10:42 +00:00
Jaroslav Sevcik
f0b11873a3 [turbofan] Fix deferred replacement in simplified lowering.
Deferred replacement must also replace in the pending node vector.

BUG=chromium:463056
LOG=n
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26938}
2015-03-02 12:49:49 +00:00
Sven Panne
602d0dab93 Removed funky Maybe constructor and made fields private.
BUG=v8:3929
LOG=y
R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26937}
2015-03-02 12:22:37 +00:00
Benedikt Meurer
155278d6f2 [turbofan] Skip write barriers when storing smi.
On 64-bit targets, we can skip the write barrier for Store nodes if the
input is ChangeInt32ToTagged, because the value being stored is
definitely represented as a smi then.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26934}
2015-03-02 09:09:08 +00:00
arv
c791d84112 Revert of ES6: Make function name configurable (patchset #10 id:220001 of https://codereview.chromium.org/960343002/)
Reason for revert:
Breaks Chrome browser test that checks Object.name

[16509:16509:0228/030150:INFO:CONSOLE(43)] "Uncaught Error: Clobbered Object.name getter", source: http://www.chromium.org:33611/assertions.js (43)

http://build.chromium.org/p/client.v8/builders/Linux%20Tests%20%28dbg%29%281%29/builds/2328/steps/browser_tests/logs/stdio

Original issue's description:
> ES6: Make function name configurable
>
> This is partially based on r21609 but that CL was incomplete.
>
> Function name is still non writable so one has to use defineProperty
> to change the actual value.
>
> BUG=v8:3333
> LOG=N
> R=adamk, mstarzinger@chromium.org
>
> Committed: https://crrev.com/f7790f7670c8d859455a98fcb90ff1b66af1eca7
> Cr-Commit-Position: refs/heads/master@{#26924}

TBR=adamk@chromium.org,mstarzinger@chromium.org,verwaest@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3333

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

Cr-Commit-Position: refs/heads/master@{#26933}
2015-03-02 00:19:01 +00:00
dslomov
290ee378ea Disallow subclassing Arrays.
R=rossberg@chromium.org,arv@chromium.org
BUG=v8:3930
LOG=Y

Committed: https://crrev.com/87f3e08e72510ee5544e82bb7ad39b2b5f001ad3
Cr-Commit-Position: refs/heads/master@{#26925}

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

Cr-Commit-Position: refs/heads/master@{#26931}
2015-02-28 00:28:35 +00:00
dslomov
65abdb7e4e Revert of Regression test for v8:3930. (patchset #1 id:1 of https://codereview.chromium.org/961353002/)
Reason for revert:
Fails on nosnap builds

Original issue's description:
> Regression test for v8:3930.
>
> R=arv@chromium.org,rossberg@chromium.org
> BUG=v8:3930
> LOG=N
>
> Committed: https://crrev.com/48fb3e83c5882e9818bc1e0a035864b465602aca
> Cr-Commit-Position: refs/heads/master@{#26926}

TBR=arv@chromium.org,rossberg@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3930

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

Cr-Commit-Position: refs/heads/master@{#26929}
2015-02-27 22:24:41 +00:00
arv
4b830859b7 Fix block-for test
The test didn't call the test function.

BUG=v8:3932
LOG=N
TBR=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26927}
2015-02-27 21:22:48 +00:00
dslomov
48fb3e83c5 Regression test for v8:3930.
R=arv@chromium.org,rossberg@chromium.org
BUG=v8:3930
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26926}
2015-02-27 21:21:43 +00:00
arv
f7790f7670 ES6: Make function name configurable
This is partially based on r21609 but that CL was incomplete.

Function name is still non writable so one has to use defineProperty
to change the actual value.

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

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

Cr-Commit-Position: refs/heads/master@{#26924}
2015-02-27 19:29:01 +00:00
adamk
38d7a796b1 Create ImportDeclarations for default imports.
BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26921}
2015-02-27 18:06:32 +00:00
adamk
a7840a2b3e Allow lookup of module exports by export name.
This required fixing the exports_ hash map to use the appropriate
comparison function instead of pointer comparison.

BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26920}
2015-02-27 18:04:56 +00:00
bmeurer
936ae2b814 [turbofan] Avoid generating dead BooleanNot nodes in typed lowering.
Without this shortcut we generate one BooleanNot per JSUnaryNot with
number input, which is quite common in asm.js. These dead nodes then
survive until the late control reducer runs, and may prevent
optimizations in the mean time.

R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26911}
2015-02-27 10:25:05 +00:00
bmeurer
b0f52cad08 [turbofan] Properly unlink dead nodes in simplified lowering.
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26910}
2015-02-27 09:37:54 +00:00
bmeurer
643f020cd2 [x64] Make r12 allocatable.
Review URL: https://codereview.chromium.org/926553004

Cr-Commit-Position: refs/heads/master@{#26907}
2015-02-27 08:04:07 +00:00
svenpanne
5d4c76eae7 Test StringLengthStub generation via TurboFan.
For now we just use the RawMachineAssembler, this will be changed
later to use the whole TurboFan pipeline.

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

Cr-Commit-Position: refs/heads/master@{#26902}
2015-02-27 06:56:59 +00:00
machenbach
885a88166d Revert of Invalidate the global property cell when converting from data to accessor. (patchset #1 id:1 of https://codereview.chromium.org/961003002/)
Reason for revert:
Breaks gc stress, e.g.: http://build.chromium.org/p/client.v8/builders/V8%20GC%20Stress%20-%201/builds/2322

Original issue's description:
> Invalidate the global property cell when converting from data to accessor.
>
> BUG=
> TBR=jkummerow@chromium.org,
>
> Committed: https://crrev.com/6a12dc240b1faffa500ff269077d832ecc74239d
> Cr-Commit-Position: refs/heads/master@{#26896}

TBR=jkummerow@chromium.org,verwaest@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26899}
2015-02-26 21:03:18 +00:00
verwaest
6a12dc240b Invalidate the global property cell when converting from data to accessor.
BUG=
TBR=jkummerow@chromium.org,

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

Cr-Commit-Position: refs/heads/master@{#26896}
2015-02-26 18:48:59 +00:00
adamk
fa293dd79f Re-introduce ImportDeclaration to the parser
This also adds a new VariableMode, IMPORT, which will be
used to do appropriate binding for Import-declared Variables.

Only named imports are handled for now. "import *" and default
import syntaxes have had their TODOs adjusted to match the new
code structure.

BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26895}
2015-02-26 18:41:04 +00:00
ulan
bbf8c0f23d Revert "Revert of Fix memory leak caused by field type in descriptor array."
This reverts commit b57be748b1 and
disables the test/mjsunit/debug-clearbreakpointgroup.js because
BreakLocationIterator::ClearBreakPoint is already broken for unrelated reasons (see v8:3924).

BUG=v8:3877
LOG=N
TEST=cctest/test-heap/Regress3877

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

Cr-Commit-Position: refs/heads/master@{#26893}
2015-02-26 18:38:34 +00:00
arv
392b591e0c Fix issue with class name TDZ in computed property names
BUG=v8:3923
LOG=N
R=marja,rossberg

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

Cr-Commit-Position: refs/heads/master@{#26892}
2015-02-26 18:37:19 +00:00
marja
b57be748b1 Revert of Fix memory leak caused by field type in descriptor array. (patchset #3 id:40001 of https://codereview.chromium.org/955063002/)
Reason for revert:
Breaks test/mjsunit/debug-clearbreakpointgroup.js on arm64.debug.

Original issue's description:
> Fix memory leak caused by field type in descriptor array.
>
> When a field type is a map, it is wrapped in a weak cell upon storing to the descriptor array.
>
> Map::GetFieldType(i) does the unwrapping.
>
> BUG=v8:3877
> LOG=N
> TEST=cctest/test-heap/Regress3877
>
> Committed: https://crrev.com/77d3ae0e119893ac8d34ea6ca090cddd5bbf987e
> Cr-Commit-Position: refs/heads/master@{#26879}

TBR=verwaest@chromium.org,ulan@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3877

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

Cr-Commit-Position: refs/heads/master@{#26883}
2015-02-26 14:46:07 +00:00
marja
1eddcf5b71 [strong] Declaration-after-use errors.
We cannot yet detect use-before-declaration in general, because for that we'd
need to analyze the context when compiling. But we can detect an error case
where we first see a use, then a declaration.

For this, I also added end position tracking (needed for error messages) to
VariableProxy.

Note: the position naming is completely inconsistent: start_position &
end_position, position & end_position, pos & end_pos, beg_pos & end_pos, to name
a few. This doesn't fix all of it, but tries to unify towards start_position &
end_position whenever possible w/ minimal changes.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26880}
2015-02-26 13:48:19 +00:00
ulan
77d3ae0e11 Fix memory leak caused by field type in descriptor array.
When a field type is a map, it is wrapped in a weak cell upon storing to the descriptor array.

Map::GetFieldType(i) does the unwrapping.

BUG=v8:3877
LOG=N
TEST=cctest/test-heap/Regress3877

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

Cr-Commit-Position: refs/heads/master@{#26879}
2015-02-26 13:16:39 +00:00
verwaest
b5fc4b808c Remove internal use of v8::AccessType, always pass v8::ACCESS_HAS instead.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26874}
2015-02-26 10:34:50 +00:00
bmeurer
0f783c676b [turbofan] Fix bogus covering of Word64Equal w/ zero.
Review URL: https://codereview.chromium.org/960783002

Cr-Commit-Position: refs/heads/master@{#26870}
2015-02-26 07:18:42 +00:00
arv
75a2440982 Minor test fix to block binding
The test did not invoke the function

BUG=v8:3921
LOG=N
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#26869}
2015-02-25 23:27:14 +00:00
verwaest
6b1bddb454 Remove NativeContext from Literal array, since we always create the literals in the native context of the current closure.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26867}
2015-02-25 22:41:48 +00:00
adamk
8b33567fd3 Simplify error message logic in ParseImportNames
The new logic ensures that the error messages are the same in the
"import { <reserved word> }" and "import { foo as <reserved ord> }"
cases.

Also prepares ParseImportNames for returning both the import and local
names to ParseImportClause.

BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26863}
2015-02-25 19:40:54 +00:00
dcarney
e928c9d52b [turbofan] remove dependence of InstructionBlock on BasicBlock
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26859}
2015-02-25 16:37:58 +00:00
rossberg
68c8073a51 Remove effectful assertion
R=mstarzinger@chromium.org
BUG=461520
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26857}
2015-02-25 15:34:21 +00:00
ben
726eb0582b Add v8::Object::GetRealNamedPropertyAttributes()
Add v8::Object::GetRealNamedPropertyAttributes() and
v8::Object::GetRealNamedPropertyAttributesInPrototypeChain().

See https://github.com/iojs/io.js/issues/864 for background.

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

Cr-Commit-Position: refs/heads/master@{#26855}
2015-02-25 15:09:20 +00:00
rossberg
c094da9233 [strong] Make functions and generators non-extensible non-constructors
R=dslomov@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26854}
2015-02-25 14:52:51 +00:00
yangguo
4b5ff0c5e2 Attach snapshot data blob to the isolate.
R=vogelheim@chromium.org
BUG=chromium:461259
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26845}
2015-02-25 11:14:56 +00:00
bmeurer
b1c2a34956 [turbofan] Don't introduce additional computation when hoisting out of loops.
Review URL: https://codereview.chromium.org/958533002

Cr-Commit-Position: refs/heads/master@{#26841}
2015-02-25 08:11:48 +00:00
adamk
1a8dc98cbf Fix up ParseProgram and ParseModule to do something sane with module scopes
The FunctionLiteral returned from the parser for modules now has a MODULE_SCOPE,
instead of associating the module scope with a Block inside it. This makes
it easy to get at the ModuleDescriptor from the caller of Parse(), so I've added
a basic test that pokes at the scope and the descriptor. Expect more tests
in this vein.

BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26836}
2015-02-24 22:39:35 +00:00
jkummerow
affcfaf428 Move Maps' back pointers from "transitions" to "constructor" field
Review URL: https://codereview.chromium.org/950283002

Cr-Commit-Position: refs/heads/master@{#26835}
2015-02-24 20:50:24 +00:00
michael_dawson
bf3691ae88 Contribution of PowerPC port (continuation of 422063005) - PPC opt 2
Contribution of PowerPC port (continuation of 422063005, 817143002,
866843003, and 901083004. The bulk of the changes are to remove some
hard coded assumptions about heap page size within existing tests.
The remaining change is to use a larger heap page size for PPC linux
as this provides a performance benefit due to the larger memory page size.

	modified:   src/base/build_config.h
	modified:   src/heap/heap.cc
	modified:   test/cctest/test-alloc.cc
	modified:   test/cctest/test-constantpool.cc
	modified:   test/cctest/test-heap.cc
	modified:   test/cctest/test-spaces.cc
	modified:   test/cctest/test-weakmaps.cc
	modified:   test/cctest/test-weaksets.cc

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

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26833}
2015-02-24 19:05:29 +00:00
dslomov
675f7d2d5a Invalidate property cells for non-existent properties properly.
R=verwaest@chromium.org
BUG=v8:3914
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26822}
2015-02-24 13:05:13 +00:00
rossberg
943dc63126 [strong] Deprecate ellisions
R=marja@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26820}
2015-02-24 12:51:08 +00:00
dcarney
95df1bc266 [turbofan] optimize moves into merges
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26819}
2015-02-24 12:49:33 +00:00
bmeurer
dcf193f18c [turbofan] Strength reduction for inline comparisons.
Perform strength reduction on machine operators with inline comparisons:

  CMP & 1 => CMP
  1 & CMP => CMP
  CMP << 31 >> 31 => CMP

Also strength reduce the following constructs:

  x + (0 - y) => x - y
  (0 - y) + x => x - y

R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26817}
2015-02-24 12:26:29 +00:00
mstarzinger
b33f552f34 Make sure exception handlers are deferred.
R=bmeurer@chromium.org
TEST=unittests/SchedulerTest.CallException

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

Cr-Commit-Position: refs/heads/master@{#26816}
2015-02-24 11:44:57 +00:00
dcarney
43c7345b35 [turbofan] only use two gaps
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26814}
2015-02-24 11:09:20 +00:00
yangguo
dafd73016c Reland "Correctly propagate terminate exception in TryCall."
BUG=v8:3892
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26810}
2015-02-24 08:30:30 +00:00
bmeurer
0882d3ff81 [turbofan] Initial version of branch cloning.
This implements a special case of block cloning to recognize constructs like

 if (a ? b : c) { ... }

that happen to be generated by Emscripten quite often.

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

Cr-Commit-Position: refs/heads/master@{#26808}
2015-02-24 07:41:36 +00:00
arv
87f77d6aba for-of should throw if result object is not an object
This is done using desugaring. Before this we had:

  result = iterator.next()

with this we instead do:

  !%_IsSpecObject(result = iterator.next()) &&
      %ThrowIteratorResultNotAnObject(result)

BUG=v8:3916
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26805}
2015-02-23 23:34:38 +00:00
arv
36e72aedf0 ES6 collections: Fix order of constructor logic
The adder should be gotten before the iterator.

Motivation: Once this is done we should be able to use a for-of loop
instead which leads to cleaner code and correct behavior once the
for-of loop correctly supports abrupt completion.

BUG=None
LOG=N
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#26803}
2015-02-23 18:55:46 +00:00
arv
3a8e496fa4 Promise.all and race should work with iterables
BUG=v8:3705
LOG=N
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26801}
2015-02-23 18:10:14 +00:00
verwaest
460187b563 Revert "The expected key is a valid identifier, which is already free of \\, <0x20, "."
The optimization is invalid as indicated by the test.

BUG=
TBR=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26799}
2015-02-23 17:57:17 +00:00
ishell
4349b186b7 More tests added to cctest/tests/test-migrations.cc.
This also includes a regression test for crbug/459512.

BUG=chromium:459512
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26795}
2015-02-23 11:59:50 +00:00
dcarney
102ddf35cf disable some harmony scoping tests
R=verwaest@chromium.org

BUG=v8:3914
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26794}
2015-02-23 11:58:54 +00:00
machenbach
035b144b16 Revert of Correctly propagate terminate exception in TryCall. (patchset #2 id:20001 of https://codereview.chromium.org/928193002/)
Reason for revert:
See crbug.com/460412 and crbug.com/460356. Reverting on master in order to roll from master again soon.

Original issue's description:
> Correctly propagate terminate exception in TryCall.
>
> BUG=v8:3892
> LOG=Y
>
> Committed: https://crrev.com/a49b55b78844557b65a98e7a77dd26078157ed7f
> Cr-Commit-Position: refs/heads/master@{#26685}

TBR=ishell@chromium.org,yangguo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3892

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

Cr-Commit-Position: refs/heads/master@{#26792}
2015-02-23 07:17:30 +00:00
bmeurer
61ac461330 Revert of [x64] Improve instruction selection for TruncateInt64ToInt32. (patchset #1 id:1 of https://codereview.chromium.org/936323004/)
Reason for revert:
Breaks SQLite

Original issue's description:
> [x64] Improve instruction selection for TruncateInt64ToInt32.
>
> R=svenpanne@chromium.org
>
> Committed: https://crrev.com/64a2717529e2197f3a789adabf86ca36f5eb764c
> Cr-Commit-Position: refs/heads/master@{#26739}

TBR=svenpanne@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#26791}
2015-02-23 07:09:26 +00:00
arv
925364f5b4 Fix issue with -0 in Maps
Because we generated a different hash code for 0 and -0 we ended up
not even getting to the SameValueZero check.

BUG=v8:3906
LOG=N
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#26787}
2015-02-20 21:02:55 +00:00
arv
fa1523ea6e ES6: Fix GetIterator
After further spec reading it turns out that we should not do ToObject
on the iterable.

BUG=None
LOG=N
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#26786}
2015-02-20 20:07:21 +00:00
yangguo
0aa1d2af37 Fix GC-unsafe use of BreakLocationIterator.
R=svenpanne@chromium.org
BUG=v8:3776
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26779}
2015-02-20 14:47:35 +00:00
mstarzinger
eb3bbd3da4 Cleanup scheduler unit test a bit.
R=bmeurer@chromium.org
TEST=unittests/SchedulerTest,unittests/SchedulerRPOTest

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

Cr-Commit-Position: refs/heads/master@{#26778}
2015-02-20 14:38:11 +00:00
mstarzinger
7dba829be9 Add missing test for CollectControlProjections on calls.
R=bmeurer@chromium.org
TEST=unittests/NodePropertiesTest.CollectControlProjections_Call

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

Cr-Commit-Position: refs/heads/master@{#26777}
2015-02-20 14:05:18 +00:00
bmeurer
6c701d1597 [turbofan] Don't compute unneeded gray set in AllNodes.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26773}
2015-02-20 12:30:30 +00:00
Yang Guo
c4d2234e79 Disable failing debug tests in gc-stress.
TBR=machenbach@chromium.org
BUG=v8:3776
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26769}
2015-02-20 11:15:27 +00:00
mstarzinger
6fe12676ce Simplify computation of environment stack delta.
R=titzer@chromium.org
TEST=cctest/test-run-jsexceptions/CatchCall

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

Cr-Commit-Position: refs/heads/master@{#26768}
2015-02-20 10:48:21 +00:00
Benedikt Meurer
9e6181d5c3 [turbofan] Finally get rid of the generic algorithm.
R=svenpanne@chromium.org

Committed: https://crrev.com/5bbe693e4817011b6a496c638c9f09026fd3dac9
Cr-Commit-Position: refs/heads/master@{#26760}

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

Cr-Commit-Position: refs/heads/master@{#26767}
2015-02-20 10:12:00 +00:00
mstarzinger
6881d7609a Model exceptional edges from call nodes in TurboFan.
R=titzer@chromium.org,bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26766}
2015-02-20 09:55:00 +00:00
yangguo
afb2706103 Limit size of first page based on serialized data.
R=hpayer@chromium.org
BUG=chromium:453111
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26764}
2015-02-20 09:34:11 +00:00
machenbach
c7810004bb Revert of [turbofan] Finally get rid of the generic algorithm. (patchset #2 id:20001 of https://codereview.chromium.org/944803002/)
Reason for revert:
Breaks dbg builds.

Original issue's description:
> [turbofan] Finally get rid of the generic algorithm.
>
> R=svenpanne@chromium.org
>
> Committed: https://crrev.com/5bbe693e4817011b6a496c638c9f09026fd3dac9
> Cr-Commit-Position: refs/heads/master@{#26760}

TBR=svenpanne@chromium.org,bmeurer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#26763}
2015-02-20 09:14:44 +00:00
Benedikt Meurer
5bbe693e48 [turbofan] Finally get rid of the generic algorithm.
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26760}
2015-02-20 08:42:51 +00:00
arv
b9f006a404 Align GetIterator with ES6 spec
BUG=None
LOG=N
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#26759}
2015-02-19 21:38:18 +00:00
adamk
a538d945e3 Teach ModuleDescriptor about basic local exports
Add() becomes AddLocalExport, which takes an export_name and a local_name.
New parsing tests exercise this.

Also start generating exports for default exports (though this doesn't yet
handle anonymous default exports).

BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26758}
2015-02-19 20:15:13 +00:00
rossberg
7b49ed658c [strong] make function and class declarations lexical & immutable
R=arv@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26755}
2015-02-19 16:49:19 +00:00
arv
0cffc08b66 Super store
When the property is not found on the [[HomeObject]] prototype chain
then we should do a [[DefineOwnProperty]] on the instance.

BUG=v8:3330
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26754}
2015-02-19 16:15:35 +00:00
rossberg
0ebd870f72 [strong] Deprecate arguments
R=marja@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26753}
2015-02-19 14:58:42 +00:00
rossberg
7d089a5929 [strong] Deprecate for-in
R=marja@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26751}
2015-02-19 13:50:41 +00:00
titzer
8e241468ed [turbofan] Transfer types from loop phis to OSR values.
R=jarin@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26746}
2015-02-19 12:38:54 +00:00
titzer
d050c331eb [turbofan] Simplify context specialization and fix for OSR.
AstGraphBuilder puts a constant context in from the beginning.
Also fix bug in merging contexts in environment.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26745}
2015-02-19 11:36:50 +00:00
rossberg
4c082b570d Make generator constructors configurable
R=mstarzinger@chromium.org
BUG=v8:3902
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26744}
2015-02-19 11:30:33 +00:00
jarin
9951e1e5f0 [turbofan] Fix typing of comparisons.
BUG=chromium:459955
LOG=n
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26743}
2015-02-19 10:56:23 +00:00
loislo
36ed9ca348 A few tests fails when I run them with --hydrogen-track-positions
The root of problem is the fact that we don't track the position of 'this' statement but use them when visit compare statement.
As a result we have -1 as the position of left expression and the resulting relative position is negative and doesn't fit into BitField.

BUG=452067
TEST=test-cpu-profiler/SourceLocation
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26741}
2015-02-19 10:07:54 +00:00
ulan
5242700da4 Revert "Remove IC age from Code."
This reverts commit 3cd889 for regressing Kraken benchmark

BUG=chromium:457174
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26740}
2015-02-19 09:56:19 +00:00
Benedikt Meurer
64a2717529 [x64] Improve instruction selection for TruncateInt64ToInt32.
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26739}
2015-02-19 09:41:53 +00:00
hpayer
206e9136bd Unlink pages from the space page list after evacuation.
BUG=430201
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26738}
2015-02-19 09:28:59 +00:00
marja
90501dd703 [strong] Remove a regression test for "use before var".
This case should break in strong mode (unlike previously thought).

R=rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26726}
2015-02-18 16:12:51 +00:00
ishell
34b5565eb6 Fix for cctest/test-api/SetJitCodeEventHandler: generate less objects during execution to avoid unwanted GCs.
BUG=v8:3899
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26721}
2015-02-18 14:02:58 +00:00
mstarzinger
7e7e85f32e Introduce and test NodeProperties::CollectControlProjections.
R=bmeurer@chromium.org
TEST=unittests/NodePropertiesTest.CollectControlProjections

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

Cr-Commit-Position: refs/heads/master@{#26720}
2015-02-18 13:55:32 +00:00