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

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

Issue 2314483002: Store the ScopeInfo in WithContexts (Closed)
Patch Set: updates 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
« no previous file with comments | « src/factory.cc ('k') | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 Comment cmnt(masm_, "[ WithStatement"); 1125 Comment cmnt(masm_, "[ WithStatement");
1126 SetStatementPosition(stmt); 1126 SetStatementPosition(stmt);
1127 1127
1128 VisitForAccumulatorValue(stmt->expression()); 1128 VisitForAccumulatorValue(stmt->expression());
1129 Callable callable = CodeFactory::ToObject(isolate()); 1129 Callable callable = CodeFactory::ToObject(isolate());
1130 __ Move(callable.descriptor().GetRegisterParameter(0), result_register()); 1130 __ Move(callable.descriptor().GetRegisterParameter(0), result_register());
1131 __ Call(callable.code(), RelocInfo::CODE_TARGET); 1131 __ Call(callable.code(), RelocInfo::CODE_TARGET);
1132 RestoreContext(); 1132 RestoreContext();
1133 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER); 1133 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER);
1134 PushOperand(result_register()); 1134 PushOperand(result_register());
1135 PushOperand(stmt->scope()->scope_info());
1135 PushFunctionArgumentForContextAllocation(); 1136 PushFunctionArgumentForContextAllocation();
1136 CallRuntimeWithOperands(Runtime::kPushWithContext); 1137 CallRuntimeWithOperands(Runtime::kPushWithContext);
1137 StoreToFrameField(StandardFrameConstants::kContextOffset, context_register()); 1138 StoreToFrameField(StandardFrameConstants::kContextOffset, context_register());
1138 PrepareForBailoutForId(stmt->EntryId(), BailoutState::NO_REGISTERS); 1139 PrepareForBailoutForId(stmt->EntryId(), BailoutState::NO_REGISTERS);
1139 1140
1140 Scope* saved_scope = scope(); 1141 Scope* saved_scope = scope();
1141 scope_ = stmt->scope(); 1142 scope_ = stmt->scope();
1142 { WithOrCatch body(this); 1143 { WithOrCatch body(this);
1143 Visit(stmt->statement()); 1144 Visit(stmt->statement());
1144 } 1145 }
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
2009 return info_->has_simple_parameters(); 2010 return info_->has_simple_parameters();
2010 } 2011 }
2011 2012
2012 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } 2013 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); }
2013 2014
2014 #undef __ 2015 #undef __
2015 2016
2016 2017
2017 } // namespace internal 2018 } // namespace internal
2018 } // namespace v8 2019 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698