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

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

Issue 10407026: Address a few TODOs related to type propagation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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/intermediate_language.h » ('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/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/code_descriptors.h" 9 #include "vm/code_descriptors.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 BindInstr* context = new BindInstr(new CurrentContextComp()); 154 BindInstr* context = new BindInstr(new CurrentContextComp());
155 AddInstruction(context); 155 AddInstruction(context);
156 Value* context_value = new UseVal(context); 156 Value* context_value = new UseVal(context);
157 while (delta-- > 0) { 157 while (delta-- > 0) {
158 BindInstr* load = new BindInstr(new NativeLoadFieldComp( 158 BindInstr* load = new BindInstr(new NativeLoadFieldComp(
159 context_value, Context::parent_offset(), Type::ZoneHandle())); 159 context_value, Context::parent_offset(), Type::ZoneHandle()));
160 AddInstruction(load); 160 AddInstruction(load);
161 context_value = new UseVal(load); 161 context_value = new UseVal(load);
162 } 162 }
163 Computation* store = new NativeStoreFieldComp( 163 Computation* store = new NativeStoreFieldComp(
164 context_value, Context::variable_offset(local.index()), value); 164 context_value,
165 Context::variable_offset(local.index()),
166 value,
167 local.type());
165 return store; 168 return store;
166 } else { 169 } else {
167 return new StoreLocalComp(local, value, owner()->context_level()); 170 return new StoreLocalComp(local, value, owner()->context_level());
168 } 171 }
169 } 172 }
170 173
171 174
172 Computation* EffectGraphVisitor::BuildLoadLocal(const LocalVariable& local) { 175 Computation* EffectGraphVisitor::BuildLoadLocal(const LocalVariable& local) {
173 if (local.is_captured()) { 176 if (local.is_captured()) {
174 intptr_t delta = owner()->context_level() - 177 intptr_t delta = owner()->context_level() -
(...skipping 2134 matching lines...) Expand 10 before | Expand all | Expand 10 after
2309 char* chars = reinterpret_cast<char*>( 2312 char* chars = reinterpret_cast<char*>(
2310 Isolate::Current()->current_zone()->Allocate(len)); 2313 Isolate::Current()->current_zone()->Allocate(len));
2311 OS::SNPrint(chars, len, kFormat, function_name, reason); 2314 OS::SNPrint(chars, len, kFormat, function_name, reason);
2312 const Error& error = Error::Handle( 2315 const Error& error = Error::Handle(
2313 LanguageError::New(String::Handle(String::New(chars)))); 2316 LanguageError::New(String::Handle(String::New(chars))));
2314 Isolate::Current()->long_jump_base()->Jump(1, error); 2317 Isolate::Current()->long_jump_base()->Jump(1, error);
2315 } 2318 }
2316 2319
2317 2320
2318 } // namespace dart 2321 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698