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

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: Rebasing 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 unified diff | Download patch
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // Load the bit field of a Map. 111 // Load the bit field of a Map.
112 compiler::Node* LoadMapBitField(compiler::Node* map); 112 compiler::Node* LoadMapBitField(compiler::Node* map);
113 // Load bit field 2 of a map. 113 // Load bit field 2 of a map.
114 compiler::Node* LoadMapBitField2(compiler::Node* map); 114 compiler::Node* LoadMapBitField2(compiler::Node* map);
115 // Load bit field 3 of a map. 115 // Load bit field 3 of a map.
116 compiler::Node* LoadMapBitField3(compiler::Node* map); 116 compiler::Node* LoadMapBitField3(compiler::Node* map);
117 // Load the instance type of a map. 117 // Load the instance type of a map.
118 compiler::Node* LoadMapInstanceType(compiler::Node* map); 118 compiler::Node* LoadMapInstanceType(compiler::Node* map);
119 // Load the instance descriptors of a map. 119 // Load the instance descriptors of a map.
120 compiler::Node* LoadMapDescriptors(compiler::Node* map); 120 compiler::Node* LoadMapDescriptors(compiler::Node* map);
121 // Load the prototype of a map.
122 compiler::Node* LoadMapPrototype(compiler::Node* map);
121 123
122 // Load the hash field of a name. 124 // Load the hash field of a name.
123 compiler::Node* LoadNameHash(compiler::Node* name); 125 compiler::Node* LoadNameHash(compiler::Node* name);
124 // Load the instance size of a Map. 126 // Load the instance size of a Map.
125 compiler::Node* LoadMapInstanceSize(compiler::Node* map); 127 compiler::Node* LoadMapInstanceSize(compiler::Node* map);
126 128
127 compiler::Node* AllocateUninitializedFixedArray(compiler::Node* length); 129 compiler::Node* AllocateUninitializedFixedArray(compiler::Node* length);
128 130
129 // Load an array element from a FixedArray. 131 // Load an array element from a FixedArray.
130 compiler::Node* LoadFixedArrayElementInt32Index(compiler::Node* object, 132 compiler::Node* LoadFixedArrayElementInt32Index(compiler::Node* object,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 194
193 // Returns a node that is true if the given bit is set in |word32|. 195 // Returns a node that is true if the given bit is set in |word32|.
194 template <typename T> 196 template <typename T>
195 compiler::Node* BitFieldDecode(compiler::Node* word32) { 197 compiler::Node* BitFieldDecode(compiler::Node* word32) {
196 return BitFieldDecode(word32, T::kShift, T::kMask); 198 return BitFieldDecode(word32, T::kShift, T::kMask);
197 } 199 }
198 200
199 compiler::Node* BitFieldDecode(compiler::Node* word32, uint32_t shift, 201 compiler::Node* BitFieldDecode(compiler::Node* word32, uint32_t shift,
200 uint32_t mask); 202 uint32_t mask);
201 203
204 // Various building blocks for stubs doing property lookups.
205 void TryToName(compiler::Node* key, Label* if_keyisindex, Variable* var_index,
206 Label* if_keyisunique, Label* call_runtime);
207
208 void TryLookupProperty(compiler::Node* object, compiler::Node* map,
209 compiler::Node* instance_type, compiler::Node* name,
210 Label* if_found, Label* if_not_found,
211 Label* call_runtime);
212
213 void TryLookupElement(compiler::Node* object, compiler::Node* map,
214 compiler::Node* instance_type, compiler::Node* index,
215 Label* if_found, Label* if_not_found,
216 Label* call_runtime);
217
202 private: 218 private:
203 compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes, 219 compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes,
204 AllocationFlags flags, 220 AllocationFlags flags,
205 compiler::Node* top_address, 221 compiler::Node* top_address,
206 compiler::Node* limit_address); 222 compiler::Node* limit_address);
207 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, 223 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes,
208 AllocationFlags flags, 224 AllocationFlags flags,
209 compiler::Node* top_adddress, 225 compiler::Node* top_adddress,
210 compiler::Node* limit_address); 226 compiler::Node* limit_address);
211 }; 227 };
212 228
213 } // namespace internal 229 } // namespace internal
214 } // namespace v8 230 } // namespace v8
215 231
216 #endif // V8_CODE_STUB_ASSEMBLER_H_ 232 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW
« 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