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/base/utils/random-number-generator.h" | 9 #include "src/base/utils/random-number-generator.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1557 Handle<Object> var##_native = \ | 1557 Handle<Object> var##_native = \ |
1558 Object::GetProperty(handle(native_context()->builtins()), var##_name) \ | 1558 Object::GetProperty(handle(native_context()->builtins()), var##_name) \ |
1559 .ToHandleChecked(); \ | 1559 .ToHandleChecked(); \ |
1560 native_context()->set_##var(Type::cast(*var##_native)); | 1560 native_context()->set_##var(Type::cast(*var##_native)); |
1561 | 1561 |
1562 | 1562 |
1563 void Genesis::InstallNativeFunctions() { | 1563 void Genesis::InstallNativeFunctions() { |
1564 HandleScope scope(isolate()); | 1564 HandleScope scope(isolate()); |
1565 INSTALL_NATIVE(JSFunction, "$createDate", create_date_fun); | 1565 INSTALL_NATIVE(JSFunction, "$createDate", create_date_fun); |
1566 | 1566 |
1567 INSTALL_NATIVE(JSFunction, "ToNumber", to_number_fun); | 1567 INSTALL_NATIVE(JSFunction, "$toNumber", to_number_fun); |
1568 INSTALL_NATIVE(JSFunction, "ToString", to_string_fun); | 1568 INSTALL_NATIVE(JSFunction, "$toString", to_string_fun); |
1569 INSTALL_NATIVE(JSFunction, "$toDetailString", to_detail_string_fun); | 1569 INSTALL_NATIVE(JSFunction, "$toDetailString", to_detail_string_fun); |
1570 INSTALL_NATIVE(JSFunction, "ToObject", to_object_fun); | 1570 INSTALL_NATIVE(JSFunction, "$toObject", to_object_fun); |
1571 INSTALL_NATIVE(JSFunction, "ToInteger", to_integer_fun); | 1571 INSTALL_NATIVE(JSFunction, "$toInteger", to_integer_fun); |
1572 INSTALL_NATIVE(JSFunction, "ToUint32", to_uint32_fun); | 1572 INSTALL_NATIVE(JSFunction, "$toUint32", to_uint32_fun); |
1573 INSTALL_NATIVE(JSFunction, "ToInt32", to_int32_fun); | 1573 INSTALL_NATIVE(JSFunction, "$toInt32", to_int32_fun); |
1574 INSTALL_NATIVE(JSFunction, "ToLength", to_length_fun); | 1574 INSTALL_NATIVE(JSFunction, "$toLength", to_length_fun); |
1575 | 1575 |
1576 INSTALL_NATIVE(JSFunction, "$globalEval", global_eval_fun); | 1576 INSTALL_NATIVE(JSFunction, "$globalEval", global_eval_fun); |
1577 INSTALL_NATIVE(JSFunction, "$getStackTraceLine", get_stack_trace_line_fun); | 1577 INSTALL_NATIVE(JSFunction, "$getStackTraceLine", get_stack_trace_line_fun); |
1578 INSTALL_NATIVE(JSFunction, "$toCompletePropertyDescriptor", | 1578 INSTALL_NATIVE(JSFunction, "$toCompletePropertyDescriptor", |
1579 to_complete_property_descriptor); | 1579 to_complete_property_descriptor); |
1580 | 1580 |
1581 INSTALL_NATIVE(Symbol, "$promiseStatus", promise_status); | 1581 INSTALL_NATIVE(Symbol, "$promiseStatus", promise_status); |
1582 INSTALL_NATIVE(JSFunction, "$promiseCreate", promise_create); | 1582 INSTALL_NATIVE(JSFunction, "$promiseCreate", promise_create); |
1583 INSTALL_NATIVE(JSFunction, "$promiseResolve", promise_resolve); | 1583 INSTALL_NATIVE(JSFunction, "$promiseResolve", promise_resolve); |
1584 INSTALL_NATIVE(JSFunction, "$promiseReject", promise_reject); | 1584 INSTALL_NATIVE(JSFunction, "$promiseReject", promise_reject); |
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2963 return from + sizeof(NestingCounterType); | 2963 return from + sizeof(NestingCounterType); |
2964 } | 2964 } |
2965 | 2965 |
2966 | 2966 |
2967 // Called when the top-level V8 mutex is destroyed. | 2967 // Called when the top-level V8 mutex is destroyed. |
2968 void Bootstrapper::FreeThreadResources() { | 2968 void Bootstrapper::FreeThreadResources() { |
2969 DCHECK(!IsActive()); | 2969 DCHECK(!IsActive()); |
2970 } | 2970 } |
2971 | 2971 |
2972 } } // namespace v8::internal | 2972 } } // namespace v8::internal |
OLD | NEW |