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

Unified Diff: src/asmjs/asm-typer.cc

Issue 2152763002: V8. ASM-2-WASM. Fixes import handling logic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | test/cctest/asmjs/test-asm-typer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/asmjs/asm-typer.cc
diff --git a/src/asmjs/asm-typer.cc b/src/asmjs/asm-typer.cc
index fea35177338d0f90577d5db7600bfcf917929c4a..f8e23c3bc4756857d98c0be074a37cf9ec045fb9 100644
--- a/src/asmjs/asm-typer.cc
+++ b/src/asmjs/asm-typer.cc
@@ -647,13 +647,15 @@ AsmType* AsmTyper::ValidateGlobalDeclaration(Assignment* assign) {
FAIL(assign, "Invalid import.");
}
CHECK(target_info->mutability() == VariableInfo::kImmutableGlobal);
- if (!target_info->IsFFI()) {
- target_info = target_info->Clone(zone_);
- } else {
+ if (target_info->IsFFI()) {
// create a new target info that represents a foreign variable.
DCHECK(target_info->type()->AsFFIType() != nullptr);
target_info = new (zone_) VariableInfo(target_info->type());
target_info->set_mutability(VariableInfo::kImmutableGlobal);
+ } else if (target_info->type()->IsA(AsmType::Heap())) {
+ FAIL(assign, "Heap view types can not be aliased.");
+ } else {
+ target_info = target_info->Clone(zone_);
}
} else if (value->IsBinaryOperation()) {
// This should either be:
« no previous file with comments | « no previous file | test/cctest/asmjs/test-asm-typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698