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

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

Issue 2319173002: [stubs] Fixing loads/stores from arrays by int32 offsets/indices. Step 2. (Closed)
Patch Set: Created 4 years, 3 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') | 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 52373e6f7eb080ee737b8ae8d5a864c807ac8cc2..9a6616bb92bbe4b1cab56a605f01140c4cc88128 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -233,10 +233,11 @@ class CodeStubAssembler : public compiler::CodeAssembler {
// Load the constructor of a Map (equivalent to Map::GetConstructor()).
compiler::Node* LoadMapConstructor(compiler::Node* map);
- // Load the hash field of a name.
+ // Load the hash field of a name as an uint32 value.
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.
+ // Load the hash value of a name as an uint32 value.
+ // 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);
@@ -380,12 +381,21 @@ class CodeStubAssembler : public compiler::CodeAssembler {
compiler::Node* StringToNumber(compiler::Node* context,
compiler::Node* input);
- // Returns a node that is true if the given bit is set in |word32|.
+ // Returns a node that contains a decoded (unsigned!) value of a bit
+ // field |T| in |word32|. Returns result as an uint32 node.
template <typename T>
compiler::Node* BitFieldDecode(compiler::Node* word32) {
return BitFieldDecode(word32, T::kShift, T::kMask);
}
+ // Returns a node that contains a decoded (unsigned!) value of a bit
+ // field |T| in |word32|. Returns result as a word-size node.
+ template <typename T>
+ compiler::Node* BitFieldDecodeWord(compiler::Node* word32) {
+ return ChangeUint32ToWord(BitFieldDecode<T>(word32));
+ }
+
+ // Decodes an unsigned (!) value from |word32| to an uint32 node.
compiler::Node* BitFieldDecode(compiler::Node* word32, uint32_t shift,
uint32_t mask);
« no previous file with comments | « no previous file | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698