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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
137 state[0] = 18273 * (state[0] & 0xFFFF) + (state[0] >> 16); | 137 state[0] = 18273 * (state[0] & 0xFFFF) + (state[0] >> 16); |
138 state[1] = 36969 * (state[1] & 0xFFFF) + (state[1] >> 16); | 138 state[1] = 36969 * (state[1] & 0xFFFF) + (state[1] >> 16); |
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 |
Vyacheslav Egorov (Chromium)
2012/02/24 10:34:02
+\n
Sigurður Ásgeirsson
2012/02/24 14:46:04
Oops, force of habit. Done.
| |
148 void V8::SetReturnAddressLocationResolver( | |
149 ReturnAddressLocationResolver resolver) { | |
150 StackFrame::SetReturnAddressLocationResolver(resolver); | |
151 } | |
148 | 152 |
Vyacheslav Egorov (Chromium)
2012/02/24 10:34:02
+\n
Sigurður Ásgeirsson
2012/02/24 14:46:04
Done.
| |
149 // Used by JavaScript APIs | 153 // Used by JavaScript APIs |
150 uint32_t V8::Random(Context* context) { | 154 uint32_t V8::Random(Context* context) { |
151 ASSERT(context->IsGlobalContext()); | 155 ASSERT(context->IsGlobalContext()); |
152 ByteArray* seed = context->random_seed(); | 156 ByteArray* seed = context->random_seed(); |
153 return random_base(reinterpret_cast<uint32_t*>(seed->GetDataStartAddress())); | 157 return random_base(reinterpret_cast<uint32_t*>(seed->GetDataStartAddress())); |
154 } | 158 } |
155 | 159 |
156 | 160 |
157 // Used internally by the JIT and memory allocator for security | 161 // Used internally by the JIT and memory allocator for security |
158 // purposes. So, we keep a different state to prevent informations | 162 // 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(); | 262 ElementsAccessor::InitializeOncePerProcess(); |
259 | 263 |
260 if (FLAG_stress_compaction) { | 264 if (FLAG_stress_compaction) { |
261 FLAG_force_marking_deque_overflows = true; | 265 FLAG_force_marking_deque_overflows = true; |
262 FLAG_gc_global = true; | 266 FLAG_gc_global = true; |
263 FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2; | 267 FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2; |
264 } | 268 } |
265 } | 269 } |
266 | 270 |
267 } } // namespace v8::internal | 271 } } // namespace v8::internal |
OLD | NEW |