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/scopes.h" | 10 #include "src/ast/scopes.h" |
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 } | 832 } |
833 PrepareForBailoutForId(expr->LoadId(), BailoutState::TOS_REGISTER); | 833 PrepareForBailoutForId(expr->LoadId(), BailoutState::TOS_REGISTER); |
834 context()->Plug(result_register()); | 834 context()->Plug(result_register()); |
835 } | 835 } |
836 | 836 |
837 void FullCodeGenerator::VisitForTypeofValue(Expression* expr) { | 837 void FullCodeGenerator::VisitForTypeofValue(Expression* expr) { |
838 VariableProxy* proxy = expr->AsVariableProxy(); | 838 VariableProxy* proxy = expr->AsVariableProxy(); |
839 DCHECK(!context()->IsEffect()); | 839 DCHECK(!context()->IsEffect()); |
840 DCHECK(!context()->IsTest()); | 840 DCHECK(!context()->IsTest()); |
841 | 841 |
842 if (proxy != NULL && (proxy->var()->IsUnallocatedOrGlobalSlot() || | 842 if (proxy != NULL && |
843 proxy->var()->IsLookupSlot())) { | 843 (proxy->var()->IsUnallocated() || proxy->var()->IsLookupSlot())) { |
844 EmitVariableLoad(proxy, INSIDE_TYPEOF); | 844 EmitVariableLoad(proxy, INSIDE_TYPEOF); |
845 PrepareForBailout(proxy, BailoutState::TOS_REGISTER); | 845 PrepareForBailout(proxy, BailoutState::TOS_REGISTER); |
846 } else { | 846 } else { |
847 // This expression cannot throw a reference error at the top level. | 847 // This expression cannot throw a reference error at the top level. |
848 VisitInDuplicateContext(expr); | 848 VisitInDuplicateContext(expr); |
849 } | 849 } |
850 } | 850 } |
851 | 851 |
852 | 852 |
853 void FullCodeGenerator::VisitBlock(Block* stmt) { | 853 void FullCodeGenerator::VisitBlock(Block* stmt) { |
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1964 return var->scope()->is_nonlinear() || | 1964 return var->scope()->is_nonlinear() || |
1965 var->initializer_position() >= proxy->position(); | 1965 var->initializer_position() >= proxy->position(); |
1966 } | 1966 } |
1967 | 1967 |
1968 | 1968 |
1969 #undef __ | 1969 #undef __ |
1970 | 1970 |
1971 | 1971 |
1972 } // namespace internal | 1972 } // namespace internal |
1973 } // namespace v8 | 1973 } // namespace v8 |
OLD | NEW |