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

Side by Side Diff: src/compiler/ast-graph-builder.cc

Issue 1379593002: [turbofan] Pass scope infos as static operator parameters. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-turbofan-verifier
Patch Set: Fix Windows build. Created 5 years, 2 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 | « no previous file | src/compiler/js-generic-lowering.cc » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/ast-loop-assignment-analyzer.h" 8 #include "src/compiler/ast-loop-assignment-analyzer.h"
9 #include "src/compiler/control-builders.h" 9 #include "src/compiler/control-builders.h"
10 #include "src/compiler/js-type-feedback.h" 10 #include "src/compiler/js-type-feedback.h"
(...skipping 3114 matching lines...) Expand 10 before | Expand all | Expand 10 after
3125 } 3125 }
3126 3126
3127 return local_context; 3127 return local_context;
3128 } 3128 }
3129 3129
3130 3130
3131 Node* AstGraphBuilder::BuildLocalScriptContext(Scope* scope) { 3131 Node* AstGraphBuilder::BuildLocalScriptContext(Scope* scope) {
3132 DCHECK(scope->is_script_scope()); 3132 DCHECK(scope->is_script_scope());
3133 3133
3134 // Allocate a new local context. 3134 // Allocate a new local context.
3135 const Operator* op = javascript()->CreateScriptContext(); 3135 Handle<ScopeInfo> scope_info = scope->GetScopeInfo(isolate());
3136 Node* scope_info = jsgraph()->Constant(scope->GetScopeInfo(isolate())); 3136 const Operator* op = javascript()->CreateScriptContext(scope_info);
3137 Node* local_context = NewNode(op, GetFunctionClosure(), scope_info); 3137 Node* local_context = NewNode(op, GetFunctionClosure());
3138 PrepareFrameState(local_context, BailoutId::Prologue()); 3138 PrepareFrameState(local_context, BailoutId::Prologue());
3139 3139
3140 return local_context; 3140 return local_context;
3141 } 3141 }
3142 3142
3143 3143
3144 Node* AstGraphBuilder::BuildLocalBlockContext(Scope* scope) { 3144 Node* AstGraphBuilder::BuildLocalBlockContext(Scope* scope) {
3145 DCHECK(scope->is_block_scope()); 3145 DCHECK(scope->is_block_scope());
3146 3146
3147 // Allocate a new local context. 3147 // Allocate a new local context.
3148 const Operator* op = javascript()->CreateBlockContext(); 3148 Handle<ScopeInfo> scope_info = scope->GetScopeInfo(isolate());
3149 Node* scope_info = jsgraph()->Constant(scope->GetScopeInfo(isolate())); 3149 const Operator* op = javascript()->CreateBlockContext(scope_info);
3150 Node* local_context = NewNode(op, scope_info, GetFunctionClosureForContext()); 3150 Node* local_context = NewNode(op, GetFunctionClosureForContext());
3151 3151
3152 return local_context; 3152 return local_context;
3153 } 3153 }
3154 3154
3155 3155
3156 Node* AstGraphBuilder::BuildArgumentsObject(Variable* arguments) { 3156 Node* AstGraphBuilder::BuildArgumentsObject(Variable* arguments) {
3157 if (arguments == NULL) return NULL; 3157 if (arguments == NULL) return NULL;
3158 3158
3159 // Allocate and initialize a new arguments object. 3159 // Allocate and initialize a new arguments object.
3160 CreateArgumentsParameters::Type type = 3160 CreateArgumentsParameters::Type type =
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
4262 // Phi does not exist yet, introduce one. 4262 // Phi does not exist yet, introduce one.
4263 value = NewPhi(inputs, value, control); 4263 value = NewPhi(inputs, value, control);
4264 value->ReplaceInput(inputs - 1, other); 4264 value->ReplaceInput(inputs - 1, other);
4265 } 4265 }
4266 return value; 4266 return value;
4267 } 4267 }
4268 4268
4269 } // namespace compiler 4269 } // namespace compiler
4270 } // namespace internal 4270 } // namespace internal
4271 } // namespace v8 4271 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698