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

Unified Diff: src/ast/ast.h

Issue 2755973002: [type profile] Collect return types. (Closed)
Patch Set: Rebase. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/ast/ast-numbering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.h
diff --git a/src/ast/ast.h b/src/ast/ast.h
index 2d9833aee1eb2b8f7aa3b8e3de1acf2fb2967720..de603f8ad3fe2b6199f43e3beca6131cf99d0106 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -904,6 +904,15 @@ class ReturnStatement final : public JumpStatement {
Type type() const { return TypeField::decode(bit_field_); }
bool is_async_return() const { return type() == kAsyncReturn; }
+ FeedbackSlot TypeProfileSlot() const {
+ DCHECK(HasTypeProfileSlot());
+ return type_profile_slot_;
+ }
+
+ void SetTypeProfileSlot(FeedbackSlot slot) { type_profile_slot_ = slot; }
+
+ bool HasTypeProfileSlot() const { return !type_profile_slot_.IsInvalid(); }
+
private:
friend class AstNodeFactory;
@@ -912,6 +921,8 @@ class ReturnStatement final : public JumpStatement {
bit_field_ |= TypeField::encode(type);
}
+ FeedbackSlot type_profile_slot_;
+
Expression* expression_;
class TypeField
« no previous file with comments | « no previous file | src/ast/ast-numbering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698