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/full-codegen/full-codegen.h" | 5 #include "src/full-codegen/full-codegen.h" |
6 | 6 |
7 #include "src/ast.h" | 7 #include "src/ast.h" |
8 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 // TODO(rossberg) | 443 // TODO(rossberg) |
444 } | 444 } |
445 | 445 |
446 | 446 |
447 void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { | 447 void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { |
448 Comment cmnt(masm_, "[ VariableProxy"); | 448 Comment cmnt(masm_, "[ VariableProxy"); |
449 EmitVariableLoad(expr); | 449 EmitVariableLoad(expr); |
450 } | 450 } |
451 | 451 |
452 | 452 |
| 453 void FullCodeGenerator::VisitSloppyBlockFunctionStatement( |
| 454 SloppyBlockFunctionStatement* declaration) { |
| 455 Visit(declaration->statement()); |
| 456 } |
| 457 |
| 458 |
453 int FullCodeGenerator::DeclareGlobalsFlags() { | 459 int FullCodeGenerator::DeclareGlobalsFlags() { |
454 DCHECK(DeclareGlobalsLanguageMode::is_valid(language_mode())); | 460 DCHECK(DeclareGlobalsLanguageMode::is_valid(language_mode())); |
455 return DeclareGlobalsEvalFlag::encode(is_eval()) | | 461 return DeclareGlobalsEvalFlag::encode(is_eval()) | |
456 DeclareGlobalsNativeFlag::encode(is_native()) | | 462 DeclareGlobalsNativeFlag::encode(is_native()) | |
457 DeclareGlobalsLanguageMode::encode(language_mode()); | 463 DeclareGlobalsLanguageMode::encode(language_mode()); |
458 } | 464 } |
459 | 465 |
460 | 466 |
461 void FullCodeGenerator::EmitSubString(CallRuntime* expr) { | 467 void FullCodeGenerator::EmitSubString(CallRuntime* expr) { |
462 // Load the arguments on the stack and call the stub. | 468 // Load the arguments on the stack and call the stub. |
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1637 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1643 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
1638 var->initializer_position() >= proxy->position(); | 1644 var->initializer_position() >= proxy->position(); |
1639 } | 1645 } |
1640 | 1646 |
1641 | 1647 |
1642 #undef __ | 1648 #undef __ |
1643 | 1649 |
1644 | 1650 |
1645 } // namespace internal | 1651 } // namespace internal |
1646 } // namespace v8 | 1652 } // namespace v8 |
OLD | NEW |