Index: src/ia32/full-codegen-ia32.cc |
=================================================================== |
--- src/ia32/full-codegen-ia32.cc (revision 9568) |
+++ src/ia32/full-codegen-ia32.cc (working copy) |
@@ -266,7 +266,7 @@ |
// constant. |
if (scope()->is_function_scope() && scope()->function() != NULL) { |
int ignored = 0; |
- EmitDeclaration(scope()->function(), Variable::CONST, NULL, &ignored); |
+ EmitDeclaration(scope()->function(), CONST, NULL, &ignored); |
} |
VisitDeclarations(scope()->declarations()); |
} |
@@ -704,7 +704,7 @@ |
void FullCodeGenerator::EmitDeclaration(VariableProxy* proxy, |
- Variable::Mode mode, |
+ VariableMode mode, |
FunctionLiteral* function, |
int* global_count) { |
// If it was not possible to allocate the variable at compile time, we |
@@ -722,7 +722,7 @@ |
Comment cmnt(masm_, "[ Declaration"); |
VisitForAccumulatorValue(function); |
__ mov(StackOperand(variable), result_register()); |
- } else if (mode == Variable::CONST || mode == Variable::LET) { |
+ } else if (mode == CONST || mode == LET) { |
Comment cmnt(masm_, "[ Declaration"); |
__ mov(StackOperand(variable), |
Immediate(isolate()->factory()->the_hole_value())); |
@@ -754,7 +754,7 @@ |
EMIT_REMEMBERED_SET, |
OMIT_SMI_CHECK); |
PrepareForBailoutForId(proxy->id(), NO_REGISTERS); |
- } else if (mode == Variable::CONST || mode == Variable::LET) { |
+ } else if (mode == CONST || mode == LET) { |
Comment cmnt(masm_, "[ Declaration"); |
__ mov(ContextOperand(esi, variable->index()), |
Immediate(isolate()->factory()->the_hole_value())); |
@@ -768,10 +768,8 @@ |
__ push(esi); |
__ push(Immediate(variable->name())); |
// Declaration nodes are always introduced in one of three modes. |
- ASSERT(mode == Variable::VAR || |
- mode == Variable::CONST || |
- mode == Variable::LET); |
- PropertyAttributes attr = (mode == Variable::CONST) ? READ_ONLY : NONE; |
+ ASSERT(mode == VAR || mode == CONST || mode == LET); |
+ PropertyAttributes attr = (mode == CONST) ? READ_ONLY : NONE; |
__ push(Immediate(Smi::FromInt(attr))); |
// Push initial value, if any. |
// Note: For variables we must not push an initial value (such as |
@@ -780,7 +778,7 @@ |
increment_stack_height(3); |
if (function != NULL) { |
VisitForStackValue(function); |
- } else if (mode == Variable::CONST || mode == Variable::LET) { |
+ } else if (mode == CONST || mode == LET) { |
__ push(Immediate(isolate()->factory()->the_hole_value())); |
increment_stack_height(); |
} else { |
@@ -1201,19 +1199,19 @@ |
// introducing variables. In those cases, we do not want to |
// perform a runtime call for all variables in the scope |
// containing the eval. |
- if (var->mode() == Variable::DYNAMIC_GLOBAL) { |
+ if (var->mode() == DYNAMIC_GLOBAL) { |
EmitLoadGlobalCheckExtensions(var, typeof_state, slow); |
__ jmp(done); |
- } else if (var->mode() == Variable::DYNAMIC_LOCAL) { |
+ } else if (var->mode() == DYNAMIC_LOCAL) { |
Variable* local = var->local_if_not_shadowed(); |
__ mov(eax, ContextSlotOperandCheckExtensions(local, slow)); |
- if (local->mode() == Variable::CONST || |
- local->mode() == Variable::LET) { |
+ if (local->mode() == CONST || |
+ local->mode() == LET) { |
__ cmp(eax, isolate()->factory()->the_hole_value()); |
__ j(not_equal, done); |
- if (local->mode() == Variable::CONST) { |
+ if (local->mode() == CONST) { |
__ mov(eax, isolate()->factory()->undefined_value()); |
- } else { // Variable::LET |
+ } else { // LET |
__ push(Immediate(var->name())); |
__ CallRuntime(Runtime::kThrowReferenceError, 1); |
} |
@@ -1249,7 +1247,7 @@ |
Comment cmnt(masm_, var->IsContextSlot() |
? "Context variable" |
: "Stack variable"); |
- if (var->mode() != Variable::LET && var->mode() != Variable::CONST) { |
+ if (var->mode() != LET && var->mode() != CONST) { |
context()->Plug(var); |
} else { |
// Let and const need a read barrier. |
@@ -1257,10 +1255,10 @@ |
GetVar(eax, var); |
__ cmp(eax, isolate()->factory()->the_hole_value()); |
__ j(not_equal, &done, Label::kNear); |
- if (var->mode() == Variable::LET) { |
+ if (var->mode() == LET) { |
__ push(Immediate(var->name())); |
__ CallRuntime(Runtime::kThrowReferenceError, 1); |
- } else { // Variable::CONST |
+ } else { // CONST |
__ mov(eax, isolate()->factory()->undefined_value()); |
} |
__ bind(&done); |
@@ -1866,7 +1864,7 @@ |
__ CallRuntime(Runtime::kInitializeConstContextSlot, 3); |
} |
- } else if (var->mode() == Variable::LET && op != Token::INIT_LET) { |
+ } else if (var->mode() == LET && op != Token::INIT_LET) { |
// Non-initializing assignment to let variable needs a write barrier. |
if (var->IsLookupSlot()) { |
__ push(eax); // Value. |
@@ -1892,7 +1890,7 @@ |
} |
} |
- } else if (var->mode() != Variable::CONST) { |
+ } else if (var->mode() != CONST) { |
// Assignment to var or initializing assignment to let. |
if (var->IsStackAllocated() || var->IsContextSlot()) { |
MemOperand location = VarOperand(var, ecx); |
@@ -2191,7 +2189,7 @@ |
// context lookup in the runtime system. |
Label done; |
Variable* var = proxy->var(); |
- if (!var->IsUnallocated() && var->mode() == Variable::DYNAMIC_GLOBAL) { |
+ if (!var->IsUnallocated() && var->mode() == DYNAMIC_GLOBAL) { |
Label slow; |
EmitLoadGlobalCheckExtensions(var, NOT_INSIDE_TYPEOF, &slow); |
// Push the function and resolve eval. |