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

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

Issue 2914483002: Revert "Fix misoptimization of 'is' test" (Closed)
Patch Set: Created 3 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
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_dbc.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 __ b(result ? labels.true_label : labels.false_label, EQ); 675 __ b(result ? labels.true_label : labels.false_label, EQ);
676 __ LoadClassId(cid_reg, val_reg); 676 __ LoadClassId(cid_reg, val_reg);
677 677
678 for (intptr_t i = 2; i < data.length(); i += 2) { 678 for (intptr_t i = 2; i < data.length(); i += 2) {
679 const intptr_t test_cid = data[i]; 679 const intptr_t test_cid = data[i];
680 ASSERT(test_cid != kSmiCid); 680 ASSERT(test_cid != kSmiCid);
681 result = data[i + 1] == true_result; 681 result = data[i + 1] == true_result;
682 __ CompareImmediate(cid_reg, test_cid); 682 __ CompareImmediate(cid_reg, test_cid);
683 __ b(result ? labels.true_label : labels.false_label, EQ); 683 __ b(result ? labels.true_label : labels.false_label, EQ);
684 } 684 }
685 // No match found, deoptimize or default action. 685 // No match found, deoptimize or false.
686 if (deopt == NULL) { 686 if (deopt == NULL) {
687 // If the cid is not in the list, jump to the opposite label from the cids
688 // that are in the list. These must be all the same (see asserts in the
689 // constructor).
690 Label* target = result ? labels.false_label : labels.true_label; 687 Label* target = result ? labels.false_label : labels.true_label;
691 if (target != labels.fall_through) { 688 if (target != labels.fall_through) {
692 __ b(target); 689 __ b(target);
693 } 690 }
694 } else { 691 } else {
695 __ b(deopt); 692 __ b(deopt);
696 } 693 }
697 // Dummy result as the last instruction is a jump, any conditional 694 // Dummy result as the last instruction is a jump, any conditional
698 // branch using the result will therefore be skipped. 695 // branch using the result will therefore be skipped.
699 return EQ; 696 return EQ;
(...skipping 5380 matching lines...) Expand 10 before | Expand all | Expand 10 after
6080 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), 6077 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(),
6081 kGrowRegExpStackRuntimeEntry, 1, locs()); 6078 kGrowRegExpStackRuntimeEntry, 1, locs());
6082 __ Drop(1); 6079 __ Drop(1);
6083 __ Pop(result); 6080 __ Pop(result);
6084 } 6081 }
6085 6082
6086 6083
6087 } // namespace dart 6084 } // namespace dart
6088 6085
6089 #endif // defined TARGET_ARCH_ARM64 6086 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698