Commit Graph

26817 Commits

Author SHA1 Message Date
mstarzinger
e2bce9d392 [crankshaft] Pass new.target to direct function calls.
This changes all direct function calls in Crankshaft to pass undefined
via the register expected to hold the new.target value. Note that the
register is still ignored by all callees for now.

This is a preparatory CL to allows us passing new.target in a register
instead of via a side-channel through the construct stub frame.

R=bmeurer@chromium.org
BUG=v8:4544
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#32125}
2015-11-19 19:34:04 +00:00
kozyatinskiy
89e859fb2b [V8] Unify get function name for debugging purpose
Following logic is using for getting function name in JSFunction::GetDebugName:
1. if function has displayName and its type is string then use it
2. if function has defined property Function.name as value and its type string then use it
3. otherwise use SharedFunctionInfo::DebugName as functionName.

JSFunction::GetDebugName is exposed in V8 API and in FunctionMirror interface.

BUG=chromium:17356
R=yangguo@chromium.org,mstarzinger@chromium.org
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#32124}
2015-11-19 19:32:38 +00:00
mvstanton
f7b6e3815c Maintain a FixedArray for the optimized code map.
This simplifies follow-on changes to the FastNewClosureStub.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#32123}
2015-11-19 19:31:51 +00:00
mstarzinger
58686b97e0 Fix missing case for JS_PROMISE_TYPE for header size.
TBR=verwaest@chromium.org
NOTREECHECKS=true

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

Cr-Commit-Position: refs/heads/master@{#32122}
2015-11-19 18:41:42 +00:00
ivica.bogosavljevic
ed600e5556 MIPS: Fixing failures in cctest/test-assembler-mips/CVT
Fixing failures in cctest/test-assembler-mips/CVT on Mips32R2 without
FP64 support

BUG=

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

Cr-Commit-Position: refs/heads/master@{#32121}
2015-11-19 16:39:58 +00:00
verwaest
469d9bfa8d Introduce a BuiltinsConstructStub that sets up new.target and does a [[call]] per ES6 9.3.2
BUG=

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

Cr-Commit-Position: refs/heads/master@{#32120}
2015-11-19 16:11:09 +00:00
hpayer
1682935911 [heap] Enforce size checks in allocation stats.
This CL should be reverted after investigating the size chrasher.

BUG=chromium:556912
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#32119}
2015-11-19 15:56:12 +00:00
mlippautz
a698fd849b Fix protocol for aborting and waiting for cancelable tasks.
Since {CancelAndWait} blocks on the tasks that are still present in the internal
hashmap, we are not allowed to remove the task upon trying to cancel it using
{TryAbort}.

The previous implementation suffered from a bug where:
1) The task was created and handed over to the platform.
2) The task was started by the platform, setting it to running state.
3) We called {TryAbort}, effectively removing it from the manager, but failing
   to cancel (as it was already running)
4) All tasks finished running, indicating this with their own semaphore.
5) The platform was stuck (scheduling) before destroying the task.
6) Main thread finished its work, waiting for all the necessary tasks, and the
   isolate terminated.
7) The platform destroyed the task, calling the destructor, calling into an
   already freed isolate.

BUG=chromium:524425
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#32118}
2015-11-19 15:33:53 +00:00
mstarzinger
c0356f1f6d [turbofan] Pass new.target to arguments adaptor trampoline.
This changes the interface descriptor for the arguments adaptor to also
contain an explicit register for the new.target value. Note that the
stub still clobbers the register for now.

This is a preparatory CL to allows us passing new.target in a register
instead of via a side-channel through the construct stub frame.

R=bmeurer@chromium.org
BUG=v8:4544
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#32117}
2015-11-19 14:37:02 +00:00
mythria
4bb6e7c8c0 [Interpreter] Add support for keyed load / store ICs and named store IC to
bytecode graph builder

Adds implementation and tests for KeyedLoadIC, KeyedStoreIC and StoreIC to
bytecode graph builder.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#32116}
2015-11-19 14:16:53 +00:00
yangguo
6980f1957d Do not use deprecated API in cctest/test-debug.
R=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#32115}
2015-11-19 13:46:16 +00:00
machenbach
9ebd096fa3 [Swarming] Isolate shared libraries for windows.
BUG=chromium:535160
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#32114}
2015-11-19 13:30:48 +00:00
jarin
6adea83502 [turbofan] Simplify NumberTo(U)Int32 handling in representation inference.
Review URL: https://codereview.chromium.org/1461963002

Cr-Commit-Position: refs/heads/master@{#32113}
2015-11-19 12:58:56 +00:00
mstarzinger
0227857d26 [turbofan] Make new.target explicit in JSCallDescriptor.
This adds an explicit parameter to the call descriptor having kind
kJSCallFunction representing the new.target value. Note that for now
this parameter is not yet passed in and hence cannot be used yet. Also
contains some refactoring of how parameter index value are calculated,
establishing Linkage as the central point for such index computations.

This is a preparatory CL to allows us passing new.target in a register
instead of via a side-channel through the construct stub frame.

R=bmeurer@chromium.org
BUG=v8:4544
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#32112}
2015-11-19 12:48:25 +00:00
jacob.bramley
dad635ee7a [arm64] Use SP-offset rather than FP-offset.
A64 loads and stores can have much larger positive than negative
immediate offsets, and since most frame slots are below fp, we can
significantly improve accesses by basing them on sp instead. Typical
example:

    Before                  After
    mov x16, #-416
    str x20, [fp, x16]      str x20, [jssp, #32]

Notable benchmark results include lua_binarytrees, which improves by
about 7.5% on A57 and 5% on A53. Several other asm.js benchmarks gain
2-4%.

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

Cr-Commit-Position: refs/heads/master@{#32111}
2015-11-19 12:08:12 +00:00
jarin
e44c323831 [turbofan] Simplified lowering - introduce the concept of UseInfo.
This CL introduces a concept of UseInfo (but internally it still
uses machine types). The idea of UseInfo is to separate the concept
of truncation (what information is actually used by the user node)
and the concept of preferred representation. At the moment, the
truncation is (clumsily) represented by the type part of the
underlying machine type (UseInfo::type_).

Moreover, in this CL, we never specify the signedness of the use
because use signedness does not really make sense:
- if we care about the sign, it should be in the input's type
  (this is DCHECKed).
- if we do not care (e.g., trunctaing word32), then it should not
  be necessary. (And it is upto the user how it interprets the bits.)

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

Cr-Commit-Position: refs/heads/master@{#32110}
2015-11-19 11:09:53 +00:00
hpayer
45a52b624a [heap] Move slot recording of weak fields in native context to native context list retainer.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#32109}
2015-11-19 10:52:52 +00:00
ivica.bogosavljevic
5e9c4716d1 MIPS: Implementation of Float64RoundUp and Float64RoundTiesEven
Port 1389b9f53c
Port dffecf31fc

Implementation of two optional turbofan operators Float64RoundUp and
Float64RoundTiesEven on MIPS32. On MIPS32R2 with FP64 and MIPS32R6 with FP64
we can support these two operators directly using MIPS instructions. This
code implements these two operators. Also, added some DCHECKs for instructions
which are supported on MIPS32R2 with FP64 and MIPS32R6 with FP64 to detect
wrong usage on unsupported architectures.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#32108}
2015-11-19 10:40:31 +00:00
yangguo
de884f201a Debugger: speed up setting break points in nested SFI.
If the shared function info is newly compiled when looking for
it in the script (Debug::FindSharedFunctionInfoInScript), then
we can bypass iterating the heap to find JSFunctions referencing
it (Debug::PrepareFunctionForBreakpoints).

BUG=v8:4553
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#32107}
2015-11-19 10:39:06 +00:00
yangguo
eb25b8c54b Correctly parse new regexp flags in v8::RegExp::New.
R=ishell@chromium.org, verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#32106}
2015-11-19 10:33:16 +00:00
hablich
daa6e64d6a [Docs] Removed unused docs because they are moved to GitHub
R=machenbach@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#32105}
2015-11-19 10:23:30 +00:00
mythria
a8e86c49ec [Interpreter] Add support for unary operators to bytecode graph builder.
Adds implementation and tests for LogicalNot, TypeOf and Delete operators
to bytecode graph builder.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#32104}
2015-11-19 09:39:11 +00:00
jkummerow
6f0850c63d [proxies] Update Object.defineProperty/ies for JSProxies
BUG=v8:1543
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#32103}
2015-11-19 09:21:46 +00:00
ahaas
ed570fac44 [turbofan] Implemented the ChangeFloat64ToInt64 TurboFan operator.
The ChangeFloat64ToInt64 operator changes the representation of a
float64 input value to int64 if the input value can be represented
exactly on int64. Otherwise the result is currently undefined.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#32102}
2015-11-19 08:27:27 +00:00
bmeurer
3c9ac974f2 [turbofan] Unstable prototype maps are not supported currently.
We currently assume that all prototype maps are stable, which is
not guaranteed for certain keyed access patterns. So we explicitly
disallow optimizing the element access there for now.

BUG=chromium:557807, v8:4470
R=jarin@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#32101}
2015-11-19 06:21:06 +00:00
v8-autoroll
93b1a632f5 Update V8 DEPS.
Rolling v8/build/gyp to e1133480da78cd4a23a8cec604d1d6d46dab35d6

Rolling v8/buildtools to 818123dac34899ec230840936fc15b8b2b5556f9

Rolling v8/tools/clang to 650a79a0bd9b486fa688d8a71ce00674e9e2c096

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

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

Cr-Commit-Position: refs/heads/master@{#32100}
2015-11-19 04:21:00 +00:00
adamk
ed7d795483 [api] Remove deprecated and unused Set/Map::FromArray
R=jochen@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng

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

Cr-Commit-Position: refs/heads/master@{#32099}
2015-11-19 02:20:20 +00:00
adamk
7d1d978654 Rename destructuring flag to "--harmony-destructuring-bind"
This is in preparation for the addition of --harmony-destructuring-assignment.

BUG=v8:811
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#32098}
2015-11-18 23:30:09 +00:00
mlippautz
973377e5d6 Reland "[heap] Turn on parallel compaction"
BUG=chromium:524425
LOG=N
CQ_EXTRA_TRYBOTS=tryserver.v8:v8_linux_arm64_gc_stress_dbg;tryserver.v8:v8_linux_gc_stress_dbg;tryserver.v8:v8_mac_gc_stress_dbg;tryserver.v8:v8_linux64_msan_rel;tryserver.v8:v8_linux64_tsan_rel

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

Cr-Commit-Position: refs/heads/master@{#32097}
2015-11-18 20:05:29 +00:00
bradnelson
0acb70baaf Fix multiple return statements in typing-asm, cleanup.
The last change to typing-asm broke non-final return statements.
Fixing this.

Finishing out a partially completed test that landed by mistake.

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

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

Cr-Commit-Position: refs/heads/master@{#32096}
2015-11-18 19:48:00 +00:00
mstarzinger
c0bf04b119 Simplify dispatch in optimizing compile stubs.
This is to re-establish a single choke point for lazy compile stubs in
preparation for CallRuntimePassFunction being changed soon.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#32095}
2015-11-18 19:34:35 +00:00
balazs.kilvady
c91bcf7192 MIPS: Fix trampoline pool handling in MacroAssembler::BranchShort() for r6.
BUG=chromium:555543
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#32094}
2015-11-18 17:43:34 +00:00
mlippautz
eb8a42383c Wait for cancelable task after tearing down the heap.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#32093}
2015-11-18 17:37:31 +00:00
ofrobots
db867c2bd8 ability to build d8 w/ post-mortem data
post-mortem data can be useful for debugging, specially with the new llnode [1]
extensions for lldb.

[1] https://github.com/indutny/llnode

R=yangguo@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#32092}
2015-11-18 15:55:46 +00:00
ofrobots
0514fa204a [heap] make inline-allocation-observers precise
Now that we no longer require AllocationInfo::limit to be aligned [1], we can do
more accurate inline-allocation-observation. This lets us get notified when the
next allocation that crosses the step-size boundary is allocated.

Fixed the test-cases. They make significantly more sense now given the step
sizes and the number of times we get notifications. For example, with a step
size of 512, an allocation of 16kb results in 32 notifications instead of 30
now.

[1] https://codereview.chromium.org/1444883003

R=hpayer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#32091}
2015-11-18 15:55:02 +00:00
mlippautz
1511374ac5 [tools] Add meta script for convenient ranking of GC NVP output.
R=hpayer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#32090}
2015-11-18 15:46:44 +00:00
mlippautz
463a6d273d Revert of Reland "[heap] Turn on parallel compaction" (patchset #1 id:20001 of https://codereview.chromium.org/1460663002/ )
Reason for revert:
Failing:
  https://chromegw.corp.google.com/i/client.v8/builders/V8%20Linux64%20ASAN/builds/7903/

Original issue's description:
> Reland "[heap] Turn on parallel compaction"
>
> This reverts commit aa4688c185.
>
> BUG=chromium:524425
> LOG=N
> CQ_EXTRA_TRYBOTS=tryserver.v8:v8_linux_arm64_gc_stress_dbg;tryserver.v8:v8_linux_gc_stress_dbg;tryserver.v8:v8_mac_gc_stress_dbg;tryserver.v8:v8_linux64_msan_rel;tryserver.v8:v8_linux64_tsan_rel
>
> Committed: https://crrev.com/ac1d2b21bbb50572b99de4bed568437d51468e01
> Cr-Commit-Position: refs/heads/master@{#32088}

TBR=hpayer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:524425

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

Cr-Commit-Position: refs/heads/master@{#32089}
2015-11-18 15:42:36 +00:00
mlippautz
ac1d2b21bb Reland "[heap] Turn on parallel compaction"
This reverts commit aa4688c185.

BUG=chromium:524425
LOG=N
CQ_EXTRA_TRYBOTS=tryserver.v8:v8_linux_arm64_gc_stress_dbg;tryserver.v8:v8_linux_gc_stress_dbg;tryserver.v8:v8_mac_gc_stress_dbg;tryserver.v8:v8_linux64_msan_rel;tryserver.v8:v8_linux64_tsan_rel

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

Cr-Commit-Position: refs/heads/master@{#32088}
2015-11-18 15:25:47 +00:00
mstarzinger
8a57c81b3a [turbofan] Fix CFI failures in BytecodeGraphBuilder unit test.
This fixes undefined behavior with the OpParameter helper in some of our
node matchers. There was a constness mismatch of the template parameter.

R=oth@chromium.org,mythria@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#32087}
2015-11-18 14:16:10 +00:00
mlippautz
2ed3893b4f [profiler] Move away from UnboundedQueue to LockedQueue for regular events.
Replaces the UnboundedQueue (SP/SC) with LockedQueue (MP/MC). This is necessary
as we can have multiple tasks (on multiple platform threads) reporting code move
events.

Note that the sampling queue is not affected by this change.

BUG=chromium:524425
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#32086}
2015-11-18 14:14:49 +00:00
jkummerow
107699483d Fix PropertyDescriptor::ToObject
When adding properties to the result object, that object's prototype chain should be ignored.

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

Cr-Commit-Position: refs/heads/master@{#32085}
2015-11-18 13:56:51 +00:00
yangguo
5bcddae76f [crankshaft] only compile string index access with element key.
R=bmeurer@chromium.org
BUG=chromium:554831
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#32084}
2015-11-18 13:53:34 +00:00
mstarzinger
e90a0b3cef [turbofan] Ship TurboFan with spread expressions.
This triggers TurboFan whenever functions containing spread expressions
of any kind are marked for optimization. Note that this increases the
set of functions being eligible for optimization.

R=rossberg@chromium.org,hablich@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#32083}
2015-11-18 13:52:12 +00:00
titzer
70a133385c [turbofan] Remove case_count >= 3 limit for switch.
R=bmeurer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#32082}
2015-11-18 13:51:29 +00:00
jarin
e5ea13e230 [turbofan] Check word32 -> float64 conversion with input type/output truncation.
This makes sure we are using the right signedness - either the input
specifies signedness or the use must declare it does not care.

This requires some hole-punching in for-in so that the
representation selector understands the smi-ness of index.
Moreover, phi needs to pass the truncation along (maybe
slightly scary).

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

Cr-Commit-Position: refs/heads/master@{#32081}
2015-11-18 13:49:52 +00:00
mstarzinger
1582f37cd8 [turbofan] Fix CFI failures with Operator1 class.
This ensures the class in question specifies the correct equality and
hashing function when instantiated. Note that this introduces two new
structs (i.e. OpEqualTo and OpHash) which can be used for defaults
within OpParameter as well.

R=titzer@chromium.org,bmeurer@chromium.org
TEST=cctest/test-operator

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

Cr-Commit-Position: refs/heads/master@{#32080}
2015-11-18 13:48:31 +00:00
mstarzinger
279f2aad93 [turbofan] Fix deoptimization from array literal spread.
This fixes the array literal expression stack tracking in the presence
of spread expressions. Deoptimization within a spread expression was
borked.

R=bmeurer@chromium.org
TEST=mjsunit/regress/regress-deopt-in-array-literal-spread

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

Cr-Commit-Position: refs/heads/master@{#32079}
2015-11-18 11:45:41 +00:00
mlippautz
6c85c14845 Add lock-based unbounded queue
...based on the 2-lock algorithm by M. Scott and M. Michael (1992).

BUG=chromium:524425
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#32078}
2015-11-18 10:54:13 +00:00
mlippautz
95ff297113 [tools] Allow specifying cores for cpu.sh script.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#32077}
2015-11-18 10:53:30 +00:00
bmeurer
9b14e5bb63 [turbofan] Decouple inlining and native context specialization.
Retrieve the native context/global object from the Node being
specialized in the JSNativeContextSpecialization and the
JSGlobalObjectSpecialization classes. For this we introduce two
new methods NodeProperties::GetSpecializationNativeContext and
NodeProperties::GetSpecializationGlobalObject, which walk up
the context chain and might in the end take the native context
from the outermost activation (if native context specialization
is enabled). This allows us to run the native context specialization
pass as part of the inlining phase without hacking some of that into
the JSInliner.

Also refactor the NodeProperties::GetSpecializationContext method
that was previously local to the JSContextSpecialization.

Also refactor two other oddities in JSNativeContextSpecialization.

R=jarin@chromium.org
BUG=v8:4470, v8:4493
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#32076}
2015-11-18 10:04:03 +00:00