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 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1516 Handle<JSObject> math = factory->NewJSObject(cons, TENURED); | 1516 Handle<JSObject> math = factory->NewJSObject(cons, TENURED); |
1517 DCHECK(math->IsJSObject()); | 1517 DCHECK(math->IsJSObject()); |
1518 JSObject::AddProperty(global, name, math, DONT_ENUM); | 1518 JSObject::AddProperty(global, name, math, DONT_ENUM); |
1519 SimpleInstallFunction(math, "acos", Builtins::kMathAcos, 1, true); | 1519 SimpleInstallFunction(math, "acos", Builtins::kMathAcos, 1, true); |
1520 SimpleInstallFunction(math, "asin", Builtins::kMathAsin, 1, true); | 1520 SimpleInstallFunction(math, "asin", Builtins::kMathAsin, 1, true); |
1521 SimpleInstallFunction(math, "atan", Builtins::kMathAtan, 1, true); | 1521 SimpleInstallFunction(math, "atan", Builtins::kMathAtan, 1, true); |
1522 SimpleInstallFunction(math, "fround", Builtins::kMathFround, 1, true); | 1522 SimpleInstallFunction(math, "fround", Builtins::kMathFround, 1, true); |
1523 SimpleInstallFunction(math, "imul", Builtins::kMathImul, 2, true); | 1523 SimpleInstallFunction(math, "imul", Builtins::kMathImul, 2, true); |
1524 SimpleInstallFunction(math, "max", Builtins::kMathMax, 2, false); | 1524 SimpleInstallFunction(math, "max", Builtins::kMathMax, 2, false); |
1525 SimpleInstallFunction(math, "min", Builtins::kMathMin, 2, false); | 1525 SimpleInstallFunction(math, "min", Builtins::kMathMin, 2, false); |
| 1526 Handle<JSFunction> math_sqrt = |
| 1527 SimpleInstallFunction(math, "sqrt", Builtins::kMathSqrt, 1, true); |
| 1528 native_context()->set_math_sqrt(*math_sqrt); |
1526 } | 1529 } |
1527 | 1530 |
1528 { // -- A r r a y B u f f e r | 1531 { // -- A r r a y B u f f e r |
1529 Handle<JSFunction> array_buffer_fun = | 1532 Handle<JSFunction> array_buffer_fun = |
1530 InstallArrayBuffer(global, "ArrayBuffer"); | 1533 InstallArrayBuffer(global, "ArrayBuffer"); |
1531 InstallWithIntrinsicDefaultProto(isolate, array_buffer_fun, | 1534 InstallWithIntrinsicDefaultProto(isolate, array_buffer_fun, |
1532 Context::ARRAY_BUFFER_FUN_INDEX); | 1535 Context::ARRAY_BUFFER_FUN_INDEX); |
1533 } | 1536 } |
1534 | 1537 |
1535 { // -- T y p e d A r r a y s | 1538 { // -- T y p e d A r r a y s |
(...skipping 2082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3618 } | 3621 } |
3619 | 3622 |
3620 | 3623 |
3621 // Called when the top-level V8 mutex is destroyed. | 3624 // Called when the top-level V8 mutex is destroyed. |
3622 void Bootstrapper::FreeThreadResources() { | 3625 void Bootstrapper::FreeThreadResources() { |
3623 DCHECK(!IsActive()); | 3626 DCHECK(!IsActive()); |
3624 } | 3627 } |
3625 | 3628 |
3626 } // namespace internal | 3629 } // namespace internal |
3627 } // namespace v8 | 3630 } // namespace v8 |
OLD | NEW |