Commit 0e5ec1b9 authored by bmeurer's avatar bmeurer Committed by Commit bot

[runtime] Remove unused %ToBool runtime function.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/1277693004

Cr-Commit-Position: refs/heads/master@{#30085}
parent 83c91aaf
......@@ -1048,15 +1048,6 @@ RUNTIME_FUNCTION(Runtime_ToFastProperties) {
}
RUNTIME_FUNCTION(Runtime_ToBool) {
SealHandleScope shs(isolate);
DCHECK(args.length() == 1);
CONVERT_ARG_CHECKED(Object, object, 0);
return isolate->heap()->ToBoolean(object->BooleanValue());
}
RUNTIME_FUNCTION(Runtime_NewStringWrapper) {
HandleScope scope(isolate);
DCHECK(args.length() == 1);
......
......@@ -463,7 +463,6 @@ namespace internal {
F(GetIndexedInterceptorElementNames, 1, 1) \
F(OwnKeys, 1, 1) \
F(ToFastProperties, 1, 1) \
F(ToBool, 1, 1) \
F(NewStringWrapper, 1, 1) \
F(AllocateHeapNumber, 0, 1) \
F(NewObject, 2, 1) \
......
......@@ -132,20 +132,6 @@ TEST(ConstructorCall) {
// TODO(titzer): factor these out into test-runtime-calls.cc
TEST(RuntimeCallCPP1) {
FLAG_allow_natives_syntax = true;
FunctionTester T("(function(a) { return %ToBool(a); })");
T.CheckCall(T.true_value(), T.Val(23), T.undefined());
T.CheckCall(T.true_value(), T.Val(4.2), T.undefined());
T.CheckCall(T.true_value(), T.Val("str"), T.undefined());
T.CheckCall(T.true_value(), T.true_value(), T.undefined());
T.CheckCall(T.false_value(), T.false_value(), T.undefined());
T.CheckCall(T.false_value(), T.undefined(), T.undefined());
T.CheckCall(T.false_value(), T.Val(0.0), T.undefined());
}
TEST(RuntimeCallCPP2) {
FLAG_allow_natives_syntax = true;
FunctionTester T("(function(a,b) { return %NumberAdd(a, b); })");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment