v8/test
clemensh 890d28f361 [wasm] Fix location for error in asm.js ToNumber conversion
In the asm.js code translated to wasm, we call imported functions via a
WASM_TO_JS stub, which first calls the function and then calls ToNumber
on the return value. Exceptions can happen in both calls.
We were only ever reporting the location of the function call, whereas
asm.js code executed via turbofan reported the location of the type
coercion operator ("+" on "+foo()" or "|" on "foo()|0").

This CL implements the same behaviour for asm.js code translated to
wasm. The following is changed:
- the AsmWasmBuilder records the parent node when descending on a binary
  operator (also "+foo()" is represented by a binary operation).
- it stores not one location per call in the source position side
  table, but two (one for the call, one for the parent which does the
  type coercion).
- the wasm compiler annotates the source positions "0" and "1" to the
  two calls in the WASM_TO_JS wrapper (only if the module origin is
  asm.js).
- the StackFrame::State struct now also holds the callee_pc_address,
  which is set in ComputeCallerState. The WASM frame uses this
  information to determine whether the callee frame is WASM_TO_JS, and
  whether that frame is at the ToNumber conversion call.
- the same information is also stored in the FrameArray which is used
  to reconstruct the stack trace later.

R=titzer@chromium.org, bradnelson@chromium.org
CC=jgruber@chromium.org
BUG=v8:4203,v8:5724

Committed: https://crrev.com/94cd46b55e24fa2bb7b06b3da4d5ba7f029bc262
Review-Url: https://codereview.chromium.org/2555243002
Cr-Original-Commit-Position: refs/heads/master@{#41599}
Cr-Commit-Position: refs/heads/master@{#41613}
2016-12-09 10:30:19 +00:00
..
benchmarks [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
cctest [wasm] Fix location for error in asm.js ToNumber conversion 2016-12-09 10:30:19 +00:00
common [wasm] Remove raw byte pointers from WasmModule 2016-11-30 15:03:06 +00:00
debugger [debug] Partial reland of debug API deprecation 2016-12-02 09:02:01 +00:00
fuzzer [wasm] Remove raw byte pointers from WasmModule 2016-11-30 15:03:06 +00:00
inspector Show functions in object previews 2016-12-07 22:34:13 +00:00
intl Fix the uppercasing of U+00E7(ç) and U+00F7(÷) 2016-11-28 22:55:49 +00:00
js-perf-test [test] Add performance test for closures. 2016-12-05 13:10:44 +00:00
memory [snapshot] support multiple contexts in the same snapshot. 2016-06-15 15:39:06 +00:00
message [Interpreter] Add expression positions to BinaryOps. 2016-12-08 10:11:17 +00:00
mjsunit [wasm] Fix location for error in asm.js ToNumber conversion 2016-12-09 10:30:19 +00:00
mozilla [wasm] Add guard regions to end of WebAssembly.Memory buffers 2016-11-17 20:29:13 +00:00
preparser [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
promises-aplus Make test262 test runner check for which exception is thrown 2016-03-14 21:20:37 +00:00
simdjs [test] Deprecate test data download for most test suites 2016-08-08 12:39:48 +00:00
test262 A decimal integer literal with a leading 0 is now an error in strict mode. 2016-12-07 20:09:43 +00:00
unittests Store SharedFunctionInfos of a Script in a FixedArray indexed by their ID 2016-12-08 17:07:11 +00:00
webkit Change error messages for octal escape sequences 2016-12-07 17:26:42 +00:00
bot_default.gyp Add inspector tests to default tests to run locally. 2016-11-04 08:50:07 +00:00
bot_default.isolate [debugger] basic test infrastructure for new debugger test api. 2016-10-21 06:38:05 +00:00
BUILD.gn Properly define v8_enable_inspector and its override in GN. 2016-11-21 19:29:38 +00:00
default.gyp Add inspector tests to default tests to run locally. 2016-11-04 08:50:07 +00:00
default.isolate Add inspector tests to default tests to run locally. 2016-11-04 08:50:07 +00:00
optimize_for_size.gyp [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
optimize_for_size.isolate [debugger] basic test infrastructure for new debugger test api. 2016-10-21 06:38:05 +00:00
perf.gyp [gn] Move build to gypfiles 2016-04-29 10:11:11 +00:00
perf.isolate [test] Isolate files the perf runner depends on 2016-11-08 10:25:13 +00:00