Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(858)

Side by Side Diff: src/heap/objects-visiting-inl.h

Issue 1992093003: [heap] don't flush async functions, they may be resumed later (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: [heap] don't flush async functions, they may be resumed later Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/harmony/async-function-stacktrace.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef V8_OBJECTS_VISITING_INL_H_ 5 #ifndef V8_OBJECTS_VISITING_INL_H_
6 #define V8_OBJECTS_VISITING_INL_H_ 6 #define V8_OBJECTS_VISITING_INL_H_
7 7
8 #include "src/heap/array-buffer-tracker.h" 8 #include "src/heap/array-buffer-tracker.h"
9 #include "src/heap/objects-visiting.h" 9 #include "src/heap/objects-visiting.h"
10 #include "src/ic/ic-state.h" 10 #include "src/ic/ic-state.h"
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 // Only flush code for functions. 640 // Only flush code for functions.
641 if (shared_info->code()->kind() != Code::FUNCTION) { 641 if (shared_info->code()->kind() != Code::FUNCTION) {
642 return false; 642 return false;
643 } 643 }
644 644
645 // Function must be lazy compilable. 645 // Function must be lazy compilable.
646 if (!shared_info->allows_lazy_compilation()) { 646 if (!shared_info->allows_lazy_compilation()) {
647 return false; 647 return false;
648 } 648 }
649 649
650 // We do not (yet?) flush code for generator functions, because we don't know 650 // We do not (yet?) flush code for generator functions, or async functions,
Hannes Payer (out of office) 2016/05/20 07:13:52 How about a list of items enumerating what we don'
caitp (gmail) 2016/05/20 07:55:48 isn't that what this routine is? thats how it look
Hannes Payer (out of office) 2016/05/20 12:00:41 Ah, async is based on generators. Then the comment
651 // if there are still live activations (generator objects) on the heap. 651 // because we don't know if there are still live activations
652 if (shared_info->is_generator()) { 652 // (generator objects) on the heap.
653 if (shared_info->is_resumable()) {
653 return false; 654 return false;
654 } 655 }
655 656
656 // If this is a full script wrapped in a function we do not flush the code. 657 // If this is a full script wrapped in a function we do not flush the code.
657 if (shared_info->is_toplevel()) { 658 if (shared_info->is_toplevel()) {
658 return false; 659 return false;
659 } 660 }
660 661
661 // The function must not be a builtin. 662 // The function must not be a builtin.
662 if (shared_info->IsBuiltin()) { 663 if (shared_info->IsBuiltin()) {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, 732 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode,
732 void> JSFunctionWeakCodeBodyVisitor; 733 void> JSFunctionWeakCodeBodyVisitor;
733 JSFunctionWeakCodeBodyVisitor::Visit(map, object); 734 JSFunctionWeakCodeBodyVisitor::Visit(map, object);
734 } 735 }
735 736
736 737
737 } // namespace internal 738 } // namespace internal
738 } // namespace v8 739 } // namespace v8
739 740
740 #endif // V8_OBJECTS_VISITING_INL_H_ 741 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/harmony/async-function-stacktrace.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698