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

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

Issue 10860007: Reland "Record the arguments for CreateArrayComp correctly as arguments.". (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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 | runtime/vm/il_printer.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 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 } 1275 }
1276 1276
1277 1277
1278 void EffectGraphVisitor::VisitArgumentListNode(ArgumentListNode* node) { 1278 void EffectGraphVisitor::VisitArgumentListNode(ArgumentListNode* node) {
1279 UNREACHABLE(); 1279 UNREACHABLE();
1280 } 1280 }
1281 1281
1282 1282
1283 void EffectGraphVisitor::VisitArrayNode(ArrayNode* node) { 1283 void EffectGraphVisitor::VisitArrayNode(ArrayNode* node) {
1284 // Translate the array elements and collect their values. 1284 // Translate the array elements and collect their values.
1285 ZoneGrowableArray<Value*>* values = 1285 ZoneGrowableArray<PushArgumentInstr*>* arguments =
1286 new ZoneGrowableArray<Value*>(node->length()); 1286 new ZoneGrowableArray<PushArgumentInstr*>(node->length());
1287 for (int i = 0; i < node->length(); ++i) { 1287 for (int i = 0; i < node->length(); ++i) {
1288 ValueGraphVisitor for_value(owner(), temp_index()); 1288 ValueGraphVisitor for_value(owner(), temp_index());
1289 node->ElementAt(i)->Visit(&for_value); 1289 node->ElementAt(i)->Visit(&for_value);
1290 Append(for_value); 1290 Append(for_value);
1291 PushArgument(for_value.value()); 1291 arguments->Add(PushArgument(for_value.value()));
1292 values->Add(for_value.value());
1293 } 1292 }
1294 Value* element_type = BuildInstantiatedTypeArguments(node->token_pos(), 1293 Value* element_type = BuildInstantiatedTypeArguments(node->token_pos(),
1295 node->type_arguments()); 1294 node->type_arguments());
1296 CreateArrayComp* create = new CreateArrayComp(node->token_pos(), 1295 CreateArrayComp* create = new CreateArrayComp(node->token_pos(),
1297 owner()->try_index(), 1296 owner()->try_index(),
1298 values, 1297 arguments,
1299 element_type); 1298 element_type);
1300 ReturnComputation(create); 1299 ReturnComputation(create);
1301 } 1300 }
1302 1301
1303 1302
1304 void EffectGraphVisitor::VisitClosureNode(ClosureNode* node) { 1303 void EffectGraphVisitor::VisitClosureNode(ClosureNode* node) {
1305 const Function& function = node->function(); 1304 const Function& function = node->function();
1306 1305
1307 Value* receiver = NULL; 1306 Value* receiver = NULL;
1308 if (function.IsNonImplicitClosureFunction()) { 1307 if (function.IsNonImplicitClosureFunction()) {
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
2415 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 2414 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
2416 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 2415 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
2417 OS::SNPrint(chars, len, kFormat, function_name, reason); 2416 OS::SNPrint(chars, len, kFormat, function_name, reason);
2418 const Error& error = Error::Handle( 2417 const Error& error = Error::Handle(
2419 LanguageError::New(String::Handle(String::New(chars)))); 2418 LanguageError::New(String::Handle(String::New(chars))));
2420 Isolate::Current()->long_jump_base()->Jump(1, error); 2419 Isolate::Current()->long_jump_base()->Jump(1, error);
2421 } 2420 }
2422 2421
2423 2422
2424 } // namespace dart 2423 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/il_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698