From: bmeurer Date: Mon, 10 Aug 2015 10:32:43 +0000 (-0700) Subject: [runtime] Remove unused %ToBool runtime function. X-Git-Tag: upstream/4.7.83~955 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e5ec1b9102a61a8da51227369b5bb5fdd04edbc;p=platform%2Fupstream%2Fv8.git [runtime] Remove unused %ToBool runtime function. R=yangguo@chromium.org Review URL: https://codereview.chromium.org/1277693004 Cr-Commit-Position: refs/heads/master@{#30085} --- diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc index 04f15bea1..973658902 100644 --- a/src/runtime/runtime-object.cc +++ b/src/runtime/runtime-object.cc @@ -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); diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h index a1a2561a6..7a0f14095 100644 --- a/src/runtime/runtime.h +++ b/src/runtime/runtime.h @@ -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) \ diff --git a/test/cctest/compiler/test-run-jscalls.cc b/test/cctest/compiler/test-run-jscalls.cc index 8de2d7a21..893c2fa46 100644 --- a/test/cctest/compiler/test-run-jscalls.cc +++ b/test/cctest/compiler/test-run-jscalls.cc @@ -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); })");