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

Unified Diff: src/scopes.h

Issue 1161393007: OLD type Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 6 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 | « src/scopeinfo.cc ('k') | src/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.h
diff --git a/src/scopes.h b/src/scopes.h
index c6baba5e29d07abf52c3b3473349dd16e6a5a7bc..e8cb1727b46facc5d60b421cf13368534edd6dd8 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -84,6 +84,7 @@ class Scope: public ZoneObject {
Context* context, Scope* script_scope);
// The scope name is only used for printing/debugging.
+ Handle<String> ScopeName() { return scope_name_->string(); }
void SetScopeName(const AstRawString* scope_name) {
scope_name_ = scope_name;
}
@@ -223,6 +224,13 @@ class Scope: public ZoneObject {
language_mode_ = language_mode;
}
+ // Set asm.js mode.
+ void SetAsmMode(AsmMode asm_mode) {
+ DCHECK(FLAG_asm || asm_mode == ASM_NO);
+ asm_mode_ = asm_mode;
+ if (asm_mode == ASM_FUNCTION) ForceEagerCompilation();
+ }
+
// Set the ASM module flag.
void SetAsmModule() { asm_module_ = true; }
@@ -341,6 +349,7 @@ class Scope: public ZoneObject {
// The language mode of this scope.
LanguageMode language_mode() const { return language_mode_; }
+ AsmMode asm_mode() const { return asm_mode_; }
// The variable corresponding to the 'this' value.
Variable* receiver() {
@@ -606,6 +615,7 @@ class Scope: public ZoneObject {
bool asm_function_;
// The language mode of this scope.
LanguageMode language_mode_;
+ AsmMode asm_mode_;
// Source positions.
int start_position_;
int end_position_;
« no previous file with comments | « src/scopeinfo.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698