OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/flow_graph_builder.h" | 5 #include "vm/flow_graph_builder.h" |
6 | 6 |
7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
8 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
(...skipping 2517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2528 void EffectGraphVisitor::VisitClosureCallNode(ClosureCallNode* node) { | 2528 void EffectGraphVisitor::VisitClosureCallNode(ClosureCallNode* node) { |
2529 BuildClosureCall(node, false); | 2529 BuildClosureCall(node, false); |
2530 } | 2530 } |
2531 | 2531 |
2532 | 2532 |
2533 void ValueGraphVisitor::VisitClosureCallNode(ClosureCallNode* node) { | 2533 void ValueGraphVisitor::VisitClosureCallNode(ClosureCallNode* node) { |
2534 BuildClosureCall(node, true); | 2534 BuildClosureCall(node, true); |
2535 } | 2535 } |
2536 | 2536 |
2537 | 2537 |
| 2538 void EffectGraphVisitor::VisitInitStaticFieldNode(InitStaticFieldNode* node) { |
| 2539 Value* field = Bind(new(I) ConstantInstr(node->field())); |
| 2540 AddInstruction(new(I) InitStaticFieldInstr(field, node->field())); |
| 2541 } |
| 2542 |
| 2543 |
2538 void EffectGraphVisitor::VisitCloneContextNode(CloneContextNode* node) { | 2544 void EffectGraphVisitor::VisitCloneContextNode(CloneContextNode* node) { |
2539 Value* context = Bind(new(I) CurrentContextInstr()); | 2545 Value* context = Bind(new(I) CurrentContextInstr()); |
2540 Value* clone = Bind(new(I) CloneContextInstr(node->token_pos(), context)); | 2546 Value* clone = Bind(new(I) CloneContextInstr(node->token_pos(), context)); |
2541 AddInstruction(new(I) StoreContextInstr(clone)); | 2547 AddInstruction(new(I) StoreContextInstr(clone)); |
2542 } | 2548 } |
2543 | 2549 |
2544 | 2550 |
2545 Value* EffectGraphVisitor::BuildObjectAllocation(ConstructorCallNode* node) { | 2551 Value* EffectGraphVisitor::BuildObjectAllocation(ConstructorCallNode* node) { |
2546 const Class& cls = Class::ZoneHandle(I, node->constructor().Owner()); | 2552 const Class& cls = Class::ZoneHandle(I, node->constructor().Owner()); |
2547 const bool cls_is_parameterized = cls.NumTypeArguments() > 0; | 2553 const bool cls_is_parameterized = cls.NumTypeArguments() > 0; |
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3999 Report::MessageF(Report::kBailout, | 4005 Report::MessageF(Report::kBailout, |
4000 Script::Handle(function.script()), | 4006 Script::Handle(function.script()), |
4001 function.token_pos(), | 4007 function.token_pos(), |
4002 "FlowGraphBuilder Bailout: %s %s", | 4008 "FlowGraphBuilder Bailout: %s %s", |
4003 String::Handle(function.name()).ToCString(), | 4009 String::Handle(function.name()).ToCString(), |
4004 reason); | 4010 reason); |
4005 UNREACHABLE(); | 4011 UNREACHABLE(); |
4006 } | 4012 } |
4007 | 4013 |
4008 } // namespace dart | 4014 } // namespace dart |
OLD | NEW |