Chromium Code Reviews| Index: runtime/vm/object.cc |
| =================================================================== |
| --- runtime/vm/object.cc (revision 26375) |
| +++ runtime/vm/object.cc (working copy) |
| @@ -1887,7 +1887,7 @@ |
| for (; i < desc.PositionalCount(); i++) { |
| invocation.SetParameterTypeAt(i, Type::Handle(Type::DynamicType())); |
| char name[64]; |
| - OS::SNPrint(name, 64, ":p%"Pd, i); |
| + OS::SNPrint(name, 64, ":p%" Pd, i); |
| invocation.SetParameterNameAt(i, String::Handle(Symbols::New(name))); |
| } |
| @@ -3369,7 +3369,7 @@ |
| RawTypeArguments* TypeArguments::New(intptr_t len, Heap::Space space) { |
| if (len < 0 || len > kMaxElements) { |
| // This should be caught before we reach here. |
| - FATAL1("Fatal error in TypeArguments::New: invalid len %"Pd"\n", len); |
| + FATAL1("Fatal error in TypeArguments::New: invalid len %" Pd "\n", len); |
| } |
| TypeArguments& result = TypeArguments::Handle(); |
| { |
| @@ -3697,7 +3697,7 @@ |
| } |
| if (FLAG_trace_disabling_optimized_code) { |
| - OS::Print("Disabling optimized code: '%s' entry: %#"Px"\n", |
| + OS::Print("Disabling optimized code: '%s' entry: %#" Px "\n", |
| ToFullyQualifiedCString(), |
| current_code.EntryPoint()); |
| } |
| @@ -4173,7 +4173,7 @@ |
| char message_buffer[kMessageBufferSize]; |
| OS::SNPrint(message_buffer, |
| kMessageBufferSize, |
| - "%"Pd" named passed, at most %"Pd" expected", |
| + "%" Pd " named passed, at most %" Pd " expected", |
| num_named_arguments, |
| NumOptionalNamedParameters()); |
| *error_message = String::New(message_buffer); |
| @@ -4191,7 +4191,7 @@ |
| const intptr_t num_hidden_params = NumImplicitParameters(); |
| OS::SNPrint(message_buffer, |
| kMessageBufferSize, |
| - "%"Pd"%s passed, %s%"Pd" expected", |
| + "%" Pd "%s passed, %s%" Pd " expected", |
| num_pos_args - num_hidden_params, |
| num_opt_pos_params > 0 ? " positional" : "", |
| num_opt_pos_params > 0 ? "at most " : "", |
| @@ -4208,7 +4208,7 @@ |
| const intptr_t num_hidden_params = NumImplicitParameters(); |
| OS::SNPrint(message_buffer, |
| kMessageBufferSize, |
| - "%"Pd"%s passed, %s%"Pd" expected", |
| + "%" Pd "%s passed, %s%" Pd " expected", |
| num_pos_args - num_hidden_params, |
| num_opt_pos_params > 0 ? " positional" : "", |
| num_opt_pos_params > 0 ? "at least " : "", |
| @@ -5749,7 +5749,7 @@ |
| RawTokenStream* TokenStream::New(intptr_t len) { |
| if (len < 0 || len > kMaxElements) { |
| // This should be caught before we reach here. |
| - FATAL1("Fatal error in TokenStream::New: invalid len %"Pd"\n", len); |
| + FATAL1("Fatal error in TokenStream::New: invalid len %" Pd "\n", len); |
| } |
| uint8_t* data = reinterpret_cast<uint8_t*>(::malloc(len)); |
| ASSERT(data != NULL); |
| @@ -7720,7 +7720,7 @@ |
| ASSERT(Object::instructions_class() != Class::null()); |
| if (size < 0 || size > kMaxElements) { |
| // This should be caught before we reach here. |
| - FATAL1("Fatal error in Instructions::New: invalid size %"Pd"\n", size); |
| + FATAL1("Fatal error in Instructions::New: invalid size %" Pd "\n", size); |
| } |
| Instructions& result = Instructions::Handle(); |
| { |
| @@ -7814,7 +7814,7 @@ |
| if (num_descriptors < 0 || num_descriptors > kMaxElements) { |
| // This should be caught before we reach here. |
| FATAL1("Fatal error in PcDescriptors::New: " |
| - "invalid num_descriptors %"Pd"\n", num_descriptors); |
| + "invalid num_descriptors %" Pd "\n", num_descriptors); |
| } |
| PcDescriptors& result = PcDescriptors::Handle(); |
| { |
| @@ -7869,7 +7869,7 @@ |
| // "*" in a printf format specifier tells it to read the field width from |
| // the printf argument list. |
| const char* kFormat = |
| - "%#-*"Px"\t%s\t%"Pd"\t\t%"Pd"\t%"Pd"\n"; |
| + "%#-*" Px "\t%s\t%" Pd "\t\t%" Pd "\t%" Pd "\n"; |
| // First compute the buffer size required. |
| intptr_t len = 1; // Trailing '\0'. |
| for (intptr_t i = 0; i < Length(); i++) { |
| @@ -7913,7 +7913,7 @@ |
| // the check for too large number of descriptors. |
| if (Length() > 3000) { |
| if (FLAG_trace_compiler) { |
| - OS::Print("Not checking pc decriptors, length %"Pd"\n", Length()); |
| + OS::Print("Not checking pc decriptors, length %" Pd "\n", Length()); |
| } |
| return; |
| } |
| @@ -8001,7 +8001,7 @@ |
| (payload_size > |
| (kSmiMax - static_cast<intptr_t>(sizeof(RawStackmap))))) { |
| // This should be caught before we reach here. |
| - FATAL1("Fatal error in Stackmap::New: invalid length %"Pd"\n", |
| + FATAL1("Fatal error in Stackmap::New: invalid length %" Pd "\n", |
| length); |
| } |
| { |
| @@ -8031,7 +8031,7 @@ |
| if (IsNull()) { |
| return "{null}"; |
| } else { |
| - const char* kFormat = "%#"Px": "; |
| + const char* kFormat = "%#" Px ": "; |
| intptr_t fixed_length = OS::SNPrint(NULL, 0, kFormat, PC()) + 1; |
| Isolate* isolate = Isolate::Current(); |
| // Guard against integer overflow in the computation of alloc_size. |
| @@ -8039,7 +8039,7 @@ |
| // TODO(kmillikin): We could just truncate the string if someone |
| // tries to print a 2 billion plus entry stackmap. |
| if (Length() > (kIntptrMax - fixed_length)) { |
| - FATAL1("Length() is unexpectedly large (%"Pd")", Length()); |
| + FATAL1("Length() is unexpectedly large (%" Pd ")", Length()); |
| } |
| intptr_t alloc_size = fixed_length + Length(); |
| char* chars = isolate->current_zone()->Alloc<char>(alloc_size); |
| @@ -8090,7 +8090,7 @@ |
| const char* LocalVarDescriptors::ToCString() const { |
| intptr_t len = 1; // Trailing '\0'. |
| const char* kFormat = |
| - "%2"Pd" kind=%d scope=0x%04x begin=%"Pd" end=%"Pd" name=%s\n"; |
| + "%2" Pd " kind=%d scope=0x%04x begin=%" Pd " end=%" Pd " name=%s\n"; |
| for (intptr_t i = 0; i < Length(); i++) { |
| String& var_name = String::Handle(GetName(i)); |
| RawLocalVarDescriptors::VarInfo info; |
| @@ -8135,7 +8135,7 @@ |
| if (num_variables < 0 || num_variables > kMaxElements) { |
| // This should be caught before we reach here. |
| FATAL1("Fatal error in LocalVarDescriptors::New: " |
| - "invalid num_variables %"Pd"\n", num_variables); |
| + "invalid num_variables %" Pd "\n", num_variables); |
| } |
| LocalVarDescriptors& result = LocalVarDescriptors::Handle(); |
| { |
| @@ -8221,7 +8221,7 @@ |
| ASSERT(Object::exception_handlers_class() != Class::null()); |
| if (num_handlers < 0 || num_handlers >= kMaxHandlers) { |
| FATAL1("Fatal error in ExceptionHandlers::New(): " |
| - "invalid num_handlers %"Pd"\n", |
| + "invalid num_handlers %" Pd "\n", |
| num_handlers); |
| } |
| ExceptionHandlers& result = ExceptionHandlers::Handle(); |
| @@ -8248,7 +8248,7 @@ |
| Type& type = Type::Handle(); |
| RawExceptionHandlers::HandlerInfo info; |
| // First compute the buffer size required. |
| - const char* kFormat = "%"Pd" => %#"Px" (%"Pd" types) (outer %"Pd")\n"; |
| + const char* kFormat = "%" Pd " => %#" Px " (%" Pd " types) (outer %" Pd ")\n"; |
|
siva
2013/08/20 19:54:51
const char* kFormat = "%" Pd " => %#" Px " (%" Pd
Jacob
2013/08/20 20:32:15
Done.
|
| const char* kFormat2 = " %d. %s\n"; |
| intptr_t len = 1; // Trailing '\0'. |
| for (intptr_t i = 0; i < Length(); i++) { |
| @@ -8434,7 +8434,7 @@ |
| Comments* comments; |
| if (count < 0 || count > (kIntptrMax / kNumberOfEntries)) { |
| // This should be caught before we reach here. |
| - FATAL1("Fatal error in Code::Comments::New: invalid count %"Pd"\n", count); |
| + FATAL1("Fatal error in Code::Comments::New: invalid count %" Pd "\n", count); |
|
siva
2013/08/20 19:54:51
FATAL1("Fatal error in Code::Comments::New: invali
Jacob
2013/08/20 20:32:15
Done.
|
| } |
| if (count == 0) { |
| comments = new Comments(Object::empty_array()); |
| @@ -8608,7 +8608,7 @@ |
| RawCode* Code::New(intptr_t pointer_offsets_length) { |
| if (pointer_offsets_length < 0 || pointer_offsets_length > kMaxElements) { |
| // This should be caught before we reach here. |
| - FATAL1("Fatal error in Code::New: invalid pointer_offsets_length %"Pd"\n", |
| + FATAL1("Fatal error in Code::New: invalid pointer_offsets_length %" Pd "\n", |
| pointer_offsets_length); |
| } |
| ASSERT(Object::code_class() != Class::null()); |
| @@ -8898,7 +8898,7 @@ |
| if (num_variables < 0 || num_variables > kMaxElements) { |
| // This should be caught before we reach here. |
| - FATAL1("Fatal error in Context::New: invalid num_variables %"Pd"\n", |
| + FATAL1("Fatal error in Context::New: invalid num_variables %" Pd "\n", |
| num_variables); |
| } |
| Context& result = Context::Handle(); |
| @@ -8930,7 +8930,7 @@ |
| ASSERT(Object::context_scope_class() != Class::null()); |
| if (num_variables < 0 || num_variables > kMaxElements) { |
| // This should be caught before we reach here. |
| - FATAL1("Fatal error in ContextScope::New: invalid num_variables %"Pd"\n", |
| + FATAL1("Fatal error in ContextScope::New: invalid num_variables %" Pd "\n", |
| num_variables); |
| } |
| intptr_t size = ContextScope::InstanceSize(num_variables); |
| @@ -9047,7 +9047,7 @@ |
| const char* ICData::ToCString() const { |
| - const char* kFormat = "ICData target:'%s' num-args: %"Pd" num-checks: %"Pd""; |
| + const char* kFormat = "ICData target:'%s' num-args: %" Pd " num-checks: %" Pd ""; |
|
siva
2013/08/20 19:54:51
const char* kFormat = "ICData target:'%s' num-args
Jacob
2013/08/20 20:32:15
Done.
|
| const String& name = String::Handle(target_name()); |
| const intptr_t num_args = num_args_tested(); |
| const intptr_t num_checks = NumberOfChecks(); |
| @@ -12283,7 +12283,7 @@ |
| RawBigint* Bigint::Allocate(intptr_t length, Heap::Space space) { |
| if (length < 0 || length > kMaxElements) { |
| // This should be caught before we reach here. |
| - FATAL1("Fatal error in Bigint::Allocate: invalid length %"Pd"\n", length); |
| + FATAL1("Fatal error in Bigint::Allocate: invalid length %" Pd "\n", length); |
| } |
| ASSERT(Isolate::Current()->object_store()->bigint_class() != Class::null()); |
| Bigint& result = Bigint::Handle(); |
| @@ -13206,7 +13206,7 @@ |
| Class::null()); |
| if (len < 0 || len > kMaxElements) { |
| // This should be caught before we reach here. |
| - FATAL1("Fatal error in OneByteString::New: invalid len %"Pd"\n", len); |
| + FATAL1("Fatal error in OneByteString::New: invalid len %" Pd "\n", len); |
| } |
| { |
| RawObject* raw = Object::Allocate(OneByteString::kClassId, |
| @@ -13383,7 +13383,7 @@ |
| ASSERT(Isolate::Current()->object_store()->two_byte_string_class()); |
| if (len < 0 || len > kMaxElements) { |
| // This should be caught before we reach here. |
| - FATAL1("Fatal error in TwoByteString::New: invalid len %"Pd"\n", len); |
| + FATAL1("Fatal error in TwoByteString::New: invalid len %" Pd "\n", len); |
| } |
| String& result = String::Handle(); |
| { |
| @@ -13512,7 +13512,7 @@ |
| external_one_byte_string_class() != Class::null()); |
| if (len < 0 || len > kMaxElements) { |
| // This should be caught before we reach here. |
| - FATAL1("Fatal error in ExternalOneByteString::New: invalid len %"Pd"\n", |
| + FATAL1("Fatal error in ExternalOneByteString::New: invalid len %" Pd "\n", |
| len); |
| } |
| String& result = String::Handle(); |
| @@ -13550,7 +13550,7 @@ |
| Class::null()); |
| if (len < 0 || len > kMaxElements) { |
| // This should be caught before we reach here. |
| - FATAL1("Fatal error in ExternalTwoByteString::New: invalid len %"Pd"\n", |
| + FATAL1("Fatal error in ExternalTwoByteString::New: invalid len %" Pd "\n", |
| len); |
| } |
| String& result = String::Handle(); |
| @@ -13649,7 +13649,7 @@ |
| RawArray* Array::New(intptr_t class_id, intptr_t len, Heap::Space space) { |
| if (len < 0 || len > Array::kMaxElements) { |
| // This should be caught before we reach here. |
| - FATAL1("Fatal error in Array::New: invalid len %"Pd"\n", len); |
| + FATAL1("Fatal error in Array::New: invalid len %" Pd "\n", len); |
| } |
| Array& result = Array::Handle(); |
| { |
| @@ -13676,8 +13676,8 @@ |
| if (IsNull()) { |
| return IsImmutable() ? "ImmutableArray NULL" : "Array NULL"; |
| } |
| - const char* format = !IsImmutable() ? "Array len:%"Pd"" : |
| - "Immutable Array len:%"Pd""; |
| + const char* format = !IsImmutable() ? "Array len:%" Pd "" : |
| + "Immutable Array len:%" Pd ""; |
| intptr_t len = OS::SNPrint(NULL, 0, format, Length()) + 1; |
| char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
| OS::SNPrint(chars, len, format, Length()); |
| @@ -13756,7 +13756,7 @@ |
| this->SetAt(i, obj); |
| } else { |
| ASSERT(error_str != NULL); |
| - const char* kFormat = "element at index %"Pd": %s\n"; |
| + const char* kFormat = "element at index %" Pd ": %s\n"; |
| const intptr_t len = |
| OS::SNPrint(NULL, 0, kFormat, i, obj.ToCString()) + 1; |
| char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
| @@ -13888,7 +13888,7 @@ |
| if (IsNull()) { |
| return "GrowableObjectArray NULL"; |
| } |
| - const char* format = "GrowableObjectArray len:%"Pd""; |
| + const char* format = "GrowableObjectArray len:%" Pd ""; |
| intptr_t len = OS::SNPrint(NULL, 0, format, Length()) + 1; |
| char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
| OS::SNPrint(chars, len, format, Length()); |
| @@ -14494,7 +14494,7 @@ |
| Class::null()); |
| if (len < 0 || len > kMaxElements) { |
| // This should be caught before we reach here. |
| - FATAL1("Fatal error in JSRegexp::New: invalid len %"Pd"\n", len); |
| + FATAL1("Fatal error in JSRegexp::New: invalid len %" Pd "\n", len); |
| } |
| JSRegExp& result = JSRegExp::Handle(); |
| { |