| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 10477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10488 } | 10488 } |
| 10489 | 10489 |
| 10490 | 10490 |
| 10491 int Integer::CompareWith(const Integer& other) const { | 10491 int Integer::CompareWith(const Integer& other) const { |
| 10492 UNIMPLEMENTED(); | 10492 UNIMPLEMENTED(); |
| 10493 return 0; | 10493 return 0; |
| 10494 } | 10494 } |
| 10495 | 10495 |
| 10496 | 10496 |
| 10497 static void CheckFiftyThreeBitOverflow(const Integer &i) { | 10497 static void CheckFiftyThreeBitOverflow(const Integer &i) { |
| 10498 if (i.IsSmi()) return; | |
| 10499 // Always overflow if the value doesn't fit into an int64_t. | 10498 // Always overflow if the value doesn't fit into an int64_t. |
| 10500 int64_t value = 1ULL << 63; | 10499 int64_t value = 1ULL << 63; |
| 10501 if (i.IsMint()) { | 10500 if (i.IsSmi()) { |
| 10501 value = i.AsInt64Value(); |
| 10502 } else if (i.IsMint()) { |
| 10502 Mint& mint = Mint::Handle(); | 10503 Mint& mint = Mint::Handle(); |
| 10503 mint ^= i.raw(); | 10504 mint ^= i.raw(); |
| 10504 value = mint.value(); | 10505 value = mint.value(); |
| 10505 } else { | 10506 } else { |
| 10506 ASSERT(i.IsBigint()); | 10507 ASSERT(i.IsBigint()); |
| 10507 Bigint& big_value = Bigint::Handle(); | 10508 Bigint& big_value = Bigint::Handle(); |
| 10508 big_value ^= i.raw(); | 10509 big_value ^= i.raw(); |
| 10509 if (BigintOperations::FitsIntoInt64(big_value)) { | 10510 if (BigintOperations::FitsIntoInt64(big_value)) { |
| 10510 value = BigintOperations::ToInt64(big_value); | 10511 value = BigintOperations::ToInt64(big_value); |
| 10511 } | 10512 } |
| (...skipping 2860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13372 space); | 13373 space); |
| 13373 return reinterpret_cast<RawWeakProperty*>(raw); | 13374 return reinterpret_cast<RawWeakProperty*>(raw); |
| 13374 } | 13375 } |
| 13375 | 13376 |
| 13376 | 13377 |
| 13377 const char* WeakProperty::ToCString() const { | 13378 const char* WeakProperty::ToCString() const { |
| 13378 return "_WeakProperty"; | 13379 return "_WeakProperty"; |
| 13379 } | 13380 } |
| 13380 | 13381 |
| 13381 } // namespace dart | 13382 } // namespace dart |
| OLD | NEW |