Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: src/full-codegen/full-codegen.cc

Issue 2287173002: Replace CollectVariables with locals(), update callsites to walk locals instead (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: restore undefined handling Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698