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

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

Issue 9117034: New class for Date objects: caches individual date components. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 V(SubI) \ 159 V(SubI) \
160 V(TaggedToI) \ 160 V(TaggedToI) \
161 V(ThisFunction) \ 161 V(ThisFunction) \
162 V(Throw) \ 162 V(Throw) \
163 V(ToFastProperties) \ 163 V(ToFastProperties) \
164 V(TransitionElementsKind) \ 164 V(TransitionElementsKind) \
165 V(Typeof) \ 165 V(Typeof) \
166 V(TypeofIsAndBranch) \ 166 V(TypeofIsAndBranch) \
167 V(UnaryMathOperation) \ 167 V(UnaryMathOperation) \
168 V(UnknownOSRValue) \ 168 V(UnknownOSRValue) \
169 V(ValueOf) 169 V(ValueOf) \
170 V(DateField)
170 171
171 172
172 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 173 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
173 virtual Opcode opcode() const { return LInstruction::k##type; } \ 174 virtual Opcode opcode() const { return LInstruction::k##type; } \
174 virtual void CompileToNative(LCodeGen* generator); \ 175 virtual void CompileToNative(LCodeGen* generator); \
175 virtual const char* Mnemonic() const { return mnemonic; } \ 176 virtual const char* Mnemonic() const { return mnemonic; } \
176 static L##type* cast(LInstruction* instr) { \ 177 static L##type* cast(LInstruction* instr) { \
177 ASSERT(instr->Is##type()); \ 178 ASSERT(instr->Is##type()); \
178 return reinterpret_cast<L##type*>(instr); \ 179 return reinterpret_cast<L##type*>(instr); \
179 } 180 }
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 LValueOf(LOperand* value, LOperand* temp) { 990 LValueOf(LOperand* value, LOperand* temp) {
990 inputs_[0] = value; 991 inputs_[0] = value;
991 temps_[0] = temp; 992 temps_[0] = temp;
992 } 993 }
993 994
994 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") 995 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of")
995 DECLARE_HYDROGEN_ACCESSOR(ValueOf) 996 DECLARE_HYDROGEN_ACCESSOR(ValueOf)
996 }; 997 };
997 998
998 999
1000 class LDateField: public LTemplateInstruction<1, 1, 1> {
1001 public:
1002 LDateField(LOperand* value, LOperand* temp, int index) : index_(index) {
1003 inputs_[0] = value;
1004 temps_[0] = temp;
1005 }
1006
1007 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-field")
1008 DECLARE_HYDROGEN_ACCESSOR(DateField)
1009
1010 int index() const { return index_; }
1011
1012 private:
1013 int index_;
1014 };
1015
1016
999 class LThrow: public LTemplateInstruction<0, 2, 0> { 1017 class LThrow: public LTemplateInstruction<0, 2, 0> {
1000 public: 1018 public:
1001 LThrow(LOperand* context, LOperand* value) { 1019 LThrow(LOperand* context, LOperand* value) {
1002 inputs_[0] = context; 1020 inputs_[0] = context;
1003 inputs_[1] = value; 1021 inputs_[1] = value;
1004 } 1022 }
1005 1023
1006 LOperand* context() { return inputs_[0]; } 1024 LOperand* context() { return inputs_[0]; }
1007 LOperand* value() { return inputs_[1]; } 1025 LOperand* value() { return inputs_[1]; }
1008 1026
(...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after
2388 2406
2389 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2407 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2390 }; 2408 };
2391 2409
2392 #undef DECLARE_HYDROGEN_ACCESSOR 2410 #undef DECLARE_HYDROGEN_ACCESSOR
2393 #undef DECLARE_CONCRETE_INSTRUCTION 2411 #undef DECLARE_CONCRETE_INSTRUCTION
2394 2412
2395 } } // namespace v8::internal 2413 } } // namespace v8::internal
2396 2414
2397 #endif // V8_IA32_LITHIUM_IA32_H_ 2415 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698