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

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

Issue 954863002: MIPS: Move Maps' back pointers from "transitions" to "constructor" field (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed mips64. 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
Index: src/mips/macro-assembler-mips.cc
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc
index 972530ee355974af4d593e50d1a26b77dd5d5deb..de3c08afff060855886bbdf8490e51fb1fad6b59 100644
--- a/src/mips/macro-assembler-mips.cc
+++ b/src/mips/macro-assembler-mips.cc
@@ -4321,6 +4321,20 @@ void MacroAssembler::IsObjectNameType(Register object,
// Support functions.
+void MacroAssembler::GetMapConstructor(Register result, Register map,
+ Register temp, Register temp2) {
+ Label done, loop;
+ lw(result, FieldMemOperand(map, Map::kConstructorOrBackPointerOffset));
+ bind(&loop);
+ JumpIfSmi(result, &done);
+ GetObjectType(result, temp, temp2);
+ Branch(&done, ne, temp2, Operand(MAP_TYPE));
+ lw(result, FieldMemOperand(result, Map::kConstructorOrBackPointerOffset));
+ Branch(&loop);
+ bind(&done);
+}
+
+
void MacroAssembler::TryGetFunctionPrototype(Register function,
Register result,
Register scratch,
@@ -4373,7 +4387,7 @@ void MacroAssembler::TryGetFunctionPrototype(Register function,
// Non-instance prototype: Fetch prototype from constructor field
// in initial map.
bind(&non_instance);
- lw(result, FieldMemOperand(result, Map::kConstructorOffset));
+ GetMapConstructor(result, result, scratch, at);
}
// All done.

Powered by Google App Engine
This is Rietveld 408576698