OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 <stdlib.h> | 5 #include <stdlib.h> |
6 #include <limits> | 6 #include <limits> |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
(...skipping 2748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2759 | 2759 |
2760 | 2760 |
2761 RUNTIME_FUNCTION(Runtime_FunctionIsArrow) { | 2761 RUNTIME_FUNCTION(Runtime_FunctionIsArrow) { |
2762 SealHandleScope shs(isolate); | 2762 SealHandleScope shs(isolate); |
2763 DCHECK(args.length() == 1); | 2763 DCHECK(args.length() == 1); |
2764 CONVERT_ARG_CHECKED(JSFunction, f, 0); | 2764 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
2765 return isolate->heap()->ToBoolean(f->shared()->is_arrow()); | 2765 return isolate->heap()->ToBoolean(f->shared()->is_arrow()); |
2766 } | 2766 } |
2767 | 2767 |
2768 | 2768 |
| 2769 RUNTIME_FUNCTION(Runtime_FunctionIsConciseMethod) { |
| 2770 SealHandleScope shs(isolate); |
| 2771 DCHECK(args.length() == 1); |
| 2772 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
| 2773 return isolate->heap()->ToBoolean(f->shared()->is_concise_method()); |
| 2774 } |
| 2775 |
| 2776 |
2769 RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) { | 2777 RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) { |
2770 SealHandleScope shs(isolate); | 2778 SealHandleScope shs(isolate); |
2771 DCHECK(args.length() == 1); | 2779 DCHECK(args.length() == 1); |
2772 | 2780 |
2773 CONVERT_ARG_CHECKED(JSFunction, f, 0); | 2781 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
2774 RUNTIME_ASSERT(f->RemovePrototype()); | 2782 RUNTIME_ASSERT(f->RemovePrototype()); |
2775 | 2783 |
2776 return isolate->heap()->undefined_value(); | 2784 return isolate->heap()->undefined_value(); |
2777 } | 2785 } |
2778 | 2786 |
(...skipping 5333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8112 return *NewStrictArguments(isolate, callee, parameters, argument_count); | 8120 return *NewStrictArguments(isolate, callee, parameters, argument_count); |
8113 } | 8121 } |
8114 | 8122 |
8115 | 8123 |
8116 RUNTIME_FUNCTION(Runtime_NewClosureFromStubFailure) { | 8124 RUNTIME_FUNCTION(Runtime_NewClosureFromStubFailure) { |
8117 HandleScope scope(isolate); | 8125 HandleScope scope(isolate); |
8118 DCHECK(args.length() == 1); | 8126 DCHECK(args.length() == 1); |
8119 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 0); | 8127 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 0); |
8120 Handle<Context> context(isolate->context()); | 8128 Handle<Context> context(isolate->context()); |
8121 PretenureFlag pretenure_flag = NOT_TENURED; | 8129 PretenureFlag pretenure_flag = NOT_TENURED; |
8122 return *isolate->factory()->NewFunctionFromSharedFunctionInfo( | 8130 return *isolate->factory()->NewFunctionFromSharedFunctionInfo(shared, context, |
8123 shared, context, pretenure_flag); | 8131 pretenure_flag); |
8124 } | 8132 } |
8125 | 8133 |
8126 | 8134 |
8127 RUNTIME_FUNCTION(Runtime_NewClosure) { | 8135 RUNTIME_FUNCTION(Runtime_NewClosure) { |
8128 HandleScope scope(isolate); | 8136 HandleScope scope(isolate); |
8129 DCHECK(args.length() == 3); | 8137 DCHECK(args.length() == 3); |
8130 CONVERT_ARG_HANDLE_CHECKED(Context, context, 0); | 8138 CONVERT_ARG_HANDLE_CHECKED(Context, context, 0); |
8131 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 1); | 8139 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 1); |
8132 CONVERT_BOOLEAN_ARG_CHECKED(pretenure, 2); | 8140 CONVERT_BOOLEAN_ARG_CHECKED(pretenure, 2); |
8133 | 8141 |
(...skipping 7509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15643 } | 15651 } |
15644 return NULL; | 15652 return NULL; |
15645 } | 15653 } |
15646 | 15654 |
15647 | 15655 |
15648 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15656 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
15649 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15657 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
15650 } | 15658 } |
15651 | 15659 |
15652 } } // namespace v8::internal | 15660 } } // namespace v8::internal |
OLD | NEW |