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 3102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3113 break; | 3113 break; |
3114 case kTypedDataInt16ArrayCid: | 3114 case kTypedDataInt16ArrayCid: |
3115 range_ = new Range(RangeBoundary::FromConstant(-32768), | 3115 range_ = new Range(RangeBoundary::FromConstant(-32768), |
3116 RangeBoundary::FromConstant(32767)); | 3116 RangeBoundary::FromConstant(32767)); |
3117 break; | 3117 break; |
3118 case kTypedDataUint16ArrayCid: | 3118 case kTypedDataUint16ArrayCid: |
3119 range_ = new Range(RangeBoundary::FromConstant(0), | 3119 range_ = new Range(RangeBoundary::FromConstant(0), |
3120 RangeBoundary::FromConstant(65535)); | 3120 RangeBoundary::FromConstant(65535)); |
3121 break; | 3121 break; |
3122 case kTypedDataInt32ArrayCid: | 3122 case kTypedDataInt32ArrayCid: |
3123 if (CanDeoptimize()) { | 3123 if (Typed32BitIsSmi()) { |
3124 range_ = Range::UnknownSmi(); | 3124 range_ = Range::UnknownSmi(); |
3125 } else { | 3125 } else { |
3126 range_ = new Range(RangeBoundary::FromConstant(kMinInt32), | 3126 range_ = new Range(RangeBoundary::FromConstant(kMinInt32), |
3127 RangeBoundary::FromConstant(kMaxInt32)); | 3127 RangeBoundary::FromConstant(kMaxInt32)); |
3128 } | 3128 } |
3129 break; | 3129 break; |
3130 case kTypedDataUint32ArrayCid: | 3130 case kTypedDataUint32ArrayCid: |
3131 if (CanDeoptimize()) { | 3131 if (Typed32BitIsSmi()) { |
3132 range_ = Range::UnknownSmi(); | 3132 range_ = Range::UnknownSmi(); |
3133 } else { | 3133 } else { |
3134 range_ = new Range(RangeBoundary::FromConstant(0), | 3134 range_ = new Range(RangeBoundary::FromConstant(0), |
3135 RangeBoundary::FromConstant(kMaxUint32)); | 3135 RangeBoundary::FromConstant(kMaxUint32)); |
3136 } | 3136 } |
3137 break; | 3137 break; |
3138 case kOneByteStringCid: | 3138 case kOneByteStringCid: |
3139 range_ = new Range(RangeBoundary::FromConstant(0), | 3139 range_ = new Range(RangeBoundary::FromConstant(0), |
3140 RangeBoundary::FromConstant(0xFF)); | 3140 RangeBoundary::FromConstant(0xFF)); |
3141 break; | 3141 break; |
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4109 case Token::kTRUNCDIV: return 0; | 4109 case Token::kTRUNCDIV: return 0; |
4110 case Token::kMOD: return 1; | 4110 case Token::kMOD: return 1; |
4111 default: UNIMPLEMENTED(); return -1; | 4111 default: UNIMPLEMENTED(); return -1; |
4112 } | 4112 } |
4113 } | 4113 } |
4114 | 4114 |
4115 | 4115 |
4116 #undef __ | 4116 #undef __ |
4117 | 4117 |
4118 } // namespace dart | 4118 } // namespace dart |
OLD | NEW |