OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/code-stubs.h" | 5 #include "src/code-stubs.h" |
6 #include "src/compiler/js-graph.h" | 6 #include "src/compiler/js-graph.h" |
7 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.h" |
8 #include "src/compiler/typer.h" | 8 #include "src/compiler/typer.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 154 |
155 Node* JSGraph::Int64Constant(int64_t value) { | 155 Node* JSGraph::Int64Constant(int64_t value) { |
156 Node** loc = cache_.FindInt64Constant(value); | 156 Node** loc = cache_.FindInt64Constant(value); |
157 if (*loc == nullptr) { | 157 if (*loc == nullptr) { |
158 *loc = graph()->NewNode(common()->Int64Constant(value)); | 158 *loc = graph()->NewNode(common()->Int64Constant(value)); |
159 } | 159 } |
160 return *loc; | 160 return *loc; |
161 } | 161 } |
162 | 162 |
163 Node* JSGraph::RelocatableInt32Constant(int32_t value, RelocInfo::Mode rmode) { | 163 Node* JSGraph::RelocatableInt32Constant(int32_t value, RelocInfo::Mode rmode) { |
164 Node** loc = cache_.FindRelocatableInt32Constant(value); | 164 Node** loc = cache_.FindRelocatableInt32Constant( |
| 165 value, static_cast<RelocInfoMode>(rmode)); |
165 if (*loc == nullptr) { | 166 if (*loc == nullptr) { |
166 *loc = graph()->NewNode(common()->RelocatableInt32Constant(value, rmode)); | 167 *loc = graph()->NewNode(common()->RelocatableInt32Constant(value, rmode)); |
167 } | 168 } |
168 return *loc; | 169 return *loc; |
169 } | 170 } |
170 | 171 |
171 Node* JSGraph::RelocatableInt64Constant(int64_t value, RelocInfo::Mode rmode) { | 172 Node* JSGraph::RelocatableInt64Constant(int64_t value, RelocInfo::Mode rmode) { |
172 Node** loc = cache_.FindRelocatableInt64Constant(value); | 173 Node** loc = cache_.FindRelocatableInt64Constant( |
| 174 value, static_cast<RelocInfoMode>(rmode)); |
173 if (*loc == nullptr) { | 175 if (*loc == nullptr) { |
174 *loc = graph()->NewNode(common()->RelocatableInt64Constant(value, rmode)); | 176 *loc = graph()->NewNode(common()->RelocatableInt64Constant(value, rmode)); |
175 } | 177 } |
176 return *loc; | 178 return *loc; |
177 } | 179 } |
178 | 180 |
179 Node* JSGraph::RelocatableIntPtrConstant(intptr_t value, | 181 Node* JSGraph::RelocatableIntPtrConstant(intptr_t value, |
180 RelocInfo::Mode rmode) { | 182 RelocInfo::Mode rmode) { |
181 return kPointerSize == 8 | 183 return kPointerSize == 8 |
182 ? RelocatableInt64Constant(value, rmode) | 184 ? RelocatableInt64Constant(value, rmode) |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 for (size_t i = 0; i < arraysize(cached_nodes_); i++) { | 239 for (size_t i = 0; i < arraysize(cached_nodes_); i++) { |
238 if (Node* node = cached_nodes_[i]) { | 240 if (Node* node = cached_nodes_[i]) { |
239 if (!node->IsDead()) nodes->push_back(node); | 241 if (!node->IsDead()) nodes->push_back(node); |
240 } | 242 } |
241 } | 243 } |
242 } | 244 } |
243 | 245 |
244 } // namespace compiler | 246 } // namespace compiler |
245 } // namespace internal | 247 } // namespace internal |
246 } // namespace v8 | 248 } // namespace v8 |
OLD | NEW |