Index: src/ia32/full-codegen-ia32.cc |
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
index 135db06ac84d556ce78a01abeb74993282587a6a..661d67eb8bda053f4e8efa46a923108bb340d816 100644 |
--- a/src/ia32/full-codegen-ia32.cc |
+++ b/src/ia32/full-codegen-ia32.cc |
@@ -261,11 +261,11 @@ void FullCodeGenerator::Generate(CompilationInfo* info) { |
// For named function expressions, declare the function name as a |
// constant. |
if (scope()->is_function_scope() && scope()->function() != NULL) { |
- int ignored = 0; |
VariableProxy* proxy = scope()->function(); |
ASSERT(proxy->var()->mode() == CONST || |
proxy->var()->mode() == CONST_HARMONY); |
- EmitDeclaration(proxy, proxy->var()->mode(), NULL, &ignored); |
+ ASSERT(proxy->var()->location() != Variable::UNALLOCATED); |
+ EmitDeclaration(proxy, proxy->var()->mode(), NULL); |
} |
VisitDeclarations(scope()->declarations()); |
} |
@@ -681,8 +681,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, |
void FullCodeGenerator::EmitDeclaration(VariableProxy* proxy, |
VariableMode mode, |
- FunctionLiteral* function, |
- int* global_count) { |
+ FunctionLiteral* function) { |
// If it was not possible to allocate the variable at compile time, we |
// need to "declare" it at runtime to make sure it actually exists in the |
// local context. |
@@ -691,7 +690,7 @@ void FullCodeGenerator::EmitDeclaration(VariableProxy* proxy, |
(mode == CONST || mode == CONST_HARMONY || mode == LET); |
switch (variable->location()) { |
case Variable::UNALLOCATED: |
- ++(*global_count); |
+ ++global_count_; |
break; |
case Variable::PARAMETER: |
@@ -771,9 +770,6 @@ void FullCodeGenerator::EmitDeclaration(VariableProxy* proxy, |
} |
-void FullCodeGenerator::VisitDeclaration(Declaration* decl) { } |
- |
- |
void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { |
// Call the runtime to declare the globals. |
__ push(esi); // The context is the first argument. |