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

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

Issue 59773007: - Add a per-isolate pseudo random number generator to the (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
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/code_observers.h" 7 #include "vm/code_observers.h"
8 #include "vm/dart_api_state.h" 8 #include "vm/dart_api_state.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 }; 74 };
75 75
76 76
77 const char* Dart::InitOnce(Dart_IsolateCreateCallback create, 77 const char* Dart::InitOnce(Dart_IsolateCreateCallback create,
78 Dart_IsolateInterruptCallback interrupt, 78 Dart_IsolateInterruptCallback interrupt,
79 Dart_IsolateUnhandledExceptionCallback unhandled, 79 Dart_IsolateUnhandledExceptionCallback unhandled,
80 Dart_IsolateShutdownCallback shutdown, 80 Dart_IsolateShutdownCallback shutdown,
81 Dart_FileOpenCallback file_open, 81 Dart_FileOpenCallback file_open,
82 Dart_FileReadCallback file_read, 82 Dart_FileReadCallback file_read,
83 Dart_FileWriteCallback file_write, 83 Dart_FileWriteCallback file_write,
84 Dart_FileCloseCallback file_close) { 84 Dart_FileCloseCallback file_close,
85 Dart_EntropySource entropy_source) {
85 // TODO(iposva): Fix race condition here. 86 // TODO(iposva): Fix race condition here.
86 if (vm_isolate_ != NULL || !Flags::Initialized()) { 87 if (vm_isolate_ != NULL || !Flags::Initialized()) {
87 return "VM already initialized."; 88 return "VM already initialized.";
88 } 89 }
89 Isolate::SetFileCallbacks(file_open, file_read, file_write, file_close); 90 Isolate::SetFileCallbacks(file_open, file_read, file_write, file_close);
91 Isolate::SetEntropySourceCallback(entropy_source);
90 OS::InitOnce(); 92 OS::InitOnce();
91 VirtualMemory::InitOnce(); 93 VirtualMemory::InitOnce();
92 Isolate::InitOnce(); 94 Isolate::InitOnce();
93 PortMap::InitOnce(); 95 PortMap::InitOnce();
94 FreeListElement::InitOnce(); 96 FreeListElement::InitOnce();
95 Api::InitOnce(); 97 Api::InitOnce();
96 CodeObservers::InitOnce(); 98 CodeObservers::InitOnce();
97 #if defined(USING_SIMULATOR) 99 #if defined(USING_SIMULATOR)
98 Simulator::InitOnce(); 100 Simulator::InitOnce();
99 #endif 101 #endif
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 return predefined_handles_->handles_.AllocateScopedHandle(); 267 return predefined_handles_->handles_.AllocateScopedHandle();
266 } 268 }
267 269
268 270
269 bool Dart::IsReadOnlyHandle(uword address) { 271 bool Dart::IsReadOnlyHandle(uword address) {
270 ASSERT(predefined_handles_ != NULL); 272 ASSERT(predefined_handles_ != NULL);
271 return predefined_handles_->handles_.IsValidScopedHandle(address); 273 return predefined_handles_->handles_.IsValidScopedHandle(address);
272 } 274 }
273 275
274 } // namespace dart 276 } // namespace dart
OLDNEW
« runtime/bin/dartutils.cc ('K') | « runtime/vm/dart.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698