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

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

Issue 15692005: Fix a bug in optimized ARM code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 // Object.== is same as ===. 520 // Object.== is same as ===.
521 __ cmp(left, ShifterOperand(right)); 521 __ cmp(left, ShifterOperand(right));
522 if (branch != NULL) { 522 if (branch != NULL) {
523 branch->EmitBranchOnCondition(compiler, cond); 523 branch->EmitBranchOnCondition(compiler, cond);
524 } else { 524 } else {
525 Register result = locs->out().reg(); 525 Register result = locs->out().reg();
526 __ LoadObject(result, Bool::True(), cond); 526 __ LoadObject(result, Bool::True(), cond);
527 __ LoadObject(result, Bool::False(), NegateCondition(cond)); 527 __ LoadObject(result, Bool::False(), NegateCondition(cond));
528 } 528 }
529 } else { 529 } else {
530 __ PushList((1 << R0) | (1 << R1));
530 const int kNumberOfArguments = 2; 531 const int kNumberOfArguments = 2;
531 const Array& kNoArgumentNames = Array::Handle(); 532 const Array& kNoArgumentNames = Array::Handle();
532 compiler->GenerateStaticCall(deopt_id, 533 compiler->GenerateStaticCall(deopt_id,
533 token_pos, 534 token_pos,
534 target, 535 target,
535 kNumberOfArguments, 536 kNumberOfArguments,
536 kNoArgumentNames, 537 kNoArgumentNames,
537 locs); 538 locs);
538 if (branch == NULL) { 539 if (branch == NULL) {
539 if (kind == Token::kNE) { 540 if (kind == Token::kNE) {
(...skipping 1983 matching lines...) Expand 10 before | Expand all | Expand 10 after
2523 compiler->GenerateStaticCall(deopt_id(), 2524 compiler->GenerateStaticCall(deopt_id(),
2524 instance_call()->token_pos(), 2525 instance_call()->token_pos(),
2525 target, 2526 target,
2526 instance_call()->ArgumentCount(), 2527 instance_call()->ArgumentCount(),
2527 instance_call()->argument_names(), 2528 instance_call()->argument_names(),
2528 locs()); 2529 locs());
2529 return; 2530 return;
2530 } 2531 }
2531 2532
2532 // Load receiver into R0. 2533 // Load receiver into R0.
2533 __ ldr(R0, Address(SP, (instance_call()->ArgumentCount() - 1) * kWordSize)); 2534 __ LoadFromOffset(kLoadWord, R0, SP,
2535 (instance_call()->ArgumentCount() - 1) * kWordSize);
2534 2536
2535 LoadValueCid(compiler, R2, R0, 2537 LoadValueCid(compiler, R2, R0,
2536 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); 2538 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt);
2537 2539
2538 compiler->EmitTestAndCall(ic_data(), 2540 compiler->EmitTestAndCall(ic_data(),
2539 R2, // Class id register. 2541 R2, // Class id register.
2540 instance_call()->ArgumentCount(), 2542 instance_call()->ArgumentCount(),
2541 instance_call()->argument_names(), 2543 instance_call()->argument_names(),
2542 deopt, 2544 deopt,
2543 deopt_id(), 2545 deopt_id(),
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
3004 compiler->GenerateCall(token_pos(), 3006 compiler->GenerateCall(token_pos(),
3005 &label, 3007 &label,
3006 PcDescriptors::kOther, 3008 PcDescriptors::kOther,
3007 locs()); 3009 locs());
3008 __ Drop(2); // Discard type arguments and receiver. 3010 __ Drop(2); // Discard type arguments and receiver.
3009 } 3011 }
3010 3012
3011 } // namespace dart 3013 } // namespace dart
3012 3014
3013 #endif // defined TARGET_ARCH_ARM 3015 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698