| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/crankshaft/hydrogen.h" | 5 #include "src/crankshaft/hydrogen.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "src/allocation-site-scopes.h" | 10 #include "src/allocation-site-scopes.h" |
| (...skipping 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2264 Push(Add<HCallRuntime>( | 2264 Push(Add<HCallRuntime>( |
| 2265 Runtime::FunctionForId(Runtime::kNumberToStringSkipCache), | 2265 Runtime::FunctionForId(Runtime::kNumberToStringSkipCache), |
| 2266 1)); | 2266 1)); |
| 2267 } | 2267 } |
| 2268 if_found.End(); | 2268 if_found.End(); |
| 2269 | 2269 |
| 2270 return Pop(); | 2270 return Pop(); |
| 2271 } | 2271 } |
| 2272 | 2272 |
| 2273 HValue* HGraphBuilder::BuildToNumber(HValue* input) { | 2273 HValue* HGraphBuilder::BuildToNumber(HValue* input) { |
| 2274 if (input->type().IsTaggedNumber()) { | 2274 if (input->type().IsTaggedNumber() || |
| 2275 input->representation().IsSpecialization()) { |
| 2275 return input; | 2276 return input; |
| 2276 } | 2277 } |
| 2277 Callable callable = CodeFactory::ToNumber(isolate()); | 2278 Callable callable = CodeFactory::ToNumber(isolate()); |
| 2278 HValue* stub = Add<HConstant>(callable.code()); | 2279 HValue* stub = Add<HConstant>(callable.code()); |
| 2279 HValue* values[] = {context(), input}; | 2280 HValue* values[] = {context(), input}; |
| 2280 HCallWithDescriptor* instr = Add<HCallWithDescriptor>( | 2281 HCallWithDescriptor* instr = Add<HCallWithDescriptor>( |
| 2281 stub, 0, callable.descriptor(), ArrayVector(values)); | 2282 stub, 0, callable.descriptor(), ArrayVector(values)); |
| 2282 instr->set_type(HType::TaggedNumber()); | 2283 instr->set_type(HType::TaggedNumber()); |
| 2283 return instr; | 2284 return instr; |
| 2284 } | 2285 } |
| (...skipping 11110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13395 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13396 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13396 } | 13397 } |
| 13397 | 13398 |
| 13398 #ifdef DEBUG | 13399 #ifdef DEBUG |
| 13399 graph_->Verify(false); // No full verify. | 13400 graph_->Verify(false); // No full verify. |
| 13400 #endif | 13401 #endif |
| 13401 } | 13402 } |
| 13402 | 13403 |
| 13403 } // namespace internal | 13404 } // namespace internal |
| 13404 } // namespace v8 | 13405 } // namespace v8 |
| OLD | NEW |