Revision: 18004
Author:   [email protected]
Date:     Fri Nov 22 11:49:04 2013 UTC
Log:      Get rid of the binop_stub parameter to BuildBinaryOperation().

Just ask the graph builder whether we are compiling a stub.

[email protected]

Review URL: https://codereview.chromium.org/83073003
http://code.google.com/p/v8/source/detail?r=18004

Modified:
 /branches/bleeding_edge/src/code-stubs-hydrogen.cc
 /branches/bleeding_edge/src/hydrogen.cc
 /branches/bleeding_edge/src/hydrogen.h

=======================================
--- /branches/bleeding_edge/src/code-stubs-hydrogen.cc Fri Nov 22 07:34:21 2013 UTC +++ /branches/bleeding_edge/src/code-stubs-hydrogen.cc Fri Nov 22 11:49:04 2013 UTC
@@ -915,14 +915,14 @@
         Push(BuildBinaryOperation(
                     stub->operation(), left, right,
                     handle(Type::String(), isolate()), right_type,
-                    result_type, stub->fixed_right_arg(), true));
+                    result_type, stub->fixed_right_arg()));
       }
       if_leftisstring.Else();
       {
         Push(BuildBinaryOperation(
                     stub->operation(), left, right,
                     left_type, right_type, result_type,
-                    stub->fixed_right_arg(), true));
+                    stub->fixed_right_arg()));
       }
       if_leftisstring.End();
       result = Pop();
@@ -934,14 +934,14 @@
         Push(BuildBinaryOperation(
                     stub->operation(), left, right,
                     left_type, handle(Type::String(), isolate()),
-                    result_type, stub->fixed_right_arg(), true));
+                    result_type, stub->fixed_right_arg()));
       }
       if_rightisstring.Else();
       {
         Push(BuildBinaryOperation(
                     stub->operation(), left, right,
                     left_type, right_type, result_type,
-                    stub->fixed_right_arg(), true));
+                    stub->fixed_right_arg()));
       }
       if_rightisstring.End();
       result = Pop();
@@ -950,7 +950,7 @@
     result = BuildBinaryOperation(
             stub->operation(), left, right,
             left_type, right_type, result_type,
-            stub->fixed_right_arg(), true);
+            stub->fixed_right_arg());
   }

   // If we encounter a generic argument, the number conversion is
=======================================
--- /branches/bleeding_edge/src/hydrogen.cc     Fri Nov 22 11:35:39 2013 UTC
+++ /branches/bleeding_edge/src/hydrogen.cc     Fri Nov 22 11:49:04 2013 UTC
@@ -8609,8 +8609,7 @@
     Handle<Type> left_type,
     Handle<Type> right_type,
     Handle<Type> result_type,
-    Maybe<int> fixed_right_arg,
-    bool binop_stub) {
+    Maybe<int> fixed_right_arg) {

   Representation left_rep = Representation::FromType(left_type);
   Representation right_rep = Representation::FromType(right_type);
@@ -8679,7 +8678,7 @@
     return AddUncasted<HStringAdd>(left, right, STRING_ADD_CHECK_NONE);
   }

-  if (binop_stub) {
+  if (graph()->info()->IsStub()) {
     left = EnforceNumberType(left, left_type);
     right = EnforceNumberType(right, right_type);
   }
@@ -8693,7 +8692,7 @@
// Only the stub is allowed to call into the runtime, since otherwise we would // inline several instructions (including the two pushes) for every tagged // operation in optimized code, which is more expensive, than a stub call.
-  if (binop_stub && is_non_primitive) {
+  if (graph()->info()->IsStub() && is_non_primitive) {
     HValue* function = AddLoadJSBuiltin(BinaryOpIC::TokenToJSBuiltin(op));
     Add<HPushArgument>(left);
     Add<HPushArgument>(right);
@@ -8768,7 +8767,7 @@
     binop->set_observed_input_representation(1, left_rep);
     binop->set_observed_input_representation(2, right_rep);
     binop->initialize_output_representation(result_rep);
-    if (binop_stub) {
+    if (graph()->info()->IsStub()) {
       // Stub should not call into stub.
       instr->SetFlag(HValue::kCannotBeTagged);
       // And should truncate on HForceRepresentation already.
=======================================
--- /branches/bleeding_edge/src/hydrogen.h      Fri Nov 22 07:27:26 2013 UTC
+++ /branches/bleeding_edge/src/hydrogen.h      Fri Nov 22 11:49:04 2013 UTC
@@ -1345,8 +1345,7 @@
                                Handle<Type> left_type,
                                Handle<Type> right_type,
                                Handle<Type> result_type,
-                               Maybe<int> fixed_right_arg,
-                               bool binop_stub = false);
+                               Maybe<int> fixed_right_arg);

   HLoadNamedField* AddLoadFixedArrayLength(HValue *object);

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to