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 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1343 if (FLAG_harmony_symbols) { | 1343 if (FLAG_harmony_symbols) { |
1344 // --- S y m b o l --- | 1344 // --- S y m b o l --- |
1345 Handle<JSFunction> symbol_fun = | 1345 Handle<JSFunction> symbol_fun = |
1346 InstallFunction(global, "Symbol", JS_VALUE_TYPE, JSValue::kSize, | 1346 InstallFunction(global, "Symbol", JS_VALUE_TYPE, JSValue::kSize, |
1347 isolate()->initial_object_prototype(), | 1347 isolate()->initial_object_prototype(), |
1348 Builtins::kIllegal, true, true); | 1348 Builtins::kIllegal, true, true); |
1349 native_context()->set_symbol_function(*symbol_fun); | 1349 native_context()->set_symbol_function(*symbol_fun); |
1350 } | 1350 } |
1351 | 1351 |
1352 if (FLAG_harmony_collections) { | 1352 if (FLAG_harmony_collections) { |
| 1353 { // -- M a p |
| 1354 InstallFunction(global, "Map", JS_MAP_TYPE, JSMap::kSize, |
| 1355 isolate()->initial_object_prototype(), |
| 1356 Builtins::kIllegal, true, true); |
| 1357 } |
1353 { // -- S e t | 1358 { // -- S e t |
1354 InstallFunction(global, "Set", JS_SET_TYPE, JSSet::kSize, | 1359 InstallFunction(global, "Set", JS_SET_TYPE, JSSet::kSize, |
1355 isolate()->initial_object_prototype(), | 1360 isolate()->initial_object_prototype(), |
1356 Builtins::kIllegal, true, true); | 1361 Builtins::kIllegal, true, true); |
1357 } | 1362 } |
1358 { // -- M a p | 1363 } |
1359 InstallFunction(global, "Map", JS_MAP_TYPE, JSMap::kSize, | 1364 |
1360 isolate()->initial_object_prototype(), | 1365 if (FLAG_harmony_weak_collections) { |
1361 Builtins::kIllegal, true, true); | |
1362 } | |
1363 { // -- W e a k M a p | 1366 { // -- W e a k M a p |
1364 InstallFunction(global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize, | 1367 InstallFunction(global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize, |
1365 isolate()->initial_object_prototype(), | 1368 isolate()->initial_object_prototype(), |
1366 Builtins::kIllegal, true, true); | 1369 Builtins::kIllegal, true, true); |
1367 } | 1370 } |
1368 { // -- W e a k S e t | 1371 { // -- W e a k S e t |
1369 InstallFunction(global, "WeakSet", JS_WEAK_SET_TYPE, JSWeakSet::kSize, | 1372 InstallFunction(global, "WeakSet", JS_WEAK_SET_TYPE, JSWeakSet::kSize, |
1370 isolate()->initial_object_prototype(), | 1373 isolate()->initial_object_prototype(), |
1371 Builtins::kIllegal, true, true); | 1374 Builtins::kIllegal, true, true); |
1372 } | 1375 } |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2043 } | 2046 } |
2044 | 2047 |
2045 | 2048 |
2046 bool Genesis::InstallExperimentalNatives() { | 2049 bool Genesis::InstallExperimentalNatives() { |
2047 for (int i = ExperimentalNatives::GetDebuggerCount(); | 2050 for (int i = ExperimentalNatives::GetDebuggerCount(); |
2048 i < ExperimentalNatives::GetBuiltinsCount(); | 2051 i < ExperimentalNatives::GetBuiltinsCount(); |
2049 i++) { | 2052 i++) { |
2050 INSTALL_EXPERIMENTAL_NATIVE(i, symbols, "symbol.js") | 2053 INSTALL_EXPERIMENTAL_NATIVE(i, symbols, "symbol.js") |
2051 INSTALL_EXPERIMENTAL_NATIVE(i, proxies, "proxy.js") | 2054 INSTALL_EXPERIMENTAL_NATIVE(i, proxies, "proxy.js") |
2052 INSTALL_EXPERIMENTAL_NATIVE(i, collections, "collection.js") | 2055 INSTALL_EXPERIMENTAL_NATIVE(i, collections, "collection.js") |
| 2056 INSTALL_EXPERIMENTAL_NATIVE(i, weak_collections, "weak_collection.js") |
2053 INSTALL_EXPERIMENTAL_NATIVE(i, promises, "promise.js") | 2057 INSTALL_EXPERIMENTAL_NATIVE(i, promises, "promise.js") |
2054 INSTALL_EXPERIMENTAL_NATIVE(i, generators, "generator.js") | 2058 INSTALL_EXPERIMENTAL_NATIVE(i, generators, "generator.js") |
2055 INSTALL_EXPERIMENTAL_NATIVE(i, iteration, "array-iterator.js") | 2059 INSTALL_EXPERIMENTAL_NATIVE(i, iteration, "array-iterator.js") |
2056 INSTALL_EXPERIMENTAL_NATIVE(i, strings, "harmony-string.js") | 2060 INSTALL_EXPERIMENTAL_NATIVE(i, strings, "harmony-string.js") |
2057 INSTALL_EXPERIMENTAL_NATIVE(i, arrays, "harmony-array.js") | 2061 INSTALL_EXPERIMENTAL_NATIVE(i, arrays, "harmony-array.js") |
2058 INSTALL_EXPERIMENTAL_NATIVE(i, maths, "harmony-math.js") | 2062 INSTALL_EXPERIMENTAL_NATIVE(i, maths, "harmony-math.js") |
2059 } | 2063 } |
2060 | 2064 |
2061 InstallExperimentalNativeFunctions(); | 2065 InstallExperimentalNativeFunctions(); |
2062 InstallExperimentalBuiltinFunctionIds(); | 2066 InstallExperimentalBuiltinFunctionIds(); |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2745 return from + sizeof(NestingCounterType); | 2749 return from + sizeof(NestingCounterType); |
2746 } | 2750 } |
2747 | 2751 |
2748 | 2752 |
2749 // Called when the top-level V8 mutex is destroyed. | 2753 // Called when the top-level V8 mutex is destroyed. |
2750 void Bootstrapper::FreeThreadResources() { | 2754 void Bootstrapper::FreeThreadResources() { |
2751 ASSERT(!IsActive()); | 2755 ASSERT(!IsActive()); |
2752 } | 2756 } |
2753 | 2757 |
2754 } } // namespace v8::internal | 2758 } } // namespace v8::internal |
OLD | NEW |