Commit Graph

21 Commits

Author SHA1 Message Date
clemensh
3e5f45b64b [wasm] Flag WASM code sections as such in the tests
This makes them show up in the stack trace. Otherwise the stack frames
are identified as type STUB, and skipped by the iterator.

R=ahaas@chromium.org, jfb@chromium.org, titzer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#35621}
2016-04-19 12:55:02 +00:00
clemensh
09b50113d4 Move two test-internal functions up to header file
... such that they can be reused from other tests.

R=ahaas@chromium.org, jfb@chromium.org, titzer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#35617}
2016-04-19 12:24:39 +00:00
jochen
cb7aa79b12 Expose a lower bound of malloc'd memory via heap statistics
We expect that the majority of malloc'd memory held by V8 is allocated
in Zone objects. Introduce an Allocator class that is used by Zones to
manage memory, and allows for querying the current usage.

BUG=none
R=titzer@chromium.org,bmeurer@chromium.org,jarin@chromium.org
LOG=n
TBR=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#35196}
2016-04-01 10:01:56 +00:00
titzer
08e0ea38cd [wasm] Fix and enable more tests.
R=ahaas@chromium.org, bradnelson@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#35156}
2016-03-31 09:20:21 +00:00
binji
ca0dbaece0 [wasm] All strings are length-prefixed and inline
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34637}
2016-03-09 18:56:30 +00:00
titzer
835c5e6beb [wasm] Rework encoding of local declarations.
Local declarations were previously encoded as an optional set of
4 uint16 values as part of the function declaration. This CL
implements the current design of moving these declarations to
a list of pairs of (type, count) that is part of the body.

R=bradnelson@chromium.org,binji@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34564}
2016-03-07 21:05:15 +00:00
titzer
008888c8cb [wasm] Allocate WasmModule and WasmModuleInstance vectors inline.
R=bradnelson@chromium.org,ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34351}
2016-02-28 19:05:42 +00:00
titzer
8344687c76 [wasm] Properly plumb the origin of the WASM module from asm.js translation.
R=bradnelson@chromium.org,aseemgarg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34345}
2016-02-27 20:40:06 +00:00
ahaas
cadc1e7780 [wasm] Added I64Ior to the Int64Lowering.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34219}
2016-02-23 16:30:42 +00:00
titzer
e96a54f7b5 [wasm] Refactor WASM test usage of TestingModule.
This cleans up and makes the tests easier to write and understand.
Also prepares for adding the WASM interpreter which needs a
different initialization sequence in tests.

R=ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34123}
2016-02-18 15:58:28 +00:00
ahaas
545943db15 [wasm] WasmRunner can run tests with I64 parameters and return value.
I extended the Int64Lowering to lower calls, loads, stores, returns, and
parameters and apply the lowering on both the test function TF graph and
the WasmRunner TF graph.

The lowering of calls also requires an adjustment of the call descriptor.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34121}
2016-02-18 15:19:18 +00:00
ahaas
f8e068e926 [wasm] Replace the BufferedRawMachineAssemblerTester in the WasmRunner.
The BufferedRawMachineAssemblerTester caused problems for the
Int64Lowering. Instead we construct a TF graph now which is compiled by
Pipeline::GenerateCodeForTesting.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34107}
2016-02-18 09:55:49 +00:00
titzer
3a0377a48d [wasm] Clean up handling of function names.
R=ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33999}
2016-02-15 16:00:19 +00:00
ahaas
1101739898 [wasm] Initial commit for the Int64Reducer.
The goal of the Int64Reducer is to replace all int64 nodes in a tf graph
with a set of int32 nodes such that 64 bit tf functions can be executed
on 32 bit platforms. At the moment the Int64Reducer only replaces
Int64Constants, TruncateInt64ToInt32, and Word64And.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33721}
2016-02-04 09:41:23 +00:00
titzer
007e14ce4b [wasm] Rename local_int32_count to local_i32_count and similar textual replacements.
R=ahaas@chromium.org,jfb@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33702}
2016-02-03 11:06:45 +00:00
akos.palfi
1f5c91e4d8 MIPS: Fix unaligned read/write operations in wasm.
TEST=cctest/test-run-wasm/*, cctest/test-run-wasm-module/*, unittests
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33678}
2016-02-02 12:45:31 +00:00
titzer
1e1f72f3a6 [wasm] Factor out WasmModuleInstance from ModuleEnv.
R=ahaas@chromium.org,bradnelson@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33541}
2016-01-27 11:04:40 +00:00
titzer
3b6b8119ff [wasm] Add utilities to print out WASM ast directly from the bytes.
Motivated by finding a bug in a larger module, this CL adds the ability
to dump out a byte-by-byte, nested view of the decoded AST. This
byte-by-byte output uses the opcode enum to make it readable, but is
suitable for pasting into a byte[] in C or JS and thus making a regression
test.

Also fix a bug; the case of running out of registers for indirect calls.

R=ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33442}
2016-01-21 16:11:19 +00:00
titzer
d1bc4f0e27 Reland of [wasm] Add tests for JS wrappers to test-run-wasm.
Fix: pass global object as receiver when calling WASM->JS.

R=bradnelson@chromium.org, ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33286}
2016-01-14 09:49:04 +00:00
adamk
a3a6bd4128 Revert of [wasm] Add tests for JS wrappers to test-run-wasm. (patchset #1 id:1 of https://codereview.chromium.org/1581643004/ )
Reason for revert:
New test failed on nosnap builder (https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug/builds/4738):

Test: cctest/test-run-wasm-js/Run_CallJS_Add_jswrapped

Stderr:
abort: Sloppy function expects JSReceiver as receiver.

#
# Fatal error in ../../src/objects-inl.h, line 3221
# Check failed: !v8::internal::FLAG_enable_slow_asserts || (object->IsJSFunction()).
#

Original issue's description:
> [wasm] Add tests for JS wrappers to test-run-wasm.
>
> R=bradnelson@chromium.org, ahaas@chromium.org
> BUG=
>
> Committed: https://crrev.com/c52f5ced4e600a57c02301f2936b80f086613985
> Cr-Commit-Position: refs/heads/master@{#33274}

TBR=ahaas@chromium.org,bradnelson@chromium.org,titzer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33275}
2016-01-13 21:01:58 +00:00
titzer
c52f5ced4e [wasm] Add tests for JS wrappers to test-run-wasm.
R=bradnelson@chromium.org, ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33274}
2016-01-13 19:56:56 +00:00