| 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 RUNTIME_FUNCTION(Runtime_IsConstructor) { | 253 RUNTIME_FUNCTION(Runtime_IsConstructor) { |
| 254 SealHandleScope shs(isolate); | 254 SealHandleScope shs(isolate); |
| 255 DCHECK_EQ(1, args.length()); | 255 DCHECK_EQ(1, args.length()); |
| 256 CONVERT_ARG_CHECKED(Object, object, 0); | 256 CONVERT_ARG_CHECKED(Object, object, 0); |
| 257 return isolate->heap()->ToBoolean(object->IsConstructor()); | 257 return isolate->heap()->ToBoolean(object->IsConstructor()); |
| 258 } | 258 } |
| 259 | 259 |
| 260 RUNTIME_FUNCTION(Runtime_SetForceInlineFlag) { | 260 RUNTIME_FUNCTION(Runtime_SetForceInlineFlag) { |
| 261 SealHandleScope shs(isolate); | 261 SealHandleScope shs(isolate); |
| 262 DCHECK_EQ(1, args.length()); | 262 DCHECK_EQ(1, args.length()); |
| 263 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); | 263 CONVERT_ARG_CHECKED(Object, object, 0); |
| 264 | 264 |
| 265 if (object->IsJSFunction()) { | 265 if (object->IsJSFunction()) { |
| 266 JSFunction* func = JSFunction::cast(*object); | 266 JSFunction* func = JSFunction::cast(object); |
| 267 func->shared()->set_force_inline(true); | 267 func->shared()->set_force_inline(true); |
| 268 } | 268 } |
| 269 return isolate->heap()->undefined_value(); | 269 return isolate->heap()->undefined_value(); |
| 270 } | 270 } |
| 271 | 271 |
| 272 | 272 |
| 273 RUNTIME_FUNCTION(Runtime_Call) { | 273 RUNTIME_FUNCTION(Runtime_Call) { |
| 274 HandleScope scope(isolate); | 274 HandleScope scope(isolate); |
| 275 DCHECK_LE(2, args.length()); | 275 DCHECK_LE(2, args.length()); |
| 276 int const argc = args.length() - 2; | 276 int const argc = args.length() - 2; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 307 DCHECK_EQ(1, args.length()); | 307 DCHECK_EQ(1, args.length()); |
| 308 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); | 308 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); |
| 309 return function->IsJSBoundFunction() | 309 return function->IsJSBoundFunction() |
| 310 ? *JSBoundFunction::ToString( | 310 ? *JSBoundFunction::ToString( |
| 311 Handle<JSBoundFunction>::cast(function)) | 311 Handle<JSBoundFunction>::cast(function)) |
| 312 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); | 312 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); |
| 313 } | 313 } |
| 314 | 314 |
| 315 } // namespace internal | 315 } // namespace internal |
| 316 } // namespace v8 | 316 } // namespace v8 |
| OLD | NEW |