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

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

Issue 764003003: Reland parts of 'Use weak cells in map checks in polymorphic ICs' (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/ia32/macro-assembler-ia32.cc
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
index 06b6f6a334b23f13a1e9350215255fb31bd1a20a..6908796127838baaf551661cadcfa05403ab7e77 100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -2580,6 +2580,21 @@ void MacroAssembler::PushHeapObject(Handle<HeapObject> object) {
}
+void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell,
+ Register scratch) {
+ mov(scratch, cell);
+ cmp(value, FieldOperand(scratch, WeakCell::kValueOffset));
+}
+
+
+void MacroAssembler::LoadWeakValue(Register value, Handle<WeakCell> cell,
+ Label* miss) {
+ mov(value, cell);
+ mov(value, FieldOperand(value, WeakCell::kValueOffset));
+ JumpIfSmi(value, miss);
+}
+
+
void MacroAssembler::Ret() {
ret(0);
}

Powered by Google App Engine
This is Rietveld 408576698