Reviewers: Yang,
Description:
[runtime] Remove obsolete %GetPropertyNames runtime entry.
[email protected]
Please review this at https://codereview.chromium.org/1281533003/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+4, -33 lines):
M src/counters.h
M src/runtime/runtime.h
M src/runtime/runtime-object.cc
M test/mjsunit/unbox-double-arrays.js
Index: src/counters.h
diff --git a/src/counters.h b/src/counters.h
index
80839b96d8a40f26415631c174b5feb63c8a7dd9..db0c70a8f47f7ed8ed8c76fa78f893841459bff8
100644
--- a/src/counters.h
+++ b/src/counters.h
@@ -658,7 +658,6 @@ double
AggregatedMemoryHistogram<Histogram>::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) \
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index
973658902915fb9092d2e3f30745ee90fc6cf6d1..7b937fe3d2eb129b0d3a70546946d16cfdb5cd22
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<JSArray> result;
-
- isolate->counters()->for_in()->Increment();
- Handle<FixedArray> 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);
Index: src/runtime/runtime.h
diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h
index
7a0f14095af45b5add60b87ac02834025a7cfd52..9c9fe946206639c89a757e99c956964c98fe7a57
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) \
Index: test/mjsunit/unbox-double-arrays.js
diff --git a/test/mjsunit/unbox-double-arrays.js
b/test/mjsunit/unbox-double-arrays.js
index
5ed404025f69bf08b9ced1c55d973d507590dfa1..8711ffdf3d954f98b98ae1f720e004e6647c2db6
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]);
--
--
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/d/optout.