Revision: 3974
Author: [email protected]
Date: Fri Feb 26 04:37:37 2010
Log: Fix bad merge of serialize.cc numbers for external references to
the partial snapshots branch.

Pull out revision 3902 as it does not always work.

TBR=erik.corry
Review URL: http://codereview.chromium.org/660173
http://code.google.com/p/v8/source/detail?r=3974

Modified:
 /branches/experimental/partial_snapshots/src/arm/ic-arm.cc
 /branches/experimental/partial_snapshots/src/builtins.cc
 /branches/experimental/partial_snapshots/src/builtins.h
 /branches/experimental/partial_snapshots/src/ia32/ic-ia32.cc
 /branches/experimental/partial_snapshots/src/ic.cc
 /branches/experimental/partial_snapshots/src/ic.h
 /branches/experimental/partial_snapshots/src/objects-inl.h
 /branches/experimental/partial_snapshots/src/objects.cc
 /branches/experimental/partial_snapshots/src/objects.h
 /branches/experimental/partial_snapshots/src/serialize.cc
 /branches/experimental/partial_snapshots/src/x64/ic-x64.cc

=======================================
--- /branches/experimental/partial_snapshots/src/arm/ic-arm.cc Thu Feb 25 10:52:10 2010 +++ /branches/experimental/partial_snapshots/src/arm/ic-arm.cc Fri Feb 26 04:37:37 2010
@@ -830,53 +830,6 @@
   // Perform tail call to the entry.
   __ TailCallRuntime(ExternalReference(IC_Utility(kStoreIC_Miss)), 3, 1);
 }
-
-
-void StoreIC::GenerateArrayLength(MacroAssembler* masm) {
-  // ----------- S t a t e -------------
-  //  -- r0    : value
-  //  -- r1    : receiver
-  //  -- r2    : name
-  //  -- lr    : return address
-  // -----------------------------------
-  //
- // This accepts as a receiver anything JSObject::SetElementsLength accepts
-  // (currently anything except for external and pixel arrays which means
- // anything with elements of FixedArray type.), but currently is restricted
-  // to JSArray.
- // Value must be a number, but only smis are accepted as the most common case.
-
-  Label miss;
-
-  Register receiver = r1;
-  Register value = r0;
-  Register scratch = r3;
-
-  // Check that the receiver isn't a smi.
-  __ BranchOnSmi(receiver, &miss);
-
-  // Check that the object is a JS array.
-  __ CompareObjectType(receiver, scratch, scratch, JS_ARRAY_TYPE);
-  __ b(ne, &miss);
-
-  // Check that elements are FixedArray.
-  __ ldr(scratch, FieldMemOperand(receiver, JSArray::kElementsOffset));
-  __ CompareObjectType(scratch, scratch, scratch, FIXED_ARRAY_TYPE);
-  __ b(ne, &miss);
-
-  // Check that value is a smi.
-  __ BranchOnNotSmi(value, &miss);
-
-  // Prepare tail call to StoreIC_ArrayLength.
-  __ push(receiver);
-  __ push(value);
-
- __ TailCallRuntime(ExternalReference(IC_Utility(kStoreIC_ArrayLength)), 2, 1);
-
-  __ bind(&miss);
-
-  GenerateMiss(masm);
-}


 #undef __
=======================================
--- /branches/experimental/partial_snapshots/src/builtins.cc Thu Feb 25 10:52:10 2010 +++ /branches/experimental/partial_snapshots/src/builtins.cc Fri Feb 26 04:37:37 2010
@@ -1077,11 +1077,6 @@
 static void Generate_StoreIC_Megamorphic(MacroAssembler* masm) {
   StoreIC::GenerateMegamorphic(masm);
 }
-
-
-static void Generate_StoreIC_ArrayLength(MacroAssembler* masm) {
-  StoreIC::GenerateArrayLength(masm);
-}


 static void Generate_KeyedStoreIC_Generic(MacroAssembler* masm) {
=======================================
--- /branches/experimental/partial_snapshots/src/builtins.h Thu Feb 25 10:52:10 2010 +++ /branches/experimental/partial_snapshots/src/builtins.h Fri Feb 26 04:37:37 2010
@@ -96,7 +96,6 @@
   V(KeyedLoadIC_IndexedInterceptor,         KEYED_LOAD_IC, MEGAMORPHIC)   \
                                                                           \
   V(StoreIC_Initialize,         STORE_IC, UNINITIALIZED)                  \
-  V(StoreIC_ArrayLength,        STORE_IC, MONOMORPHIC)                    \
   V(StoreIC_Megamorphic,        STORE_IC, MEGAMORPHIC)                    \
                                                                           \
   V(KeyedStoreIC_Initialize,    KEYED_STORE_IC, UNINITIALIZED)            \
=======================================
--- /branches/experimental/partial_snapshots/src/ia32/ic-ia32.cc Thu Feb 25 10:52:10 2010 +++ /branches/experimental/partial_snapshots/src/ia32/ic-ia32.cc Fri Feb 26 04:37:37 2010
@@ -1409,57 +1409,6 @@
   // Perform tail call to the entry.
   __ TailCallRuntime(ExternalReference(IC_Utility(kStoreIC_Miss)), 3, 1);
 }
-
-
-void StoreIC::GenerateArrayLength(MacroAssembler* masm) {
-  // ----------- S t a t e -------------
-  //  -- eax    : value
-  //  -- ecx    : name
-  //  -- edx    : receiver
-  //  -- esp[0] : return address
-  // -----------------------------------
-  //
- // This accepts as a receiver anything JSObject::SetElementsLength accepts
-  // (currently anything except for external and pixel arrays which means
- // anything with elements of FixedArray type.), but currently is restricted
-  // to JSArray.
- // Value must be a number, but only smis are accepted as the most common case.
-
-  Label miss;
-
-  Register receiver = edx;
-  Register value = eax;
-  Register scratch = ebx;
-
-  // Check that the receiver isn't a smi.
-  __ test(receiver, Immediate(kSmiTagMask));
-  __ j(zero, &miss, not_taken);
-
-  // Check that the object is a JS array.
-  __ CmpObjectType(receiver, JS_ARRAY_TYPE, scratch);
-  __ j(not_equal, &miss, not_taken);
-
-  // Check that elements are FixedArray.
-  __ mov(scratch, FieldOperand(receiver, JSArray::kElementsOffset));
-  __ CmpObjectType(scratch, FIXED_ARRAY_TYPE, scratch);
-  __ j(not_equal, &miss, not_taken);
-
-  // Check that value is a smi.
-  __ test(value, Immediate(kSmiTagMask));
-  __ j(not_zero, &miss, not_taken);
-
-  // Prepare tail call to StoreIC_ArrayLength.
-  __ pop(scratch);
-  __ push(receiver);
-  __ push(value);
-  __ push(scratch);  // return address
-
- __ TailCallRuntime(ExternalReference(IC_Utility(kStoreIC_ArrayLength)), 2, 1);
-
-  __ bind(&miss);
-
-  GenerateMiss(masm);
-}


 // Defined in ic.cc.
=======================================
--- /branches/experimental/partial_snapshots/src/ic.cc Thu Feb 25 10:52:10 2010 +++ /branches/experimental/partial_snapshots/src/ic.cc Fri Feb 26 04:37:37 2010
@@ -1042,20 +1042,6 @@
     if (result.is_null()) return Failure::Exception();
     return *value;
   }
-
-
-  // Use specialized code for setting the length of arrays.
-  if (receiver->IsJSArray()
-      && name->Equals(Heap::length_symbol())
-      && receiver->AllowsSetElementsLength()) {
-#ifdef DEBUG
-    if (FLAG_trace_ic) PrintF("[StoreIC : +#length /array]\n");
-#endif
-    Code* target = Builtins::builtin(Builtins::StoreIC_ArrayLength);
-    set_target(target);
-    StubCache::Set(*name, HeapObject::cast(*object)->map(), target);
-    return receiver->SetProperty(*name, *value, NONE);
-  }

   // Lookup the property locally in the receiver.
   if (FLAG_use_ic && !receiver->IsJSGlobalProxy()) {
@@ -1347,17 +1333,6 @@
   return ic.Store(state, args.at<Object>(0), args.at<String>(1),
                   args.at<Object>(2));
 }
-
-
-Object* StoreIC_ArrayLength(Arguments args) {
-  NoHandleAllocation nha;
-
-  ASSERT(args.length() == 2);
-  JSObject* receiver = JSObject::cast(args[0]);
-  Object* len = args[1];
-
-  return receiver->SetElementsLength(len);
-}


 // Extend storage is called in a store inline cache when
=======================================
--- /branches/experimental/partial_snapshots/src/ic.h Thu Feb 25 10:52:10 2010 +++ /branches/experimental/partial_snapshots/src/ic.h Fri Feb 26 04:37:37 2010
@@ -45,7 +45,6 @@
   ICU(KeyedLoadIC_Miss)                               \
   ICU(CallIC_Miss)                                    \
   ICU(StoreIC_Miss)                                   \
-  ICU(StoreIC_ArrayLength)                            \
   ICU(SharedStoreIC_ExtendStorage)                    \
   ICU(KeyedStoreIC_Miss)                              \
   /* Utilities for IC stubs. */                       \
@@ -359,7 +358,6 @@
static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
   static void GenerateMiss(MacroAssembler* masm);
   static void GenerateMegamorphic(MacroAssembler* masm);
-  static void GenerateArrayLength(MacroAssembler* masm);

  private:
   // Update the inline cache and the global stub cache based on the
=======================================
--- /branches/experimental/partial_snapshots/src/objects-inl.h Thu Feb 25 10:52:10 2010 +++ /branches/experimental/partial_snapshots/src/objects-inl.h Fri Feb 26 04:37:37 2010
@@ -2766,13 +2766,6 @@
 bool JSObject::HasIndexedInterceptor() {
   return map()->has_indexed_interceptor();
 }
-
-
-bool JSObject::AllowsSetElementsLength() {
-  bool result = elements()->IsFixedArray();
-  ASSERT(result == (!HasPixelElements() && !HasExternalArrayElements()));
-  return result;
-}


 StringDictionary* JSObject::property_dictionary() {
=======================================
--- /branches/experimental/partial_snapshots/src/objects.cc Thu Feb 25 10:52:10 2010 +++ /branches/experimental/partial_snapshots/src/objects.cc Fri Feb 26 04:37:37 2010
@@ -5238,7 +5238,7 @@

 Object* JSObject::SetElementsLength(Object* len) {
   // We should never end in here with a pixel or external array.
-  ASSERT(AllowsSetElementsLength());
+  ASSERT(!HasPixelElements() && !HasExternalArrayElements());

   Object* smi_length = len->ToSmi();
   if (smi_length->IsSmi()) {
=======================================
--- /branches/experimental/partial_snapshots/src/objects.h Thu Feb 25 10:52:10 2010 +++ /branches/experimental/partial_snapshots/src/objects.h Fri Feb 26 04:37:37 2010
@@ -1161,7 +1161,6 @@
   inline bool HasExternalIntElements();
   inline bool HasExternalUnsignedIntElements();
   inline bool HasExternalFloatElements();
-  inline bool AllowsSetElementsLength();
   inline NumberDictionary* element_dictionary();  // Gets slow elements.

   // Collects elements starting at index 0.
=======================================
--- /branches/experimental/partial_snapshots/src/serialize.cc Thu Feb 25 10:52:10 2010 +++ /branches/experimental/partial_snapshots/src/serialize.cc Fri Feb 26 04:37:37 2010
@@ -438,7 +438,7 @@
       "KeyedLookupCache::field_offsets()");
   Add(ExternalReference::transcendental_cache_array_address().address(),
       UNCLASSIFIED,
-      25,
+      26,
       "TranscendentalCache::caches()");
 }

=======================================
--- /branches/experimental/partial_snapshots/src/x64/ic-x64.cc Thu Feb 25 10:52:10 2010 +++ /branches/experimental/partial_snapshots/src/x64/ic-x64.cc Fri Feb 26 04:37:37 2010
@@ -1384,55 +1384,6 @@
   // Cache miss: Jump to runtime.
   GenerateMiss(masm);
 }
-
-
-void StoreIC::GenerateArrayLength(MacroAssembler* masm) {
-  // ----------- S t a t e -------------
-  //  -- rax    : value
-  //  -- rcx    : name
-  //  -- rdx    : receiver
-  //  -- rsp[0] : return address
-  // -----------------------------------
-  //
- // This accepts as a receiver anything JSObject::SetElementsLength accepts
-  // (currently anything except for external and pixel arrays which means
- // anything with elements of FixedArray type.), but currently is restricted
-  // to JSArray.
- // Value must be a number, but only smis are accepted as the most common case.
-
-  Label miss;
-
-  Register receiver = rdx;
-  Register value = rax;
-  Register scratch = rbx;
-
-  // Check that the receiver isn't a smi.
-  __ JumpIfSmi(receiver, &miss);
-
-  // Check that the object is a JS array.
-  __ CmpObjectType(receiver, JS_ARRAY_TYPE, scratch);
-  __ j(not_equal, &miss);
-
-  // Check that elements are FixedArray.
-  __ movq(scratch, FieldOperand(receiver, JSArray::kElementsOffset));
-  __ CmpObjectType(scratch, FIXED_ARRAY_TYPE, scratch);
-  __ j(not_equal, &miss);
-
-  // Check that value is a smi.
-  __ JumpIfNotSmi(value, &miss);
-
-  // Prepare tail call to StoreIC_ArrayLength.
-  __ pop(scratch);
-  __ push(receiver);
-  __ push(value);
-  __ push(scratch);  // return address
-
- __ TailCallRuntime(ExternalReference(IC_Utility(kStoreIC_ArrayLength)), 2, 1);
-
-  __ bind(&miss);
-
-  GenerateMiss(masm);
-}


 #undef __

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

Reply via email to