OLD | NEW |
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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 LInstruction() | 204 LInstruction() |
205 : environment_(NULL), | 205 : environment_(NULL), |
206 hydrogen_value_(NULL), | 206 hydrogen_value_(NULL), |
207 is_call_(false), | 207 is_call_(false), |
208 is_save_doubles_(false) { } | 208 is_save_doubles_(false) { } |
209 virtual ~LInstruction() { } | 209 virtual ~LInstruction() { } |
210 | 210 |
211 virtual void CompileToNative(LCodeGen* generator) = 0; | 211 virtual void CompileToNative(LCodeGen* generator) = 0; |
212 virtual const char* Mnemonic() const = 0; | 212 virtual const char* Mnemonic() const = 0; |
213 virtual void PrintTo(StringStream* stream); | 213 virtual void PrintTo(StringStream* stream); |
214 virtual void PrintDataTo(StringStream* stream) = 0; | 214 virtual void PrintDataTo(StringStream* stream); |
215 virtual void PrintOutputOperandTo(StringStream* stream) = 0; | 215 virtual void PrintOutputOperandTo(StringStream* stream); |
216 | 216 |
217 enum Opcode { | 217 enum Opcode { |
218 // Declare a unique enum value for each instruction. | 218 // Declare a unique enum value for each instruction. |
219 #define DECLARE_OPCODE(type) k##type, | 219 #define DECLARE_OPCODE(type) k##type, |
220 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_OPCODE) | 220 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_OPCODE) |
221 kNumberOfInstructions | 221 kNumberOfInstructions |
222 #undef DECLARE_OPCODE | 222 #undef DECLARE_OPCODE |
223 }; | 223 }; |
224 | 224 |
225 virtual Opcode opcode() const = 0; | 225 virtual Opcode opcode() const = 0; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 virtual bool HasResult() const { return R != 0; } | 300 virtual bool HasResult() const { return R != 0; } |
301 void set_result(LOperand* operand) { results_[0] = operand; } | 301 void set_result(LOperand* operand) { results_[0] = operand; } |
302 LOperand* result() { return results_[0]; } | 302 LOperand* result() { return results_[0]; } |
303 | 303 |
304 int InputCount() { return I; } | 304 int InputCount() { return I; } |
305 LOperand* InputAt(int i) { return inputs_[i]; } | 305 LOperand* InputAt(int i) { return inputs_[i]; } |
306 | 306 |
307 int TempCount() { return T; } | 307 int TempCount() { return T; } |
308 LOperand* TempAt(int i) { return temps_[i]; } | 308 LOperand* TempAt(int i) { return temps_[i]; } |
309 | 309 |
310 virtual void PrintDataTo(StringStream* stream); | |
311 virtual void PrintOutputOperandTo(StringStream* stream); | |
312 | |
313 protected: | 310 protected: |
314 EmbeddedContainer<LOperand*, R> results_; | 311 EmbeddedContainer<LOperand*, R> results_; |
315 EmbeddedContainer<LOperand*, I> inputs_; | 312 EmbeddedContainer<LOperand*, I> inputs_; |
316 EmbeddedContainer<LOperand*, T> temps_; | 313 EmbeddedContainer<LOperand*, T> temps_; |
317 }; | 314 }; |
318 | 315 |
319 | 316 |
320 class LGap: public LTemplateInstruction<0, 0, 0> { | 317 class LGap: public LTemplateInstruction<0, 0, 0> { |
321 public: | 318 public: |
322 explicit LGap(HBasicBlock* block) | 319 explicit LGap(HBasicBlock* block) |
(...skipping 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2419 | 2416 |
2420 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2417 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2421 }; | 2418 }; |
2422 | 2419 |
2423 #undef DECLARE_HYDROGEN_ACCESSOR | 2420 #undef DECLARE_HYDROGEN_ACCESSOR |
2424 #undef DECLARE_CONCRETE_INSTRUCTION | 2421 #undef DECLARE_CONCRETE_INSTRUCTION |
2425 | 2422 |
2426 } } // namespace v8::internal | 2423 } } // namespace v8::internal |
2427 | 2424 |
2428 #endif // V8_ARM_LITHIUM_ARM_H_ | 2425 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |