Revision: 6175
Author: [email protected]
Date: Wed Jan  5 04:01:53 2011
Log: Fix the build breakge on x64 and ARM after r6173

The instanceof changes was not fully ported to x64 and ARM.
Review URL: http://codereview.chromium.org/6031013
http://code.google.com/p/v8/source/detail?r=6175

Modified:
 /branches/bleeding_edge/src/arm/code-stubs-arm.cc
 /branches/bleeding_edge/src/arm/lithium-arm.cc
 /branches/bleeding_edge/src/arm/lithium-arm.h
 /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc
 /branches/bleeding_edge/src/code-stubs.cc
 /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc

=======================================
--- /branches/bleeding_edge/src/arm/code-stubs-arm.cc Tue Jan 4 03:02:58 2011 +++ /branches/bleeding_edge/src/arm/code-stubs-arm.cc Wed Jan 5 04:01:53 2011
@@ -2905,7 +2905,7 @@
   const Register prototype = r4;  // Prototype of the function.
   const Register scratch = r2;
   Label slow, loop, is_instance, is_not_instance, not_js_object;
-  if (!args_in_registers()) {
+  if (!HasArgsInRegisters()) {
     __ ldr(object, MemOperand(sp, 1 * kPointerSize));
     __ ldr(function, MemOperand(sp, 0));
   }
@@ -2923,7 +2923,7 @@
   __ cmp(map, ip);
   __ b(ne, &miss);
   __ LoadRoot(r0, Heap::kInstanceofCacheAnswerRootIndex);
-  __ Ret(args_in_registers() ? 0 : 2);
+  __ Ret(HasArgsInRegisters() ? 0 : 2);

   __ bind(&miss);
   __ TryGetFunctionPrototype(function, prototype, scratch, &slow);
@@ -2953,12 +2953,12 @@
   __ bind(&is_instance);
   __ mov(r0, Operand(Smi::FromInt(0)));
   __ StoreRoot(r0, Heap::kInstanceofCacheAnswerRootIndex);
-  __ Ret(args_in_registers() ? 0 : 2);
+  __ Ret(HasArgsInRegisters() ? 0 : 2);

   __ bind(&is_not_instance);
   __ mov(r0, Operand(Smi::FromInt(1)));
   __ StoreRoot(r0, Heap::kInstanceofCacheAnswerRootIndex);
-  __ Ret(args_in_registers() ? 0 : 2);
+  __ Ret(HasArgsInRegisters() ? 0 : 2);

   Label object_not_null, object_not_null_or_smi;
   __ bind(&not_js_object);
@@ -2972,22 +2972,22 @@
   __ cmp(scratch, Operand(Factory::null_value()));
   __ b(ne, &object_not_null);
   __ mov(r0, Operand(Smi::FromInt(1)));
-  __ Ret(args_in_registers() ? 0 : 2);
+  __ Ret(HasArgsInRegisters() ? 0 : 2);

   __ bind(&object_not_null);
   // Smi values are not instances of anything.
   __ BranchOnNotSmi(object, &object_not_null_or_smi);
   __ mov(r0, Operand(Smi::FromInt(1)));
-  __ Ret(args_in_registers() ? 0 : 2);
+  __ Ret(HasArgsInRegisters() ? 0 : 2);

   __ bind(&object_not_null_or_smi);
   // String values are not instances of anything.
   __ IsObjectJSStringType(object, scratch, &slow);
   __ mov(r0, Operand(Smi::FromInt(1)));
-  __ Ret(args_in_registers() ? 0 : 2);
+  __ Ret(HasArgsInRegisters() ? 0 : 2);

   // Slow-case.  Tail call builtin.
-  if (args_in_registers()) {
+  if (HasArgsInRegisters()) {
     __ Push(r0, r1);
   }
   __ bind(&slow);
=======================================
--- /branches/bleeding_edge/src/arm/lithium-arm.cc      Tue Jan  4 06:35:01 2011
+++ /branches/bleeding_edge/src/arm/lithium-arm.cc      Wed Jan  5 04:01:53 2011
@@ -1304,6 +1304,14 @@
                       UseFixed(instr->right(), r1));
   return MarkAsCall(DefineFixed(result, r0), instr);
 }
+
+
+LInstruction* LChunkBuilder::DoInstanceOfKnownGlobal(
+    HInstanceOfKnownGlobal* instr) {
+  LInstruction* result =
+      new LInstanceOfKnownGlobal(UseFixed(instr->value(), r0));
+  return MarkAsCall(DefineFixed(result, r0), instr);
+}


 LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) {
=======================================
--- /branches/bleeding_edge/src/arm/lithium-arm.h       Tue Jan  4 06:35:34 2011
+++ /branches/bleeding_edge/src/arm/lithium-arm.h       Wed Jan  5 04:01:53 2011
@@ -62,6 +62,7 @@
 //     LDivI
 //     LInstanceOf
 //     LInstanceOfAndBranch
+//     LInstanceOfKnownGlobal
 //     LLoadKeyedFastElement
 //     LLoadKeyedGeneric
 //     LModI
@@ -204,6 +205,7 @@
   V(Goto)                                       \
   V(InstanceOf)                                 \
   V(InstanceOfAndBranch)                        \
+  V(InstanceOfKnownGlobal)                      \
   V(Integer32ToDouble)                          \
   V(IsNull)                                     \
   V(IsNullAndBranch)                            \
@@ -993,6 +995,19 @@
 };


+class LInstanceOfKnownGlobal: public LUnaryOperation {
+ public:
+  explicit LInstanceOfKnownGlobal(LOperand* left)
+      : LUnaryOperation(left) { }
+
+  DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal,
+                               "instance-of-known-global")
+  DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal)
+
+  Handle<JSFunction> function() const { return hydrogen()->function(); }
+};
+
+
 class LBoundsCheck: public LBinaryOperation {
  public:
   LBoundsCheck(LOperand* index, LOperand* length)
=======================================
--- /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Wed Jan 5 01:04:06 2011 +++ /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Wed Jan 5 04:01:53 2011
@@ -1431,6 +1431,10 @@
 }


+void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
+  Abort("DoInstanceOfKnownGlobal unimplemented.");
+}
+

 static Condition ComputeCompareCondition(Token::Value op) {
   switch (op) {
=======================================
--- /branches/bleeding_edge/src/code-stubs.cc   Tue Dec  7 03:31:57 2010
+++ /branches/bleeding_edge/src/code-stubs.cc   Wed Jan  5 04:01:53 2011
@@ -195,6 +195,36 @@
       UNREACHABLE();
   }
 }
+
+
+const char* InstanceofStub::GetName() {
+  if (name_ != NULL) return name_;
+  const int kMaxNameLength = 100;
+  name_ = Bootstrapper::AllocateAutoDeletedArray(kMaxNameLength);
+  if (name_ == NULL) return "OOM";
+
+  const char* args = "";
+  if (HasArgsInRegisters()) {
+    args = "_REGS";
+  }
+
+  const char* inline_check = "";
+  if (HasCallSiteInlineCheck()) {
+    inline_check = "_INLINE";
+  }
+
+  const char* return_true_false_object = "";
+  if (ReturnTrueFalseObject()) {
+    return_true_false_object = "_TRUEFALSE";
+  }
+
+  OS::SNPrintF(Vector<char>(name_, kMaxNameLength),
+               "InstanceofStub%s%s%s",
+               args,
+               inline_check,
+               return_true_false_object);
+  return name_;
+}


 } }  // namespace v8::internal
=======================================
--- /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Wed Jan 5 03:17:37 2011 +++ /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Wed Jan 5 04:01:53 2011
@@ -5180,36 +5180,6 @@


 Register InstanceofStub::right() { return edx; }
-
-
-const char* InstanceofStub::GetName() {
-  if (name_ != NULL) return name_;
-  const int kMaxNameLength = 100;
-  name_ = Bootstrapper::AllocateAutoDeletedArray(kMaxNameLength);
-  if (name_ == NULL) return "OOM";
-
-  const char* args = "";
-  if (HasArgsInRegisters()) {
-    args = "_REGS";
-  }
-
-  const char* inline_check = "";
-  if (HasCallSiteInlineCheck()) {
-    inline_check = "_INLINE";
-  }
-
-  const char* return_true_false_object = "";
-  if (ReturnTrueFalseObject()) {
-    return_true_false_object = "_TRUEFALSE";
-  }
-
-  OS::SNPrintF(Vector<char>(name_, kMaxNameLength),
-               "InstanceofStub%s%s%s",
-               args,
-               inline_check,
-               return_true_false_object);
-  return name_;
-}


 int CompareStub::MinorKey() {

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

Reply via email to