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

Unified Diff: src/hydrogen-instructions.h

Issue 6240012: Optimize calls to object literal properties that are initialized with a funct... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: rebased and fixed lintos Created 9 years, 9 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/hydrogen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
===================================================================
--- src/hydrogen-instructions.h (revision 7281)
+++ src/hydrogen-instructions.h (working copy)
@@ -156,6 +156,7 @@
V(Sub) \
V(Test) \
V(Throw) \
+ V(ToFastProperties) \
V(Typeof) \
V(TypeofIs) \
V(UnaryMathOperation) \
@@ -3382,10 +3383,12 @@
Handle<FixedArray> constant_properties,
bool fast_elements,
int literal_index,
- int depth)
+ int depth,
+ bool has_function)
: HMaterializedLiteral<1>(literal_index, depth),
constant_properties_(constant_properties),
- fast_elements_(fast_elements) {
+ fast_elements_(fast_elements),
+ has_function_(has_function) {
SetOperandAt(0, context);
}
@@ -3394,6 +3397,7 @@
return constant_properties_;
}
bool fast_elements() const { return fast_elements_; }
+ bool has_function() const { return has_function_; }
virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Tagged();
@@ -3404,6 +3408,7 @@
private:
Handle<FixedArray> constant_properties_;
bool fast_elements_;
+ bool has_function_;
};
@@ -3467,6 +3472,24 @@
};
+class HToFastProperties: public HUnaryOperation {
+ public:
+ explicit HToFastProperties(HValue* value) : HUnaryOperation(value) {
+ // This instruction is not marked as having side effects, but
+ // changes the map of the input operand. Use it only when creating
+ // object literals.
+ ASSERT(value->IsObjectLiteral());
+ set_representation(Representation::Tagged());
+ }
+
+ virtual Representation RequiredInputRepresentation(int index) const {
+ return Representation::Tagged();
+ }
+
+ DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to_fast_properties")
+};
+
+
class HValueOf: public HUnaryOperation {
public:
explicit HValueOf(HValue* value) : HUnaryOperation(value) {
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698