Commit Graph

38531 Commits

Author SHA1 Message Date
Toon Verwaest
17a32074bb [ic] Load 'integer indexed exotic' (oob) as simple nonexistent fields
This is just a very minor cleanup avoiding unnecessary slow stub usage.

BUG=v8:5561

Change-Id: Ib145606520b5b7019f1e55d3aec7caa956c7e090
Reviewed-on: https://chromium-review.googlesource.com/457337
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43989}
2017-03-21 16:26:27 +00:00
rayb
e25ac28747 S390: Change printf format specifier for size_t in heap.cc and spaces.cc
On S390, GCC seems to treat size_t as 'long_unsigned_int'. Which conflicts with the %d format specifier since that expects an 'int'. So changing the macro to PRIuS. This seems to fix the issue while retaining the expected behaviour for all other systems.

R=mlippautz@chromium.org, hpayer@chromium.org
BUG=none

Review-Url: https://codereview.chromium.org/2759963003
Cr-Commit-Position: refs/heads/master@{#43988}
2017-03-21 16:07:01 +00:00
danno
176a43fb86 [builtins] Implement Array.prototype.reduce in the CSA
BUG=v8:1956

Review-Url: https://codereview.chromium.org/2752273003
Cr-Commit-Position: refs/heads/master@{#43987}
2017-03-21 15:57:38 +00:00
bmeurer
64ffea8509 [turbofan] Remove leftover Type artifacts from OSR.
BUG=v8:5267
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2762143002
Cr-Commit-Position: refs/heads/master@{#43986}
2017-03-21 15:56:11 +00:00
Toon Verwaest
40672966e0 [ic] Move the elements transition target out from the polymorphic array into the tuple3 handler
BUG=v8:5561

Change-Id: If8f166860b4d4f9f25b15badfda531cbef49db16
Reviewed-on: https://chromium-review.googlesource.com/457341
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43985}
2017-03-21 15:51:03 +00:00
Marja Hölttä
e3826bc7e8 [parser] Fix broken rebase.
Rebase of https://chromium-review.googlesource.com/446336 was broken.

Didn't fail any tests because the feature is behind a flag.

BUG=

Change-Id: I6009bfac27aa896e20446f002f5db707aab7e34c
Reviewed-on: https://chromium-review.googlesource.com/457040
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43984}
2017-03-21 15:36:16 +00:00
Michael Achenbach
69d8f2a50c [test] Update Android shell commands in perf runner
BUG=chromium:628617
NOTRY=true

Change-Id: I55923fec5ee34feea85dcc281b00f3d5d22283c5
Reviewed-on: https://chromium-review.googlesource.com/456710
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43983}
2017-03-21 14:30:19 +00:00
Igor Sheludko
e7f5a04057 [tools] Standalone script for generating comparison of tools/run_perf.py results.
Inspired by bsuite/compare-baseline.py and tools/perf-to-html.py. The main difference
from the latter is that the new script does not require json files preprocessing and it
is able to compare multiple json files at once (just like bsuite/compare-baseline.py).

This CL also makes tools/run_perf.py relative path friendly.

BUG=

Change-Id: I7be796fa920f8360703806f32767b992eec0f9c2
Reviewed-on: https://chromium-review.googlesource.com/456286
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43982}
2017-03-21 14:13:12 +00:00
machenbach
e538b70e1a Revert of [wasm] Transferrable modules (patchset #13 id:280001 of https://codereview.chromium.org/2748473004/ )
Reason for revert:
Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/14312

See https://github.com/v8/v8/wiki/Blink-layout-tests

Original issue's description:
> [wasm] Transferrable modules
>
> We want to restrict structured cloning in Chrome to:
> - postMessage senders and receivers that are co-located
> in the same process
> - indexedDB (just https).
>
> For context, on the Chrome side, we will achieve the postMessage part
> by using a mechanism similar to transferrables: the
> SerializedScriptValue will have a list of wasm modules, separate from
> the serialized data stream; and this list won't be copied cross
> process boundaries. The IDB part is achieved by explicitly opting in
> reading/writing to the serialization stream. To block attack vectors
> in IPC cases, the default for deserialization will be to expect data
> in the wasm transfers list.
>
> This change is the V8 side necessary to enabling this design. We
> introduce TransferrableModule, an opaque datatype exposed to the
> embedder. Internally, TransferrableModules are just serialized data,
> because we don't have a better mechanism, at the moment, for
> de-contextualizing/re-contextualizing wasm modules (wrt Isolate and
> Context).
>
> The chrome defaults will be implemented in the
> serialization/deserialization delegates on that side. For the v8 side
> of things, in the absence of a serialization delegate, the V8
> serializer will write to serialization stream. In the absence of a
> deserialization delegate, the deserializer won't work. This asymmetry
> is intentional - it communicates to the embedder the need to make a
> policy decision, otherwise wasm serialization/deserialization won't
> work "out of the box".
>
> BUG=v8:6079
>
> Review-Url: https://codereview.chromium.org/2748473004
> Cr-Commit-Position: refs/heads/master@{#43955}
> Committed: 99743ad460

TBR=jbroman@chromium.org,bradnelson@chromium.org,mtrofin@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:6079

Review-Url: https://codereview.chromium.org/2762163002
Cr-Commit-Position: refs/heads/master@{#43981}
2017-03-21 13:54:23 +00:00
Michael Lippautz
6deb226705 [heap] Untangle Evacuator from MarkCompactCollector
BUG=chromium:651354

Change-Id: I15b2ee763882af369bf4b6274ce04e52dfb657e7
Reviewed-on: https://chromium-review.googlesource.com/457321
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43980}
2017-03-21 13:54:17 +00:00
jkummerow
c8a727dec2 [interpreter] Split out intrinsics generation
This frees up the InterpreterAssembler for no longer being linked
into the main library.

BUG=v8:6055

Review-Url: https://codereview.chromium.org/2759093004
Cr-Commit-Position: refs/heads/master@{#43979}
2017-03-21 12:33:32 +00:00
Peter Marshall
0feed731d0 [Test] Add a perf test for TypedArray construct by typed array.
BUG=v8:5977

Change-Id: Ic756fd44a945f98d51c0914dcc6c3b82111d170d
Reviewed-on: https://chromium-review.googlesource.com/456419
Reviewed-by: Franziska Hinkelmann <franzih@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43978}
2017-03-21 12:01:28 +00:00
Ilija.Pavlovic
47da8de250 MIPS: Move ldc1/sdc1 to macro-assembler.
For MIPS32, instructions ldc1 and sdc1 are moved into macro-assembler
and renamed as Ldc1 and Sdc1. The reason for placing them into
macro-assembler is that they emmit two or three instructions.

TEST=test/cctest/test-assembler-mips,
     test/cctest/test-code-stubs-mips,
     test/cctest/test-macro-assembler-mips
BUG=

Review-Url: https://codereview.chromium.org/2751973002
Cr-Commit-Position: refs/heads/master@{#43977}
2017-03-21 11:35:40 +00:00
Clemens Hammacher
3214ccf39b [wasm] [interpreter] Allow different activations
This CL makes the interpreter reentrant by allowing different
activations to be live at the same time. The wasm interpreter keeps a
list of activations and stores the stack height at the start of each
activation. This information is used to unwind just one activation, or
show the right portion of the interpreter stack for each interpreter
entry frame.
The WasmDebugInfo object stores a mapping from frame pointer (of the
interpreter entry) to the activation id in order to identify the
activation based on the physical interpreter entry frame.

R=titzer@chromium.org, ahaas@chromium.org
BUG=v8:5822

Change-Id: Ibbf93f077f907213173a92e0a2f7f3556515e8eb
Reviewed-on: https://chromium-review.googlesource.com/453958
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43976}
2017-03-21 11:25:51 +00:00
jkummerow
f8c707305b [builtins] Move more files into v8_builtins_generators source set
BUG=v8:6055

Review-Url: https://codereview.chromium.org/2760953002
Cr-Commit-Position: refs/heads/master@{#43975}
2017-03-21 11:17:41 +00:00
yangguo
fa3f8c6fb0 [debug] refactor code coverage to use enum for mode.
This is in preparation of adding precise binary mode.

BUG=v8:5808

Review-Url: https://codereview.chromium.org/2765813002
Cr-Commit-Position: refs/heads/master@{#43974}
2017-03-21 11:08:36 +00:00
leszeks
0956e58792 [tools] Manually write JSON in profile.js to avoid huge strings
In the tick processor, in cases where there are a lot of ticks (e.g.
long running programs), JSON.stringify could throw a range exception
because the created string is too large.

Instead of creating the entire JSON string in memory, we now write the
top-level parts of the JSON manually, writing out the ticks individually
instead of all together.

Review-Url: https://codereview.chromium.org/2754683002
Cr-Commit-Position: refs/heads/master@{#43973}
2017-03-21 10:58:24 +00:00
Clemens Hammacher
c0c55250f2 [wasm] Remove unneeded return instructions
The called runtime function never returns, thus we don't need to emit
return code afterwards.

R=ahaas@chromium.org

Change-Id: I4adb5492b1d5bcb8f644f9544137e07196ac61e4
Reviewed-on: https://chromium-review.googlesource.com/456507
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43972}
2017-03-21 10:55:46 +00:00
Michael Lippautz
173109b965 [heap] Introduce explicit marking state and instance for minor MC
BUG=chromium:651354

Change-Id: Idcd7780f53ad07b3d782a66455f9c60addc2418d
Reviewed-on: https://chromium-review.googlesource.com/457317
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43971}
2017-03-21 10:29:50 +00:00
Clemens Hammacher
74daa15ee8 Reland: [wasm] Enable lazy compilation for asm-wasm pipeline
Original change's description:
> [wasm] Enable lazy compilation for asm-wasm pipeline
> 
> The validate-asm flag now implies lazy compilation.
> 
> R=​titzer@chromium.org, ahaas@chromium.org
> BUG=v8:5991
> 
> Change-Id: I00fb5ddbe13440941a3fafd9175cc9a5d182e15a
> Reviewed-on: https://chromium-review.googlesource.com/451318
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Brad Nelson <bradnelson@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#43952}

TBR=bradnelson@chromium.org,hablich@chromium.org,ahaas@chromium.org,clemensh@chromium.org,v8-reviews@googlegroups.com
NOTRY=true
BUG=v8:5991

Change-Id: Icc6ff9ebcd15fdd140d9fca2676ea2634783e6d5
Reviewed-on: https://chromium-review.googlesource.com/456508
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43970}
2017-03-21 10:21:17 +00:00
bmeurer
17d932c06b [turbofan] Slightly improve truncations for CheckBounds.
For CheckBounds(index,length) we know that the length must be in
Unsigned31 range. Thus there's no observable difference for index
values in the range [-2^31,-1] and the range [2^31,2^32-1], both
are considered out-of-bounds; also it's safe to truncate -0 to 0
wrt. CheckBounds. Thus we can safely pass Word32 truncation if the
index is in Integral32 \/ MinusZero. Usually this generates the same
code, but some index computations can benefit from the Word32 truncation
and avoid going to double because the result would be outside the valid
Signed32 or Unsigned32 ranges.

R=jarin@chromium.org
BUG=v8:5267

Review-Url: https://codereview.chromium.org/2760213003
Cr-Commit-Position: refs/heads/master@{#43969}
2017-03-21 10:11:51 +00:00
mvstanton
5c227a2033 Update to OWNER files.
BUG=

Review-Url: https://codereview.chromium.org/2764813003
Cr-Commit-Position: refs/heads/master@{#43968}
2017-03-21 10:01:16 +00:00
Clemens Hammacher
6ec45d7495 [wasm] Fix lazy compile builtin for arm64
When returning from the runtime function, move jssp back to csp. The
csp might have been changed by the runtime function, but jssp should
have been restored to its original value.

R=ahaas@chromium.org
BUG=v8:5822

Change-Id: I300263a586ca546a4d7f925730f1f38b680379ca
Reviewed-on: https://chromium-review.googlesource.com/457372
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43967}
2017-03-21 09:52:18 +00:00
neis
abfab00894 [compiler] Add yet more tests for monotonicity of typing.
R=jarin@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2759133002
Cr-Commit-Position: refs/heads/master@{#43966}
2017-03-21 09:48:47 +00:00
mvstanton
1e03479c64 [builtins] Array.prototype.filter implemented as a TurboFan code stub.
BUG=

Review-Url: https://codereview.chromium.org/2680153005
Cr-Commit-Position: refs/heads/master@{#43965}
2017-03-21 08:56:56 +00:00
yangguo
ed93e7c27b [debug] use best effort coverage when enabling precise coverage.
We used to clear invocation counts when enabling precise coverage.
This is not necessary, and we could continue to use the existing
invocation counts on the heap. The old behavior can be achieved
by explicitly resetting the counts by polling coverage data.

R=jgruber@chromium.org,caseq@chromium.org
BUG=v8:5808

Review-Url: https://codereview.chromium.org/2768453002
Cr-Commit-Position: refs/heads/master@{#43964}
2017-03-21 08:55:44 +00:00
Andreas Haas
48e08319ca [wasm] Remove the wasm-loop-assignment-analysis flag.
The flag is already on by default

R=clemensh@chromium.org

Change-Id: Ie4ede8191336a102cab9d7f972a3d10a15d1a54d
Reviewed-on: https://chromium-review.googlesource.com/456287
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43963}
2017-03-21 08:25:07 +00:00
Ross McIlroy
f9c4085904 [TurboFan] Use temporary zone for effect linearization schedule.
Also move phi NodeVector in TryCloneBranch to temporary zone.

BUG=chromium:700364

Change-Id: Id19d51dae63ed5a6f5dccbba77a19b3663fd325e
Reviewed-on: https://chromium-review.googlesource.com/456285
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43962}
2017-03-21 08:15:10 +00:00
bmeurer
0a7d313800 [csa] Migrate String.prototype.concat to TurboFan builtin.
R=yangguo@chromium.org
BUG=v8:5049

Review-Url: https://codereview.chromium.org/2766593002
Cr-Commit-Position: refs/heads/master@{#43961}
2017-03-21 06:36:11 +00:00
v8-autoroll
7a9058618b Update V8 DEPS.
Rolling v8/build: 4c534d4..9e7f0b1

Rolling v8/third_party/catapult: 2d86f95..d233eb2

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

Change-Id: I3270008c944240ae992a15463a09bef3887b0c92
Reviewed-on: https://chromium-review.googlesource.com/457083
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43960}
2017-03-21 03:24:29 +00:00
mtrofin
25f86ffea5 [wasm] wasm WATCHLISTS
Improve visibility within the distributed wasm team.
Created wasm watchlist, and added wasm-team - the union of
MUC and MTV wasm teams.

BUG=

Review-Url: https://codereview.chromium.org/2759053002
Cr-Commit-Position: refs/heads/master@{#43959}
2017-03-21 02:49:39 +00:00
sebmarchand
2470f2ac71 Disable the 'Function marked forceinline not inlined.' warning on Win.
This used to be disabled implicitly and started to broke after some
refactoring in https://codereview.chromium.org/2758563002

BUG=chromium:703027

Review-Url: https://codereview.chromium.org/2758423002
Cr-Commit-Position: refs/heads/master@{#43958}
2017-03-20 21:48:26 +00:00
bmeurer
f08c3fd324 [turbofan] Inline String.prototype.concat with PlainPrimitive parameter.
When we hit a call to String.prototype.concat builtin, where we can
infer that the receiver is a String and there's exactly one parameter,
which is of type PlainPrimitive, then we can reduce that to a call to
the StringAddStub instead, optionally converting the non-String - but
PlainPrimitive - parameter to a String.

BUG=v8:5267
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2758383002
Cr-Commit-Position: refs/heads/master@{#43957}
2017-03-20 20:37:08 +00:00
franzih
de04df7412 [type profile] Collect return types.
Collect type information of return values.

Use *one* feedback slot per function for all its return
statements. For assignments, we currently use
several slots per function, because not all
assignments refer to the same variable.

Instead of the variable names, pass the
source location and print the function name.

Add an integration test for --type-profile that checks
for crashes.

Remove type feedback for assignments for now as it convolutes the output.

************ Function with 2 return statements ********
function testFunction(param, flag) {
  // We want to test 2 different return positions in one function.
  if (flag) {
    var first_var = param;
    return first_var;
  }
  var second_var = param;
  return second_var;
}

testFunction({});
testFunction(123, true);
testFunction('hello');
testFunction(undefined);
*******************************************************

************* Sample Output ***************************
Function: testFunction
424: Object
374: number
424: string
424: undefined
*******************************************************

Missing work:
* Handle fall-off returns
* Collect types for parameters
* Remove duplicates from the list of collected types and use a common base class.

BUG=v8:5935

Review-Url: https://codereview.chromium.org/2755973002
Cr-Commit-Position: refs/heads/master@{#43956}
2017-03-20 19:51:20 +00:00
mtrofin
99743ad460 [wasm] Transferrable modules
We want to restrict structured cloning in Chrome to:
- postMessage senders and receivers that are co-located
in the same process
- indexedDB (just https).

For context, on the Chrome side, we will achieve the postMessage part
by using a mechanism similar to transferrables: the
SerializedScriptValue will have a list of wasm modules, separate from
the serialized data stream; and this list won't be copied cross
process boundaries. The IDB part is achieved by explicitly opting in
reading/writing to the serialization stream. To block attack vectors
in IPC cases, the default for deserialization will be to expect data
in the wasm transfers list.

This change is the V8 side necessary to enabling this design. We
introduce TransferrableModule, an opaque datatype exposed to the
embedder. Internally, TransferrableModules are just serialized data,
because we don't have a better mechanism, at the moment, for
de-contextualizing/re-contextualizing wasm modules (wrt Isolate and
Context).

The chrome defaults will be implemented in the
serialization/deserialization delegates on that side. For the v8 side
of things, in the absence of a serialization delegate, the V8
serializer will write to serialization stream. In the absence of a
deserialization delegate, the deserializer won't work. This asymmetry
is intentional - it communicates to the embedder the need to make a
policy decision, otherwise wasm serialization/deserialization won't
work "out of the box".

BUG=v8:6079

Review-Url: https://codereview.chromium.org/2748473004
Cr-Commit-Position: refs/heads/master@{#43955}
2017-03-20 19:03:23 +00:00
bjaideep
b1841eecb4 PPC/s390: [wasm] Lazy compilation for asm.js
Port 4f3e168cf9

Original Commit Message:

    This CL adds general lazy compilation support to WebAssembly, according
    to the design described in the design doc (see referenced bug).

    It's not used currently, but I tested locally that all tests succeed if
    I enable it by default.

    With a later CL, we will enable lazy compilation by default for
    validate-asm: https://chromium-review.googlesource.com/451318

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

Review-Url: https://codereview.chromium.org/2761773004
Cr-Commit-Position: refs/heads/master@{#43954}
2017-03-20 18:28:16 +00:00
Clemens Hammacher
7de5d703e3 Revert "[wasm] Enable lazy compilation for asm-wasm pipeline"
This reverts commit 64a2287ebc.

Reason for revert: Breaks on arm64 msan, e.g. https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/builds/13972/steps/Check%20-%20extra/logs/asm-wasm-f32. Will investigate tomorrow.

Original change's description:
> [wasm] Enable lazy compilation for asm-wasm pipeline
> 
> The validate-asm flag now implies lazy compilation.
> 
> R=​titzer@chromium.org, ahaas@chromium.org
> BUG=v8:5991
> 
> Change-Id: I00fb5ddbe13440941a3fafd9175cc9a5d182e15a
> Reviewed-on: https://chromium-review.googlesource.com/451318
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Brad Nelson <bradnelson@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#43952}

TBR=bradnelson@chromium.org,ahaas@chromium.org,clemensh@chromium.org,hablich@chromium.org,v8-reviews@googlegroups.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5991

Change-Id: I8fe8d9268237c7397f6f22cd20ba6f23b9f5785a
Reviewed-on: https://chromium-review.googlesource.com/456506
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43953}
2017-03-20 18:15:25 +00:00
Clemens Hammacher
64a2287ebc [wasm] Enable lazy compilation for asm-wasm pipeline
The validate-asm flag now implies lazy compilation.

R=titzer@chromium.org, ahaas@chromium.org
BUG=v8:5991

Change-Id: I00fb5ddbe13440941a3fafd9175cc9a5d182e15a
Reviewed-on: https://chromium-review.googlesource.com/451318
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43952}
2017-03-20 17:13:13 +00:00
Franziska Hinkelmann
9fa2a371f3 Revert "[ic] Migrate StoreGlobal to data handler"
This reverts commit ea4346be7f.

Reason for revert: This causes a crash in a Node.js test (parallel/test-repl-options). I can reproduce the crash locally. At a first glance, it doesn't look like we're doing anything terribly wrong in Node that explains the crash. I'll have a closer lock tomorrow. Feel free to reland if needed, we can always deactivate the test.  

Original change's description:
> [ic] Migrate StoreGlobal to data handler
> 
> BUG=v8:5561
> 
> Change-Id: If4c679c97af199ce1c90d055627186123bc88574
> Reviewed-on: https://chromium-review.googlesource.com/456698
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#43944}

TBR=ishell@chromium.org,verwaest@chromium.org,v8-reviews@googlegroups.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5561

Change-Id: I790ff9ab45016749fe2f3982045f497a995e282e
Reviewed-on: https://chromium-review.googlesource.com/456505
Reviewed-by: Franziska Hinkelmann <franzih@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43951}
2017-03-20 17:03:25 +00:00
Clemens Hammacher
bb7fc73dbc [mjsunit] Fix error message for assertEqualsDelta
Before:
Failure: expected <true> found <false>

After:
Failure: expected <0.4 +- 0.001> found <0.3>

R=ahaas@chromium.org

Change-Id: I304fd90112cb7131103863813e7b0920be2b5c04
Reviewed-on: https://chromium-review.googlesource.com/456284
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43950}
2017-03-20 17:00:18 +00:00
jkummerow
221dec328f [interpreter] Split bytecode generation out of interpreter.cc
as InterpreterGenerator. This is in preparation for no longer including
the bytecode handler generation code in the main library.

BUG=v8:6055

Review-Url: https://codereview.chromium.org/2765433003
Cr-Commit-Position: refs/heads/master@{#43949}
2017-03-20 16:56:06 +00:00
Clemens Hammacher
ec37d0b0f3 [wasm] [debug] Add support for global variables
When instantiating the wasm interpreter, pass the start address of the
global variables. This was nullptr before, leading to a crash if
debugging a program which accesses globals.
With test.

R=ahaas@chromium.org, titzer@chromium.org
BUG=v8:5822

Change-Id: I5f419790042ef9a00787df093a07e5e5835d55bd
Reviewed-on: https://chromium-review.googlesource.com/456219
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43948}
2017-03-20 16:49:10 +00:00
jgruber
3100f9b255 Fix unused variable on win32 build
BUG=chromium:703028

Review-Url: https://codereview.chromium.org/2759983002
Cr-Commit-Position: refs/heads/master@{#43947}
2017-03-20 16:44:08 +00:00
Clemens Hammacher
1f617767f9 [wasm] For wasm-interpret-all: Iterate code only once for patching
Before, we were redirecting each function to the interpreter by iterating all
code and patching all call sites using this one function. The runtime was
hence quadratic if all functions were redirected to the interpreter as
done by the --wasm-interpret-all flag.
This CL fixes this to only iterate the code once and redirecting an
arbitrary number of function.

R=ahaas@chromium.org, titzer@chromium.org
BUG=v8:5822

Change-Id: Ia4f2e94a2468f9bef3035b599e1f8a18acf309da
Reviewed-on: https://chromium-review.googlesource.com/455785
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43946}
2017-03-20 16:44:02 +00:00
Leszek Swirski
e678c8c7bc [LoadIC] Omit frame construction in LoadIC for bytecode
Defers a label in the LoadIC fast-path which was doing a call that was
forcing the entire LoadIC fast-path to have a frame. The label was
introduced in https://chromium-review.googlesource.com/c/455858/.

Change-Id: Icc8f7243c133cfa0ad60ede0d0f5651b639634e9
Reviewed-on: https://chromium-review.googlesource.com/456504
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43945}
2017-03-20 16:19:14 +00:00
Toon Verwaest
ea4346be7f [ic] Migrate StoreGlobal to data handler
BUG=v8:5561

Change-Id: If4c679c97af199ce1c90d055627186123bc88574
Reviewed-on: https://chromium-review.googlesource.com/456698
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43944}
2017-03-20 15:49:52 +00:00
hpayer
00d3098d70 [heap] Make SlotSet allocation thread-safe and refactor code.
BUG=chromium:694255

Review-Url: https://codereview.chromium.org/2764473002
Cr-Commit-Position: refs/heads/master@{#43943}
2017-03-20 15:32:21 +00:00
Clemens Hammacher
198bab4ec0 [wasm] Identify interpreter entry as direct call target
This fixes a bug where an exported function is being specialized, but
the callsite inside the JS_TO_WASM function was patched to call an
interpreter entry instead. We would not identify the call site as the
one to be patched during specialization, and would thus fail a DCHECK.

R=ahaas@chromium.org
BUG=v8:5822, chromium:702839

Change-Id: I148d98333051c399a4cb11bd9620b396f4eb261d
Reviewed-on: https://chromium-review.googlesource.com/456282
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43942}
2017-03-20 14:58:55 +00:00
ulan
3d68306c71 [heap] Simplify clearing of normalized map caches.
Currently the incremental marking visitor treats elements of normalized
map caches weakly by coloring the caches grey without pusing to marking
deque.

The mark-compact prologue then clears all normalized map caches.

We can achieve similar effect by just clearing the caches in the marking
visitor.

BUG=chromium:694255

Review-Url: https://codereview.chromium.org/2745183002
Cr-Commit-Position: refs/heads/master@{#43941}
2017-03-20 14:55:49 +00:00
leszeks
dc789377a1 [disasm] Make jump target printing perf friendly
Makes disassembly jump target printing look more like the output of
objdump, for compatibility with perf's jump arrows. This includes
swapping the order of address and offset, and making the offset and line
numbers hex.

As a drive-by, print comment lines in objdump-v8 so that they can be
shown/hidden as "source" lines by perf.

Review-Url: https://codereview.chromium.org/2757263002
Cr-Commit-Position: refs/heads/master@{#43940}
2017-03-20 14:47:04 +00:00