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

Side by Side Diff: src/v8.cc

Issue 6529032: Merge 6168:6800 from bleeding_edge to experimental/gc branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 10 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/utils.cc ('k') | src/v8-counters.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 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 16 matching lines...) Expand all
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #include "bootstrapper.h" 30 #include "bootstrapper.h"
31 #include "debug.h" 31 #include "debug.h"
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"
38 #include "runtime-profiler.h" 37 #include "runtime-profiler.h"
39 #include "serialize.h" 38 #include "serialize.h"
40 #include "simulator.h" 39 #include "simulator.h"
41 #include "stub-cache.h" 40 #include "stub-cache.h"
42 #include "store-buffer.h" 41 #include "store-buffer.h"
43 42
44 namespace v8 { 43 namespace v8 {
45 namespace internal { 44 namespace internal {
46 45
47 bool V8::is_running_ = false; 46 bool V8::is_running_ = false;
(...skipping 25 matching lines...) Expand all
73 72
74 CpuProfiler::Setup(); 73 CpuProfiler::Setup();
75 HeapProfiler::Setup(); 74 HeapProfiler::Setup();
76 75
77 // Setup the platform OS support. 76 // Setup the platform OS support.
78 OS::Setup(); 77 OS::Setup();
79 78
80 // Initialize other runtime facilities 79 // Initialize other runtime facilities
81 #if defined(USE_SIMULATOR) 80 #if defined(USE_SIMULATOR)
82 #if defined(V8_TARGET_ARCH_ARM) 81 #if defined(V8_TARGET_ARCH_ARM)
83 ::assembler::arm::Simulator::Initialize(); 82 Simulator::Initialize();
84 #elif defined(V8_TARGET_ARCH_MIPS) 83 #elif defined(V8_TARGET_ARCH_MIPS)
85 ::assembler::mips::Simulator::Initialize(); 84 ::assembler::mips::Simulator::Initialize();
86 #endif 85 #endif
87 #endif 86 #endif
88 87
89 { // NOLINT 88 { // NOLINT
90 // Ensure that the thread has a valid stack guard. The v8::Locker object 89 // Ensure that the thread has a valid stack guard. The v8::Locker object
91 // will ensure this too, but we don't have to use lockers if we are only 90 // will ensure this too, but we don't have to use lockers if we are only
92 // using one thread. 91 // using one thread.
93 ExecutionAccess lock; 92 ExecutionAccess lock;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 124
126 // Deserializing may put strange things in the root array's copy of the 125 // Deserializing may put strange things in the root array's copy of the
127 // stack guard. 126 // stack guard.
128 Heap::SetStackLimits(); 127 Heap::SetStackLimits();
129 128
130 // Setup the CPU support. Must be done after heap setup and after 129 // Setup the CPU support. Must be done after heap setup and after
131 // any deserialization because we have to have the initial heap 130 // any deserialization because we have to have the initial heap
132 // objects in place for creating the code object used for probing. 131 // objects in place for creating the code object used for probing.
133 CPU::Setup(); 132 CPU::Setup();
134 133
135 OProfileAgent::Initialize();
136 Deoptimizer::Setup(); 134 Deoptimizer::Setup();
137 LAllocator::Setup(); 135 LAllocator::Setup();
138 RuntimeProfiler::Setup(); 136 RuntimeProfiler::Setup();
139 137
140 // If we are deserializing, log non-function code objects and compiled 138 // If we are deserializing, log non-function code objects and compiled
141 // functions found in the snapshot. 139 // functions found in the snapshot.
142 if (des != NULL && FLAG_log_code) { 140 if (des != NULL && FLAG_log_code) {
143 HandleScope scope; 141 HandleScope scope;
144 LOG(LogCodeObjects()); 142 LOG(LogCodeObjects());
145 LOG(LogCompiledFunctions()); 143 LOG(LogCompiledFunctions());
(...skipping 11 matching lines...) Expand all
157 155
158 void V8::TearDown() { 156 void V8::TearDown() {
159 if (!has_been_setup_ || has_been_disposed_) return; 157 if (!has_been_setup_ || has_been_disposed_) return;
160 158
161 if (FLAG_time_hydrogen) HStatistics::Instance()->Print(); 159 if (FLAG_time_hydrogen) HStatistics::Instance()->Print();
162 160
163 // We must stop the logger before we tear down other components. 161 // We must stop the logger before we tear down other components.
164 Logger::EnsureTickerStopped(); 162 Logger::EnsureTickerStopped();
165 163
166 Deoptimizer::TearDown(); 164 Deoptimizer::TearDown();
167 OProfileAgent::TearDown();
168 165
169 if (FLAG_preemption) { 166 if (FLAG_preemption) {
170 v8::Locker locker; 167 v8::Locker locker;
171 v8::Locker::StopPreemption(); 168 v8::Locker::StopPreemption();
172 } 169 }
173 170
174 Builtins::TearDown(); 171 Builtins::TearDown();
175 Bootstrapper::TearDown(); 172 Bootstrapper::TearDown();
176 173
177 Top::TearDown(); 174 Top::TearDown();
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // ( 1.(20 0s)(32 random bits) x 2^20 ) - (1.0 x 2^20)). 261 // ( 1.(20 0s)(32 random bits) x 2^20 ) - (1.0 x 2^20)).
265 const double binary_million = 1048576.0; 262 const double binary_million = 1048576.0;
266 r->double_value = binary_million; 263 r->double_value = binary_million;
267 r->uint64_t_value |= random_bits; 264 r->uint64_t_value |= random_bits;
268 r->double_value -= binary_million; 265 r->double_value -= binary_million;
269 266
270 return heap_number; 267 return heap_number;
271 } 268 }
272 269
273 } } // namespace v8::internal 270 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/utils.cc ('k') | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698