From d0bbd542820c3d3a9e1044495959a2f90a9d44db Mon Sep 17 00:00:00 2001 From: bmeurer Date: Mon, 10 Aug 2015 04:18:22 -0700 Subject: [PATCH] [runtime] Remove obsolete %GetPropertyNames runtime entry. R=yangguo@chromium.org Review URL: https://codereview.chromium.org/1281533003 Cr-Commit-Position: refs/heads/master@{#30086} --- src/counters.h | 1 - src/runtime/runtime-object.cc | 24 ++++-------------------- src/runtime/runtime.h | 1 - test/mjsunit/unbox-double-arrays.js | 11 ----------- 4 files changed, 4 insertions(+), 33 deletions(-) diff --git a/src/counters.h b/src/counters.h index 80839b96d..db0c70a8f 100644 --- a/src/counters.h +++ b/src/counters.h @@ -658,7 +658,6 @@ double AggregatedMemoryHistogram::Aggregate(double current_ms, SC(megamorphic_stub_cache_updates, V8.MegamorphicStubCacheUpdates) \ SC(array_function_runtime, V8.ArrayFunctionRuntime) \ SC(array_function_native, V8.ArrayFunctionNative) \ - SC(for_in, V8.ForIn) \ SC(enum_cache_hits, V8.EnumCacheHits) \ SC(enum_cache_misses, V8.EnumCacheMisses) \ SC(fast_new_closure_total, V8.FastNewClosureTotal) \ diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc index 973658902..7b937fe3d 100644 --- a/src/runtime/runtime-object.cc +++ b/src/runtime/runtime-object.cc @@ -794,26 +794,10 @@ RUNTIME_FUNCTION(Runtime_IsPropertyEnumerable) { } -RUNTIME_FUNCTION(Runtime_GetPropertyNames) { - HandleScope scope(isolate); - DCHECK(args.length() == 1); - CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0); - Handle result; - - isolate->counters()->for_in()->Increment(); - Handle elements; - ASSIGN_RETURN_FAILURE_ON_EXCEPTION( - isolate, elements, - JSReceiver::GetKeys(object, JSReceiver::INCLUDE_PROTOS)); - return *isolate->factory()->NewJSArrayWithElements(elements); -} - - -// Returns either a FixedArray as Runtime_GetPropertyNames, -// or, if the given object has an enum cache that contains -// all enumerable properties of the object and its prototypes -// have none, the map of the object. This is used to speed up -// the check for deletions during a for-in. +// Returns either a FixedArray or, if the given object has an enum cache that +// contains all enumerable properties of the object and its prototypes have +// none, the map of the object. This is used to speed up the check for +// deletions during a for-in. RUNTIME_FUNCTION(Runtime_GetPropertyNamesFast) { SealHandleScope shs(isolate); DCHECK(args.length() == 1); diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h index 7a0f14095..9c9fe9462 100644 --- a/src/runtime/runtime.h +++ b/src/runtime/runtime.h @@ -454,7 +454,6 @@ namespace internal { F(HasProperty, 2, 1) \ F(HasElement, 2, 1) \ F(IsPropertyEnumerable, 2, 1) \ - F(GetPropertyNames, 1, 1) \ F(GetPropertyNamesFast, 1, 1) \ F(GetOwnPropertyNames, 2, 1) \ F(GetOwnElementNames, 1, 1) \ diff --git a/test/mjsunit/unbox-double-arrays.js b/test/mjsunit/unbox-double-arrays.js index 5ed404025..8711ffdf3 100644 --- a/test/mjsunit/unbox-double-arrays.js +++ b/test/mjsunit/unbox-double-arrays.js @@ -489,17 +489,6 @@ test_for_in(); test_for_in(); test_for_in(); -function test_get_property_names() { - names = %GetPropertyNames(large_array3); - property_name_count = 0; - for (x in names) { property_name_count++; }; - assertEquals(26, property_name_count); -} - -test_get_property_names(); -test_get_property_names(); -test_get_property_names(); - // Test elements getters. assertEquals(expected_array_value(10), large_array3[10]); assertEquals(expected_array_value(-NaN), large_array3[2]); -- 2.34.1