Revision: 4362
Author: [email protected]
Date: Thu Apr  8 06:41:11 2010
Log: Removing BinaryOpIC::Clear. This method relied on some less-than-obvious hack,
and there was zero (or small negative) performance advantage.


Review URL: http://codereview.chromium.org/1623005
http://code.google.com/p/v8/source/detail?r=4362

Modified:
 /branches/bleeding_edge/src/ia32/codegen-ia32.cc
 /branches/bleeding_edge/src/ic.cc
 /branches/bleeding_edge/src/x64/codegen-x64.cc

=======================================
--- /branches/bleeding_edge/src/ia32/codegen-ia32.cc Wed Apr 7 04:13:05 2010 +++ /branches/bleeding_edge/src/ia32/codegen-ia32.cc Thu Apr 8 06:41:11 2010
@@ -9518,13 +9518,6 @@
     default:
       UNREACHABLE();
   }
-
- // Generate an unreachable reference to the DEFAULT stub so that it can be
-  // found at the end of this stub when clearing ICs at GC.
-  if (runtime_operands_type_ != BinaryOpIC::DEFAULT) {
-    GenericBinaryOpStub uninit(MinorKey(), BinaryOpIC::DEFAULT);
-    __ TailCallStub(&uninit);
-  }
 }


=======================================
--- /branches/bleeding_edge/src/ic.cc   Tue Mar 23 04:40:38 2010
+++ /branches/bleeding_edge/src/ic.cc   Thu Apr  8 06:41:11 2010
@@ -224,7 +224,8 @@
     case Code::STORE_IC: return StoreIC::Clear(address, target);
     case Code::KEYED_STORE_IC: return KeyedStoreIC::Clear(address, target);
     case Code::CALL_IC: return CallIC::Clear(address, target);
-    case Code::BINARY_OP_IC: return BinaryOpIC::Clear(address, target);
+ case Code::BINARY_OP_IC: return; // Clearing these is tricky and does not
+                                      // make any performance difference.
     default: UNREACHABLE();
   }
 }
@@ -1402,25 +1403,6 @@
 void BinaryOpIC::patch(Code* code) {
   set_target(code);
 }
-
-
-void BinaryOpIC::Clear(Address address, Code* target) {
-  if (target->ic_state() == UNINITIALIZED) return;
-
-  // At the end of a fast case stub there should be a reference to
- // a corresponding UNINITIALIZED stub, so look for the last reloc info item.
-  RelocInfo* rinfo = NULL;
-  for (RelocIterator it(target, RelocInfo::kCodeTargetMask);
-       !it.done(); it.next()) {
-    rinfo = it.rinfo();
-  }
-
-  ASSERT(rinfo != NULL);
- Code* uninit_stub = Code::GetCodeFromTargetAddress(rinfo->target_address());
-  ASSERT(uninit_stub->ic_state() == UNINITIALIZED &&
-         uninit_stub->kind() == Code::BINARY_OP_IC);
-  SetTargetAtAddress(address, uninit_stub);
-}


 const char* BinaryOpIC::GetName(TypeInfo type_info) {
=======================================
--- /branches/bleeding_edge/src/x64/codegen-x64.cc      Wed Apr  7 01:18:51 2010
+++ /branches/bleeding_edge/src/x64/codegen-x64.cc      Thu Apr  8 06:41:11 2010
@@ -9068,15 +9068,6 @@
     default:
       UNREACHABLE();
   }
-
-  // TODO(kaznacheev) Remove this (along with clearing) if it does not harm
-  // performance.
- // Generate an unreachable reference to the DEFAULT stub so that it can be
-  // found at the end of this stub when clearing ICs at GC.
-  if (runtime_operands_type_ != BinaryOpIC::DEFAULT) {
-    GenericBinaryOpStub uninit(MinorKey(), BinaryOpIC::DEFAULT);
-    __ TailCallStub(&uninit);
-  }
 }


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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to