Commit 7c55f645 authored by ishell@chromium.org's avatar ishell@chromium.org

Cleanup after inobject slack tracking improvement.

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

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/289283018

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 238a2489
...@@ -472,6 +472,8 @@ Handle<JSFunction> Genesis::CreateEmptyFunction(Isolate* isolate) { ...@@ -472,6 +472,8 @@ Handle<JSFunction> Genesis::CreateEmptyFunction(Isolate* isolate) {
factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
object_fun->set_initial_map(*object_function_map); object_fun->set_initial_map(*object_function_map);
object_function_map->set_constructor(*object_fun); object_function_map->set_constructor(*object_fun);
object_function_map->set_unused_property_fields(
JSObject::kInitialGlobalObjectUnusedPropertiesCount);
native_context()->set_object_function(*object_fun); native_context()->set_object_function(*object_fun);
......
...@@ -240,8 +240,6 @@ class IncrementalMarkingMarkingVisitor ...@@ -240,8 +240,6 @@ class IncrementalMarkingMarkingVisitor
HeapObject::RawField(object, JSWeakCollection::kSize)); HeapObject::RawField(object, JSWeakCollection::kSize));
} }
static void BeforeVisitingSharedFunctionInfo(HeapObject* object) {}
INLINE(static void VisitPointer(Heap* heap, Object** p)) { INLINE(static void VisitPointer(Heap* heap, Object** p)) {
Object* obj = *p; Object* obj = *p;
if (obj->IsHeapObject()) { if (obj->IsHeapObject()) {
......
...@@ -1472,11 +1472,6 @@ class MarkCompactMarkingVisitor ...@@ -1472,11 +1472,6 @@ class MarkCompactMarkingVisitor
return true; return true;
} }
INLINE(static void BeforeVisitingSharedFunctionInfo(HeapObject* object)) {
SharedFunctionInfo* shared = SharedFunctionInfo::cast(object);
shared->BeforeVisitingPointers();
}
static void VisitWeakCollection(Map* map, HeapObject* object) { static void VisitWeakCollection(Map* map, HeapObject* object) {
MarkCompactCollector* collector = map->GetHeap()->mark_compact_collector(); MarkCompactCollector* collector = map->GetHeap()->mark_compact_collector();
JSWeakCollection* weak_collection = JSWeakCollection* weak_collection =
......
...@@ -5231,10 +5231,6 @@ BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_cache, kDontCache) ...@@ -5231,10 +5231,6 @@ BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_cache, kDontCache)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_flush, kDontFlush) BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_flush, kDontFlush)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_generator, kIsGenerator) BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_generator, kIsGenerator)
void SharedFunctionInfo::BeforeVisitingPointers() {
}
ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset)
ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset)
......
...@@ -794,7 +794,6 @@ bool StaticMarkingVisitor<StaticVisitor>::IsFlushable( ...@@ -794,7 +794,6 @@ bool StaticMarkingVisitor<StaticVisitor>::IsFlushable(
template<typename StaticVisitor> template<typename StaticVisitor>
void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfoStrongCode( void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfoStrongCode(
Heap* heap, HeapObject* object) { Heap* heap, HeapObject* object) {
StaticVisitor::BeforeVisitingSharedFunctionInfo(object);
Object** start_slot = Object** start_slot =
HeapObject::RawField(object, HeapObject::RawField(object,
SharedFunctionInfo::BodyDescriptor::kStartOffset); SharedFunctionInfo::BodyDescriptor::kStartOffset);
...@@ -808,7 +807,6 @@ void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfoStrongCode( ...@@ -808,7 +807,6 @@ void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfoStrongCode(
template<typename StaticVisitor> template<typename StaticVisitor>
void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfoWeakCode( void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfoWeakCode(
Heap* heap, HeapObject* object) { Heap* heap, HeapObject* object) {
StaticVisitor::BeforeVisitingSharedFunctionInfo(object);
Object** name_slot = Object** name_slot =
HeapObject::RawField(object, SharedFunctionInfo::kNameOffset); HeapObject::RawField(object, SharedFunctionInfo::kNameOffset);
StaticVisitor::VisitPointer(heap, name_slot); StaticVisitor::VisitPointer(heap, name_slot);
......
...@@ -2635,6 +2635,10 @@ class JSObject: public JSReceiver { ...@@ -2635,6 +2635,10 @@ class JSObject: public JSReceiver {
// permissible values (see the ASSERT in heap.cc). // permissible values (see the ASSERT in heap.cc).
static const int kInitialMaxFastElementArray = 100000; 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 kFastPropertiesSoftLimit = 12;
static const int kMaxFastProperties = 128; static const int kMaxFastProperties = 128;
static const int kMaxInstanceSize = 255 * kPointerSize; static const int kMaxInstanceSize = 255 * kPointerSize;
...@@ -6966,10 +6970,6 @@ class SharedFunctionInfo: public HeapObject { ...@@ -6966,10 +6970,6 @@ class SharedFunctionInfo: public HeapObject {
// TypeFeedbackInfo::feedback_vector, but the allocation is done here. // TypeFeedbackInfo::feedback_vector, but the allocation is done here.
DECL_ACCESSORS(feedback_vector, FixedArray) 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. // [instance class name]: class name for instances.
DECL_ACCESSORS(instance_class_name, Object) DECL_ACCESSORS(instance_class_name, Object)
......
...@@ -3118,23 +3118,6 @@ RUNTIME_FUNCTION(Runtime_SetCode) { ...@@ -3118,23 +3118,6 @@ RUNTIME_FUNCTION(Runtime_SetCode) {
} }
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) { RUNTIME_FUNCTION(RuntimeHidden_CreateJSGeneratorObject) {
HandleScope scope(isolate); HandleScope scope(isolate);
ASSERT(args.length() == 0); ASSERT(args.length() == 0);
......
...@@ -200,7 +200,6 @@ namespace internal { ...@@ -200,7 +200,6 @@ namespace internal {
F(GetV8Version, 0, 1) \ F(GetV8Version, 0, 1) \
\ \
F(SetCode, 2, 1) \ F(SetCode, 2, 1) \
F(SetExpectedNumberOfProperties, 2, 1) \
\ \
F(CreateApiFunction, 2, 1) \ F(CreateApiFunction, 2, 1) \
F(IsTemplate, 1, 1) \ F(IsTemplate, 1, 1) \
......
...@@ -1396,7 +1396,6 @@ function SetUpObject() { ...@@ -1396,7 +1396,6 @@ function SetUpObject() {
%SetNativeFlag($Object); %SetNativeFlag($Object);
%SetCode($Object, ObjectConstructor); %SetCode($Object, ObjectConstructor);
%SetExpectedNumberOfProperties($Object, 4);
%SetProperty($Object.prototype, "constructor", $Object, DONT_ENUM); %SetProperty($Object.prototype, "constructor", $Object, DONT_ENUM);
......
// 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);
...@@ -47,8 +47,8 @@ EXPAND_MACROS = [ ...@@ -47,8 +47,8 @@ EXPAND_MACROS = [
# that the parser doesn't bit-rot. Change the values as needed when you add, # 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 # remove or change runtime functions, but make sure we don't lose our ability
# to parse them! # to parse them!
EXPECTED_FUNCTION_COUNT = 359 EXPECTED_FUNCTION_COUNT = 358
EXPECTED_FUZZABLE_COUNT = 326 EXPECTED_FUZZABLE_COUNT = 325
EXPECTED_CCTEST_COUNT = 6 EXPECTED_CCTEST_COUNT = 6
EXPECTED_UNKNOWN_COUNT = 5 EXPECTED_UNKNOWN_COUNT = 5
EXPECTED_BUILTINS_COUNT = 781 EXPECTED_BUILTINS_COUNT = 781
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment