Reviewers: Yang,
Description:
[runtime] Remove unused %ToBool runtime function.
[email protected]
Please review this at https://codereview.chromium.org/1277693004/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+0, -25 lines):
M src/runtime/runtime.h
M src/runtime/runtime-object.cc
M test/cctest/compiler/test-run-jscalls.cc
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index
04f15bea17267229a2785c41486c62ca0f3bb0cf..973658902915fb9092d2e3f30745ee90fc6cf6d1
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);
Index: src/runtime/runtime.h
diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h
index
a1a2561a6c8ce9a9a4b0fa8fdb342e356600f09c..7a0f14095af45b5add60b87ac02834025a7cfd52
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) \
Index: test/cctest/compiler/test-run-jscalls.cc
diff --git a/test/cctest/compiler/test-run-jscalls.cc
b/test/cctest/compiler/test-run-jscalls.cc
index
8de2d7a2142d516d781618bd552ed1aa492dbc91..6fc771ce565e11e5ac5c606336bddc8d96a50bec
100644
--- a/test/cctest/compiler/test-run-jscalls.cc
+++ b/test/cctest/compiler/test-run-jscalls.cc
@@ -131,21 +131,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); })");
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.