| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 const char* string, Node* effect, Node* control, | 81 const char* string, Node* effect, Node* control, |
| 82 JSTypeFeedbackSpecializer::DeoptimizationMode mode) { | 82 JSTypeFeedbackSpecializer::DeoptimizationMode mode) { |
| 83 VectorSlotPair feedback; | 83 VectorSlotPair feedback; |
| 84 Node* global = UndefinedConstant(); | 84 Node* global = UndefinedConstant(); |
| 85 Node* vector = UndefinedConstant(); | 85 Node* vector = UndefinedConstant(); |
| 86 Node* context = UndefinedConstant(); | 86 Node* context = UndefinedConstant(); |
| 87 | 87 |
| 88 Handle<Name> name = isolate()->factory()->InternalizeUtf8String(string); | 88 Handle<Name> name = isolate()->factory()->InternalizeUtf8String(string); |
| 89 const Operator* op = javascript()->LoadGlobal(name, feedback); | 89 const Operator* op = javascript()->LoadGlobal(name, feedback); |
| 90 Node* load = | 90 Node* load = |
| 91 graph()->NewNode(op, context, global, vector, context, | 91 graph()->NewNode(op, global, vector, context, EmptyFrameState(), |
| 92 EmptyFrameState(), EmptyFrameState(), effect, control); | 92 EmptyFrameState(), effect, control); |
| 93 Node* if_success = graph()->NewNode(common()->IfSuccess(), load); | 93 Node* if_success = graph()->NewNode(common()->IfSuccess(), load); |
| 94 return graph()->NewNode(common()->Return(), load, load, if_success); | 94 return graph()->NewNode(common()->Return(), load, load, if_success); |
| 95 } | 95 } |
| 96 | 96 |
| 97 CompilationDependencies* dependencies() { return &dependencies_; } | 97 CompilationDependencies* dependencies() { return &dependencies_; } |
| 98 | 98 |
| 99 private: | 99 private: |
| 100 JSOperatorBuilder javascript_; | 100 JSOperatorBuilder javascript_; |
| 101 CompilationDependencies dependencies_; | 101 CompilationDependencies dependencies_; |
| 102 }; | 102 }; |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 IsReturn(load_field_match, load_field_match, graph()->start())); | 329 IsReturn(load_field_match, load_field_match, graph()->start())); |
| 330 EXPECT_THAT(graph()->end(), IsEnd(ret)); | 330 EXPECT_THAT(graph()->end(), IsEnd(ret)); |
| 331 | 331 |
| 332 EXPECT_FALSE(dependencies()->IsEmpty()); | 332 EXPECT_FALSE(dependencies()->IsEmpty()); |
| 333 dependencies()->Rollback(); | 333 dependencies()->Rollback(); |
| 334 } | 334 } |
| 335 | 335 |
| 336 } // namespace compiler | 336 } // namespace compiler |
| 337 } // namespace internal | 337 } // namespace internal |
| 338 } // namespace v8 | 338 } // namespace v8 |
| OLD | NEW |