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

Side by Side Diff: vm/flow_graph_builder.cc

Issue 10831178: Refactor Instruction classes to use a template base class. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 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 | vm/intermediate_language.h » ('j') | vm/intermediate_language_ia32.cc » ('J')
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 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 new ZoneGrowableArray<Value*>(node->length()); 1277 new ZoneGrowableArray<Value*>(node->length());
1278 for (int i = 0; i < node->length(); ++i) { 1278 for (int i = 0; i < node->length(); ++i) {
1279 ValueGraphVisitor for_value(owner(), temp_index()); 1279 ValueGraphVisitor for_value(owner(), temp_index());
1280 node->ElementAt(i)->Visit(&for_value); 1280 node->ElementAt(i)->Visit(&for_value);
1281 Append(for_value); 1281 Append(for_value);
1282 PushArgument(for_value.value()); 1282 PushArgument(for_value.value());
1283 values->Add(for_value.value()); 1283 values->Add(for_value.value());
1284 } 1284 }
1285 Value* element_type = BuildInstantiatedTypeArguments(node->token_pos(), 1285 Value* element_type = BuildInstantiatedTypeArguments(node->token_pos(),
1286 node->type_arguments()); 1286 node->type_arguments());
1287 PushArgument(element_type);
1288 CreateArrayComp* create = new CreateArrayComp(node->token_pos(), 1287 CreateArrayComp* create = new CreateArrayComp(node->token_pos(),
1289 owner()->try_index(), 1288 owner()->try_index(),
1290 values, 1289 values,
1291 element_type); 1290 element_type);
1292 ReturnComputation(create); 1291 ReturnComputation(create);
1293 } 1292 }
1294 1293
1295 1294
1296 void EffectGraphVisitor::VisitClosureNode(ClosureNode* node) { 1295 void EffectGraphVisitor::VisitClosureNode(ClosureNode* node) {
1297 const Function& function = node->function(); 1296 const Function& function = node->function();
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after
2735 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 2734 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
2736 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 2735 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
2737 OS::SNPrint(chars, len, kFormat, function_name, reason); 2736 OS::SNPrint(chars, len, kFormat, function_name, reason);
2738 const Error& error = Error::Handle( 2737 const Error& error = Error::Handle(
2739 LanguageError::New(String::Handle(String::New(chars)))); 2738 LanguageError::New(String::Handle(String::New(chars))));
2740 Isolate::Current()->long_jump_base()->Jump(1, error); 2739 Isolate::Current()->long_jump_base()->Jump(1, error);
2741 } 2740 }
2742 2741
2743 2742
2744 } // namespace dart 2743 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | vm/intermediate_language.h » ('j') | vm/intermediate_language_ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698