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

Side by Side Diff: src/mips/lithium-mips.h

Issue 21173004: Version 3.20.11.1 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 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/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 V(CheckSmi) \ 72 V(CheckSmi) \
73 V(ClampDToUint8) \ 73 V(ClampDToUint8) \
74 V(ClampIToUint8) \ 74 V(ClampIToUint8) \
75 V(ClampTToUint8) \ 75 V(ClampTToUint8) \
76 V(ClassOfTestAndBranch) \ 76 V(ClassOfTestAndBranch) \
77 V(CompareNumericAndBranch) \ 77 V(CompareNumericAndBranch) \
78 V(CmpObjectEqAndBranch) \ 78 V(CmpObjectEqAndBranch) \
79 V(CmpMapAndBranch) \ 79 V(CmpMapAndBranch) \
80 V(CmpT) \ 80 V(CmpT) \
81 V(ConstantD) \ 81 V(ConstantD) \
82 V(ConstantE) \
83 V(ConstantI) \ 82 V(ConstantI) \
84 V(ConstantS) \ 83 V(ConstantS) \
85 V(ConstantT) \ 84 V(ConstantT) \
86 V(Context) \ 85 V(Context) \
87 V(DateField) \ 86 V(DateField) \
88 V(DebugBreak) \ 87 V(DebugBreak) \
89 V(DeclareGlobals) \ 88 V(DeclareGlobals) \
90 V(Deoptimize) \ 89 V(Deoptimize) \
91 V(DivI) \ 90 V(DivI) \
92 V(DoubleToI) \ 91 V(DoubleToI) \
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 258
260 // Interface to the register allocator and iterators. 259 // Interface to the register allocator and iterators.
261 bool ClobbersTemps() const { return is_call_; } 260 bool ClobbersTemps() const { return is_call_; }
262 bool ClobbersRegisters() const { return is_call_; } 261 bool ClobbersRegisters() const { return is_call_; }
263 bool ClobbersDoubleRegisters() const { return is_call_; } 262 bool ClobbersDoubleRegisters() const { return is_call_; }
264 263
265 // Interface to the register allocator and iterators. 264 // Interface to the register allocator and iterators.
266 bool IsMarkedAsCall() const { return is_call_; } 265 bool IsMarkedAsCall() const { return is_call_; }
267 266
268 virtual bool HasResult() const = 0; 267 virtual bool HasResult() const = 0;
269 virtual LOperand* result() const = 0; 268 virtual LOperand* result() = 0;
270 269
271 LOperand* FirstInput() { return InputAt(0); } 270 LOperand* FirstInput() { return InputAt(0); }
272 LOperand* Output() { return HasResult() ? result() : NULL; } 271 LOperand* Output() { return HasResult() ? result() : NULL; }
273 272
274 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; } 273 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; }
275 274
276 #ifdef DEBUG 275 #ifdef DEBUG
277 void VerifyCall(); 276 void VerifyCall();
278 #endif 277 #endif
279 278
(...skipping 15 matching lines...) Expand all
295 294
296 295
297 // R = number of result operands (0 or 1). 296 // R = number of result operands (0 or 1).
298 // I = number of input operands. 297 // I = number of input operands.
299 // T = number of temporary operands. 298 // T = number of temporary operands.
300 template<int R, int I, int T> 299 template<int R, int I, int T>
301 class LTemplateInstruction: public LInstruction { 300 class LTemplateInstruction: public LInstruction {
302 public: 301 public:
303 // Allow 0 or 1 output operands. 302 // Allow 0 or 1 output operands.
304 STATIC_ASSERT(R == 0 || R == 1); 303 STATIC_ASSERT(R == 0 || R == 1);
305 virtual bool HasResult() const { return R != 0 && result() != NULL; } 304 virtual bool HasResult() const { return R != 0; }
306 void set_result(LOperand* operand) { results_[0] = operand; } 305 void set_result(LOperand* operand) { results_[0] = operand; }
307 LOperand* result() const { return results_[0]; } 306 LOperand* result() { return results_[0]; }
308 307
309 protected: 308 protected:
310 EmbeddedContainer<LOperand*, R> results_; 309 EmbeddedContainer<LOperand*, R> results_;
311 EmbeddedContainer<LOperand*, I> inputs_; 310 EmbeddedContainer<LOperand*, I> inputs_;
312 EmbeddedContainer<LOperand*, T> temps_; 311 EmbeddedContainer<LOperand*, T> temps_;
313 312
314 private: 313 private:
315 virtual int InputCount() { return I; } 314 virtual int InputCount() { return I; }
316 virtual LOperand* InputAt(int i) { return inputs_[i]; } 315 virtual LOperand* InputAt(int i) { return inputs_[i]; }
317 316
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 1203
1205 class LConstantD: public LTemplateInstruction<1, 0, 0> { 1204 class LConstantD: public LTemplateInstruction<1, 0, 0> {
1206 public: 1205 public:
1207 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d") 1206 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d")
1208 DECLARE_HYDROGEN_ACCESSOR(Constant) 1207 DECLARE_HYDROGEN_ACCESSOR(Constant)
1209 1208
1210 double value() const { return hydrogen()->DoubleValue(); } 1209 double value() const { return hydrogen()->DoubleValue(); }
1211 }; 1210 };
1212 1211
1213 1212
1214 class LConstantE: public LTemplateInstruction<1, 0, 0> {
1215 public:
1216 DECLARE_CONCRETE_INSTRUCTION(ConstantE, "constant-e")
1217 DECLARE_HYDROGEN_ACCESSOR(Constant)
1218
1219 ExternalReference value() const {
1220 return hydrogen()->ExternalReferenceValue();
1221 }
1222 };
1223
1224
1225 class LConstantT: public LTemplateInstruction<1, 0, 0> { 1213 class LConstantT: public LTemplateInstruction<1, 0, 0> {
1226 public: 1214 public:
1227 DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t") 1215 DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t")
1228 DECLARE_HYDROGEN_ACCESSOR(Constant) 1216 DECLARE_HYDROGEN_ACCESSOR(Constant)
1229 1217
1230 Handle<Object> value() const { return hydrogen()->handle(); } 1218 Handle<Object> value() const { return hydrogen()->handle(); }
1231 }; 1219 };
1232 1220
1233 1221
1234 class LBranch: public LControlInstruction<1, 0> { 1222 class LBranch: public LControlInstruction<1, 0> {
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
2213 2201
2214 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") 2202 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
2215 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) 2203 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
2216 2204
2217 virtual void PrintDataTo(StringStream* stream); 2205 virtual void PrintDataTo(StringStream* stream);
2218 2206
2219 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 2207 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
2220 }; 2208 };
2221 2209
2222 2210
2223 class LTransitionElementsKind: public LTemplateInstruction<0, 1, 1> { 2211 class LTransitionElementsKind: public LTemplateInstruction<0, 1, 2> {
2224 public: 2212 public:
2225 LTransitionElementsKind(LOperand* object, 2213 LTransitionElementsKind(LOperand* object,
2226 LOperand* new_map_temp) { 2214 LOperand* new_map_temp,
2215 LOperand* fixed_object_temp) {
2227 inputs_[0] = object; 2216 inputs_[0] = object;
2228 temps_[0] = new_map_temp; 2217 temps_[0] = new_map_temp;
2218 temps_[1] = fixed_object_temp;
2229 } 2219 }
2230 2220
2231 LOperand* object() { return inputs_[0]; } 2221 LOperand* object() { return inputs_[0]; }
2232 LOperand* new_map_temp() { return temps_[0]; } 2222 LOperand* new_map_temp() { return temps_[0]; }
2223 LOperand* temp() { return temps_[1]; }
2233 2224
2234 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, 2225 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind,
2235 "transition-elements-kind") 2226 "transition-elements-kind")
2236 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) 2227 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
2237 2228
2238 virtual void PrintDataTo(StringStream* stream); 2229 virtual void PrintDataTo(StringStream* stream);
2239 2230
2240 Handle<Map> original_map() { return hydrogen()->original_map(); } 2231 Handle<Map> original_map() { return hydrogen()->original_map(); }
2241 Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); } 2232 Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); }
2242 ElementsKind from_kind() { return hydrogen()->from_kind(); } 2233 ElementsKind from_kind() { return hydrogen()->from_kind(); }
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
2784 2775
2785 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2776 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2786 }; 2777 };
2787 2778
2788 #undef DECLARE_HYDROGEN_ACCESSOR 2779 #undef DECLARE_HYDROGEN_ACCESSOR
2789 #undef DECLARE_CONCRETE_INSTRUCTION 2780 #undef DECLARE_CONCRETE_INSTRUCTION
2790 2781
2791 } } // namespace v8::internal 2782 } } // namespace v8::internal
2792 2783
2793 #endif // V8_MIPS_LITHIUM_MIPS_H_ 2784 #endif // V8_MIPS_LITHIUM_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698