| OLD | NEW |
| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 return (state[0] << 14) + (state[1] & 0x3FFFF); | 140 return (state[0] << 14) + (state[1] & 0x3FFFF); |
| 141 } | 141 } |
| 142 | 142 |
| 143 | 143 |
| 144 void V8::SetEntropySource(EntropySource source) { | 144 void V8::SetEntropySource(EntropySource source) { |
| 145 entropy_source = source; | 145 entropy_source = source; |
| 146 } | 146 } |
| 147 | 147 |
| 148 | 148 |
| 149 void V8::SetReturnAddressLocationResolver( |
| 150 ReturnAddressLocationResolver resolver) { |
| 151 StackFrame::SetReturnAddressLocationResolver(resolver); |
| 152 } |
| 153 |
| 154 |
| 149 // Used by JavaScript APIs | 155 // Used by JavaScript APIs |
| 150 uint32_t V8::Random(Context* context) { | 156 uint32_t V8::Random(Context* context) { |
| 151 ASSERT(context->IsGlobalContext()); | 157 ASSERT(context->IsGlobalContext()); |
| 152 ByteArray* seed = context->random_seed(); | 158 ByteArray* seed = context->random_seed(); |
| 153 return random_base(reinterpret_cast<uint32_t*>(seed->GetDataStartAddress())); | 159 return random_base(reinterpret_cast<uint32_t*>(seed->GetDataStartAddress())); |
| 154 } | 160 } |
| 155 | 161 |
| 156 | 162 |
| 157 // Used internally by the JIT and memory allocator for security | 163 // Used internally by the JIT and memory allocator for security |
| 158 // purposes. So, we keep a different state to prevent informations | 164 // purposes. So, we keep a different state to prevent informations |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 ElementsAccessor::InitializeOncePerProcess(); | 264 ElementsAccessor::InitializeOncePerProcess(); |
| 259 | 265 |
| 260 if (FLAG_stress_compaction) { | 266 if (FLAG_stress_compaction) { |
| 261 FLAG_force_marking_deque_overflows = true; | 267 FLAG_force_marking_deque_overflows = true; |
| 262 FLAG_gc_global = true; | 268 FLAG_gc_global = true; |
| 263 FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2; | 269 FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2; |
| 264 } | 270 } |
| 265 } | 271 } |
| 266 | 272 |
| 267 } } // namespace v8::internal | 273 } } // namespace v8::internal |
| OLD | NEW |