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

Unified Diff: src/x64/code-stubs-x64.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/ia32/code-stubs-ia32.cc ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index ae2d92158dd75cfc89366a37afd9f57c750725aa..da1d740ed5a1bd88900007db93a30512134f976c 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -3718,14 +3718,16 @@ void CompareICStub::GenerateObjects(MacroAssembler* masm) {
void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) {
Label miss;
+ Handle<WeakCell> cell = Map::WeakCellForMap(known_map_);
Condition either_smi = masm->CheckEitherSmi(rdx, rax);
__ j(either_smi, &miss, Label::kNear);
+ __ GetWeakValue(rdi, cell);
__ movp(rcx, FieldOperand(rax, HeapObject::kMapOffset));
__ movp(rbx, FieldOperand(rdx, HeapObject::kMapOffset));
- __ Cmp(rcx, known_map_);
+ __ cmpp(rcx, rdi);
__ j(not_equal, &miss, Label::kNear);
- __ Cmp(rbx, known_map_);
+ __ cmpp(rbx, rdi);
__ j(not_equal, &miss, Label::kNear);
__ subp(rax, rdx);
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698