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

Unified Diff: src/typing-asm.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/wasm/asm-wasm-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/typing-asm.cc
diff --git a/src/typing-asm.cc b/src/typing-asm.cc
index 509ba7b1253c9d07325533c4ec3fa78a110d7d7d..14db16ba94b36aeba4e97dfd503ee061f1000e4c 100644
--- a/src/typing-asm.cc
+++ b/src/typing-asm.cc
@@ -721,28 +721,31 @@ Type* AsmTyper::StorageType(Type* type) {
void AsmTyper::VisitHeapAccess(Property* expr, bool assigning,
Type* assignment_type) {
Type::ArrayType* array_type = computed_type_->AsArray();
- size_t size = array_size_;
+ // size_t size = array_size_;
Type* type = array_type->AsArray()->Element();
if (type->IsFunction()) {
if (assigning) {
FAIL(expr, "assigning to function table is illegal");
}
- BinaryOperation* bin = expr->key()->AsBinaryOperation();
- if (bin == NULL || bin->op() != Token::BIT_AND) {
- FAIL(expr->key(), "expected & in call");
- }
- RECURSE(VisitWithExpectation(bin->left(), cache_.kAsmSigned,
- "array index expected to be integer"));
- Literal* right = bin->right()->AsLiteral();
- if (right == NULL || right->raw_value()->ContainsDot()) {
- FAIL(right, "call mask must be integer");
- }
- RECURSE(VisitWithExpectation(bin->right(), cache_.kAsmSigned,
- "call mask expected to be integer"));
- if (static_cast<size_t>(right->raw_value()->AsNumber()) != size - 1) {
- FAIL(right, "call mask must match function table");
- }
- bin->set_bounds(Bounds(cache_.kAsmSigned));
+ // TODO(bradnelson): Fix the parser and then un-comment this part
+ // BinaryOperation* bin = expr->key()->AsBinaryOperation();
+ // if (bin == NULL || bin->op() != Token::BIT_AND) {
+ // FAIL(expr->key(), "expected & in call");
+ // }
+ // RECURSE(VisitWithExpectation(bin->left(), cache_.kAsmSigned,
+ // "array index expected to be integer"));
+ // Literal* right = bin->right()->AsLiteral();
+ // if (right == NULL || right->raw_value()->ContainsDot()) {
+ // FAIL(right, "call mask must be integer");
+ // }
+ // RECURSE(VisitWithExpectation(bin->right(), cache_.kAsmSigned,
+ // "call mask expected to be integer"));
+ // if (static_cast<size_t>(right->raw_value()->AsNumber()) != size - 1) {
+ // FAIL(right, "call mask must match function table");
+ // }
+ // bin->set_bounds(Bounds(cache_.kAsmSigned));
+ RECURSE(VisitWithExpectation(expr->key(), cache_.kAsmSigned,
+ "must be integer"));
IntersectResult(expr, type);
} else {
Literal* literal = expr->key()->AsLiteral();
« no previous file with comments | « no previous file | src/wasm/asm-wasm-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698