Reviewers: Michael Starzinger,

Description:
Simplify TryInline's signature.

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.


Please review this at http://codereview.chromium.org/10795029/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/hydrogen.h
  M src/hydrogen.cc


Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 7d0e228e8eeae3e88bc930be8d518966713afa99..a8f4fbef0bbebd51c588051864bb8ccd657bc7bf 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -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: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index 54df06268d8a22825116854a2f07c79fd1873aad..dbc14bbbaaf846807db065e4165013f7aaf680d1 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -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,


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to