| 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 3639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3650 | 3650 |
| 3651 | 3651 |
| 3652 Node* AstGraphBuilder::BuildLoadNativeContextField(int index) { | 3652 Node* AstGraphBuilder::BuildLoadNativeContextField(int index) { |
| 3653 Node* global = BuildLoadGlobalObject(); | 3653 Node* global = BuildLoadGlobalObject(); |
| 3654 Node* native_context = | 3654 Node* native_context = |
| 3655 BuildLoadObjectField(global, JSGlobalObject::kNativeContextOffset); | 3655 BuildLoadObjectField(global, JSGlobalObject::kNativeContextOffset); |
| 3656 return NewNode(javascript()->LoadContext(0, index, true), native_context); | 3656 return NewNode(javascript()->LoadContext(0, index, true), native_context); |
| 3657 } | 3657 } |
| 3658 | 3658 |
| 3659 | 3659 |
| 3660 Node* AstGraphBuilder::BuildLoadGlobalProxy() { | |
| 3661 Node* global = BuildLoadGlobalObject(); | |
| 3662 Node* proxy = | |
| 3663 BuildLoadObjectField(global, JSGlobalObject::kGlobalProxyOffset); | |
| 3664 return proxy; | |
| 3665 } | |
| 3666 | |
| 3667 | |
| 3668 Node* AstGraphBuilder::BuildLoadFeedbackVector() { | 3660 Node* AstGraphBuilder::BuildLoadFeedbackVector() { |
| 3669 if (!feedback_vector_.is_set()) { | 3661 if (!feedback_vector_.is_set()) { |
| 3670 Node* closure = GetFunctionClosure(); | 3662 Node* closure = GetFunctionClosure(); |
| 3671 Node* shared = BuildLoadImmutableObjectField( | 3663 Node* shared = BuildLoadImmutableObjectField( |
| 3672 closure, JSFunction::kSharedFunctionInfoOffset); | 3664 closure, JSFunction::kSharedFunctionInfoOffset); |
| 3673 Node* vector = BuildLoadImmutableObjectField( | 3665 Node* vector = BuildLoadImmutableObjectField( |
| 3674 shared, SharedFunctionInfo::kFeedbackVectorOffset); | 3666 shared, SharedFunctionInfo::kFeedbackVectorOffset); |
| 3675 feedback_vector_.set(vector); | 3667 feedback_vector_.set(vector); |
| 3676 } | 3668 } |
| 3677 return feedback_vector_.get(); | 3669 return feedback_vector_.get(); |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4325 // Phi does not exist yet, introduce one. | 4317 // Phi does not exist yet, introduce one. |
| 4326 value = NewPhi(inputs, value, control); | 4318 value = NewPhi(inputs, value, control); |
| 4327 value->ReplaceInput(inputs - 1, other); | 4319 value->ReplaceInput(inputs - 1, other); |
| 4328 } | 4320 } |
| 4329 return value; | 4321 return value; |
| 4330 } | 4322 } |
| 4331 | 4323 |
| 4332 } // namespace compiler | 4324 } // namespace compiler |
| 4333 } // namespace internal | 4325 } // namespace internal |
| 4334 } // namespace v8 | 4326 } // namespace v8 |
| OLD | NEW |