| 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 2729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2740 | 2740 |
| 2741 | 2741 |
| 2742 RUNTIME_FUNCTION(Runtime_FunctionIsArrow) { | 2742 RUNTIME_FUNCTION(Runtime_FunctionIsArrow) { |
| 2743 SealHandleScope shs(isolate); | 2743 SealHandleScope shs(isolate); |
| 2744 DCHECK(args.length() == 1); | 2744 DCHECK(args.length() == 1); |
| 2745 CONVERT_ARG_CHECKED(JSFunction, f, 0); | 2745 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
| 2746 return isolate->heap()->ToBoolean(f->shared()->is_arrow()); | 2746 return isolate->heap()->ToBoolean(f->shared()->is_arrow()); |
| 2747 } | 2747 } |
| 2748 | 2748 |
| 2749 | 2749 |
| 2750 RUNTIME_FUNCTION(Runtime_FunctionIsConciseMethod) { |
| 2751 SealHandleScope shs(isolate); |
| 2752 DCHECK(args.length() == 1); |
| 2753 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
| 2754 return isolate->heap()->ToBoolean(f->shared()->is_concise_method()); |
| 2755 } |
| 2756 |
| 2757 |
| 2750 RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) { | 2758 RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) { |
| 2751 SealHandleScope shs(isolate); | 2759 SealHandleScope shs(isolate); |
| 2752 DCHECK(args.length() == 1); | 2760 DCHECK(args.length() == 1); |
| 2753 | 2761 |
| 2754 CONVERT_ARG_CHECKED(JSFunction, f, 0); | 2762 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
| 2755 RUNTIME_ASSERT(f->RemovePrototype()); | 2763 RUNTIME_ASSERT(f->RemovePrototype()); |
| 2756 | 2764 |
| 2757 return isolate->heap()->undefined_value(); | 2765 return isolate->heap()->undefined_value(); |
| 2758 } | 2766 } |
| 2759 | 2767 |
| (...skipping 5336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8096 return *NewStrictArguments(isolate, callee, parameters, argument_count); | 8104 return *NewStrictArguments(isolate, callee, parameters, argument_count); |
| 8097 } | 8105 } |
| 8098 | 8106 |
| 8099 | 8107 |
| 8100 RUNTIME_FUNCTION(Runtime_NewClosureFromStubFailure) { | 8108 RUNTIME_FUNCTION(Runtime_NewClosureFromStubFailure) { |
| 8101 HandleScope scope(isolate); | 8109 HandleScope scope(isolate); |
| 8102 DCHECK(args.length() == 1); | 8110 DCHECK(args.length() == 1); |
| 8103 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 0); | 8111 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 0); |
| 8104 Handle<Context> context(isolate->context()); | 8112 Handle<Context> context(isolate->context()); |
| 8105 PretenureFlag pretenure_flag = NOT_TENURED; | 8113 PretenureFlag pretenure_flag = NOT_TENURED; |
| 8106 return *isolate->factory()->NewFunctionFromSharedFunctionInfo( | 8114 return *isolate->factory()->NewFunctionFromSharedFunctionInfo(shared, context, |
| 8107 shared, context, pretenure_flag); | 8115 pretenure_flag); |
| 8108 } | 8116 } |
| 8109 | 8117 |
| 8110 | 8118 |
| 8111 RUNTIME_FUNCTION(Runtime_NewClosure) { | 8119 RUNTIME_FUNCTION(Runtime_NewClosure) { |
| 8112 HandleScope scope(isolate); | 8120 HandleScope scope(isolate); |
| 8113 DCHECK(args.length() == 3); | 8121 DCHECK(args.length() == 3); |
| 8114 CONVERT_ARG_HANDLE_CHECKED(Context, context, 0); | 8122 CONVERT_ARG_HANDLE_CHECKED(Context, context, 0); |
| 8115 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 1); | 8123 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 1); |
| 8116 CONVERT_BOOLEAN_ARG_CHECKED(pretenure, 2); | 8124 CONVERT_BOOLEAN_ARG_CHECKED(pretenure, 2); |
| 8117 | 8125 |
| (...skipping 7509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15627 } | 15635 } |
| 15628 return NULL; | 15636 return NULL; |
| 15629 } | 15637 } |
| 15630 | 15638 |
| 15631 | 15639 |
| 15632 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15640 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
| 15633 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15641 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
| 15634 } | 15642 } |
| 15635 | 15643 |
| 15636 } } // namespace v8::internal | 15644 } } // namespace v8::internal |
| OLD | NEW |