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

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

Issue 1995453002: [stubs] Extend HasProperty stub with dictionary-mode and double-elements objects support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes and ArrayIndex-related cleanup in objects.h/.cc Created 4 years, 7 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 | « no previous file | src/code-stub-assembler.cc » ('j') | src/code-stub-assembler.cc » ('J')
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 19b798216f6fe881be4d032cb77e6a55fceb006d..db730121e2cf4772299cd666b05740d7d4c85647 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -38,6 +38,8 @@ class CodeStubAssembler : public compiler::CodeAssembler {
compiler::Node* NoContextConstant();
compiler::Node* NullConstant();
compiler::Node* UndefinedConstant();
+ compiler::Node* TheHoleConstant();
+ compiler::Node* HashSeed();
compiler::Node* StaleRegisterConstant();
// Float64 operations.
@@ -107,6 +109,8 @@ class CodeStubAssembler : public compiler::CodeAssembler {
compiler::Node* LoadMap(compiler::Node* object);
// Load the instance type of an HeapObject.
compiler::Node* LoadInstanceType(compiler::Node* object);
+ // Load the properties backing store of a JSObject.
+ compiler::Node* LoadProperties(compiler::Node* object);
// Load the elements backing store of a JSObject.
compiler::Node* LoadElements(compiler::Node* object);
// Load the length of a fixed array base instance.
@@ -125,7 +129,11 @@ class CodeStubAssembler : public compiler::CodeAssembler {
compiler::Node* LoadMapPrototype(compiler::Node* map);
// Load the hash field of a name.
- compiler::Node* LoadNameHash(compiler::Node* name);
+ compiler::Node* LoadNameHashField(compiler::Node* name);
+ // Load the hash value of a name. If {if_hash_not_computed} label
+ // is specified then it also checks if hash is actually computed.
+ compiler::Node* LoadNameHash(compiler::Node* name,
+ Label* if_hash_not_computed = nullptr);
// Load the instance size of a Map.
compiler::Node* LoadMapInstanceSize(compiler::Node* map);
@@ -140,6 +148,12 @@ class CodeStubAssembler : public compiler::CodeAssembler {
int additional_offset = 0);
compiler::Node* LoadFixedArrayElementConstantIndex(compiler::Node* object,
int index);
+ // Load an array element from a FixedDoubleArray.
+ compiler::Node* OffsetOfFixedDoubleArrayElementInt32Index(
+ compiler::Node* int32_index, int additional_offset = 0);
+ compiler::Node* LoadFixedDoubleArrayElementInt32Index(
+ compiler::Node* object, compiler::Node* int32_index,
+ MachineType machine_type, int additional_offset = 0);
// Context manipulation
compiler::Node* LoadNativeContext(compiler::Node* context);
@@ -235,10 +249,24 @@ class CodeStubAssembler : public compiler::CodeAssembler {
void TryToName(compiler::Node* key, Label* if_keyisindex, Variable* var_index,
Label* if_keyisunique, Label* call_runtime);
+ static const int kInlinedDictionaryProbes = 4;
+ template <typename Dictionary>
+ void NameDictionaryLookup(compiler::Node* dictionary,
+ compiler::Node* unique_name, Label* if_found,
+ Label* if_not_found, Label* call_runtime,
+ int inlined_probes = kInlinedDictionaryProbes);
+
+ compiler::Node* ComputeIntegerHash(compiler::Node* key, compiler::Node* seed);
+
+ template <typename Dictionary>
+ void NumberDictionaryLookup(compiler::Node* dictionary, compiler::Node* key,
+ Label* if_found, Label* if_not_found,
+ 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);
+ compiler::Node* instance_type,
+ compiler::Node* unique_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,
« no previous file with comments | « no previous file | src/code-stub-assembler.cc » ('j') | src/code-stub-assembler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698