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 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1071 Factory* factory = isolate->factory(); | 1071 Factory* factory = isolate->factory(); |
1072 | 1072 |
1073 Handle<ScriptContextTable> script_context_table = | 1073 Handle<ScriptContextTable> script_context_table = |
1074 factory->NewScriptContextTable(); | 1074 factory->NewScriptContextTable(); |
1075 native_context()->set_script_context_table(*script_context_table); | 1075 native_context()->set_script_context_table(*script_context_table); |
1076 InstallGlobalThisBinding(); | 1076 InstallGlobalThisBinding(); |
1077 | 1077 |
1078 Handle<String> object_name = factory->Object_string(); | 1078 Handle<String> object_name = factory->Object_string(); |
1079 JSObject::AddProperty( | 1079 JSObject::AddProperty( |
1080 global_object, object_name, isolate->object_function(), DONT_ENUM); | 1080 global_object, object_name, isolate->object_function(), DONT_ENUM); |
| 1081 SimpleInstallFunction(isolate->object_function(), |
| 1082 isolate->factory()->InternalizeUtf8String("assign"), |
| 1083 Builtins::kObjectAssign, 2, false); |
1081 | 1084 |
1082 Handle<JSObject> global(native_context()->global_object()); | 1085 Handle<JSObject> global(native_context()->global_object()); |
1083 | 1086 |
1084 | 1087 |
1085 { // Install global Function object | 1088 { // Install global Function object |
1086 Handle<JSFunction> function_function = | 1089 Handle<JSFunction> function_function = |
1087 InstallFunction(global, "Function", JS_FUNCTION_TYPE, JSFunction::kSize, | 1090 InstallFunction(global, "Function", JS_FUNCTION_TYPE, JSFunction::kSize, |
1088 empty_function, Builtins::kIllegal); | 1091 empty_function, Builtins::kIllegal); |
1089 function_function->initial_map()->set_is_callable(); | 1092 function_function->initial_map()->set_is_callable(); |
1090 function_function->initial_map()->set_is_constructor(true); | 1093 function_function->initial_map()->set_is_constructor(true); |
(...skipping 2203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3294 } | 3297 } |
3295 | 3298 |
3296 | 3299 |
3297 // Called when the top-level V8 mutex is destroyed. | 3300 // Called when the top-level V8 mutex is destroyed. |
3298 void Bootstrapper::FreeThreadResources() { | 3301 void Bootstrapper::FreeThreadResources() { |
3299 DCHECK(!IsActive()); | 3302 DCHECK(!IsActive()); |
3300 } | 3303 } |
3301 | 3304 |
3302 } // namespace internal | 3305 } // namespace internal |
3303 } // namespace v8 | 3306 } // namespace v8 |
OLD | NEW |