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 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 object_function, "isSealed", Builtins::kObjectIsSealed, 1, false); | 1081 object_function, "isSealed", Builtins::kObjectIsSealed, 1, false); |
1082 native_context()->set_object_is_sealed(*object_is_sealed); | 1082 native_context()->set_object_is_sealed(*object_is_sealed); |
1083 Handle<JSFunction> object_keys = SimpleInstallFunction( | 1083 Handle<JSFunction> object_keys = SimpleInstallFunction( |
1084 object_function, "keys", Builtins::kObjectKeys, 1, false); | 1084 object_function, "keys", Builtins::kObjectKeys, 1, false); |
1085 native_context()->set_object_keys(*object_keys); | 1085 native_context()->set_object_keys(*object_keys); |
1086 SimpleInstallFunction(object_function, "preventExtensions", | 1086 SimpleInstallFunction(object_function, "preventExtensions", |
1087 Builtins::kObjectPreventExtensions, 1, false); | 1087 Builtins::kObjectPreventExtensions, 1, false); |
1088 SimpleInstallFunction(object_function, "seal", Builtins::kObjectSeal, 1, | 1088 SimpleInstallFunction(object_function, "seal", Builtins::kObjectSeal, 1, |
1089 false); | 1089 false); |
1090 | 1090 |
| 1091 SimpleInstallFunction(isolate->initial_object_prototype(), |
| 1092 "__defineGetter__", Builtins::kObjectDefineGetter, 2, |
| 1093 true); |
| 1094 SimpleInstallFunction(isolate->initial_object_prototype(), |
| 1095 "__defineSetter__", Builtins::kObjectDefineSetter, 2, |
| 1096 true); |
1091 SimpleInstallFunction(isolate->initial_object_prototype(), "hasOwnProperty", | 1097 SimpleInstallFunction(isolate->initial_object_prototype(), "hasOwnProperty", |
1092 Builtins::kObjectHasOwnProperty, 1, true); | 1098 Builtins::kObjectHasOwnProperty, 1, true); |
| 1099 SimpleInstallFunction(isolate->initial_object_prototype(), |
| 1100 "__lookupGetter__", Builtins::kObjectLookupGetter, 1, |
| 1101 true); |
| 1102 SimpleInstallFunction(isolate->initial_object_prototype(), |
| 1103 "__lookupSetter__", Builtins::kObjectLookupSetter, 1, |
| 1104 true); |
1093 } | 1105 } |
1094 | 1106 |
1095 Handle<JSObject> global(native_context()->global_object()); | 1107 Handle<JSObject> global(native_context()->global_object()); |
1096 | 1108 |
1097 { // --- F u n c t i o n --- | 1109 { // --- F u n c t i o n --- |
1098 Handle<JSFunction> prototype = empty_function; | 1110 Handle<JSFunction> prototype = empty_function; |
1099 Handle<JSFunction> function_fun = | 1111 Handle<JSFunction> function_fun = |
1100 InstallFunction(global, "Function", JS_FUNCTION_TYPE, JSFunction::kSize, | 1112 InstallFunction(global, "Function", JS_FUNCTION_TYPE, JSFunction::kSize, |
1101 prototype, Builtins::kFunctionConstructor); | 1113 prototype, Builtins::kFunctionConstructor); |
1102 function_fun->set_prototype_or_initial_map( | 1114 function_fun->set_prototype_or_initial_map( |
(...skipping 2538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3641 } | 3653 } |
3642 | 3654 |
3643 | 3655 |
3644 // Called when the top-level V8 mutex is destroyed. | 3656 // Called when the top-level V8 mutex is destroyed. |
3645 void Bootstrapper::FreeThreadResources() { | 3657 void Bootstrapper::FreeThreadResources() { |
3646 DCHECK(!IsActive()); | 3658 DCHECK(!IsActive()); |
3647 } | 3659 } |
3648 | 3660 |
3649 } // namespace internal | 3661 } // namespace internal |
3650 } // namespace v8 | 3662 } // namespace v8 |
OLD | NEW |