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