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

Side by Side Diff: runtime/vm/constants_dbc.h

Issue 2194493002: DBC: Fix not-stopping/crashing at fast Smi op breakpoints. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: year Created 4 years, 4 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/tests/vm/vm.status ('k') | runtime/vm/debugger.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 #ifndef VM_CONSTANTS_DBC_H_ 5 #ifndef VM_CONSTANTS_DBC_H_
6 #define VM_CONSTANTS_DBC_H_ 6 #define VM_CONSTANTS_DBC_H_
7 7
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 case Bytecode::kInstanceCall1Opt: 747 case Bytecode::kInstanceCall1Opt:
748 case Bytecode::kInstanceCall2Opt: 748 case Bytecode::kInstanceCall2Opt:
749 case Bytecode::kDebugBreak: 749 case Bytecode::kDebugBreak:
750 return true; 750 return true;
751 751
752 default: 752 default:
753 return false; 753 return false;
754 } 754 }
755 } 755 }
756 756
757 DART_FORCE_INLINE static bool IsFastSmiOpcode(Instr instr) {
758 switch (DecodeOpcode(instr)) {
759 case Bytecode::kAddTOS:
760 case Bytecode::kSubTOS:
761 case Bytecode::kMulTOS:
762 case Bytecode::kBitOrTOS:
763 case Bytecode::kBitAndTOS:
764 case Bytecode::kEqualTOS:
765 case Bytecode::kLessThanTOS:
766 case Bytecode::kGreaterThanTOS:
767 return true;
768
769 default:
770 return false;
771 }
772 }
773
757 DART_FORCE_INLINE static uint8_t DecodeArgc(Instr call) { 774 DART_FORCE_INLINE static uint8_t DecodeArgc(Instr call) {
758 ASSERT(IsCallOpcode(call)); 775 ASSERT(IsCallOpcode(call));
759 return (call >> 8) & 0xFF; 776 return (call >> 8) & 0xFF;
760 } 777 }
761 778
762 static Instr At(uword pc) { return *reinterpret_cast<Instr*>(pc); } 779 static Instr At(uword pc) { return *reinterpret_cast<Instr*>(pc); }
763 780
764 private: 781 private:
765 DISALLOW_ALLOCATION(); 782 DISALLOW_ALLOCATION();
766 DISALLOW_IMPLICIT_CONSTRUCTORS(Bytecode); 783 DISALLOW_IMPLICIT_CONSTRUCTORS(Bytecode);
(...skipping 26 matching lines...) Expand all
793 810
794 // After a comparison, the condition NEXT_IS_TRUE means the following 811 // After a comparison, the condition NEXT_IS_TRUE means the following
795 // instruction is executed if the comparision is true and skipped over overwise. 812 // instruction is executed if the comparision is true and skipped over overwise.
796 // Conidition NEXT_IS_FALSE means the following instruction is executed if the 813 // Conidition NEXT_IS_FALSE means the following instruction is executed if the
797 // comparison is false and skipped over otherwise. 814 // comparison is false and skipped over otherwise.
798 enum Condition { NEXT_IS_TRUE, NEXT_IS_FALSE }; 815 enum Condition { NEXT_IS_TRUE, NEXT_IS_FALSE };
799 816
800 } // namespace dart 817 } // namespace dart
801 818
802 #endif // VM_CONSTANTS_DBC_H_ 819 #endif // VM_CONSTANTS_DBC_H_
OLDNEW
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698