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

Unified Diff: test/cctest/test-asm-validator.cc

Issue 1405993009: Allow constant heap accesses in asm typer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/typing-asm.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-asm-validator.cc
diff --git a/test/cctest/test-asm-validator.cc b/test/cctest/test-asm-validator.cc
index 5b2a04d47dbf6535f981cb251901d6169c957c65..8923e21e9ffb69e8b6dfe78a3e10018ad6c68180 100644
--- a/test/cctest/test-asm-validator.cc
+++ b/test/cctest/test-asm-validator.cc
@@ -927,6 +927,32 @@ TEST(Load1) {
}
+TEST(Load1Constant) {
+ CHECK_FUNC_TYPES_BEGIN(
+ "function bar() { var x = 1; var y = i8[5]|0; }\n"
+ "function foo() { bar(); }") {
+ CHECK_EXPR(FunctionLiteral, FUNC_V_TYPE) {
+ CHECK_EXPR(Assignment, Bounds(cache.kInt32)) {
+ CHECK_VAR(x, Bounds(cache.kInt32));
+ CHECK_EXPR(Literal, Bounds(cache.kInt32));
+ }
+ CHECK_EXPR(Assignment, Bounds(cache.kInt32)) {
+ CHECK_VAR(y, Bounds(cache.kInt32));
+ CHECK_EXPR(BinaryOperation, Bounds(cache.kInt32)) {
+ CHECK_EXPR(Property, Bounds(cache.kInt8)) {
+ CHECK_VAR(i8, Bounds(cache.kInt8Array));
+ CHECK_EXPR(Literal, Bounds(cache.kInt32));
+ }
+ CHECK_EXPR(Literal, Bounds(cache.kInt32));
+ }
+ }
+ }
+ CHECK_SKIP();
+ }
+ CHECK_FUNC_TYPES_END
+}
+
+
TEST(FunctionTables) {
CHECK_FUNC_TYPES_BEGIN(
"function func1(x) { x = x | 0; return (x * 5) | 0; }\n"
« no previous file with comments | « src/typing-asm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698