OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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.h" | 5 #include "src/compiler.h" |
6 | 6 |
7 #include "src/compiler/access-builder.h" | 7 #include "src/compiler/access-builder.h" |
8 #include "src/compiler/js-graph.h" | 8 #include "src/compiler/js-graph.h" |
9 #include "src/compiler/js-operator.h" | 9 #include "src/compiler/js-operator.h" |
10 #include "src/compiler/js-type-feedback.h" | 10 #include "src/compiler/js-type-feedback.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 Node* ReturnLoadNamedFromGlobal(const char* string, Node* effect, | 74 Node* ReturnLoadNamedFromGlobal(const char* string, Node* effect, |
75 Node* control) { | 75 Node* control) { |
76 VectorSlotPair feedback(Handle<TypeFeedbackVector>::null(), | 76 VectorSlotPair feedback(Handle<TypeFeedbackVector>::null(), |
77 FeedbackVectorICSlot::Invalid()); | 77 FeedbackVectorICSlot::Invalid()); |
78 Node* global = Parameter(Type::GlobalObject()); | 78 Node* global = Parameter(Type::GlobalObject()); |
79 Node* context = UndefinedConstant(); | 79 Node* context = UndefinedConstant(); |
80 | 80 |
81 Unique<Name> name = Unique<Name>::CreateUninitialized( | 81 Unique<Name> name = Unique<Name>::CreateUninitialized( |
82 isolate()->factory()->NewStringFromAsciiChecked(string)); | 82 isolate()->factory()->NewStringFromAsciiChecked(string)); |
83 Node* load = graph()->NewNode(javascript()->LoadNamed(name, feedback), | 83 const Operator* op = javascript()->LoadNamed(name, feedback); |
84 global, context); | 84 Node* load = graph()->NewNode(op, global, context); |
85 if (FLAG_turbo_deoptimization) { | 85 if (FLAG_turbo_deoptimization) { |
86 load->AppendInput(zone(), EmptyFrameState()); | 86 for (int i = 0; i < OperatorProperties::GetFrameStateInputCount(op); |
| 87 i++) { |
| 88 load->AppendInput(zone(), EmptyFrameState()); |
| 89 } |
87 } | 90 } |
88 load->AppendInput(zone(), effect); | 91 load->AppendInput(zone(), effect); |
89 load->AppendInput(zone(), control); | 92 load->AppendInput(zone(), control); |
90 Node* if_success = graph()->NewNode(common()->IfSuccess(), load); | 93 Node* if_success = graph()->NewNode(common()->IfSuccess(), load); |
91 return graph()->NewNode(common()->Return(), load, load, if_success); | 94 return graph()->NewNode(common()->Return(), load, load, if_success); |
92 } | 95 } |
93 | 96 |
94 CompilationDependencies* dependencies() { return &dependencies_; } | 97 CompilationDependencies* dependencies() { return &dependencies_; } |
95 | 98 |
96 private: | 99 private: |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 dependencies()->Rollback(); | 271 dependencies()->Rollback(); |
269 } else { | 272 } else { |
270 ASSERT_FALSE(r.Changed()); | 273 ASSERT_FALSE(r.Changed()); |
271 EXPECT_TRUE(dependencies()->IsEmpty()); | 274 EXPECT_TRUE(dependencies()->IsEmpty()); |
272 } | 275 } |
273 } | 276 } |
274 } | 277 } |
275 } | 278 } |
276 } | 279 } |
277 } | 280 } |
OLD | NEW |