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

Unified Diff: src/ia32/builtins-ia32.cc

Issue 1675223002: Mark maps having a hidden prototype rather than maps of hidden prototypes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment Created 4 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
« no previous file with comments | « src/factory.cc ('k') | src/ic/call-optimization.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/builtins-ia32.cc
diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc
index 3a9b4734e34bba0d905e19afef90025da458868c..3e56a584c6ea06dbc23b751e4ea3e6cc88895fd5 100644
--- a/src/ia32/builtins-ia32.cc
+++ b/src/ia32/builtins-ia32.cc
@@ -2663,14 +2663,12 @@ static void CompatibleReceiverCheck(MacroAssembler* masm, Register receiver,
// Load the next prototype.
__ bind(&next_prototype);
__ mov(receiver, FieldOperand(receiver, HeapObject::kMapOffset));
+ __ test(FieldOperand(receiver, Map::kBitField3Offset),
+ Immediate(Map::HasHiddenPrototype::kMask));
+ __ j(zero, receiver_check_failed);
+
__ mov(receiver, FieldOperand(receiver, Map::kPrototypeOffset));
- // End if the prototype is null or not hidden.
- __ CompareRoot(receiver, Heap::kNullValueRootIndex);
- __ j(equal, receiver_check_failed);
__ mov(scratch0, FieldOperand(receiver, HeapObject::kMapOffset));
- __ test(FieldOperand(scratch0, Map::kBitField3Offset),
- Immediate(Map::IsHiddenPrototype::kMask));
- __ j(zero, receiver_check_failed);
// Iterate.
__ jmp(&prototype_loop_start, Label::kNear);
« no previous file with comments | « src/factory.cc ('k') | src/ic/call-optimization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698