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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.cc

Issue 1631583002: [for-in] Further refactorings and unification around for-in. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 1073
1074 // The enum cache is valid. Load the map of the object being 1074 // The enum cache is valid. Load the map of the object being
1075 // iterated over and use the cache for the iteration. 1075 // iterated over and use the cache for the iteration.
1076 Label use_cache; 1076 Label use_cache;
1077 __ Ldr(x0, FieldMemOperand(x0, HeapObject::kMapOffset)); 1077 __ Ldr(x0, FieldMemOperand(x0, HeapObject::kMapOffset));
1078 __ B(&use_cache); 1078 __ B(&use_cache);
1079 1079
1080 // Get the set of properties to enumerate. 1080 // Get the set of properties to enumerate.
1081 __ Bind(&call_runtime); 1081 __ Bind(&call_runtime);
1082 __ Push(x0); // Duplicate the enumerable object on the stack. 1082 __ Push(x0); // Duplicate the enumerable object on the stack.
1083 __ CallRuntime(Runtime::kGetPropertyNamesFast); 1083 __ CallRuntime(Runtime::kForInEnumerate);
1084 PrepareForBailoutForId(stmt->EnumId(), TOS_REG); 1084 PrepareForBailoutForId(stmt->EnumId(), TOS_REG);
1085 1085
1086 // If we got a map from the runtime call, we can do a fast 1086 // If we got a map from the runtime call, we can do a fast
1087 // modification check. Otherwise, we got a fixed array, and we have 1087 // modification check. Otherwise, we got a fixed array, and we have
1088 // to do a slow check. 1088 // to do a slow check.
1089 Label fixed_array, no_descriptors; 1089 Label fixed_array, no_descriptors;
1090 __ Ldr(x2, FieldMemOperand(x0, HeapObject::kMapOffset)); 1090 __ Ldr(x2, FieldMemOperand(x0, HeapObject::kMapOffset));
1091 __ JumpIfNotRoot(x2, Heap::kMetaMapRootIndex, &fixed_array); 1091 __ JumpIfNotRoot(x2, Heap::kMetaMapRootIndex, &fixed_array);
1092 1092
1093 // We got a map in register x0. Get the enumeration cache from it. 1093 // We got a map in register x0. Get the enumeration cache from it.
(...skipping 3742 matching lines...) Expand 10 before | Expand all | Expand 10 after
4836 } 4836 }
4837 4837
4838 return INTERRUPT; 4838 return INTERRUPT;
4839 } 4839 }
4840 4840
4841 4841
4842 } // namespace internal 4842 } // namespace internal
4843 } // namespace v8 4843 } // namespace v8
4844 4844
4845 #endif // V8_TARGET_ARCH_ARM64 4845 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698