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

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

Issue 1894953004: Add HasProperty code stub that tries simple lookups or jumps to runtime otherwise. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressing comments, tweak linear search limit based on local measurements Created 4 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
Index: src/code-stub-assembler.h
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h
index 53718fc9d65575b428184be6665eaa5b7a244e55..d85107b0d02402d487d8865160f664a715f515ce 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -101,6 +101,8 @@ class CodeStubAssembler : public compiler::CodeAssembler {
compiler::Node* LoadMapInstanceType(compiler::Node* map);
// Load the instance descriptors of a map.
compiler::Node* LoadMapDescriptors(compiler::Node* map);
+ // Load the prototype of a map.
+ compiler::Node* LoadMapPrototype(compiler::Node* map);
// Load the hash field of a name.
compiler::Node* LoadNameHash(compiler::Node* name);
@@ -179,6 +181,20 @@ class CodeStubAssembler : public compiler::CodeAssembler {
compiler::Node* BitFieldDecode(compiler::Node* word32, uint32_t shift,
uint32_t mask);
+
+ // Various building blocks for stubs doing property lookups.
+ void TryToName(compiler::Node* key, Label* if_keyisindex, Variable* var_index,
+ Label* if_keyisunique, Label* call_runtime);
+
+ void TryLookupProperty(compiler::Node* object, compiler::Node* map,
+ compiler::Node* instance_type, compiler::Node* name,
+ Label* if_found, Label* if_not_found,
+ Label* call_runtime);
+
+ void TryLookupElement(compiler::Node* object, compiler::Node* map,
+ compiler::Node* instance_type, compiler::Node* index,
+ Label* if_found, Label* if_not_found,
+ Label* call_runtime);
};
} // namespace internal
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stub-assembler.cc » ('j') | src/code-stub-assembler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698