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

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

Issue 10916078: Remove the is_used_ field from BindInstr. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "vm/ast_printer.h" 7 #include "vm/ast_printer.h"
8 #include "vm/code_descriptors.h" 8 #include "vm/code_descriptors.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 exit()->set_next(other_fragment.entry()); 60 exit()->set_next(other_fragment.entry());
61 exit_ = other_fragment.exit(); 61 exit_ = other_fragment.exit();
62 } 62 }
63 temp_index_ = other_fragment.temp_index(); 63 temp_index_ = other_fragment.temp_index();
64 } 64 }
65 65
66 66
67 Value* EffectGraphVisitor::Bind(Computation* computation) { 67 Value* EffectGraphVisitor::Bind(Computation* computation) {
68 ASSERT(is_open()); 68 ASSERT(is_open());
69 DeallocateTempIndex(computation->InputCount()); 69 DeallocateTempIndex(computation->InputCount());
70 BindInstr* bind_instr = new BindInstr(BindInstr::kUsed, computation); 70 BindInstr* bind_instr = new BindInstr(Definition::kValue, computation);
71 bind_instr->set_temp_index(AllocateTempIndex()); 71 bind_instr->set_temp_index(AllocateTempIndex());
72 if (is_empty()) { 72 if (is_empty()) {
73 entry_ = bind_instr; 73 entry_ = bind_instr;
74 } else { 74 } else {
75 exit()->set_next(bind_instr); 75 exit()->set_next(bind_instr);
76 } 76 }
77 exit_ = bind_instr; 77 exit_ = bind_instr;
78 return new Value(bind_instr); 78 return new Value(bind_instr);
79 } 79 }
80 80
81 81
82 void EffectGraphVisitor::Do(Computation* computation) { 82 void EffectGraphVisitor::Do(Computation* computation) {
83 ASSERT(is_open()); 83 ASSERT(is_open());
84 DeallocateTempIndex(computation->InputCount()); 84 DeallocateTempIndex(computation->InputCount());
85 BindInstr* do_instr = new BindInstr(BindInstr::kUnused, computation); 85 BindInstr* do_instr = new BindInstr(Definition::kEffect, computation);
86 if (is_empty()) { 86 if (is_empty()) {
87 entry_ = do_instr; 87 entry_ = do_instr;
88 } else { 88 } else {
89 exit()->set_next(do_instr); 89 exit()->set_next(do_instr);
90 } 90 }
91 exit_ = do_instr; 91 exit_ = do_instr;
92 } 92 }
93 93
94 94
95 void EffectGraphVisitor::AddInstruction(Instruction* instruction) { 95 void EffectGraphVisitor::AddInstruction(Instruction* instruction) {
(...skipping 2443 matching lines...) Expand 10 before | Expand all | Expand 10 after
2539 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 2539 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
2540 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 2540 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
2541 OS::SNPrint(chars, len, kFormat, function_name, reason); 2541 OS::SNPrint(chars, len, kFormat, function_name, reason);
2542 const Error& error = Error::Handle( 2542 const Error& error = Error::Handle(
2543 LanguageError::New(String::Handle(String::New(chars)))); 2543 LanguageError::New(String::Handle(String::New(chars))));
2544 Isolate::Current()->long_jump_base()->Jump(1, error); 2544 Isolate::Current()->long_jump_base()->Jump(1, error);
2545 } 2545 }
2546 2546
2547 2547
2548 } // namespace dart 2548 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698