OLD | NEW |
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/linkage.h" | 10 #include "src/compiler/linkage.h" |
(...skipping 3687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3698 Node* AstGraphBuilder::BuildLoadGlobalObject() { | 3698 Node* AstGraphBuilder::BuildLoadGlobalObject() { |
3699 const Operator* load_op = | 3699 const Operator* load_op = |
3700 javascript()->LoadContext(0, Context::GLOBAL_OBJECT_INDEX, true); | 3700 javascript()->LoadContext(0, Context::GLOBAL_OBJECT_INDEX, true); |
3701 return NewNode(load_op, GetFunctionContext()); | 3701 return NewNode(load_op, GetFunctionContext()); |
3702 } | 3702 } |
3703 | 3703 |
3704 | 3704 |
3705 Node* AstGraphBuilder::BuildLoadNativeContextField(int index) { | 3705 Node* AstGraphBuilder::BuildLoadNativeContextField(int index) { |
3706 Node* global = BuildLoadGlobalObject(); | 3706 Node* global = BuildLoadGlobalObject(); |
3707 Node* native_context = | 3707 Node* native_context = |
3708 BuildLoadObjectField(global, GlobalObject::kNativeContextOffset); | 3708 BuildLoadObjectField(global, JSGlobalObject::kNativeContextOffset); |
3709 return NewNode(javascript()->LoadContext(0, index, true), native_context); | 3709 return NewNode(javascript()->LoadContext(0, index, true), native_context); |
3710 } | 3710 } |
3711 | 3711 |
3712 | 3712 |
3713 Node* AstGraphBuilder::BuildLoadGlobalProxy() { | 3713 Node* AstGraphBuilder::BuildLoadGlobalProxy() { |
3714 Node* global = BuildLoadGlobalObject(); | 3714 Node* global = BuildLoadGlobalObject(); |
3715 Node* proxy = | 3715 Node* proxy = |
3716 BuildLoadObjectField(global, JSGlobalObject::kGlobalProxyOffset); | 3716 BuildLoadObjectField(global, JSGlobalObject::kGlobalProxyOffset); |
3717 return proxy; | 3717 return proxy; |
3718 } | 3718 } |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4282 // Phi does not exist yet, introduce one. | 4282 // Phi does not exist yet, introduce one. |
4283 value = NewPhi(inputs, value, control); | 4283 value = NewPhi(inputs, value, control); |
4284 value->ReplaceInput(inputs - 1, other); | 4284 value->ReplaceInput(inputs - 1, other); |
4285 } | 4285 } |
4286 return value; | 4286 return value; |
4287 } | 4287 } |
4288 | 4288 |
4289 } // namespace compiler | 4289 } // namespace compiler |
4290 } // namespace internal | 4290 } // namespace internal |
4291 } // namespace v8 | 4291 } // namespace v8 |
OLD | NEW |