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

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

Issue 10448079: Address review comments in commited cl (issue 10460002). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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
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 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 function.set_context_scope(context_scope); 1319 function.set_context_scope(context_scope);
1320 } 1320 }
1321 } else if (function.IsImplicitInstanceClosureFunction()) { 1321 } else if (function.IsImplicitInstanceClosureFunction()) {
1322 ValueGraphVisitor for_receiver(owner(), temp_index()); 1322 ValueGraphVisitor for_receiver(owner(), temp_index());
1323 node->receiver()->Visit(&for_receiver); 1323 node->receiver()->Visit(&for_receiver);
1324 Append(for_receiver); 1324 Append(for_receiver);
1325 } 1325 }
1326 ASSERT(function.context_scope() != ContextScope::null()); 1326 ASSERT(function.context_scope() != ContextScope::null());
1327 1327
1328 // The function type of a closure may have type arguments. In that case, pass 1328 // The function type of a closure may have type arguments. In that case, pass
1329 // the type arguments of the instantiator. 1329 // the type arguments of the instantiator. Otherwise, pass null object.
1330 const Class& cls = Class::Handle(function.signature_class()); 1330 const Class& cls = Class::Handle(function.signature_class());
1331 ASSERT(!cls.IsNull()); 1331 ASSERT(!cls.IsNull());
1332 const bool requires_type_arguments = cls.HasTypeArguments(); 1332 const bool requires_type_arguments = cls.HasTypeArguments();
1333 Value* type_arguments = NULL; 1333 Value* type_arguments = NULL;
1334 if (requires_type_arguments) { 1334 if (requires_type_arguments) {
1335 ASSERT(!function.IsImplicitStaticClosureFunction()); 1335 ASSERT(!function.IsImplicitStaticClosureFunction());
1336 type_arguments = BuildInstantiatorTypeArguments(node->token_index(), NULL); 1336 type_arguments = BuildInstantiatorTypeArguments(node->token_index(), NULL);
1337 } else {
1338 type_arguments = BuildNullValue();
1337 } 1339 }
1338 1340
1339 CreateClosureComp* create = 1341 CreateClosureComp* create =
1340 new CreateClosureComp(node, owner()->try_index(), type_arguments); 1342 new CreateClosureComp(node, owner()->try_index(), type_arguments);
1341 ReturnComputation(create); 1343 ReturnComputation(create);
1342 } 1344 }
1343 1345
1344 1346
1345 void EffectGraphVisitor::TranslateArgumentList( 1347 void EffectGraphVisitor::TranslateArgumentList(
1346 const ArgumentListNode& node, 1348 const ArgumentListNode& node,
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
2436 char* chars = reinterpret_cast<char*>( 2438 char* chars = reinterpret_cast<char*>(
2437 Isolate::Current()->current_zone()->Allocate(len)); 2439 Isolate::Current()->current_zone()->Allocate(len));
2438 OS::SNPrint(chars, len, kFormat, function_name, reason); 2440 OS::SNPrint(chars, len, kFormat, function_name, reason);
2439 const Error& error = Error::Handle( 2441 const Error& error = Error::Handle(
2440 LanguageError::New(String::Handle(String::New(chars)))); 2442 LanguageError::New(String::Handle(String::New(chars))));
2441 Isolate::Current()->long_jump_base()->Jump(1, error); 2443 Isolate::Current()->long_jump_base()->Jump(1, error);
2442 } 2444 }
2443 2445
2444 2446
2445 } // namespace dart 2447 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698