| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 Node* ReturnLoadNamedFromGlobal( | 77 Node* ReturnLoadNamedFromGlobal( |
| 78 const char* string, Node* effect, Node* control, | 78 const char* string, Node* effect, Node* control, |
| 79 JSTypeFeedbackSpecializer::DeoptimizationMode mode) { | 79 JSTypeFeedbackSpecializer::DeoptimizationMode mode) { |
| 80 ResolvedFeedbackSlot feedback; | 80 ResolvedFeedbackSlot feedback; |
| 81 Node* global = Parameter(Type::GlobalObject()); | 81 Node* global = Parameter(Type::GlobalObject()); |
| 82 Node* vector = UndefinedConstant(); | 82 Node* vector = UndefinedConstant(); |
| 83 Node* context = UndefinedConstant(); | 83 Node* context = UndefinedConstant(); |
| 84 | 84 |
| 85 Unique<Name> name = Unique<Name>::CreateUninitialized( | 85 Unique<Name> name = Unique<Name>::CreateUninitialized( |
| 86 isolate()->factory()->InternalizeUtf8String(string)); | 86 isolate()->factory()->InternalizeUtf8String(string)); |
| 87 const Operator* op = javascript()->LoadNamed(name, feedback, SLOPPY); | 87 const Operator* op = javascript()->LoadNamed(name, feedback); |
| 88 Node* load = graph()->NewNode(op, global, vector, context); | 88 Node* load = graph()->NewNode(op, global, vector, context); |
| 89 if (mode == JSTypeFeedbackSpecializer::kDeoptimizationEnabled) { | 89 if (mode == JSTypeFeedbackSpecializer::kDeoptimizationEnabled) { |
| 90 for (int i = 0; i < OperatorProperties::GetFrameStateInputCount(op); | 90 for (int i = 0; i < OperatorProperties::GetFrameStateInputCount(op); |
| 91 i++) { | 91 i++) { |
| 92 load->AppendInput(zone(), EmptyFrameState()); | 92 load->AppendInput(zone(), EmptyFrameState()); |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 load->AppendInput(zone(), effect); | 95 load->AppendInput(zone(), effect); |
| 96 load->AppendInput(zone(), control); | 96 load->AppendInput(zone(), control); |
| 97 Node* if_success = graph()->NewNode(common()->IfSuccess(), load); | 97 Node* if_success = graph()->NewNode(common()->IfSuccess(), load); |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 IsReturn(load_field_match, load_field_match, graph()->start())); | 335 IsReturn(load_field_match, load_field_match, graph()->start())); |
| 336 EXPECT_THAT(graph()->end(), IsEnd(ret)); | 336 EXPECT_THAT(graph()->end(), IsEnd(ret)); |
| 337 | 337 |
| 338 EXPECT_FALSE(dependencies()->IsEmpty()); | 338 EXPECT_FALSE(dependencies()->IsEmpty()); |
| 339 dependencies()->Rollback(); | 339 dependencies()->Rollback(); |
| 340 } | 340 } |
| 341 | 341 |
| 342 } // namespace compiler | 342 } // namespace compiler |
| 343 } // namespace internal | 343 } // namespace internal |
| 344 } // namespace v8 | 344 } // namespace v8 |
| OLD | NEW |