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

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

Issue 2626893005: Revert of Internalize strings in-place (Closed)
Patch Set: rebased Created 3 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/ast/ast-types.cc ('k') | src/code-stub-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-object.cc
diff --git a/src/builtins/builtins-object.cc b/src/builtins/builtins-object.cc
index 52471a1715e243b73fd8df3e9bdbb79604486740..74e0a208320d30960b54a9c8a8c01bc6f026fe66 100644
--- a/src/builtins/builtins-object.cc
+++ b/src/builtins/builtins-object.cc
@@ -39,24 +39,21 @@ TF_BUILTIN(ObjectHasOwnProperty, ObjectBuiltinsAssembler) {
Node* map = LoadMap(object);
Node* instance_type = LoadMapInstanceType(map);
- {
- 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);
- }
+ 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);
+
Bind(&return_true);
Return(BooleanConstant(true));
« no previous file with comments | « src/ast/ast-types.cc ('k') | src/code-stub-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698