| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 JSObject::kHeaderSize, code, true); | 1214 JSObject::kHeaderSize, code, true); |
| 1215 global_context()->set_call_as_constructor_delegate(*delegate); | 1215 global_context()->set_call_as_constructor_delegate(*delegate); |
| 1216 delegate->shared()->DontAdaptArguments(); | 1216 delegate->shared()->DontAdaptArguments(); |
| 1217 } | 1217 } |
| 1218 | 1218 |
| 1219 // Initialize the out of memory slot. | 1219 // Initialize the out of memory slot. |
| 1220 global_context()->set_out_of_memory(heap->false_value()); | 1220 global_context()->set_out_of_memory(heap->false_value()); |
| 1221 | 1221 |
| 1222 // Initialize the data slot. | 1222 // Initialize the data slot. |
| 1223 global_context()->set_data(heap->undefined_value()); | 1223 global_context()->set_data(heap->undefined_value()); |
| 1224 |
| 1225 { |
| 1226 // Initialize the random seed slot. |
| 1227 Handle<ByteArray> zeroed_byte_array( |
| 1228 factory->NewByteArray(kRandomStateSize)); |
| 1229 global_context()->set_random_seed(*zeroed_byte_array); |
| 1230 memset(zeroed_byte_array->GetDataStartAddress(), 0, kRandomStateSize); |
| 1231 } |
| 1224 } | 1232 } |
| 1225 | 1233 |
| 1226 | 1234 |
| 1227 void Genesis::InitializeExperimentalGlobal() { | 1235 void Genesis::InitializeExperimentalGlobal() { |
| 1228 Handle<JSObject> global = Handle<JSObject>(global_context()->global()); | 1236 Handle<JSObject> global = Handle<JSObject>(global_context()->global()); |
| 1229 | 1237 |
| 1230 // TODO(mstarzinger): Move this into Genesis::InitializeGlobal once we no | 1238 // TODO(mstarzinger): Move this into Genesis::InitializeGlobal once we no |
| 1231 // longer need to live behind a flag, so WeakMap gets added to the snapshot. | 1239 // longer need to live behind a flag, so WeakMap gets added to the snapshot. |
| 1232 if (FLAG_harmony_weakmaps) { // -- W e a k M a p | 1240 if (FLAG_harmony_weakmaps) { // -- W e a k M a p |
| 1233 Handle<JSObject> prototype = | 1241 Handle<JSObject> prototype = |
| (...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2266 return from + sizeof(NestingCounterType); | 2274 return from + sizeof(NestingCounterType); |
| 2267 } | 2275 } |
| 2268 | 2276 |
| 2269 | 2277 |
| 2270 // Called when the top-level V8 mutex is destroyed. | 2278 // Called when the top-level V8 mutex is destroyed. |
| 2271 void Bootstrapper::FreeThreadResources() { | 2279 void Bootstrapper::FreeThreadResources() { |
| 2272 ASSERT(!IsActive()); | 2280 ASSERT(!IsActive()); |
| 2273 } | 2281 } |
| 2274 | 2282 |
| 2275 } } // namespace v8::internal | 2283 } } // namespace v8::internal |
| OLD | NEW |