| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/ast.h" | 5 #include "src/ast.h" |
| 6 #include "src/ast-numbering.h" | 6 #include "src/ast-numbering.h" |
| 7 #include "src/scopes.h" | 7 #include "src/scopes.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 scope->VisitIllegalRedeclaration(this); | 531 scope->VisitIllegalRedeclaration(this); |
| 532 DisableOptimization(kFunctionWithIllegalRedeclaration); | 532 DisableOptimization(kFunctionWithIllegalRedeclaration); |
| 533 return Finish(node); | 533 return Finish(node); |
| 534 } | 534 } |
| 535 if (scope->calls_eval()) DisableOptimization(kFunctionCallsEval); | 535 if (scope->calls_eval()) DisableOptimization(kFunctionCallsEval); |
| 536 if (scope->arguments() != NULL && !scope->arguments()->IsStackAllocated()) { | 536 if (scope->arguments() != NULL && !scope->arguments()->IsStackAllocated()) { |
| 537 DisableCrankshaft(kContextAllocatedArguments); | 537 DisableCrankshaft(kContextAllocatedArguments); |
| 538 } | 538 } |
| 539 | 539 |
| 540 VisitDeclarations(scope->declarations()); | 540 VisitDeclarations(scope->declarations()); |
| 541 if (scope->is_function_scope() && scope->function() != NULL) { | |
| 542 // Visit the name of the named function expression. | |
| 543 Visit(scope->function()); | |
| 544 } | |
| 545 VisitStatements(node->body()); | 541 VisitStatements(node->body()); |
| 546 | 542 |
| 547 return Finish(node); | 543 return Finish(node); |
| 548 } | 544 } |
| 549 | 545 |
| 550 | 546 |
| 551 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 547 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
| 552 FunctionLiteral* function) { | 548 FunctionLiteral* function) { |
| 553 AstNumberingVisitor visitor(isolate, zone); | 549 AstNumberingVisitor visitor(isolate, zone); |
| 554 return visitor.Renumber(function); | 550 return visitor.Renumber(function); |
| 555 } | 551 } |
| 556 } // namespace internal | 552 } // namespace internal |
| 557 } // namespace v8 | 553 } // namespace v8 |
| OLD | NEW |