| 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/ast-numbering.h" | 7 #include "src/ast/ast-numbering.h" |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
| 10 #include "src/ast/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 } | 435 } |
| 436 | 436 |
| 437 | 437 |
| 438 void FullCodeGenerator::VisitSloppyBlockFunctionStatement( | 438 void FullCodeGenerator::VisitSloppyBlockFunctionStatement( |
| 439 SloppyBlockFunctionStatement* declaration) { | 439 SloppyBlockFunctionStatement* declaration) { |
| 440 Visit(declaration->statement()); | 440 Visit(declaration->statement()); |
| 441 } | 441 } |
| 442 | 442 |
| 443 | 443 |
| 444 int FullCodeGenerator::DeclareGlobalsFlags() { | 444 int FullCodeGenerator::DeclareGlobalsFlags() { |
| 445 DCHECK(DeclareGlobalsLanguageMode::is_valid(language_mode())); | 445 return info_->GetDeclareGlobalsFlags(); |
| 446 return DeclareGlobalsEvalFlag::encode(is_eval()) | | |
| 447 DeclareGlobalsNativeFlag::encode(is_native()) | | |
| 448 DeclareGlobalsLanguageMode::encode(language_mode()); | |
| 449 } | 446 } |
| 450 | 447 |
| 451 void FullCodeGenerator::PushOperand(Handle<Object> handle) { | 448 void FullCodeGenerator::PushOperand(Handle<Object> handle) { |
| 452 OperandStackDepthIncrement(1); | 449 OperandStackDepthIncrement(1); |
| 453 __ Push(handle); | 450 __ Push(handle); |
| 454 } | 451 } |
| 455 | 452 |
| 456 void FullCodeGenerator::PushOperand(Smi* smi) { | 453 void FullCodeGenerator::PushOperand(Smi* smi) { |
| 457 OperandStackDepthIncrement(1); | 454 OperandStackDepthIncrement(1); |
| 458 __ Push(smi); | 455 __ Push(smi); |
| (...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1942 return var->scope()->is_nonlinear() || | 1939 return var->scope()->is_nonlinear() || |
| 1943 var->initializer_position() >= proxy->position(); | 1940 var->initializer_position() >= proxy->position(); |
| 1944 } | 1941 } |
| 1945 | 1942 |
| 1946 | 1943 |
| 1947 #undef __ | 1944 #undef __ |
| 1948 | 1945 |
| 1949 | 1946 |
| 1950 } // namespace internal | 1947 } // namespace internal |
| 1951 } // namespace v8 | 1948 } // namespace v8 |
| OLD | NEW |