| 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/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/constant_propagator.h" | 8 #include "vm/constant_propagator.h" |
| 9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 return true; | 210 return true; |
| 211 } | 211 } |
| 212 return false; | 212 return false; |
| 213 } | 213 } |
| 214 | 214 |
| 215 | 215 |
| 216 intptr_t CheckClassInstr::ComputeCidMask() const { | 216 intptr_t CheckClassInstr::ComputeCidMask() const { |
| 217 ASSERT(IsDenseSwitch()); | 217 ASSERT(IsDenseSwitch()); |
| 218 intptr_t mask = 0; | 218 intptr_t mask = 0; |
| 219 for (intptr_t i = 0; i < cids_.length(); ++i) { | 219 for (intptr_t i = 0; i < cids_.length(); ++i) { |
| 220 mask |= 1 << (cids_[i] - cids_[0]); | 220 mask |= static_cast<intptr_t>(1) << (cids_[i] - cids_[0]); |
| 221 } | 221 } |
| 222 return mask; | 222 return mask; |
| 223 } | 223 } |
| 224 | 224 |
| 225 | 225 |
| 226 bool CheckClassInstr::IsDenseMask(intptr_t mask) { | 226 bool CheckClassInstr::IsDenseMask(intptr_t mask) { |
| 227 // Returns true if the mask is a continuos sequence of ones in its binary | 227 // Returns true if the mask is a continuos sequence of ones in its binary |
| 228 // representation (i.e. no holes) | 228 // representation (i.e. no holes) |
| 229 return mask == -1 || Utils::IsPowerOfTwo(mask + 1); | 229 return mask == -1 || Utils::IsPowerOfTwo(mask + 1); |
| 230 } | 230 } |
| (...skipping 3259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3490 case Token::kTRUNCDIV: return 0; | 3490 case Token::kTRUNCDIV: return 0; |
| 3491 case Token::kMOD: return 1; | 3491 case Token::kMOD: return 1; |
| 3492 default: UNIMPLEMENTED(); return -1; | 3492 default: UNIMPLEMENTED(); return -1; |
| 3493 } | 3493 } |
| 3494 } | 3494 } |
| 3495 | 3495 |
| 3496 | 3496 |
| 3497 #undef __ | 3497 #undef __ |
| 3498 | 3498 |
| 3499 } // namespace dart | 3499 } // namespace dart |
| OLD | NEW |