OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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/isolate_reload.h" | 5 #include "vm/isolate_reload.h" |
6 | 6 |
7 #include "vm/become.h" | 7 #include "vm/become.h" |
8 #include "vm/bit_vector.h" | 8 #include "vm/bit_vector.h" |
9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/dart_api_impl.h" | 10 #include "vm/dart_api_impl.h" |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 if (obj.IsLibrary()) { | 350 if (obj.IsLibrary()) { |
351 return Library::Cast(obj).UrlHash(); | 351 return Library::Cast(obj).UrlHash(); |
352 } else if (obj.IsClass()) { | 352 } else if (obj.IsClass()) { |
353 if (Class::Cast(obj).id() == kFreeListElement) { | 353 if (Class::Cast(obj).id() == kFreeListElement) { |
354 return 0; | 354 return 0; |
355 } | 355 } |
356 return String::HashRawSymbol(Class::Cast(obj).Name()); | 356 return String::HashRawSymbol(Class::Cast(obj).Name()); |
357 } else if (obj.IsField()) { | 357 } else if (obj.IsField()) { |
358 return String::HashRawSymbol(Field::Cast(obj).name()); | 358 return String::HashRawSymbol(Field::Cast(obj).name()); |
359 } else if (obj.IsInstance()) { | 359 } else if (obj.IsInstance()) { |
360 return Smi::Handle(Smi::RawCast(Instance::Cast(obj).HashCode())).Value(); | 360 Object& hashObj = Object::Handle(Instance::Cast(obj).HashCode()); |
| 361 if (hashObj.IsError()) { |
| 362 Exceptions::PropagateError(Error::Cast(hashObj)); |
| 363 } |
| 364 return Smi::Cast(hashObj).Value(); |
361 } | 365 } |
362 return 0; | 366 return 0; |
363 } | 367 } |
364 }; | 368 }; |
365 | 369 |
366 bool IsolateReloadContext::IsSameField(const Field& a, const Field& b) { | 370 bool IsolateReloadContext::IsSameField(const Field& a, const Field& b) { |
367 if (a.is_static() != b.is_static()) { | 371 if (a.is_static() != b.is_static()) { |
368 return false; | 372 return false; |
369 } | 373 } |
370 const Class& a_cls = Class::Handle(a.Owner()); | 374 const Class& a_cls = Class::Handle(a.Owner()); |
(...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1818 ASSERT(!super_cls.IsNull()); | 1822 ASSERT(!super_cls.IsNull()); |
1819 super_cls.AddDirectSubclass(cls); | 1823 super_cls.AddDirectSubclass(cls); |
1820 } | 1824 } |
1821 } | 1825 } |
1822 } | 1826 } |
1823 } | 1827 } |
1824 | 1828 |
1825 #endif // !PRODUCT | 1829 #endif // !PRODUCT |
1826 | 1830 |
1827 } // namespace dart | 1831 } // namespace dart |
OLD | NEW |