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

Unified Diff: src/x64/macro-assembler-x64.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/runtime/runtime-literals.cc ('k') | src/x87/macro-assembler-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index e8e1c7508b2ccb427afc98aab4a934fc96bc872f..efe90044409ebeeaee9d10b59de3f0a8fc9a9071 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -5064,18 +5064,18 @@ void MacroAssembler::LoadTransitionedArrayMapConditional(
Register map_in_out,
Register scratch,
Label* no_map_match) {
- // Check that the function's map is the same as the expected cached map.
- LoadNativeContextSlot(Context::JS_ARRAY_MAPS_INDEX, scratch);
+ DCHECK(IsFastElementsKind(expected_kind));
+ DCHECK(IsFastElementsKind(transitioned_kind));
- int offset = expected_kind * kPointerSize +
- FixedArrayBase::kHeaderSize;
- cmpp(map_in_out, FieldOperand(scratch, offset));
+ // Check that the function's map is the same as the expected cached map.
+ movp(scratch, NativeContextOperand());
+ cmpp(map_in_out,
+ ContextOperand(scratch, Context::ArrayMapIndex(expected_kind)));
j(not_equal, no_map_match);
// Use the transitioned cached map.
- offset = transitioned_kind * kPointerSize +
- FixedArrayBase::kHeaderSize;
- movp(map_in_out, FieldOperand(scratch, offset));
+ movp(map_in_out,
+ ContextOperand(scratch, Context::ArrayMapIndex(transitioned_kind)));
}
« no previous file with comments | « src/runtime/runtime-literals.cc ('k') | src/x87/macro-assembler-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698