Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1258)

Unified Diff: src/runtime/runtime-interpreter.cc

Issue 1576093004: [Interpreter] Add ForInPrepare runtime function which returns a ObjectTriple. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add MIPS port Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-forin.cc ('k') | src/runtime/runtime-utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-interpreter.cc
diff --git a/src/runtime/runtime-interpreter.cc b/src/runtime/runtime-interpreter.cc
index d061a4916dcd8f5230488030833a66b85c309e5a..96ebe5d4d3f48cfe77ab1239e8ef0c530a1a213d 100644
--- a/src/runtime/runtime-interpreter.cc
+++ b/src/runtime/runtime-interpreter.cc
@@ -147,56 +147,5 @@ RUNTIME_FUNCTION(Runtime_InterpreterNewClosure) {
shared, context, static_cast<PretenureFlag>(pretenured_flag));
}
-
-RUNTIME_FUNCTION(Runtime_InterpreterForInPrepare) {
- HandleScope scope(isolate);
- DCHECK_EQ(1, args.length());
- CONVERT_ARG_HANDLE_CHECKED(JSReceiver, receiver, 0);
-
- Object* property_names = Runtime_GetPropertyNamesFast(
- 1, Handle<Object>::cast(receiver).location(), isolate);
- if (isolate->has_pending_exception()) {
- return property_names;
- }
-
- Handle<Object> cache_type(property_names, isolate);
- Handle<FixedArray> cache_array;
- int cache_length;
-
- Handle<Map> receiver_map = handle(receiver->map(), isolate);
- if (cache_type->IsMap()) {
- Handle<Map> cache_type_map =
- handle(Handle<Map>::cast(cache_type)->map(), isolate);
- DCHECK(cache_type_map.is_identical_to(isolate->factory()->meta_map()));
- int enum_length = cache_type_map->EnumLength();
- DescriptorArray* descriptors = receiver_map->instance_descriptors();
- if (enum_length > 0 && descriptors->HasEnumCache()) {
- cache_array = handle(descriptors->GetEnumCache(), isolate);
- cache_length = cache_array->length();
- } else {
- cache_array = isolate->factory()->empty_fixed_array();
- cache_length = 0;
- }
- } else {
- cache_array = Handle<FixedArray>::cast(cache_type);
- cache_length = cache_array->length();
-
- STATIC_ASSERT(JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE);
- if (receiver_map->instance_type() == JS_PROXY_TYPE) {
- // Zero indicates proxy
- cache_type = Handle<Object>(Smi::FromInt(0), isolate);
- } else {
- // One entails slow check
- cache_type = Handle<Object>(Smi::FromInt(1), isolate);
- }
- }
-
- Handle<FixedArray> result = isolate->factory()->NewFixedArray(3);
- result->set(0, *cache_type);
- result->set(1, *cache_array);
- result->set(2, Smi::FromInt(cache_length));
- return *result;
-}
-
} // namespace internal
} // namespace v8
« no previous file with comments | « src/runtime/runtime-forin.cc ('k') | src/runtime/runtime-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698