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

Unified Diff: src/hydrogen-instructions.h

Issue 9572008: Implement date library functions in C++. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 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
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index cee90a9df1f6628852519bd73bd395eeaeecd948..d5dabd478b8b877971693f6127f9cce762b775db 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -185,7 +185,9 @@ class LChunkBuilder;
V(ForInPrepareMap) \
V(ForInCacheArray) \
V(CheckMapValue) \
- V(LoadFieldByIndex)
+ V(LoadFieldByIndex) \
+ V(DateField) \
+ V(SetDateField)
#define GVN_FLAG_LIST(V) \
V(Calls) \
@@ -4629,6 +4631,45 @@ class HValueOf: public HUnaryOperation {
};
+class HDateField: public HUnaryOperation {
+ public:
+ HDateField(HValue* date, int index) : HUnaryOperation(date), index_(index) {
+ set_representation(Representation::Tagged());
+ }
+
+ int index() const { return index_; }
+
+ virtual Representation RequiredInputRepresentation(int index) {
+ return Representation::Tagged();
+ }
+
+ DECLARE_CONCRETE_INSTRUCTION(DateField)
+
+ private:
+ int index_;
+};
+
+
+class HSetDateField: public HBinaryOperation {
+ public:
+ HSetDateField(HValue* context, HValue* date, HValue* value, int index)
+ : HBinaryOperation(context, date, value), index_(index) {
+ set_representation(Representation::Tagged());
+ }
+
+ int index() const { return index_; }
+
+ virtual Representation RequiredInputRepresentation(int index) {
+ return Representation::Tagged();
+ }
+
+ DECLARE_CONCRETE_INSTRUCTION(SetDateField)
+
+ private:
+ int index_;
+};
+
+
class HDeleteProperty: public HBinaryOperation {
public:
HDeleteProperty(HValue* context, HValue* obj, HValue* key)

Powered by Google App Engine
This is Rietveld 408576698