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

Side by Side Diff: src/x64/code-stubs-x64.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/x64/assembler-x64.h ('k') | src/x64/code-stubs-x64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 }; 81 };
82 82
83 83
84 class UnaryOpStub: public CodeStub { 84 class UnaryOpStub: public CodeStub {
85 public: 85 public:
86 UnaryOpStub(Token::Value op, 86 UnaryOpStub(Token::Value op,
87 UnaryOverwriteMode mode, 87 UnaryOverwriteMode mode,
88 UnaryOpIC::TypeInfo operand_type = UnaryOpIC::UNINITIALIZED) 88 UnaryOpIC::TypeInfo operand_type = UnaryOpIC::UNINITIALIZED)
89 : op_(op), 89 : op_(op),
90 mode_(mode), 90 mode_(mode),
91 operand_type_(operand_type), 91 operand_type_(operand_type) {
92 name_(NULL) {
93 } 92 }
94 93
95 private: 94 private:
96 Token::Value op_; 95 Token::Value op_;
97 UnaryOverwriteMode mode_; 96 UnaryOverwriteMode mode_;
98 97
99 // Operand type information determined at runtime. 98 // Operand type information determined at runtime.
100 UnaryOpIC::TypeInfo operand_type_; 99 UnaryOpIC::TypeInfo operand_type_;
101 100
102 char* name_; 101 virtual void PrintName(StringStream* stream);
103
104 virtual const char* GetName();
105
106 #ifdef DEBUG
107 void Print() {
108 PrintF("UnaryOpStub %d (op %s), (mode %d, runtime_type_info %s)\n",
109 MinorKey(),
110 Token::String(op_),
111 static_cast<int>(mode_),
112 UnaryOpIC::GetName(operand_type_));
113 }
114 #endif
115 102
116 class ModeBits: public BitField<UnaryOverwriteMode, 0, 1> {}; 103 class ModeBits: public BitField<UnaryOverwriteMode, 0, 1> {};
117 class OpBits: public BitField<Token::Value, 1, 7> {}; 104 class OpBits: public BitField<Token::Value, 1, 7> {};
118 class OperandTypeInfoBits: public BitField<UnaryOpIC::TypeInfo, 8, 3> {}; 105 class OperandTypeInfoBits: public BitField<UnaryOpIC::TypeInfo, 8, 3> {};
119 106
120 Major MajorKey() { return UnaryOp; } 107 Major MajorKey() { return UnaryOp; }
121 int MinorKey() { 108 int MinorKey() {
122 return ModeBits::encode(mode_) 109 return ModeBits::encode(mode_)
123 | OpBits::encode(op_) 110 | OpBits::encode(op_)
124 | OperandTypeInfoBits::encode(operand_type_); 111 | OperandTypeInfoBits::encode(operand_type_);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 151 }
165 }; 152 };
166 153
167 154
168 class BinaryOpStub: public CodeStub { 155 class BinaryOpStub: public CodeStub {
169 public: 156 public:
170 BinaryOpStub(Token::Value op, OverwriteMode mode) 157 BinaryOpStub(Token::Value op, OverwriteMode mode)
171 : op_(op), 158 : op_(op),
172 mode_(mode), 159 mode_(mode),
173 operands_type_(BinaryOpIC::UNINITIALIZED), 160 operands_type_(BinaryOpIC::UNINITIALIZED),
174 result_type_(BinaryOpIC::UNINITIALIZED), 161 result_type_(BinaryOpIC::UNINITIALIZED) {
175 name_(NULL) {
176 ASSERT(OpBits::is_valid(Token::NUM_TOKENS)); 162 ASSERT(OpBits::is_valid(Token::NUM_TOKENS));
177 } 163 }
178 164
179 BinaryOpStub( 165 BinaryOpStub(
180 int key, 166 int key,
181 BinaryOpIC::TypeInfo operands_type, 167 BinaryOpIC::TypeInfo operands_type,
182 BinaryOpIC::TypeInfo result_type = BinaryOpIC::UNINITIALIZED) 168 BinaryOpIC::TypeInfo result_type = BinaryOpIC::UNINITIALIZED)
183 : op_(OpBits::decode(key)), 169 : op_(OpBits::decode(key)),
184 mode_(ModeBits::decode(key)), 170 mode_(ModeBits::decode(key)),
185 operands_type_(operands_type), 171 operands_type_(operands_type),
186 result_type_(result_type), 172 result_type_(result_type) { }
187 name_(NULL) { }
188 173
189 private: 174 private:
190 enum SmiCodeGenerateHeapNumberResults { 175 enum SmiCodeGenerateHeapNumberResults {
191 ALLOW_HEAPNUMBER_RESULTS, 176 ALLOW_HEAPNUMBER_RESULTS,
192 NO_HEAPNUMBER_RESULTS 177 NO_HEAPNUMBER_RESULTS
193 }; 178 };
194 179
195 Token::Value op_; 180 Token::Value op_;
196 OverwriteMode mode_; 181 OverwriteMode mode_;
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 15 bits RRRTTTOOOOOOOMM. 189 // Minor key encoding in 15 bits RRRTTTOOOOOOOMM.
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 OperandTypeInfoBits: public BitField<BinaryOpIC::TypeInfo, 9, 3> {}; 192 class OperandTypeInfoBits: public BitField<BinaryOpIC::TypeInfo, 9, 3> {};
221 class ResultTypeInfoBits: public BitField<BinaryOpIC::TypeInfo, 12, 3> {}; 193 class ResultTypeInfoBits: public BitField<BinaryOpIC::TypeInfo, 12, 3> {};
222 194
223 Major MajorKey() { return BinaryOp; } 195 Major MajorKey() { return BinaryOp; }
224 int MinorKey() { 196 int MinorKey() {
225 return OpBits::encode(op_) 197 return OpBits::encode(op_)
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 RememberedSetAction remembered_set_action_; 707 RememberedSetAction remembered_set_action_;
736 SaveFPRegsMode save_fp_regs_mode_; 708 SaveFPRegsMode save_fp_regs_mode_;
737 Label slow_; 709 Label slow_;
738 RegisterAllocation regs_; 710 RegisterAllocation regs_;
739 }; 711 };
740 712
741 713
742 } } // namespace v8::internal 714 } } // namespace v8::internal
743 715
744 #endif // V8_X64_CODE_STUBS_X64_H_ 716 #endif // V8_X64_CODE_STUBS_X64_H_
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698