Revision: 18800
Author:   [email protected]
Date:     Fri Jan 24 01:05:19 2014 UTC
Log:      Version 3.24.23

Performance and stability improvements on all platforms.
http://code.google.com/p/v8/source/detail?r=18800

Modified:
 /trunk/ChangeLog
 /trunk/build/standalone.gypi
 /trunk/src/arm/code-stubs-arm.cc
 /trunk/src/arm/macro-assembler-arm.cc
 /trunk/src/heap.cc
 /trunk/src/heap.h
 /trunk/src/hydrogen-instructions.cc
 /trunk/src/hydrogen.cc
 /trunk/src/ia32/code-stubs-ia32.cc
 /trunk/src/ia32/macro-assembler-ia32.cc
 /trunk/src/isolate.h
 /trunk/src/mark-compact.cc
 /trunk/src/mips/code-stubs-mips.cc
 /trunk/src/mips/macro-assembler-mips.cc
 /trunk/src/objects-inl.h
 /trunk/src/objects-visiting.h
 /trunk/src/objects.h
 /trunk/src/runtime.cc
 /trunk/src/runtime.h
 /trunk/src/spaces-inl.h
 /trunk/src/spaces.h
 /trunk/src/stub-cache.cc
 /trunk/src/stub-cache.h
 /trunk/src/version.cc
 /trunk/src/x64/code-stubs-x64.cc
 /trunk/src/x64/macro-assembler-x64.cc
 /trunk/test/cctest/test-alloc.cc
 /trunk/test/cctest/test-heap.cc
 /trunk/test/cctest/test-mark-compact.cc
 /trunk/test/cctest/test-spaces.cc
 /trunk/test/mjsunit/allocation-folding.js
 /trunk/test/mjsunit/fuzz-natives-part1.js
 /trunk/test/mjsunit/fuzz-natives-part2.js
 /trunk/test/mjsunit/fuzz-natives-part3.js
 /trunk/test/mjsunit/fuzz-natives-part4.js
 /trunk/test/mjsunit/object-seal.js
 /trunk/test/mjsunit/regress/regress-3027.js
 /trunk/tools/push-to-trunk/push_to_trunk.py
 /trunk/tools/push-to-trunk/test_scripts.py

=======================================
--- /trunk/ChangeLog    Thu Jan 23 09:38:20 2014 UTC
+++ /trunk/ChangeLog    Fri Jan 24 01:05:19 2014 UTC
@@ -1,3 +1,8 @@
+2014-01-24: Version 3.24.23
+
+        Performance and stability improvements on all platforms.
+
+
 2014-01-23: Version 3.24.22

         Fix compilation on x64 architectures (issue 3110).
=======================================
--- /trunk/build/standalone.gypi        Thu Jan  2 12:10:54 2014 UTC
+++ /trunk/build/standalone.gypi        Fri Jan 24 01:05:19 2014 UTC
@@ -299,7 +299,6 @@
           'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
           'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES',      # -fvisibility=hidden
'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
-          'GCC_VERSION': 'com.apple.compilers.llvmgcc42',
           'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES',  # -Wnewline-eof
           'GCC_WARN_NON_VIRTUAL_DESTRUCTOR': 'YES', # -Wnon-virtual-dtor
           # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
=======================================
--- /trunk/src/arm/code-stubs-arm.cc    Thu Jan 23 09:38:20 2014 UTC
+++ /trunk/src/arm/code-stubs-arm.cc    Fri Jan 24 01:05:19 2014 UTC
@@ -427,6 +427,21 @@
     descriptor->param_representations_ = representations;
     descriptor->platform_specific_descriptor_ = &noInlineDescriptor;
   }
+  {
+    CallInterfaceDescriptor* descriptor =
+        isolate->call_descriptor(Isolate::CallHandler);
+    static Register registers[] = { cp,  // context
+                                    r0,  // receiver
+    };
+    static Representation representations[] = {
+        Representation::Tagged(),  // context
+        Representation::Tagged(),  // receiver
+    };
+    descriptor->register_param_count_ = 2;
+    descriptor->register_params_ = registers;
+    descriptor->param_representations_ = representations;
+    descriptor->platform_specific_descriptor_ = &default_descriptor;
+  }
 }


=======================================
--- /trunk/src/arm/macro-assembler-arm.cc       Wed Jan 22 10:50:56 2014 UTC
+++ /trunk/src/arm/macro-assembler-arm.cc       Fri Jan 24 01:05:19 2014 UTC
@@ -1639,7 +1639,7 @@
                               Register scratch2,
                               Label* gc_required,
                               AllocationFlags flags) {
-  ASSERT(object_size <= Page::kMaxNonCodeHeapObjectSize);
+  ASSERT(object_size <= Page::kMaxRegularHeapObjectSize);
   if (!FLAG_inline_new) {
     if (emit_debug_code()) {
       // Trash the registers to simulate an allocation failure.
=======================================
--- /trunk/src/heap.cc  Thu Jan 23 09:38:20 2014 UTC
+++ /trunk/src/heap.cc  Fri Jan 24 01:05:19 2014 UTC
@@ -2282,7 +2282,7 @@
                                     HeapObject** slot,
                                     HeapObject* object,
                                     int object_size) {
-    SLOW_ASSERT(object_size <= Page::kMaxNonCodeHeapObjectSize);
+    SLOW_ASSERT(object_size <= Page::kMaxRegularHeapObjectSize);
     SLOW_ASSERT(object->Size() == object_size);

     int allocation_size = object_size;
@@ -2936,7 +2936,8 @@
   // Statically ensure that it is safe to allocate heap numbers in paged
   // spaces.
   int size = HeapNumber::kSize;
-  STATIC_ASSERT(HeapNumber::kSize <= Page::kNonCodeObjectAreaSize);
+  STATIC_ASSERT(HeapNumber::kSize <= Page::kMaxRegularHeapObjectSize);
+
   AllocationSpace space = SelectSpace(size, OLD_DATA_SPACE, pretenure);

   Object* result;
@@ -2952,7 +2953,7 @@

 MaybeObject* Heap::AllocateCell(Object* value) {
   int size = Cell::kSize;
-  STATIC_ASSERT(Cell::kSize <= Page::kNonCodeObjectAreaSize);
+  STATIC_ASSERT(Cell::kSize <= Page::kMaxRegularHeapObjectSize);

   Object* result;
   { MaybeObject* maybe_result = AllocateRaw(size, CELL_SPACE, CELL_SPACE);
@@ -2966,7 +2967,7 @@

 MaybeObject* Heap::AllocatePropertyCell() {
   int size = PropertyCell::kSize;
-  STATIC_ASSERT(PropertyCell::kSize <= Page::kNonCodeObjectAreaSize);
+  STATIC_ASSERT(PropertyCell::kSize <= Page::kMaxRegularHeapObjectSize);

   Object* result;
   MaybeObject* maybe_result =
@@ -3724,7 +3725,7 @@

MaybeObject* Heap::AllocateForeign(Address address, PretenureFlag pretenure) { // Statically ensure that it is safe to allocate foreigns in paged spaces.
-  STATIC_ASSERT(Foreign::kSize <= Page::kMaxNonCodeHeapObjectSize);
+  STATIC_ASSERT(Foreign::kSize <= Page::kMaxRegularHeapObjectSize);
AllocationSpace space = (pretenure == TENURED) ? OLD_DATA_SPACE : NEW_SPACE;
   Foreign* result;
   MaybeObject* maybe_result = Allocate(foreign_map(), space);
@@ -5348,7 +5349,7 @@

 MaybeObject* Heap::AllocateSymbol() {
   // Statically ensure that it is safe to allocate symbols in paged spaces.
-  STATIC_ASSERT(Symbol::kSize <= Page::kNonCodeObjectAreaSize);
+  STATIC_ASSERT(Symbol::kSize <= Page::kMaxRegularHeapObjectSize);

   Object* result;
   MaybeObject* maybe =
@@ -6312,7 +6313,7 @@
                                          Page::kPageSize));

   // We rely on being able to allocate new arrays in paged spaces.
-  ASSERT(MaxRegularSpaceAllocationSize() >=
+  ASSERT(Page::kMaxRegularHeapObjectSize >=
          (JSArray::kSize +
           FixedArray::SizeFor(JSObject::kInitialMaxFastElementArray) +
           AllocationMemento::kSize));
@@ -6396,7 +6397,7 @@


 void Heap::EnableInlineAllocation() {
-  ASSERT(inline_allocation_disabled_);
+  if (!inline_allocation_disabled_) return;
   inline_allocation_disabled_ = false;

   // Update inline allocation limit for new space.
@@ -6405,7 +6406,7 @@


 void Heap::DisableInlineAllocation() {
-  ASSERT(!inline_allocation_disabled_);
+  if (inline_allocation_disabled_) return;
   inline_allocation_disabled_ = true;

   // Update inline allocation limit for new space.
=======================================
--- /trunk/src/heap.h   Thu Jan 23 09:38:20 2014 UTC
+++ /trunk/src/heap.h   Fri Jan 24 01:05:19 2014 UTC
@@ -531,7 +531,6 @@
   int InitialSemiSpaceSize() { return initial_semispace_size_; }
   intptr_t MaxOldGenerationSize() { return max_old_generation_size_; }
   intptr_t MaxExecutableSize() { return max_executable_size_; }
- int MaxRegularSpaceAllocationSize() { return InitialSemiSpaceSize() * 4/5; }

   // Returns the capacity of the heap in bytes w/o growing. Heap grows when
   // more spaces are needed until it reaches the limit.
@@ -2103,7 +2102,7 @@
                                      PretenureFlag pretenure) {
     ASSERT(preferred_old_space == OLD_POINTER_SPACE ||
            preferred_old_space == OLD_DATA_SPACE);
-    if (object_size > Page::kMaxNonCodeHeapObjectSize) return LO_SPACE;
+    if (object_size > Page::kMaxRegularHeapObjectSize) return LO_SPACE;
     return (pretenure == TENURED) ? preferred_old_space : NEW_SPACE;
   }

=======================================
--- /trunk/src/hydrogen-instructions.cc Wed Jan 22 12:59:37 2014 UTC
+++ /trunk/src/hydrogen-instructions.cc Fri Jan 24 01:05:19 2014 UTC
@@ -3453,7 +3453,9 @@
     }
   }

- if (new_dominator_size > isolate()->heap()->MaxRegularSpaceAllocationSize()) {
+  // Since we clear the first word after folded memory, we cannot use the
+  // whole Page::kMaxRegularHeapObjectSize memory.
+ if (new_dominator_size > Page::kMaxRegularHeapObjectSize - kPointerSize) {
     if (FLAG_trace_allocation_folding) {
       PrintF("#%d (%s) cannot fold into #%d (%s) due to size: %d\n",
           id(), Mnemonic(), dominator_allocate->id(),
@@ -4343,7 +4345,7 @@
     // Negative property indices are in-object properties, indexed
     // from the end of the fixed part of the object.
     int offset = (index * kPointerSize) + map->instance_size();
-    return HObjectAccess(kInobject, offset, representation);
+    return HObjectAccess(kInobject, offset, representation, name);
   } else {
     // Non-negative property indices are in the properties array.
     int offset = (index * kPointerSize) + FixedArray::kHeaderSize;
=======================================
--- /trunk/src/hydrogen.cc      Thu Jan 23 09:38:20 2014 UTC
+++ /trunk/src/hydrogen.cc      Fri Jan 24 01:05:19 2014 UTC
@@ -2369,10 +2369,9 @@


void HGraphBuilder::BuildNewSpaceArrayCheck(HValue* length, ElementsKind kind) {
-  Heap* heap = isolate()->heap();
   int element_size = IsFastDoubleElementsKind(kind) ? kDoubleSize
                                                     : kPointerSize;
-  int max_size = heap->MaxRegularSpaceAllocationSize() / element_size;
+  int max_size = Page::kMaxRegularHeapObjectSize / element_size;
   max_size -= JSArray::kSize / element_size;
   HConstant* max_size_constant = Add<HConstant>(max_size);
   Add<HBoundsCheck>(length, max_size_constant);
@@ -7660,6 +7659,41 @@
       Add<HSimulate>(expr->id(), REMOVABLE_SIMULATE);
       return true;
     }
+    case kArrayPush: {
+ if (!expr->IsMonomorphic() || expr->check_type() != RECEIVER_MAP_CHECK) {
+        return false;
+      }
+      if (receiver_map->instance_type() != JS_ARRAY_TYPE) return false;
+      ElementsKind elements_kind = receiver_map->elements_kind();
+      if (!IsFastElementsKind(elements_kind)) return false;
+      AddCheckConstantFunction(expr->holder(), receiver, receiver_map);
+
+      HValue* op_vals[] = {
+        context(),
+        // Receiver.
+        environment()->ExpressionStackAt(expr->arguments()->length())
+      };
+
+      const int argc = expr->arguments()->length();
+      // Includes receiver.
+      PushArgumentsFromEnvironment(argc + 1);
+
+      CallInterfaceDescriptor* descriptor =
+          isolate()->call_descriptor(Isolate::CallHandler);
+
+      ArrayPushStub stub(receiver_map->elements_kind(), argc);
+      Handle<Code> code = stub.GetCode(isolate());
+      HConstant* code_value = Add<HConstant>(code);
+
+      ASSERT((sizeof(op_vals) / kPointerSize) ==
+             descriptor->environment_length());
+
+      HInstruction* call = New<HCallWithDescriptor>(
+          code_value, argc + 1, descriptor,
+          Vector<HValue*>(op_vals, descriptor->environment_length()));
+      ast_context()->ReturnInstruction(call, expr->id());
+      return true;
+    }
     default:
       // Not yet supported for inlining.
       break;
=======================================
--- /trunk/src/ia32/code-stubs-ia32.cc  Thu Jan 23 09:38:20 2014 UTC
+++ /trunk/src/ia32/code-stubs-ia32.cc  Fri Jan 24 01:05:19 2014 UTC
@@ -421,6 +421,20 @@
     descriptor->register_params_ = registers;
     descriptor->param_representations_ = representations;
   }
+  {
+    CallInterfaceDescriptor* descriptor =
+        isolate->call_descriptor(Isolate::CallHandler);
+    static Register registers[] = { esi,  // context
+                                    edx,  // receiver
+    };
+    static Representation representations[] = {
+        Representation::Tagged(),  // context
+        Representation::Tagged(),  // receiver
+    };
+    descriptor->register_param_count_ = 2;
+    descriptor->register_params_ = registers;
+    descriptor->param_representations_ = representations;
+  }
 }


=======================================
--- /trunk/src/ia32/macro-assembler-ia32.cc     Wed Jan 22 10:50:56 2014 UTC
+++ /trunk/src/ia32/macro-assembler-ia32.cc     Fri Jan 24 01:05:19 2014 UTC
@@ -1591,7 +1591,7 @@
                               Label* gc_required,
                               AllocationFlags flags) {
   ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0);
-  ASSERT(object_size <= Page::kMaxNonCodeHeapObjectSize);
+  ASSERT(object_size <= Page::kMaxRegularHeapObjectSize);
   if (!FLAG_inline_new) {
     if (emit_debug_code()) {
       // Trash the registers to simulate an allocation failure.
=======================================
--- /trunk/src/isolate.h        Thu Jan 16 08:22:55 2014 UTC
+++ /trunk/src/isolate.h        Fri Jan 24 01:05:19 2014 UTC
@@ -1076,6 +1076,7 @@
   enum CallDescriptorKey {
     KeyedCall,
     NamedCall,
+    CallHandler,
     ArgumentAdaptorCall,
     NUMBER_OF_CALL_DESCRIPTORS
   };
=======================================
--- /trunk/src/mark-compact.cc  Wed Jan 22 10:50:56 2014 UTC
+++ /trunk/src/mark-compact.cc  Fri Jan 24 01:05:19 2014 UTC
@@ -2792,7 +2792,7 @@
     heap_profiler->ObjectMoveEvent(src, dst, size);
   }
   ASSERT(heap()->AllowedToBeMigrated(HeapObject::FromAddress(src), dest));
-  ASSERT(dest != LO_SPACE && size <= Page::kMaxNonCodeHeapObjectSize);
+  ASSERT(dest != LO_SPACE && size <= Page::kMaxRegularHeapObjectSize);
   if (dest == OLD_POINTER_SPACE) {
     Address src_slot = src;
     Address dst_slot = dst;
@@ -2966,7 +2966,7 @@
 bool MarkCompactCollector::TryPromoteObject(HeapObject* object,
                                             int object_size) {
   // TODO(hpayer): Replace that check with an assert.
-  CHECK(object_size <= Page::kMaxNonCodeHeapObjectSize);
+  CHECK(object_size <= Page::kMaxRegularHeapObjectSize);

   OldSpace* target_space = heap()->TargetSpace(object);

=======================================
--- /trunk/src/mips/code-stubs-mips.cc  Thu Jan 23 17:24:54 2014 UTC
+++ /trunk/src/mips/code-stubs-mips.cc  Fri Jan 24 01:05:19 2014 UTC
@@ -419,6 +419,20 @@
     descriptor->register_params_ = registers;
     descriptor->param_representations_ = representations;
   }
+  {
+    CallInterfaceDescriptor* descriptor =
+        isolate->call_descriptor(Isolate::CallHandler);
+    static Register registers[] = { cp,  // context
+                                    a0,  // receiver
+    };
+    static Representation representations[] = {
+        Representation::Tagged(),  // context
+        Representation::Tagged(),  // receiver
+    };
+    descriptor->register_param_count_ = 2;
+    descriptor->register_params_ = registers;
+    descriptor->param_representations_ = representations;
+  }
 }


=======================================
--- /trunk/src/mips/macro-assembler-mips.cc     Wed Jan 22 10:50:56 2014 UTC
+++ /trunk/src/mips/macro-assembler-mips.cc     Fri Jan 24 01:05:19 2014 UTC
@@ -2844,7 +2844,7 @@
                               Register scratch2,
                               Label* gc_required,
                               AllocationFlags flags) {
-  ASSERT(object_size <= Page::kMaxNonCodeHeapObjectSize);
+  ASSERT(object_size <= Page::kMaxRegularHeapObjectSize);
   if (!FLAG_inline_new) {
     if (emit_debug_code()) {
       // Trash the registers to simulate an allocation failure.
=======================================
--- /trunk/src/objects-inl.h    Thu Jan 23 09:38:20 2014 UTC
+++ /trunk/src/objects-inl.h    Fri Jan 24 01:05:19 2014 UTC
@@ -4702,7 +4702,7 @@
   if (!HasTransitionArray()) return true;
   return FixedArray::SizeFor(transitions()->length() +
                              TransitionArray::kTransitionSize)
-      <= Page::kMaxNonCodeHeapObjectSize;
+      <= Page::kMaxRegularHeapObjectSize;
 }


=======================================
--- /trunk/src/objects-visiting.h       Fri Jan 17 08:10:36 2014 UTC
+++ /trunk/src/objects-visiting.h       Fri Jan 24 01:05:19 2014 UTC
@@ -144,7 +144,7 @@
            (base == kVisitJSObject));
     ASSERT(IsAligned(object_size, kPointerSize));
     ASSERT(kMinObjectSizeInWords * kPointerSize <= object_size);
-    ASSERT(object_size <= Page::kMaxNonCodeHeapObjectSize);
+    ASSERT(object_size <= Page::kMaxRegularHeapObjectSize);

     const VisitorId specialization = static_cast<VisitorId>(
         base + (object_size >> kPointerSizeLog2) - kMinObjectSizeInWords);
=======================================
--- /trunk/src/objects.h        Wed Jan 22 10:50:56 2014 UTC
+++ /trunk/src/objects.h        Fri Jan 24 01:05:19 2014 UTC
@@ -2663,7 +2663,7 @@
   // don't want to be wasteful with long lived objects.
   static const int kMaxUncheckedOldFastElementsLength = 500;

-  // Note that Heap::MaxRegularSpaceAllocationSize() puts a limit on
+  // Note that Page::kMaxRegularHeapObjectSize puts a limit on
   // permissible values (see the ASSERT in heap.cc).
   static const int kInitialMaxFastElementArray = 100000;

=======================================
--- /trunk/src/runtime.cc       Thu Jan 23 09:38:20 2014 UTC
+++ /trunk/src/runtime.cc       Fri Jan 24 01:05:19 2014 UTC
@@ -8744,12 +8744,21 @@

 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetAllocationTimeout) {
   SealHandleScope shs(isolate);
-  ASSERT(args.length() == 2);
+  ASSERT(args.length() == 2 || args.length() == 3);
 #ifdef DEBUG
   CONVERT_SMI_ARG_CHECKED(interval, 0);
   CONVERT_SMI_ARG_CHECKED(timeout, 1);
   isolate->heap()->set_allocation_timeout(timeout);
   FLAG_gc_interval = interval;
+  if (args.length() == 3) {
+    // Enable/disable inline allocation if requested.
+    CONVERT_BOOLEAN_ARG_CHECKED(inline_allocation, 2);
+    if (inline_allocation) {
+      isolate->heap()->EnableInlineAllocation();
+    } else {
+      isolate->heap()->DisableInlineAllocation();
+    }
+  }
 #endif
   return isolate->heap()->undefined_value();
 }
@@ -9757,7 +9766,7 @@
   Heap* heap = isolate->heap();
   RUNTIME_ASSERT(IsAligned(size, kPointerSize));
   RUNTIME_ASSERT(size > 0);
-  RUNTIME_ASSERT(size <= heap->MaxRegularSpaceAllocationSize());
+  RUNTIME_ASSERT(size <= Page::kMaxRegularHeapObjectSize);
   HeapObject* allocation;
   { MaybeObject* maybe_allocation = heap->AllocateRaw(size, space, space);
     if (!maybe_allocation->To(&allocation)) return maybe_allocation;
=======================================
--- /trunk/src/runtime.h        Wed Jan 15 10:29:52 2014 UTC
+++ /trunk/src/runtime.h        Fri Jan 24 01:05:19 2014 UTC
@@ -100,7 +100,7 @@
   F(GetOptimizationCount, 1, 1) \
   F(UnblockConcurrentRecompilation, 0, 1) \
   F(CompileForOnStackReplacement, 1, 1) \
-  F(SetAllocationTimeout, 2, 1) \
+  F(SetAllocationTimeout, -1 /* 2 || 3 */, 1) \
   F(AllocateInNewSpace, 1, 1) \
   F(AllocateInTargetSpace, 2, 1) \
   F(SetNativeFlag, 1, 1) \
=======================================
--- /trunk/src/spaces-inl.h     Tue Nov 12 09:05:18 2013 UTC
+++ /trunk/src/spaces-inl.h     Fri Jan 24 01:05:19 2014 UTC
@@ -165,7 +165,7 @@
                        Executability executable,
                        PagedSpace* owner) {
   Page* page = reinterpret_cast<Page*>(chunk);
-  ASSERT(page->area_size() <= kNonCodeObjectAreaSize);
+  ASSERT(page->area_size() <= kMaxRegularHeapObjectSize);
   ASSERT(chunk->owner() == owner);
   owner->IncreaseCapacity(page->area_size());
   owner->Free(page->area_start(), page->area_size());
=======================================
--- /trunk/src/spaces.h Wed Jan 22 10:50:56 2014 UTC
+++ /trunk/src/spaces.h Fri Jan 24 01:05:19 2014 UTC
@@ -103,7 +103,7 @@
   ASSERT((OffsetFrom(address) & kObjectAlignmentMask) == 0)

#define ASSERT_OBJECT_SIZE(size) \
-  ASSERT((0 < size) && (size <= Page::kMaxNonCodeHeapObjectSize))
+  ASSERT((0 < size) && (size <= Page::kMaxRegularHeapObjectSize))

#define ASSERT_PAGE_OFFSET(offset) \ ASSERT((Page::kObjectStartOffset <= offset) \
@@ -779,15 +779,11 @@
   // Page size in bytes.  This must be a multiple of the OS page size.
   static const int kPageSize = 1 << kPageSizeBits;

-  // Object area size in bytes.
-  static const int kNonCodeObjectAreaSize = kPageSize - kObjectStartOffset;
-
   // Maximum object size that fits in a page. Objects larger than that size
// are allocated in large object space and are never moved in memory. This
   // also applies to new space allocation, since objects are never migrated
// from new space to large object space. Takes double alignment into account.
-  static const int kMaxNonCodeHeapObjectSize =
-      kNonCodeObjectAreaSize - kPointerSize;
+ static const int kMaxRegularHeapObjectSize = kPageSize - kObjectStartOffset;

   // Page size mask.
   static const intptr_t kPageAlignmentMask = (1 << kPageSizeBits) - 1;
@@ -1080,7 +1076,7 @@

   // Returns maximum available bytes that the old space can have.
   intptr_t MaxAvailable() {
- return (Available() / Page::kPageSize) * Page::kMaxNonCodeHeapObjectSize; + return (Available() / Page::kPageSize) * Page::kMaxRegularHeapObjectSize;
   }

   // Returns an indication of whether a pointer is in a space that has
@@ -1635,7 +1631,7 @@
  private:
   // The size range of blocks, in bytes.
   static const int kMinBlockSize = 3 * kPointerSize;
-  static const int kMaxBlockSize = Page::kMaxNonCodeHeapObjectSize;
+  static const int kMaxBlockSize = Page::kMaxRegularHeapObjectSize;

   FreeListNode* FindNodeFor(int size_in_bytes, int* node_size);

@@ -2013,7 +2009,7 @@
     (1 << MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING) |
     (1 << MemoryChunk::SCAN_ON_SCAVENGE);

-  static const int kAreaSize = Page::kNonCodeObjectAreaSize;
+  static const int kAreaSize = Page::kMaxRegularHeapObjectSize;

   inline NewSpacePage* next_page() const {
     return static_cast<NewSpacePage*>(next_chunk());
@@ -2673,7 +2669,7 @@
   virtual void VerifyObject(HeapObject* obj);

  private:
- static const int kMapsPerPage = Page::kNonCodeObjectAreaSize / Map::kSize; + static const int kMapsPerPage = Page::kMaxRegularHeapObjectSize / Map::kSize;

   // Do map space compaction if there is a page gap.
   int CompactionThreshold() {
=======================================
--- /trunk/src/stub-cache.cc    Thu Jan 23 09:38:20 2014 UTC
+++ /trunk/src/stub-cache.cc    Fri Jan 24 01:05:19 2014 UTC
@@ -1280,41 +1280,6 @@
   __ InvokeFunction(actual_closure, expected, arguments(),
                     JUMP_FUNCTION, NullCallWrapper());
 }
-
-
-Handle<Code> CallStubCompiler::CompileArrayPushCall(
-    Handle<Object> object,
-    Handle<JSObject> holder,
-    Handle<Cell> cell,
-    Handle<JSFunction> function,
-    Handle<String> name,
-    Code::StubType type) {
- // If object is not an array or is observed or sealed, bail out to regular
-  // call.
-  if (!object->IsJSArray() ||
-      !cell.is_null() ||
-      Handle<JSArray>::cast(object)->map()->is_observed() ||
-      !Handle<JSArray>::cast(object)->map()->is_extensible()) {
-    return Handle<Code>::null();
-  }
-
-  Label miss;
-
-  HandlerFrontendHeader(object, holder, name, RECEIVER_MAP_CHECK, &miss);
-
-  Handle<Map> map(Handle<JSArray>::cast(object)->map());
-  ElementsKind elements_kind = map->elements_kind();
-  const int argc = arguments().immediate();
-
-  ArrayPushStub stub(elements_kind, argc);
-  Handle<Code> code = stub.GetCode(isolate());
-  StubCompiler::GenerateTailCall(masm(), code);
-
-  HandlerFrontendFooter(&miss);
-
-  // Return the generated code.
-  return GetCode(type, name);
-}


 Handle<Code> CallStubCompiler::CompileCallConstant(
@@ -1913,13 +1878,6 @@


bool CallStubCompiler::HasCustomCallGenerator(Handle<JSFunction> function) {
-  if (function->shared()->HasBuiltinFunctionId()) {
-    BuiltinFunctionId id = function->shared()->builtin_function_id();
-#define CALL_GENERATOR_CASE(name) if (id == k##name) return true;
-    CUSTOM_CALL_IC_GENERATORS(CALL_GENERATOR_CASE)
-#undef CALL_GENERATOR_CASE
-  }
-
   CallOptimization optimization(function);
   return optimization.is_simple_api_call();
 }
@@ -1933,21 +1891,6 @@
     Handle<String> fname,
     Code::StubType type) {
   ASSERT(HasCustomCallGenerator(function));
-
-  if (function->shared()->HasBuiltinFunctionId()) {
-    BuiltinFunctionId id = function->shared()->builtin_function_id();
-#define CALL_GENERATOR_CASE(name)                               \
-    if (id == k##name) {                                        \
-      return CallStubCompiler::Compile##name##Call(object,      \
-                                                   holder,      \
-                                                   cell,        \
-                                                   function,    \
-                                                   fname,       \
-                                                   type);       \
-    }
-    CUSTOM_CALL_IC_GENERATORS(CALL_GENERATOR_CASE)
-#undef CALL_GENERATOR_CASE
-  }
   CallOptimization optimization(function);
   ASSERT(optimization.is_simple_api_call());
   return CompileFastApiCall(optimization,
=======================================
--- /trunk/src/stub-cache.h     Thu Jan 23 09:38:20 2014 UTC
+++ /trunk/src/stub-cache.h     Fri Jan 24 01:05:19 2014 UTC
@@ -868,12 +868,6 @@
 };


-// Subset of FUNCTIONS_WITH_ID_LIST with custom constant/global call
-// IC stubs.
-#define CUSTOM_CALL_IC_GENERATORS(V)            \
-  V(ArrayPush)
-
-
 class CallStubCompiler: public StubCompiler {
  public:
   CallStubCompiler(Isolate* isolate,
@@ -940,16 +934,6 @@
                                  Handle<String> name,
                                  Code::StubType type);

-#define DECLARE_CALL_GENERATOR(name)                                    \
-  Handle<Code> Compile##name##Call(Handle<Object> object,               \
-                                   Handle<JSObject> holder,             \
-                                   Handle<Cell> cell,                   \
-                                   Handle<JSFunction> function,         \
-                                   Handle<String> fname,                \
-                                   Code::StubType type);
-  CUSTOM_CALL_IC_GENERATORS(DECLARE_CALL_GENERATOR)
-#undef DECLARE_CALL_GENERATOR
-
   Handle<Code> CompileFastApiCall(const CallOptimization& optimization,
                                   Handle<Object> object,
                                   Handle<JSObject> holder,
=======================================
--- /trunk/src/version.cc       Thu Jan 23 17:24:54 2014 UTC
+++ /trunk/src/version.cc       Fri Jan 24 01:05:19 2014 UTC
@@ -34,8 +34,8 @@
 // system so their names cannot be changed without changing the scripts.
 #define MAJOR_VERSION     3
 #define MINOR_VERSION     24
-#define BUILD_NUMBER      22
-#define PATCH_LEVEL       1
+#define BUILD_NUMBER      23
+#define PATCH_LEVEL       0
 // Use 1 for candidates and 0 otherwise.
 // (Boolean macro values are not supported by all preprocessors.)
 #define IS_CANDIDATE_VERSION 0
=======================================
--- /trunk/src/x64/code-stubs-x64.cc    Thu Jan 23 09:38:20 2014 UTC
+++ /trunk/src/x64/code-stubs-x64.cc    Fri Jan 24 01:05:19 2014 UTC
@@ -418,6 +418,20 @@
     descriptor->register_params_ = registers;
     descriptor->param_representations_ = representations;
   }
+  {
+    CallInterfaceDescriptor* descriptor =
+        isolate->call_descriptor(Isolate::CallHandler);
+    static Register registers[] = { rsi,  // context
+                                    rdx,  // receiver
+    };
+    static Representation representations[] = {
+        Representation::Tagged(),  // context
+        Representation::Tagged(),  // receiver
+    };
+    descriptor->register_param_count_ = 2;
+    descriptor->register_params_ = registers;
+    descriptor->param_representations_ = representations;
+  }
 }


=======================================
--- /trunk/src/x64/macro-assembler-x64.cc       Wed Jan 22 10:50:56 2014 UTC
+++ /trunk/src/x64/macro-assembler-x64.cc       Fri Jan 24 01:05:19 2014 UTC
@@ -4048,7 +4048,7 @@
                               Label* gc_required,
                               AllocationFlags flags) {
   ASSERT((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0);
-  ASSERT(object_size <= Page::kMaxNonCodeHeapObjectSize);
+  ASSERT(object_size <= Page::kMaxRegularHeapObjectSize);
   if (!FLAG_inline_new) {
     if (emit_debug_code()) {
       // Trash the registers to simulate an allocation failure.
=======================================
--- /trunk/test/cctest/test-alloc.cc    Mon Nov 25 12:01:13 2013 UTC
+++ /trunk/test/cctest/test-alloc.cc    Fri Jan 24 01:05:19 2014 UTC
@@ -198,11 +198,11 @@
     if (current_allocated < code_range_size / 10) {
       // Allocate a block.
       // Geometrically distributed sizes, greater than
- // Page::kMaxNonCodeHeapObjectSize (which is greater than code page area). + // Page::kMaxRegularHeapObjectSize (which is greater than code page area). // TODO(gc): instead of using 3 use some contant based on code_range_size
       // kMaxHeapObjectSize.
       size_t requested =
-          (Page::kMaxNonCodeHeapObjectSize << (Pseudorandom() % 3)) +
+          (Page::kMaxRegularHeapObjectSize << (Pseudorandom() % 3)) +
           Pseudorandom() % 5000 + 1;
       size_t allocated = 0;
       Address base = code_range.AllocateRawMemory(requested,
=======================================
--- /trunk/test/cctest/test-heap.cc     Thu Jan 23 09:38:20 2014 UTC
+++ /trunk/test/cctest/test-heap.cc     Fri Jan 24 01:05:19 2014 UTC
@@ -918,7 +918,7 @@
       factory->NewStringFromAscii(CStrVector("abcdefghij"), TENURED);

   // Allocate a large string (for large object space).
-  int large_size = Page::kMaxNonCodeHeapObjectSize + 1;
+  int large_size = Page::kMaxRegularHeapObjectSize + 1;
   char* str = new char[large_size];
   for (int i = 0; i < large_size - 1; ++i) str[i] = 'a';
   str[large_size - 1] = '\0';
@@ -987,7 +987,7 @@
   // just enough room to allocate JSObject and thus fill the newspace.

   int allocation_amount = Min(FixedArray::kMaxSize,
- Page::kMaxNonCodeHeapObjectSize + kPointerSize); + Page::kMaxRegularHeapObjectSize + kPointerSize);
   int allocation_len = LenFromSize(allocation_amount);
   NewSpace* new_space = heap->new_space();
   Address* top_addr = new_space->allocation_top_address();
=======================================
--- /trunk/test/cctest/test-mark-compact.cc     Wed Dec 18 16:23:55 2013 UTC
+++ /trunk/test/cctest/test-mark-compact.cc     Fri Jan 24 01:05:19 2014 UTC
@@ -82,7 +82,7 @@

   // Allocate a fixed array in the new space.
   int array_length =
-      (Page::kMaxNonCodeHeapObjectSize - FixedArray::kHeaderSize) /
+      (Page::kMaxRegularHeapObjectSize - FixedArray::kHeaderSize) /
       (4 * kPointerSize);
   Object* obj = heap->AllocateFixedArray(array_length)->ToObjectChecked();
   Handle<FixedArray> array(FixedArray::cast(obj));
@@ -107,7 +107,7 @@

   // Allocate a big fixed array in the new space.
   int array_length =
-      (Page::kMaxNonCodeHeapObjectSize - FixedArray::kHeaderSize) /
+      (Page::kMaxRegularHeapObjectSize - FixedArray::kHeaderSize) /
       (2 * kPointerSize);
   Object* obj = heap->AllocateFixedArray(array_length)->ToObjectChecked();
   Handle<FixedArray> array(FixedArray::cast(obj));
=======================================
--- /trunk/test/cctest/test-spaces.cc   Mon Sep 23 14:09:36 2013 UTC
+++ /trunk/test/cctest/test-spaces.cc   Fri Jan 24 01:05:19 2014 UTC
@@ -327,9 +327,9 @@
                         CcTest::heap()->ReservedSemiSpaceSize()));
   CHECK(new_space.HasBeenSetUp());

-  while (new_space.Available() >= Page::kMaxNonCodeHeapObjectSize) {
+  while (new_space.Available() >= Page::kMaxRegularHeapObjectSize) {
     Object* obj =
-        new_space.AllocateRaw(Page::kMaxNonCodeHeapObjectSize)->
+        new_space.AllocateRaw(Page::kMaxRegularHeapObjectSize)->
         ToObjectUnchecked();
     CHECK(new_space.Contains(HeapObject::cast(obj)));
   }
@@ -359,7 +359,7 @@
   CHECK(s->SetUp());

   while (s->Available() > 0) {
-    s->AllocateRaw(Page::kMaxNonCodeHeapObjectSize)->ToObjectUnchecked();
+    s->AllocateRaw(Page::kMaxRegularHeapObjectSize)->ToObjectUnchecked();
   }

   s->TearDown();
=======================================
--- /trunk/test/mjsunit/allocation-folding.js   Mon Nov 18 08:53:19 2013 UTC
+++ /trunk/test/mjsunit/allocation-folding.js   Fri Jan 24 01:05:19 2014 UTC
@@ -101,8 +101,7 @@
 assertEquals(result[1], 4);
 assertEquals(result2[1], 6);

-// Test to exceed the Heap::MaxRegularSpaceAllocationSize limit but not
-// the Page::kMaxNonCodeHeapObjectSize limit with allocation folding.
+// Test to almost exceed the Page::MaxRegularHeapObjectSize limit.

 function boom() {
   var a1 = new Array(84632);
=======================================
--- /trunk/test/mjsunit/fuzz-natives-part1.js   Mon Dec 23 16:17:49 2013 UTC
+++ /trunk/test/mjsunit/fuzz-natives-part1.js   Fri Jan 24 01:05:19 2014 UTC
@@ -171,6 +171,7 @@

   // Vararg with minimum number > 0.
   "Call": true,
+  "SetAllocationTimeout": true,

   // Requires integer arguments to be non-negative.
   "Apply": true,
=======================================
--- /trunk/test/mjsunit/fuzz-natives-part2.js   Mon Dec 23 16:17:49 2013 UTC
+++ /trunk/test/mjsunit/fuzz-natives-part2.js   Fri Jan 24 01:05:19 2014 UTC
@@ -172,6 +172,7 @@

   // Vararg with minimum number > 0.
   "Call": true,
+  "SetAllocationTimeout": true,

   // Requires integer arguments to be non-negative.
   "Apply": true,
=======================================
--- /trunk/test/mjsunit/fuzz-natives-part3.js   Mon Dec 23 16:17:49 2013 UTC
+++ /trunk/test/mjsunit/fuzz-natives-part3.js   Fri Jan 24 01:05:19 2014 UTC
@@ -171,6 +171,7 @@

   // Vararg with minimum number > 0.
   "Call": true,
+  "SetAllocationTimeout": true,

   // Requires integer arguments to be non-negative.
   "Apply": true,
=======================================
--- /trunk/test/mjsunit/fuzz-natives-part4.js   Mon Dec 23 16:17:49 2013 UTC
+++ /trunk/test/mjsunit/fuzz-natives-part4.js   Fri Jan 24 01:05:19 2014 UTC
@@ -171,6 +171,7 @@

   // Vararg with minimum number > 0.
   "Call": true,
+  "SetAllocationTimeout": true,

   // Requires integer arguments to be non-negative.
   "Apply": true,
=======================================
--- /trunk/test/mjsunit/object-seal.js  Mon Dec  2 10:46:30 2013 UTC
+++ /trunk/test/mjsunit/object-seal.js  Fri Jan 24 01:05:19 2014 UTC
@@ -251,8 +251,7 @@
 Object.seal(obj);
 assertThrows(function() { push_call(obj); }, TypeError);
 assertThrows(function() { shift_call(obj); }, TypeError);
-assertOptimized(push_call);
-// shift() doesn't have a custom call generator, so deopt will occur.
+assertUnoptimized(push_call);
 assertUnoptimized(shift_call);
 assertDoesNotThrow(function() { push_call(objControl); });
 assertDoesNotThrow(function() { shift_call(objControl); });
=======================================
--- /trunk/test/mjsunit/regress/regress-3027.js Thu Nov 28 13:42:41 2013 UTC
+++ /trunk/test/mjsunit/regress/regress-3027.js Fri Jan 24 01:05:19 2014 UTC
@@ -25,7 +25,7 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-// Test to exceed the Heap::MaxRegularSpaceAllocationSize with an array
+// Test to exceed the Page::MaxRegularHeapObjectSize with an array
 // constructor call taking many arguments.

 function boom() {
=======================================
--- /trunk/tools/push-to-trunk/push_to_trunk.py Mon Jan 20 07:57:28 2014 UTC
+++ /trunk/tools/push-to-trunk/push_to_trunk.py Fri Jan 24 01:05:19 2014 UTC
@@ -256,7 +256,8 @@
     if self.Git("cl presubmit", "PRESUBMIT_TREE_CHECK=\"skip\"") is None:
       self.Die("'git cl presubmit' failed, please try again.")

-    if self.Git("cl dcommit -f --bypass-hooks") is None:
+    if self.Git("cl dcommit -f --bypass-hooks",
+                retry_on=lambda x: x is None) is None:
       self.Die("'git cl dcommit' failed, please try again.")


@@ -291,6 +292,15 @@
     # Remove date and trailing white space.
     text = re.sub(r"^%s: " % self._state["date"], "", text.rstrip())

+ # Retrieve svn revision for showing the used bleeding edge revision in the
+    # commit message.
+    args = "svn find-rev %s" % self._state["prepare_commit_hash"]
+    svn_revision = self.Git(args).strip()
+    self.Persist("svn_revision", svn_revision)
+    text = MSub(r"^(Version \d+\.\d+\.\d+)$",
+                "\\1 (based on bleeding_edge revision r%s)" % svn_revision,
+                text)
+
# Remove indentation and merge paragraphs into single long lines, keeping
     # empty lines between them.
     def SplitMapJoin(split_text, fun, join_text):
@@ -366,7 +376,7 @@
   MESSAGE = "Commit to SVN."

   def RunStep(self):
-    result = self.Git("svn dcommit 2>&1")
+    result = self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None)
     if not result:
       self.Die("'git svn dcommit' failed.")
     result = filter(lambda x: re.search(r"^Committed r[0-9]+", x),
@@ -395,7 +405,8 @@
     ver = "%s.%s.%s" % (self._state["major"],
                         self._state["minor"],
                         self._state["build"])
- if self.Git("svn tag %s -m \"Tagging version %s\"" % (ver, ver)) is None:
+    if self.Git("svn tag %s -m \"Tagging version %s\"" % (ver, ver),
+                retry_on=lambda x: x is None) is None:
       self.Die("'git svn tag' failed.")


@@ -475,7 +486,10 @@
print "Please enter the email address of a reviewer for the roll CL: ",
       self.DieNoManualMode("A reviewer must be specified in forced mode.")
       rev = self.ReadLine()
-    args = "commit -am \"Update V8 to version %s.\n\nTBR=%s\"" % (ver, rev)
+    self.RestoreIfUnset("svn_revision")
+    args = ("commit -am \"Update V8 to version %s "
+            "(based on bleeding_edge revision r%s).\n\nTBR=%s\""
+            % (ver, self._state["svn_revision"], rev))
     if self.Git(args) is None:
       self.Die("'git commit' failed.")
     force_flag = " -f" if self._options.force_upload else ""
=======================================
--- /trunk/tools/push-to-trunk/test_scripts.py  Mon Jan 20 07:57:28 2014 UTC
+++ /trunk/tools/push-to-trunk/test_scripts.py  Fri Jan 24 01:05:19 2014 UTC
@@ -28,6 +28,7 @@

 import os
 import tempfile
+import traceback
 import unittest

 import common_includes
@@ -247,7 +248,11 @@
# The expectation list contains a mandatory return value and an optional
     # callback for checking the context at the time of the call.
     if len(expected_call) == len(args) + 2:
-      expected_call[len(args) + 1]()
+      try:
+        expected_call[len(args) + 1]()
+      except:
+        tb = traceback.format_exc()
+        raise NoRetryException("Caught exception from callback: %s" % tb)
     return_value = expected_call[len(args)]

     # If the return value is an exception, raise it instead of returning.
@@ -563,6 +568,7 @@

     self.ExpectGit([
       ["diff svn/trunk hash1", "patch content"],
+      ["svn find-rev hash1", "123455\n"],
     ])

     self.MakeStep().Persist("prepare_commit_hash", "hash1")
@@ -581,7 +587,7 @@
         Chromium issue 12345

         Performance and stability improvements on all platforms.\n"""
-    commit_msg = """Version 3.22.5
+ commit_msg = """Version 3.22.5 (based on bleeding_edge revision r123455)

 Log text 1. Chromium issue 12345

@@ -595,7 +601,7 @@
         12345).

         Performance and stability improvements on all platforms.\n"""
-    commit_msg = """Version 3.22.5
+ commit_msg = """Version 3.22.5 (based on bleeding_edge revision r123455)

Long commit message that fills more than 80 characters (Chromium issue 12345).

@@ -631,13 +637,14 @@
       version = FileToText(TEST_CONFIG[VERSION_FILE])
       self.assertTrue(re.search(r"#define BUILD_NUMBER\s+6", version))

-    def CheckUpload():
-      cl = FileToText(TEST_CONFIG[CHANGELOG_FILE])
-
     def CheckSVNCommit():
       commit = FileToText(TEST_CONFIG[COMMITMSG_FILE])
-      self.assertTrue(re.search(r"Version 3.22.5", commit))
-      self.assertTrue(re.search(r"Log text 1 \(issue 321\).", commit))
+      self.assertEquals(
+"""Version 3.22.5 (based on bleeding_edge revision r123455)
+
+Log text 1 (issue 321).
+
+Performance and stability improvements on all platforms.""", commit)
       version = FileToText(TEST_CONFIG[VERSION_FILE])
       self.assertTrue(re.search(r"#define MINOR_VERSION\s+22", version))
       self.assertTrue(re.search(r"#define BUILD_NUMBER\s+5", version))
@@ -676,6 +683,7 @@
         "Now working on version 3.22.6.\""),
        "hash1\n"],
       ["diff svn/trunk hash1", "patch content\n"],
+      ["svn find-rev hash1", "123455\n"],
       ["checkout -b %s svn/trunk" % TEST_CONFIG[TRUNKBRANCH], ""],
       ["apply --index --reject  \"%s\"" % TEST_CONFIG[PATCH_FILE], ""],
       ["add \"%s\"" % TEST_CONFIG[VERSION_FILE], ""],
@@ -686,7 +694,8 @@
       ["checkout master", ""],
       ["pull", ""],
       ["checkout -b v8-roll-123456", ""],
-      [("commit -am \"Update V8 to version 3.22.5.\n\n"
+      [("commit -am \"Update V8 to version 3.22.5 "
+        "(based on bleeding_edge revision r123455).\n\n"
         "[email protected]\""),
        ""],
       ["cl upload --send-mail%s" % force_flag, ""],

--
--
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