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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/compiler/code-assembler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #include "src/compiler/code-assembler.h" 5 #include "src/compiler/code-assembler.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 return false; 142 return false;
143 } 143 }
144 144
145 bool CodeAssembler::ToInt64Constant(Node* node, int64_t& out_value) { 145 bool CodeAssembler::ToInt64Constant(Node* node, int64_t& out_value) {
146 Int64Matcher m(node); 146 Int64Matcher m(node);
147 if (m.HasValue()) out_value = m.Value(); 147 if (m.HasValue()) out_value = m.Value();
148 return m.HasValue(); 148 return m.HasValue();
149 } 149 }
150 150
151 bool CodeAssembler::ToSmiConstant(Node* node, Smi*& out_value) {
152 if (node->opcode() == IrOpcode::kBitcastWordToTaggedSigned) {
153 node = node->InputAt(0);
154 } else {
155 return false;
156 }
157 IntPtrMatcher m(node);
158 if (m.HasValue()) {
159 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
160 return true;
161 }
162 return false;
163 }
164
151 bool CodeAssembler::ToIntPtrConstant(Node* node, intptr_t& out_value) { 165 bool CodeAssembler::ToIntPtrConstant(Node* node, intptr_t& out_value) {
152 IntPtrMatcher m(node); 166 IntPtrMatcher m(node);
153 if (m.HasValue()) out_value = m.Value(); 167 if (m.HasValue()) out_value = m.Value();
154 return m.HasValue(); 168 return m.HasValue();
155 } 169 }
156 170
157 Node* CodeAssembler::Parameter(int value) { 171 Node* CodeAssembler::Parameter(int value) {
158 return raw_assembler_->Parameter(value); 172 return raw_assembler_->Parameter(value);
159 } 173 }
160 174
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 } 1131 }
1118 } 1132 }
1119 } 1133 }
1120 1134
1121 bound_ = true; 1135 bound_ = true;
1122 } 1136 }
1123 1137
1124 } // namespace compiler 1138 } // namespace compiler
1125 } // namespace internal 1139 } // namespace internal
1126 } // namespace v8 1140 } // namespace v8
OLDNEW
« 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