| OLD | NEW |
| 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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/frames-inl.h" | 10 #include "src/frames-inl.h" |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 } | 229 } |
| 230 | 230 |
| 231 | 231 |
| 232 RUNTIME_FUNCTION(Runtime_IsConstructor) { | 232 RUNTIME_FUNCTION(Runtime_IsConstructor) { |
| 233 SealHandleScope shs(isolate); | 233 SealHandleScope shs(isolate); |
| 234 DCHECK_EQ(1, args.length()); | 234 DCHECK_EQ(1, args.length()); |
| 235 CONVERT_ARG_CHECKED(Object, object, 0); | 235 CONVERT_ARG_CHECKED(Object, object, 0); |
| 236 return isolate->heap()->ToBoolean(object->IsConstructor()); | 236 return isolate->heap()->ToBoolean(object->IsConstructor()); |
| 237 } | 237 } |
| 238 | 238 |
| 239 RUNTIME_FUNCTION(Runtime_IsCallable) { |
| 240 SealHandleScope shs(isolate); |
| 241 DCHECK_EQ(1, args.length()); |
| 242 CONVERT_ARG_CHECKED(Object, object, 0); |
| 243 return isolate->heap()->ToBoolean(object->IsCallable()); |
| 244 } |
| 239 | 245 |
| 240 RUNTIME_FUNCTION(Runtime_SetForceInlineFlag) { | 246 RUNTIME_FUNCTION(Runtime_SetForceInlineFlag) { |
| 241 SealHandleScope shs(isolate); | 247 SealHandleScope shs(isolate); |
| 242 RUNTIME_ASSERT(args.length() == 1); | 248 RUNTIME_ASSERT(args.length() == 1); |
| 243 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); | 249 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
| 244 | 250 |
| 245 if (object->IsJSFunction()) { | 251 if (object->IsJSFunction()) { |
| 246 JSFunction* func = JSFunction::cast(*object); | 252 JSFunction* func = JSFunction::cast(*object); |
| 247 func->shared()->set_force_inline(true); | 253 func->shared()->set_force_inline(true); |
| 248 } | 254 } |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 DCHECK_EQ(1, args.length()); | 362 DCHECK_EQ(1, args.length()); |
| 357 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); | 363 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); |
| 358 return function->IsJSBoundFunction() | 364 return function->IsJSBoundFunction() |
| 359 ? *JSBoundFunction::ToString( | 365 ? *JSBoundFunction::ToString( |
| 360 Handle<JSBoundFunction>::cast(function)) | 366 Handle<JSBoundFunction>::cast(function)) |
| 361 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); | 367 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); |
| 362 } | 368 } |
| 363 | 369 |
| 364 } // namespace internal | 370 } // namespace internal |
| 365 } // namespace v8 | 371 } // namespace v8 |
| OLD | NEW |