OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
6 | 6 |
7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
8 #include "vm/bit_vector.h" | 8 #include "vm/bit_vector.h" |
9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 1968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1979 if (!MayBeBoxableNumber(compare->left()->Type()->ToCid()) || | 1979 if (!MayBeBoxableNumber(compare->left()->Type()->ToCid()) || |
1980 !MayBeBoxableNumber(compare->right()->Type()->ToCid())) { | 1980 !MayBeBoxableNumber(compare->right()->Type()->ToCid())) { |
1981 compare->set_needs_number_check(false); | 1981 compare->set_needs_number_check(false); |
1982 } else if (!MaybeNumber(compare->left()->Type()) || | 1982 } else if (!MaybeNumber(compare->left()->Type()) || |
1983 !MaybeNumber(compare->right()->Type())) { | 1983 !MaybeNumber(compare->right()->Type())) { |
1984 compare->set_needs_number_check(false); | 1984 compare->set_needs_number_check(false); |
1985 } | 1985 } |
1986 } | 1986 } |
1987 | 1987 |
1988 *negated = false; | 1988 *negated = false; |
1989 Object& constant = Object::Handle(); | 1989 PassiveObject& constant = PassiveObject::Handle(); |
1990 Value* other = NULL; | 1990 Value* other = NULL; |
1991 if (compare->right()->BindsToConstant()) { | 1991 if (compare->right()->BindsToConstant()) { |
1992 constant = compare->right()->BoundConstant().raw(); | 1992 constant = compare->right()->BoundConstant().raw(); |
1993 other = compare->left(); | 1993 other = compare->left(); |
1994 } else if (compare->left()->BindsToConstant()) { | 1994 } else if (compare->left()->BindsToConstant()) { |
1995 constant = compare->left()->BoundConstant().raw(); | 1995 constant = compare->left()->BoundConstant().raw(); |
1996 other = compare->right(); | 1996 other = compare->right(); |
1997 } else { | 1997 } else { |
1998 return compare; | 1998 return compare; |
1999 } | 1999 } |
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3088 case Token::kTRUNCDIV: return 0; | 3088 case Token::kTRUNCDIV: return 0; |
3089 case Token::kMOD: return 1; | 3089 case Token::kMOD: return 1; |
3090 default: UNIMPLEMENTED(); return -1; | 3090 default: UNIMPLEMENTED(); return -1; |
3091 } | 3091 } |
3092 } | 3092 } |
3093 | 3093 |
3094 | 3094 |
3095 #undef __ | 3095 #undef __ |
3096 | 3096 |
3097 } // namespace dart | 3097 } // namespace dart |
OLD | NEW |