Chromium Code Reviews| 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/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
| 6 #include "src/compiler/graph-inl.h" | 6 #include "src/compiler/graph-inl.h" |
| 7 #include "src/compiler/js-operator.h" | 7 #include "src/compiler/js-operator.h" |
| 8 #include "src/compiler/node.h" | 8 #include "src/compiler/node.h" |
| 9 #include "src/compiler/node-properties-inl.h" | 9 #include "src/compiler/node-properties-inl.h" |
| 10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
| (...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1027 if (lhs->Maybe(Type::NaN()) || rhs->Maybe(t->zeroish) || | 1027 if (lhs->Maybe(Type::NaN()) || rhs->Maybe(t->zeroish) || |
| 1028 lhs->Min() == -V8_INFINITY || lhs->Max() == +V8_INFINITY) { | 1028 lhs->Min() == -V8_INFINITY || lhs->Max() == +V8_INFINITY) { |
| 1029 // Result maybe NaN. | 1029 // Result maybe NaN. |
| 1030 return Type::Number(); | 1030 return Type::Number(); |
| 1031 } | 1031 } |
| 1032 | 1032 |
| 1033 lhs = Rangify(lhs, t); | 1033 lhs = Rangify(lhs, t); |
| 1034 rhs = Rangify(rhs, t); | 1034 rhs = Rangify(rhs, t); |
| 1035 if (lhs->IsRange() && rhs->IsRange()) { | 1035 if (lhs->IsRange() && rhs->IsRange()) { |
| 1036 // TODO(titzer): fix me. | 1036 // TODO(titzer): fix me. |
| 1037 // return JSModulusRanger(lhs->AsRange(), rhs->AsRange(), t); | 1037 if (FLAG_turbo_mod_range) |
|
Benedikt Meurer
2014/11/10 12:54:47
Why do we need a flag here? Maybe just enable this
titzer
2014/11/10 12:57:07
That was an oversight, I am removing the flag.
| |
| 1038 return JSModulusRanger(lhs->AsRange(), rhs->AsRange(), t); | |
| 1038 } | 1039 } |
| 1039 return Type::OrderedNumber(); | 1040 return Type::OrderedNumber(); |
| 1040 } | 1041 } |
| 1041 | 1042 |
| 1042 | 1043 |
| 1043 // JS unary operators. | 1044 // JS unary operators. |
| 1044 | 1045 |
| 1045 | 1046 |
| 1046 Type* Typer::Visitor::JSUnaryNotTyper(Type* type, Typer* t) { | 1047 Type* Typer::Visitor::JSUnaryNotTyper(Type* type, Typer* t) { |
| 1047 return Invert(ToBoolean(type, t), t); | 1048 return Invert(ToBoolean(type, t), t); |
| (...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1933 return typer_->float64_array_fun_; | 1934 return typer_->float64_array_fun_; |
| 1934 } | 1935 } |
| 1935 } | 1936 } |
| 1936 } | 1937 } |
| 1937 return Type::Constant(value, zone()); | 1938 return Type::Constant(value, zone()); |
| 1938 } | 1939 } |
| 1939 | 1940 |
| 1940 } | 1941 } |
| 1941 } | 1942 } |
| 1942 } // namespace v8::internal::compiler | 1943 } // namespace v8::internal::compiler |
| OLD | NEW |