| 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/ieee754.h" | 9 #include "src/base/ieee754.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1342 Builtins::kNumberPrototypeToLocaleString, 0, false); | 1342 Builtins::kNumberPrototypeToLocaleString, 0, false); |
| 1343 | 1343 |
| 1344 // Install the Number functions. | 1344 // Install the Number functions. |
| 1345 SimpleInstallFunction(number_fun, "isFinite", Builtins::kNumberIsFinite, 1, | 1345 SimpleInstallFunction(number_fun, "isFinite", Builtins::kNumberIsFinite, 1, |
| 1346 true); | 1346 true); |
| 1347 SimpleInstallFunction(number_fun, "isInteger", Builtins::kNumberIsInteger, | 1347 SimpleInstallFunction(number_fun, "isInteger", Builtins::kNumberIsInteger, |
| 1348 1, true); | 1348 1, true); |
| 1349 SimpleInstallFunction(number_fun, "isNaN", Builtins::kNumberIsNaN, 1, true); | 1349 SimpleInstallFunction(number_fun, "isNaN", Builtins::kNumberIsNaN, 1, true); |
| 1350 SimpleInstallFunction(number_fun, "isSafeInteger", | 1350 SimpleInstallFunction(number_fun, "isSafeInteger", |
| 1351 Builtins::kNumberIsSafeInteger, 1, true); | 1351 Builtins::kNumberIsSafeInteger, 1, true); |
| 1352 |
| 1353 // Install Number.parseFloat and Global.parseFloat. |
| 1354 Handle<JSFunction> parse_float_fun = SimpleInstallFunction( |
| 1355 number_fun, "parseFloat", Builtins::kNumberParseFloat, 1, true); |
| 1356 JSObject::AddProperty(global_object, |
| 1357 factory->NewStringFromAsciiChecked("parseFloat"), |
| 1358 parse_float_fun, DONT_ENUM); |
| 1352 } | 1359 } |
| 1353 | 1360 |
| 1354 { // --- B o o l e a n --- | 1361 { // --- B o o l e a n --- |
| 1355 Handle<JSFunction> boolean_fun = | 1362 Handle<JSFunction> boolean_fun = |
| 1356 InstallFunction(global, "Boolean", JS_VALUE_TYPE, JSValue::kSize, | 1363 InstallFunction(global, "Boolean", JS_VALUE_TYPE, JSValue::kSize, |
| 1357 isolate->initial_object_prototype(), | 1364 isolate->initial_object_prototype(), |
| 1358 Builtins::kBooleanConstructor); | 1365 Builtins::kBooleanConstructor); |
| 1359 boolean_fun->shared()->DontAdaptArguments(); | 1366 boolean_fun->shared()->DontAdaptArguments(); |
| 1360 boolean_fun->shared()->SetConstructStub( | 1367 boolean_fun->shared()->SetConstructStub( |
| 1361 *isolate->builtins()->BooleanConstructor_ConstructStub()); | 1368 *isolate->builtins()->BooleanConstructor_ConstructStub()); |
| (...skipping 2963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4325 } | 4332 } |
| 4326 | 4333 |
| 4327 | 4334 |
| 4328 // Called when the top-level V8 mutex is destroyed. | 4335 // Called when the top-level V8 mutex is destroyed. |
| 4329 void Bootstrapper::FreeThreadResources() { | 4336 void Bootstrapper::FreeThreadResources() { |
| 4330 DCHECK(!IsActive()); | 4337 DCHECK(!IsActive()); |
| 4331 } | 4338 } |
| 4332 | 4339 |
| 4333 } // namespace internal | 4340 } // namespace internal |
| 4334 } // namespace v8 | 4341 } // namespace v8 |
| OLD | NEW |