Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: runtime/vm/snapshot.cc

Issue 2958603004: Shrink the inital size of the message snapshot ref table to fit in the initial zone chunk. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698