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 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1230 *isolate->builtins()->NumberConstructor_ConstructStub()); | 1230 *isolate->builtins()->NumberConstructor_ConstructStub()); |
1231 number_fun->shared()->set_length(1); | 1231 number_fun->shared()->set_length(1); |
1232 InstallWithIntrinsicDefaultProto(isolate, number_fun, | 1232 InstallWithIntrinsicDefaultProto(isolate, number_fun, |
1233 Context::NUMBER_FUNCTION_INDEX); | 1233 Context::NUMBER_FUNCTION_INDEX); |
1234 } | 1234 } |
1235 | 1235 |
1236 { // --- B o o l e a n --- | 1236 { // --- B o o l e a n --- |
1237 Handle<JSFunction> boolean_fun = | 1237 Handle<JSFunction> boolean_fun = |
1238 InstallFunction(global, "Boolean", JS_VALUE_TYPE, JSValue::kSize, | 1238 InstallFunction(global, "Boolean", JS_VALUE_TYPE, JSValue::kSize, |
1239 isolate->initial_object_prototype(), | 1239 isolate->initial_object_prototype(), |
1240 Builtins::kIllegal); | 1240 Builtins::kBooleanConstructor); |
| 1241 boolean_fun->shared()->DontAdaptArguments(); |
| 1242 boolean_fun->shared()->set_construct_stub( |
| 1243 *isolate->builtins()->BooleanConstructor_ConstructStub()); |
| 1244 boolean_fun->shared()->set_length(1); |
1241 InstallWithIntrinsicDefaultProto(isolate, boolean_fun, | 1245 InstallWithIntrinsicDefaultProto(isolate, boolean_fun, |
1242 Context::BOOLEAN_FUNCTION_INDEX); | 1246 Context::BOOLEAN_FUNCTION_INDEX); |
1243 } | 1247 } |
1244 | 1248 |
1245 { // --- S t r i n g --- | 1249 { // --- S t r i n g --- |
1246 Handle<JSFunction> string_fun = InstallFunction( | 1250 Handle<JSFunction> string_fun = InstallFunction( |
1247 global, "String", JS_VALUE_TYPE, JSValue::kSize, | 1251 global, "String", JS_VALUE_TYPE, JSValue::kSize, |
1248 isolate->initial_object_prototype(), Builtins::kStringConstructor); | 1252 isolate->initial_object_prototype(), Builtins::kStringConstructor); |
1249 string_fun->shared()->set_construct_stub( | 1253 string_fun->shared()->set_construct_stub( |
1250 *isolate->builtins()->StringConstructor_ConstructStub()); | 1254 *isolate->builtins()->StringConstructor_ConstructStub()); |
(...skipping 2400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3651 } | 3655 } |
3652 | 3656 |
3653 | 3657 |
3654 // Called when the top-level V8 mutex is destroyed. | 3658 // Called when the top-level V8 mutex is destroyed. |
3655 void Bootstrapper::FreeThreadResources() { | 3659 void Bootstrapper::FreeThreadResources() { |
3656 DCHECK(!IsActive()); | 3660 DCHECK(!IsActive()); |
3657 } | 3661 } |
3658 | 3662 |
3659 } // namespace internal | 3663 } // namespace internal |
3660 } // namespace v8 | 3664 } // namespace v8 |
OLD | NEW |