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

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: Rebasing 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
« no previous file with comments | « src/code-factory.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 baad9838703f33ad3e1f546c01a25041094657c5..a74af1f14971728d9715be8cb8c2e5dd02f8a90a 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -118,6 +118,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);
@@ -199,6 +201,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);
+
private:
compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes,
AllocationFlags flags,
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698