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

Unified Diff: src/arm64/code-stubs-arm64.cc

Issue 879333005: Use weak cell to embed known map in CompareIC (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/code-stubs-arm64.cc
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc
index 730fdafe7205a6dd3ba50090eb223724cb6eb0fb..3fbc9f11dc00a368490bcd71afb8934b58088cd1 100644
--- a/src/arm64/code-stubs-arm64.cc
+++ b/src/arm64/code-stubs-arm64.cc
@@ -3574,6 +3574,7 @@ void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) {
ASM_LOCATION("CompareICStub[KnownObjects]");
Label miss;
+ Handle<WeakCell> cell = Map::WeakCellForMap(known_map_);
Register result = x0;
Register rhs = x0;
@@ -3583,11 +3584,13 @@ void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) {
Register rhs_map = x10;
Register lhs_map = x11;
+ Register map = x12;
+ __ GetWeakValue(map, cell);
__ Ldr(rhs_map, FieldMemOperand(rhs, HeapObject::kMapOffset));
__ Ldr(lhs_map, FieldMemOperand(lhs, HeapObject::kMapOffset));
- __ Cmp(rhs_map, Operand(known_map_));
+ __ Cmp(rhs_map, map);
__ B(ne, &miss);
- __ Cmp(lhs_map, Operand(known_map_));
+ __ Cmp(lhs_map, map);
__ B(ne, &miss);
__ Sub(result, rhs, lhs);
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698