Revision: 21464
Author:   ish...@chromium.org
Date:     Fri May 23 12:55:57 2014 UTC
Log:      Cleanup after inobject slack tracking improvement.

1) %SetExpectedNumberOfProperties() function removed.
2) Obsolete SharedFunctionInfo::BeforeVisitingPointers() removed.

R=mstarzin...@chromium.org

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

Deleted:
/branches/bleeding_edge/test/mjsunit/runtime-gen/setexpectednumberofproperties.js
Modified:
 /branches/bleeding_edge/src/bootstrapper.cc
 /branches/bleeding_edge/src/incremental-marking.cc
 /branches/bleeding_edge/src/mark-compact.cc
 /branches/bleeding_edge/src/objects-inl.h
 /branches/bleeding_edge/src/objects-visiting-inl.h
 /branches/bleeding_edge/src/objects.h
 /branches/bleeding_edge/src/runtime.cc
 /branches/bleeding_edge/src/runtime.h
 /branches/bleeding_edge/src/v8natives.js
 /branches/bleeding_edge/tools/generate-runtime-tests.py

=======================================
--- /branches/bleeding_edge/test/mjsunit/runtime-gen/setexpectednumberofproperties.js Thu May 8 13:11:59 2014 UTC
+++ /dev/null
@@ -1,6 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
-// Flags: --allow-natives-syntax --harmony
-var _func = function() {};
-var _num = 1;
-%SetExpectedNumberOfProperties(_func, _num);
=======================================
--- /branches/bleeding_edge/src/bootstrapper.cc Thu May 22 15:27:57 2014 UTC
+++ /branches/bleeding_edge/src/bootstrapper.cc Fri May 23 12:55:57 2014 UTC
@@ -472,6 +472,8 @@
         factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
     object_fun->set_initial_map(*object_function_map);
     object_function_map->set_constructor(*object_fun);
+    object_function_map->set_unused_property_fields(
+        JSObject::kInitialGlobalObjectUnusedPropertiesCount);

     native_context()->set_object_function(*object_fun);

=======================================
--- /branches/bleeding_edge/src/incremental-marking.cc Thu May 22 09:36:20 2014 UTC +++ /branches/bleeding_edge/src/incremental-marking.cc Fri May 23 12:55:57 2014 UTC
@@ -239,8 +239,6 @@
JSWeakCollection::kPropertiesOffset),
                   HeapObject::RawField(object, JSWeakCollection::kSize));
   }
-
-  static void BeforeVisitingSharedFunctionInfo(HeapObject* object) {}

   INLINE(static void VisitPointer(Heap* heap, Object** p)) {
     Object* obj = *p;
=======================================
--- /branches/bleeding_edge/src/mark-compact.cc Fri May 23 08:52:05 2014 UTC
+++ /branches/bleeding_edge/src/mark-compact.cc Fri May 23 12:55:57 2014 UTC
@@ -1471,11 +1471,6 @@
     }
     return true;
   }
-
- INLINE(static void BeforeVisitingSharedFunctionInfo(HeapObject* object)) {
-    SharedFunctionInfo* shared = SharedFunctionInfo::cast(object);
-    shared->BeforeVisitingPointers();
-  }

   static void VisitWeakCollection(Map* map, HeapObject* object) {
MarkCompactCollector* collector = map->GetHeap()->mark_compact_collector();
=======================================
--- /branches/bleeding_edge/src/objects-inl.h   Fri May 23 08:52:05 2014 UTC
+++ /branches/bleeding_edge/src/objects-inl.h   Fri May 23 12:55:57 2014 UTC
@@ -5231,10 +5231,6 @@
 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_flush, kDontFlush)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_generator, kIsGenerator)

-void SharedFunctionInfo::BeforeVisitingPointers() {
-}
-
-
 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset)
 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset)

=======================================
--- /branches/bleeding_edge/src/objects-visiting-inl.h Thu May 22 09:36:20 2014 UTC +++ /branches/bleeding_edge/src/objects-visiting-inl.h Fri May 23 12:55:57 2014 UTC
@@ -794,7 +794,6 @@
 template<typename StaticVisitor>
void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfoStrongCode(
     Heap* heap, HeapObject* object) {
-  StaticVisitor::BeforeVisitingSharedFunctionInfo(object);
   Object** start_slot =
       HeapObject::RawField(object,
SharedFunctionInfo::BodyDescriptor::kStartOffset);
@@ -808,7 +807,6 @@
 template<typename StaticVisitor>
 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfoWeakCode(
     Heap* heap, HeapObject* object) {
-  StaticVisitor::BeforeVisitingSharedFunctionInfo(object);
   Object** name_slot =
       HeapObject::RawField(object, SharedFunctionInfo::kNameOffset);
   StaticVisitor::VisitPointer(heap, name_slot);
=======================================
--- /branches/bleeding_edge/src/objects.h       Fri May 23 09:30:47 2014 UTC
+++ /branches/bleeding_edge/src/objects.h       Fri May 23 12:55:57 2014 UTC
@@ -2635,6 +2635,10 @@
   // permissible values (see the ASSERT in heap.cc).
   static const int kInitialMaxFastElementArray = 100000;

+  // This constant applies only to the initial map of "$Object" aka
+  // "global.Object" and not to arbitrary other JSObject maps.
+  static const int kInitialGlobalObjectUnusedPropertiesCount = 4;
+
   static const int kFastPropertiesSoftLimit = 12;
   static const int kMaxFastProperties = 128;
   static const int kMaxInstanceSize = 255 * kPointerSize;
@@ -6966,10 +6970,6 @@
   // TypeFeedbackInfo::feedback_vector, but the allocation is done here.
   DECL_ACCESSORS(feedback_vector, FixedArray)

-  // Invoked before pointers in SharedFunctionInfo are being marked.
-  // Also clears the optimized code map.
-  inline void BeforeVisitingPointers();
-
   // [instance class name]: class name for instances.
   DECL_ACCESSORS(instance_class_name, Object)

=======================================
--- /branches/bleeding_edge/src/runtime.cc      Fri May 23 08:52:05 2014 UTC
+++ /branches/bleeding_edge/src/runtime.cc      Fri May 23 12:55:57 2014 UTC
@@ -3116,23 +3116,6 @@

   return *target;
 }
-
-
-RUNTIME_FUNCTION(Runtime_SetExpectedNumberOfProperties) {
-  HandleScope scope(isolate);
-  ASSERT(args.length() == 2);
-  CONVERT_ARG_HANDLE_CHECKED(JSFunction, func, 0);
-  CONVERT_SMI_ARG_CHECKED(num, 1);
-  RUNTIME_ASSERT(num >= 0);
-
-  func->shared()->set_expected_nof_properties(num);
-  if (func->has_initial_map()) {
-    Handle<Map> new_initial_map = Map::Copy(handle(func->initial_map()));
-    new_initial_map->set_unused_property_fields(num);
-    func->set_initial_map(*new_initial_map);
-  }
-  return isolate->heap()->undefined_value();
-}


 RUNTIME_FUNCTION(RuntimeHidden_CreateJSGeneratorObject) {
=======================================
--- /branches/bleeding_edge/src/runtime.h       Thu May 22 15:27:57 2014 UTC
+++ /branches/bleeding_edge/src/runtime.h       Fri May 23 12:55:57 2014 UTC
@@ -200,7 +200,6 @@
   F(GetV8Version, 0, 1) \
   \
   F(SetCode, 2, 1) \
-  F(SetExpectedNumberOfProperties, 2, 1) \
   \
   F(CreateApiFunction, 2, 1) \
   F(IsTemplate, 1, 1) \
=======================================
--- /branches/bleeding_edge/src/v8natives.js    Thu May 22 15:27:57 2014 UTC
+++ /branches/bleeding_edge/src/v8natives.js    Fri May 23 12:55:57 2014 UTC
@@ -1396,7 +1396,6 @@

   %SetNativeFlag($Object);
   %SetCode($Object, ObjectConstructor);
-  %SetExpectedNumberOfProperties($Object, 4);

   %SetProperty($Object.prototype, "constructor", $Object, DONT_ENUM);

=======================================
--- /branches/bleeding_edge/tools/generate-runtime-tests.py Thu May 22 13:59:37 2014 UTC +++ /branches/bleeding_edge/tools/generate-runtime-tests.py Fri May 23 12:55:57 2014 UTC
@@ -47,8 +47,8 @@
# that the parser doesn't bit-rot. Change the values as needed when you add, # remove or change runtime functions, but make sure we don't lose our ability
 # to parse them!
-EXPECTED_FUNCTION_COUNT = 359
-EXPECTED_FUZZABLE_COUNT = 326
+EXPECTED_FUNCTION_COUNT = 358
+EXPECTED_FUZZABLE_COUNT = 325
 EXPECTED_CCTEST_COUNT = 6
 EXPECTED_UNKNOWN_COUNT = 5
 EXPECTED_BUILTINS_COUNT = 781

--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to