Commit Graph

24912 Commits

Author SHA1 Message Date
mbrandy
d486f86bec PPC: Fix "Correctify instanceof and make it optimizable."
R=jyan@ca.ibm.com, dstence@us.ibm.com, joransiu@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30420}
2015-08-27 15:54:42 +00:00
mbrandy
448a3c0fe0 PPC: Correctify instanceof and make it optimizable.
Port 5d875a57fa

Original commit message:
    The previous hack with HInstanceOfKnownGlobal was not only slower,
    but also very brittle and required a lot of weird hacks to support it. And
    what's even more important it wasn't even correct (because a map check
    on the lhs is never enough for instanceof).

    The new implementation provides a sane runtime implementation
    for InstanceOf plus a fast case in the InstanceOfStub, combined with
    a proper specialization in the case of a known global in CrankShaft,
    which does only the prototype chain walk (coupled with a code
    dependency on the known global).

    As a drive-by-fix: Also fix the incorrect Object.prototype.isPrototypeOf
    implementation.

R=bmeurer@chromium.org, jyan@ca.ibm.com, dstence@us.ibm.com, joransiu@ca.ibm.com
BUG=v8:4376
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30419}
2015-08-27 15:11:03 +00:00
mlippautz
5d3f801a46 [heap] Get rid of dead code in HeapIterator.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30418}
2015-08-27 14:56:16 +00:00
yangguo
b6f0ee50a7 [turbofan] Remove obsolete BuildLoadBuiltinsObject.
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30417}
2015-08-27 14:45:24 +00:00
titzer
76cf87d42f [wasm] Move the (conditional) installation of the WASM api into bootstrapper.cc.
R=mstarzinger@chromium.org,yangguo@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30416}
2015-08-27 14:42:53 +00:00
hpayer
d4e372b41b Clear SMI and non-evacuation candidate entries when filtering the slots buffer.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30415}
2015-08-27 14:31:02 +00:00
mbrandy
f481316b14 PPC: [interpreter]: Changes to interpreter builtins for accumulator and register file registers.
Port 00df60d1c6

Original commit message:
    Makes the following modifications to the interpreter builtins and
    InterpreterAssembler:
     - Adds an accumulator register and initializes it to undefined()
     - Adds a register file pointer register and use it instead of FramePointer to
       access registers
     - Modifies builtin to support functions with 0 regiters in the register file
     - Modifies builtin to Call rather than TailCall to first bytecode handler.

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

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

Cr-Commit-Position: refs/heads/master@{#30414}
2015-08-27 14:23:34 +00:00
mbrandy
bcc9df9273 PPC: Make Simulator respect C stack limits as well.
Port 7fb31bdba4

Original commit message:
    The simulator uses a separate JS stack, exhaustion of the C stack
    however is not caught by JS limit checks. This change now lowers the
    limit of the JS stack accordingly on function calls.

R=mstarzinger@chromium.org, jyan@ca.ibm.com, dstence@us.ibm.com, joransiu@ca.ibm.com
BUG=chromium:522380
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30413}
2015-08-27 14:01:59 +00:00
mstarzinger
e276f5d89e [heap] Remove raw unchecked root set accessors.
R=hpayer@chromium.org
BUG=v8:1490
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30412}
2015-08-27 13:57:50 +00:00
hpayer
ebda415e30 Wait for concurrent unmapping tasks in GC prologue.
BUG=chromium:525372
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30411}
2015-08-27 13:29:00 +00:00
cbruni
8198610d5d Adding ElementsAccessor Splice
- remove the Backing-Store specific code from builtins.cc and put it in elements.cc.
- adding tests to improve coverage of the splice method

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30410}
2015-08-27 13:06:05 +00:00
mstarzinger
1dc711f246 Move runtime helper for ToName conversion onto Object.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30409}
2015-08-27 12:50:46 +00:00
mstarzinger
8d54fc2e87 [heap] Limit friendship of the Heap class to essentials.
This makes it clear that only components within the "heap" directory
should be friends with the Heap class. The two notable exceptions are
Factory and Isolate which represent external interfaces into the heap.

R=mlippautz@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30408}
2015-08-27 12:30:15 +00:00
mlippautz
147330f37c [heap] Add compaction space.
The CompactionSpace is temporarily used during compaction to hold migrated
objects. The payload is merged back into the corresponding space after
compaction.

Note the this is not the complete implementation and it is currently only used in a test.

BUG=chromium:524425
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30407}
2015-08-27 12:16:13 +00:00
rmcilroy
bc4a198dd0 [interpreter] Fix gcmole error after r30404.
BUG=v8:4280
LOG=N
TBR=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30406}
2015-08-27 12:13:36 +00:00
yangguo
6bef1d0a13 Remove builtin/runtime name clash presubmit check.
It has become obsolete since we do the name lookup at compile time.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30405}
2015-08-27 11:14:09 +00:00
rmcilroy
69ce0f4dc7 [interpreter] Add constant_pool() to BytecodeArray.
Adds a (currently unused) constant_pool() field to BytecodeArray objects.
This field points to a FixedArray object which will be used to hold constants.

The BytecodeArray is now a mixed values object type, with the
kConstantPoolOffset object holding a tagged pointer, but the remainder of the
object holding raw bytes (which could look like tagged pointers but are not).
Modify the BytecodeArray GC visitors to deal with this and test that the
field is migrated properly when evacuated.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30404}
2015-08-27 11:11:23 +00:00
rmcilroy
5d975694e4 [Interpreter] Add support for parameter variables.
Adds support for parameters to the BytecodeArrayBuilder and BytecodeGenerator.
Parameters are accessed as negative interpreter registers.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30403}
2015-08-27 10:32:39 +00:00
yangguo
b42c4459e6 Move (uppercase) JS builtins from js builtins object to native context.
R=bmeurer@chromium.org, mstarzinger@chromium.org, rmcilroy@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30402}
2015-08-27 10:18:42 +00:00
mvstanton
7db48046ea Vector ICs: Stop iterating the heap to clear keyed store ics.
When vector based stores are on, we don't need to do this anymore.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30401}
2015-08-27 08:52:15 +00:00
mtrofin
1c6139de8b [turbofan] LiveRange splinter merging optimizations.
A few benchmarks, e.g. Massive/SQLite, turn out to be
sensitive to compile time. Upon analysis, splinter merging
and then splinter creation (splitting) appear to be the main
contributors to such regressions. This change tackles main
sources of regression in Merging. Profiling SQLite shows,
after this change, Merging as noise (down from main C++
contributor of samples)

BUG=chromium:1318893002
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30400}
2015-08-27 04:44:41 +00:00
mtrofin
283d413729 [turbofan] Ensure stackcheck flags do something.
While the intention is to eventually do away with
FLAG_turbo_loop_stackcheck and FLAG_turbo_preprocess_range,
they are useful for the interim we are still testing and
benchmarking the feature.

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

Cr-Commit-Position: refs/heads/master@{#30399}
2015-08-27 04:41:31 +00:00
bradnelson
e2b3edbf31 Spliting out TyperCache into ZoneTypeCache to share with AsmTyper.
The zone type cache would be handy inside the asm.js typer.
Pulling it out into a seperate inlinable header to allow sharing.

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

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

Cr-Commit-Position: refs/heads/master@{#30398}
2015-08-26 21:41:05 +00:00
mbrandy
972bd61586 PPC: Fix InterpreterEntryTrampoline().
R=jyan@ca.ibm.com, dstence@us.ibm.com, joransiu@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30397}
2015-08-26 21:33:25 +00:00
mbrandy
4187035087 PPC: [turbofan] Unify referencing of stack slots
Port cbbaf9ea6a

Note that the above commit breaks embedded constant pools and will need to
be revised in a future CL.

Original commit message:
    Previously, it was not possible to specify StackSlotOperands for all
    slots in both the caller and callee stacks. Specifically, the region
    of the callee's stack including the saved return address, frame
    pointer, function pointer and context pointer could not be addressed
    by the register allocator/gap resolver.

    In preparation for better tail call support, which will use the gap
    resolver to reconcile outgoing parameters, this change makes it
    possible to address all slots on the stack, because slots in the
    previously inaccessible dead zone may become parameter slots for
    outgoing tail calls. All caller stack slots are accessible as they
    were before, with slot -1 corresponding to the last stack
    parameter. Stack slot indices >= 0 access the callee stack, with slot
    0 corresponding to the callee's saved return address, 1 corresponding
    to the saved frame pointer, 2 corresponding to the current function
    context, 3 corresponding to the frame marker/JSFunction, and slots 4
    and above corresponding to spill slots.

    The following changes were specifically     needed:

    * Frame     has been changed to explicitly manage three areas of the
      callee frame, the fixed header, the spill slot area, and the
      callee-saved register area.
    * Conversions from stack slot indices to fp offsets all now go through
      a common bottleneck: OptimizedFrame::StackSlotOffsetRelativeToFp
    * The generation of deoptimization translation tables has been changed
      to support the new stack slot indexing scheme. Crankshaft, which
      doesn't support the new slot numbering in its register allocator,
      must adapt the indexes when creating translation tables.
    * Callee-saved parameters are now kept below spill slots, not above,
      to support saving only the optimal set of used registers, which is
      only known after register allocation is finished and spill slots
      have been allocated.

R=danno@chromium.org, titzer@chromium.org, jyan@ca.ibm.com, dstence@us.ibm.com, joransiu@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30396}
2015-08-26 21:29:38 +00:00
mbrandy
1fe4c1e7d6 PPC: Fix "[turbofan] Support unboxed float and double stack parameters."
R=titzer@chromium.org, jyan@ca.ibm.com, dstence@us.ibm.com, joransiu@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30395}
2015-08-26 20:14:12 +00:00
mbrandy
1607c9d16e PPC: Cleanup: Remove unncessary leave_frame parameter from stub cache.
Port fe432e1ace

R=mvstanton@chromium.org, jyan@ca.ibm.com, dstence@us.ibm.com, joransiu@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30394}
2015-08-26 20:08:38 +00:00
mbrandy
939c37dfd7 PPC: VectorICs: New interface descriptor for vector transitioning stores.
Port cd35155918

R=mvstanton@chromium.org, jyan@ca.ibm.com, dstence@us.ibm.com, joransiu@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30393}
2015-08-26 19:57:11 +00:00
mbrandy
a1733785cf PPC: [simd.js] Single SIMD128_VALUE_TYPE for all Simd128Values.
Port f4c079d450

Original commit message:
    There's no need to have one InstanceType per SIMD primitive type (this
    will not scale long-term).  Also reduce the amount of code duplication
    and make it more robust wrt adding new SIMD types.

R=bmeurer@chromium.org, jyan@ca.ibm.com, dstence@us.ibm.com, joransiu@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30392}
2015-08-26 19:50:47 +00:00
mbrandy
7aecd51209 PPC: Fix "Move regexp implementation into its own folder."
R=yangguo@chromium.org, jyan@ca.ibm.com, dstence@us.ibm.com, joransiu@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30391}
2015-08-26 19:46:54 +00:00
mbrandy
750b7f7a96 PPC: [compiler] Remove broken support for undetectable strings.
Port b62dbf1efd

Original commit message:
    Support for undetectable strings was officially dropped in
    https://codereview.chromium.org/916753002, but the compilers
    weren't fixed properly.

R=bmeurer@chromium.org, jyan@ca.ibm.com, dstence@us.ibm.com, joransiu@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30390}
2015-08-26 19:45:46 +00:00
mstarzinger
7f9685c354 Remove named load from builtin in default super call.
R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30389}
2015-08-26 15:33:40 +00:00
conradw
77394fa05a [parser] disallow language mode directive in body of function with non-simple parameters
TC39 agreed to disallow "use strict" directives in function body when
non-simple parameter lists are used.

This is a continuation of caitp's CL https://codereview.chromium.org/1281163002/
with some refactorings removed for now.

Still TODO: there is a lot of duplication between the is_simple field of
FormalParametersBase and the NonSimpleParameter property ExpressionClassifier
keeps track of. It should be possible to remove the former with a minor
refactoring of arrow function parsing. This will be attempted in a follow-up CL.

BUG=
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30388}
2015-08-26 14:59:19 +00:00
mstarzinger
aca4a411e7 Move runtime helper for JSArrayBuffer onto objects.
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30387}
2015-08-26 13:59:50 +00:00
conradw
1bbb3e742f [es6] Make harmony_destructuring imply harmony_default_parameters
When encountering a "=" token in ParseAssignmentExpression, the default
parameter case is not locally distinguishable from the destructuring case.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30386}
2015-08-26 13:39:40 +00:00
mstarzinger
3a8099c750 Move runtime helper for JSWeakCollection onto objects.
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30385}
2015-08-26 13:19:05 +00:00
mstarzinger
68dfaf78d8 Move runtime helper for JSSet and JSMap onto objects.
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30384}
2015-08-26 12:46:26 +00:00
hpayer
ba968622ac Synchronize on concurrent store buffer entries.
BUG=chromium:524425
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30383}
2015-08-26 12:13:27 +00:00
yangguo
2188bdafde Install js intrinsic fallbacks for array functions on the native context.
R=cbruni@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30382}
2015-08-26 12:04:10 +00:00
wingo
e7cd9d3296 In generators, "yield" cannot be an arrow formal parameter name
Thanks to André Bargull for the report.

BUG=v8:4212
LOG=N
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30381}
2015-08-26 11:59:47 +00:00
bmeurer
b4c7399464 [runtime] Remove the redundant %_IsObject intrinsic.
%_IsObject(foo) is equivalent to typeof foo === 'object' and has
exactly the same optimizations, so there's zero need for %_IsObject
in our code base.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30380}
2015-08-26 11:28:06 +00:00
yangguo
299f775cf4 Call JS functions via native context instead of js builtins object.
We look up %-functions in the context if not found in the runtime.

R=bmeurer@chromium.org, mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30379}
2015-08-26 11:16:57 +00:00
mvstanton
24921f76c6 Vector ICs: Ensure KeyedAccessStore mode is encoded in all handlers.
For vector-based keyed store ics, we need to know the current
KeyedAccessStore mode on ic MISS, and to produce optimized code.

We can't store this mode, which can change on any MISS in the IC
without patching. Therefore, this CL makes sure that the information is
redundantly available in the handlers embedded in the IC. This way,
when --vector-stores is turned on, we'll be able to extract that
information from the vector which maintains a list of these handlers.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30378}
2015-08-26 10:48:06 +00:00
mstarzinger
bfbcb3d3fb [heap] User safer root set accessor when possible.
R=mlippautz@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30377}
2015-08-26 10:25:35 +00:00
chunyang.dai
3aeed04dc2 X87: Correctify instanceof and make it optimizable.
port 5d875a57fa (r30342).

original commit message:

    The previous hack with HInstanceOfKnownGlobal was not only slower,
    but also very brittle and required a lot of weird hacks to support it. And
    what's even more important it wasn't even correct (because a map check
    on the lhs is never enough for instanceof).

    The new implementation provides a sane runtime implementation
    for InstanceOf plus a fast case in the InstanceOfStub, combined with
    a proper specialization in the case of a known global in CrankShaft,
    which does only the prototype chain walk (coupled with a code
    dependency on the known global).

    As a drive-by-fix: Also fix the incorrect Object.prototype.isPrototypeOf
    implementation.

R=weiliang.lin@intel.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30376}
2015-08-26 09:56:54 +00:00
mstarzinger
cbd4f5aa98 [turbofan] Fix broken dynamic TDZ check for let and const.
This fixes broken dynamic hole-checks for the temporal dead zone of
non-initializing assignments to {let} and {const} declared variables.
Also note that this exemplifies a case where the dynamic check for such
assignments to {let} declared variables can no longer be elided as the
comment suggested.

R=rossberg@chromium.org
TEST=mjsunit/regress/regress-4388
BUG=v8:4388
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30375}
2015-08-26 09:53:11 +00:00
ishell
590b3bed5c Do not inline array resize operations for outdated prototype maps.
BUG=chromium:523213
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30374}
2015-08-26 09:37:53 +00:00
wingo
79e74db3e0 Parse arrow functions at proper precedence level
BUG=v8:4211
LOG=Y
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30373}
2015-08-26 09:36:45 +00:00
mstarzinger
b1c5ff0fff [heap] Prevent direct access to ExternalStringTable.
R=mlippautz@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30372}
2015-08-26 09:35:48 +00:00
Hannes Payer
9a3327adad Don't explicitly tear down code range in cctest/test-alloc/CodeRange to avoid double-free.
BUG=v8:4141
LOG=n
R=mlippautz@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30371}
2015-08-26 09:28:37 +00:00