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

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

Issue 2095003003: [compiler] Fix turbofan string allocation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.cc
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
index 34b480705c0fe2633d5c5fc5457b650ec4986e5d..5bb1e3d001756133b2e85d117e52613bf80e7a43 100644
--- a/src/code-stub-assembler.cc
+++ b/src/code-stub-assembler.cc
@@ -695,7 +695,8 @@ Node* CodeStubAssembler::AllocateSeqOneByteString(int length) {
StoreObjectFieldNoWriteBarrier(result, SeqOneByteString::kLengthOffset,
SmiConstant(Smi::FromInt(length)));
StoreObjectFieldNoWriteBarrier(result, SeqOneByteString::kHashFieldOffset,
- IntPtrConstant(String::kEmptyHashField));
+ IntPtrConstant(String::kEmptyHashField),
+ MachineRepresentation::kWord32);
return result;
}
@@ -722,7 +723,8 @@ Node* CodeStubAssembler::AllocateSeqOneByteString(Node* context, Node* length) {
StoreObjectFieldNoWriteBarrier(result, SeqOneByteString::kLengthOffset,
SmiFromWord(length));
StoreObjectFieldNoWriteBarrier(result, SeqOneByteString::kHashFieldOffset,
- IntPtrConstant(String::kEmptyHashField));
+ IntPtrConstant(String::kEmptyHashField),
+ MachineRepresentation::kWord32);
var_result.Bind(result);
Goto(&if_join);
}
@@ -746,7 +748,8 @@ Node* CodeStubAssembler::AllocateSeqTwoByteString(int length) {
StoreObjectFieldNoWriteBarrier(result, SeqTwoByteString::kLengthOffset,
SmiConstant(Smi::FromInt(length)));
StoreObjectFieldNoWriteBarrier(result, SeqTwoByteString::kHashFieldOffset,
- IntPtrConstant(String::kEmptyHashField));
+ IntPtrConstant(String::kEmptyHashField),
+ MachineRepresentation::kWord32);
return result;
}
@@ -773,7 +776,8 @@ Node* CodeStubAssembler::AllocateSeqTwoByteString(Node* context, Node* length) {
StoreObjectFieldNoWriteBarrier(result, SeqTwoByteString::kLengthOffset,
SmiFromWord(length));
StoreObjectFieldNoWriteBarrier(result, SeqTwoByteString::kHashFieldOffset,
- IntPtrConstant(String::kEmptyHashField));
+ IntPtrConstant(String::kEmptyHashField),
+ MachineRepresentation::kWord32);
var_result.Bind(result);
Goto(&if_join);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698