Chromium Code Reviews| Index: src/hydrogen.h |
| diff --git a/src/hydrogen.h b/src/hydrogen.h |
| index 43388464cb0d9d03b588730213b99332ca4b1acc..164a06a5f3ee15114aee746fae3bc70a64a67ff5 100644 |
| --- a/src/hydrogen.h |
| +++ b/src/hydrogen.h |
| @@ -748,7 +748,8 @@ class HOptimizedGraphBuilder; |
| enum ArgumentsAllowedFlag { |
| ARGUMENTS_NOT_ALLOWED, |
| - ARGUMENTS_ALLOWED |
| + ARGUMENTS_ALLOWED, |
| + ARGUMENTS_FAKED |
| }; |
| @@ -2261,7 +2262,11 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor { |
| #endif |
| } |
| } |
| - |
| + HValue* Lookup(Variable* var) { |
|
Jakob Kummerow
2014/11/19 20:46:16
Why do you need this variant? The "!value->IsArgum
ulan
2014/11/20 15:23:30
Indeed, node.
|
| + HEnvironment* env = environment(); |
| + int index = env->IndexFor(var); |
| + return env->Lookup(index); |
| + } |
| HValue* LookupAndMakeLive(Variable* var) { |
| HEnvironment* env = environment(); |
| int index = env->IndexFor(var); |
| @@ -2290,6 +2295,8 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor { |
| // Visit a list of expressions from left to right, each in a value context. |
| void VisitExpressions(ZoneList<Expression*>* exprs); |
| + void VisitExpressions(ZoneList<Expression*>* exprs, |
| + ArgumentsAllowedFlag flag); |
| // Remove the arguments from the bailout environment and emit instructions |
| // to push them as outgoing parameters. |
| @@ -2723,6 +2730,8 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor { |
| HInstruction* BuildCallConstantFunction(Handle<JSFunction> target, |
| int argument_count); |
| + bool CanBeFunctionApplyArguments(Call* expr, bool mark_arguments_as_live); |
| + |
| // The translation state of the currently-being-translated function. |
| FunctionState* function_state_; |