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 2171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2182 | 2182 |
2183 RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionMarkNameShouldPrintAsAnonymous) { | 2183 RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionMarkNameShouldPrintAsAnonymous) { |
2184 NoHandleAllocation ha(isolate); | 2184 NoHandleAllocation ha(isolate); |
2185 ASSERT(args.length() == 1); | 2185 ASSERT(args.length() == 1); |
2186 CONVERT_ARG_CHECKED(JSFunction, f, 0); | 2186 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
2187 f->shared()->set_name_should_print_as_anonymous(true); | 2187 f->shared()->set_name_should_print_as_anonymous(true); |
2188 return isolate->heap()->undefined_value(); | 2188 return isolate->heap()->undefined_value(); |
2189 } | 2189 } |
2190 | 2190 |
2191 | 2191 |
| 2192 RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionIsGenerator) { |
| 2193 NoHandleAllocation ha(isolate); |
| 2194 ASSERT(args.length() == 1); |
| 2195 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
| 2196 return isolate->heap()->ToBoolean(f->shared()->is_generator()); |
| 2197 } |
| 2198 |
| 2199 |
2192 RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionRemovePrototype) { | 2200 RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionRemovePrototype) { |
2193 NoHandleAllocation ha(isolate); | 2201 NoHandleAllocation ha(isolate); |
2194 ASSERT(args.length() == 1); | 2202 ASSERT(args.length() == 1); |
2195 | 2203 |
2196 CONVERT_ARG_CHECKED(JSFunction, f, 0); | 2204 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
2197 f->RemovePrototype(); | 2205 f->RemovePrototype(); |
2198 | 2206 |
2199 return isolate->heap()->undefined_value(); | 2207 return isolate->heap()->undefined_value(); |
2200 } | 2208 } |
2201 | 2209 |
(...skipping 11175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13377 // Handle last resort GC and make sure to allow future allocations | 13385 // Handle last resort GC and make sure to allow future allocations |
13378 // to grow the heap without causing GCs (if possible). | 13386 // to grow the heap without causing GCs (if possible). |
13379 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13387 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13380 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13388 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13381 "Runtime::PerformGC"); | 13389 "Runtime::PerformGC"); |
13382 } | 13390 } |
13383 } | 13391 } |
13384 | 13392 |
13385 | 13393 |
13386 } } // namespace v8::internal | 13394 } } // namespace v8::internal |
OLD | NEW |