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

Side by Side Diff: src/ia32/code-stubs-ia32.h

Issue 7535004: Merge bleeding edge up to 8774 into the GC branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/code-stubs-ia32.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 }; 75 };
76 76
77 77
78 class UnaryOpStub: public CodeStub { 78 class UnaryOpStub: public CodeStub {
79 public: 79 public:
80 UnaryOpStub(Token::Value op, 80 UnaryOpStub(Token::Value op,
81 UnaryOverwriteMode mode, 81 UnaryOverwriteMode mode,
82 UnaryOpIC::TypeInfo operand_type = UnaryOpIC::UNINITIALIZED) 82 UnaryOpIC::TypeInfo operand_type = UnaryOpIC::UNINITIALIZED)
83 : op_(op), 83 : op_(op),
84 mode_(mode), 84 mode_(mode),
85 operand_type_(operand_type), 85 operand_type_(operand_type) {
86 name_(NULL) {
87 } 86 }
88 87
89 private: 88 private:
90 Token::Value op_; 89 Token::Value op_;
91 UnaryOverwriteMode mode_; 90 UnaryOverwriteMode mode_;
92 91
93 // Operand type information determined at runtime. 92 // Operand type information determined at runtime.
94 UnaryOpIC::TypeInfo operand_type_; 93 UnaryOpIC::TypeInfo operand_type_;
95 94
96 char* name_; 95 virtual void PrintName(StringStream* stream);
97
98 virtual const char* GetName();
99
100 #ifdef DEBUG
101 void Print() {
102 PrintF("UnaryOpStub %d (op %s), (mode %d, runtime_type_info %s)\n",
103 MinorKey(),
104 Token::String(op_),
105 static_cast<int>(mode_),
106 UnaryOpIC::GetName(operand_type_));
107 }
108 #endif
109 96
110 class ModeBits: public BitField<UnaryOverwriteMode, 0, 1> {}; 97 class ModeBits: public BitField<UnaryOverwriteMode, 0, 1> {};
111 class OpBits: public BitField<Token::Value, 1, 7> {}; 98 class OpBits: public BitField<Token::Value, 1, 7> {};
112 class OperandTypeInfoBits: public BitField<UnaryOpIC::TypeInfo, 8, 3> {}; 99 class OperandTypeInfoBits: public BitField<UnaryOpIC::TypeInfo, 8, 3> {};
113 100
114 Major MajorKey() { return UnaryOp; } 101 Major MajorKey() { return UnaryOp; }
115 int MinorKey() { 102 int MinorKey() {
116 return ModeBits::encode(mode_) 103 return ModeBits::encode(mode_)
117 | OpBits::encode(op_) 104 | OpBits::encode(op_)
118 | OperandTypeInfoBits::encode(operand_type_); 105 | OperandTypeInfoBits::encode(operand_type_);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 148 }
162 }; 149 };
163 150
164 151
165 class BinaryOpStub: public CodeStub { 152 class BinaryOpStub: public CodeStub {
166 public: 153 public:
167 BinaryOpStub(Token::Value op, OverwriteMode mode) 154 BinaryOpStub(Token::Value op, OverwriteMode mode)
168 : op_(op), 155 : op_(op),
169 mode_(mode), 156 mode_(mode),
170 operands_type_(BinaryOpIC::UNINITIALIZED), 157 operands_type_(BinaryOpIC::UNINITIALIZED),
171 result_type_(BinaryOpIC::UNINITIALIZED), 158 result_type_(BinaryOpIC::UNINITIALIZED) {
172 name_(NULL) {
173 use_sse3_ = CpuFeatures::IsSupported(SSE3); 159 use_sse3_ = CpuFeatures::IsSupported(SSE3);
174 ASSERT(OpBits::is_valid(Token::NUM_TOKENS)); 160 ASSERT(OpBits::is_valid(Token::NUM_TOKENS));
175 } 161 }
176 162
177 BinaryOpStub( 163 BinaryOpStub(
178 int key, 164 int key,
179 BinaryOpIC::TypeInfo operands_type, 165 BinaryOpIC::TypeInfo operands_type,
180 BinaryOpIC::TypeInfo result_type = BinaryOpIC::UNINITIALIZED) 166 BinaryOpIC::TypeInfo result_type = BinaryOpIC::UNINITIALIZED)
181 : op_(OpBits::decode(key)), 167 : op_(OpBits::decode(key)),
182 mode_(ModeBits::decode(key)), 168 mode_(ModeBits::decode(key)),
183 use_sse3_(SSE3Bits::decode(key)), 169 use_sse3_(SSE3Bits::decode(key)),
184 operands_type_(operands_type), 170 operands_type_(operands_type),
185 result_type_(result_type), 171 result_type_(result_type) { }
186 name_(NULL) { }
187 172
188 private: 173 private:
189 enum SmiCodeGenerateHeapNumberResults { 174 enum SmiCodeGenerateHeapNumberResults {
190 ALLOW_HEAPNUMBER_RESULTS, 175 ALLOW_HEAPNUMBER_RESULTS,
191 NO_HEAPNUMBER_RESULTS 176 NO_HEAPNUMBER_RESULTS
192 }; 177 };
193 178
194 Token::Value op_; 179 Token::Value op_;
195 OverwriteMode mode_; 180 OverwriteMode mode_;
196 bool use_sse3_; 181 bool use_sse3_;
197 182
198 // Operand type information determined at runtime. 183 // Operand type information determined at runtime.
199 BinaryOpIC::TypeInfo operands_type_; 184 BinaryOpIC::TypeInfo operands_type_;
200 BinaryOpIC::TypeInfo result_type_; 185 BinaryOpIC::TypeInfo result_type_;
201 186
202 char* name_; 187 virtual void PrintName(StringStream* stream);
203
204 virtual const char* GetName();
205
206 #ifdef DEBUG
207 void Print() {
208 PrintF("BinaryOpStub %d (op %s), "
209 "(mode %d, runtime_type_info %s)\n",
210 MinorKey(),
211 Token::String(op_),
212 static_cast<int>(mode_),
213 BinaryOpIC::GetName(operands_type_));
214 }
215 #endif
216 188
217 // Minor key encoding in 16 bits RRRTTTSOOOOOOOMM. 189 // Minor key encoding in 16 bits RRRTTTSOOOOOOOMM.
218 class ModeBits: public BitField<OverwriteMode, 0, 2> {}; 190 class ModeBits: public BitField<OverwriteMode, 0, 2> {};
219 class OpBits: public BitField<Token::Value, 2, 7> {}; 191 class OpBits: public BitField<Token::Value, 2, 7> {};
220 class SSE3Bits: public BitField<bool, 9, 1> {}; 192 class SSE3Bits: public BitField<bool, 9, 1> {};
221 class OperandTypeInfoBits: public BitField<BinaryOpIC::TypeInfo, 10, 3> {}; 193 class OperandTypeInfoBits: public BitField<BinaryOpIC::TypeInfo, 10, 3> {};
222 class ResultTypeInfoBits: public BitField<BinaryOpIC::TypeInfo, 13, 3> {}; 194 class ResultTypeInfoBits: public BitField<BinaryOpIC::TypeInfo, 13, 3> {};
223 195
224 Major MajorKey() { return BinaryOp; } 196 Major MajorKey() { return BinaryOp; }
225 int MinorKey() { 197 int MinorKey() {
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 Register scratch1, 765 Register scratch1,
794 bool load_elements_from_receiver, 766 bool load_elements_from_receiver,
795 Label* key_not_smi, 767 Label* key_not_smi,
796 Label* value_not_smi, 768 Label* value_not_smi,
797 Label* not_pixel_array, 769 Label* not_pixel_array,
798 Label* out_of_range); 770 Label* out_of_range);
799 771
800 } } // namespace v8::internal 772 } } // namespace v8::internal
801 773
802 #endif // V8_IA32_CODE_STUBS_IA32_H_ 774 #endif // V8_IA32_CODE_STUBS_IA32_H_
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698