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/snapshot.h" | 5 #include "vm/snapshot.h" |
6 | 6 |
7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
8 #include "vm/bootstrap.h" | 8 #include "vm/bootstrap.h" |
9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "vm/timeline.h" | 22 #include "vm/timeline.h" |
23 #include "vm/version.h" | 23 #include "vm/version.h" |
24 | 24 |
25 // We currently only expect the Dart mutator to read snapshots. | 25 // We currently only expect the Dart mutator to read snapshots. |
26 #define ASSERT_NO_SAFEPOINT_SCOPE() \ | 26 #define ASSERT_NO_SAFEPOINT_SCOPE() \ |
27 isolate()->AssertCurrentThreadIsMutator(); \ | 27 isolate()->AssertCurrentThreadIsMutator(); \ |
28 ASSERT(thread()->no_safepoint_scope_depth() != 0) | 28 ASSERT(thread()->no_safepoint_scope_depth() != 0) |
29 | 29 |
30 namespace dart { | 30 namespace dart { |
31 | 31 |
32 static const int kNumInitialReferences = 64; | 32 static const int kNumInitialReferences = 32; |
33 | 33 |
34 | 34 |
35 static bool IsSingletonClassId(intptr_t class_id) { | 35 static bool IsSingletonClassId(intptr_t class_id) { |
36 // Check if this is a singleton object class which is shared by all isolates. | 36 // Check if this is a singleton object class which is shared by all isolates. |
37 return ((class_id >= kClassCid && class_id <= kUnwindErrorCid) || | 37 return ((class_id >= kClassCid && class_id <= kUnwindErrorCid) || |
38 (class_id >= kNullCid && class_id <= kVoidCid)); | 38 (class_id >= kNullCid && class_id <= kVoidCid)); |
39 } | 39 } |
40 | 40 |
41 | 41 |
42 static bool IsObjectStoreClassId(intptr_t class_id) { | 42 static bool IsObjectStoreClassId(intptr_t class_id) { |
(...skipping 2008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2051 *buffer_len_ = BytesWritten(); | 2051 *buffer_len_ = BytesWritten(); |
2052 } | 2052 } |
2053 } else { | 2053 } else { |
2054 FreeBuffer(); | 2054 FreeBuffer(); |
2055 ThrowException(exception_type(), exception_msg()); | 2055 ThrowException(exception_type(), exception_msg()); |
2056 } | 2056 } |
2057 } | 2057 } |
2058 | 2058 |
2059 | 2059 |
2060 } // namespace dart | 2060 } // namespace dart |
OLD | NEW |