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

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

Issue 2505853003: Refactor SharedFunctionInfo::IsBuiltin. (Closed)
Patch Set: rebase Created 4 years, 1 month 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 | « src/crankshaft/hydrogen.cc ('k') | src/ic/ic.cc » ('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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 // (generator objects) on the heap. 593 // (generator objects) on the heap.
594 if (IsResumableFunction(shared_info->kind())) { 594 if (IsResumableFunction(shared_info->kind())) {
595 return false; 595 return false;
596 } 596 }
597 597
598 // If this is a full script wrapped in a function we do not flush the code. 598 // If this is a full script wrapped in a function we do not flush the code.
599 if (shared_info->is_toplevel()) { 599 if (shared_info->is_toplevel()) {
600 return false; 600 return false;
601 } 601 }
602 602
603 // The function must not be a builtin. 603 // The function must be user code.
604 if (shared_info->IsBuiltin()) { 604 if (!shared_info->IsUserJavaScript()) {
605 return false; 605 return false;
606 } 606 }
607 607
608 // Maintain debug break slots in the code. 608 // Maintain debug break slots in the code.
609 if (shared_info->HasDebugCode()) { 609 if (shared_info->HasDebugCode()) {
610 return false; 610 return false;
611 } 611 }
612 612
613 // If this is a function initialized with %SetCode then the one-to-one 613 // If this is a function initialized with %SetCode then the one-to-one
614 // relation between SharedFunctionInfo and Code is broken. 614 // relation between SharedFunctionInfo and Code is broken.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, 657 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode,
658 void> JSFunctionWeakCodeBodyVisitor; 658 void> JSFunctionWeakCodeBodyVisitor;
659 JSFunctionWeakCodeBodyVisitor::Visit(map, object); 659 JSFunctionWeakCodeBodyVisitor::Visit(map, object);
660 } 660 }
661 661
662 662
663 } // namespace internal 663 } // namespace internal
664 } // namespace v8 664 } // namespace v8
665 665
666 #endif // V8_OBJECTS_VISITING_INL_H_ 666 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698