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

Side by Side Diff: src/isolate.cc

Issue 23548024: Introduce a RandonNumberGenerator class. Refactor the random/private_random uses in Isolate/Context. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/isolate.h ('k') | src/isolate-inl.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 21 matching lines...) Expand all
32 #include "allocation-inl.h" 32 #include "allocation-inl.h"
33 #include "ast.h" 33 #include "ast.h"
34 #include "bootstrapper.h" 34 #include "bootstrapper.h"
35 #include "codegen.h" 35 #include "codegen.h"
36 #include "compilation-cache.h" 36 #include "compilation-cache.h"
37 #include "cpu-profiler.h" 37 #include "cpu-profiler.h"
38 #include "debug.h" 38 #include "debug.h"
39 #include "deoptimizer.h" 39 #include "deoptimizer.h"
40 #include "heap-profiler.h" 40 #include "heap-profiler.h"
41 #include "hydrogen.h" 41 #include "hydrogen.h"
42 #include "isolate.h" 42 #include "isolate-inl.h"
43 #include "lithium-allocator.h" 43 #include "lithium-allocator.h"
44 #include "log.h" 44 #include "log.h"
45 #include "marking-thread.h" 45 #include "marking-thread.h"
46 #include "messages.h" 46 #include "messages.h"
47 #include "platform.h" 47 #include "platform.h"
48 #include "regexp-stack.h" 48 #include "regexp-stack.h"
49 #include "runtime-profiler.h" 49 #include "runtime-profiler.h"
50 #include "sampler.h" 50 #include "sampler.h"
51 #include "scopeinfo.h" 51 #include "scopeinfo.h"
52 #include "serialize.h" 52 #include "serialize.h"
53 #include "simulator.h" 53 #include "simulator.h"
54 #include "spaces.h" 54 #include "spaces.h"
55 #include "stub-cache.h" 55 #include "stub-cache.h"
56 #include "sweeper-thread.h" 56 #include "sweeper-thread.h"
57 #include "utils/random-number-generator.h"
57 #include "version.h" 58 #include "version.h"
58 #include "vm-state-inl.h" 59 #include "vm-state-inl.h"
59 60
60 61
61 namespace v8 { 62 namespace v8 {
62 namespace internal { 63 namespace internal {
63 64
64 Atomic32 ThreadId::highest_thread_id_ = 0; 65 Atomic32 ThreadId::highest_thread_id_ = 0;
65 66
66 int ThreadId::AllocateThreadId() { 67 int ThreadId::AllocateThreadId() {
(...skipping 1698 matching lines...) Expand 10 before | Expand all | Expand 10 after
1765 global_handles_(NULL), 1766 global_handles_(NULL),
1766 eternal_handles_(NULL), 1767 eternal_handles_(NULL),
1767 context_switcher_(NULL), 1768 context_switcher_(NULL),
1768 thread_manager_(NULL), 1769 thread_manager_(NULL),
1769 fp_stubs_generated_(false), 1770 fp_stubs_generated_(false),
1770 has_installed_extensions_(false), 1771 has_installed_extensions_(false),
1771 string_tracker_(NULL), 1772 string_tracker_(NULL),
1772 regexp_stack_(NULL), 1773 regexp_stack_(NULL),
1773 date_cache_(NULL), 1774 date_cache_(NULL),
1774 code_stub_interface_descriptors_(NULL), 1775 code_stub_interface_descriptors_(NULL),
1776 // TODO(bmeurer) Initialized lazily because it depends on flags; can
1777 // be fixed once the default isolate cleanup is done.
1778 random_number_generator_(NULL),
1775 has_fatal_error_(false), 1779 has_fatal_error_(false),
1776 use_crankshaft_(true), 1780 use_crankshaft_(true),
1777 initialized_from_snapshot_(false), 1781 initialized_from_snapshot_(false),
1778 cpu_profiler_(NULL), 1782 cpu_profiler_(NULL),
1779 heap_profiler_(NULL), 1783 heap_profiler_(NULL),
1780 function_entry_hook_(NULL), 1784 function_entry_hook_(NULL),
1781 deferred_handles_head_(NULL), 1785 deferred_handles_head_(NULL),
1782 optimizing_compiler_thread_(this), 1786 optimizing_compiler_thread_(this),
1783 marking_thread_(NULL), 1787 marking_thread_(NULL),
1784 sweeper_thread_(NULL), 1788 sweeper_thread_(NULL),
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
2040 global_handles_ = NULL; 2044 global_handles_ = NULL;
2041 delete eternal_handles_; 2045 delete eternal_handles_;
2042 eternal_handles_ = NULL; 2046 eternal_handles_ = NULL;
2043 2047
2044 delete string_stream_debug_object_cache_; 2048 delete string_stream_debug_object_cache_;
2045 string_stream_debug_object_cache_ = NULL; 2049 string_stream_debug_object_cache_ = NULL;
2046 2050
2047 delete external_reference_table_; 2051 delete external_reference_table_;
2048 external_reference_table_ = NULL; 2052 external_reference_table_ = NULL;
2049 2053
2054 delete random_number_generator_;
2055 random_number_generator_ = NULL;
2056
2050 #ifdef ENABLE_DEBUGGER_SUPPORT 2057 #ifdef ENABLE_DEBUGGER_SUPPORT
2051 delete debugger_; 2058 delete debugger_;
2052 debugger_ = NULL; 2059 debugger_ = NULL;
2053 delete debug_; 2060 delete debug_;
2054 debug_ = NULL; 2061 debug_ = NULL;
2055 #endif 2062 #endif
2056 } 2063 }
2057 2064
2058 2065
2059 void Isolate::InitializeThreadLocal() { 2066 void Isolate::InitializeThreadLocal() {
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
2513 2520
2514 #ifdef DEBUG 2521 #ifdef DEBUG
2515 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2522 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2516 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2523 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2517 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2524 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2518 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2525 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2519 #undef ISOLATE_FIELD_OFFSET 2526 #undef ISOLATE_FIELD_OFFSET
2520 #endif 2527 #endif
2521 2528
2522 } } // namespace v8::internal 2529 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/isolate-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698