Index: src/full-codegen.h |
diff --git a/src/full-codegen.h b/src/full-codegen.h |
index ff3faa88c56a5da565fd840717b063a9a82b45ac..01ac135e4b3bdedc9fb79526af2214b72643035e 100644 |
--- a/src/full-codegen.h |
+++ b/src/full-codegen.h |
@@ -591,26 +591,6 @@ class FullCodeGenerator: public AstVisitor { |
void EmitLoadJSRuntimeFunction(CallRuntime* expr); |
void EmitCallJSRuntimeFunction(CallRuntime* expr); |
- // Platform-specific support for compiling assignments. |
- |
- // Left-hand side can only be a property, a global or a (parameter or local) |
- // slot. |
- enum LhsKind { |
- VARIABLE, |
- NAMED_PROPERTY, |
- KEYED_PROPERTY, |
- NAMED_SUPER_PROPERTY, |
- KEYED_SUPER_PROPERTY |
- }; |
- |
- static LhsKind GetAssignType(Property* property) { |
- if (property == NULL) return VARIABLE; |
- bool super_access = property->IsSuperAccess(); |
- return (property->key()->IsPropertyName()) |
- ? (super_access ? NAMED_SUPER_PROPERTY : NAMED_PROPERTY) |
- : (super_access ? KEYED_SUPER_PROPERTY : KEYED_PROPERTY); |
- } |
- |
// Load a value from a named property. |
// The receiver is left on the stack by the IC. |
void EmitNamedPropertyLoad(Property* expr); |
@@ -647,13 +627,16 @@ class FullCodeGenerator: public AstVisitor { |
Expression* right); |
// Assign to the given expression as if via '='. The right-hand-side value |
- // is expected in the accumulator. |
- void EmitAssignment(Expression* expr); |
+ // is expected in the accumulator. slot is only used if FLAG_vector_stores |
+ // is true. |
+ void EmitAssignment(Expression* expr, FeedbackVectorICSlot slot = |
+ FeedbackVectorICSlot::Invalid()); |
// Complete a variable assignment. The right-hand-side value is expected |
// in the accumulator. |
- void EmitVariableAssignment(Variable* var, |
- Token::Value op); |
+ void EmitVariableAssignment( |
+ Variable* var, Token::Value op, |
+ FeedbackVectorICSlot slot = FeedbackVectorICSlot::Invalid()); |
// Helper functions to EmitVariableAssignment |
void EmitStoreToStackLocalOrContextSlot(Variable* var, |
@@ -685,10 +668,14 @@ class FullCodeGenerator: public AstVisitor { |
// Adds the [[HomeObject]] to |initializer| if it is a FunctionLiteral. |
// The value of the initializer is expected to be at the top of the stack. |
// |offset| is the offset in the stack where the home object can be found. |
- void EmitSetHomeObjectIfNeeded(Expression* initializer, int offset); |
+ void EmitSetHomeObjectIfNeeded( |
+ Expression* initializer, int offset, |
+ FeedbackVectorICSlot slot = FeedbackVectorICSlot::Invalid()); |
void EmitLoadSuperConstructor(); |
- void EmitInitializeThisAfterSuper(SuperReference* super_ref); |
+ void EmitInitializeThisAfterSuper( |
+ SuperReference* super_ref, |
+ FeedbackVectorICSlot slot = FeedbackVectorICSlot::Invalid()); |
void CallIC(Handle<Code> code, |
TypeFeedbackId id = TypeFeedbackId::None()); |
@@ -766,6 +753,8 @@ class FullCodeGenerator: public AstVisitor { |
bool MustCreateObjectLiteralWithRuntime(ObjectLiteral* expr) const; |
bool MustCreateArrayLiteralWithRuntime(ArrayLiteral* expr) const; |
+ void EmitLoadStoreICSlot(FeedbackVectorICSlot slot); |
+ |
Handle<HandlerTable> handler_table() { return handler_table_; } |
struct BailoutEntry { |