| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 return isolate->heap()->undefined_value(); | 42 return isolate->heap()->undefined_value(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 | 45 |
| 46 RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) { | 46 RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) { |
| 47 SealHandleScope shs(isolate); | 47 SealHandleScope shs(isolate); |
| 48 DCHECK(args.length() == 1); | 48 DCHECK(args.length() == 1); |
| 49 | 49 |
| 50 CONVERT_ARG_CHECKED(JSFunction, f, 0); | 50 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
| 51 CHECK(f->RemovePrototype()); | 51 CHECK(f->RemovePrototype()); |
| 52 f->shared()->set_construct_stub( | 52 f->shared()->SetConstructStub( |
| 53 *isolate->builtins()->ConstructedNonConstructable()); | 53 *isolate->builtins()->ConstructedNonConstructable()); |
| 54 | 54 |
| 55 return isolate->heap()->undefined_value(); | 55 return isolate->heap()->undefined_value(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 | 58 |
| 59 RUNTIME_FUNCTION(Runtime_FunctionGetScript) { | 59 RUNTIME_FUNCTION(Runtime_FunctionGetScript) { |
| 60 HandleScope scope(isolate); | 60 HandleScope scope(isolate); |
| 61 DCHECK_EQ(1, args.length()); | 61 DCHECK_EQ(1, args.length()); |
| 62 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); | 62 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 DCHECK_EQ(1, args.length()); | 296 DCHECK_EQ(1, args.length()); |
| 297 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); | 297 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); |
| 298 return function->IsJSBoundFunction() | 298 return function->IsJSBoundFunction() |
| 299 ? *JSBoundFunction::ToString( | 299 ? *JSBoundFunction::ToString( |
| 300 Handle<JSBoundFunction>::cast(function)) | 300 Handle<JSBoundFunction>::cast(function)) |
| 301 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); | 301 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); |
| 302 } | 302 } |
| 303 | 303 |
| 304 } // namespace internal | 304 } // namespace internal |
| 305 } // namespace v8 | 305 } // namespace v8 |
| OLD | NEW |