| 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 1661 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1672     JSObject::AddProperty(global, name, math, DONT_ENUM); |  1672     JSObject::AddProperty(global, name, math, DONT_ENUM); | 
|  1673     SimpleInstallFunction(math, "acos", Builtins::kMathAcos, 1, true); |  1673     SimpleInstallFunction(math, "acos", Builtins::kMathAcos, 1, true); | 
|  1674     SimpleInstallFunction(math, "asin", Builtins::kMathAsin, 1, true); |  1674     SimpleInstallFunction(math, "asin", Builtins::kMathAsin, 1, true); | 
|  1675     SimpleInstallFunction(math, "atan", Builtins::kMathAtan, 1, true); |  1675     SimpleInstallFunction(math, "atan", Builtins::kMathAtan, 1, true); | 
|  1676     SimpleInstallFunction(math, "atan2", Builtins::kMathAtan2, 2, true); |  1676     SimpleInstallFunction(math, "atan2", Builtins::kMathAtan2, 2, true); | 
|  1677     SimpleInstallFunction(math, "atanh", Builtins::kMathAtanh, 1, true); |  1677     SimpleInstallFunction(math, "atanh", Builtins::kMathAtanh, 1, true); | 
|  1678     SimpleInstallFunction(math, "ceil", Builtins::kMathCeil, 1, true); |  1678     SimpleInstallFunction(math, "ceil", Builtins::kMathCeil, 1, true); | 
|  1679     SimpleInstallFunction(math, "cbrt", Builtins::kMathCbrt, 1, true); |  1679     SimpleInstallFunction(math, "cbrt", Builtins::kMathCbrt, 1, true); | 
|  1680     SimpleInstallFunction(math, "expm1", Builtins::kMathExpm1, 1, true); |  1680     SimpleInstallFunction(math, "expm1", Builtins::kMathExpm1, 1, true); | 
|  1681     SimpleInstallFunction(math, "clz32", Builtins::kMathClz32, 1, true); |  1681     SimpleInstallFunction(math, "clz32", Builtins::kMathClz32, 1, true); | 
 |  1682     SimpleInstallFunction(math, "cos", Builtins::kMathCos, 1, true); | 
|  1682     Handle<JSFunction> math_exp = |  1683     Handle<JSFunction> math_exp = | 
|  1683         SimpleInstallFunction(math, "exp", Builtins::kMathExp, 1, true); |  1684         SimpleInstallFunction(math, "exp", Builtins::kMathExp, 1, true); | 
|  1684     native_context()->set_math_exp(*math_exp); |  1685     native_context()->set_math_exp(*math_exp); | 
|  1685     Handle<JSFunction> math_floor = |  1686     Handle<JSFunction> math_floor = | 
|  1686         SimpleInstallFunction(math, "floor", Builtins::kMathFloor, 1, true); |  1687         SimpleInstallFunction(math, "floor", Builtins::kMathFloor, 1, true); | 
|  1687     native_context()->set_math_floor(*math_floor); |  1688     native_context()->set_math_floor(*math_floor); | 
|  1688     SimpleInstallFunction(math, "fround", Builtins::kMathFround, 1, true); |  1689     SimpleInstallFunction(math, "fround", Builtins::kMathFround, 1, true); | 
|  1689     SimpleInstallFunction(math, "imul", Builtins::kMathImul, 2, true); |  1690     SimpleInstallFunction(math, "imul", Builtins::kMathImul, 2, true); | 
|  1690     Handle<JSFunction> math_log = |  1691     Handle<JSFunction> math_log = | 
|  1691         SimpleInstallFunction(math, "log", Builtins::kMathLog, 1, true); |  1692         SimpleInstallFunction(math, "log", Builtins::kMathLog, 1, true); | 
|  1692     native_context()->set_math_log(*math_log); |  1693     native_context()->set_math_log(*math_log); | 
|  1693     SimpleInstallFunction(math, "log1p", Builtins::kMathLog1p, 1, true); |  1694     SimpleInstallFunction(math, "log1p", Builtins::kMathLog1p, 1, true); | 
|  1694     SimpleInstallFunction(math, "log2", Builtins::kMathLog2, 1, true); |  1695     SimpleInstallFunction(math, "log2", Builtins::kMathLog2, 1, true); | 
|  1695     SimpleInstallFunction(math, "log10", Builtins::kMathLog10, 1, true); |  1696     SimpleInstallFunction(math, "log10", Builtins::kMathLog10, 1, true); | 
|  1696     SimpleInstallFunction(math, "max", Builtins::kMathMax, 2, false); |  1697     SimpleInstallFunction(math, "max", Builtins::kMathMax, 2, false); | 
|  1697     SimpleInstallFunction(math, "min", Builtins::kMathMin, 2, false); |  1698     SimpleInstallFunction(math, "min", Builtins::kMathMin, 2, false); | 
|  1698     SimpleInstallFunction(math, "round", Builtins::kMathRound, 1, true); |  1699     SimpleInstallFunction(math, "round", Builtins::kMathRound, 1, true); | 
 |  1700     SimpleInstallFunction(math, "sin", Builtins::kMathSin, 1, true); | 
|  1699     Handle<JSFunction> math_sqrt = |  1701     Handle<JSFunction> math_sqrt = | 
|  1700         SimpleInstallFunction(math, "sqrt", Builtins::kMathSqrt, 1, true); |  1702         SimpleInstallFunction(math, "sqrt", Builtins::kMathSqrt, 1, true); | 
|  1701     native_context()->set_math_sqrt(*math_sqrt); |  1703     native_context()->set_math_sqrt(*math_sqrt); | 
|  1702     SimpleInstallFunction(math, "trunc", Builtins::kMathTrunc, 1, true); |  1704     SimpleInstallFunction(math, "trunc", Builtins::kMathTrunc, 1, true); | 
|  1703   } |  1705   } | 
|  1704  |  1706  | 
|  1705   {  // -- A r r a y B u f f e r |  1707   {  // -- A r r a y B u f f e r | 
|  1706     Handle<JSFunction> array_buffer_fun = |  1708     Handle<JSFunction> array_buffer_fun = | 
|  1707         InstallArrayBuffer(global, "ArrayBuffer"); |  1709         InstallArrayBuffer(global, "ArrayBuffer"); | 
|  1708     InstallWithIntrinsicDefaultProto(isolate, array_buffer_fun, |  1710     InstallWithIntrinsicDefaultProto(isolate, array_buffer_fun, | 
| (...skipping 2244 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3953 } |  3955 } | 
|  3954  |  3956  | 
|  3955  |  3957  | 
|  3956 // Called when the top-level V8 mutex is destroyed. |  3958 // Called when the top-level V8 mutex is destroyed. | 
|  3957 void Bootstrapper::FreeThreadResources() { |  3959 void Bootstrapper::FreeThreadResources() { | 
|  3958   DCHECK(!IsActive()); |  3960   DCHECK(!IsActive()); | 
|  3959 } |  3961 } | 
|  3960  |  3962  | 
|  3961 }  // namespace internal |  3963 }  // namespace internal | 
|  3962 }  // namespace v8 |  3964 }  // namespace v8 | 
| OLD | NEW |