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

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

Issue 2626343002: 1. Added new flag verify_gc_contains and moved all the asserts that do a (Closed)
Patch Set: Created 3 years, 11 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 | runtime/vm/flag_list.h » ('j') | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/dart.h" 5 #include "vm/dart.h"
6 6
7 #include "vm/become.h" 7 #include "vm/become.h"
8 #include "vm/clustered_snapshot.h" 8 #include "vm/clustered_snapshot.h"
9 #include "vm/code_observers.h" 9 #include "vm/code_observers.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 Dart_FileReadCallback file_read, 132 Dart_FileReadCallback file_read,
133 Dart_FileWriteCallback file_write, 133 Dart_FileWriteCallback file_write,
134 Dart_FileCloseCallback file_close, 134 Dart_FileCloseCallback file_close,
135 Dart_EntropySource entropy_source, 135 Dart_EntropySource entropy_source,
136 Dart_GetVMServiceAssetsArchive get_service_assets) { 136 Dart_GetVMServiceAssetsArchive get_service_assets) {
137 CheckOffsets(); 137 CheckOffsets();
138 // TODO(iposva): Fix race condition here. 138 // TODO(iposva): Fix race condition here.
139 if (vm_isolate_ != NULL || !Flags::Initialized()) { 139 if (vm_isolate_ != NULL || !Flags::Initialized()) {
140 return strdup("VM already initialized or flags not initialized."); 140 return strdup("VM already initialized or flags not initialized.");
141 } 141 }
142 #if defined(DEBUG)
143 // Turn on verify_gc_contains if any of the other GC verification flag
144 // is turned on.
145 if (FLAG_verify_before_gc || FLAG_verify_after_gc ||
146 FLAG_verify_on_transition) {
147 FLAG_verify_gc_contains = true;
148 }
149 #endif
142 set_thread_exit_callback(thread_exit); 150 set_thread_exit_callback(thread_exit);
143 SetFileCallbacks(file_open, file_read, file_write, file_close); 151 SetFileCallbacks(file_open, file_read, file_write, file_close);
144 set_entropy_source_callback(entropy_source); 152 set_entropy_source_callback(entropy_source);
145 OS::InitOnce(); 153 OS::InitOnce();
146 start_time_micros_ = OS::GetCurrentMonotonicMicros(); 154 start_time_micros_ = OS::GetCurrentMonotonicMicros();
147 VirtualMemory::InitOnce(); 155 VirtualMemory::InitOnce();
148 OSThread::InitOnce(); 156 OSThread::InitOnce();
149 if (FLAG_support_timeline) { 157 if (FLAG_support_timeline) {
150 Timeline::InitOnce(); 158 Timeline::InitOnce();
151 } 159 }
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 return predefined_handles_->handles_.IsValidScopedHandle(address); 749 return predefined_handles_->handles_.IsValidScopedHandle(address);
742 } 750 }
743 751
744 752
745 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { 753 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) {
746 ASSERT(predefined_handles_ != NULL); 754 ASSERT(predefined_handles_ != NULL);
747 return predefined_handles_->api_handles_.IsValidHandle(handle); 755 return predefined_handles_->api_handles_.IsValidHandle(handle);
748 } 756 }
749 757
750 } // namespace dart 758 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flag_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698