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

Unified Diff: runtime/vm/object.cc

Issue 2829933002: Trace signature types in the tree shaker. (Closed)
Patch Set: . Created 3 years, 8 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 | « runtime/vm/object.h ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 8282ed526b96608aaf603eaf34d873308727050b..f60b82c9ab29bb82ef84e1c0eb31ad958182f079 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -5653,16 +5653,20 @@ void Function::set_implicit_closure_function(const Function& value) const {
}
-RawType* Function::SignatureType() const {
- Type& type = Type::Handle();
+RawType* Function::ExistingSignatureType() const {
const Object& obj = Object::Handle(raw_ptr()->data_);
ASSERT(!obj.IsNull());
if (IsSignatureFunction()) {
- type = SignatureData::Cast(obj).signature_type();
+ return SignatureData::Cast(obj).signature_type();
} else {
ASSERT(IsClosureFunction());
- type = ClosureData::Cast(obj).signature_type();
+ return ClosureData::Cast(obj).signature_type();
}
+}
+
+
+RawType* Function::SignatureType() const {
+ Type& type = Type::Handle(ExistingSignatureType());
if (type.IsNull()) {
// The function type of this function is not yet cached and needs to be
// constructed and cached here.
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698