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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 2209573002: Separate Scope into DeclarationScope and Scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move has_simple_parameters_ to DeclarationScope Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: src/crankshaft/hydrogen.cc
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
index d455140af9dc5342d44c8a523fa066a8e2d53087..618ac6b8652c0e2411220591aa914510c2575827 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -4399,7 +4399,7 @@ bool HOptimizedGraphBuilder::BuildGraph() {
return false;
}
- Scope* scope = current_info()->scope();
+ DeclarationScope* scope = current_info()->scope();
SetUpScope(scope);
// Add an edge to the body entry. This is warty: the graph's start
@@ -4604,8 +4604,7 @@ HInstruction* HOptimizedGraphBuilder::PreProcessCall(Instruction* call) {
return call;
}
-
-void HOptimizedGraphBuilder::SetUpScope(Scope* scope) {
+void HOptimizedGraphBuilder::SetUpScope(DeclarationScope* scope) {
HEnvironment* prolog_env = environment();
int parameter_count = environment()->parameter_count();
ZoneList<HValue*> parameters(parameter_count, zone());
@@ -4691,7 +4690,7 @@ void HOptimizedGraphBuilder::VisitBlock(Block* stmt) {
if (scope != NULL) {
if (scope->NeedsContext()) {
// Load the function object.
- Scope* declaration_scope = scope->DeclarationScope();
+ DeclarationScope* declaration_scope = scope->GetDeclarationScope();
HInstruction* function;
HValue* outer_context = environment()->context();
if (declaration_scope->is_script_scope() ||
@@ -12781,7 +12780,7 @@ HEnvironment::HEnvironment(HEnvironment* outer,
push_count_(0),
ast_id_(BailoutId::None()),
zone_(zone) {
- Scope* declaration_scope = scope->DeclarationScope();
+ DeclarationScope* declaration_scope = scope->GetDeclarationScope();
Initialize(declaration_scope->num_parameters() + 1,
declaration_scope->num_stack_slots(), 0);
}

Powered by Google App Engine
This is Rietveld 408576698