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

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

Issue 11642003: Create and cache method extraction stub in the ICData. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: ready for review. Created 8 years 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/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 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 const bool requires_type_arguments = cls.HasTypeArguments(); 1542 const bool requires_type_arguments = cls.HasTypeArguments();
1543 Value* type_arguments = NULL; 1543 Value* type_arguments = NULL;
1544 if (requires_type_arguments) { 1544 if (requires_type_arguments) {
1545 ASSERT(!function.IsImplicitStaticClosureFunction()); 1545 ASSERT(!function.IsImplicitStaticClosureFunction());
1546 type_arguments = BuildInstantiatorTypeArguments(node->token_pos(), NULL); 1546 type_arguments = BuildInstantiatorTypeArguments(node->token_pos(), NULL);
1547 } else { 1547 } else {
1548 type_arguments = BuildNullValue(); 1548 type_arguments = BuildNullValue();
1549 } 1549 }
1550 PushArgumentInstr* push_type_arguments = PushArgument(type_arguments); 1550 PushArgumentInstr* push_type_arguments = PushArgument(type_arguments);
1551 arguments->Add(push_type_arguments); 1551 arguments->Add(push_type_arguments);
1552 ReturnDefinition(new CreateClosureInstr(node, arguments)); 1552 ReturnDefinition(
1553 new CreateClosureInstr(node->function(), arguments, node->token_pos()));
1553 } 1554 }
1554 1555
1555 1556
1556 void EffectGraphVisitor::TranslateArgumentList( 1557 void EffectGraphVisitor::TranslateArgumentList(
1557 const ArgumentListNode& node, 1558 const ArgumentListNode& node,
1558 ZoneGrowableArray<Value*>* values) { 1559 ZoneGrowableArray<Value*>* values) {
1559 for (intptr_t i = 0; i < node.length(); ++i) { 1560 for (intptr_t i = 0; i < node.length(); ++i) {
1560 ValueGraphVisitor for_argument(owner(), temp_index(), loop_depth()); 1561 ValueGraphVisitor for_argument(owner(), temp_index(), loop_depth());
1561 node.NodeAt(i)->Visit(&for_argument); 1562 node.NodeAt(i)->Visit(&for_argument);
1562 Append(for_argument); 1563 Append(for_argument);
(...skipping 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after
2960 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 2961 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
2961 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 2962 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
2962 OS::SNPrint(chars, len, kFormat, function_name, reason); 2963 OS::SNPrint(chars, len, kFormat, function_name, reason);
2963 const Error& error = Error::Handle( 2964 const Error& error = Error::Handle(
2964 LanguageError::New(String::Handle(String::New(chars)))); 2965 LanguageError::New(String::Handle(String::New(chars))));
2965 Isolate::Current()->long_jump_base()->Jump(1, error); 2966 Isolate::Current()->long_jump_base()->Jump(1, error);
2966 } 2967 }
2967 2968
2968 2969
2969 } // namespace dart 2970 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698