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

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

Issue 11341025: Propagate ICData from unoptimized code to instance calls in optimized code. (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_ia32.h » ('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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 } 458 }
459 // Even if an intrinsified version of the function was successfully 459 // Even if an intrinsified version of the function was successfully
460 // generated, it may fall through to the non-intrinsified method body. 460 // generated, it may fall through to the non-intrinsified method body.
461 if (!FLAG_trace_functions) { 461 if (!FLAG_trace_functions) {
462 return Intrinsifier::Intrinsify(parsed_function().function(), assembler()); 462 return Intrinsifier::Intrinsify(parsed_function().function(), assembler());
463 } 463 }
464 return false; 464 return false;
465 } 465 }
466 466
467 467
468 const ICData& FlowGraphCompiler::GenerateInstanceCall( 468 void FlowGraphCompiler::GenerateInstanceCall(
469 intptr_t deopt_id, 469 intptr_t deopt_id,
470 intptr_t token_pos, 470 intptr_t token_pos,
471 const String& function_name,
472 intptr_t argument_count, 471 intptr_t argument_count,
473 const Array& argument_names, 472 const Array& argument_names,
474 intptr_t checked_argument_count, 473 LocationSummary* locs,
475 LocationSummary* locs) { 474 const ICData& ic_data) {
476 ICData& ic_data = 475 ASSERT(!ic_data.IsNull());
477 ICData::ZoneHandle(ICData::New(parsed_function().function(),
478 function_name,
479 deopt_id,
480 checked_argument_count));
481 const Array& arguments_descriptor = 476 const Array& arguments_descriptor =
482 DartEntry::ArgumentsDescriptor(argument_count, argument_names); 477 DartEntry::ArgumentsDescriptor(argument_count, argument_names);
483 uword label_address = 0; 478 uword label_address = 0;
484 switch (checked_argument_count) { 479 switch (ic_data.num_args_tested()) {
485 case 1: 480 case 1:
486 label_address = StubCode::OneArgCheckInlineCacheEntryPoint(); 481 label_address = StubCode::OneArgCheckInlineCacheEntryPoint();
487 break; 482 break;
488 case 2: 483 case 2:
489 label_address = StubCode::TwoArgsCheckInlineCacheEntryPoint(); 484 label_address = StubCode::TwoArgsCheckInlineCacheEntryPoint();
490 break; 485 break;
491 case 3: 486 case 3:
492 label_address = StubCode::ThreeArgsCheckInlineCacheEntryPoint(); 487 label_address = StubCode::ThreeArgsCheckInlineCacheEntryPoint();
493 break; 488 break;
494 default: 489 default:
495 UNIMPLEMENTED(); 490 UNIMPLEMENTED();
496 } 491 }
497 ExternalLabel target_label("InlineCache", label_address); 492 ExternalLabel target_label("InlineCache", label_address);
498 493
499 EmitInstanceCall(&target_label, ic_data, arguments_descriptor, argument_count, 494 EmitInstanceCall(&target_label, ic_data, arguments_descriptor, argument_count,
500 deopt_id, token_pos, locs); 495 deopt_id, token_pos, locs);
501 return ic_data;
502 } 496 }
503 497
504 498
505 void FlowGraphCompiler::GenerateStaticCall(intptr_t deopt_id, 499 void FlowGraphCompiler::GenerateStaticCall(intptr_t deopt_id,
506 intptr_t token_pos, 500 intptr_t token_pos,
507 const Function& function, 501 const Function& function,
508 intptr_t argument_count, 502 intptr_t argument_count,
509 const Array& argument_names, 503 const Array& argument_names,
510 LocationSummary* locs) { 504 LocationSummary* locs) {
511 const Array& arguments_descriptor = 505 const Array& arguments_descriptor =
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 ASSERT(Utils::IsInt(31, disp)); 913 ASSERT(Utils::IsInt(31, disp));
920 return FieldAddress(array, disp); 914 return FieldAddress(array, disp);
921 } 915 }
922 default: 916 default:
923 UNIMPLEMENTED(); 917 UNIMPLEMENTED();
924 return FieldAddress(SPREG, 0); 918 return FieldAddress(SPREG, 0);
925 } 919 }
926 } 920 }
927 921
928 } // namespace dart 922 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698