Commit Graph

10913 Commits

Author SHA1 Message Date
bradnelson
0dd24015fb Allow constant multiply both ways.
asm.js permits both:
int * constant
constant * int

It does not, however, allow intishes in multiplies.

BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=mjsunit/asm-wasm,test-asm-validator
R=aseemgarg@chromium.org,titzer@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34222}
2016-02-23 19:04:58 +00:00
machenbach
943650784a Revert of Add WasmFrame, backtraces reflect wasm's presence (patchset #9 id:160001 of https://codereview.chromium.org/1712003003/ )
Reason for revert:
[Sheriff] Seems to break gcmole:
https://build.chromium.org/p/client.v8/builders/V8%20Linux/builds/8295

Original issue's description:
> Add WasmFrame, backtraces reflect wasm's presence
>
> For now WasmFrame doesn't summarize the wasm frames. That'll require adding the
> metadata in wasm-compiler similar to DeoptimizationInputData.
>
> Teach the basic backtrace to iterate over stack frames instead of JS frames.
>
> Update the wasm stack test.
>
> `git cl format` touches random lines in files I touch.
>
> R=titzer@chromium.org
> TEST=d8 --test --expose-wasm test/mjsunit/mjsunit.js test/mjsunit/wasm/stack.js
>
> Committed: https://crrev.com/aeca945786dcccad3efecfddbf2c07aefa524a56
> Cr-Commit-Position: refs/heads/master@{#34220}

TBR=titzer@chromium.org,mvstanton@chromium.org,mstarzinger@chromium.org,jfb@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/1730673002

Cr-Commit-Position: refs/heads/master@{#34221}
2016-02-23 18:57:26 +00:00
jfb
aeca945786 Add WasmFrame, backtraces reflect wasm's presence
For now WasmFrame doesn't summarize the wasm frames. That'll require adding the
metadata in wasm-compiler similar to DeoptimizationInputData.

Teach the basic backtrace to iterate over stack frames instead of JS frames.

Update the wasm stack test.

`git cl format` touches random lines in files I touch.

R=titzer@chromium.org
TEST=d8 --test --expose-wasm test/mjsunit/mjsunit.js test/mjsunit/wasm/stack.js

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

Cr-Commit-Position: refs/heads/master@{#34220}
2016-02-23 17:22:17 +00:00
ahaas
cadc1e7780 [wasm] Added I64Ior to the Int64Lowering.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34219}
2016-02-23 16:30:42 +00:00
bradnelson
af903021c6 Add asm.js stdlib portion implementable as wasm opcodes.
Lost in the repo shuffle:
https://github.com/WebAssembly/v8-native-prototype/pull/102

BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=mjsunit/asm-wasm
R=aseemgarg@chromium.org,titzer@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34218}
2016-02-23 16:23:29 +00:00
bradnelson
fe2ed5667b Add asm->wasmified version of embenchen.
Adding a version of embenchen, modified to pass through
the asm->wasm javascript interface.
Disabling for now as fixes required to run it are outstanding.

BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=mjsunit/wasm/embenchen
R=aseemgarg@chromium.org,titzer@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34217}
2016-02-23 16:23:28 +00:00
yangguo
113d303534 [interpreter,debugger] Unskip debug tests for ignition.
TBR=rmcilroy@chromium.org
BUG=v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34214}
2016-02-23 15:34:48 +00:00
ahaas
4ddf252e85 [wasm] Unittest for Int64Lowering.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34213}
2016-02-23 15:33:13 +00:00
ulan
2285a99ef6 Replace slots buffer with remembered set.
Slots pointing to evacuation candidates are now recorded in the new RememberedSet<OLD_TO_OLD>.

The remembered set is extended to support typed slots.

During parallel evacuation all migration slots are recorded in local slots buffers.
After evacuation all local slots are added to the remembered set.

BUG=chromium:578883
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#34212}
2016-02-23 13:53:02 +00:00
mstarzinger
38915ed71c [fullcodegen] Implement operand stack depth tracking.
This implements a mechanism to track the exact depth of the operand
stack in full-codegen for every sub-expression visitation. So far we
only tracked the depth at statement level, but not at expression level.
With the introduction of do-expressions it will be possible to construct
local control flow (i.e. break, continue and friends) that target labels
at an arbitrary operand stack depth, making this tracking a prerequisite
for full do-expression support.

R=rossberg@chromium.org,jarin@chromium.org
BUG=v8:4755,v8:4488
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34211}
2016-02-23 13:41:44 +00:00
yangguo
72ba53b19a [interpreter, debugger] replace bytecode on-stack for debugging.
R=mcilroy@chromium.org
BUG=v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34210}
2016-02-23 13:11:27 +00:00
bradnelson
7e805faa30 Allow intish and floatish to be coerced by heap assignment.
When assigning to an integer view of the heap an intish
value does not need to be collapsed with |0.
Similarly a floatish value does not need to be collapsed with
fround when assigned to a float view of the heap.
i32[0] = i32_1 + i32_2;  // ok
f32[0] = f32_1 + f32_2;  // ok

However, floatish values cannot be safely assigned to double
arrays.
f64[0] = f32_1 + f32_2;  // not ok

BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=mjsunit/asm-wasm,test-asm-validator
R=aseemgarg@chromium.org,titzer@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34206}
2016-02-23 06:18:54 +00:00
zhengxing.li
2cd9485644 X87: Change the test case for X87 RunRoundUint32ToFloat32.
The CL #33796 (https://codereview.chromium.org/1628133002) added the RunRoundUint32ToFloat32 test case and X87 failed at it.

  The reason is same as the CL #33630 (Issue 1649323002: X87: Change the test case for X87 RunRoundInt32ToFloat32), please refer: https://codereview.chromium.org/1649323002.

  Here is the key comments from CL #33630:
  Some new test cases use CheckFloatEq(...) and CheckDoubleEq(...) function for result check. When GCC compiling the CheckFloatEq() and CheckDoubleEq() function,
  those inlined functions has different behavior comparing with GCC ia32 build and x87 build.
  The major difference is sse float register still has single precision rounding semantic. While X87 register has no such rounding precsion semantic when directly use register value.
  The V8 turbofan JITTed has exactly same result in both X87 and IA32 port.

  For CHECK_EQ(a, b) function, if a and b are doubles, it will has similar behaviors like CheckFloatEq(...) and CheckDoubleEq(...) function when compiled by GCC and causes the test case
  fail.

  So we add the following sentence to do type case to keep the same precision for RunRoundUint32ToFloat32. Such as: volatile double expect = static_cast<float>(*i).

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34202}
2016-02-23 01:50:37 +00:00
littledan
b22b258874 ES2015 web compat workaround: RegExp.prototype.flags => ""
It turns out that some old polyfill library uses
RegExp.prototype.flags as a way of feature testing. It's not clear
how widespread this is. For now, as a minimal workaround, we can
return undefined from getters like RegExp.prototype.global when
the receiver is RegExp.prototype. This patch implements that strategy
but omits a UseCounter to make backports easier.

R=adamk
CC=yangguo@chromium.org
BUG=chromium:581577
LOG=Y
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#34201}
2016-02-23 01:49:03 +00:00
littledan
579c01072d Remove the Proxy enumerate trap
In ES2016, the Proxy enumerate trap is removed. This patch changes
for-in iteration on Proxies to use the ownKeys trap. Due to the clean
organization of that code, the patch basically consists of deletions.

R=adamk
LOG=Y
BUG=v8:4768

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

Cr-Commit-Position: refs/heads/master@{#34200}
2016-02-22 21:11:36 +00:00
littledan
7033ae511f Optimize @@species based on a global 'protector' cell
This patch makes ArraySpeciesCreate fast in V8 by avoiding two property reads
when the following conditions are met:
- No Array instance has had its __proto__ reset
- No Array instance has had a constructor property defined
- Array.prototype has not had its constructor changed
- Array[Symbol.species] has not been reset

For subclasses of Array, or for conditions where one of these assumptions is
violated, the full lookup of species is done according to the ArraySpeciesCreate
algorithm. Although this is a "performance cliff", it does not come up in the
expected typical use case of @@species (Array subclassing), so it is hoped that
this can form a good start. Array subclasses will incur the slowness of looking
up @@species, but their use won't slow down invocations of, for example,
Array.prototype.slice on Array base class instances.

Possible future optimizations:
- For the fallback case where the assumptions don't hold, optimize the two
  property lookups.
- For Array.prototype.slice and Array.prototype.splice, even if the full lookup
  of @@species needs to take place, we still could take the rest of the C++
  fastpath. However, to do this correctly requires changing the calling convention
  from C++ to JS to pass the @@species out, so it is not attempted in this patch.

With this patch, microbenchmarks of Array.prototype.slice do not suffer a
noticeable performance regression, unlike their previous 2.5x penalty.

TBR=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34199}
2016-02-22 21:02:48 +00:00
littledan
0b53b7d36b Remove Reflect.enumerate
The Proxy enumerate trap and Reflect.enumerate are removed from the
ES2016 draft specification. This patch removes the Reflect.enumerate
function, and a follow-on patch will be responsible for the Proxy
trap changes.

R=adamk
LOG=Y
BUG=v8:4768

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

Cr-Commit-Position: refs/heads/master@{#34196}
2016-02-22 19:10:43 +00:00
yangguo
e032a98d3d [interpreter, debugger] support debug breaks via bytecode array copy
R=mstarzinger@chromium.org, rmcilroy@chromium.org
BUG=v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34190}
2016-02-22 13:17:52 +00:00
ulan
b238864d0e Activate memory reducer for small heaps in background tabs.
BUG=chromium:587574
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#34188}
2016-02-22 10:52:36 +00:00
bradnelson
37fc16ece4 Allow bitwise-or aside from type annotations in asm->wasm conversion.
BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=mjsunit/asm-wasm
R=aseemgarg@chromium.org,titzer@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34185}
2016-02-22 05:56:25 +00:00
titzer
4e316c38c5 [wasm] Fix bug in CallImport.
R=binji@chromium.org,bradnelson@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34181}
2016-02-22 00:47:02 +00:00
alan.li
1f5b84e467 MIPS: use DAHI/DATH for li macro on mips64r6.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34176}
2016-02-20 16:24:37 +00:00
adamk
cdec6d2bc5 Return undefined from RegExp.prototype.compile
This was changed to match Annex B.2.5.1 of ES2015 and Firefox in
https://chromium.googlesource.com/v8/v8/+/469d9bfa, but website
breakage was seen in M49 Beta. JSC still returns undefined here.

BUG=chromium:585775
LOG=y
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#34172}
2016-02-20 00:35:57 +00:00
mvstanton
deb7d5b090 ES6: Desugaring of instanceof to support @@hasInstance
This is a rework of the instanceof operator to support ES6 semantics
(as per section 12.10.4 of the spec:
https://tc39.github.io/ecma262/#sec-instanceofoperator).

It's behind flag --harmony-instanceof for now, which is turned on for staging.

BUG=v8:4447
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34170}
2016-02-19 19:20:38 +00:00
alph
c1f653be8d Do not record CPU profile samples when stack collection is failed.
BUG=559304
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34168}
2016-02-19 18:49:37 +00:00
dgozman
0e9ea48c46 Introduce BeforeCallEnteredCallback.
This new callback is similar to CallCompletedCallback, but is executed before the call has been made.
Added Isolate* parameter to CallCompletedCallback, marking previous one as deprecated.

BUG=chromium:585949
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34167}
2016-02-19 18:48:46 +00:00
rmcilroy
b62bf1e6fb [Interpreter] Enable runtime profiler support for Ignition.
Adds a profiling counter to each BytecodeArray object, and adds
code to Jump and Return bytecode handlers to update this
counter by the size of the jump or the distance from the return
to the start of the function. This is more accurate than fullcodegen's
approach since it takes forward jumps into account as well as back-edges.

Modifies RuntimeProfiler to track ticks for interpreted frames.
Currently we use the SharedFunctionInfo::profiler_ticks() instead
of adding another to tick field to avoid adding another field to
BytecodeArray since SharedFunctionInfo::profiler_ticks() is only
used by Crankshaft otherwise so we shouldn't need both for

BUG=v8:4689
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34166}
2016-02-19 18:47:12 +00:00
ulan
5d06548208 [turbofan] Fix write barrier handling of map values.
We cannot omit flag check with kPointersToHereAreInterestingMask for maps because incremental marker dynamically sets and clears the flag.

BUG=chromium:587004
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#34165}
2016-02-19 18:46:22 +00:00
ssanfilippo
67f75e30da [Interpreter] Fix generate-bytecode-expectations help message.
--pool-type=int and double have now been merged into number.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34164}
2016-02-19 16:14:22 +00:00
verwaest
77e30f013a [classes] Support AccessorInfo-style data properties in super property stores.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34163}
2016-02-19 16:04:43 +00:00
ssanfilippo
4f0be51987 [Interpreter] Support relevant FLAG_s in generate-bytecode-expectations.
FLAG_legacy_const and FLAG_harmony_do_expressions can now be toggled
both through the command line and through the option header.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34160}
2016-02-19 15:52:58 +00:00
titzer
915ae08dd5 [wasm] Add support for import section.
This CL introduces an import section that names functions to be imported
as well as a CallImport bytecode to call imports from this table.

R=binji@chromium.org,bradnelson@chromium.org
LOG=Y
BUG=chromium:575167

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

Cr-Commit-Position: refs/heads/master@{#34157}
2016-02-19 14:58:43 +00:00
machenbach
6cecb3eb77 [Swarming] Speed up test262 upload/download.
This experimentally implements taring/untaring the test data
for test262 on the v8-side before test isolation and when
running the tests.

It archives on demand only if the tar is outdated compared
to the contained files. This comes with a cost of ~1s extra
to run gyp on linux and ~6s extra on windows. Ninja is
lightning fast afterwards in detecting changes. Also, we
archive only when test_isolation_mode is set and when
the test262_run target is required.

The archiving itself costs ~30s on all platforms. But as the
files will change seldom this shouldn't have a big impact.

Extraction on the test runner side is below 2s on mac and
linux. The speedup is enormous. Around 5 minutes were spent
on download on swarming slaves before, which is now only
a few seconds. So total test time for release (no variants),
e.g. goes from 8 to 3 minutes.

BUG=chromium:535160
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34155}
2016-02-19 14:41:29 +00:00
ssanfilippo
d2187182a7 [Interpreter] generate-bytecode-expectations improvements.
A few options and features have been added to the tool:

* an output file might be specified using --output=file.name
* a shortcut when the output file is also the input, which is handy
   when fixing golden files, --rebaseline.
* the input snippet might be optionally not wrapped in a top function,
   or not executed after compilation (--no-wrap and --no-execute).
* the name of the wrapper can be configured using --wrapper-name=foo

The same options can be configured via setters on the usual
BytecodeExpectationsPrinter.

The output file now includes all the relevant flags to reproduce it
when running again through the tool (usually with --rebaseline).

In particular, when running in --rebaseline mode, options from the
file header will override options specified in the command line.

A couple of other fixes and improvements:

* description of the handlers is now emitted (closing the TODO).
* the snippet is now correctly unquoted when double quotes are used.
* special registers (closure, context etc.) are now emitted as such,
   instead of displaying their numeric value.
* the tool can now process top level code as well.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34152}
2016-02-19 12:37:16 +00:00
bmeurer
d6ba520043 [test] Skip mjsunit/array-constructor in arm-sim.
Looks like the removal of %_FastOneByteArrayJoin flushes out a bug in
arm w/ the simulator.

R=machenbach@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34148}
2016-02-19 10:17:00 +00:00
jarin
2ae5894da6 Revert of [turbofan] Connect ObjectIsNumber to effect and control chains. (patchset #1 id:1 of https://codereview.chromium.org/1709093002/ )
Reason for revert:
Tanks benchmarks (e.g., Octane box2d TF).

Original issue's description:
> [turbofan] Connect ObjectIsNumber to effect and control chains.
>
> In theory, we could connect the nodes when doing
> the schedule-in-the-middle pass, but that would require creating two
> versions of the operator (effectful and pure). I believe we do not
> lose anything by wiring the node up eagerly.
>
> Committed: https://crrev.com/2894e80a0a4a51a0d72e72aa48fcd01968f7949f
> Cr-Commit-Position: refs/heads/master@{#34141}

TBR=bmeurer@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/1718483002

Cr-Commit-Position: refs/heads/master@{#34147}
2016-02-19 10:13:56 +00:00
bmeurer
be23438170 [builtins] Migrate the DataView constructor to C++.
The DataView constructor calls into C++ anyway, and is easier to deal
with this way, especially since we don't have the half initialized
object floating through JavaScript.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34145}
2016-02-19 08:59:19 +00:00
ishell
7624465b61 [es6] Fixed POSSIBLY_EVAL_CALL tail calls handling in Full codegen.
This CL also enhances a "tail-call-megatest" which now tests product of the following cases:
1) tail caller is inlined/not-inlined
2) tail callee is inlined/not-inlined
3) tail caller has an arguments adaptor frame above or not
4) tail callee has an arguments adaptor frame above or not
5) tail callee is a sloppy/strict/possibly eval/bound/proxy function
6) tail calling via normal call/function.apply/function.call

BUG=v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34143}
2016-02-19 08:39:59 +00:00
jarin
2894e80a0a [turbofan] Connect ObjectIsNumber to effect and control chains.
In theory, we could connect the nodes when doing
the schedule-in-the-middle pass, but that would require creating two
versions of the operator (effectful and pure). I believe we do not
lose anything by wiring the node up eagerly.

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

Cr-Commit-Position: refs/heads/master@{#34141}
2016-02-19 08:03:34 +00:00
bmeurer
8a7186b87a [turbofan] Remove the JSContextRelaxation reducer.
This reducer doesn't really add value, because:

 (a) it is only concerned with JSCallFunction and JSToNumber, but when
     we get to it, all JSCallFunction nodes will have been replaced by
     Call nodes, and in the not so far future, we will also have
     replaced almost all JSToNumber nodes with better code,
 (b) and the reducer tries to be smart and use one of the outermost
     contexts, but that might not be beneficial always; actually it
     might even create longer live ranges and lead to more spilling
     in some cases.

But most importantly, the JSContextRelaxation currently blocks inlining
based on SharedFunctionInfo, because it requires the inliner to check
the native context, which in turn requires JSFunction knowledge. So I'm
removing this reducer for now to unblock the more important inliner
changes.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34139}
2016-02-19 07:55:48 +00:00
adamk
cc2ea25747 Don't reflect ES2015 Function name inference in Function.prototype.toString
Various syntactic forms now cause functions to have names where they
didn't before. Per the upcoming changes to the toString spec, only
a name that was literally part of a function's expression or declaration
is meant to be reflected in toString. This also happens to be the same
set of names that V8 currently outputs (without the --harmony-function-name
flag).

This required distinguishing anonymous FunctionExpressions from other sorts
of function definitions (like methods and getters/setters) in the AST, parser,
and at runtime.

The patch also takes the opportunity to remove one more argument (and enum)
from FunctionLiteral, as well as adding a special factory method for the
case of a FunctionLiteral representing toplevel or eval'd code.

BUG=v8:4760
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34132}
2016-02-19 02:51:10 +00:00
littledan
44f9c6a638 Make Date.prototype.toGMTString an alias for Date.prototype.toUTCString
In ES2015, Date.prototype.toGMTString is simply an alias of
Date.prototype.toUTCString, so it has the same identity as a function and
doesn't have its own name. Firefox has already shipped this behavior.
Previously, we copied JSC behavior by making it a separate function.
This change makes an addition test262 test pass.

BUG=v8:4708
LOG=Y
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#34131}
2016-02-19 02:18:54 +00:00
verwaest
594a1e1de3 Revert of Use displayName in Error.stack rendering if present. (patchset #1 id:1 of https://codereview.chromium.org/1706823003/ )
Reason for revert:
See Domenic's comment on the V8 bug.

Original issue's description:
> Use displayName in Error.stack rendering if present.
>
> BUG=v8:4761
> LOG=y
>
> Committed: https://crrev.com/953874e974037e7e96ef282a7078760ccc905878
> Cr-Commit-Position: refs/heads/master@{#34105}

TBR=jochen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4761

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

Cr-Commit-Position: refs/heads/master@{#34129}
2016-02-18 19:19:12 +00:00
adamk
63efda35b3 Remove strong mode support from Scope and Variable
This frees up one bit in FunctionKind, which I plan to make slightly
more syntactic info about functions available in SharedFunctionInfo
(needed for ES2015 Function.name support).

BUG=v8:3956, v8:4760
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34125}
2016-02-18 17:20:13 +00:00
titzer
e96a54f7b5 [wasm] Refactor WASM test usage of TestingModule.
This cleans up and makes the tests easier to write and understand.
Also prepares for adding the WASM interpreter which needs a
different initialization sequence in tests.

R=ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34123}
2016-02-18 15:58:28 +00:00
ahaas
545943db15 [wasm] WasmRunner can run tests with I64 parameters and return value.
I extended the Int64Lowering to lower calls, loads, stores, returns, and
parameters and apply the lowering on both the test function TF graph and
the WasmRunner TF graph.

The lowering of calls also requires an adjustment of the call descriptor.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34121}
2016-02-18 15:19:18 +00:00
verwaest
9bebb028a0 [runtime] Force internalize names used before lookup in in DescriptorArray and TransitionArray
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34118}
2016-02-18 14:33:44 +00:00
rmcilroy
9a26c1aee2 [Interpreter] Fix deopt when accumulator needs to be materialized.
Moves the accumulator value on-heap to be restored in the
InterpreterNotifyDeopt handler rather than explicitly
setting the accumulator register. This allows it to be
materialized correctly if required.

BUG=v8:4678
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34113}
2016-02-18 12:50:38 +00:00
rossberg
cb1bf4af3c [es6] Implement for-of iterator finalization
Implements iterator finalisation by desugaring for-of loops with an additional try-finally wrapper. See comment in parser.cc for details.

Also improved some AST printing facilities while there.

@Ross, I had to disable the bytecode generation test for for-of, because it got completely out of hand after this change (the new bytecode has 150+ lines). See the TODO that I assigned to you.

Patch set 1 is WIP patch by Georg (http://crrev.com/1695583003), patch set 2 relative changes.

@Georg, FYI, I changed the following:

- Moved try-finally out of the loop body, for performance, and in order to be able to handle `continue` correctly.
- Fixed scope management in ParseForStatement, which was the cause for the variable allocation failure.
- Fixed pre-existing zone initialisation bug in rewriter, which caused the crashes.
- Enabled all tests, adjusted a few others, added a couple more.

BUG=v8:2214
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34111}
2016-02-18 10:49:55 +00:00
ishell
c67b5096cd [turbofan] Fixing ES6 tail calls in Turbofan.
In case when F inlined normal call to G which tail calls H we should not write translation for G for the tail call site.
Otherwise we will see G in a stack trace inside H.

This CL also adds a "megatest" which tests product of the following cases:
1) tail caller is inlined/not-inlined
2) tail callee is inlined/not-inlined
3) tail caller has an arguments adaptor frame above or not
4) tail callee has an arguments adaptor frame above or not
5) tail callee is a normal/bound/proxy function

Note that tests for not yet supported cases are not run for now.

BUG=v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34108}
2016-02-18 10:13:20 +00:00