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

Unified Diff: runtime/vm/object_service.cc

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 years, 5 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_reload.cc ('k') | runtime/vm/object_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_service.cc
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc
index ca83ef1a870fc7095d73b6e202df177071a8893f..ba23b24e30c422c995a1bff0beaf863d3ae1328b 100644
--- a/runtime/vm/object_service.cc
+++ b/runtime/vm/object_service.cc
@@ -23,7 +23,6 @@ static void AddNameProperties(JSONObject* jsobj,
}
}
-
void Object::AddCommonObjectProperties(JSONObject* jsobj,
const char* protocol_type,
bool ref) const {
@@ -51,7 +50,6 @@ void Object::AddCommonObjectProperties(JSONObject* jsobj,
}
}
-
void Object::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
AddCommonObjectProperties(&jsobj, "Object", ref);
@@ -61,7 +59,6 @@ void Object::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
}
-
void Object::PrintJSON(JSONStream* stream, bool ref) const {
if (IsNull()) {
JSONObject jsobj(stream);
@@ -74,7 +71,6 @@ void Object::PrintJSON(JSONStream* stream, bool ref) const {
}
}
-
void Class::PrintJSONImpl(JSONStream* stream, bool ref) const {
Isolate* isolate = Isolate::Current();
JSONObject jsobj(stream);
@@ -177,12 +173,10 @@ void Class::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
}
-
void UnresolvedClass::PrintJSONImpl(JSONStream* stream, bool ref) const {
Object::PrintJSONImpl(stream, ref);
}
-
void TypeArguments::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
// The index in the canonical_type_arguments table cannot be used as part of
@@ -233,12 +227,10 @@ void TypeArguments::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
}
-
void PatchClass::PrintJSONImpl(JSONStream* stream, bool ref) const {
Object::PrintJSONImpl(stream, ref);
}
-
static void AddFunctionServiceId(const JSONObject& jsobj,
const Function& f,
const Class& cls) {
@@ -280,7 +272,6 @@ static void AddFunctionServiceId(const JSONObject& jsobj,
jsobj.AddServiceId(f);
}
-
void Function::PrintJSONImpl(JSONStream* stream, bool ref) const {
Class& cls = Class::Handle(Owner());
if (!cls.IsNull()) {
@@ -351,12 +342,10 @@ void Function::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
}
-
void RedirectionData::PrintJSONImpl(JSONStream* stream, bool ref) const {
Object::PrintJSONImpl(stream, ref);
}
-
void Field::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
Class& cls = Class::Handle(Owner());
@@ -413,12 +402,10 @@ void Field::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
}
-
void LiteralToken::PrintJSONImpl(JSONStream* stream, bool ref) const {
Object::PrintJSONImpl(stream, ref);
}
-
void TokenStream::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
AddCommonObjectProperties(&jsobj, "Object", ref);
@@ -435,7 +422,6 @@ void TokenStream::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONArray members(&jsobj, "members");
}
-
// See also Dart_ScriptGetTokenInfo.
void Script::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
@@ -497,7 +483,6 @@ void Script::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
}
-
void Library::PrintJSONImpl(JSONStream* stream, bool ref) const {
const String& id = String::Handle(private_key());
JSONObject jsobj(stream);
@@ -624,17 +609,14 @@ void Library::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
}
-
void LibraryPrefix::PrintJSONImpl(JSONStream* stream, bool ref) const {
Object::PrintJSONImpl(stream, ref);
}
-
void Namespace::PrintJSONImpl(JSONStream* stream, bool ref) const {
Object::PrintJSONImpl(stream, ref);
}
-
void Instructions::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
AddCommonObjectProperties(&jsobj, "Object", ref);
@@ -644,7 +626,6 @@ void Instructions::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
}
-
void ObjectPool::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
AddCommonObjectProperties(&jsobj, "Object", ref);
@@ -684,7 +665,6 @@ void ObjectPool::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
}
-
void PcDescriptors::PrintToJSONObject(JSONObject* jsobj, bool ref) const {
AddCommonObjectProperties(jsobj, "Object", ref);
// TODO(johnmccutchan): Generate a stable id. PcDescriptors hang off a Code
@@ -706,23 +686,19 @@ void PcDescriptors::PrintToJSONObject(JSONObject* jsobj, bool ref) const {
}
}
-
void PcDescriptors::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintToJSONObject(&jsobj, ref);
}
-
void CodeSourceMap::PrintJSONImpl(JSONStream* stream, bool ref) const {
Object::PrintJSONImpl(stream, ref);
}
-
void StackMap::PrintJSONImpl(JSONStream* stream, bool ref) const {
Object::PrintJSONImpl(stream, ref);
}
-
void LocalVarDescriptors::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
AddCommonObjectProperties(&jsobj, "Object", ref);
@@ -749,12 +725,10 @@ void LocalVarDescriptors::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
}
-
void ExceptionHandlers::PrintJSONImpl(JSONStream* stream, bool ref) const {
Object::PrintJSONImpl(stream, ref);
}
-
void SingleTargetCache::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
AddCommonObjectProperties(&jsobj, "Object", ref);
@@ -767,7 +741,6 @@ void SingleTargetCache::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("_upperLimit", upper_limit());
}
-
void UnlinkedCall::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
AddCommonObjectProperties(&jsobj, "Object", ref);
@@ -779,7 +752,6 @@ void UnlinkedCall::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("_argumentsDescriptor", Array::Handle(args_descriptor()));
}
-
void ICData::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
AddCommonObjectProperties(&jsobj, "Object", ref);
@@ -794,7 +766,6 @@ void ICData::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("_entries", Object::Handle(ic_data()));
}
-
void ICData::PrintToJSONArray(const JSONArray& jsarray,
TokenPosition token_pos) const {
Isolate* isolate = Isolate::Current();
@@ -822,7 +793,6 @@ void ICData::PrintToJSONArray(const JSONArray& jsarray,
}
}
-
void Code::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
AddCommonObjectProperties(&jsobj, "Code", ref);
@@ -883,14 +853,12 @@ void Code::PrintJSONImpl(JSONStream* stream, bool ref) const {
PrintJSONInlineIntervals(&jsobj);
}
-
void Code::set_await_token_positions(const Array& await_token_positions) const {
#if !defined(DART_PRECOMPILED_RUNTIME)
StorePointer(&raw_ptr()->await_token_positions_, await_token_positions.raw());
#endif
}
-
void Context::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
// TODO(turnidge): Should the user level type for Context be Context
@@ -918,12 +886,10 @@ void Context::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
}
-
void ContextScope::PrintJSONImpl(JSONStream* stream, bool ref) const {
Object::PrintJSONImpl(stream, ref);
}
-
void MegamorphicCache::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
AddCommonObjectProperties(&jsobj, "Object", ref);
@@ -938,7 +904,6 @@ void MegamorphicCache::PrintJSONImpl(JSONStream* stream, bool ref) const {
Object::Handle(arguments_descriptor()));
}
-
void SubtypeTestCache::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
AddCommonObjectProperties(&jsobj, "Object", ref);
@@ -949,12 +914,10 @@ void SubtypeTestCache::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("_cache", Array::Handle(cache()));
}
-
void Error::PrintJSONImpl(JSONStream* stream, bool ref) const {
UNREACHABLE();
}
-
void ApiError::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
AddCommonObjectProperties(&jsobj, "Error", ref);
@@ -963,7 +926,6 @@ void ApiError::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("message", ToErrorCString());
}
-
void LanguageError::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
AddCommonObjectProperties(&jsobj, "Error", ref);
@@ -972,7 +934,6 @@ void LanguageError::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("message", ToErrorCString());
}
-
void UnhandledException::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
AddCommonObjectProperties(&jsobj, "Error", ref);
@@ -989,7 +950,6 @@ void UnhandledException::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("stacktrace", instance);
}
-
void UnwindError::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
AddCommonObjectProperties(&jsobj, "Error", ref);
@@ -999,7 +959,6 @@ void UnwindError::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("_is_user_initiated", is_user_initiated());
}
-
void Instance::PrintSharedInstanceJSON(JSONObject* jsobj, bool ref) const {
AddCommonObjectProperties(jsobj, "Instance", ref);
if (ref) {
@@ -1051,7 +1010,6 @@ void Instance::PrintSharedInstanceJSON(JSONObject* jsobj, bool ref) const {
}
}
-
void Instance::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
@@ -1096,12 +1054,10 @@ void Instance::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
}
-
void AbstractType::PrintJSONImpl(JSONStream* stream, bool ref) const {
UNREACHABLE();
}
-
void Type::PrintJSONImpl(JSONStream* stream, bool ref) const {
// TODO(regis): Function types are not handled properly.
JSONObject jsobj(stream);
@@ -1131,7 +1087,6 @@ void Type::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
}
-
void TypeRef::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
@@ -1146,7 +1101,6 @@ void TypeRef::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("targetType", AbstractType::Handle(type()));
}
-
void TypeParameter::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
@@ -1165,7 +1119,6 @@ void TypeParameter::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("bound", upper_bound);
}
-
void BoundedType::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
@@ -1181,17 +1134,14 @@ void BoundedType::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("bound", AbstractType::Handle(bound()));
}
-
void MixinAppType::PrintJSONImpl(JSONStream* stream, bool ref) const {
UNREACHABLE();
}
-
void Number::PrintJSONImpl(JSONStream* stream, bool ref) const {
UNREACHABLE();
}
-
void Integer::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
@@ -1200,7 +1150,6 @@ void Integer::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("valueAsString", ToCString());
}
-
void Smi::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
@@ -1209,12 +1158,10 @@ void Smi::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddPropertyF("valueAsString", "%" Pd "", Value());
}
-
void Mint::PrintJSONImpl(JSONStream* stream, bool ref) const {
Integer::PrintJSONImpl(stream, ref);
}
-
void Double::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
@@ -1223,12 +1170,10 @@ void Double::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("valueAsString", ToCString());
}
-
void Bigint::PrintJSONImpl(JSONStream* stream, bool ref) const {
Integer::PrintJSONImpl(stream, ref);
}
-
void String::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
if (raw() == Symbols::OptimizedOut().raw()) {
@@ -1266,7 +1211,6 @@ void String::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddPropertyStr("valueAsString", *this, offset, count);
}
-
void Bool::PrintJSONImpl(JSONStream* stream, bool ref) const {
const char* str = ToCString();
JSONObject jsobj(stream);
@@ -1276,7 +1220,6 @@ void Bool::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddPropertyF("valueAsString", "%s", str);
}
-
void Array::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
@@ -1307,7 +1250,6 @@ void Array::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
}
-
void GrowableObjectArray::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
@@ -1338,7 +1280,6 @@ void GrowableObjectArray::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
}
-
void LinkedHashMap::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
@@ -1377,7 +1318,6 @@ void LinkedHashMap::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
}
-
void Float32x4::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
@@ -1386,7 +1326,6 @@ void Float32x4::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("valueAsString", ToCString());
}
-
void Int32x4::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
@@ -1395,7 +1334,6 @@ void Int32x4::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("valueAsString", ToCString());
}
-
void Float64x2::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
@@ -1404,7 +1342,6 @@ void Float64x2::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("valueAsString", ToCString());
}
-
void TypedData::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
@@ -1429,13 +1366,13 @@ void TypedData::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("bytes", "");
} else {
NoSafepointScope no_safepoint;
- jsobj.AddPropertyBase64("bytes", reinterpret_cast<const uint8_t*>(DataAddr(
- offset * ElementSizeInBytes())),
+ jsobj.AddPropertyBase64("bytes",
+ reinterpret_cast<const uint8_t*>(
+ DataAddr(offset * ElementSizeInBytes())),
count * ElementSizeInBytes());
}
}
-
void ExternalTypedData::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
@@ -1460,43 +1397,37 @@ void ExternalTypedData::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("bytes", "");
} else {
NoSafepointScope no_safepoint;
- jsobj.AddPropertyBase64("bytes", reinterpret_cast<const uint8_t*>(DataAddr(
- offset * ElementSizeInBytes())),
+ jsobj.AddPropertyBase64("bytes",
+ reinterpret_cast<const uint8_t*>(
+ DataAddr(offset * ElementSizeInBytes())),
count * ElementSizeInBytes());
}
}
-
void Capability::PrintJSONImpl(JSONStream* stream, bool ref) const {
Instance::PrintJSONImpl(stream, ref);
}
-
void ReceivePort::PrintJSONImpl(JSONStream* stream, bool ref) const {
Instance::PrintJSONImpl(stream, ref);
}
-
void SendPort::PrintJSONImpl(JSONStream* stream, bool ref) const {
Instance::PrintJSONImpl(stream, ref);
}
-
void ClosureData::PrintJSONImpl(JSONStream* stream, bool ref) const {
Object::PrintJSONImpl(stream, ref);
}
-
void SignatureData::PrintJSONImpl(JSONStream* stream, bool ref) const {
Object::PrintJSONImpl(stream, ref);
}
-
void Closure::PrintJSONImpl(JSONStream* stream, bool ref) const {
Instance::PrintJSONImpl(stream, ref);
}
-
void StackTrace::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
@@ -1505,7 +1436,6 @@ void StackTrace::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("valueAsString", ToCString());
}
-
void RegExp::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
@@ -1552,7 +1482,6 @@ void RegExp::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
}
-
void WeakProperty::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
@@ -1568,7 +1497,6 @@ void WeakProperty::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddProperty("propertyValue", value_handle);
}
-
void MirrorReference::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
« no previous file with comments | « runtime/vm/object_reload.cc ('k') | runtime/vm/object_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698