Commit Graph

30422 Commits

Author SHA1 Message Date
bradnelson
600ddaee0e Reduce bucket count and range for wasm function count, and add "module" to some names.
BUG= https://code.google.com/p/v8/issues/detail?id=4203
BUG= https://bugs.chromium.org/p/chromium/issues/detail?id=575167
TEST=None
R=ahaas@chromium.org,isherman@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35680}
2016-04-21 00:20:27 +00:00
rmcilroy
04927031d0 [Interpreter] Fix typo in generate-bytecode-expectations.
BUG=v8:4681
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35679}
2016-04-20 21:05:42 +00:00
adamk
e96cbdcdd6 More accurately record an end position for default parameters in arrows
Our previous over-conservative answer caused us to emit hole checks in
full-codegen when eagerly parsing but not when lazily parsing.

With this patch, we use the positions of the BinaryOperations making up
the parameter list (which are the positions of the commas) to determine
the appropriate "end position" for each parameter's initializer. This means
that we get accurate-enough positions for the initializers in the eager
parsing step to get the same answers for hole-check-elimination that we
will later during ParseLazy.

In the included test case, for example:

  (function() { ((s = 17, y = s) => s)(); } )();
                        ^2     ^1

The old code would generate a hole check when trying to load
|s| for assignment to |y| (because it treated the closing parentheses
pointed to by "^1" as the "initialization position" of |s|).

The new code uses the comma pointed to by "^2" as the initialization
position of |s|. Since that occurs textually before the load of |s|,
full-codegen knows it can avoid the hole check.

BUG=v8:4908
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#35678}
2016-04-20 20:49:16 +00:00
jyan
2f2b3040b5 S390: [turbofan] CodeGenerator: Frame setup refactoring
Port 81a1530e6f

Original commit message:

    Before frame elision, we finalized the frame shape when assembling the
    prologue, which is also when we prepared the frame (saving sp, etc).

    The frame finalization only needs to happen once, and happens to be
    actually a set of idempotent operations. With frame elision, the logic for
    frame finalization was happening every time we constructed the frame.
    Albeit idempotent operations, the code would become hard to maintain.

    This change separates frame shape finalization from frame
    construction. When constructing the CodeGenerator, we finalize the
    frame. Subsequent access is to a const Frame*.

    Also renamed AssemblePrologue to AssembleConstructFrame, as
    suggested in the frame elision CR.

    Separating frame setup gave the opportunity to do away with
    architecture-independent frame aligning (which is something just arm64
    cares about), and also with stack pointer setup (also arm64). Both of
    these happen now at frame finalization on arm64.

R=mtrofin@chromium.org, joransiu@ca.ibm.com, bjaideep@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35677}
2016-04-20 20:39:03 +00:00
littledan
f32e30240d Detach ArrayBuffer in test262
New incoming test262 tests check what happens on detached ("neutered")
ArrayBuffers. This patch makes the test262 infrastructure define
detaching an ArrayBuffer in terms of %ArrayBufferNeuter, passing the
--allow-natives-syntax flag, when it is needed.

BUG=v8:4193
LOG=N
R=adamk,machenbach

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

Cr-Commit-Position: refs/heads/master@{#35676}
2016-04-20 19:44:05 +00:00
bryleun
5ce4a69a1f S390: Fixed LBR, LGBR, LHR, LGHR instructions in simulator.
R=joransiu@ca.ibm.com,michael_dawson@ca.ibm.com,mbrandy@us.ibm.com,jyan@ca.ibm.com

BUG=

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

Cr-Commit-Position: refs/heads/master@{#35675}
2016-04-20 18:38:44 +00:00
bjaideep
a9cb48bf37 PPC: [turbofan] CodeGenerator: Frame setup refactoring
Port 81a1530e6f

Original commit message:

    Before frame elision, we finalized the frame shape when assembling the
    prologue, which is also when we prepared the frame (saving sp, etc).

    The frame finalization only needs to happen once, and happens to be
    actually a set of idempotent operations. With frame elision, the logic for
    frame finalization was happening every time we constructed the frame.
    Albeit idempotent operations, the code would become hard to maintain.

    This change separates frame shape finalization from frame
    construction. When constructing the CodeGenerator, we finalize the
    frame. Subsequent access is to a const Frame*.

    Also renamed AssemblePrologue to AssembleConstructFrame, as
    suggested in the frame elision CR.

    Separating frame setup gave the opportunity to do away with
    architecture-independent frame aligning (which is something just arm64
    cares about), and also with stack pointer setup (also arm64). Both of
    these happen now at frame finalization on arm64.

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

BUG=
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35674}
2016-04-20 18:22:19 +00:00
jyan
70d2c1cfd0 S390: Remove all non-function-name uses of CONST_LEGACY
Port 59546149c6

Original commit message:

    Now that all 'const' declarations are of the ES2015 variety, the only
    use of CONST_LEGACY is for function name bindings in sloppy mode
    named function expressions.

    This patch aims to delete all code meant to handle other cases, which
    mostly had to do with hole initialization/hole checks. Since function
    name bindings are initialized at entry to a function, it's impossible
    to ever observe one in an uninitialized state.

    To simplify the patch further, it removes the `IMPORT` VariableMode,
    as it's not likely to be needed (IMPORT is identical to CONST for
    the purpose of VariableMode).

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

BUG=
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35673}
2016-04-20 18:06:00 +00:00
jyan
b2a36b9e3c S390: [Interpreter] Remove register file register and replace with LoadParentFramePointer.
Port 623ad7de88

Original commit message:

    Removes the register file machine register from the interpreter and
    replaces it will loads from the parent frame pointer. As part of this
    change the raw operand values for register values changes to enable the
    interpreter to keep using the operand value as the offset from the
    parent frame pointer.

R=rmcilroy@chromium.org, joransiu@ca.ibm.com, bjaideep@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35672}
2016-04-20 17:20:32 +00:00
bjaideep
7d8e279a7b PPC: [regexp] do not assume short external strings have a minimum size.
Port 3518e492c0

Original commit message:

    Short external strings do not cache the resource data, and may be used
    for compressible strings. The assumptions about their lengths is
    invalid and may lead to oob reads.

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

BUG=v8:4923,chromium:604897
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35671}
2016-04-20 16:53:53 +00:00
machenbach
921381bc13 Revert of [wasm] Also test structured stack trace (patchset #4 id:60001 of https://codereview.chromium.org/1875153002/ )
Reason for revert:
Breaks:
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20-%20custom%20snapshot%20-%20debug/builds/6322

Original issue's description:
> [wasm] Also test structured stack trace
>
> This extends the wasm test case which only checks the "simple"
> string-variant of the stack trace.
> It checks the return values of the getFunctionName, getLineNumber,
> getFileName and toString methods.
>
> R=ahaas@chromium.org, jfb@chromium.org, titzer@chromium.org
> BUG=

TBR=ahaas@chromium.org,jfb@chromium.org,titzer@chromium.org,clemensh@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#35670}
2016-04-20 16:25:21 +00:00
clemensh
0fd76cc29c Ignore test failure for today
Fix tomorrow.

BUG=
TBR=mstarzinger@chromium.org,machenbach@chromium.org
NOTRY=true
NOTREECHECKS=true

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

Cr-Commit-Position: refs/heads/master@{#35669}
2016-04-20 16:23:09 +00:00
rmcilroy
8fc0e2a72e Disable InterpreterCreateArguments on nosnap due to issue with --mstackalign flag.
BUG=v8:4928
LOG=N
TBR=machenbach@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#35668}
2016-04-20 15:48:36 +00:00
littledan
8b7b5a6f45 Pass the --module flag to test262 tests with modules enabled
This causes an incoming test262 test to pass, as part of the next
test262 roll.

R=adamk,machenbach
BUG=v8:1569
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35667}
2016-04-20 15:44:30 +00:00
clemensh
782c204c80 [wasm] Also test structured stack trace
This extends the wasm test case which only checks the "simple"
string-variant of the stack trace.
It checks the return values of the getFunctionName, getLineNumber,
getFileName and toString methods.

R=ahaas@chromium.org, jfb@chromium.org, titzer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#35666}
2016-04-20 15:20:18 +00:00
clemensh
ec8e14e697 [wasm] Add a cctest for the stack on a wasm trap
In contrast to the existing cctest, this time the error is not thrown
from javascript, but by a trap in wasm. And in contrast to the mjsunit
tests, this checks the detailed stack trace, not the simple one.

R=jfb@chromium.org, mstarzinger@chromium.org, titzer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#35665}
2016-04-20 15:10:05 +00:00
clemensh
b1434ac460 [wasm] Throw real Error on wasm trap
Before, just a string was thrown, so no stack trace was attached there.
Generated code from wasm does not grow by this change, we just pass a
message id to the respective (new) runtime function.

R=mstarzinger@chromium.org, titzer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#35664}
2016-04-20 14:53:28 +00:00
ahaas
965e6bdc0a [wasm] Wasm functions with int64 parameters can now be called from JS.
All wasm spec tests can now be run on ia32.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#35663}
2016-04-20 14:45:08 +00:00
thakis
5459468dd6 32-bit linux: Force 16-byte stack alignment.
clang assumes 16-byte stack alignment, but incoming stack alignment isn't
always guaranteed to be that way.  It looks like v8 was lucky to not hit
this so far.

See https://crbug.com/418554 -- this makes v8's standalone config match
Chromium.  See also https://llvm.org/bugs/show_bug.cgi?id=21414

Maybe it's possible to change the caller of OnEntryHook() to guarantee
the right alignment, but matching Chromium's build flags here seems like
a good idea in general.

BUG=v8:4928
LOG=n

Committed: https://crrev.com/3afb3324941625559635380ef98a2ee73e370a0a
Cr-Commit-Position: refs/heads/master@{#35597}

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

Cr-Commit-Position: refs/heads/master@{#35662}
2016-04-20 14:29:57 +00:00
mstarzinger
2e9920afd0 [compiler] Rename "baseline" to "unoptimized" in pipeline.
This is just a pure renaming because "baseline" will be the code name
for our upcoming middle tier within the compilation pipeline. It makes
sure the name "baseline" remains unused.

R=rmcilroy@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#35661}
2016-04-20 14:13:25 +00:00
yangguo
3518e492c0 [regexp] do not assume short external strings have a minimum size.
Short external strings do not cache the resource data, and may be used
for compressible strings. The assumptions about their lengths is
invalid and may lead to oob reads.

R=jkummerow@chromium.org
BUG=v8:4923,chromium:604897
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35660}
2016-04-20 13:57:08 +00:00
mbrandy
4e93ce4f62 PPC: [crankshaft] Address the deoptimization loops of Math.floor, Math.round and Math.ceil.
Port 978ad03b92

Original commit message:
    Fix and re-enable the flexible representation for Math.floor (which is used to
    implement Math.ceil) and Math.round, which allows Math.floor and Math.round to
    return double results instead of int32, and therefore allows values outside
    the int32 range, especially -0 is now a valid result, which doesn't deopt.

    Also port this feature to x64 and ia32 when the CPU supports the SSE4.1
    extension.

    This addresses all the known deoptimization loops related to Math.round
    in the Kraken benchmark suite, and seems to also address most of the
    deoptimization loops related to Math.floor in the Oort Online benchmark.

    Drive-by-fix: Import the regression tests for the broken HMathFloorOfDiv
    optimization that caused the initial revert of the feature (for arm64 only
    back then).

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=chromium:476477,v8:2890,v8:4059
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#35659}
2016-04-20 13:34:54 +00:00
jyan
aef33eda09 S390: Change calling convention of CallApiGetterStub to accept the AccessorInfo
Port d2b0a4b727

Original commit message:

    MIPS port contributed by Balazs Kilvady <balazs.kilvady@imgtec.com>;

R= verwaest@chromium.org, joransiu@ca.ibm.com, bjaideep@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35658}
2016-04-20 13:26:38 +00:00
jyan
fea4ddaaa8 S390: [Atomics] Remove Atomics code stubs; use TF ops
Port d412cfa26c

Original commit message:
    [Atomics] Remove Atomics code stubs; use TF ops

    Reland of (https://codereview.chromium.org/1891033002)

    This is a much cleaner solution, which won't require nearly as much
    architecture-specific code. Thanks bmeurer@!

R=binji@chromium.org, joransiu@ca.ibm.com, bjaideep@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=v8:4614
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35657}
2016-04-20 13:20:29 +00:00
mlippautz
871d0603d8 [heap] Disallow allocation on the last page in address range
BUG=

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

Cr-Commit-Position: refs/heads/master@{#35656}
2016-04-20 13:02:10 +00:00
ahaas
0c6ec35ba4 [wasm] Copy the tagged-to-int32/float64 and int32/float64-to-tagged code to the wasm compiler.
Thereby we can get rid of the use of Typer and ChangeLowering in the
wasm compiler.

BUG=v8:4914
R=titzer@chromium.org, bmeurer@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35655}
2016-04-20 11:44:14 +00:00
hlopko
194a04d735 We need to empty the deque after EmbedderHeapTracer::TracePrologue, and we don't have to empty the deque after ProcessEphemeralMarking, as the deque should be empty already.
BUG=468240
LOG=no

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

Cr-Commit-Position: refs/heads/master@{#35654}
2016-04-20 11:11:45 +00:00
mstarzinger
59d08247c7 [compiler] Remove CompilationInfo::abstract_code accessor.
In the long run we do not want to rely on compilation results being
available on the CompilationInfo. This removes the accessor for the
abstract code, which is very inviting to be used outside of compilation
pipeline.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#35653}
2016-04-20 11:07:41 +00:00
verwaest
89606003af Always include js-getter as separate field in AccessorInfo
Due to cross-compilation from simulator-builds into non-simulator with snapshot it's complicated to conditionally include an extra field. Given that the memory overhead should be minimal, just always include a separate field instead.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#35652}
2016-04-20 09:55:16 +00:00
titzer
b994ad45b0 [turbofan] Length and index2 are unsigned in CheckedLoad/CheckedStore.
Also factor out test cases from test-run-machops.cc into test-run-load-store.cc

BUG=chromium:599717
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#35651}
2016-04-20 09:35:06 +00:00
vogelheim
ed9b7d92e7 Prevent un-parsed LiteralFunction reaching the compiler.
BUG=chromium:604044
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#35650}
2016-04-20 09:35:05 +00:00
mlippautz
2489738d4a [heap] Add page evacuation mode for new->old
In a full mark-compact GC, instead of copying memory to old space for
pages that have more than X% live bytes, we just move the whole page over to old
space.

X=70 (default value)

BUG=chromium:581412
LOG=N
TBR=hpayer@chromium.org

This reverts commit 8b3337278f.

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

Cr-Commit-Position: refs/heads/master@{#35649}
2016-04-20 09:30:40 +00:00
zhengxing.li
7e88aa3d81 X87: [turbofan] CodeGenerator: Frame setup refactoring.
port 81a1530e6f (r35642)

  original commit message:
  Before frame elision, we finalized the frame shape when assembling the
  prologue, which is also when we prepared the frame (saving sp, etc).

  The frame finalization only needs to happen once, and happens to be
  actually a set of idempotent operations. With frame elision, the logic for
  frame finalization was happening every time we constructed the frame.
  Albeit idempotent operations, the code would become hard to maintain.

  This change separates frame shape finalization from frame
  construction. When constructing the CodeGenerator, we finalize the
  frame. Subsequent access is to a const Frame*.

  Also renamed AssemblePrologue to AssembleConstructFrame, as
  suggested in the frame elision CR.

  Separating frame setup gave the opportunity to do away with
  architecture-independent frame aligning (which is something just arm64
  cares about), and also with stack pointer setup (also arm64). Both of
  these happen now at frame finalization on arm64.

  additional message:
  This CL also removed the temporary workaround for CL #35139 (53d51c52f3)

BUG=

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

Cr-Commit-Position: refs/heads/master@{#35648}
2016-04-20 08:52:22 +00:00
mstarzinger
85870e8698 [compiler] Extract scope info installation into helper.
This moves the installation of the scope info object on the shared
function info into a separate helper to share common code. This is
preparatory work in order to reuse existing scope info objects.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#35647}
2016-04-20 08:52:21 +00:00
mstarzinger
45ad04fdd2 [compiler] Remove remnants from concurrent OSR.
This removes some obsolete conditions checking whether we are performing
concurrent OSR compilation. This feature has been removed some time ago.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#35646}
2016-04-20 08:49:58 +00:00
hablich
37f4cf189b Reland of Change calling convention of CallApiGetterStub to accept the AccessorInfo (patchset #1 id:1 of https://codereview.chromium.org/1906453002/ )
Reason for revert:
Needs other reverts too.

Original issue's description:
> Revert of Change calling convention of CallApiGetterStub to accept the AccessorInfo (patchset #8 id:140001 of https://codereview.chromium.org/1892533004/ )
>
> Reason for revert:
> Blocks roll: https://codereview.chromium.org/1896103002/
>
> Can also be seen on internal waterfall: https://chromegw.corp.google.com/i/internal.client.v8/builders/v8_cros_perf_1/builds/7558
>
> Original issue's description:
> > Change calling convention of CallApiGetterStub to accept the AccessorInfo
> >
> > MIPS port contributed by Balazs Kilvady <balazs.kilvady@imgtec.com>
> >
> > Committed: https://crrev.com/d2b0a4b727f77f97960c7fa71da3431591dc959f
> > Cr-Commit-Position: refs/heads/master@{#35606}
>
> TBR=rodolph.perfetta@arm.com,jkummerow@chromium.org,jacob.bramley@arm.com,verwaest@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true

TBR=rodolph.perfetta@arm.com,jkummerow@chromium.org,jacob.bramley@arm.com,verwaest@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#35645}
2016-04-20 08:02:59 +00:00
hablich
12d727a86e Revert of Change calling convention of CallApiGetterStub to accept the AccessorInfo (patchset #8 id:140001 of https://codereview.chromium.org/1892533004/ )
Reason for revert:
Blocks roll: https://codereview.chromium.org/1896103002/

Can also be seen on internal waterfall: https://chromegw.corp.google.com/i/internal.client.v8/builders/v8_cros_perf_1/builds/7558

Original issue's description:
> Change calling convention of CallApiGetterStub to accept the AccessorInfo
>
> MIPS port contributed by Balazs Kilvady <balazs.kilvady@imgtec.com>
>
> Committed: https://crrev.com/d2b0a4b727f77f97960c7fa71da3431591dc959f
> Cr-Commit-Position: refs/heads/master@{#35606}

TBR=rodolph.perfetta@arm.com,jkummerow@chromium.org,jacob.bramley@arm.com,verwaest@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#35644}
2016-04-20 07:25:01 +00:00
bmeurer
95f0d4ed39 [turbofan] Remove phase ordering problem in JSToNumber lowering.
Previously we had to run SimplifiedLowering, ChangeLowering and
JSGenericLowering independently and exactly in this order to
achieve great performance for the common case of JSToNumber (i.e.
input is already a Smi or a HeapNumber). This phase ordering
problem already causes trouble with not being able to run the
generic lowering phase earlier, but also blocks proper plain
primitive ToNumber optimizations. So this properly integrates
JSToNumber into the truncation analysis and optimizes according
to the truncation (either Word32 or Float64).

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#35643}
2016-04-20 06:06:54 +00:00
mtrofin
81a1530e6f [turbofan] CodeGenerator: Frame setup refactoring
Before frame elision, we finalized the frame shape when assembling the
prologue, which is also when we prepared the frame (saving sp, etc).

The frame finalization only needs to happen once, and happens to be
actually a set of idempotent operations. With frame elision, the logic for
frame finalization was happening every time we constructed the frame.
Albeit idempotent operations, the code would become hard to maintain.

This change separates frame shape finalization from frame
construction. When constructing the CodeGenerator, we finalize the
frame. Subsequent access is to a const Frame*.

Also renamed AssemblePrologue to AssembleConstructFrame, as
suggested in the frame elision CR.

Separating frame setup gave the opportunity to do away with
architecture-independent frame aligning (which is something just arm64
cares about), and also with stack pointer setup (also arm64). Both of
these happen now at frame finalization on arm64.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#35642}
2016-04-20 05:41:06 +00:00
zhengxing.li
b94e9d885c X87: Remove all non-function-name uses of CONST_LEGACY.
port 59546149c6 (r35632)

  original commit message:
  Now that all 'const' declarations are of the ES2015 variety, the only
  use of CONST_LEGACY is for function name bindings in sloppy mode
  named function expressions.

  This patch aims to delete all code meant to handle other cases, which
  mostly had to do with hole initialization/hole checks. Since function
  name bindings are initialized at entry to a function, it's impossible
  to ever observe one in an uninitialized state.

  To simplify the patch further, it removes the `IMPORT` VariableMode,
  as it's not likely to be needed (IMPORT is identical to CONST for
  the purpose of VariableMode).

BUG=

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

Cr-Commit-Position: refs/heads/master@{#35641}
2016-04-20 05:13:10 +00:00
zhengxing.li
c14c1b9d42 X87: [Interpreter] Remove register file register and replace with LoadParentFramePointer.
port 623ad7de88 (r35618)

  original commit message:
  Removes the register file machine register from the interpreter and
  replaces it will loads from the parent frame pointer. As part of this
  change the raw operand values for register values changes to enable the
  interpreter to keep using the operand value as the offset from the
  parent frame pointer.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#35640}
2016-04-20 05:09:05 +00:00
bmeurer
fc3ecad44b [turbofan] Properly connect potentially throwing ToNumber to control chain.
In JSTypedLowering we insert JSToNumber nodes for implicit type
conversions, which can potentially throw (i.e. the input not statically
known to be a plain primitive).

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#35639}
2016-04-20 05:02:48 +00:00
jarin
61e97fea42 [turbofan] Fix static TypeCache::Get call in access builder.
Review URL: https://codereview.chromium.org/1900043003

Cr-Commit-Position: refs/heads/master@{#35638}
2016-04-20 03:54:19 +00:00
bjaideep
5178802be0 PPC: [Interpreter] Remove register file register and replace with LoadParentFramePointer.
Port 623ad7de88

Original commit message:

    Removes the register file machine register from the interpreter and
    replaces it will loads from the parent frame pointer. As part of this
    change the raw operand values for register values changes to enable the
    interpreter to keep using the operand value as the offset from the
    parent frame pointer.

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

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35637}
2016-04-19 20:41:17 +00:00
jyan
a43b48fdd2 S390: First version of the new generators implementation.
Port d0ccddd032

Original commit message:
       First version of the new generators implementation.

       Behind --ignition-generators. Does not yet support Turbofan.

R=neis@chromium.org, joransiu@ca.ibm.com, mbrandy@us.ibm.com, michael_dawson@ca.ibm.com, bjaideep@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#35636}
2016-04-19 19:48:53 +00:00
bjaideep
f8844a6ee1 PPC: Remove all non-function-name uses of CONST_LEGACY
Port 59546149c6

Original commit message:

    Now that all 'const' declarations are of the ES2015 variety, the only
    use of CONST_LEGACY is for function name bindings in sloppy mode
    named function expressions.

    This patch aims to delete all code meant to handle other cases, which
    mostly had to do with hole initialization/hole checks. Since function
    name bindings are initialized at entry to a function, it's impossible
    to ever observe one in an uninitialized state.

    To simplify the patch further, it removes the `IMPORT` VariableMode,
    as it's not likely to be needed (IMPORT is identical to CONST for
    the purpose of VariableMode).

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

BUG=
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35635}
2016-04-19 19:34:37 +00:00
bjaideep
bef390da2a PPC: Change calling convention of CallApiGetterStub to accept the AccessorInfo
Port d2b0a4b727

Original commit message:

    MIPS port contributed by Balazs Kilvady <balazs.kilvady@imgtec.com>;

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

BUG=
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35634}
2016-04-19 18:37:58 +00:00
mike
43fa3e65c9 [modules] Treat top-level functions as lexical
[15.2.1.11 Static Semantics:
LexicallyDeclaredNames](https://tc39.github.io/ecma262/#sec-module-semantics-static-semantics-lexicallydeclarednames)
(in contrast with its definition for StatementListItem) makes no
explicit provision for HoistableDeclarations. This means that function
declarations are treated as lexically scoped in module code, as
described in section 15.2.1.11's informative note:

> At the top level of a function, or script, function declarations are
> treated like var declarations rather than like lexical declarations.

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

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

Cr-Commit-Position: refs/heads/master@{#35633}
2016-04-19 17:53:03 +00:00
adamk
59546149c6 Remove all non-function-name uses of CONST_LEGACY
Now that all 'const' declarations are of the ES2015 variety, the only
use of CONST_LEGACY is for function name bindings in sloppy mode
named function expressions.

This patch aims to delete all code meant to handle other cases, which
mostly had to do with hole initialization/hole checks. Since function
name bindings are initialized at entry to a function, it's impossible
to ever observe one in an uninitialized state.

To simplify the patch further, it removes the `IMPORT` VariableMode,
as it's not likely to be needed (IMPORT is identical to CONST for
the purpose of VariableMode).

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

Cr-Commit-Position: refs/heads/master@{#35632}
2016-04-19 17:04:36 +00:00
bjaideep
697c87414b PPC: [Atomics] Remove Atomics code stubs; use TF ops
Port d412cfa26c

Original commit message:
    [Atomics] Remove Atomics code stubs; use TF ops

    Reland of (https://codereview.chromium.org/1891033002)

    This is a much cleaner solution, which won't require nearly as much
    architecture-specific code. Thanks bmeurer@!

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

BUG=v8:4614
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35631}
2016-04-19 16:54:32 +00:00