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 2654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2665 | 2665 |
2666 | 2666 |
2667 RUNTIME_FUNCTION(Runtime_FunctionIsGenerator) { | 2667 RUNTIME_FUNCTION(Runtime_FunctionIsGenerator) { |
2668 SealHandleScope shs(isolate); | 2668 SealHandleScope shs(isolate); |
2669 ASSERT(args.length() == 1); | 2669 ASSERT(args.length() == 1); |
2670 CONVERT_ARG_CHECKED(JSFunction, f, 0); | 2670 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
2671 return isolate->heap()->ToBoolean(f->shared()->is_generator()); | 2671 return isolate->heap()->ToBoolean(f->shared()->is_generator()); |
2672 } | 2672 } |
2673 | 2673 |
2674 | 2674 |
| 2675 RUNTIME_FUNCTION(Runtime_FunctionIsArrow) { |
| 2676 SealHandleScope shs(isolate); |
| 2677 ASSERT(args.length() == 1); |
| 2678 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
| 2679 return isolate->heap()->ToBoolean(f->shared()->is_arrow()); |
| 2680 } |
| 2681 |
| 2682 |
2675 RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) { | 2683 RUNTIME_FUNCTION(Runtime_FunctionRemovePrototype) { |
2676 SealHandleScope shs(isolate); | 2684 SealHandleScope shs(isolate); |
2677 ASSERT(args.length() == 1); | 2685 ASSERT(args.length() == 1); |
2678 | 2686 |
2679 CONVERT_ARG_CHECKED(JSFunction, f, 0); | 2687 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
2680 RUNTIME_ASSERT(f->RemovePrototype()); | 2688 RUNTIME_ASSERT(f->RemovePrototype()); |
2681 | 2689 |
2682 return isolate->heap()->undefined_value(); | 2690 return isolate->heap()->undefined_value(); |
2683 } | 2691 } |
2684 | 2692 |
(...skipping 12258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14943 } | 14951 } |
14944 return NULL; | 14952 return NULL; |
14945 } | 14953 } |
14946 | 14954 |
14947 | 14955 |
14948 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 14956 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
14949 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 14957 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
14950 } | 14958 } |
14951 | 14959 |
14952 } } // namespace v8::internal | 14960 } } // namespace v8::internal |
OLD | NEW |