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

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

Issue 964783002: X87: Move Maps' back pointers from "transitions" to "constructor" field. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/x87/macro-assembler-x87.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/macro-assembler-x87.cc
diff --git a/src/x87/macro-assembler-x87.cc b/src/x87/macro-assembler-x87.cc
index 41b93d92398e7bc1ad69870e376d3ad2ce154f8a..47713b8e3ccb36ae8bbdc95d42c48deeb2faa1bf 100644
--- a/src/x87/macro-assembler-x87.cc
+++ b/src/x87/macro-assembler-x87.cc
@@ -1883,6 +1883,20 @@ void MacroAssembler::NegativeZeroTest(Register result,
}
+void MacroAssembler::GetMapConstructor(Register result, Register map,
+ Register temp) {
+ Label done, loop;
+ mov(result, FieldOperand(map, Map::kConstructorOrBackPointerOffset));
+ bind(&loop);
+ JumpIfSmi(result, &done);
+ CmpObjectType(result, MAP_TYPE, temp);
+ j(not_equal, &done);
+ mov(result, FieldOperand(result, Map::kConstructorOrBackPointerOffset));
+ jmp(&loop);
+ bind(&done);
+}
+
+
void MacroAssembler::TryGetFunctionPrototype(Register function,
Register result,
Register scratch,
@@ -1934,7 +1948,7 @@ void MacroAssembler::TryGetFunctionPrototype(Register function,
// Non-instance prototype: Fetch prototype from constructor field
// in initial map.
bind(&non_instance);
- mov(result, FieldOperand(result, Map::kConstructorOffset));
+ GetMapConstructor(result, result, scratch);
}
// All done.
« no previous file with comments | « src/x87/macro-assembler-x87.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698