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 2511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2522 void EffectGraphVisitor::VisitClosureCallNode(ClosureCallNode* node) { | 2522 void EffectGraphVisitor::VisitClosureCallNode(ClosureCallNode* node) { |
2523 BuildClosureCall(node, false); | 2523 BuildClosureCall(node, false); |
2524 } | 2524 } |
2525 | 2525 |
2526 | 2526 |
2527 void ValueGraphVisitor::VisitClosureCallNode(ClosureCallNode* node) { | 2527 void ValueGraphVisitor::VisitClosureCallNode(ClosureCallNode* node) { |
2528 BuildClosureCall(node, true); | 2528 BuildClosureCall(node, true); |
2529 } | 2529 } |
2530 | 2530 |
2531 | 2531 |
| 2532 void EffectGraphVisitor::VisitInitStaticFieldNode(InitStaticFieldNode* node) { |
| 2533 Value* field = Bind(new(I) ConstantInstr(node->field())); |
| 2534 AddInstruction(new(I) InitStaticFieldInstr(field, node->field())); |
| 2535 } |
| 2536 |
| 2537 |
2532 void EffectGraphVisitor::VisitCloneContextNode(CloneContextNode* node) { | 2538 void EffectGraphVisitor::VisitCloneContextNode(CloneContextNode* node) { |
2533 Value* context = Bind(new(I) CurrentContextInstr()); | 2539 Value* context = Bind(new(I) CurrentContextInstr()); |
2534 Value* clone = Bind(new(I) CloneContextInstr(node->token_pos(), context)); | 2540 Value* clone = Bind(new(I) CloneContextInstr(node->token_pos(), context)); |
2535 AddInstruction(new(I) StoreContextInstr(clone)); | 2541 AddInstruction(new(I) StoreContextInstr(clone)); |
2536 } | 2542 } |
2537 | 2543 |
2538 | 2544 |
2539 Value* EffectGraphVisitor::BuildObjectAllocation(ConstructorCallNode* node) { | 2545 Value* EffectGraphVisitor::BuildObjectAllocation(ConstructorCallNode* node) { |
2540 const Class& cls = Class::ZoneHandle(I, node->constructor().Owner()); | 2546 const Class& cls = Class::ZoneHandle(I, node->constructor().Owner()); |
2541 const bool cls_is_parameterized = cls.NumTypeArguments() > 0; | 2547 const bool cls_is_parameterized = cls.NumTypeArguments() > 0; |
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3993 Report::MessageF(Report::kBailout, | 3999 Report::MessageF(Report::kBailout, |
3994 Script::Handle(function.script()), | 4000 Script::Handle(function.script()), |
3995 function.token_pos(), | 4001 function.token_pos(), |
3996 "FlowGraphBuilder Bailout: %s %s", | 4002 "FlowGraphBuilder Bailout: %s %s", |
3997 String::Handle(function.name()).ToCString(), | 4003 String::Handle(function.name()).ToCString(), |
3998 reason); | 4004 reason); |
3999 UNREACHABLE(); | 4005 UNREACHABLE(); |
4000 } | 4006 } |
4001 | 4007 |
4002 } // namespace dart | 4008 } // namespace dart |
OLD | NEW |