OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 RUNTIME_FUNCTION(Runtime_FunctionNameShouldPrintAsAnonymous) { | 100 RUNTIME_FUNCTION(Runtime_FunctionNameShouldPrintAsAnonymous) { |
101 SealHandleScope shs(isolate); | 101 SealHandleScope shs(isolate); |
102 DCHECK(args.length() == 1); | 102 DCHECK(args.length() == 1); |
103 CONVERT_ARG_CHECKED(JSFunction, f, 0); | 103 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
104 return isolate->heap()->ToBoolean( | 104 return isolate->heap()->ToBoolean( |
105 f->shared()->name_should_print_as_anonymous()); | 105 f->shared()->name_should_print_as_anonymous()); |
106 } | 106 } |
107 | 107 |
108 | 108 |
109 RUNTIME_FUNCTION(Runtime_FunctionMarkNameShouldPrintAsAnonymous) { | |
110 SealHandleScope shs(isolate); | |
111 DCHECK(args.length() == 1); | |
112 CONVERT_ARG_CHECKED(JSFunction, f, 0); | |
113 f->shared()->set_name_should_print_as_anonymous(true); | |
114 return isolate->heap()->undefined_value(); | |
115 } | |
116 | |
117 | |
118 RUNTIME_FUNCTION(Runtime_FunctionIsArrow) { | 109 RUNTIME_FUNCTION(Runtime_FunctionIsArrow) { |
119 SealHandleScope shs(isolate); | 110 SealHandleScope shs(isolate); |
120 DCHECK(args.length() == 1); | 111 DCHECK(args.length() == 1); |
121 CONVERT_ARG_CHECKED(JSFunction, f, 0); | 112 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
122 return isolate->heap()->ToBoolean(f->shared()->is_arrow()); | 113 return isolate->heap()->ToBoolean(f->shared()->is_arrow()); |
123 } | 114 } |
124 | 115 |
125 | 116 |
126 RUNTIME_FUNCTION(Runtime_FunctionIsConciseMethod) { | 117 RUNTIME_FUNCTION(Runtime_FunctionIsConciseMethod) { |
127 SealHandleScope shs(isolate); | 118 SealHandleScope shs(isolate); |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 | 607 |
617 | 608 |
618 RUNTIME_FUNCTION(RuntimeReference_IsFunction) { | 609 RUNTIME_FUNCTION(RuntimeReference_IsFunction) { |
619 SealHandleScope shs(isolate); | 610 SealHandleScope shs(isolate); |
620 DCHECK(args.length() == 1); | 611 DCHECK(args.length() == 1); |
621 CONVERT_ARG_CHECKED(Object, obj, 0); | 612 CONVERT_ARG_CHECKED(Object, obj, 0); |
622 return isolate->heap()->ToBoolean(obj->IsJSFunction()); | 613 return isolate->heap()->ToBoolean(obj->IsJSFunction()); |
623 } | 614 } |
624 } | 615 } |
625 } // namespace v8::internal | 616 } // namespace v8::internal |
OLD | NEW |