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 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1273 memset(zeroed_byte_array->GetDataStartAddress(), 0, kRandomStateSize); | 1273 memset(zeroed_byte_array->GetDataStartAddress(), 0, kRandomStateSize); |
1274 } | 1274 } |
1275 return true; | 1275 return true; |
1276 } | 1276 } |
1277 | 1277 |
1278 | 1278 |
1279 void Genesis::InitializeExperimentalGlobal() { | 1279 void Genesis::InitializeExperimentalGlobal() { |
1280 Handle<JSObject> global = Handle<JSObject>(native_context()->global_object()); | 1280 Handle<JSObject> global = Handle<JSObject>(native_context()->global_object()); |
1281 | 1281 |
1282 // TODO(mstarzinger): Move this into Genesis::InitializeGlobal once we no | 1282 // TODO(mstarzinger): Move this into Genesis::InitializeGlobal once we no |
1283 // longer need to live behind a flag, so functions get added to the snapshot. | 1283 // longer need to live behind flags, so functions get added to the snapshot. |
| 1284 |
| 1285 if (FLAG_harmony_symbols) { |
| 1286 // --- S y m b o l --- |
| 1287 Handle<JSFunction> symbol_fun = |
| 1288 InstallFunction(global, "Symbol", JS_VALUE_TYPE, JSValue::kSize, |
| 1289 isolate()->initial_object_prototype(), |
| 1290 Builtins::kIllegal, true); |
| 1291 native_context()->set_symbol_function(*symbol_fun); |
| 1292 } |
| 1293 |
1284 if (FLAG_harmony_collections) { | 1294 if (FLAG_harmony_collections) { |
1285 { // -- S e t | 1295 { // -- S e t |
1286 Handle<JSObject> prototype = | 1296 Handle<JSObject> prototype = |
1287 factory()->NewJSObject(isolate()->object_function(), TENURED); | 1297 factory()->NewJSObject(isolate()->object_function(), TENURED); |
1288 InstallFunction(global, "Set", JS_SET_TYPE, JSSet::kSize, | 1298 InstallFunction(global, "Set", JS_SET_TYPE, JSSet::kSize, |
1289 prototype, Builtins::kIllegal, true); | 1299 prototype, Builtins::kIllegal, true); |
1290 } | 1300 } |
1291 { // -- M a p | 1301 { // -- M a p |
1292 Handle<JSObject> prototype = | 1302 Handle<JSObject> prototype = |
1293 factory()->NewJSObject(isolate()->object_function(), TENURED); | 1303 factory()->NewJSObject(isolate()->object_function(), TENURED); |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1429 INSTALL_NATIVE(JSFunction, "Instantiate", instantiate_fun); | 1439 INSTALL_NATIVE(JSFunction, "Instantiate", instantiate_fun); |
1430 INSTALL_NATIVE(JSFunction, "ConfigureTemplateInstance", | 1440 INSTALL_NATIVE(JSFunction, "ConfigureTemplateInstance", |
1431 configure_instance_fun); | 1441 configure_instance_fun); |
1432 INSTALL_NATIVE(JSFunction, "GetStackTraceLine", get_stack_trace_line_fun); | 1442 INSTALL_NATIVE(JSFunction, "GetStackTraceLine", get_stack_trace_line_fun); |
1433 INSTALL_NATIVE(JSObject, "functionCache", function_cache); | 1443 INSTALL_NATIVE(JSObject, "functionCache", function_cache); |
1434 INSTALL_NATIVE(JSFunction, "ToCompletePropertyDescriptor", | 1444 INSTALL_NATIVE(JSFunction, "ToCompletePropertyDescriptor", |
1435 to_complete_property_descriptor); | 1445 to_complete_property_descriptor); |
1436 } | 1446 } |
1437 | 1447 |
1438 void Genesis::InstallExperimentalNativeFunctions() { | 1448 void Genesis::InstallExperimentalNativeFunctions() { |
1439 if (FLAG_harmony_symbols) { | |
1440 INSTALL_NATIVE(JSObject, "SymbolDelegate", symbol_delegate); | |
1441 } | |
1442 if (FLAG_harmony_proxies) { | 1449 if (FLAG_harmony_proxies) { |
1443 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); | 1450 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); |
1444 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); | 1451 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); |
1445 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); | 1452 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); |
1446 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); | 1453 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); |
1447 } | 1454 } |
1448 if (FLAG_harmony_observation) { | 1455 if (FLAG_harmony_observation) { |
1449 INSTALL_NATIVE(JSFunction, "NotifyChange", observers_notify_change); | 1456 INSTALL_NATIVE(JSFunction, "NotifyChange", observers_notify_change); |
1450 INSTALL_NATIVE(JSFunction, "DeliverChangeRecords", | 1457 INSTALL_NATIVE(JSFunction, "DeliverChangeRecords", |
1451 observers_deliver_changes); | 1458 observers_deliver_changes); |
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2488 return from + sizeof(NestingCounterType); | 2495 return from + sizeof(NestingCounterType); |
2489 } | 2496 } |
2490 | 2497 |
2491 | 2498 |
2492 // Called when the top-level V8 mutex is destroyed. | 2499 // Called when the top-level V8 mutex is destroyed. |
2493 void Bootstrapper::FreeThreadResources() { | 2500 void Bootstrapper::FreeThreadResources() { |
2494 ASSERT(!IsActive()); | 2501 ASSERT(!IsActive()); |
2495 } | 2502 } |
2496 | 2503 |
2497 } } // namespace v8::internal | 2504 } } // namespace v8::internal |
OLD | NEW |