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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_CODE_STUB_ASSEMBLER_H_ 5 #ifndef V8_CODE_STUB_ASSEMBLER_H_
6 #define V8_CODE_STUB_ASSEMBLER_H_ 6 #define V8_CODE_STUB_ASSEMBLER_H_
7 7
8 #include "src/compiler/code-assembler.h" 8 #include "src/compiler/code-assembler.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // Load the bit field of a Map. 94 // Load the bit field of a Map.
95 compiler::Node* LoadMapBitField(compiler::Node* map); 95 compiler::Node* LoadMapBitField(compiler::Node* map);
96 // Load bit field 2 of a map. 96 // Load bit field 2 of a map.
97 compiler::Node* LoadMapBitField2(compiler::Node* map); 97 compiler::Node* LoadMapBitField2(compiler::Node* map);
98 // Load bit field 3 of a map. 98 // Load bit field 3 of a map.
99 compiler::Node* LoadMapBitField3(compiler::Node* map); 99 compiler::Node* LoadMapBitField3(compiler::Node* map);
100 // Load the instance type of a map. 100 // Load the instance type of a map.
101 compiler::Node* LoadMapInstanceType(compiler::Node* map); 101 compiler::Node* LoadMapInstanceType(compiler::Node* map);
102 // Load the instance descriptors of a map. 102 // Load the instance descriptors of a map.
103 compiler::Node* LoadMapDescriptors(compiler::Node* map); 103 compiler::Node* LoadMapDescriptors(compiler::Node* map);
104 // Load the prototype of a map.
105 compiler::Node* LoadMapPrototype(compiler::Node* map);
104 106
105 // Load the hash field of a name. 107 // Load the hash field of a name.
106 compiler::Node* LoadNameHash(compiler::Node* name); 108 compiler::Node* LoadNameHash(compiler::Node* name);
107 // Load the instance size of a Map. 109 // Load the instance size of a Map.
108 compiler::Node* LoadMapInstanceSize(compiler::Node* map); 110 compiler::Node* LoadMapInstanceSize(compiler::Node* map);
109 111
110 // Load an array element from a FixedArray. 112 // Load an array element from a FixedArray.
111 compiler::Node* LoadFixedArrayElementInt32Index(compiler::Node* object, 113 compiler::Node* LoadFixedArrayElementInt32Index(compiler::Node* object,
112 compiler::Node* int32_index, 114 compiler::Node* int32_index,
113 int additional_offset = 0); 115 int additional_offset = 0);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 compiler::Node* StringFromCharCode(compiler::Node* code); 174 compiler::Node* StringFromCharCode(compiler::Node* code);
173 175
174 // Returns a node that is true if the given bit is set in |word32|. 176 // Returns a node that is true if the given bit is set in |word32|.
175 template <typename T> 177 template <typename T>
176 compiler::Node* BitFieldDecode(compiler::Node* word32) { 178 compiler::Node* BitFieldDecode(compiler::Node* word32) {
177 return BitFieldDecode(word32, T::kShift, T::kMask); 179 return BitFieldDecode(word32, T::kShift, T::kMask);
178 } 180 }
179 181
180 compiler::Node* BitFieldDecode(compiler::Node* word32, uint32_t shift, 182 compiler::Node* BitFieldDecode(compiler::Node* word32, uint32_t shift,
181 uint32_t mask); 183 uint32_t mask);
184
185 // Various building blocks for stubs doing property lookups.
186 void TryToName(compiler::Node* key, Label* if_keyisindex, Variable* var_index,
187 Label* if_keyisunique, Label* call_runtime);
188
189 void TryLookupProperty(compiler::Node* object, compiler::Node* map,
190 compiler::Node* instance_type, compiler::Node* name,
191 Label* if_found, Label* if_not_found,
192 Label* call_runtime);
193
194 void TryLookupElement(compiler::Node* object, compiler::Node* map,
195 compiler::Node* instance_type, compiler::Node* index,
196 Label* if_found, Label* if_not_found,
197 Label* call_runtime);
182 }; 198 };
183 199
184 } // namespace internal 200 } // namespace internal
185 } // namespace v8 201 } // namespace v8
186 202
187 #endif // V8_CODE_STUB_ASSEMBLER_H_ 203 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW
« 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