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 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1531 Handle<String> var##_name = \ | 1531 Handle<String> var##_name = \ |
1532 factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR(name)); \ | 1532 factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR(name)); \ |
1533 Handle<Object> var##_native = \ | 1533 Handle<Object> var##_native = \ |
1534 Object::GetProperty(handle(native_context()->builtins()), var##_name) \ | 1534 Object::GetProperty(handle(native_context()->builtins()), var##_name) \ |
1535 .ToHandleChecked(); \ | 1535 .ToHandleChecked(); \ |
1536 native_context()->set_##var(Type::cast(*var##_native)); | 1536 native_context()->set_##var(Type::cast(*var##_native)); |
1537 | 1537 |
1538 | 1538 |
1539 void Genesis::InstallNativeFunctions() { | 1539 void Genesis::InstallNativeFunctions() { |
1540 HandleScope scope(isolate()); | 1540 HandleScope scope(isolate()); |
1541 INSTALL_NATIVE(JSFunction, "CreateDate", create_date_fun); | 1541 INSTALL_NATIVE(JSFunction, "$createDate", create_date_fun); |
1542 | 1542 |
1543 INSTALL_NATIVE(JSFunction, "ToNumber", to_number_fun); | 1543 INSTALL_NATIVE(JSFunction, "ToNumber", to_number_fun); |
1544 INSTALL_NATIVE(JSFunction, "ToString", to_string_fun); | 1544 INSTALL_NATIVE(JSFunction, "ToString", to_string_fun); |
1545 INSTALL_NATIVE(JSFunction, "ToDetailString", to_detail_string_fun); | 1545 INSTALL_NATIVE(JSFunction, "ToDetailString", to_detail_string_fun); |
1546 INSTALL_NATIVE(JSFunction, "ToObject", to_object_fun); | 1546 INSTALL_NATIVE(JSFunction, "ToObject", to_object_fun); |
1547 INSTALL_NATIVE(JSFunction, "ToInteger", to_integer_fun); | 1547 INSTALL_NATIVE(JSFunction, "ToInteger", to_integer_fun); |
1548 INSTALL_NATIVE(JSFunction, "ToUint32", to_uint32_fun); | 1548 INSTALL_NATIVE(JSFunction, "ToUint32", to_uint32_fun); |
1549 INSTALL_NATIVE(JSFunction, "ToInt32", to_int32_fun); | 1549 INSTALL_NATIVE(JSFunction, "ToInt32", to_int32_fun); |
1550 INSTALL_NATIVE(JSFunction, "ToLength", to_length_fun); | 1550 INSTALL_NATIVE(JSFunction, "ToLength", to_length_fun); |
1551 | 1551 |
(...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2924 return from + sizeof(NestingCounterType); | 2924 return from + sizeof(NestingCounterType); |
2925 } | 2925 } |
2926 | 2926 |
2927 | 2927 |
2928 // Called when the top-level V8 mutex is destroyed. | 2928 // Called when the top-level V8 mutex is destroyed. |
2929 void Bootstrapper::FreeThreadResources() { | 2929 void Bootstrapper::FreeThreadResources() { |
2930 DCHECK(!IsActive()); | 2930 DCHECK(!IsActive()); |
2931 } | 2931 } |
2932 | 2932 |
2933 } } // namespace v8::internal | 2933 } } // namespace v8::internal |
OLD | NEW |