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

Unified Diff: src/ic/ia32/handler-compiler-ia32.cc

Issue 815143002: Use weak cells in CheckPropertyCell. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase 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/ic/arm64/handler-compiler-arm64.cc ('k') | src/ic/mips/handler-compiler-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ia32/handler-compiler-ia32.cc
diff --git a/src/ic/ia32/handler-compiler-ia32.cc b/src/ic/ia32/handler-compiler-ia32.cc
index 40273996e28e7579f4066fd0e7d816e074da8e34..c4123aeacd5638fd1c85a67eb06fc9c54960debb 100644
--- a/src/ic/ia32/handler-compiler-ia32.cc
+++ b/src/ic/ia32/handler-compiler-ia32.cc
@@ -227,14 +227,11 @@ void PropertyHandlerCompiler::GenerateCheckPropertyCell(
Register scratch, Label* miss) {
Handle<PropertyCell> cell = JSGlobalObject::EnsurePropertyCell(global, name);
DCHECK(cell->value()->IsTheHole());
- Handle<Oddball> the_hole = masm->isolate()->factory()->the_hole_value();
- if (masm->serializer_enabled()) {
- __ mov(scratch, Immediate(cell));
- __ cmp(FieldOperand(scratch, PropertyCell::kValueOffset),
- Immediate(the_hole));
- } else {
- __ cmp(Operand::ForCell(cell), Immediate(the_hole));
- }
+ Factory* factory = masm->isolate()->factory();
+ Handle<WeakCell> weak_cell = factory->NewWeakCell(cell);
+ __ LoadWeakValue(scratch, weak_cell, miss);
+ __ cmp(FieldOperand(scratch, PropertyCell::kValueOffset),
+ Immediate(factory->the_hole_value()));
__ j(not_equal, miss);
}
« no previous file with comments | « src/ic/arm64/handler-compiler-arm64.cc ('k') | src/ic/mips/handler-compiler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698