| OLD | NEW |
| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 v8::Locker::StopPreemption(); | 139 v8::Locker::StopPreemption(); |
| 140 } | 140 } |
| 141 | 141 |
| 142 Builtins::TearDown(); | 142 Builtins::TearDown(); |
| 143 Bootstrapper::TearDown(); | 143 Bootstrapper::TearDown(); |
| 144 | 144 |
| 145 Top::TearDown(); | 145 Top::TearDown(); |
| 146 | 146 |
| 147 Heap::TearDown(); | 147 Heap::TearDown(); |
| 148 Logger::TearDown(); | 148 Logger::TearDown(); |
| 149 Deserializer::TearDown(); | |
| 150 | 149 |
| 151 is_running_ = false; | 150 is_running_ = false; |
| 152 has_been_disposed_ = true; | 151 has_been_disposed_ = true; |
| 153 } | 152 } |
| 154 | 153 |
| 155 | 154 |
| 156 uint32_t V8::Random() { | 155 uint32_t V8::Random() { |
| 157 // Random number generator using George Marsaglia's MWC algorithm. | 156 // Random number generator using George Marsaglia's MWC algorithm. |
| 158 static uint32_t hi = 0; | 157 static uint32_t hi = 0; |
| 159 static uint32_t lo = 0; | 158 static uint32_t lo = 0; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 185 | 184 |
| 186 Smi* V8::RandomPositiveSmi() { | 185 Smi* V8::RandomPositiveSmi() { |
| 187 uint32_t random = Random(); | 186 uint32_t random = Random(); |
| 188 ASSERT(static_cast<uint32_t>(Smi::kMaxValue) >= kRandomPositiveSmiMax); | 187 ASSERT(static_cast<uint32_t>(Smi::kMaxValue) >= kRandomPositiveSmiMax); |
| 189 // kRandomPositiveSmiMax must match the value being divided | 188 // kRandomPositiveSmiMax must match the value being divided |
| 190 // by in math.js. | 189 // by in math.js. |
| 191 return Smi::FromInt(random & kRandomPositiveSmiMax); | 190 return Smi::FromInt(random & kRandomPositiveSmiMax); |
| 192 } | 191 } |
| 193 | 192 |
| 194 } } // namespace v8::internal | 193 } } // namespace v8::internal |
| OLD | NEW |