| 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/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 10451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10462 Zone* zone = Isolate::Current()->current_zone(); | 10462 Zone* zone = Isolate::Current()->current_zone(); |
| 10463 return zone->AllocUnsafe(size); | 10463 return zone->AllocUnsafe(size); |
| 10464 } | 10464 } |
| 10465 | 10465 |
| 10466 | 10466 |
| 10467 const char* Bigint::ToCString() const { | 10467 const char* Bigint::ToCString() const { |
| 10468 return BigintOperations::ToDecimalCString(*this, &BigintAllocator); | 10468 return BigintOperations::ToDecimalCString(*this, &BigintAllocator); |
| 10469 } | 10469 } |
| 10470 | 10470 |
| 10471 | 10471 |
| 10472 // Synchronize with implementation in compiler (intrinsifier). |
| 10472 class StringHasher : ValueObject { | 10473 class StringHasher : ValueObject { |
| 10473 public: | 10474 public: |
| 10474 StringHasher() : hash_(0) {} | 10475 StringHasher() : hash_(0) {} |
| 10475 void Add(int32_t ch) { | 10476 void Add(int32_t ch) { |
| 10476 hash_ += ch; | 10477 hash_ += ch; |
| 10477 hash_ += hash_ << 10; | 10478 hash_ += hash_ << 10; |
| 10478 hash_ ^= hash_ >> 6; | 10479 hash_ ^= hash_ >> 6; |
| 10479 } | 10480 } |
| 10480 // Return a non-zero hash of at most 'bits' bits. | 10481 // Return a non-zero hash of at most 'bits' bits. |
| 10481 intptr_t Finalize(int bits) { | 10482 intptr_t Finalize(int bits) { |
| (...skipping 2624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13106 } | 13107 } |
| 13107 return result.raw(); | 13108 return result.raw(); |
| 13108 } | 13109 } |
| 13109 | 13110 |
| 13110 | 13111 |
| 13111 const char* WeakProperty::ToCString() const { | 13112 const char* WeakProperty::ToCString() const { |
| 13112 return "_WeakProperty"; | 13113 return "_WeakProperty"; |
| 13113 } | 13114 } |
| 13114 | 13115 |
| 13115 } // namespace dart | 13116 } // namespace dart |
| OLD | NEW |