Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 466c3f7238dec7e4a6cfde43700a2c699e16452b..2544e34d8426253e55313bf8e9cfe1b8eb30d122 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -256,11 +256,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()); |
} |
@@ -678,8 +678,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. |
@@ -688,7 +687,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: |
@@ -769,9 +768,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(rsi); // The context is the first argument. |