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

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

Issue 2407813002: [stubs] Port StringAddStub to TF (Closed)
Patch Set: Remove printf Created 4 years, 2 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 | « src/compiler/code-assembler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-assembler.cc
diff --git a/src/compiler/code-assembler.cc b/src/compiler/code-assembler.cc
index 285259ffcd8e52b252e11d8cc1ab458473c7f1fb..ba7f9df68f1af605e74b764c0fa8ab00b118c41d 100644
--- a/src/compiler/code-assembler.cc
+++ b/src/compiler/code-assembler.cc
@@ -148,6 +148,20 @@ bool CodeAssembler::ToInt64Constant(Node* node, int64_t& out_value) {
return m.HasValue();
}
+bool CodeAssembler::ToSmiConstant(Node* node, Smi*& out_value) {
+ if (node->opcode() == IrOpcode::kBitcastWordToTaggedSigned) {
+ node = node->InputAt(0);
+ } else {
+ return false;
+ }
+ IntPtrMatcher m(node);
+ if (m.HasValue()) {
+ out_value = reinterpret_cast<Smi*>(m.Value());
Michael Starzinger 2016/10/17 14:45:51 nit: At this point we should be able to use the ch
+ return true;
+ }
+ return false;
+}
+
bool CodeAssembler::ToIntPtrConstant(Node* node, intptr_t& out_value) {
IntPtrMatcher m(node);
if (m.HasValue()) out_value = m.Value();
« no previous file with comments | « src/compiler/code-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698