Index: src/builtins/builtins-object.cc |
diff --git a/src/builtins/builtins-object.cc b/src/builtins/builtins-object.cc |
index c9a9b7e164db121353e954b040f51172155d1551..5f90ecfb190a2eb54a5a42f75f9f99c3de775475 100644 |
--- a/src/builtins/builtins-object.cc |
+++ b/src/builtins/builtins-object.cc |
@@ -39,21 +39,24 @@ TF_BUILTIN(ObjectHasOwnProperty, ObjectBuiltinsAssembler) { |
Node* map = LoadMap(object); |
Node* instance_type = LoadMapInstanceType(map); |
- Variable var_index(this, MachineType::PointerRepresentation()); |
- |
- Label keyisindex(this), if_iskeyunique(this); |
- TryToName(key, &keyisindex, &var_index, &if_iskeyunique, &call_runtime); |
- |
- Bind(&if_iskeyunique); |
- TryHasOwnProperty(object, map, instance_type, key, &return_true, |
- &return_false, &call_runtime); |
- |
- Bind(&keyisindex); |
- // Handle negative keys in the runtime. |
- GotoIf(IntPtrLessThan(var_index.value(), IntPtrConstant(0)), &call_runtime); |
- TryLookupElement(object, map, instance_type, var_index.value(), &return_true, |
- &return_false, &call_runtime); |
- |
+ { |
+ Variable var_index(this, MachineType::PointerRepresentation()); |
+ Variable var_unique(this, MachineRepresentation::kTagged); |
+ |
+ Label keyisindex(this), if_iskeyunique(this); |
+ TryToName(key, &keyisindex, &var_index, &if_iskeyunique, &var_unique, |
+ &call_runtime); |
+ |
+ Bind(&if_iskeyunique); |
+ TryHasOwnProperty(object, map, instance_type, var_unique.value(), |
+ &return_true, &return_false, &call_runtime); |
+ |
+ Bind(&keyisindex); |
+ // Handle negative keys in the runtime. |
+ GotoIf(IntPtrLessThan(var_index.value(), IntPtrConstant(0)), &call_runtime); |
+ TryLookupElement(object, map, instance_type, var_index.value(), |
+ &return_true, &return_false, &call_runtime); |
+ } |
Bind(&return_true); |
Return(BooleanConstant(true)); |