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

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

Issue 11369230: Enable inlining of functions containing instance-of. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/flow_graph_compiler.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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 Value* instantiator = NULL; 879 Value* instantiator = NULL;
880 Value* instantiator_type_arguments = NULL; 880 Value* instantiator_type_arguments = NULL;
881 if (type.IsInstantiated()) { 881 if (type.IsInstantiated()) {
882 instantiator = BuildNullValue(); 882 instantiator = BuildNullValue();
883 instantiator_type_arguments = BuildNullValue(); 883 instantiator_type_arguments = BuildNullValue();
884 } else { 884 } else {
885 BuildTypecheckArguments(node->token_pos(), 885 BuildTypecheckArguments(node->token_pos(),
886 &instantiator, 886 &instantiator,
887 &instantiator_type_arguments); 887 &instantiator_type_arguments);
888 } 888 }
889 // TODO(zerny): Remove this when issues 5216 and 5217 are fixed.
890 InlineBailout("instance of");
891 InstanceOfInstr* instance_of = 889 InstanceOfInstr* instance_of =
892 new InstanceOfInstr(node->token_pos(), 890 new InstanceOfInstr(node->token_pos(),
893 for_left_value.value(), 891 for_left_value.value(),
894 instantiator, 892 instantiator,
895 instantiator_type_arguments, 893 instantiator_type_arguments,
896 node->right()->AsTypeNode()->type(), 894 node->right()->AsTypeNode()->type(),
897 (node->kind() == Token::kISNOT)); 895 (node->kind() == Token::kISNOT));
898 ReturnDefinition(instance_of); 896 ReturnDefinition(instance_of);
899 } 897 }
900 898
(...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after
2962 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 2960 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
2963 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 2961 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
2964 OS::SNPrint(chars, len, kFormat, function_name, reason); 2962 OS::SNPrint(chars, len, kFormat, function_name, reason);
2965 const Error& error = Error::Handle( 2963 const Error& error = Error::Handle(
2966 LanguageError::New(String::Handle(String::New(chars)))); 2964 LanguageError::New(String::Handle(String::New(chars))));
2967 Isolate::Current()->long_jump_base()->Jump(1, error); 2965 Isolate::Current()->long_jump_base()->Jump(1, error);
2968 } 2966 }
2969 2967
2970 2968
2971 } // namespace dart 2969 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698