Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: runtime/vm/flow_graph_builder.cc

Issue 1722733002: In background compilation make a copy of Field in order to freeze its state (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: e Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/compiler.h" 10 #include "vm/compiler.h"
(...skipping 2752 matching lines...) Expand 10 before | Expand all | Expand 10 after
2763 BuildClosureCall(node, false); 2763 BuildClosureCall(node, false);
2764 } 2764 }
2765 2765
2766 2766
2767 void ValueGraphVisitor::VisitClosureCallNode(ClosureCallNode* node) { 2767 void ValueGraphVisitor::VisitClosureCallNode(ClosureCallNode* node) {
2768 BuildClosureCall(node, true); 2768 BuildClosureCall(node, true);
2769 } 2769 }
2770 2770
2771 2771
2772 void EffectGraphVisitor::VisitInitStaticFieldNode(InitStaticFieldNode* node) { 2772 void EffectGraphVisitor::VisitInitStaticFieldNode(InitStaticFieldNode* node) {
2773 Value* field = Bind(new(Z) ConstantInstr(node->field())); 2773 Value* field = Bind(new(Z) ConstantInstr(*node->field().OriginalAsHandle()));
2774 AddInstruction(new(Z) InitStaticFieldInstr(field, node->field())); 2774 AddInstruction(new(Z) InitStaticFieldInstr(field, node->field()));
2775 } 2775 }
2776 2776
2777 2777
2778 void EffectGraphVisitor::VisitCloneContextNode(CloneContextNode* node) { 2778 void EffectGraphVisitor::VisitCloneContextNode(CloneContextNode* node) {
2779 Value* context = Bind(BuildCurrentContext(node->token_pos())); 2779 Value* context = Bind(BuildCurrentContext(node->token_pos()));
2780 Value* clone = Bind(new(Z) CloneContextInstr(node->token_pos(), context)); 2780 Value* clone = Bind(new(Z) CloneContextInstr(node->token_pos(), context));
2781 Do(BuildStoreContext(clone, node->token_pos())); 2781 Do(BuildStoreContext(clone, node->token_pos()));
2782 } 2782 }
2783 2783
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
3726 void EffectGraphVisitor::VisitLoadStaticFieldNode(LoadStaticFieldNode* node) { 3726 void EffectGraphVisitor::VisitLoadStaticFieldNode(LoadStaticFieldNode* node) {
3727 const TokenPosition token_pos = node->token_pos(); 3727 const TokenPosition token_pos = node->token_pos();
3728 if (node->field().is_const()) { 3728 if (node->field().is_const()) {
3729 ASSERT(node->field().StaticValue() != Object::sentinel().raw()); 3729 ASSERT(node->field().StaticValue() != Object::sentinel().raw());
3730 ASSERT(node->field().StaticValue() != 3730 ASSERT(node->field().StaticValue() !=
3731 Object::transition_sentinel().raw()); 3731 Object::transition_sentinel().raw());
3732 Definition* result = new(Z) ConstantInstr( 3732 Definition* result = new(Z) ConstantInstr(
3733 Instance::ZoneHandle(Z, node->field().StaticValue()), token_pos); 3733 Instance::ZoneHandle(Z, node->field().StaticValue()), token_pos);
3734 return ReturnDefinition(result); 3734 return ReturnDefinition(result);
3735 } 3735 }
3736 Value* field_value = Bind(new(Z) ConstantInstr(node->field(), token_pos)); 3736 Value* field_value = Bind(new(Z) ConstantInstr(
3737 *node->field().OriginalAsHandle(Z), token_pos));
siva 2016/02/25 23:38:32 ditto comment.
srdjan 2016/02/26 00:40:42 Resolved using Field::ZoneHandle
3737 LoadStaticFieldInstr* load = 3738 LoadStaticFieldInstr* load =
3738 new(Z) LoadStaticFieldInstr(field_value, token_pos); 3739 new(Z) LoadStaticFieldInstr(field_value, token_pos);
3739 ReturnDefinition(load); 3740 ReturnDefinition(load);
3740 } 3741 }
3741 3742
3742 3743
3743 Definition* EffectGraphVisitor::BuildStoreStaticField( 3744 Definition* EffectGraphVisitor::BuildStoreStaticField(
3744 StoreStaticFieldNode* node, 3745 StoreStaticFieldNode* node,
3745 bool result_is_needed, 3746 bool result_is_needed,
3746 TokenPosition token_pos) { 3747 TokenPosition token_pos) {
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
4649 Script::Handle(function.script()), 4650 Script::Handle(function.script()),
4650 function.token_pos(), 4651 function.token_pos(),
4651 Report::AtLocation, 4652 Report::AtLocation,
4652 "FlowGraphBuilder Bailout: %s %s", 4653 "FlowGraphBuilder Bailout: %s %s",
4653 String::Handle(function.name()).ToCString(), 4654 String::Handle(function.name()).ToCString(),
4654 reason); 4655 reason);
4655 UNREACHABLE(); 4656 UNREACHABLE();
4656 } 4657 }
4657 4658
4658 } // namespace dart 4659 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698