Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: test/cctest/test-asm-validator.cc

Issue 1609893002: Add function tables to asm to wasm (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/wasm/encoder.cc ('k') | test/mjsunit/wasm/asm-wasm.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/ast-expression-visitor.h" 8 #include "src/ast/ast-expression-visitor.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/parsing/parser.h" 10 #include "src/parsing/parser.h"
(...skipping 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmSigned)) { 1515 CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmSigned)) {
1516 CHECK_VAR(y, Bounds(cache.kAsmInt)); 1516 CHECK_VAR(y, Bounds(cache.kAsmInt));
1517 CHECK_EXPR(Literal, Bounds(cache.kAsmFixnum)); 1517 CHECK_EXPR(Literal, Bounds(cache.kAsmFixnum));
1518 } 1518 }
1519 } 1519 }
1520 CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmSigned)) { 1520 CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmSigned)) {
1521 CHECK_EXPR(Call, Bounds(cache.kAsmSigned)) { 1521 CHECK_EXPR(Call, Bounds(cache.kAsmSigned)) {
1522 CHECK_EXPR(Property, FUNC_I2I_TYPE) { 1522 CHECK_EXPR(Property, FUNC_I2I_TYPE) {
1523 CHECK_VAR(table1, FUNC_I2I_ARRAY_TYPE); 1523 CHECK_VAR(table1, FUNC_I2I_ARRAY_TYPE);
1524 CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmSigned)) { 1524 CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmSigned)) {
1525 CHECK_VAR(x, Bounds(cache.kAsmSigned)); 1525 // TODO(bradnelson): revert this
1526 // CHECK_VAR(x, Bounds(cache.kAsmSigned));
1527 CHECK_VAR(x, Bounds(cache.kAsmInt));
1526 CHECK_EXPR(Literal, Bounds(cache.kAsmFixnum)); 1528 CHECK_EXPR(Literal, Bounds(cache.kAsmFixnum));
1527 } 1529 }
1528 } 1530 }
1529 CHECK_VAR(y, Bounds(cache.kAsmInt)); 1531 CHECK_VAR(y, Bounds(cache.kAsmInt));
1530 } 1532 }
1531 CHECK_EXPR(Literal, Bounds(cache.kAsmFixnum)); 1533 CHECK_EXPR(Literal, Bounds(cache.kAsmFixnum));
1532 } 1534 }
1533 } 1535 }
1534 CHECK_SKIP(); 1536 CHECK_SKIP();
1535 } 1537 }
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
2041 "asm: line 39: duplicate case value\n"); 2043 "asm: line 39: duplicate case value\n");
2042 } 2044 }
2043 2045
2044 2046
2045 TEST(BadSwitchOrder) { 2047 TEST(BadSwitchOrder) {
2046 CHECK_FUNC_ERROR( 2048 CHECK_FUNC_ERROR(
2047 "function bar() { switch (1) { default: case 0: } }\n" 2049 "function bar() { switch (1) { default: case 0: } }\n"
2048 "function foo() { bar(); }", 2050 "function foo() { bar(); }",
2049 "asm: line 39: default case out of order\n"); 2051 "asm: line 39: default case out of order\n");
2050 } 2052 }
OLDNEW
« no previous file with comments | « src/wasm/encoder.cc ('k') | test/mjsunit/wasm/asm-wasm.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698