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