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

Unified Diff: runtime/vm/object.cc

Issue 1715123003: - Add DEBUG_ONLY and NOT_IN_PRODUCT macros. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update status files. Created 4 years, 10 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/globals.h ('k') | runtime/vm/raw_object.h » ('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 d9f3125cf6ea0d4872fe058f6f33473965a52f09..31cef26080e4cbd2dd4a3fb7b98b61f473fd241c 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -1925,8 +1925,12 @@ RawString* Class::PrettyName() const {
RawString* Class::UserVisibleName() const {
+#if defined(PRODUCT)
+ return raw_ptr()->name_;
+#else // defined(PRODUCT)
ASSERT(raw_ptr()->user_name_ != String::null());
return raw_ptr()->user_name_;
+#endif // defined(PRODUCT)
}
@@ -3161,6 +3165,7 @@ RawClass* Class::NewExternalTypedDataClass(intptr_t class_id) {
void Class::set_name(const String& value) const {
ASSERT(value.IsSymbol());
StorePointer(&raw_ptr()->name_, value.raw());
+NOT_IN_PRODUCT(
if (raw_ptr()->user_name_ == String::null()) {
// TODO(johnmccutchan): Eagerly set user name for VM isolate classes,
// lazily set user name for the other classes.
@@ -3168,12 +3173,15 @@ void Class::set_name(const String& value) const {
const String& user_name = String::Handle(GenerateUserVisibleName());
set_user_name(user_name);
}
+)
}
+NOT_IN_PRODUCT(
void Class::set_user_name(const String& value) const {
StorePointer(&raw_ptr()->user_name_, value.raw());
}
+)
RawString* Class::GeneratePrettyName() const {
« no previous file with comments | « runtime/vm/globals.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698