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

Unified Diff: src/code-stub-assembler.h

Issue 2811333002: [builtins] HasOwnProperty: handle non-internalized string keys (Closed)
Patch Set: rebased (noop) 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/builtins/builtins-object-gen.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.h
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h
index 1dbf7095bd8e8fc44665db1eedf093ee2c9319f0..4a842613ab8b35ef90c6f698dce4ff0cc6b4783c 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -926,9 +926,24 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
void Use(Label* label);
// Various building blocks for stubs doing property lookups.
+
+ // |if_notinternalized| is optional; |if_bailout| will be used by default.
void TryToName(Node* key, Label* if_keyisindex, Variable* var_index,
- Label* if_keyisunique, Variable* var_unique,
- Label* if_bailout);
+ Label* if_keyisunique, Variable* var_unique, Label* if_bailout,
+ Label* if_notinternalized = nullptr);
+
+ // Performs a hash computation and string table lookup for the given string,
+ // and jumps to:
+ // - |if_index| if the string is an array index like "123"; |var_index|
+ // will contain the intptr representation of that index.
+ // - |if_internalized| if the string exists in the string table; the
+ // internalized version will be in |var_internalized|.
+ // - |if_not_internalized| if the string is not in the string table (but
+ // does not add it).
+ // - |if_bailout| for unsupported cases (e.g. uncachable array index).
+ void TryInternalizeString(Node* string, Label* if_index, Variable* var_index,
+ Label* if_internalized, Variable* var_internalized,
+ Label* if_not_internalized, Label* if_bailout);
// Calculates array index for given dictionary entry and entry field.
// See Dictionary::EntryToIndex().
« no previous file with comments | « src/builtins/builtins-object-gen.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698