OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/extensions/externalize-string-extension.h" | 10 #include "src/extensions/externalize-string-extension.h" |
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1108 native_context()->set_object_is_frozen(*object_is_frozen); | 1108 native_context()->set_object_is_frozen(*object_is_frozen); |
1109 | 1109 |
1110 Handle<JSFunction> object_is_sealed = SimpleInstallFunction( | 1110 Handle<JSFunction> object_is_sealed = SimpleInstallFunction( |
1111 object_function, "isSealed", Builtins::kObjectIsSealed, 1, false); | 1111 object_function, "isSealed", Builtins::kObjectIsSealed, 1, false); |
1112 native_context()->set_object_is_sealed(*object_is_sealed); | 1112 native_context()->set_object_is_sealed(*object_is_sealed); |
1113 | 1113 |
1114 Handle<JSFunction> object_keys = SimpleInstallFunction( | 1114 Handle<JSFunction> object_keys = SimpleInstallFunction( |
1115 object_function, "keys", Builtins::kObjectKeys, 1, false); | 1115 object_function, "keys", Builtins::kObjectKeys, 1, false); |
1116 native_context()->set_object_keys(*object_keys); | 1116 native_context()->set_object_keys(*object_keys); |
1117 | 1117 |
1118 SimpleInstallFunction(isolate->initial_object_prototype(), | |
1119 "__defineGetter__", Builtins::kObjectDefineGetter, 2, | |
1120 true); | |
1121 SimpleInstallFunction(isolate->initial_object_prototype(), | |
1122 "__defineSetter__", Builtins::kObjectDefineSetter, 2, | |
1123 true); | |
1124 SimpleInstallFunction(isolate->initial_object_prototype(), "hasOwnProperty", | 1118 SimpleInstallFunction(isolate->initial_object_prototype(), "hasOwnProperty", |
1125 Builtins::kObjectHasOwnProperty, 1, true); | 1119 Builtins::kObjectHasOwnProperty, 1, true); |
1126 SimpleInstallFunction(isolate->initial_object_prototype(), | |
1127 "__lookupGetter__", Builtins::kObjectLookupGetter, 1, | |
1128 true); | |
1129 SimpleInstallFunction(isolate->initial_object_prototype(), | |
1130 "__lookupSetter__", Builtins::kObjectLookupSetter, 1, | |
1131 true); | |
1132 } | 1120 } |
1133 | 1121 |
1134 Handle<JSObject> global(native_context()->global_object()); | 1122 Handle<JSObject> global(native_context()->global_object()); |
1135 | 1123 |
1136 { // --- F u n c t i o n --- | 1124 { // --- F u n c t i o n --- |
1137 Handle<JSFunction> prototype = empty_function; | 1125 Handle<JSFunction> prototype = empty_function; |
1138 Handle<JSFunction> function_fun = | 1126 Handle<JSFunction> function_fun = |
1139 InstallFunction(global, "Function", JS_FUNCTION_TYPE, JSFunction::kSize, | 1127 InstallFunction(global, "Function", JS_FUNCTION_TYPE, JSFunction::kSize, |
1140 prototype, Builtins::kFunctionConstructor); | 1128 prototype, Builtins::kFunctionConstructor); |
1141 function_fun->set_prototype_or_initial_map( | 1129 function_fun->set_prototype_or_initial_map( |
(...skipping 2543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3685 } | 3673 } |
3686 | 3674 |
3687 | 3675 |
3688 // Called when the top-level V8 mutex is destroyed. | 3676 // Called when the top-level V8 mutex is destroyed. |
3689 void Bootstrapper::FreeThreadResources() { | 3677 void Bootstrapper::FreeThreadResources() { |
3690 DCHECK(!IsActive()); | 3678 DCHECK(!IsActive()); |
3691 } | 3679 } |
3692 | 3680 |
3693 } // namespace internal | 3681 } // namespace internal |
3694 } // namespace v8 | 3682 } // namespace v8 |
OLD | NEW |