| 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 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1197 global_context()->set_data(heap->undefined_value()); | 1197 global_context()->set_data(heap->undefined_value()); |
| 1198 } | 1198 } |
| 1199 | 1199 |
| 1200 | 1200 |
| 1201 void Genesis::InitializeExperimentalGlobal() { | 1201 void Genesis::InitializeExperimentalGlobal() { |
| 1202 Handle<JSObject> global = Handle<JSObject>(global_context()->global()); | 1202 Handle<JSObject> global = Handle<JSObject>(global_context()->global()); |
| 1203 | 1203 |
| 1204 // TODO(mstarzinger): Move this into Genesis::InitializeGlobal once we no | 1204 // TODO(mstarzinger): Move this into Genesis::InitializeGlobal once we no |
| 1205 // longer need to live behind a flag, so WeakMap gets added to the snapshot. | 1205 // longer need to live behind a flag, so WeakMap gets added to the snapshot. |
| 1206 if (FLAG_harmony_weakmaps) { // -- W e a k M a p | 1206 if (FLAG_harmony_weakmaps) { // -- W e a k M a p |
| 1207 Handle<JSObject> prototype = | |
| 1208 factory()->NewJSObject(isolate()->object_function(), TENURED); | |
| 1209 InstallFunction(global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize, | 1207 InstallFunction(global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize, |
| 1210 prototype, Builtins::kIllegal, true); | 1208 isolate_->initial_object_prototype(), |
| 1209 Builtins::kIllegal, true); |
| 1211 } | 1210 } |
| 1212 } | 1211 } |
| 1213 | 1212 |
| 1214 | 1213 |
| 1215 bool Genesis::CompileBuiltin(Isolate* isolate, int index) { | 1214 bool Genesis::CompileBuiltin(Isolate* isolate, int index) { |
| 1216 Vector<const char> name = Natives::GetScriptName(index); | 1215 Vector<const char> name = Natives::GetScriptName(index); |
| 1217 Handle<String> source_code = | 1216 Handle<String> source_code = |
| 1218 isolate->bootstrapper()->NativesSourceLookup(index); | 1217 isolate->bootstrapper()->NativesSourceLookup(index); |
| 1219 return CompileNative(name, source_code); | 1218 return CompileNative(name, source_code); |
| 1220 } | 1219 } |
| (...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2225 return from + sizeof(NestingCounterType); | 2224 return from + sizeof(NestingCounterType); |
| 2226 } | 2225 } |
| 2227 | 2226 |
| 2228 | 2227 |
| 2229 // Called when the top-level V8 mutex is destroyed. | 2228 // Called when the top-level V8 mutex is destroyed. |
| 2230 void Bootstrapper::FreeThreadResources() { | 2229 void Bootstrapper::FreeThreadResources() { |
| 2231 ASSERT(!IsActive()); | 2230 ASSERT(!IsActive()); |
| 2232 } | 2231 } |
| 2233 | 2232 |
| 2234 } } // namespace v8::internal | 2233 } } // namespace v8::internal |
| OLD | NEW |