Commit Graph

820 Commits

Author SHA1 Message Date
bradnelson
cca5c3f630 Fix conversion to float32, typing issue, split apart asm-wasm tests.
Add missing conversions from other types to f32 in fround.
Restrict fround() to only float, double, signed, unsigned (no unions / intish).
Restrict Bitwise operations to intish, particularly |0, when not applied to a foreign function.

Adding more exhaustive tests of stdlib Math, move to a separate file.
Adding tests of interesting values for the stdlib asm.js functions.

BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203
TEST=test-asm-validator,asm-wasm
R=titzer@chromium.org,rossberg@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34967}
2016-03-21 20:34:40 +00:00
adamk
249bf75e0c Remove runtime flags for Proxy and Reflect
Both of them shipped in Chrome 49 without incident.

Also move relevant tests from harmony/ to es6/.

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

Cr-Commit-Position: refs/heads/master@{#34964}
2016-03-21 19:40:02 +00:00
ishell
1c34e5f822 Run some slow tail call tests only for fast configurations.
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34935}
2016-03-21 13:06:03 +00:00
ishell
ac83355748 [interpreter] Disable some slow tail call tests.
TBR=machenbach@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34929}
2016-03-21 11:20:14 +00:00
ishell
acbb968ded [crankshaft] Fixing ES6 tail call elimination.
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 enables all existing tests related to ES6 tail call elimination and adds more combinations.

TBR=bmeurer@chromium.org
BUG=v8:4698
LOG=N

Committed: https://crrev.com/689980f7d4dfd4c29492f616d7b616b86ec9af91
Cr-Commit-Position: refs/heads/master@{#34830}

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

Cr-Commit-Position: refs/heads/master@{#34920}
2016-03-21 08:48:37 +00:00
adamk
6a8de15322 Several mjsunit cleanups
- Move default parameters tests from harmony/ to es6/ and remove
    non-existent --harmony-default-parameters flag.
  - Remove some non-existent tests from mjsunit.status

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

Cr-Commit-Position: refs/heads/master@{#34908}
2016-03-18 23:20:44 +00:00
balazs.kilvady
7b9dca76b8 MIPS: Disable asm-wasm mjsunit tests.
Port 879d254d54

Original commit message:
Landing this again, excluding arm as it fail and arm64
out of caution that other wasm arm64 tests are also disabled.

BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=mjsunit/asm-wasm
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34860}
2016-03-17 14:03:27 +00:00
mythria
46fabc1ea5 [Interpreter] Skips debug-scope-on-return on ignition and msan.
Skips mjsunit/ignition/debug-scope-on-return on ignition and msan

TBR=rmcilroy@chromium.org,machenbach@chromium.org
BUG=v8:4280
LOG=N
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34841}
2016-03-16 20:41:12 +00:00
machenbach
d64b41ded6 Revert of [crankshaft] Fixing ES6 tail call elimination. (patchset #7 id:200001 of https://codereview.chromium.org/1780043004/ )
Reason for revert:
[Sheriff] Leads to mac gc stress crashes:
https://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/4975

Original issue's description:
> [crankshaft] Fixing ES6 tail call elimination.
>
> 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 enables all existing tests related to ES6 tail call elimination.
>
> TBR=bmeurer@chromium.org
> BUG=v8:4698
> LOG=N
>
> Committed: https://crrev.com/689980f7d4dfd4c29492f616d7b616b86ec9af91
> Cr-Commit-Position: refs/heads/master@{#34830}

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

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

Cr-Commit-Position: refs/heads/master@{#34835}
2016-03-16 18:13:48 +00:00
ishell
689980f7d4 [crankshaft] Fixing ES6 tail call elimination.
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 enables all existing tests related to ES6 tail call elimination.

TBR=bmeurer@chromium.org
BUG=v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34830}
2016-03-16 17:06:41 +00:00
machenbach
7f363d5d47 [test] Remove feature to mark flaky tests.
The feature was removed from the bots a while ago. It was
superseeded by the flaky-test detection which reruns tests.

Remaining tests still marked as flaky most certainly pass
since a while.

Referencing all the bugs whose expectations lines get
removed by this.

BUG=v8:3838,v8:3525,v8:3125
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34804}
2016-03-16 07:35:47 +00:00
jyan
3b5e84ab0e S390: Initial test changes and files checkin.
R=danno@chromium.org,jkummerow@chromium.org,jochen@chromium.org,joransiu@ca.ibm.com,michael_dawson@ca.ibm.com,mbrandy@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34795}
2016-03-15 18:09:36 +00:00
rmcilroy
6cfa6c7108 [Interpreter] Add two skips back for a flaky test and failure on msan.
BUG=v8:4680
LOG=N
TBR=machenbach@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34788}
2016-03-15 13:21:04 +00:00
yangguo
d0d73999a1 [interpreter, debugger] fix remaining cctest failures.
R=rmcilroy@chromium.org, vogelheim@chromium.org
BUG=v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34781}
2016-03-15 11:01:09 +00:00
machenbach
ecc70d69d4 [Ignition] Skip tests.
BUG=v8:4280
LOG=n
TBR=rmcilroy@chromium.org, mstarzinger@chromium.org
NOTRY=true
NOPRESUBMIT=true

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

Cr-Commit-Position: refs/heads/master@{#34774}
2016-03-15 10:25:42 +00:00
machenbach
1f33d80292 [Ignition] Skip tests.
BUG=v8:4280
LOG=n
TBR=rmcilroy@chromium.org, mstarzinger@chromium.org
NOTRY=true
NOPRESUBMIT=true

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

Cr-Commit-Position: refs/heads/master@{#34773}
2016-03-15 10:05:14 +00:00
machenbach
6d44d1db66 [Ignition] Skip tests.
BUG=v8:4280
LOG=n
TBR=rmcilroy@chromium.org, mstarzinger@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34772}
2016-03-15 09:27:45 +00:00
yangguo
3c1dc424d3 [ignition, debugger] correctly set position for return with elided bytecode.
We may not emit bytecode for the evaluation of the to-be-returned
expression. In that case we cannot set two return positions for a return
statement (one before and one after the expression evaluation). This
sets the interpreter apart from full-codegen.

Make sure that we always have the second of the two return positions.

Note that we end up with separate test cases for ignition and FCG.

R=rmcilroy@chromium.org, vogelheim@chromium.org
BUG=v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34771}
2016-03-15 08:28:03 +00:00
adamk
5a202cce6e Remove --harmony-modules flag and let embedder decide when modules are used
Modules already have a separate entrypoint into the engine (at the moment,
this is v8::ScriptCompiler::CompileModule, though that will change to
something like ParseModule). This meant that requiring a commandline flag
simply added an extra complexity burden on embedders. By removing the v8
flag, this lets embedders use their own flagging mechanism (such as d8's
"--module", or Blink's RuntimeEnabledFeatures) to control whether
modules are to be used.

Also remove old modules tests that were being skipped (since they test
very old, pre-ES2015 modules syntax).

R=littledan@chromium.org
BUG=v8:1569, chromium:594639
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#34764}
2016-03-15 00:45:00 +00:00
neis
f06f49c852 Adapt membrane example to ES6 proxies.
R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34720}
2016-03-11 13:10:17 +00:00
vogelheim
de4f3d3eff Fix expression positions for for-loops.
FullCodegen generates 2 statement positions for the loop init block, like so:

  for(var i = 0; i....
      ^   ^

This change removes the first of those, updates unit tests,
and removes text expectations for Ignition.

---
An alternative would be to emulate the existing behaviour in Ignition, but:
- The new behaviour seems more logical,
- Ignition generates no bytecodes for the 'var', meaning there is no code position to attach the break position to.

BUG=v8:4690
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34717}
2016-03-11 12:02:51 +00:00
yangguo
aba76874db [regexp] support \p in character classes.
R=littledan@chromium.org
BUG=v8:4743
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34695}
2016-03-10 23:24:23 +00:00
mstarzinger
5bd307fa72 [compiler] Sidestep the interpreter for generator literals.
This is because compiler.cc is awesome. There are cases where we do not
yet have a SharedFunctionInfo that can tell us whether we are compiling
a generator function, we query the FunctionLiteral instead.

R=rmcilroy@chromium.org
BUG=v8:4681
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34677}
2016-03-10 14:35:40 +00:00
mstarzinger
855176533c [compiler] Sidestep optimizing of generator resumers.
This ensures our optimizing compilers as well as the interpreter are
never tasked with compiling the generator-resuming builtin methods. The
corresponding intrinsics for those methods are not supported and it is
not possible to provide a C++ reference implementation for them. We do
this by assigning builtin function ids to them that we can recognize
during the compiler dispatch.

Note that this also affects the interpreter, because methods having a
builtin function id assigned are not interpreted ({function_data} field
is overlapping). If this ever changes we can still do an early check in
the compiler dispatch (similar to the optimizing compilers) easily.

This applies to the following methods:
- Generator.prototype.next (calls Runtime_GeneratorNext).
- Generator.prototype.return (calls Runtime_GeneratorReturn).
- Generator.prototype.throw (calls Runtime_GeneratorThrow).

R=neis@chromium.org
BUG=v8:4681
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34675}
2016-03-10 14:07:10 +00:00
mstarzinger
899105c0bc [compiler] Sidestep the interpreter for generator functions.
This ensures the interpreter is not tasked with compiling generator
functions. It currently does not support suspending activations at
yielding points, but we still want to be able to activate it for the
rest of JavaScript in the meantime.

R=rmcilroy@chromium.org
BUG=v8:4681
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34672}
2016-03-10 13:21:51 +00:00
rossberg
4614c7caaf [strong] Remove all remainders of strong mode
R=mstarzinger@chromium.org,bmeurer@chromium.org,adamk@chromium.org
BUG=v8:3956
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34669}
2016-03-10 12:45:42 +00:00
mythria
e260bd5356 [Interpreter] Fixes a bug when popping context to correct level on break/continue.
The current implementation does not consider the case when the context of
the control scope and the current context differ. It is possible that they are
different in some cases for example: with statements. This cl fixes this.

BUG=v8:4280,v8:4680
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34609}
2016-03-09 11:05:49 +00:00
verwaest
fd40570419 Don't do any special normalization if a boilerplate contains function literals.
This mechanism was used to ensure that functions ended up as constants on the map of prototypes defined using object literals, e.g.,:

function.prototype = {
  method: function() { ... }
}

Nowadays we treat prototypes specially, and make all their functions constants when an object turns prototype. Hence this special custom code isn't necessary anymore.

This also affects boilerplates that do not become prototypes. Their functions will not be constants but fields instead. Calling their methods will slow down. However, multiple instances of the same boilerplate will stay monomorphic. We'll have to see what the impact is for such objects, but preliminary benchmarks do not show this as an important regression.

BUG=chromium:593008
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34602}
2016-03-08 22:13:49 +00:00
mythria
01f603d2b2 [Interpreter] Fixes translation from bailout id to code offset.
BailoutId points to the next bytecode in the bytecode array. Code offset
is set to one less than the bail out id. This would point to the end of the
current instruction. Since we use it only for summarizing the frame and to
compute the source position, it should be safe to set it to the end of current
instruction.

BUG=v8:4280, v8:4689
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34580}
2016-03-08 12:09:11 +00:00
yangguo
5586ff666e [interpreter, debugger] add some missing statement positions.
R=rmcilroy@chromium.org, vogelheim@chromium.org
BUG=v8:4690
LOG=N

Committed: https://crrev.com/4a7722c9930a42ba0e8feeece286d74834211a7e
Cr-Commit-Position: refs/heads/master@{#34569}

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

Cr-Commit-Position: refs/heads/master@{#34573}
2016-03-08 09:09:15 +00:00
yangguo
059c163695 Revert of [interpreter, debugger] add some missing statement positions. (patchset #1 id:1 of https://codereview.chromium.org/1770773002/ )
Reason for revert:
failing tests with ignition.

Original issue's description:
> [interpreter, debugger] add some missing statement positions.
>
> R=rmcilroy@chromium.org, vogelheim@chromium.org
> BUG=v8:4690
> LOG=N
>
> Committed: https://crrev.com/4a7722c9930a42ba0e8feeece286d74834211a7e
> Cr-Commit-Position: refs/heads/master@{#34569}

TBR=rmcilroy@chromium.org,vogelheim@chromium.org,mstarzinger@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4690

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

Cr-Commit-Position: refs/heads/master@{#34570}
2016-03-08 08:30:28 +00:00
yangguo
4a7722c993 [interpreter, debugger] add some missing statement positions.
R=rmcilroy@chromium.org, vogelheim@chromium.org
BUG=v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34569}
2016-03-08 07:53:02 +00:00
yangguo
13d18c0079 [regexp] extend property classes by script category.
R=littledan@chromium.org
BUG=v8:4743
LOG=N

Committed: https://crrev.com/22f6735ccbe2e341d341e61b9c38ce308b8da655
Cr-Commit-Position: refs/heads/master@{#34553}

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

Cr-Commit-Position: refs/heads/master@{#34562}
2016-03-07 20:10:55 +00:00
mythria
b455e2b2a0 [Interpreter] Updated mjsunit.status
Updated mjsunit.status.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34545}
2016-03-07 15:13:03 +00:00
bradnelson
56c0798a01 Disable zlib wasm embenchen for now, fails gc stress.
BUG=
TBR=titzer@chromium.org
LOG=N
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34477}
2016-03-04 05:53:29 +00:00
bradnelson
530cc16460 Handle stack frames differently inside and on the boundary of wasm.
Frames entering of inside wasm don't have a function or context argument.
Adding distinct wasm frame and function types to express this.

Fixes a GC issue on several embenchen wasm tests, reenabling them.

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

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

Cr-Commit-Position: refs/heads/master@{#34476}
2016-03-04 04:45:45 +00:00
littledan
0e7f095c6d Restrict FunctionDeclarations in Statement position
ES2015 generally bans FunctionDeclarations in positions which expect a Statement,
as opposed to a StatementListItem, such as a FunctionDeclaration which constitutes
the body of a for loop. However, Annex B 3.2 and 3.4 make exceptions for labeled
function declarations and function declarations as the body of an if statement in
sloppy mode, in the latter case specifying that the semantics are as if the
function declaration occurred in a block. Chrome has historically permitted
further extensions, for the body of any flow control construct.

This patch addresses both the syntactic and semantic mismatches between V8 and
the spec. For the semantic mismatch, function declarations as the body of if
statements change from unconditionally hoisting in certain cases to acquiring
the sloppy mode function in block semantics (based on Annex B 3.3). For the
extra syntax permitted, this patch adds a flag,
--harmony-restrictive-declarations, which excludes disallowed function declaration
cases. A new UseCounter, LegacyFunctionDeclaration, is added to count how often
function declarations occur as the body of other constructs in sloppy mode. With
this patch, the code generally follows the form of the specification with respect
to parsing FunctionDeclarations, rather than allowing them in arbitrary Statement
positions, and makes it more clear where our extensions occur.

BUG=v8:4647
R=adamk
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34470}
2016-03-03 21:34:26 +00:00
bradnelson
fe6f290c87 Disable primes with asm->wasm as it fails under gc-stress.
BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=mjsunit/wasm/embenchen
R=titzer@chromium.org,aseemgarg@chromium.org
LOG=N
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34468}
2016-03-03 19:51:11 +00:00
bradnelson
dbc0f99b94 Enabling some embenchen tests running through asm->wasm.
BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=mjsunit/asm-wasm
R=titzer@chromium.org,aseemgarg@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34466}
2016-03-03 18:53:05 +00:00
yangguo
db2419c303 [interpreter] Add tests for translating PC from optimized frame.
R=mythria@chromium.org, rmcilroy@chromium.org
BUG=v8:4689
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34434}
2016-03-02 14:54:55 +00:00
yangguo
44e9622aea [debugger] Ensure at least one breakable position per function.
The function literal consists of a list of statements. Each statement
is associated with a statement position including break location. The
only exception to this rule is when the function immediately throws if
scope resolution found an illegal redeclaration. Make sure that we add a
break location for this case as well. The debugger relies on this.

R=bmeurer@chromium.org, vogelheim@chromium.org
BUG=v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34422}
2016-03-02 10:31:59 +00:00
yangguo
e4fcb3484f [interpreter, debugger] Update mjsunit test expectations.
R=vogelheim@chromium.org
BUG=v8:4690,v8:4765
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34409}
2016-03-01 20:33:26 +00:00
mstarzinger
00e9447ad3 Remove the global Strength enum class completely.
R=bmeurer@chromium.org
BUG=v8:3956
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34398}
2016-03-01 16:06:04 +00:00
yangguo
21622ddae4 [debugger, interpreter] add break location at if-statement.
R=mstarzinger@chromium.org, vogelheim@chromium.org
BUG=v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34394}
2016-03-01 14:26:04 +00:00
mythria
844e410d5c [Interpreter] Adds translation of optimized frame to bytecode offset in FrameSummary
Adds the translation from optimized frame to bytecode offset
in FrameSummary. For interpreter, the bailout id represents the bytecode
array offset. So we can directly use the bailout id as the code offset
in the FrameSummary. Also updates mjsunit.status with more information
about failing tests.

BUG=v8:4280, v8:4689
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34393}
2016-03-01 14:15:29 +00:00
yangguo
d9fe836dd4 [debugger] fix break locations for assignments and return.
We used to emit debug break location on block entry. This cannot be
ported to the interpreted as we do not emit bytecode for block entry.
This made no sense to begin with though, but accidentally added
break locations for var declarations.

With this change, the debugger no longer breaks at var declarations
without initialization. This is in accordance with the fact that the
interpreter does not emit bytecode for uninitialized var declarations.

Also fix the bytecode to match full-codegen's behavior wrt return
positions:
- there is a break location before the return statement, with the source
  position of the return statement.
- right before the actual return, there is another break location. The
  source position points to the end of the function.

R=rmcilroy@chromium.org, vogelheim@chromium.org
TBR=rossberg@chromium.org
BUG=v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34388}
2016-03-01 12:47:55 +00:00
bmeurer
d00da47b61 [turbofan] Don't use the CompareIC in JSGenericLowering.
The CompareICStub produces an untagged raw word value, which has to be
translated to true or false manually in the TurboFan code. But for lazy
bailout after the CompareIC, we immediately go back to fullcodegen or
Ignition with the raw value, to a location where both fullcodegen and
Ignition expect a boolean value, which might crash or in the worst case
(depending on the exact computation inside the CompareIC) could lead to
arbitrary memory access.

Short-term fix is to use the proper runtime functions (unified with the
interpreter now) for comparisons. Next task is to provide optimized
versions of these based on the CodeStubAssembler, which can then be used
via code stubs in TurboFan or directly in handlers in the interpreter.

R=mstarzinger@chromium.org
BUG=v8:4788
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34335}
2016-02-26 18:41:35 +00:00
mstarzinger
239ed8ffa8 Remove strong mode support from materialized literals.
R=bmeurer@chromium.org
BUG=v8:3956
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34333}
2016-02-26 17:45:01 +00:00
bmeurer
f48c2970e7 [test] Remove tests from mjsunit.status that no longer exist.
R=mstarzinger@chromium.org
BUG=v8:4768
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34323}
2016-02-26 11:09:27 +00:00
bmeurer
458764621b [runtime] Make target checking for %Call and %_Call consistent.
The %_Call intrinsic (if supported by the compiler) is lowered directly
to the Call builtin and thus throws a TypeError if the target is not
callable. The %Call runtime function also eventually calls into the Call
builtin, but had an early abort if the target is not a JSReceiver, which
is unnecessary and leads to various test failures for Ignition.

R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34316}
2016-02-26 07:00:32 +00:00
bmeurer
1b821f2f39 [ic] Unify undetectable abstract equality comparison.
The treatment of different undetectable objects was inconsistent after
the latest changes to the undetectable bit in the maps. Given two
different undetectable JSObjects a and b, a monomorphic CompareIC would
say false for a == b, while the rest of the system (including the
generic case for the CompareIC) would say true.

The fix is rather straight-forward: We just go generic on a CompareIC
once we see an undetectable JSObject.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34315}
2016-02-26 06:17:21 +00:00
mstarzinger
ee4225fd0f [interpreter] Remove wholesale skipping of strong mode tests.
By now the deprecation of strong mode is far enough along that the
support present in the interpreter matches the support in the other
compilers. Special expectations aren't needed anymore.

R=rmcilroy@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34293}
2016-02-25 13:50:54 +00:00
mythria
4d325854f2 [Interpreter] Handles stack overflow in interpreter.
Handles stack overflow in interpreter.
1. When visiting function literal, if the shared function
 info cannot be found we should return a stack overflow.
2. When visiting the ast graph, if stack overflow happens
 then all the ast nodes are not visited, so we need to have
appropriate handling in the AccumulatorResultScope and
RegisterResultScope.
3. MakeBytecode should not return a suceess unconditionally.
If there is a stack overflow, it should return false, so
RangeError can be thrown.

BUG=v8:4280,v8:4680
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34282}
2016-02-25 11:27:38 +00:00
machenbach
cbeaf19213 [test] Skip test for arm64 gc stress.
BUG=v8:4779
LOG=n
NOTRY=true
TBR=bmeurer@chromium.org, ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34280}
2016-02-25 10:23:58 +00:00
mstarzinger
3baa290264 [fullcodegen] Fix assert for operand stack depth tracking.
This fixes a corner case that triggered an assert in full-codegens
operand stack depth tracking. We stop pushing operands if we overflow
the C-stack while iterating the AST. This makes the tracking go out of
sync before we fully returned from the tree traversal, at which point
the thrown RangeError will abort compilation.

R=ishell@chromium.org
TEST=mjsunit/regress/regress-crbug-589472
BUG=chromium:589472
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34255}
2016-02-24 16:29:47 +00:00
mythria
eb358178f8 Revert of [Interpreter] Implements calls through CallICStub in the interpreter. (patchset #15 id:270001 of https://codereview.chromium.org/1688283003/ )
Reason for revert:
It is not a good idea to call CallICStub from the builtin. It might be sensitive to the frame structure. Constructing a internal frame might cause problems. It is much better to inline the code  related to the type feedback vector into the builtin.

Original issue's description:
> [Interpreter] Implements calls through CallICStub in the interpreter.
>
> Calls are implemented through CallICStub to collect type feedback. Adds
> a new builtin called InterpreterPushArgsAndCallIC that pushes the
> arguments onto stack and calls CallICStub.
>
> Also adds two new bytecodes CallIC and CallICWide to indicate calls have to
> go through CallICStub.
>
> MIPS port contributed by balazs.kilvady.
>
> BUG=v8:4280, v8:4680
> LOG=N
>
> Committed: https://crrev.com/20362a2214c11a0f2ea5141b6a79e09458939cec
> Cr-Commit-Position: refs/heads/master@{#34244}

TBR=rmcilroy@chromium.org,mvstanton@chromium.org,mstarzinger@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4280, v8:4680

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

Cr-Commit-Position: refs/heads/master@{#34252}
2016-02-24 15:16:19 +00:00
mythria
20362a2214 [Interpreter] Implements calls through CallICStub in the interpreter.
Calls are implemented through CallICStub to collect type feedback. Adds
a new builtin called InterpreterPushArgsAndCallIC that pushes the
arguments onto stack and calls CallICStub.

Also adds two new bytecodes CallIC and CallICWide to indicate calls have to
go through CallICStub.

MIPS port contributed by balazs.kilvady.

BUG=v8:4280, v8:4680
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34244}
2016-02-24 11:01:27 +00:00
bmeurer
c129aa4d39 [turbofan] Introduce DeoptimizeIf And DeoptimizeUnless common operators.
These macro operators represent a conditional eager deoptimization exit
without explicit branching, which greatly reduces overhead of both
scheduling and register allocation, and thereby greatly reduces overall
compilation time, esp. when there are a lot of eager deoptimization
exits.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34239}
2016-02-24 09:49:51 +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
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
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
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
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
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
zhengxing.li
3e36babe38 X87: disable the regress-crbug-242924 test case for x87.
The reason:
  Similar to the CL 31552 (https://codereview.chromium.org/1419573007).

  The CL 33972 (https://codereview.chromium.org/1698783002) optimized some JS function in regress-crbug-242924 test case by TurboFan compiler.

  But it will hit the known issue that X87 will change a sNaN to qNaN by default. And then it will fail when comparing the source (sNaN) Hole NaN and
  the result (qNaN) which was expected to be a (sNaN) Hole NaN too.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34104}
2016-02-18 09:37:46 +00:00
ishell
32b4bc1382 [es6] [interpreter] Add tail calls support to Ignition.
This CL introduces two new bytecodes TailCall and TailCallWide.

BUG=v8:4698,v8:4687
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34083}
2016-02-17 15:19:50 +00:00
mstarzinger
305a36e0d4 Remove strong mode support from property loads.
R=rossberg@chromium.org,bmeurer@chromium.org,verwaest@chromium.org
BUG=v8:3956
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34067}
2016-02-17 10:30:47 +00:00
rmcilroy
8218fc4686 [Interpreter] Add support for getting inlined functions from interpreted frames.
BUG=v8:4680
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34058}
2016-02-17 08:26:07 +00:00
rmcilroy
5b2d1956eb [Interpreter] Remove some cctest and mjsunit test skips.
Removes some cctest and mjsunit test skips on Ignition for tests that now pass.

BUG=v8:4680
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34045}
2016-02-16 18:52:09 +00:00
rmcilroy
c0c5d1310c [Interpreter] GetExpression(0) in InterpretedFrames gets first local.
Various places assume that GetExpression returns the locals for a frame.
Modify InterpretedFrames such that GetExpression(0) returns the first
local, not the fixed parts of the interpreter frame.

BUG=v8:4690,v8:4680
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34040}
2016-02-16 15:34:08 +00:00
mstarzinger
1150092b29 Remove strong mode support from binary operations.
R=bmeurer@chromium.org
BUG=v8:3956
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34036}
2016-02-16 13:55:29 +00:00
rmcilroy
27204d6e05 [Interpreter] Push BytecodeArray onto interpreted stack frames.
Replaces the push of the dispatch table on the interpreted stack frame with a
push of the bytecode array. This enables the debugger to replace the bytecode
array with a patched version containing breakpoints.

BUG=v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34032}
2016-02-16 12:36:16 +00:00
rmcilroy
84a225d1e4 [Turbofan] Save and restore lr in OutOfLineRecordWrite when frame is elided.
Fixes a bug in Ignition on Arm64 where lr gets trashed in StaContextSlot
which causes the stack walker to get confused and crash.

BUG=v8:4680
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34016}
2016-02-16 07:49:16 +00:00
oth
e768bcca24 [interpreter] Support for ES6 super keyword.
Adds support for ES6 super keyword and performing loads, stores, and
calls to super class members.

Implements SetHomeObject and enables ThisFunctionVariable.

BUG=v8:4280,v8:4682
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33977}
2016-02-15 08:19:07 +00:00
jarin
5418896400 Make the frame inspector use TranslatedState rather than the full deoptimizer.
This is mostly preparation for allowing the function closure to be materialized.

As a drive-by fix, I have added ignition source position support to the frame inspector (this fixed some ignition test failures).

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

Cr-Commit-Position: refs/heads/master@{#33975}
2016-02-15 07:36:57 +00:00
oth
47c08f5f71 [interpreter] Add bytecodes for JumpIfNotHole with constant
Adds JumpIfNotHoleConstant and JumpIfNotHoleConstantWide bytecodes
and removes JumpIfHole bytecode.

In situations with large numbers of constants, the generator would
fail because an 8-bit constant could not be reserved for
JumpIfHole/JumpIfNotHole and so a 16-bit constant would be reserved.
Then when patching the bytecode the patcher would discover there was
no wide constant variant of the emitted jump.

BUG=v8:4280,v8:4680
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33952}
2016-02-12 15:24:43 +00:00
machenbach
cca0c545e2 [test] Skip test for gc stress and turbofan.
BUG=v8:4754
LOG=n
NOTRY=true
TBR=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33944}
2016-02-12 12:39:32 +00:00
jarin
78971c5ee2 Re-enable the mjsunit/block-conflicts.js test in Turbofan.
Review URL: https://codereview.chromium.org/1689573008

Cr-Commit-Position: refs/heads/master@{#33941}
2016-02-12 11:46:30 +00:00
rmcilroy
14fa0fa831 [Interpreter] Remove some Ignition skips from mjsunit and cctest
Remove some Ignition skips in mjsunit and cctest, and replace a few
others with fails now that the there is more debugger support.

BUG=v8:4680
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33932}
2016-02-12 09:35:18 +00:00
Michael Achenbach
2cfa0e8906 [test] Fix expectations.
Cr-Commit-Position: refs/heads/master@{#33929}
2016-02-12 08:01:51 +00:00
Benedikt Meurer
6d03f9e842 [tests] Skip mjsunit/es6/block-conflicts in GC stress mode.
TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33928}
2016-02-12 07:28:47 +00:00
ishell
d12dbab466 [es6] More efficient way of marking AST call expressions in tail positions.
Instead of doing a full function body traversal we collect return expressions and mark them after function parsing.

And since we rewrite do-expressions so that the result is explicitly assigned to a result variable the statements marking will never hit so I removed it from the AST.

BUG=v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33911}
2016-02-11 17:40:16 +00:00
bradnelson
879d254d54 Enable asm-wasm mjsunit tests (skip on arm).
Landing this again, excluding arm as it fail and arm64
out of caution that other wasm arm64 tests are also disabled.

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

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

Cr-Commit-Position: refs/heads/master@{#33910}
2016-02-11 17:05:56 +00:00
machenbach
82434b1bd1 Revert of Enable asm-wasm mjsunit tests. (patchset #1 id:1 of https://codereview.chromium.org/1687813003/ )
Reason for revert:
[Sheriff] Breaks chromebooks with arm:
https://build.chromium.org/p/client.v8/builders/V8%20Arm/builds/4397

You can reland, but please keep it skipped for arm.

Original issue's description:
> Enable asm-wasm mjsunit tests.
>
> BUG= https://code.google.com/p/v8/issues/detail?id=4203
> TEST=mjsunit/asm-wasm
> R=aseemgarg@chromium.org,titzer@chromium.org
> LOG=N
>
> Committed: https://crrev.com/46728d4d9576585bceaa66b8362755c29d3e54bd
> Cr-Commit-Position: refs/heads/master@{#33883}

TBR=aseemgarg@chromium.org,titzer@chromium.org,bradnelson@google.com,bradnelson@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= https://code.google.com/p/v8/issues/detail?id=4203

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

Cr-Commit-Position: refs/heads/master@{#33905}
2016-02-11 15:36:36 +00:00
yangguo
9249890124 [interpreter, debugger] implement bytecode break location iterator.
R=rmcilroy@chromium.org, vogelheim@chromium.org
BUG=v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33904}
2016-02-11 15:31:20 +00:00
ishell
e519e6fadf [es6] Further fixing of tail Calls.
1) Update profiling counters in Full codegen.
2) Call Runtime::kTraceTailCall when tracing is on

test/mjsunit/es6/tail-call-simple.js is disabled for now, because Turbofan does not fully support TCO yet.

BUG=v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33886}
2016-02-11 10:27:10 +00:00
bradnelson
46728d4d95 Enable asm-wasm mjsunit tests.
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/1687813003

Cr-Commit-Position: refs/heads/master@{#33883}
2016-02-11 08:25:56 +00:00
yangguo
e0d0c96a53 [regexp] experimental implementation for \p property class.
Currently we only support general categories for property classes.

R=erik.corry@gmail.com, erikcorry@chromium.org, littledan@chromium.org
BUG=v8:4743
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33872}
2016-02-10 16:24:05 +00:00
rmcilroy
fe58118597 [Interpreter] Group Ignition mjsunit test failures by error.
Also replace SKIPS by FAIL to ensure tests are reenabled once they work.

BUG=v8:4680
LOG=N
CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_arm64_dbg,v8_linux_arm_dbg

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

Cr-Commit-Position: refs/heads/master@{#33821}
2016-02-08 15:49:51 +00:00
mythria
90721a51a3 [Interpreter] Adds support for const/let variables to interpreter.
Adds implementation and tests to support const/let variables in the
interpreter.

BUG=v8:4280,v8:4679
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33819}
2016-02-08 14:14:57 +00:00
mvstanton
3f36e658c8 Revert of Type Feedback Vector lives in the closure (patchset #2 id:40001 of https://codereview.chromium.org/1668103002/ )
Reason for revert:
Must revert for now due to chromium api natives issues.

Original issue's description:
> Type Feedback Vector lives in the closure
>
> (RELAND: the problem before was a missing write barrier for adding the code
> entry to the new closure. It's been addressed with a new macro instruction
> and test. The only change to this CL is the addition of two calls to
> __ RecordWriteCodeEntryField() in the platform CompileLazy builtin.)
>
> We get less "pollution" of type feedback if we have one vector per native
> context, rather than one for the whole system. This CL moves the vector
> appropriately.
>
> We rely more heavily on the Optimized Code Map in the SharedFunctionInfo. The
> vector actually lives in the first slot of the literals array (indeed there is
> great commonality between those arrays, they can be thought of as the same
> thing). So we make greater effort to ensure there is a valid literals array
> after compilation.
>
> This meant, for performance reasons, that we needed to extend
> FastNewClosureStub to support creating closures with literals. And ultimately,
> it drove us to move the optimized code map lookup out of FastNewClosureStub
> and into the compile lazy builtin.
>
> The heap change is trivial so I TBR Hannes for it...
> Also, Yang has had a look at the debugger changes already and approved 'em. So he is TBR style too.
> And Benedikt reviewed it as well.
>
> TBR=hpayer@chromium.org, yangguo@chromium.org, bmeurer@chromium.org
>
> BUG=
>
> Committed: https://crrev.com/bb31db3ad6de16f86a61f6c7bbfd3274e3d957b5
> Cr-Commit-Position: refs/heads/master@{#33741}

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

Cr-Commit-Position: refs/heads/master@{#33766}
2016-02-05 10:48:35 +00:00
mvstanton
bb31db3ad6 Type Feedback Vector lives in the closure
(RELAND: the problem before was a missing write barrier for adding the code
entry to the new closure. It's been addressed with a new macro instruction
and test. The only change to this CL is the addition of two calls to
__ RecordWriteCodeEntryField() in the platform CompileLazy builtin.)

We get less "pollution" of type feedback if we have one vector per native
context, rather than one for the whole system. This CL moves the vector
appropriately.

We rely more heavily on the Optimized Code Map in the SharedFunctionInfo. The
vector actually lives in the first slot of the literals array (indeed there is
great commonality between those arrays, they can be thought of as the same
thing). So we make greater effort to ensure there is a valid literals array
after compilation.

This meant, for performance reasons, that we needed to extend
FastNewClosureStub to support creating closures with literals. And ultimately,
it drove us to move the optimized code map lookup out of FastNewClosureStub
and into the compile lazy builtin.

The heap change is trivial so I TBR Hannes for it...
Also, Yang has had a look at the debugger changes already and approved 'em. So he is TBR style too.
And Benedikt reviewed it as well.

TBR=hpayer@chromium.org, yangguo@chromium.org, bmeurer@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33741}
2016-02-04 15:41:23 +00:00
mstarzinger
76bfc16bea [interpreter] Switch context during stack unwinding.
This implements proper context switching while unwinding the stack due
to an exception being handled in interpreted code. The context under
which the handler is scoped is being preserved in a dedicated register
while the try-block is running. Both, the stack unwinding machinery as
well as the graph builder, restore the context from that register.

R=rmcilroy@chromium.org,bmeurer@chromium.org
BUG=v8:4674
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33733}
2016-02-04 13:43:55 +00:00
rmcilroy
1ce720f2a4 [Interpreter] Add explicit StackCheck bytecodes on function entry and back branches.
Moves the stack check from the function entry trampoline to instead be
after function activation using an explicit StackCheck bytecode. Also
add stack checks on back edges of loops.

BUG=v8:4280,v8:4678
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33730}
2016-02-04 12:33:48 +00:00
mythria
8d3e1ca357 [Interpreter] Adds support for with statement to interpreter.
Adds implementation and tests for with statement to interprter.

BUG=v8:4280,v8:4684
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33705}
2016-02-03 14:41:37 +00:00
neis
a973f73465 Expect JSReceiver in Runtime_DeleteLookupSlot, not just JSObject.
BUG=chromium:583260
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33697}
2016-02-03 09:49:22 +00:00
rmcilroy
d81edba721 [Interpreter] Set bytecode array in Runtime_SetCode.
Set the bytecode array correctly in Runtime_SetCode.
This fixes issues with building the snapshot with ignition enabled.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33638}
2016-02-01 12:13:21 +00:00
yangguo
835b038331 [debugger] correctly find function context.
In the debugger we are interested in getting the context for the
current frame, which is usually a function context. To do that,
we used to call Context::declaration_context, which may also
return a block context. This is wrong and can lead to crashes.
Instead, we now use a newly introduced Context::closure_context,
which skips block contexts. This works fine for the debugger,
since we have other means to find and materialize block contexts.

R=rossberg@chromium.org
BUG=chromium:582051
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33627}
2016-02-01 07:03:44 +00:00