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

Unified Diff: src/builtins/builtins-string.cc

Issue 2608433003: [csa] Re-introduce automatic constant folding for IntPtrAdd and IntPtrSub (Closed)
Patch Set: Review feedback Created 4 years 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.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-string.cc
diff --git a/src/builtins/builtins-string.cc b/src/builtins/builtins-string.cc
index 2e0fd29cf625cc1cf2760eee303939ea4b216289..9b50d3e40e27ab1251b99476bde2e33614a9a41a 100644
--- a/src/builtins/builtins-string.cc
+++ b/src/builtins/builtins-string.cc
@@ -37,9 +37,9 @@ class StringBuiltinsAssembler : public CodeStubAssembler {
const int header = SeqOneByteString::kHeaderSize - kHeapObjectTag;
Node* offset = index;
if (encoding == String::TWO_BYTE_ENCODING) {
- offset = IntPtrAddFoldConstants(offset, offset);
+ offset = IntPtrAdd(offset, offset);
}
- offset = IntPtrAddFoldConstants(offset, IntPtrConstant(header));
+ offset = IntPtrAdd(offset, IntPtrConstant(header));
return offset;
}
« no previous file with comments | « no previous file | src/code-stub-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698