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 "v8.h" | 8 #include "v8.h" |
9 | 9 |
10 #include "accessors.h" | 10 #include "accessors.h" |
(...skipping 2923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2934 | 2934 |
2935 | 2935 |
2936 RUNTIME_FUNCTION(Runtime_FunctionIsGenerator) { | 2936 RUNTIME_FUNCTION(Runtime_FunctionIsGenerator) { |
2937 SealHandleScope shs(isolate); | 2937 SealHandleScope shs(isolate); |
2938 ASSERT(args.length() == 1); | 2938 ASSERT(args.length() == 1); |
2939 CONVERT_ARG_CHECKED(JSFunction, f, 0); | 2939 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
2940 return isolate->heap()->ToBoolean(f->shared()->is_generator()); | 2940 return isolate->heap()->ToBoolean(f->shared()->is_generator()); |
2941 } | 2941 } |
2942 | 2942 |
2943 | 2943 |
| 2944 RUNTIME_FUNCTION(Runtime_FunctionIsArrow) { |
| 2945 SealHandleScope shs(isolate); |
| 2946 ASSERT(args.length() == 1); |
| 2947 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
| 2948 return isolate->heap()->ToBoolean(f->shared()->is_arrow()); |
| 2949 } |
| 2950 |
| 2951 |
2944 RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) { | 2952 RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) { |
2945 SealHandleScope shs(isolate); | 2953 SealHandleScope shs(isolate); |
2946 ASSERT(args.length() == 1); | 2954 ASSERT(args.length() == 1); |
2947 | 2955 |
2948 CONVERT_ARG_CHECKED(JSFunction, f, 0); | 2956 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
2949 RUNTIME_ASSERT(f->RemovePrototype()); | 2957 RUNTIME_ASSERT(f->RemovePrototype()); |
2950 | 2958 |
2951 return isolate->heap()->undefined_value(); | 2959 return isolate->heap()->undefined_value(); |
2952 } | 2960 } |
2953 | 2961 |
(...skipping 12217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15171 } | 15179 } |
15172 return NULL; | 15180 return NULL; |
15173 } | 15181 } |
15174 | 15182 |
15175 | 15183 |
15176 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15184 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
15177 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15185 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
15178 } | 15186 } |
15179 | 15187 |
15180 } } // namespace v8::internal | 15188 } } // namespace v8::internal |
OLD | NEW |