Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 2312717c1f170179eed159533e684355c65f91f6..7cfd069678c3fec1868f603e55e8bea24d7cef6c 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -615,7 +615,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateJSProxy) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_IsJSProxy) { |
ASSERT(args.length() == 1); |
Object* obj = args[0]; |
- return isolate->heap()->ToBoolean(obj->IsJSProxy()); |
+ return obj->IsJSProxy() |
+ ? isolate->heap()->true_value() : isolate->heap()->false_value(); |
} |
@@ -1037,7 +1038,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_IsExtensible) { |
ASSERT(proto->IsJSGlobalObject()); |
obj = JSObject::cast(proto); |
} |
- return isolate->heap()->ToBoolean(obj->map()->is_extensible()); |
+ return obj->map()->is_extensible() ? isolate->heap()->true_value() |
+ : isolate->heap()->false_value(); |
} |
@@ -1103,7 +1105,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DisableAccessChecks) { |
Map::cast(new_map)->set_is_access_check_needed(false); |
object->set_map(Map::cast(new_map)); |
} |
- return isolate->heap()->ToBoolean(needs_access_checks); |
+ return needs_access_checks ? isolate->heap()->true_value() |
+ : isolate->heap()->false_value(); |
} |
@@ -1914,24 +1917,6 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionSetName) { |
} |
-RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionNameShouldPrintAsAnonymous) { |
- NoHandleAllocation ha; |
- ASSERT(args.length() == 1); |
- CONVERT_CHECKED(JSFunction, f, args[0]); |
- return isolate->heap()->ToBoolean( |
- f->shared()->name_should_print_as_anonymous()); |
-} |
- |
- |
-RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionMarkNameShouldPrintAsAnonymous) { |
- NoHandleAllocation ha; |
- ASSERT(args.length() == 1); |
- CONVERT_CHECKED(JSFunction, f, args[0]); |
- f->shared()->set_name_should_print_as_anonymous(true); |
- return isolate->heap()->undefined_value(); |
-} |
- |
- |
RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionSetBound) { |
HandleScope scope(isolate); |
ASSERT(args.length() == 1); |
@@ -2112,7 +2097,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionIsAPIFunction) { |
ASSERT(args.length() == 1); |
CONVERT_CHECKED(JSFunction, f, args[0]); |
- return isolate->heap()->ToBoolean(f->shared()->IsApiFunction()); |
+ return f->shared()->IsApiFunction() ? isolate->heap()->true_value() |
+ : isolate->heap()->false_value(); |
} |
@@ -2121,7 +2107,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionIsBuiltin) { |
ASSERT(args.length() == 1); |
CONVERT_CHECKED(JSFunction, f, args[0]); |
- return isolate->heap()->ToBoolean(f->IsBuiltin()); |
+ return f->IsBuiltin() ? isolate->heap()->true_value() : |
+ isolate->heap()->false_value(); |
} |
@@ -9993,7 +9980,9 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugGetPropertyDetails) { |
details->set(0, *value); |
details->set(1, property_details); |
if (hasJavaScriptAccessors) { |
- details->set(2, isolate->heap()->ToBoolean(caught_exception)); |
+ details->set(2, |
+ caught_exception ? isolate->heap()->true_value() |
+ : isolate->heap()->false_value()); |
details->set(3, FixedArray::cast(*result_callback_obj)->get(0)); |
details->set(4, FixedArray::cast(*result_callback_obj)->get(1)); |
} |
@@ -12176,7 +12165,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DeleteLOL) { |
#ifdef LIVE_OBJECT_LIST |
CONVERT_SMI_ARG_CHECKED(id, 0); |
bool success = LiveObjectList::Delete(id); |
- return isolate->heap()->ToBoolean(success); |
+ return success ? isolate->heap()->true_value() : |
+ isolate->heap()->false_value(); |
#else |
return isolate->heap()->undefined_value(); |
#endif |