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

Unified Diff: runtime/vm/isolate.h

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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/isolate.h
===================================================================
--- runtime/vm/isolate.h (revision 29938)
+++ runtime/vm/isolate.h (working copy)
@@ -13,6 +13,7 @@
#include "vm/gc_callbacks.h"
#include "vm/handles.h"
#include "vm/megamorphic_cache_table.h"
+#include "vm/random.h"
#include "vm/store_buffer.h"
#include "vm/timer.h"
@@ -273,6 +274,8 @@
return OFFSET_OF(Isolate, single_step_);
}
+ Random* random() { return &random_; }
+
Simulator* simulator() const { return simulator_; }
void set_simulator(Simulator* value) { simulator_ = value; }
@@ -343,6 +346,13 @@
return file_close_callback_;
}
+ static void SetEntropySourceCallback(Dart_EntropySource entropy_source) {
+ entropy_source_callback_ = entropy_source;
+ }
+ static Dart_EntropySource entropy_source_callback() {
+ return entropy_source_callback_;
+ }
+
void set_object_id_ring(ObjectIdRing* ring) {
object_id_ring_ = ring;
}
@@ -388,6 +398,7 @@
template<class T> T* AllocateReusableHandle();
static ThreadLocalKey isolate_key;
+
StoreBuffer store_buffer_;
ClassTable class_table_;
MegamorphicCacheTable megamorphic_cache_table_;
@@ -406,6 +417,7 @@
StubCode* stub_code_;
Debugger* debugger_;
bool single_step_;
+ Random random_;
Simulator* simulator_;
LongJump* long_jump_base_;
TimerList timer_list_;
@@ -445,6 +457,7 @@
static Dart_FileReadCallback file_read_callback_;
static Dart_FileWriteCallback file_write_callback_;
static Dart_FileCloseCallback file_close_callback_;
+ static Dart_EntropySource entropy_source_callback_;
static Dart_IsolateInterruptCallback vmstats_callback_;
friend class ReusableHandleScope;

Powered by Google App Engine
This is Rietveld 408576698