diff options
| -rw-r--r-- | src/compiler/Compiler.h | 6 | ||||
| -rw-r--r-- | src/compiler/Dataflow.cc | 16 | ||||
| -rw-r--r-- | src/compiler/Frontend.cc | 4 | ||||
| -rw-r--r-- | src/compiler/codegen/arm/MethodCodegenDriver.cc | 4 | ||||
| -rw-r--r-- | src/dalvik_system_Zygote.cc | 2 | ||||
| -rw-r--r-- | src/hprof/hprof.cc | 6 | ||||
| -rw-r--r-- | src/hprof/hprof.h | 20 | ||||
| -rw-r--r-- | src/hprof/hprof_record.cc | 10 | ||||
| -rw-r--r-- | src/oatopt.cc | 2 | ||||
| -rw-r--r-- | src/runtime.cc | 6 | ||||
| -rw-r--r-- | src/utils.cc | 4 | ||||
| -rw-r--r-- | src/zip_archive.h | 2 |
12 files changed, 41 insertions, 41 deletions
diff --git a/src/compiler/Compiler.h b/src/compiler/Compiler.h index 917e3fda03..d16735c621 100644 --- a/src/compiler/Compiler.h +++ b/src/compiler/Compiler.h @@ -119,11 +119,11 @@ bool oatFindInductionVariables(struct CompilationUnit* cUnit, /* Clear the visited flag for each BB */ bool oatClearVisitedFlag(struct CompilationUnit* cUnit, struct BasicBlock* bb); -char *oatGetDalvikDisassembly(const DecodedInstruction* insn, +char* oatGetDalvikDisassembly(const DecodedInstruction* insn, const char* note); -char *oatFullDisassembler(const struct CompilationUnit* cUnit, +char* oatFullDisassembler(const struct CompilationUnit* cUnit, const struct MIR* mir); -char *oatGetSSAString(struct CompilationUnit* cUnit, +char* oatGetSSAString(struct CompilationUnit* cUnit, struct SSARepresentation* ssaRep); void oatDataFlowAnalysisDispatcher(struct CompilationUnit* cUnit, bool (*func)(struct CompilationUnit* , struct BasicBlock*), diff --git a/src/compiler/Dataflow.cc b/src/compiler/Dataflow.cc index 8b92c86970..67d900e200 100644 --- a/src/compiler/Dataflow.cc +++ b/src/compiler/Dataflow.cc @@ -1587,7 +1587,7 @@ int oatConvertSSARegToDalvik(const CompilationUnit* cUnit, int ssaReg) * and subscript pair. Each SSA register can be used to index the * ssaToDalvikMap list to get the subscript[31..16]/dalvik_reg[15..0] mapping. */ -char *oatGetDalvikDisassembly(const DecodedInstruction* insn, +char* oatGetDalvikDisassembly(const DecodedInstruction* insn, const char* note) { char buffer[256]; @@ -1668,12 +1668,12 @@ char *oatGetDalvikDisassembly(const DecodedInstruction* insn, } } int length = strlen(buffer) + 1; - ret = (char *)oatNew(length, false); + ret = (char*)oatNew(length, false); memcpy(ret, buffer, length); return ret; } -char *getSSAName(const CompilationUnit* cUnit, int ssaReg, char* name) +char* getSSAName(const CompilationUnit* cUnit, int ssaReg, char* name) { int ssa2DalvikValue = oatConvertSSARegToDalvik(cUnit, ssaReg); @@ -1685,7 +1685,7 @@ char *getSSAName(const CompilationUnit* cUnit, int ssaReg, char* name) /* * Dalvik instruction disassembler with optional SSA printing. */ -char *oatFullDisassembler(const CompilationUnit* cUnit, +char* oatFullDisassembler(const CompilationUnit* cUnit, const MIR* mir) { char buffer[256]; @@ -1693,7 +1693,7 @@ char *oatFullDisassembler(const CompilationUnit* cUnit, const DecodedInstruction *insn = &mir->dalvikInsn; int opcode = insn->opcode; int dfAttributes = oatDataFlowAttributes[opcode]; - char *ret; + char* ret; int length; OpcodeFlags flags; @@ -1804,7 +1804,7 @@ char *oatFullDisassembler(const CompilationUnit* cUnit, done: length = strlen(buffer) + 1; - ret = (char *) oatNew(length, false); + ret = (char*) oatNew(length, false); memcpy(ret, buffer, length); return ret; } @@ -1814,7 +1814,7 @@ done: * and subscript pair. Each SSA register can be used to index the * ssaToDalvikMap list to get the subscript[31..16]/dalvik_reg[15..0] mapping. */ -char *oatGetSSAString(CompilationUnit* cUnit, SSARepresentation* ssaRep) +char* oatGetSSAString(CompilationUnit* cUnit, SSARepresentation* ssaRep) { char buffer[256]; char* ret; @@ -1846,7 +1846,7 @@ char *oatGetSSAString(CompilationUnit* cUnit, SSARepresentation* ssaRep) } int length = strlen(buffer) + 1; - ret = (char *)oatNew(length, false); + ret = (char*)oatNew(length, false); memcpy(ret, buffer, length); return ret; } diff --git a/src/compiler/Frontend.cc b/src/compiler/Frontend.cc index 57d4616d84..89f63bec04 100644 --- a/src/compiler/Frontend.cc +++ b/src/compiler/Frontend.cc @@ -74,7 +74,7 @@ STATIC inline int parseInsn(const u2* codePtr, DecodedInstruction* decInsn, dexDecodeInstruction(codePtr, decInsn); if (printMe) { - char *decodedString = oatGetDalvikDisassembly(decInsn, NULL); + char* decodedString = oatGetDalvikDisassembly(decInsn, NULL); LOG(INFO) << codePtr << ": 0x" << std::hex << (int)opcode << " " << decodedString; } @@ -218,7 +218,7 @@ void oatDumpCFG(CompilationUnit* cUnit, const char* dirPrefix) std::string name = art::PrettyMethod(cUnit->method_idx, *cUnit->dex_file); char startOffset[80]; sprintf(startOffset, "_%x", cUnit->entryBlock->fallThrough->startOffset); - char* fileName = (char *) oatNew( + char* fileName = (char*) oatNew( strlen(dirPrefix) + name.length() + strlen(".dot") + 1, true); diff --git a/src/compiler/codegen/arm/MethodCodegenDriver.cc b/src/compiler/codegen/arm/MethodCodegenDriver.cc index 7a719f799e..15fd1ba841 100644 --- a/src/compiler/codegen/arm/MethodCodegenDriver.cc +++ b/src/compiler/codegen/arm/MethodCodegenDriver.cc @@ -1822,7 +1822,7 @@ STATIC bool compileDalvikInstruction(CompilationUnit* cUnit, MIR* mir, return res; } -STATIC const char *extendedMIROpNames[kMirOpLast - kMirOpFirst] = { +STATIC const char* extendedMIROpNames[kMirOpLast - kMirOpFirst] = { "kMirOpPhi", "kMirOpNullNRangeUpCheck", "kMirOpNullNRangeDownCheck", @@ -2031,7 +2031,7 @@ STATIC bool methodBlockCodeGen(CompilationUnit* cUnit, BasicBlock* bb) /* Don't generate the SSA annotation unless verbose mode is on */ if (cUnit->printMe && mir->ssaRep) { - char *ssaString = oatGetSSAString(cUnit, mir->ssaRep); + char* ssaString = oatGetSSAString(cUnit, mir->ssaRep); newLIR1(cUnit, kArmPseudoSSARep, (int) ssaString); } diff --git a/src/dalvik_system_Zygote.cc b/src/dalvik_system_Zygote.cc index 00a011cbbd..cd3f656e99 100644 --- a/src/dalvik_system_Zygote.cc +++ b/src/dalvik_system_Zygote.cc @@ -42,7 +42,7 @@ void Zygote_nativeExecShell(JNIEnv* env, jclass, jstring javaCommand) { if (command.c_str() == NULL) { return; } - const char *argp[] = {_PATH_BSHELL, "-c", command.c_str(), NULL}; + const char* argp[] = {_PATH_BSHELL, "-c", command.c_str(), NULL}; LOG(INFO) << "Exec: " << argp[0] << ' ' << argp[1] << ' ' << argp[2]; execv(_PATH_BSHELL, (char**)argp); diff --git a/src/hprof/hprof.cc b/src/hprof/hprof.cc index 47d31fce3a..3c5227fa70 100644 --- a/src/hprof/hprof.cc +++ b/src/hprof/hprof.cc @@ -49,7 +49,7 @@ namespace hprof { /* * Initialize an Hprof. */ -Hprof::Hprof(const char *outputFileName, int fd, bool writeHeader, bool directToDdms) +Hprof::Hprof(const char* outputFileName, int fd, bool writeHeader, bool directToDdms) : current_record_(), gc_thread_serial_number_(0), gc_scan_state_(0), @@ -78,7 +78,7 @@ Hprof::Hprof(const char *outputFileName, int fd, bool writeHeader, bool directTo fd_ = fd; current_record_.alloc_length_ = 128; - current_record_.body_ = (unsigned char *)malloc(current_record_.alloc_length_); + current_record_.body_ = (unsigned char*)malloc(current_record_.alloc_length_); // TODO check for/return an error if (writeHeader) { @@ -147,7 +147,7 @@ int Hprof::FlushCurrentRecord() { // The ID for the synthetic object generated to account for class static overhead. #define CLASS_STATICS_ID(clazz) ((HprofObjectId)(((uint32_t)(clazz)) | 1)) -HprofBasicType Hprof::SignatureToBasicTypeAndSize(const char *sig, size_t *sizeOut) { +HprofBasicType Hprof::SignatureToBasicTypeAndSize(const char* sig, size_t* sizeOut) { char c = sig[0]; HprofBasicType ret; size_t size; diff --git a/src/hprof/hprof.h b/src/hprof/hprof.h index 7378ec9f5b..e999dced54 100644 --- a/src/hprof/hprof.h +++ b/src/hprof/hprof.h @@ -39,7 +39,7 @@ namespace hprof { #define U2_TO_BUF_BE(buf, offset, value) \ do { \ - unsigned char *buf_ = (unsigned char *)(buf); \ + unsigned char* buf_ = (unsigned char*)(buf); \ int offset_ = (int)(offset); \ uint16_t value_ = (uint16_t)(value); \ buf_[offset_ + 0] = (unsigned char)(value_ >> 8); \ @@ -48,7 +48,7 @@ namespace hprof { #define U4_TO_BUF_BE(buf, offset, value) \ do { \ - unsigned char *buf_ = (unsigned char *)(buf); \ + unsigned char* buf_ = (unsigned char*)(buf); \ int offset_ = (int)(offset); \ uint32_t value_ = (uint32_t)(value); \ buf_[offset_ + 0] = (unsigned char)(value_ >> 24); \ @@ -59,7 +59,7 @@ namespace hprof { #define U8_TO_BUF_BE(buf, offset, value) \ do { \ - unsigned char *buf_ = (unsigned char *)(buf); \ + unsigned char* buf_ = (unsigned char*)(buf); \ int offset_ = (int)(offset); \ uint64_t value_ = (uint64_t)(value); \ buf_[offset_ + 0] = (unsigned char)(value_ >> 56); \ @@ -157,9 +157,9 @@ class HprofRecord { int AddU4List(const uint32_t *values, size_t numValues); int AddU8List(const uint64_t *values, size_t numValues); int AddIdList(const HprofObjectId *values, size_t numValues); - int AddUtf8String(const char *str); + int AddUtf8String(const char* str); - unsigned char *body_; + unsigned char* body_; uint32_t time_; uint32_t length_; size_t alloc_length_; @@ -178,7 +178,7 @@ enum HprofHeapId { class Hprof { public: - Hprof(const char *outputFileName, int fd, bool writeHeader, bool directToDdms); + Hprof(const char* outputFileName, int fd, bool writeHeader, bool directToDdms); ~Hprof(); void VisitRoot(const Object* obj); @@ -196,8 +196,8 @@ class Hprof { HprofStringId LookupStringId(const char* string); HprofStringId LookupStringId(std::string string); HprofStringId LookupClassNameId(Class* clazz); - static HprofBasicType SignatureToBasicTypeAndSize(const char *sig, size_t *sizeOut); - static HprofBasicType PrimitiveToBasicTypeAndSize(Primitive::Type prim, size_t *sizeOut); + static HprofBasicType SignatureToBasicTypeAndSize(const char* sig, size_t* sizeOut); + static HprofBasicType PrimitiveToBasicTypeAndSize(Primitive::Type prim, size_t* sizeOut); static int StackTraceSerialNumber(const void *obj); // current_record_ *must* be first so that we can cast from a context to a record. @@ -212,8 +212,8 @@ class Hprof { // Otherwise, "file_name_" must be valid, though if "fd" >= 0 it will // only be used for debug messages. bool direct_to_ddms_; - char *file_name_; - char *file_data_ptr_; // for open_memstream + char* file_name_; + char* file_data_ptr_; // for open_memstream size_t file_data_size_; // for open_memstream FILE *mem_fp_; int fd_; diff --git a/src/hprof/hprof_record.cc b/src/hprof/hprof_record.cc index 1813a44e24..ad4b43c27d 100644 --- a/src/hprof/hprof_record.cc +++ b/src/hprof/hprof_record.cc @@ -55,7 +55,7 @@ int HprofRecord::GuaranteeRecordAppend(size_t nmore) { if (newAllocLen < minSize) { newAllocLen = alloc_length_ + nmore + nmore/2; } - unsigned char *newBody = (unsigned char *)realloc(body_, newAllocLen); + unsigned char* newBody = (unsigned char*)realloc(body_, newAllocLen); if (newBody != NULL) { body_ = newBody; alloc_length_ = newAllocLen; @@ -90,7 +90,7 @@ int HprofRecord::AddU1(uint8_t value) { return 0; } -int HprofRecord::AddUtf8String(const char *str) { +int HprofRecord::AddUtf8String(const char* str) { // The terminating NUL character is NOT written. return AddU1List((const uint8_t *)str, strlen(str)); } @@ -101,7 +101,7 @@ int HprofRecord::AddU2List(const uint16_t *values, size_t numValues) { return err; } - unsigned char *insert = body_ + length_; + unsigned char* insert = body_ + length_; for (size_t i = 0; i < numValues; i++) { U2_TO_BUF_BE(insert, 0, *values++); insert += sizeof(*values); @@ -124,7 +124,7 @@ int HprofRecord::AddU4List(const uint32_t *values, size_t numValues) { return err; } - unsigned char *insert = body_ + length_; + unsigned char* insert = body_ + length_; for (size_t i = 0; i < numValues; i++) { U4_TO_BUF_BE(insert, 0, *values++); insert += sizeof(*values); @@ -147,7 +147,7 @@ int HprofRecord::AddU8List(const uint64_t *values, size_t numValues) { return err; } - unsigned char *insert = body_ + length_; + unsigned char* insert = body_ + length_; for (size_t i = 0; i < numValues; i++) { U8_TO_BUF_BE(insert, 0, *values++); insert += sizeof(*values); diff --git a/src/oatopt.cc b/src/oatopt.cc index dd702d4506..314b7ee44d 100644 --- a/src/oatopt.cc +++ b/src/oatopt.cc @@ -13,7 +13,7 @@ namespace art { -int ProcessZipFile(int zip_fd, int cache_fd, const char* zip_name, const char *flags) { +int ProcessZipFile(int zip_fd, int cache_fd, const char* zip_name, const char* flags) { // TODO: need to read/write to installd opened file descriptors if (false) { UniquePtr<ZipArchive> zip_archive(ZipArchive::Open(zip_fd)); diff --git a/src/runtime.cc b/src/runtime.cc index f52bca84ba..9e6ebb11e9 100644 --- a/src/runtime.cc +++ b/src/runtime.cc @@ -147,12 +147,12 @@ void Runtime::CallExitHook(jint status) { // Returns 0 (a useless size) if "s" is malformed or specifies a low or // non-evenly-divisible value. // -size_t ParseMemoryOption(const char *s, size_t div) { +size_t ParseMemoryOption(const char* s, size_t div) { // strtoul accepts a leading [+-], which we don't want, // so make sure our string starts with a decimal digit. if (isdigit(*s)) { - const char *s2; - size_t val = strtoul(s, (char **)&s2, 10); + const char* s2; + size_t val = strtoul(s, (char**)&s2, 10); if (s2 != s) { // s2 should be pointing just after the number. // If this is the end of the string, the user diff --git a/src/utils.cc b/src/utils.cc index c528f1ca10..63787a8d37 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -496,10 +496,10 @@ void Split(const std::string& s, char delim, std::vector<std::string>& result) { } } -void SetThreadName(const char *threadName) { +void SetThreadName(const char* threadName) { int hasAt = 0; int hasDot = 0; - const char *s = threadName; + const char* s = threadName; while (*s) { if (*s == '.') { hasDot = 1; diff --git a/src/zip_archive.h b/src/zip_archive.h index 17c9ddccbe..013a3da4d9 100644 --- a/src/zip_archive.h +++ b/src/zip_archive.h @@ -105,7 +105,7 @@ class ZipArchive { static ZipArchive* Open(const std::string& filename); static ZipArchive* Open(int fd); - ZipEntry* Find(const char * name); + ZipEntry* Find(const char* name); ~ZipArchive() { Close(); |