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

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

Issue 11339033: Use unary class checks when emitting instance calls in optimized mode. (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/intermediate_language.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/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/debugger.h" 10 #include "vm/debugger.h"
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 469
470 470
471 void FlowGraphCompiler::GenerateInstanceCall( 471 void FlowGraphCompiler::GenerateInstanceCall(
472 intptr_t deopt_id, 472 intptr_t deopt_id,
473 intptr_t token_pos, 473 intptr_t token_pos,
474 intptr_t argument_count, 474 intptr_t argument_count,
475 const Array& argument_names, 475 const Array& argument_names,
476 LocationSummary* locs, 476 LocationSummary* locs,
477 const ICData& ic_data) { 477 const ICData& ic_data) {
478 ASSERT(!ic_data.IsNull()); 478 ASSERT(!ic_data.IsNull());
479 // Because optimized code should not waste time.
480 ASSERT(!is_optimizing() || ic_data.num_args_tested() == 1);
479 const Array& arguments_descriptor = 481 const Array& arguments_descriptor =
480 DartEntry::ArgumentsDescriptor(argument_count, argument_names); 482 DartEntry::ArgumentsDescriptor(argument_count, argument_names);
481 uword label_address = 0; 483 uword label_address = 0;
482 switch (ic_data.num_args_tested()) { 484 switch (ic_data.num_args_tested()) {
483 case 1: 485 case 1:
484 label_address = StubCode::OneArgCheckInlineCacheEntryPoint(); 486 label_address = StubCode::OneArgCheckInlineCacheEntryPoint();
485 break; 487 break;
486 case 2: 488 case 2:
487 label_address = StubCode::TwoArgsCheckInlineCacheEntryPoint(); 489 label_address = StubCode::TwoArgsCheckInlineCacheEntryPoint();
488 break; 490 break;
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 ASSERT(Utils::IsInt(31, disp)); 918 ASSERT(Utils::IsInt(31, disp));
917 return FieldAddress(array, disp); 919 return FieldAddress(array, disp);
918 } 920 }
919 default: 921 default:
920 UNIMPLEMENTED(); 922 UNIMPLEMENTED();
921 return FieldAddress(SPREG, 0); 923 return FieldAddress(SPREG, 0);
922 } 924 }
923 } 925 }
924 926
925 } // namespace dart 927 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698