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

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

Issue 1153403002: [turbofan] Simplify graph construction for for-in. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/compiler/ast-graph-builder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-array.cc
diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc
index b6e8494edccc539c5808c4abf32875a41bfb6ab9..06cfa05fe40ba473e88c4261420a08065574a704 100644
--- a/src/runtime/runtime-array.cc
+++ b/src/runtime/runtime-array.cc
@@ -1318,14 +1318,9 @@ RUNTIME_FUNCTION_RETURN_PAIR(Runtime_ForInInit) {
Handle<Object> cache_type = args.at<Object>(1);
if (cache_type->IsMap()) {
// Enum cache case.
- if (Map::EnumLengthBits::decode(Map::cast(*cache_type)->bit_field3()) ==
- 0) {
- // 0 length enum.
- // Can't handle this case in the graph builder,
- // so transform it into the empty fixed array case.
- return MakePair(isolate->heap()->empty_fixed_array(), Smi::FromInt(1));
- }
- return MakePair(object->map()->instance_descriptors()->GetEnumCache(),
+ return MakePair(Map::cast(*cache_type)->EnumLength() != 0
+ ? object->map()->instance_descriptors()->GetEnumCache()
+ : isolate->heap()->empty_fixed_array(),
*cache_type);
} else {
// FixedArray case.
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698