| 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_;
|
|
|