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

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

Issue 14682020: Optimize functions containing try-catch. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: rebased Created 7 years, 7 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
« no previous file with comments | « no previous file | runtime/vm/assembler_x64.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) 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 #ifndef VM_ASSEMBLER_IA32_H_ 5 #ifndef VM_ASSEMBLER_IA32_H_
6 #define VM_ASSEMBLER_IA32_H_ 6 #define VM_ASSEMBLER_IA32_H_
7 7
8 #ifndef VM_ASSEMBLER_H_ 8 #ifndef VM_ASSEMBLER_H_
9 #error Do not include assembler_ia32.h directly; use assembler.h instead. 9 #error Do not include assembler_ia32.h directly; use assembler.h instead.
10 #endif 10 #endif
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 Operand(const Operand& other) : ValueObject(), length_(other.length_) { 74 Operand(const Operand& other) : ValueObject(), length_(other.length_) {
75 memmove(&encoding_[0], &other.encoding_[0], other.length_); 75 memmove(&encoding_[0], &other.encoding_[0], other.length_);
76 } 76 }
77 77
78 Operand& operator=(const Operand& other) { 78 Operand& operator=(const Operand& other) {
79 length_ = other.length_; 79 length_ = other.length_;
80 memmove(&encoding_[0], &other.encoding_[0], other.length_); 80 memmove(&encoding_[0], &other.encoding_[0], other.length_);
81 return *this; 81 return *this;
82 } 82 }
83 83
84 bool Equals(const Operand& other) {
85 if (length_ != other.length_) return false;
86 for (uint8_t i = 0; i < length_; i++) {
87 if (encoding_[i] != other.encoding_[i]) return false;
88 }
89 return true;
90 }
91
84 protected: 92 protected:
85 Operand() : length_(0) { } // Needed by subclass Address. 93 Operand() : length_(0) { } // Needed by subclass Address.
86 94
87 void SetModRM(int mod, Register rm) { 95 void SetModRM(int mod, Register rm) {
88 ASSERT((mod & ~3) == 0); 96 ASSERT((mod & ~3) == 0);
89 encoding_[0] = (mod << 6) | rm; 97 encoding_[0] = (mod << 6) | rm;
90 length_ = 1; 98 length_ = 1;
91 } 99 }
92 100
93 void SetSIB(ScaleFactor scale, Register index, Register base) { 101 void SetSIB(ScaleFactor scale, Register index, Register base) {
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 } 836 }
829 837
830 838
831 inline void Assembler::EmitOperandSizeOverride() { 839 inline void Assembler::EmitOperandSizeOverride() {
832 EmitUint8(0x66); 840 EmitUint8(0x66);
833 } 841 }
834 842
835 } // namespace dart 843 } // namespace dart
836 844
837 #endif // VM_ASSEMBLER_IA32_H_ 845 #endif // VM_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698