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

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

Issue 2435823002: [V8][asm.js] Adds support to global const variables. (Closed)
Patch Set: Changes expected error messages in asm-typer cctest. Created 4 years, 2 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/asmjs/asm-typer.cc » ('j') | src/asmjs/asm-typer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/asmjs/asm-typer.h
diff --git a/src/asmjs/asm-typer.h b/src/asmjs/asm-typer.h
index 942ca21370cf11f719df7a4658d4ddf42b52d695..384f0a74def5ba5265a5c6ef9ca72962f0219a1a 100644
--- a/src/asmjs/asm-typer.h
+++ b/src/asmjs/asm-typer.h
@@ -102,6 +102,7 @@ class AsmTyper final {
kInvalidMutability,
kLocal,
kMutableGlobal,
+ kConstGlobal,
kImmutableGlobal,
};
@@ -114,7 +115,8 @@ class AsmTyper final {
}
bool IsGlobal() const {
- return mutability_ == kImmutableGlobal || mutability_ == kMutableGlobal;
+ return mutability_ == kImmutableGlobal || mutability_ == kConstGlobal ||
+ mutability_ == kMutableGlobal;
}
bool IsStdlib() const { return standard_member_ == kStdlib; }
@@ -307,8 +309,9 @@ class AsmTyper final {
AsmType* ReturnTypeAnnotations(ReturnStatement* statement);
// 5.4 VariableTypeAnnotations
// 5.5 GlobalVariableTypeAnnotations
- AsmType* VariableTypeAnnotations(Expression* initializer,
- bool global = false);
+ AsmType* VariableTypeAnnotations(
+ Expression* initializer,
+ VariableInfo::Mutability global = VariableInfo::kLocal);
AsmType* ImportExpression(Property* import);
AsmType* NewHeapView(CallNew* new_heap_view);
« no previous file with comments | « no previous file | src/asmjs/asm-typer.cc » ('j') | src/asmjs/asm-typer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698