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

Side by Side Diff: src/typing-asm.cc

Issue 1943373002: [wasm] Disallow runtime calls in asm.js modules. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | test/mjsunit/regress/regress-592352.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/typing-asm.h" 5 #include "src/typing-asm.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 } 1064 }
1065 IntersectResult(expr, fun_type->Result()); 1065 IntersectResult(expr, fun_type->Result());
1066 return; 1066 return;
1067 } 1067 }
1068 1068
1069 FAIL(expr, "ill-typed new operator"); 1069 FAIL(expr, "ill-typed new operator");
1070 } 1070 }
1071 1071
1072 1072
1073 void AsmTyper::VisitCallRuntime(CallRuntime* expr) { 1073 void AsmTyper::VisitCallRuntime(CallRuntime* expr) {
1074 // Allow runtime calls for now. 1074 FAIL(expr, "runtime call not allowed");
1075 } 1075 }
1076 1076
1077 1077
1078 void AsmTyper::VisitUnaryOperation(UnaryOperation* expr) { 1078 void AsmTyper::VisitUnaryOperation(UnaryOperation* expr) {
1079 if (!in_function_) { 1079 if (!in_function_) {
1080 FAIL(expr, "unary operator inside module body"); 1080 FAIL(expr, "unary operator inside module body");
1081 } 1081 }
1082 switch (expr->op()) { 1082 switch (expr->op()) {
1083 case Token::NOT: // Used to encode != and !== 1083 case Token::NOT: // Used to encode != and !==
1084 RECURSE(VisitWithExpectation(expr->expression(), cache_.kAsmInt, 1084 RECURSE(VisitWithExpectation(expr->expression(), cache_.kAsmInt,
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
1615 } 1615 }
1616 1616
1617 1617
1618 void AsmTyper::VisitRewritableExpression(RewritableExpression* expr) { 1618 void AsmTyper::VisitRewritableExpression(RewritableExpression* expr) {
1619 RECURSE(Visit(expr->expression())); 1619 RECURSE(Visit(expr->expression()));
1620 } 1620 }
1621 1621
1622 1622
1623 } // namespace internal 1623 } // namespace internal
1624 } // namespace v8 1624 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-592352.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698