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

Unified Diff: src/ic/accessor-assembler.cc

Issue 2811333002: [builtins] HasOwnProperty: handle non-internalized string keys (Closed)
Patch Set: fix Created 3 years, 8 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/globals.h ('k') | src/objects.h » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/accessor-assembler.cc
diff --git a/src/ic/accessor-assembler.cc b/src/ic/accessor-assembler.cc
index eb3971c54fcbc85bc806454c265055228534d248..0b2e0743d38ec9c267a7cb7d58916eb25b7b0ad9 100644
--- a/src/ic/accessor-assembler.cc
+++ b/src/ic/accessor-assembler.cc
@@ -2112,6 +2112,35 @@ void AccessorAssembler::KeyedLoadICGeneric(const LoadICParameters* p) {
var_unique.value(), p, &slow);
}
+ // TODO(jkummerow): The code below internalizes strings on the fly, but
+ // it currently adds too much load on the stub cache. Find a solution
+ // for stub cache overload issues and enable this!
+ /* {
Igor Sheludko 2017/04/13 11:38:54 I'd suggest to add a read-only bool option and do
Jakob Kummerow 2017/04/13 14:01:52 Done.
+ Node* function = ExternalConstant(
+ ExternalReference::try_internalize_string_function(isolate()));
+ Node* result = CallCFunction1(MachineType::AnyTagged(),
+ MachineType::AnyTagged(), function, p->name);
+ // If internalization failed, then the string did not exist in the string
+ // table yet, which implies that no existing object has a property with
+ // that name.
+ Label internalized(this), not_found(this);
+ GotoIf(TaggedIsNotSmi(result), &internalized);
+ Node* int_result = SmiUntag(result);
Igor Sheludko 2017/04/13 11:38:53 s/int_result/word_result/ ?
Jakob Kummerow 2017/04/13 14:01:52 Done.
+ GotoIf(WordEqual(int_result, IntPtrConstant(ResultSentinel::kNotFound)),
+ &not_found);
+ GotoIf(WordEqual(int_result, IntPtrConstant(ResultSentinel::kUnsupported)),
+ &slow);
+ var_index.Bind(int_result);
+ Goto(&if_index);
+
+ BIND(&internalized);
+ var_unique.Bind(result);
+ Goto(&if_unique_name);
+
+ BIND(&not_found);
+ Return(UndefinedConstant());
+ } */
+
BIND(&slow);
{
Comment("KeyedLoadGeneric_slow");
« no previous file with comments | « src/globals.h ('k') | src/objects.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698