Simplify TryInline's signature.
authorsvenpanne@chromium.org <svenpanne@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 19 Jul 2012 10:46:03 +0000 (10:46 +0000)
committersvenpanne@chromium.org <svenpanne@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 19 Jul 2012 10:46:03 +0000 (10:46 +0000)
We don't actually need the arguments of the call, just their count. This change
is needed because in an accessor call there is no explicit argument list.

Review URL: https://chromiumcodereview.appspot.com/10795029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/hydrogen.cc
src/hydrogen.h

index 7d0e228..a8f4fbe 100644 (file)
@@ -6550,7 +6550,7 @@ int HGraphBuilder::InliningAstSize(Handle<JSFunction> target) {
 
 bool HGraphBuilder::TryInline(CallKind call_kind,
                               Handle<JSFunction> target,
-                              ZoneList<Expression*>* arguments,
+                              int arguments_count,
                               HValue* receiver,
                               int ast_id,
                               int return_id,
@@ -6712,7 +6712,7 @@ bool HGraphBuilder::TryInline(CallKind call_kind,
   HConstant* undefined = graph()->GetConstantUndefined();
   HEnvironment* inner_env =
       environment()->CopyForInlining(target,
-                                     arguments->length(),
+                                     arguments_count,
                                      function,
                                      undefined,
                                      call_kind,
@@ -6748,7 +6748,7 @@ bool HGraphBuilder::TryInline(CallKind call_kind,
 
   HEnterInlined* enter_inlined =
       new(zone()) HEnterInlined(target,
-                                arguments->length(),
+                                arguments_count,
                                 function,
                                 call_kind,
                                 function_state()->is_construct(),
@@ -6851,7 +6851,7 @@ bool HGraphBuilder::TryInlineCall(Call* expr, bool drop_extra) {
 
   return TryInline(call_kind,
                    expr->target(),
-                   expr->arguments(),
+                   expr->arguments()->length(),
                    NULL,
                    expr->id(),
                    expr->ReturnId(),
@@ -6862,7 +6862,7 @@ bool HGraphBuilder::TryInlineCall(Call* expr, bool drop_extra) {
 bool HGraphBuilder::TryInlineConstruct(CallNew* expr, HValue* receiver) {
   return TryInline(CALL_AS_FUNCTION,
                    expr->target(),
-                   expr->arguments(),
+                   expr->arguments()->length(),
                    receiver,
                    expr->id(),
                    expr->ReturnId(),
index 54df062..dbc14bb 100644 (file)
@@ -1032,7 +1032,7 @@ class HGraphBuilder: public AstVisitor {
   int InliningAstSize(Handle<JSFunction> target);
   bool TryInline(CallKind call_kind,
                  Handle<JSFunction> target,
-                 ZoneList<Expression*>* arguments,
+                 int arguments_count,
                  HValue* receiver,
                  int ast_id,
                  int return_id,