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

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

Issue 1717213002: Allow negative literals in asm->wasm non-conversion operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merge Created 4 years, 10 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/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/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 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 1106
1107 intish_ = 0; 1107 intish_ = 0;
1108 1108
1109 if (left_type->Is(cache_.kAsmFixnum) && right_type->Is(cache_.kAsmInt)) { 1109 if (left_type->Is(cache_.kAsmFixnum) && right_type->Is(cache_.kAsmInt)) {
1110 left_type = right_type; 1110 left_type = right_type;
1111 } 1111 }
1112 if (right_type->Is(cache_.kAsmFixnum) && left_type->Is(cache_.kAsmInt)) { 1112 if (right_type->Is(cache_.kAsmFixnum) && left_type->Is(cache_.kAsmInt)) {
1113 right_type = left_type; 1113 right_type = left_type;
1114 } 1114 }
1115 if (!conversion) { 1115 if (!conversion) {
1116 if (!left_type->Is(right_type) || !right_type->Is(left_type)) { 1116 if (!left_type->Is(cache_.kAsmInt) || !right_type->Is(cache_.kAsmInt)) {
1117 FAIL(expr, "ill-typed bitwise operation"); 1117 FAIL(expr, "ill-typed bitwise operation");
1118 } 1118 }
1119 } 1119 }
1120 IntersectResult(expr, result_type); 1120 IntersectResult(expr, result_type);
1121 } 1121 }
1122 1122
1123 1123
1124 void AsmTyper::VisitBinaryOperation(BinaryOperation* expr) { 1124 void AsmTyper::VisitBinaryOperation(BinaryOperation* expr) {
1125 if (!in_function_) { 1125 if (!in_function_) {
1126 if (expr->op() != Token::BIT_OR && expr->op() != Token::MUL) { 1126 if (expr->op() != Token::BIT_OR && expr->op() != Token::MUL) {
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 } 1560 }
1561 1561
1562 1562
1563 void AsmTyper::VisitRewritableExpression(RewritableExpression* expr) { 1563 void AsmTyper::VisitRewritableExpression(RewritableExpression* expr) {
1564 RECURSE(Visit(expr->expression())); 1564 RECURSE(Visit(expr->expression()));
1565 } 1565 }
1566 1566
1567 1567
1568 } // namespace internal 1568 } // namespace internal
1569 } // namespace v8 1569 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/wasm/asm-wasm.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698