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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 2281073002: Create ScopeInfos while analyzing the Scope chain (Closed)
Patch Set: rebase 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 4684 matching lines...) Expand 10 before | Expand all | Expand 10 after
4695 if (declaration_scope->is_script_scope() || 4695 if (declaration_scope->is_script_scope() ||
4696 declaration_scope->is_eval_scope()) { 4696 declaration_scope->is_eval_scope()) {
4697 function = new (zone()) 4697 function = new (zone())
4698 HLoadContextSlot(outer_context, Context::CLOSURE_INDEX, 4698 HLoadContextSlot(outer_context, Context::CLOSURE_INDEX,
4699 HLoadContextSlot::kNoCheck); 4699 HLoadContextSlot::kNoCheck);
4700 } else { 4700 } else {
4701 function = New<HThisFunction>(); 4701 function = New<HThisFunction>();
4702 } 4702 }
4703 AddInstruction(function); 4703 AddInstruction(function);
4704 // Allocate a block context and store it to the stack frame. 4704 // Allocate a block context and store it to the stack frame.
4705 HValue* scope_info = Add<HConstant>(scope->GetScopeInfo(isolate())); 4705 HValue* scope_info = Add<HConstant>(scope->scope_info());
4706 Add<HPushArguments>(scope_info, function); 4706 Add<HPushArguments>(scope_info, function);
4707 HInstruction* inner_context = Add<HCallRuntime>( 4707 HInstruction* inner_context = Add<HCallRuntime>(
4708 Runtime::FunctionForId(Runtime::kPushBlockContext), 2); 4708 Runtime::FunctionForId(Runtime::kPushBlockContext), 2);
4709 inner_context->SetFlag(HValue::kHasNoObservableSideEffects); 4709 inner_context->SetFlag(HValue::kHasNoObservableSideEffects);
4710 set_scope(scope); 4710 set_scope(scope);
4711 environment()->BindContext(inner_context); 4711 environment()->BindContext(inner_context);
4712 } 4712 }
4713 VisitDeclarations(scope->declarations()); 4713 VisitDeclarations(scope->declarations());
4714 AddSimulate(stmt->DeclsId(), REMOVABLE_SIMULATE); 4714 AddSimulate(stmt->DeclsId(), REMOVABLE_SIMULATE);
4715 } 4715 }
(...skipping 8713 matching lines...) Expand 10 before | Expand all | Expand 10 after
13429 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13429 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13430 } 13430 }
13431 13431
13432 #ifdef DEBUG 13432 #ifdef DEBUG
13433 graph_->Verify(false); // No full verify. 13433 graph_->Verify(false); // No full verify.
13434 #endif 13434 #endif
13435 } 13435 }
13436 13436
13437 } // namespace internal 13437 } // namespace internal
13438 } // namespace v8 13438 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698