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

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

Issue 950283002: Move Maps' back pointers from "transitions" to "constructor" field (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix stupidity on arm64 Created 5 years, 10 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/x64/macro-assembler-x64.h ('k') | test/mjsunit/function-prototype.js » ('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 a1172262b06cc82bd8034f5e909f7158c611abcd..295f89106f1dac07c3a62f585c9c922b0502be0c 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -3565,6 +3565,20 @@ Condition MacroAssembler::IsObjectNameType(Register heap_object,
}
+void MacroAssembler::GetMapConstructor(Register result, Register map,
+ Register temp) {
+ Label done, loop;
+ movp(result, FieldOperand(map, Map::kConstructorOrBackPointerOffset));
+ bind(&loop);
+ JumpIfSmi(result, &done);
+ CmpObjectType(result, MAP_TYPE, temp);
+ j(not_equal, &done);
+ movp(result, FieldOperand(result, Map::kConstructorOrBackPointerOffset));
+ jmp(&loop);
+ bind(&done);
+}
+
+
void MacroAssembler::TryGetFunctionPrototype(Register function,
Register result,
Label* miss,
@@ -3618,7 +3632,7 @@ void MacroAssembler::TryGetFunctionPrototype(Register function,
// Non-instance prototype: Fetch prototype from constructor field
// in initial map.
bind(&non_instance);
- movp(result, FieldOperand(result, Map::kConstructorOffset));
+ GetMapConstructor(result, result, kScratchRegister);
}
// All done.
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/mjsunit/function-prototype.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698