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

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

Issue 10123011: Finish refactoring done for ia32 for the other platforms. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 8 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-mips.cc ('k') | src/x64/lithium-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 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 209
210 virtual ~LInstruction() { } 210 virtual ~LInstruction() { }
211 211
212 virtual void CompileToNative(LCodeGen* generator) = 0; 212 virtual void CompileToNative(LCodeGen* generator) = 0;
213 virtual const char* Mnemonic() const = 0; 213 virtual const char* Mnemonic() const = 0;
214 virtual void PrintTo(StringStream* stream); 214 virtual void PrintTo(StringStream* stream);
215 virtual void PrintDataTo(StringStream* stream) = 0; 215 virtual void PrintDataTo(StringStream* stream);
216 virtual void PrintOutputOperandTo(StringStream* stream) = 0; 216 virtual void PrintOutputOperandTo(StringStream* stream);
217 217
218 enum Opcode { 218 enum Opcode {
219 // Declare a unique enum value for each instruction. 219 // Declare a unique enum value for each instruction.
220 #define DECLARE_OPCODE(type) k##type, 220 #define DECLARE_OPCODE(type) k##type,
221 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_OPCODE) 221 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_OPCODE)
222 kNumberOfInstructions 222 kNumberOfInstructions
223 #undef DECLARE_OPCODE 223 #undef DECLARE_OPCODE
224 }; 224 };
225 225
226 virtual Opcode opcode() const = 0; 226 virtual Opcode opcode() const = 0;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 virtual bool HasResult() const { return R != 0; } 301 virtual bool HasResult() const { return R != 0; }
302 void set_result(LOperand* operand) { results_[0] = operand; } 302 void set_result(LOperand* operand) { results_[0] = operand; }
303 LOperand* result() { return results_[0]; } 303 LOperand* result() { return results_[0]; }
304 304
305 int InputCount() { return I; } 305 int InputCount() { return I; }
306 LOperand* InputAt(int i) { return inputs_[i]; } 306 LOperand* InputAt(int i) { return inputs_[i]; }
307 307
308 int TempCount() { return T; } 308 int TempCount() { return T; }
309 LOperand* TempAt(int i) { return temps_[i]; } 309 LOperand* TempAt(int i) { return temps_[i]; }
310 310
311 virtual void PrintDataTo(StringStream* stream);
312 virtual void PrintOutputOperandTo(StringStream* stream);
313
314 protected: 311 protected:
315 EmbeddedContainer<LOperand*, R> results_; 312 EmbeddedContainer<LOperand*, R> results_;
316 EmbeddedContainer<LOperand*, I> inputs_; 313 EmbeddedContainer<LOperand*, I> inputs_;
317 EmbeddedContainer<LOperand*, T> temps_; 314 EmbeddedContainer<LOperand*, T> temps_;
318 }; 315 };
319 316
320 317
321 class LGap: public LTemplateInstruction<0, 0, 0> { 318 class LGap: public LTemplateInstruction<0, 0, 0> {
322 public: 319 public:
323 explicit LGap(HBasicBlock* block) 320 explicit LGap(HBasicBlock* block)
(...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after
2385 2382
2386 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2383 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2387 }; 2384 };
2388 2385
2389 #undef DECLARE_HYDROGEN_ACCESSOR 2386 #undef DECLARE_HYDROGEN_ACCESSOR
2390 #undef DECLARE_CONCRETE_INSTRUCTION 2387 #undef DECLARE_CONCRETE_INSTRUCTION
2391 2388
2392 } } // namespace v8::int 2389 } } // namespace v8::int
2393 2390
2394 #endif // V8_X64_LITHIUM_X64_H_ 2391 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698