OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2797 | 2797 |
2798 | 2798 |
2799 RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionIsGenerator) { | 2799 RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionIsGenerator) { |
2800 SealHandleScope shs(isolate); | 2800 SealHandleScope shs(isolate); |
2801 ASSERT(args.length() == 1); | 2801 ASSERT(args.length() == 1); |
2802 CONVERT_ARG_CHECKED(JSFunction, f, 0); | 2802 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
2803 return isolate->heap()->ToBoolean(f->shared()->is_generator()); | 2803 return isolate->heap()->ToBoolean(f->shared()->is_generator()); |
2804 } | 2804 } |
2805 | 2805 |
2806 | 2806 |
| 2807 RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionIsArrow) { |
| 2808 SealHandleScope shs(isolate); |
| 2809 ASSERT(args.length() == 1); |
| 2810 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
| 2811 return isolate->heap()->ToBoolean(f->shared()->is_arrow()); |
| 2812 } |
| 2813 |
| 2814 |
2807 RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionRemovePrototype) { | 2815 RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionRemovePrototype) { |
2808 SealHandleScope shs(isolate); | 2816 SealHandleScope shs(isolate); |
2809 ASSERT(args.length() == 1); | 2817 ASSERT(args.length() == 1); |
2810 | 2818 |
2811 CONVERT_ARG_CHECKED(JSFunction, f, 0); | 2819 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
2812 f->RemovePrototype(); | 2820 f->RemovePrototype(); |
2813 | 2821 |
2814 return isolate->heap()->undefined_value(); | 2822 return isolate->heap()->undefined_value(); |
2815 } | 2823 } |
2816 | 2824 |
(...skipping 12243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15060 // Handle last resort GC and make sure to allow future allocations | 15068 // Handle last resort GC and make sure to allow future allocations |
15061 // to grow the heap without causing GCs (if possible). | 15069 // to grow the heap without causing GCs (if possible). |
15062 isolate->counters()->gc_last_resort_from_js()->Increment(); | 15070 isolate->counters()->gc_last_resort_from_js()->Increment(); |
15063 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 15071 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
15064 "Runtime::PerformGC"); | 15072 "Runtime::PerformGC"); |
15065 } | 15073 } |
15066 } | 15074 } |
15067 | 15075 |
15068 | 15076 |
15069 } } // namespace v8::internal | 15077 } } // namespace v8::internal |
OLD | NEW |