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

Unified Diff: src/x64/lithium-x64.h

Issue 6250027: Port lithium template classes to ARM.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/lithium-x64.h
===================================================================
--- src/x64/lithium-x64.h (revision 6433)
+++ src/x64/lithium-x64.h (working copy)
@@ -335,32 +335,35 @@
};
-template<typename T, int N>
+template<typename ElementType, int NumElements>
class OperandContainer {
public:
OperandContainer() {
- for (int i = 0; i < N; i++) elems_[i] = NULL;
+ for (int i = 0; i < NumElements; i++) elems_[i] = NULL;
}
- int length() { return N; }
- T& operator[](int i) {
+ int length() { return NumElements; }
+ ElementType& operator[](int i) {
ASSERT(i < length());
return elems_[i];
}
void PrintOperandsTo(StringStream* stream);
private:
- T elems_[N];
+ ElementType elems_[NumElements];
};
-template<typename T>
-class OperandContainer<T, 0> {
+template<typename ElementType>
+class OperandContainer<ElementType, 0> {
public:
int length() { return 0; }
void PrintOperandsTo(StringStream* stream) { }
};
+// R = number of result operands (0 or 1).
+// I = number of input operands.
+// T = number of temporary operands.
template<int R, int I, int T>
class LTemplateInstruction: public LInstruction {
public:
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698