Index: src/arm/codegen-arm.h |
=================================================================== |
--- src/arm/codegen-arm.h (revision 4472) |
+++ src/arm/codegen-arm.h (working copy) |
@@ -144,6 +144,16 @@ |
// ------------------------------------------------------------------------- |
+// Arguments allocation mode |
+ |
+enum ArgumentsAllocationMode { |
+ NO_ARGUMENTS_ALLOCATION, |
+ EAGER_ARGUMENTS_ALLOCATION, |
+ LAZY_ARGUMENTS_ALLOCATION |
+}; |
+ |
+ |
+// ------------------------------------------------------------------------- |
// CodeGenerator |
class CodeGenerator: public AstVisitor { |
@@ -241,6 +251,12 @@ |
// Main code generation function |
void Generate(CompilationInfo* info); |
+ // Returns the arguments allocation mode. |
+ ArgumentsAllocationMode ArgumentsMode(); |
+ |
+ // Store the arguments object and allocate it if necessary. |
+ void StoreArgumentsObject(bool initial); |
+ |
// The following are used by class Reference. |
void LoadReference(Reference* ref); |
void UnloadReference(Reference* ref); |
@@ -284,6 +300,7 @@ |
// Read a value from a slot and leave it on top of the expression stack. |
void LoadFromSlot(Slot* slot, TypeofState typeof_state); |
+ void LoadFromSlotCheckForArguments(Slot* slot, TypeofState state); |
// Store the value on top of the stack to a slot. |
void StoreToSlot(Slot* slot, InitState init_state); |
@@ -339,6 +356,14 @@ |
CallFunctionFlags flags, |
int position); |
+ // An optimized implementation of expressions of the form |
+ // x.apply(y, arguments). We call x the applicand and y the receiver. |
+ // The optimization avoids allocating an arguments object if possible. |
+ void CallApplyLazy(Expression* applicand, |
+ Expression* receiver, |
+ VariableProxy* arguments, |
+ int position); |
+ |
// Control flow |
void Branch(bool if_true, JumpTarget* target); |
void CheckStack(); |