Commit Graph

24940 Commits

Author SHA1 Message Date
titzer
43389ce731 Add test-run-native-calls tests for mixed parameters.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30448}
2015-08-28 15:30:18 +00:00
mtrofin
bed054c4ff [turbofan] Splintering: special case deoptimizing blocks.
This avoids a whole range traversal each time we encounter a deferred
block (or a succession of them). The traversal (in the removed
IsIntervalAlreadyExcluded) is unnecessary - an interval with a hole
where deferred blocks are shouldn't be listed in the in/out sets of
those blocks in the first place.

It turns out the root cause (that appeared like we had to special
case ranges with holes, as the comment described) was deferred
blocks with a deoptimization call. That would place the live range
in the in_set of the block, but then splitting would fail because the start
and split position would be the same - this is because everywhere else,
the deferred block would have at least a second instruction, other
than the use - like a jump - ahead of which we'd perform the lower
part of the splintering. In the usual case, this choice of a position
avoids moves on the hot path (because any moves will be before the
jump, but still in the deferred block).

With deoptimization calls, that's not the case, there is just one
instruction, the deoptimization call. So we perform the second cut of
the splintering right after the block. Since there is no control flow from
the deoptimization block to any functional block - the control flow
goes to the exit block - the range connector won't insert moves on the
hot path - although we may want to see what happens for the exit
block, and maybe teach the range connector to ignore control flow
appearing to come from blocks with deoptimization calls.

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

Cr-Commit-Position: refs/heads/master@{#30447}
2015-08-28 15:07:45 +00:00
yangguo
08ee2132a8 Native context: install array methods via runtime import.
R=cbruni@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30446}
2015-08-28 13:39:45 +00:00
titzer
d80e062c1d [turbofan] Use the SharedInfo only if we have it in the code generator.
R=bmeurer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30445}
2015-08-28 13:17:20 +00:00
mvstanton
dd0cde0e48 Reorder KeyedStoreIC MISS code to avoid unnecessary compilation.
We can set the property in the MISS handler before organizing our handlers
for element-based keyed stores. Since the property set may fail with an
exception, this saves work.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30444}
2015-08-28 13:13:17 +00:00
mstarzinger
3d7a34b5c7 [heap] Move IdentityMap data structure out of heap.
This data structure uses the public heap API only and is not specific
to any heap internals. It should be usable throughout V8 and inclusion
of the header file should not be restricted.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30443}
2015-08-28 13:01:08 +00:00
bmeurer
09de997b35 [runtime] Add %ToString and %_ToString and remove the TO_STRING builtin.
This adds a new ToString runtime function and a fast-path ToStringStub
(which is just a simple dispatcher for existing functionality), and also
implements %_ToName using the ToStringStub.

R=mstarzinger@chromium.org, yangguo@chromium.org
BUG=v8:4307
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30442}
2015-08-28 13:00:11 +00:00
titzer
c6378f96e8 Improve handling of debug name in CompilationInfo.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30441}
2015-08-28 12:46:24 +00:00
chunyang.dai
5c55af556a X87: [Interpreter] Add support for parameter variables.
port 5d975694e4 (r30403)

original commit message:

    Adds support for parameters to the BytecodeArrayBuilder and BytecodeGenerator.
    Parameters are accessed as negative interpreter registers.

R=weiliang.lin@intel.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30440}
2015-08-28 11:00:42 +00:00
titzer
9a20cb152d Use ShouldEnsureSpaceForLazyDeopt more.
R=mcilroy@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30439}
2015-08-28 10:47:00 +00:00
yangguo
cde62571a4 Native context: do not put public symbols and flags on the js builtins object.
R=cbruni@chromium.org,mlippautz@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30438}
2015-08-28 10:22:41 +00:00
Benedikt Meurer
eceaaf7d19 [test] Fix wrong mjsunit.status line.
TBR=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30437}
2015-08-28 10:22:19 +00:00
Benedikt Meurer
03541141b9 [test] Properly disable test that doesn't work in GC stress.
The magic "print(i)" work-around was no longer work-arounding correctly,
so we do the right thing instead now.

TBR=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30436}
2015-08-28 10:20:46 +00:00
bmeurer
c403ede42a [es6] Implement spec compliant ToName (actually ToPropertyKey).
This adds a %ToName runtime entry that uses the previously introduced
Object::ToName, which is based on the new Object::ToPrimitive method.
Also removes the need to expose ToName in various way via the builtins
and/or context.

Drive-by-fix: Let %HasProperty do the ToName conversion implicitly as
required.

BUG=v8:4307
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30435}
2015-08-28 09:46:51 +00:00
bmeurer
f6c6d713b4 [es6] Implement spec compliant ToPrimitive in the runtime.
This is the first step towards a spec compliant ToPrimitive
implementation (and therefore spec compliant ToNumber, ToString,
ToName, and friends).  It adds support for the @@toPrimitive
symbol that was introduced with ES2015, and also adds the new
Symbol.prototype[@@toPrimitive] and Date.prototype[@@toPrimitive]
initial properties.

There are now runtime functions for %ToPrimitive, %ToNumber and
%ToString, which do the right thing and should be used as fallbacks
instead of the hairy runtime.js implementations.  I will do the
same for the other conversion operations mentioned by the spec in
follow up CLs.  Once everything is in place we can look into
optimizing things further, so that we don't always call into the
runtime.

Also fixed Date.prototype.toJSON to be spec compliant.

R=mstarzinger@chromium.org, yangguo@chromium.org
BUG=v8:4307
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#30434}
2015-08-28 09:21:43 +00:00
titzer
be8564ba43 Reduce the number of entrypoints to the compiler pipeline by one. Always require caller to provide a CompilationInfo.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30433}
2015-08-28 09:02:19 +00:00
mvstanton
0302e63e7f Vector ICs: Make the Oracle gather feedback for vector stores.
Also, polymorphic element stores have a slightly different shape for the array
attached to a vector slot. It's of the form [map, map, handler], where the 2nd
map is either a transition map or undefined (the maps are actually in
WeakCells).

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

Cr-Commit-Position: refs/heads/master@{#30432}
2015-08-28 09:01:34 +00:00
wingo
a9d24d3f61 Disallow yield in default parameter initializers
R=adamk@chromium.org
LOG=N
BUG=v8:4397

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

Cr-Commit-Position: refs/heads/master@{#30431}
2015-08-28 08:44:30 +00:00
mbrandy
28f07b1c2b [turbofan] Fix unified stack slots for embedded constant pools.
Account for the constant pool pointer slot during register allocation
data initialization.

R=danno@chromium.org, titzer@chromium.org, bmeurer@chromium.org, mcilroy@chromium.org,
TEST=cctest/test-run-machops/RunSpillConstantsAndParameters
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30430}
2015-08-28 06:35:04 +00:00
gdeepti
ad3a8f0c5e [simd.js] Add SIMD store functions for Phase 1.
Float32x4, Int32x4, Uint32x4:
  store, store1, store2, store3

Int16x8, Int8x16, Uint16x8, Uint8x16:
  store

BUG=v8:4124
LOG=N

R=bbudge@chromium.org, littledan@chromium.org, jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30429}
2015-08-27 20:33:35 +00:00
mlippautz
4ecf07daa3 [heap] Make compaction space accept external memory.
BUG=chromium:524425
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30428}
2015-08-27 20:32:08 +00:00
titzer
2fd84ef628 Remove CompilationInfo::MayUseThis() and replace it with what we really want to know: MustReplaceUndefinedReceiverWithGlobalProxy.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30427}
2015-08-27 20:31:37 +00:00
kozyatinskiy
951f6b7a88 [V8] Report JSON parser script to DevTools
If JSON contains SyntaxError then V8 will report exception and won't report compile error.

LOG=Y
BUG=chromium:515382
R=yangguo@chromium.org,yurys@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30426}
2015-08-27 19:01:22 +00:00
mtrofin
2ba2f40c6a [turbofan] LiveRange splintering optimizations.
Related to 1318893002 - another source of regressions in
benchmarks sensitive to compile time is the splintering
logic. This change addresses some, but not all, of that. In
particular, there are still some places (figuring out if a
range has a hole right where a deferred set of blocks is)
that need another look.

BUG=chromium:1318893002
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30425}
2015-08-27 18:28:31 +00:00
mbrandy
ae781735b4 PPC: [Interpreter] Add support for parameter variables.
Port 5d975694e4

Original commit message:
    Adds support for parameters to the BytecodeArrayBuilder and BytecodeGenerator.
    Parameters are accessed as negative interpreter registers.

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/1308373003

Cr-Commit-Position: refs/heads/master@{#30424}
2015-08-27 17:12:58 +00:00
hpayer
7ab389a437 Synchronize on concurrent slot buffer entries during migration.
BUG=chromium:524425
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30423}
2015-08-27 16:54:12 +00:00
gdeepti
a6754d8c3c [simd.js] Add SIMD load functions for Phase 1.
Float32x4, Int32x4, Uint32x4:
  load, load1, load2, load3

Int16x8, Int8x16, Uint16x8, Uint8x16:
  load

BUG=v8:4124
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30422}
2015-08-27 16:35:49 +00:00
sergiyb
ab5146925e Use committer list from chrome-infra-auth group project-v8-committers
R=machenbach@chromium.org
BUG=chromium:511311
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30421}
2015-08-27 16:10:22 +00:00
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