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

Side by Side Diff: vm/flow_graph_builder.cc

Issue 10831176: Make CreateArrayComp a call by using explicit push-argument instructions. (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.h » ('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 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 1272
1273 1273
1274 void EffectGraphVisitor::VisitArrayNode(ArrayNode* node) { 1274 void EffectGraphVisitor::VisitArrayNode(ArrayNode* node) {
1275 // Translate the array elements and collect their values. 1275 // Translate the array elements and collect their values.
1276 ZoneGrowableArray<Value*>* values = 1276 ZoneGrowableArray<Value*>* values =
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 values->Add(for_value.value()); 1283 values->Add(for_value.value());
1283 } 1284 }
1284 Value* element_type = BuildInstantiatedTypeArguments(node->token_pos(), 1285 Value* element_type = BuildInstantiatedTypeArguments(node->token_pos(),
1285 node->type_arguments()); 1286 node->type_arguments());
1287 PushArgument(element_type);
1286 CreateArrayComp* create = new CreateArrayComp(node->token_pos(), 1288 CreateArrayComp* create = new CreateArrayComp(node->token_pos(),
1287 owner()->try_index(), 1289 owner()->try_index(),
1288 values, 1290 values,
1289 element_type); 1291 element_type);
1290 ReturnComputation(create); 1292 ReturnComputation(create);
1291 } 1293 }
1292 1294
1293 1295
1294 void EffectGraphVisitor::VisitClosureNode(ClosureNode* node) { 1296 void EffectGraphVisitor::VisitClosureNode(ClosureNode* node) {
1295 const Function& function = node->function(); 1297 const Function& function = node->function();
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after
2725 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 2727 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
2726 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 2728 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
2727 OS::SNPrint(chars, len, kFormat, function_name, reason); 2729 OS::SNPrint(chars, len, kFormat, function_name, reason);
2728 const Error& error = Error::Handle( 2730 const Error& error = Error::Handle(
2729 LanguageError::New(String::Handle(String::New(chars)))); 2731 LanguageError::New(String::Handle(String::New(chars))));
2730 Isolate::Current()->long_jump_base()->Jump(1, error); 2732 Isolate::Current()->long_jump_base()->Jump(1, error);
2731 } 2733 }
2732 2734
2733 2735
2734 } // namespace dart 2736 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | vm/intermediate_language.h » ('j') | vm/intermediate_language.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698