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 | |
240 RUNTIME_FUNCTION(Runtime_SetForceInlineFlag) { | 239 RUNTIME_FUNCTION(Runtime_SetForceInlineFlag) { |
241 SealHandleScope shs(isolate); | 240 SealHandleScope shs(isolate); |
242 RUNTIME_ASSERT(args.length() == 1); | 241 RUNTIME_ASSERT(args.length() == 1); |
243 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); | 242 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
244 | 243 |
245 if (object->IsJSFunction()) { | 244 if (object->IsJSFunction()) { |
246 JSFunction* func = JSFunction::cast(*object); | 245 JSFunction* func = JSFunction::cast(*object); |
247 func->shared()->set_force_inline(true); | 246 func->shared()->set_force_inline(true); |
248 } | 247 } |
249 return isolate->heap()->undefined_value(); | 248 return isolate->heap()->undefined_value(); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 DCHECK_EQ(1, args.length()); | 355 DCHECK_EQ(1, args.length()); |
357 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); | 356 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); |
358 return function->IsJSBoundFunction() | 357 return function->IsJSBoundFunction() |
359 ? *JSBoundFunction::ToString( | 358 ? *JSBoundFunction::ToString( |
360 Handle<JSBoundFunction>::cast(function)) | 359 Handle<JSBoundFunction>::cast(function)) |
361 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); | 360 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); |
362 } | 361 } |
363 | 362 |
364 } // namespace internal | 363 } // namespace internal |
365 } // namespace v8 | 364 } // namespace v8 |
OLD | NEW |