Commit Graph

5252 Commits

Author SHA1 Message Date
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
adamk
045fa997b7 Handle ES2015 Function.name in CallSite::GetMethodName
CallSite depends on using the function name to get ahold of the property
name from which an exception was thrown. This fix properly handles the
ES2015 names for getters and setters. The new tests pass both with
--harmony-function-name off and on.

BUG=v8:3699
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34469}
2016-03-03 20:19:41 +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
caitpotter88
18b9c1ce70 [proxies] throw TypeError if is_callable Map bit is unset
Per ProxyCreate() (https://tc39.github.io/ecma262/#sec-proxycreate), a Proxy
is only given a [[Call]] slot if the target has a [[Call]] slot as well. This
was previously implemented correctly for [[Construct]], but not for [[Call]].

BUG=v8:4797, v8:4796, v8:1543
LOG=N
R=cbruni@chromium.org, neis@chromium.org, adamk@chromium.org, littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34461}
2016-03-03 15:23:05 +00:00
weiliang.lin
9d0cf920bd [wasm] add rotate opcodes
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34455}
2016-03-03 05:11:10 +00:00
bradnelson
4db99810da Add wasm internal opcodes for asm.js stdlib functions we're missing.
BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=mjsunit/asm-wasm
R=aseemgarg@chromium.org,titzer@chromium.org,yangguo@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34452}
2016-03-03 01:23:22 +00:00
dtc-v8
76f37d3ba6 wasm: change the module memory size to be multiples of the page size, 64k.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34450}
2016-03-03 00:00:00 +00:00
bmeurer
0c35579093 [crankshaft] Fix invalid ToNumber optimization.
We cannot optimize away ToNumber conversions based on the Type that we
see in Crankshaft, as this might be the (unchecked or even pretruncated)
lower bound. We can only use the HType, which is based on the definition.

R=jkummerow@chromium.org
BUG=chromium:590989
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34445}
2016-03-02 19:28:04 +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
879b617b19 Change syntax error message for illegal token.
It used to say "Unexpected token ILLEGAL", now it says "Invalid or unexpected token".

R=jkummerow@chromium.org
BUG=chromium:257405
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34431}
2016-03-02 14:20:48 +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
sergeyv
294d17a7d8 Devtools: expose scopes source location to debugger
blink-side cl: https://codereview.chromium.org/1653053002/

BUG=327092
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34417}
2016-03-02 02:20:05 +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
bradnelson
2a9a770c2a Convert float64 to float32 when coerced with a heapf32 assignment.
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/1749233002

Cr-Commit-Position: refs/heads/master@{#34404}
2016-03-01 18:07:19 +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
neis
0ad44590e0 [json] Fix iteration over object keys in InternalizeJSONProperty.
We must not use for-of since that could be observed.

R=yangguo@chromium.org
BUG=v8:4769
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34387}
2016-03-01 11:53:28 +00:00
neis
85d1a55e83 Fix spec-compliance bug in ArrayIteratorPrototype.
ArrayIteratorPrototype must not provide Symbol.iterator.

R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34386}
2016-03-01 11:51:52 +00:00
neis
ef8fa8521c Fix accidental bug in yield* desugaring.
The for-of-finalization CL incorrectly removed the input argument from
BuildIteratorClose.  I'm reverting this, adding a regression test, and fixing an
existing test that was wrong.

BUG=
R=rossberg

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

Cr-Commit-Position: refs/heads/master@{#34384}
2016-03-01 09:39:18 +00:00
neis
c4f39389ea Fix spec-compliance bug in Array.prototype.join.
The code used to [[Get]] the first element twice instead of once, which can be
observed (one of the kangax tests does so).

R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34383}
2016-03-01 09:07:38 +00:00
nikolaos
de817ef9c7 Fix issue with re-scoping in do expressions
R=rossberg@chromium.org
BUG=v8:4783
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34382}
2016-03-01 09:04:38 +00:00
aseemgarg
4537f09374 Replace __init__ function in asm-wasm-builder with the start function section
BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=mjsunit/asm-wasm
R=titzer@chromium.org,bradnelson@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34375}
2016-03-01 05:50:55 +00:00
neis
a40d5d544d Remove [[Enumerate]] leftovers.
R=littledan@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34366}
2016-02-29 17:02:50 +00:00
titzer
91802542d5 [wasm] Rename ExprBoolNot to ExprI32Eqz.
R=bradnelson@chromium.org, binji@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34350}
2016-02-28 19:02:24 +00:00
titzer
06241221a6 [wasm] Add a magic word and a version number to the binary.
R=binji@chromium.org,jfb@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34346}
2016-02-28 00:37:29 +00:00
titzer
8344687c76 [wasm] Properly plumb the origin of the WASM module from asm.js translation.
R=bradnelson@chromium.org,aseemgarg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34345}
2016-02-27 20:40:06 +00:00
titzer
d035d6172a [wasm] Add an export table.
R=binji@chromium.org,jfb@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34342}
2016-02-27 01:54:30 +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
58ab990aa8 [turbofan] Bailout if LoadBuffer typing assumption doesn't hold.
The LoadBuffer operator that is used for asm.js heap access claims to
return only the appropriate typed array type, but out of bounds access
could make it return undefined. So far we tried to "repair" the graph
later if we see that our assumption was wrong, and for various reasons
that worked for some time. But now that wrong type information that is
propagated earlier is picked up appropriately and thus we generate wrong
code, i.e. we in the repro case we feed NaN into ChangeFloat64Uint32 and
thus get 2147483648 instead of 0 (with proper JS truncation).

This was always considered a temporary hack until we have a proper
asm.js pipeline, but since we still run asm.js through the generic
JavaScript pipeline, we have to address this now. Quickfix is to just
bailout from the pipeline when we see that the LoadBuffer type was
wrong, i.e. the result of LoadBuffer is not properly truncated and thus
undefined or NaN would be observable.

R=mstarzinger@chromium.org, jarin@chromium.org
BUG=chromium:589792
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#34322}
2016-02-26 11:06:30 +00:00
bmeurer
7f11fba720 [runtime] Remove obsolete %Apply and %TailCall runtime entries.
The %TailCall runtime entry and the %_TailCall intrinsic is not used,
and will never be used (because %TailCall doesn't actually do a tail
call). We will soon have proper ES6 tail calls, which are correct and
properly tested.

The %Apply runtime entry is basically a super-slow, less correct version
of Reflect.apply, so we can as well just use Reflect.apply, which is
exposed to builtins via %reflect_apply.

R=ishell@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34317}
2016-02-26 08:10:09 +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
littledan
60eb0fdf61 Make TypedArray.from and TypedArray.of writable and configurable
BUG=v8:4315
R=adamk
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34310}
2016-02-26 04:39:54 +00:00
littledan
227fd1d4ed Ship ES2015 iterator finalization
This patch moves iterator finalization (calling .return() when a
for-of loop exits early) to shipping. The only part of this feature
which is currently known to be missing is destructuring--.return()
should be also be called when destructuring with an array which
does not end in a rest pattern, but it currently does not. The rest
of this feature, including calling .return() from certain builtins,
is implemented.

R=adamk
BUG=v8:3566
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34307}
2016-02-25 23:16:53 +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
jkummerow
01d228f3cd Tune Array.forEach, fix Array functions
When there is no receiver object, plain function calls are a few
percent faster than %_Call().
This patch also fixes the HAS_INDEX macro used in a bunch of
Array.prototype functions to properly check for elements inherited
from prototypes.

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

Cr-Commit-Position: refs/heads/master@{#34269}
2016-02-25 05:43:48 +00:00
littledan
1aee75551e Ensure IteratorClose is called for errors in non-declaring assignments
There was a bug in for-of loops without newly declared variables: If,
in performing the assignment, an exception were thrown, then
IteratorClose would not be called. The problem was that the assignment
is done as part of assign_each, which happens before the loop is put
back in the state which is recognized to be breaking/throwing/returning
early.

This patch modifies the for-of desugaring by setting the loop state
before, rather than after, evaluating the assign_each portion, which is
responsible for evaluating the assignment in for-of loops which do not
have a declaration.

This patch, together with https://codereview.chromium.org/1728973002 ,
allow all test262 iterator return-related tests to pass.

R=rossberg
BUG=v8:4776
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34262}
2016-02-24 18:52:29 +00:00
littledan
5f67e34aed Fix priority of exceptions being thrown from for-of loops
In the for-of desugaring, IteratorClose is a subtle thing to get right.
When return exists, the logic for which exception to throw is as follows:
1. Get the 'return' property and property any exception that might come from
  the property read
2. Call return, not yet propagating an exception if it's thrown.
3. If we are closing the iterator due to an exception, propagate that error.
4. If return threw, propagate that error.
5. Check if return's return value was not an object, and throw if so

Previously, we were effectively doing step 5 even if an exception "had already
been thrown" by step 3. Because this took place in a finally block, the exception
"won the race" and was the one propagated to the user. The fix is a simple change
to the desugaring to do step 5 only if step 3 didn't happen.

R=rossberg
BUG=v8:4775
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34261}
2016-02-24 18:21:44 +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
bmeurer
199bfb9b31 [test] Rewrite mjsunit/array-natives-elements to make it pass with Crankshaft.
There was an eval inside the array_natives_test() which prevented
Crankshaft, even tho it's unrelated, and so we always went to TurboFan
now, which both decreased test coverage and increased time for stress
opt runs.

R=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34248}
2016-02-24 11:55:26 +00:00
mstarzinger
ee8108b71c [fullcodegen] Implement control flow across do-expressions.
This implements proper handling of local control flow (i.e. break and
continue) that spans the boundary of a do-expression. We can no longer
determine the number of operands to be dropped from the nesting of
statements alone, instead we use the new precise operand stack depth
tracking.

R=jarin@chromium.org
TEST=mjsunit/harmony/do-expressions-control
BUG=v8:4488
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34246}
2016-02-24 11:06:08 +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