| 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/v8.h" | 5 #include "src/v8.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/cpu-profiler.h" | 10 #include "src/cpu-profiler.h" |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 | 594 |
| 595 RUNTIME_FUNCTION(Runtime_GetConstructorDelegate) { | 595 RUNTIME_FUNCTION(Runtime_GetConstructorDelegate) { |
| 596 HandleScope scope(isolate); | 596 HandleScope scope(isolate); |
| 597 DCHECK(args.length() == 1); | 597 DCHECK(args.length() == 1); |
| 598 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); | 598 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
| 599 RUNTIME_ASSERT(!object->IsJSFunction()); | 599 RUNTIME_ASSERT(!object->IsJSFunction()); |
| 600 return *Execution::GetConstructorDelegate(isolate, object); | 600 return *Execution::GetConstructorDelegate(isolate, object); |
| 601 } | 601 } |
| 602 | 602 |
| 603 | 603 |
| 604 RUNTIME_FUNCTION(Runtime_GetOriginalConstructor) { |
| 605 SealHandleScope shs(isolate); |
| 606 DCHECK(args.length() == 0); |
| 607 JavaScriptFrameIterator it(isolate); |
| 608 JavaScriptFrame* frame = it.frame(); |
| 609 return frame->IsConstructor() ? frame->GetOriginalConstructor() |
| 610 : isolate->heap()->undefined_value(); |
| 611 } |
| 612 |
| 613 |
| 604 RUNTIME_FUNCTION(Runtime_CallFunction) { | 614 RUNTIME_FUNCTION(Runtime_CallFunction) { |
| 605 SealHandleScope shs(isolate); | 615 SealHandleScope shs(isolate); |
| 606 return __RT_impl_Runtime_Call(args, isolate); | 616 return __RT_impl_Runtime_Call(args, isolate); |
| 607 } | 617 } |
| 608 | 618 |
| 609 | 619 |
| 610 RUNTIME_FUNCTION(Runtime_IsConstructCall) { | 620 RUNTIME_FUNCTION(Runtime_IsConstructCall) { |
| 611 SealHandleScope shs(isolate); | 621 SealHandleScope shs(isolate); |
| 612 DCHECK(args.length() == 0); | 622 DCHECK(args.length() == 0); |
| 613 JavaScriptFrameIterator it(isolate); | 623 JavaScriptFrameIterator it(isolate); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 625 | 635 |
| 626 | 636 |
| 627 RUNTIME_FUNCTION(Runtime_ThrowStrongModeTooFewArguments) { | 637 RUNTIME_FUNCTION(Runtime_ThrowStrongModeTooFewArguments) { |
| 628 HandleScope scope(isolate); | 638 HandleScope scope(isolate); |
| 629 DCHECK(args.length() == 0); | 639 DCHECK(args.length() == 0); |
| 630 THROW_NEW_ERROR_RETURN_FAILURE(isolate, | 640 THROW_NEW_ERROR_RETURN_FAILURE(isolate, |
| 631 NewTypeError(MessageTemplate::kStrongArity)); | 641 NewTypeError(MessageTemplate::kStrongArity)); |
| 632 } | 642 } |
| 633 } // namespace internal | 643 } // namespace internal |
| 634 } // namespace v8 | 644 } // namespace v8 |
| OLD | NEW |