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 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1579 INSTALL_NATIVE(JSFunction, "GlobalEval", global_eval_fun); | 1579 INSTALL_NATIVE(JSFunction, "GlobalEval", global_eval_fun); |
1580 INSTALL_NATIVE(JSFunction, "Instantiate", instantiate_fun); | 1580 INSTALL_NATIVE(JSFunction, "Instantiate", instantiate_fun); |
1581 INSTALL_NATIVE(JSFunction, "ConfigureTemplateInstance", | 1581 INSTALL_NATIVE(JSFunction, "ConfigureTemplateInstance", |
1582 configure_instance_fun); | 1582 configure_instance_fun); |
1583 INSTALL_NATIVE(JSFunction, "GetStackTraceLine", get_stack_trace_line_fun); | 1583 INSTALL_NATIVE(JSFunction, "GetStackTraceLine", get_stack_trace_line_fun); |
1584 INSTALL_NATIVE(JSObject, "functionCache", function_cache); | 1584 INSTALL_NATIVE(JSObject, "functionCache", function_cache); |
1585 INSTALL_NATIVE(JSFunction, "ToCompletePropertyDescriptor", | 1585 INSTALL_NATIVE(JSFunction, "ToCompletePropertyDescriptor", |
1586 to_complete_property_descriptor); | 1586 to_complete_property_descriptor); |
1587 } | 1587 } |
1588 | 1588 |
| 1589 |
1589 void Genesis::InstallExperimentalNativeFunctions() { | 1590 void Genesis::InstallExperimentalNativeFunctions() { |
1590 if (FLAG_harmony_proxies) { | 1591 if (FLAG_harmony_proxies) { |
1591 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); | 1592 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); |
1592 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); | 1593 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); |
1593 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); | 1594 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); |
1594 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); | 1595 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); |
1595 } | 1596 } |
1596 if (FLAG_harmony_observation) { | 1597 if (FLAG_harmony_observation) { |
1597 INSTALL_NATIVE(JSFunction, "NotifyChange", observers_notify_change); | 1598 INSTALL_NATIVE(JSFunction, "NotifyChange", observers_notify_change); |
1598 INSTALL_NATIVE(JSFunction, "EnqueueSpliceRecord", observers_enqueue_splice); | 1599 INSTALL_NATIVE(JSFunction, "EnqueueSpliceRecord", observers_enqueue_splice); |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2232 factory->InternalizeUtf8String(FLAG_expose_debug_as); | 2233 factory->InternalizeUtf8String(FLAG_expose_debug_as); |
2233 Handle<Object> global_proxy( | 2234 Handle<Object> global_proxy( |
2234 debug->debug_context()->global_proxy(), isolate); | 2235 debug->debug_context()->global_proxy(), isolate); |
2235 CHECK_NOT_EMPTY_HANDLE(isolate, | 2236 CHECK_NOT_EMPTY_HANDLE(isolate, |
2236 JSObject::SetLocalPropertyIgnoreAttributes( | 2237 JSObject::SetLocalPropertyIgnoreAttributes( |
2237 global, debug_string, global_proxy, DONT_ENUM)); | 2238 global, debug_string, global_proxy, DONT_ENUM)); |
2238 } | 2239 } |
2239 #endif | 2240 #endif |
2240 } | 2241 } |
2241 | 2242 |
| 2243 |
2242 static uint32_t Hash(RegisteredExtension* extension) { | 2244 static uint32_t Hash(RegisteredExtension* extension) { |
2243 return v8::internal::ComputePointerHash(extension); | 2245 return v8::internal::ComputePointerHash(extension); |
2244 } | 2246 } |
2245 | 2247 |
| 2248 |
2246 static bool MatchRegisteredExtensions(void* key1, void* key2) { | 2249 static bool MatchRegisteredExtensions(void* key1, void* key2) { |
2247 return key1 == key2; | 2250 return key1 == key2; |
2248 } | 2251 } |
2249 | 2252 |
2250 Genesis::ExtensionStates::ExtensionStates() | 2253 Genesis::ExtensionStates::ExtensionStates() |
2251 : map_(MatchRegisteredExtensions, 8) { } | 2254 : map_(MatchRegisteredExtensions, 8) { } |
2252 | 2255 |
2253 Genesis::ExtensionTraversalState Genesis::ExtensionStates::get_state( | 2256 Genesis::ExtensionTraversalState Genesis::ExtensionStates::get_state( |
2254 RegisteredExtension* extension) { | 2257 RegisteredExtension* extension) { |
2255 i::HashMap::Entry* entry = map_.Lookup(extension, Hash(extension), false); | 2258 i::HashMap::Entry* entry = map_.Lookup(extension, Hash(extension), false); |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2665 return from + sizeof(NestingCounterType); | 2668 return from + sizeof(NestingCounterType); |
2666 } | 2669 } |
2667 | 2670 |
2668 | 2671 |
2669 // Called when the top-level V8 mutex is destroyed. | 2672 // Called when the top-level V8 mutex is destroyed. |
2670 void Bootstrapper::FreeThreadResources() { | 2673 void Bootstrapper::FreeThreadResources() { |
2671 ASSERT(!IsActive()); | 2674 ASSERT(!IsActive()); |
2672 } | 2675 } |
2673 | 2676 |
2674 } } // namespace v8::internal | 2677 } } // namespace v8::internal |
OLD | NEW |