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 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1571 INSTALL_NATIVE(JSFunction, "ToUint32", to_uint32_fun); | 1571 INSTALL_NATIVE(JSFunction, "ToUint32", to_uint32_fun); |
1572 INSTALL_NATIVE(JSFunction, "ToInt32", to_int32_fun); | 1572 INSTALL_NATIVE(JSFunction, "ToInt32", to_int32_fun); |
1573 INSTALL_NATIVE(JSFunction, "GlobalEval", global_eval_fun); | 1573 INSTALL_NATIVE(JSFunction, "GlobalEval", global_eval_fun); |
1574 INSTALL_NATIVE(JSFunction, "Instantiate", instantiate_fun); | 1574 INSTALL_NATIVE(JSFunction, "Instantiate", instantiate_fun); |
1575 INSTALL_NATIVE(JSFunction, "ConfigureTemplateInstance", | 1575 INSTALL_NATIVE(JSFunction, "ConfigureTemplateInstance", |
1576 configure_instance_fun); | 1576 configure_instance_fun); |
1577 INSTALL_NATIVE(JSFunction, "GetStackTraceLine", get_stack_trace_line_fun); | 1577 INSTALL_NATIVE(JSFunction, "GetStackTraceLine", get_stack_trace_line_fun); |
1578 INSTALL_NATIVE(JSObject, "functionCache", function_cache); | 1578 INSTALL_NATIVE(JSObject, "functionCache", function_cache); |
1579 INSTALL_NATIVE(JSFunction, "ToCompletePropertyDescriptor", | 1579 INSTALL_NATIVE(JSFunction, "ToCompletePropertyDescriptor", |
1580 to_complete_property_descriptor); | 1580 to_complete_property_descriptor); |
1581 INSTALL_NATIVE(JSFunction, "NotifyChange", observers_notify_change); | |
1582 INSTALL_NATIVE(JSFunction, "EnqueueSpliceRecord", observers_enqueue_splice); | |
1583 INSTALL_NATIVE(JSFunction, "BeginPerformSplice", | |
1584 observers_begin_perform_splice); | |
1585 INSTALL_NATIVE(JSFunction, "EndPerformSplice", | |
1586 observers_end_perform_splice); | |
1587 } | 1581 } |
1588 | 1582 |
1589 | 1583 |
1590 void Genesis::InstallExperimentalNativeFunctions() { | 1584 void Genesis::InstallExperimentalNativeFunctions() { |
1591 INSTALL_NATIVE(JSFunction, "RunMicrotasks", run_microtasks); | 1585 INSTALL_NATIVE(JSFunction, "RunMicrotasks", run_microtasks); |
1592 INSTALL_NATIVE(JSFunction, "EnqueueExternalMicrotask", | 1586 INSTALL_NATIVE(JSFunction, "EnqueueExternalMicrotask", |
1593 enqueue_external_microtask); | 1587 enqueue_external_microtask); |
1594 | 1588 |
1595 if (FLAG_harmony_promises) { | 1589 if (FLAG_harmony_promises) { |
1596 INSTALL_NATIVE(JSFunction, "IsPromise", is_promise); | 1590 INSTALL_NATIVE(JSFunction, "IsPromise", is_promise); |
1597 INSTALL_NATIVE(JSFunction, "PromiseCreate", promise_create); | 1591 INSTALL_NATIVE(JSFunction, "PromiseCreate", promise_create); |
1598 INSTALL_NATIVE(JSFunction, "PromiseResolve", promise_resolve); | 1592 INSTALL_NATIVE(JSFunction, "PromiseResolve", promise_resolve); |
1599 INSTALL_NATIVE(JSFunction, "PromiseReject", promise_reject); | 1593 INSTALL_NATIVE(JSFunction, "PromiseReject", promise_reject); |
1600 INSTALL_NATIVE(JSFunction, "PromiseChain", promise_chain); | 1594 INSTALL_NATIVE(JSFunction, "PromiseChain", promise_chain); |
1601 INSTALL_NATIVE(JSFunction, "PromiseCatch", promise_catch); | 1595 INSTALL_NATIVE(JSFunction, "PromiseCatch", promise_catch); |
1602 } | 1596 } |
1603 | 1597 |
1604 if (FLAG_harmony_proxies) { | 1598 if (FLAG_harmony_proxies) { |
1605 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); | 1599 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); |
1606 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); | 1600 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); |
1607 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); | 1601 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); |
1608 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); | 1602 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); |
1609 } | 1603 } |
| 1604 if (FLAG_harmony_observation) { |
| 1605 INSTALL_NATIVE(JSFunction, "NotifyChange", observers_notify_change); |
| 1606 INSTALL_NATIVE(JSFunction, "EnqueueSpliceRecord", observers_enqueue_splice); |
| 1607 INSTALL_NATIVE(JSFunction, "BeginPerformSplice", |
| 1608 observers_begin_perform_splice); |
| 1609 INSTALL_NATIVE(JSFunction, "EndPerformSplice", |
| 1610 observers_end_perform_splice); |
| 1611 } |
1610 } | 1612 } |
1611 | 1613 |
1612 #undef INSTALL_NATIVE | 1614 #undef INSTALL_NATIVE |
1613 | 1615 |
1614 | 1616 |
1615 Handle<JSFunction> Genesis::InstallInternalArray( | 1617 Handle<JSFunction> Genesis::InstallInternalArray( |
1616 Handle<JSBuiltinsObject> builtins, | 1618 Handle<JSBuiltinsObject> builtins, |
1617 const char* name, | 1619 const char* name, |
1618 ElementsKind elements_kind) { | 1620 ElementsKind elements_kind) { |
1619 // --- I n t e r n a l A r r a y --- | 1621 // --- I n t e r n a l A r r a y --- |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2043 } | 2045 } |
2044 | 2046 |
2045 | 2047 |
2046 bool Genesis::InstallExperimentalNatives() { | 2048 bool Genesis::InstallExperimentalNatives() { |
2047 for (int i = ExperimentalNatives::GetDebuggerCount(); | 2049 for (int i = ExperimentalNatives::GetDebuggerCount(); |
2048 i < ExperimentalNatives::GetBuiltinsCount(); | 2050 i < ExperimentalNatives::GetBuiltinsCount(); |
2049 i++) { | 2051 i++) { |
2050 INSTALL_EXPERIMENTAL_NATIVE(i, symbols, "symbol.js") | 2052 INSTALL_EXPERIMENTAL_NATIVE(i, symbols, "symbol.js") |
2051 INSTALL_EXPERIMENTAL_NATIVE(i, proxies, "proxy.js") | 2053 INSTALL_EXPERIMENTAL_NATIVE(i, proxies, "proxy.js") |
2052 INSTALL_EXPERIMENTAL_NATIVE(i, collections, "collection.js") | 2054 INSTALL_EXPERIMENTAL_NATIVE(i, collections, "collection.js") |
| 2055 INSTALL_EXPERIMENTAL_NATIVE(i, observation, "object-observe.js") |
2053 INSTALL_EXPERIMENTAL_NATIVE(i, promises, "promise.js") | 2056 INSTALL_EXPERIMENTAL_NATIVE(i, promises, "promise.js") |
2054 INSTALL_EXPERIMENTAL_NATIVE(i, generators, "generator.js") | 2057 INSTALL_EXPERIMENTAL_NATIVE(i, generators, "generator.js") |
2055 INSTALL_EXPERIMENTAL_NATIVE(i, iteration, "array-iterator.js") | 2058 INSTALL_EXPERIMENTAL_NATIVE(i, iteration, "array-iterator.js") |
2056 INSTALL_EXPERIMENTAL_NATIVE(i, strings, "harmony-string.js") | 2059 INSTALL_EXPERIMENTAL_NATIVE(i, strings, "harmony-string.js") |
2057 INSTALL_EXPERIMENTAL_NATIVE(i, arrays, "harmony-array.js") | 2060 INSTALL_EXPERIMENTAL_NATIVE(i, arrays, "harmony-array.js") |
2058 INSTALL_EXPERIMENTAL_NATIVE(i, maths, "harmony-math.js") | 2061 INSTALL_EXPERIMENTAL_NATIVE(i, maths, "harmony-math.js") |
2059 } | 2062 } |
2060 | 2063 |
2061 InstallExperimentalNativeFunctions(); | 2064 InstallExperimentalNativeFunctions(); |
2062 InstallExperimentalBuiltinFunctionIds(); | 2065 InstallExperimentalBuiltinFunctionIds(); |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2745 return from + sizeof(NestingCounterType); | 2748 return from + sizeof(NestingCounterType); |
2746 } | 2749 } |
2747 | 2750 |
2748 | 2751 |
2749 // Called when the top-level V8 mutex is destroyed. | 2752 // Called when the top-level V8 mutex is destroyed. |
2750 void Bootstrapper::FreeThreadResources() { | 2753 void Bootstrapper::FreeThreadResources() { |
2751 ASSERT(!IsActive()); | 2754 ASSERT(!IsActive()); |
2752 } | 2755 } |
2753 | 2756 |
2754 } } // namespace v8::internal | 2757 } } // namespace v8::internal |
OLD | NEW |