Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: src/bootstrapper.cc

Issue 2068743002: [builtins] Unify Atanh, Cbrt and Expm1 as exports from flibm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed type warning. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/base/ieee754.cc ('k') | src/builtins.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after
1667 JSFunction::SetInstancePrototype( 1667 JSFunction::SetInstancePrototype(
1668 cons, 1668 cons,
1669 Handle<Object>(native_context()->initial_object_prototype(), isolate)); 1669 Handle<Object>(native_context()->initial_object_prototype(), isolate));
1670 Handle<JSObject> math = factory->NewJSObject(cons, TENURED); 1670 Handle<JSObject> math = factory->NewJSObject(cons, TENURED);
1671 DCHECK(math->IsJSObject()); 1671 DCHECK(math->IsJSObject());
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, "ceil", Builtins::kMathCeil, 1, true); 1678 SimpleInstallFunction(math, "ceil", Builtins::kMathCeil, 1, true);
1679 SimpleInstallFunction(math, "cbrt", Builtins::kMathCbrt, 1, true);
1680 SimpleInstallFunction(math, "expm1", Builtins::kMathExpm1, 1, true);
1678 SimpleInstallFunction(math, "clz32", Builtins::kMathClz32, 1, true); 1681 SimpleInstallFunction(math, "clz32", Builtins::kMathClz32, 1, true);
1679 Handle<JSFunction> math_exp = 1682 Handle<JSFunction> math_exp =
1680 SimpleInstallFunction(math, "exp", Builtins::kMathExp, 1, true); 1683 SimpleInstallFunction(math, "exp", Builtins::kMathExp, 1, true);
1681 native_context()->set_math_exp(*math_exp); 1684 native_context()->set_math_exp(*math_exp);
1682 Handle<JSFunction> math_floor = 1685 Handle<JSFunction> math_floor =
1683 SimpleInstallFunction(math, "floor", Builtins::kMathFloor, 1, true); 1686 SimpleInstallFunction(math, "floor", Builtins::kMathFloor, 1, true);
1684 native_context()->set_math_floor(*math_floor); 1687 native_context()->set_math_floor(*math_floor);
1685 SimpleInstallFunction(math, "fround", Builtins::kMathFround, 1, true); 1688 SimpleInstallFunction(math, "fround", Builtins::kMathFround, 1, true);
1686 SimpleInstallFunction(math, "imul", Builtins::kMathImul, 2, true); 1689 SimpleInstallFunction(math, "imul", Builtins::kMathImul, 2, true);
1687 Handle<JSFunction> math_log = 1690 Handle<JSFunction> math_log =
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
2578 Handle<AccessorInfo> script_is_embedder_debug_script = 2581 Handle<AccessorInfo> script_is_embedder_debug_script =
2579 Accessors::ScriptIsEmbedderDebugScriptInfo(isolate, attribs); 2582 Accessors::ScriptIsEmbedderDebugScriptInfo(isolate, attribs);
2580 { 2583 {
2581 AccessorConstantDescriptor d( 2584 AccessorConstantDescriptor d(
2582 Handle<Name>(Name::cast(script_is_embedder_debug_script->name())), 2585 Handle<Name>(Name::cast(script_is_embedder_debug_script->name())),
2583 script_is_embedder_debug_script, attribs); 2586 script_is_embedder_debug_script, attribs);
2584 script_map->AppendDescriptor(&d); 2587 script_map->AppendDescriptor(&d);
2585 } 2588 }
2586 2589
2587 { 2590 {
2591 // TODO(mvstanton): Remove this when MathSinh, MathCosh and MathTanh are
2592 // no longer implemented in fdlibm.js.
2593 SimpleInstallFunction(container, "MathExpm1", Builtins::kMathExpm1, 1,
2594 true);
2595 }
2596
2597 {
2588 PrototypeIterator iter(native_context->sloppy_async_function_map()); 2598 PrototypeIterator iter(native_context->sloppy_async_function_map());
2589 Handle<JSObject> async_function_prototype(iter.GetCurrent<JSObject>()); 2599 Handle<JSObject> async_function_prototype(iter.GetCurrent<JSObject>());
2590 2600
2591 static const bool kUseStrictFunctionMap = true; 2601 static const bool kUseStrictFunctionMap = true;
2592 Handle<JSFunction> async_function_constructor = InstallFunction( 2602 Handle<JSFunction> async_function_constructor = InstallFunction(
2593 container, "AsyncFunction", JS_FUNCTION_TYPE, JSFunction::kSize, 2603 container, "AsyncFunction", JS_FUNCTION_TYPE, JSFunction::kSize,
2594 async_function_prototype, Builtins::kAsyncFunctionConstructor, 2604 async_function_prototype, Builtins::kAsyncFunctionConstructor,
2595 kUseStrictFunctionMap); 2605 kUseStrictFunctionMap);
2596 async_function_constructor->set_prototype_or_initial_map( 2606 async_function_constructor->set_prototype_or_initial_map(
2597 native_context->sloppy_async_function_map()); 2607 native_context->sloppy_async_function_map());
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
3943 } 3953 }
3944 3954
3945 3955
3946 // Called when the top-level V8 mutex is destroyed. 3956 // Called when the top-level V8 mutex is destroyed.
3947 void Bootstrapper::FreeThreadResources() { 3957 void Bootstrapper::FreeThreadResources() {
3948 DCHECK(!IsActive()); 3958 DCHECK(!IsActive());
3949 } 3959 }
3950 3960
3951 } // namespace internal 3961 } // namespace internal
3952 } // namespace v8 3962 } // namespace v8
OLDNEW
« no previous file with comments | « src/base/ieee754.cc ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698