Commit Graph

27847 Commits

Author SHA1 Message Date
mythria
dac46ef717 [Interpreter] Adds support for variable/function declarations in lookup slots.
Adds support for variable and function declarations in lookup slots to the
interpreter.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33355}
2016-01-18 12:00:25 +00:00
yangguo
085487dd03 [regexp] fix interpreted irregexp build.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33354}
2016-01-18 10:42:13 +00:00
mstarzinger
8041a753ca Drop "current_code" from compiler API.
This removes the need to pass in the current unoptimized code when
requesting optimized code for a function. Note that the notion of
unoptimized code becomes moot when optimizing from the interpreter
bytecode, hence the API should not encode such a dependency.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33353}
2016-01-18 10:24:22 +00:00
zhengxing.li
a4414c9570 X87: [Interpreter] Add ForInPrepare runtime function which returns a ObjectTriple.
port 84f8a506e2 (r33334)

  original commit message:
  Adds a ForInPrepare Runtime function which returns a triple of
  cache_type, cache_array and cache_length.

  This requires adding support to CEntryStub to call runtime functions
  which return a ObjectTriple - a struct containing three Object*
  pointers. Also did some cleanup of the x64 CEntryStub to avoid
  replicated code.

  Replaces the interpreter's use of the ad-hock InterpreterForInPrepare
  Runtime function with ForInPrepare in preparation for fixing deopt in
  BytecodeGraphBuilder for ForIn (which will be done in a followup CL).

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

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33352}
2016-01-18 08:42:08 +00:00
zhengxing.li
30bcfba3f7 X87: [turbofan] Add the RoundInt32ToFloat32 operator to turbofan.
port e06f7d784e (r33347)

  original commit message:
  The new operator converts an int32 input to float32. If the input cannot
  be represented exactly in float32, the value is rounded using the
  round-ties-even rounding mode (the default rounding mode).

  I provide implementations of the new operator for x64, ia32, arm, arm64,
  mips, mips64, ppc, and ppc64.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33351}
2016-01-18 08:39:58 +00:00
bmeurer
6faa6b317a [runtime] Remove the now unused %StoreArrayLiteralElement.
The runtime function is no longer used and obsolete by now.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33350}
2016-01-18 06:34:22 +00:00
mtrofin
4ca809d7b2 [turbofan] Skip spill operand ranges from spilled in deferred.
We don't need to treat as "spills in deferred blocks" ranges that have
no spill range, or that have a spill operand.

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

Cr-Commit-Position: refs/heads/master@{#33349}
2016-01-18 06:05:43 +00:00
v8-autoroll
c539769aa5 Update V8 DEPS.
Rolling v8/tools/clang to 908392433b14b2ffe86bd1c791531816a65b7378

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33348}
2016-01-17 04:29:46 +00:00
ahaas
e06f7d784e [turbofan] Add the RoundInt32ToFloat32 operator to turbofan.
The new operator converts an int32 input to float32. If the input cannot
be represented exactly in float32, the value is rounded using the
round-ties-even rounding mode (the default rounding mode).

I provide implementations of the new operator for x64, ia32, arm, arm64,
mips, mips64, ppc, and ppc64.

R=titzer@chromium.org, v8-arm-ports@googlegroups.com, v8-mips-ports@googlegroups.com, v8-ppc-ports@googlegroups.com

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

Cr-Commit-Position: refs/heads/master@{#33347}
2016-01-16 13:12:16 +00:00
ahaas
fc53eed14b [turbofan] Add the TruncateFloat32ToInt32 operator to turbofan.
The new operator converts a float32 input to int32 through truncation.
I provide implementations of the new operator for x64, ia32, arm,
arm64, mips, mips64, and x87. @v8-ppc-ports, can you please take care
of the ppc implementation?

R=titzer@chromium.org, v8-arm-ports@googlegroups.com, v8-mips-ports@googlegroups.com, weiliang.lin@intel.com

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

Cr-Commit-Position: refs/heads/master@{#33346}
2016-01-16 11:41:31 +00:00
adamk
dc6a593918 [ast cleanup] Remove unnecessary frozen_ bit from ModuleDescriptor
This may have made more sense in the old module design (where
"unification" was a thing), but as-is it's only used for a few
asserts in debug mode. These asserts don't make much sense inside
ModuleDescriptor; instead, as the modules implementation is fleshed
out, I expect the appropriate replacement asserts to show up at the
use of the ModuleDescriptor.

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

Cr-Commit-Position: refs/heads/master@{#33345}
2016-01-16 00:42:45 +00:00
adamk
25532be593 [modules] Support parsing anonymous default exports
This includes anonymous Function, Generator, and Class declarations when
preceded by 'export default'. Parsing only at the moment, nothing useful is
done with the parsed Function/ClassLiteral.

BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33344}
2016-01-15 20:39:00 +00:00
mbrandy
b099e861ef PPC: Fix simulator.
R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33343}
2016-01-15 20:24:01 +00:00
mbrandy
b2c246e0a9 PPC: [Interpreter] Add ForInPrepare runtime function which returns a ObjectTriple.
Port 84f8a506e2

Original commit message:
    Adds a ForInPrepare Runtime function which returns a triple of
    cache_type, cache_array and cache_length.

    This requires adding support to CEntryStub to call runtime functions
    which return a ObjectTriple - a struct containing three Object*
    pointers. Also did some cleanup of the x64 CEntryStub to avoid
    replicated code.

    Replaces the interpreter's use of the ad-hock InterpreterForInPrepare
    Runtime function with ForInPrepare in preparation for fixing deopt in
    BytecodeGraphBuilder for ForIn (which will be done in a followup CL).

R=rmcilroy@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33342}
2016-01-15 19:06:32 +00:00
mbrandy
bbb95fba40 PPC: [runtime] Throw exception for derived constructors in correct context.
Port c86f1897ac

Original commit message:
    When derived constructors return a non-object (or not undefined) we
    currently throw an exception directly in the callee context. This was
    achieved by desugaring the return statement for derived classes. To
    be spec compliamnt a separate ConstructStubForDerived is introduced.
    Instead of trowing directly, the desugared return statement inside
    a derived constructor only returns an integer to indicate an incompatible
    result.

R=cbruni@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:4509
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33341}
2016-01-15 19:05:24 +00:00
balazs.kilvady
316ef28676 MIPS: [runtime] Throw exception for derived constructors in correct context.
Port for https://codereview.chromium.org/1593553002/

Original commit message:
When derived constructors return a non-object (or not undefined) we
currently throw an exception directly in the callee context. This was
achieved by desugaring the return statement for derived classes. To
be spec compliamnt a separate ConstructStubForDerived is introduced.
Instead of trowing directly, the desugared return statement inside
a derived constructor only returns an integer to indicate an incompatible
result.

BUG=v8:4509
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33340}
2016-01-15 16:58:43 +00:00
mbrandy
39f709368e PPC: Fix CompatibleReceiverCheck.
R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33339}
2016-01-15 16:52:41 +00:00
Michael Achenbach
b540f5a7bd Whitespace change to test swarming.
Cr-Commit-Position: refs/heads/master@{#33338}
2016-01-15 16:39:57 +00:00
rmcilroy
609e754193 [Interpreter] Skip test-heap/Regress538257 on Arm64 Ignition due to flake.
BUG=v8:4280
LOG=N
TBR=machenbach@chromium.org
NOTRY=TRUE

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

Cr-Commit-Position: refs/heads/master@{#33337}
2016-01-15 16:04:56 +00:00
cbruni
c86f1897ac [runtime] Throw exception for derived constructors in correct context.
When derived constructors return a non-object (or not undefined) we
currently throw an exception directly in the callee context. This was
achieved by desugaring the return statement for derived classes. To
be spec compliamnt a separate ConstructStubForDerived is introduced.
Instead of trowing directly, the desugared return statement inside
a derived constructor only returns an integer to indicate an incompatible
result.

BUG=v8:4509
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33336}
2016-01-15 15:31:28 +00:00
mstarzinger
c55561643d [heap] Remove left-over object stats tracking declaration.
R=mlippautz@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33335}
2016-01-15 14:38:44 +00:00
rmcilroy
84f8a506e2 [Interpreter] Add ForInPrepare runtime function which returns a ObjectTriple.
Adds a ForInPrepare Runtime function which returns a triple of
cache_type, cache_array and cache_length.

This requires adding support to CEntryStub to call runtime functions
which return a ObjectTriple - a struct containing three Object*
pointers. Also did some cleanup of the x64 CEntryStub to avoid
replicated code.

Replaces the interpreter's use of the ad-hock InterpreterForInPrepare
Runtime function with ForInPrepare in preparation for fixing deopt in
BytecodeGraphBuilder for ForIn (which will be done in a followup CL).

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

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33334}
2016-01-15 14:35:31 +00:00
hablich
80a648f557 Update V8 version after branch creation to 4.10
TBR=danno@chromium.org,machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33333}
2016-01-15 14:21:50 +00:00
bmeurer
f23985d767 [runtime] No need to carry around the creation context for JSBoundFunctions.
We can return the creation context of the [[BoundTargetFunction]], and
don't need to remember the context in which the function was bound.

R=verwaest@chromium.org
BUG=chromium:535408
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33332}
2016-01-15 14:15:02 +00:00
rmcilroy
8a9927c351 [Interpreter] Skip regress-2249 on Arm Ignition which is still failing
BUG=v8:4280
LOG=N
TBR=machenbach@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#33331}
2016-01-15 13:53:29 +00:00
mstarzinger
725203d417 [parsing] Move EvalComparison out of the assembler.
This refactoring removes the dependency on the Token class from the
assembler.h header file, the utility function in question has nothing
to do with assembling in the first place.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33330}
2016-01-15 13:14:08 +00:00
jochen
cccb7e1f58 Value::IsObject should return true for proxies as well
Because in the C++ API, a Proxy is an Object

BUG=none
R=bmeurer@chromium.org
LOG=n
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng

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

Cr-Commit-Position: refs/heads/master@{#33329}
2016-01-15 13:07:09 +00:00
jochen
ea1152676b Make JSProxies always be in slow mode
That way, we don't have to implement the fast <-> slow migration logic,
and we don't allocate in-object properties anyways

BUG=chromium:571365
R=verwaest@chromium.org,neis@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33328}
2016-01-15 13:03:10 +00:00
bmeurer
a6900e0cb7 [runtime] Unify the ToObject handling.
Unify Object::ToObject and Execution::ToObject, and unify all users to
go to Object::ToObject directly. Also remove some dead code from the
frame details debug API.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33327}
2016-01-15 13:00:05 +00:00
mlippautz
7cf64f4017 [heap] Make survival counters concurrent (atomic)
Those counters will be incremented concurrently during parallel evacuation of
newspace. This change makes sure we do the updates atomically.

Note that actual reasoning about them happens sequentially on the main thread.

BUG=chromium:524425
LOG=N
R=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33326}
2016-01-15 12:23:32 +00:00
mstarzinger
0aeaf0cbd1 Move SourcePosition into separate header file.
This splits out the SourcePosition class into a separate header file.
Reason for this refactoring is that said class is mostly used by the
Crankshaft compiler and not needed for all compilers. Also having the
assembler depend on the class creates a dependency cycle.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33325}
2016-01-15 12:11:50 +00:00
mlippautz
a89d41f05b [heap] Remove store_buffer_counter from MemoryChunk
It is only used locally when exempting pages from the store buffer. This use
case can be replaced with a hashmap at the call site.

BUG=chromium:524425
LOG=N
R=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33324}
2016-01-15 11:50:20 +00:00
cbruni
b0119907ac Adding AstNode::PrettyPrint and AstNode::PrintAst
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33323}
2016-01-15 11:33:36 +00:00
rmcilroy
be2210bcc4 [Interpreter] Remove Ignition skips fixed by 48a3227b
Remove ignition skips which are fixed by 48a3227b7d.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33322}
2016-01-15 11:26:24 +00:00
machenbach
04191c2218 [release] Bump waiting for gnumbd to avoid broken tags.
NOTRY=true
TBR=hablich@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33321}
2016-01-15 10:24:54 +00:00
ishell
1bb7cfda7f [crankshaft] Don't inline array indexOf operations if receiver's proto is not a JSObject.
BUG=chromium:577112
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33320}
2016-01-15 10:19:59 +00:00
epertoso
ea5a1ac8b5 Marks FunctionCallbackInfo's Callee as deprecated.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33319}
2016-01-15 10:03:15 +00:00
bmeurer
489e7e3915 [runtime] Migrate Object.getOwnPropertySymbols to C++.
The Object.getOwnPropertySymbols() calls into C++ at least once on every
possible path, so no point in having the JavaScript wrapper.

Drive-by-cleanup: Also move Symbol.prototype creation to C++ as well.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33318}
2016-01-15 09:52:25 +00:00
v8-autoroll
9a6e85552f Update V8 DEPS.
Rolling v8/build/gyp to 54b7dfc03f746b6a539ac38f2fb0815d10b54734

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33317}
2016-01-15 04:23:47 +00:00
bradnelson
3dcbc57e73 Allow asm modules to be instatiated with external heaps.
This merges the instantiation logic between instantiateModule
and instantiateModuleFromAsm.

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

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

Cr-Commit-Position: refs/heads/master@{#33316}
2016-01-14 23:09:03 +00:00
bradnelson
090bf558f5 Reformat asm-wasm.js for increased readability.
BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=asm-wasm
R=aseemgarg@chromium.org,titzer@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33315}
2016-01-14 22:10:07 +00:00
mbrandy
4faa262e9c PPC: [Interpreter] Fix PushArgsAndConstruct
Port 48a3227b7d

Original commit message:
    When reserving a stack slot for the receiver, push an Immediate(0)
    rather than a register that contains an untagged integer.
    All other platforms push zero already.

R=jkummerow@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33314}
2016-01-14 20:09:01 +00:00
adamk
f17e9adf99 [parser cleanup] Use BlockState consistently in Parser
This avoids manual, fragile assignment to Parser::scope_. And once all such
assignments are removed, BlockState might become much more valuable as
a place to reset scope-related state.

Also remove unnecessary nullptr checks after calls to FinalizeBlockScope.

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

Cr-Commit-Position: refs/heads/master@{#33313}
2016-01-14 19:25:27 +00:00
littledan
e13f2ff40b Construct instances of base class from TypedArray.prototype.subarray
Previous changes with subclassable builtins and @@species were a bit
aggressive in making TypedArray.prototype.subarray act like the
ES2016 specification in terms of returning an instance of the
subclass as a result. It turns out that Node.js, and extracted
libraries for the web, subclass TypedArrays but don't expect the
subclass constructor to be called by subarray. @@species will provide
an escape hatch, but it has not shipped yet, and will take some time
for uptake by libraries.

For now, this patch makes TypedArray.prototype.subarray fall back to
constructing an instance of the parent TypedArray class, such as
Uint8Array.

R=adamk
LOG=Y
BUG=v8:4665

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

Cr-Commit-Position: refs/heads/master@{#33312}
2016-01-14 19:23:26 +00:00
adamk
bcde4e271e Propagate the "calls eval" bit from ScopeInfo to lazily-compiled arrow functions
This avoids generating different scopes on the two compilation passes, which
results in various delirious side-effects.

There's some cleanup to be done in lazy arrow function parsing, but I'd
rather do that in a separate patch, with this one targeted at fixing the
particular crash.

BUG=chromium:572589
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33311}
2016-01-14 19:21:24 +00:00
mbrandy
5312bfb9f3 PPC: [wasm] Fixes for embedded constant pools.
R=titzer@chromium.org, bradnelson@chromium.org, ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33310}
2016-01-14 18:30:52 +00:00
rossberg
92e6f7a315 Don't pre-initialise block contexts with holes
Respective declarations will explicitly initialise slots
with the hole anyway, so this always was unnecessary.
With varblocks it even became wrong, because block contexts
may now host var bindings, which want undefined.

Fixes the hole leaking when accessing an unitialised,
block-context-allocated var.

R=neis@chromium.org
BUG=571149
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33309}
2016-01-14 18:04:35 +00:00
mbrandy
04f1759522 Skip failing wasm tests on platforms with function descriptors.
Temporarily disable until solution is implemented.

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

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

Cr-Commit-Position: refs/heads/master@{#33308}
2016-01-14 17:57:40 +00:00
nikolaos
07f1c36273 Add spread rewriting
In short, array literals containing spreads, when used as expressions,
are rewritten using do expressions.  E.g.

    [1, 2, 3, ...x, 4, ...y, 5]

is roughly rewritten as:

    do {
      $R = [1, 2, 3];
      for ($i of x) %AppendElement($R, $i);
      %AppendElement($R, 4);
      for ($j of y) %AppendElement($R, $j);
      %AppendElement($R, 5);
      $R
    }

where $R, $i and $j are fresh temporary variables.

R=rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33307}
2016-01-14 17:50:46 +00:00
mbrandy
0c1430ac2b Additional 64-bit Wasm tests to skip list for big-endian.
R=titzer@chromium.org, hablich@chromium.org, paul.lind@imgtec.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33306}
2016-01-14 17:28:04 +00:00