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

Side by Side Diff: src/v8.cc

Issue 5826004: Add a write buffer, aligned so that a single bit tells us whether it has... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years 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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 "deoptimizer.h" 32 #include "deoptimizer.h"
33 #include "heap-profiler.h" 33 #include "heap-profiler.h"
34 #include "hydrogen.h" 34 #include "hydrogen.h"
35 #include "lithium-allocator.h" 35 #include "lithium-allocator.h"
36 #include "log.h" 36 #include "log.h"
37 #include "oprofile-agent.h" 37 #include "oprofile-agent.h"
38 #include "runtime-profiler.h" 38 #include "runtime-profiler.h"
39 #include "serialize.h" 39 #include "serialize.h"
40 #include "simulator.h" 40 #include "simulator.h"
41 #include "stub-cache.h" 41 #include "stub-cache.h"
42 #include "write-buffer.h"
42 43
43 namespace v8 { 44 namespace v8 {
44 namespace internal { 45 namespace internal {
45 46
46 bool V8::is_running_ = false; 47 bool V8::is_running_ = false;
47 bool V8::has_been_setup_ = false; 48 bool V8::has_been_setup_ = false;
48 bool V8::has_been_disposed_ = false; 49 bool V8::has_been_disposed_ = false;
49 bool V8::has_fatal_error_ = false; 50 bool V8::has_fatal_error_ = false;
50 bool V8::use_crankshaft_ = true; 51 bool V8::use_crankshaft_ = true;
51 52
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 #endif 87 #endif
87 88
88 { // NOLINT 89 { // NOLINT
89 // Ensure that the thread has a valid stack guard. The v8::Locker object 90 // Ensure that the thread has a valid stack guard. The v8::Locker object
90 // will ensure this too, but we don't have to use lockers if we are only 91 // will ensure this too, but we don't have to use lockers if we are only
91 // using one thread. 92 // using one thread.
92 ExecutionAccess lock; 93 ExecutionAccess lock;
93 StackGuard::InitThread(lock); 94 StackGuard::InitThread(lock);
94 } 95 }
95 96
97 WriteBuffer::Setup();
98
96 // Setup the object heap 99 // Setup the object heap
97 ASSERT(!Heap::HasBeenSetup()); 100 ASSERT(!Heap::HasBeenSetup());
98 if (!Heap::Setup(create_heap_objects)) { 101 if (!Heap::Setup(create_heap_objects)) {
99 SetFatalError(); 102 SetFatalError();
100 return false; 103 return false;
101 } 104 }
102 105
103 Bootstrapper::Initialize(create_heap_objects); 106 Bootstrapper::Initialize(create_heap_objects);
104 Builtins::Setup(create_heap_objects); 107 Builtins::Setup(create_heap_objects);
105 Top::Initialize(); 108 Top::Initialize();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 176
174 Top::TearDown(); 177 Top::TearDown();
175 178
176 HeapProfiler::TearDown(); 179 HeapProfiler::TearDown();
177 CpuProfiler::TearDown(); 180 CpuProfiler::TearDown();
178 RuntimeProfiler::TearDown(); 181 RuntimeProfiler::TearDown();
179 182
180 Logger::TearDown(); 183 Logger::TearDown();
181 Heap::TearDown(); 184 Heap::TearDown();
182 185
186 WriteBuffer::TearDown();
187
183 is_running_ = false; 188 is_running_ = false;
184 has_been_disposed_ = true; 189 has_been_disposed_ = true;
185 } 190 }
186 191
187 192
188 static uint32_t random_seed() { 193 static uint32_t random_seed() {
189 if (FLAG_random_seed == 0) { 194 if (FLAG_random_seed == 0) {
190 return random(); 195 return random();
191 } 196 }
192 return FLAG_random_seed; 197 return FLAG_random_seed;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 // ( 1.(20 0s)(32 random bits) x 2^20 ) - (1.0 x 2^20)). 264 // ( 1.(20 0s)(32 random bits) x 2^20 ) - (1.0 x 2^20)).
260 const double binary_million = 1048576.0; 265 const double binary_million = 1048576.0;
261 r->double_value = binary_million; 266 r->double_value = binary_million;
262 r->uint64_t_value |= random_bits; 267 r->uint64_t_value |= random_bits;
263 r->double_value -= binary_million; 268 r->double_value -= binary_million;
264 269
265 return heap_number; 270 return heap_number;
266 } 271 }
267 272
268 } } // namespace v8::internal 273 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698