| 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 "hydrogen.h" | 5 #include "hydrogen.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "v8.h" | 9 #include "v8.h" |
| 10 #include "allocation-site-scopes.h" | 10 #include "allocation-site-scopes.h" |
| (...skipping 9499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9510 | 9510 |
| 9511 // We expect to get a number. | 9511 // We expect to get a number. |
| 9512 // (We need to check first, since Type::None->Is(Type::Any()) == true. | 9512 // (We need to check first, since Type::None->Is(Type::Any()) == true. |
| 9513 if (expected_obj->Is(Type::None())) { | 9513 if (expected_obj->Is(Type::None())) { |
| 9514 ASSERT(!expected_number->Is(Type::None(zone()))); | 9514 ASSERT(!expected_number->Is(Type::None(zone()))); |
| 9515 return value; | 9515 return value; |
| 9516 } | 9516 } |
| 9517 | 9517 |
| 9518 if (expected_obj->Is(Type::Undefined(zone()))) { | 9518 if (expected_obj->Is(Type::Undefined(zone()))) { |
| 9519 // This is already done by HChange. | 9519 // This is already done by HChange. |
| 9520 *expected = Type::Union(expected_number, Type::Float(zone()), zone()); | 9520 *expected = Type::Union(expected_number, Type::Number(zone()), zone()); |
| 9521 return value; | 9521 return value; |
| 9522 } | 9522 } |
| 9523 | 9523 |
| 9524 return value; | 9524 return value; |
| 9525 } | 9525 } |
| 9526 | 9526 |
| 9527 | 9527 |
| 9528 HValue* HOptimizedGraphBuilder::BuildBinaryOperation( | 9528 HValue* HOptimizedGraphBuilder::BuildBinaryOperation( |
| 9529 BinaryOperation* expr, | 9529 BinaryOperation* expr, |
| 9530 HValue* left, | 9530 HValue* left, |
| (...skipping 2283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11814 if (ShouldProduceTraceOutput()) { | 11814 if (ShouldProduceTraceOutput()) { |
| 11815 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11815 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 11816 } | 11816 } |
| 11817 | 11817 |
| 11818 #ifdef DEBUG | 11818 #ifdef DEBUG |
| 11819 graph_->Verify(false); // No full verify. | 11819 graph_->Verify(false); // No full verify. |
| 11820 #endif | 11820 #endif |
| 11821 } | 11821 } |
| 11822 | 11822 |
| 11823 } } // namespace v8::internal | 11823 } } // namespace v8::internal |
| OLD | NEW |