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

Unified Diff: src/arm64/macro-assembler-arm64.cc

Issue 1516433005: [contexts] Place the initial JSArray maps on the native context directly. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment. Created 5 years 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/arm/macro-assembler-arm.cc ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/macro-assembler-arm64.cc
diff --git a/src/arm64/macro-assembler-arm64.cc b/src/arm64/macro-assembler-arm64.cc
index b5d52bdf3d0fe0ea345b0d7a17b1f3947a431484..bc6882573d580303cce93e823854ae07f31e00e3 100644
--- a/src/arm64/macro-assembler-arm64.cc
+++ b/src/arm64/macro-assembler-arm64.cc
@@ -4471,16 +4471,19 @@ void MacroAssembler::LoadTransitionedArrayMapConditional(
Register scratch1,
Register scratch2,
Label* no_map_match) {
+ DCHECK(IsFastElementsKind(expected_kind));
+ DCHECK(IsFastElementsKind(transitioned_kind));
+
// Check that the function's map is the same as the expected cached map.
- LoadNativeContextSlot(Context::JS_ARRAY_MAPS_INDEX, scratch1);
- int offset = (expected_kind * kPointerSize) + FixedArrayBase::kHeaderSize;
- Ldr(scratch2, FieldMemOperand(scratch1, offset));
+ Ldr(scratch1, NativeContextMemOperand());
+ Ldr(scratch2,
+ ContextMemOperand(scratch1, Context::ArrayMapIndex(expected_kind)));
Cmp(map_in_out, scratch2);
B(ne, no_map_match);
// Use the transitioned cached map.
- offset = (transitioned_kind * kPointerSize) + FixedArrayBase::kHeaderSize;
- Ldr(map_in_out, FieldMemOperand(scratch1, offset));
+ Ldr(map_in_out,
+ ContextMemOperand(scratch1, Context::ArrayMapIndex(transitioned_kind)));
}
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698