*
* All memory-mapped structures are 32-bit aligned unless otherwise noted.
*/
-#ifndef _LIBDEX_CMDUTILS
-#define _LIBDEX_CMDUTILS
+#ifndef LIBDEX_CMDUTILS_H_
+#define LIBDEX_CMDUTILS_H_
/* encode the result of unzipping to a file */
enum UnzipToFileResult {
UnzipToFileResult dexUnzipToFile(const char* zipFileName,
const char* outFileName, bool quiet);
-#endif /*_LIBDEX_CMDUTILS*/
+#endif // LIBDEX_CMDUTILS_H_
* Functions for dealing with try-catch info.
*/
-#ifndef _LIBDEX_DEXCATCH
-#define _LIBDEX_DEXCATCH
+#ifndef LIBDEX_DEXCATCH_H_
+#define LIBDEX_DEXCATCH_H_
#include "DexFile.h"
#include "Leb128.h"
}
}
-#endif
+#endif // LIBDEX_DEXCATCH_H_
* Functions to deal with class definition structures in DEX files
*/
-#ifndef _LIBDEX_DEXCLASS
-#define _LIBDEX_DEXCLASS
+#ifndef LIBDEX_DEXCLASS_H_
+#define LIBDEX_DEXCLASS_H_
#include "DexFile.h"
#include "Leb128.h"
*lastIndex = index;
}
-#endif
+#endif // LIBDEX_DEXCLASS_H_
* Verification-time map of data section items
*/
-#ifndef _LIBDEX_DEXDATAMAP
-#define _LIBDEX_DEXDATAMAP
+#ifndef LIBDEX_DEXDATAMAP_H_
+#define LIBDEX_DEXDATAMAP_H_
#include "DexFile.h"
return dexDataMapVerify(map, offset, type);
}
-#endif /*_LIBDEX_DEXDATAMAP*/
+#endif // LIBDEX_DEXDATAMAP_H_
* Handling of method debug info in a .dex file.
*/
-#ifndef _LIBDEX_DEXDEBUGINFO
-#define _LIBDEX_DEXDEBUGINFO
+#ifndef LIBDEX_DEXDEBUGINFO_H_
+#define LIBDEX_DEXDEBUGINFO_H_
#include "DexFile.h"
DexDebugNewPositionCb posCb, DexDebugNewLocalCb localCb,
void* cnxt);
-#endif /* def _LIBDEX_DEXDEBUGINFO */
+#endif // LIBDEX_DEXDEBUGINFO_H_
* All memory-mapped structures are 32-bit aligned unless otherwise noted.
*/
-#ifndef _LIBDEX_DEXFILE
-#define _LIBDEX_DEXFILE
+#ifndef LIBDEX_DEXFILE_H_
+#define LIBDEX_DEXFILE_H_
#include "vm/Common.h" // basic type defs, e.g. u1/u2/u4/u8, and LOG
#include "libdex/SysUtil.h"
*/
PrimitiveType dexGetPrimitiveTypeFromDescriptorChar(char descriptorChar);
-#endif /*_LIBDEX_DEXFILE*/
+#endif // LIBDEX_DEXFILE_H_
* opcodes and instruction formats.
*/
-#ifndef _LIBDEX_DEXOPCODES
-#define _LIBDEX_DEXOPCODES
+#ifndef LIBDEX_DEXOPCODES_H_
+#define LIBDEX_DEXOPCODES_H_
#include "DexFile.h"
*/
const char* dexGetOpcodeName(Opcode op);
-#endif /*_LIBDEX_DEXOPCODES*/
+#endif // LIBDEX_DEXOPCODES_H_
* Functions for dealing with method prototypes
*/
-#ifndef _LIBDEX_DEXPROTO
-#define _LIBDEX_DEXPROTO
+#ifndef LIBDEX_DEXPROTO_H_
+#define LIBDEX_DEXPROTO_H_
#include "DexFile.h"
const char* dexParameterIteratorNextDescriptor(
DexParameterIterator* pIterator);
-#endif /*_LIBDEX_DEXPROTO*/
+#endif // LIBDEX_DEXPROTO_H_
* Validate and manipulate MUTF-8 (modified UTF-8) encoded string data.
*/
-#ifndef _LIBDEX_DEXUTF
-#define _LIBDEX_DEXUTF
+#ifndef LIBDEX_DEXUTF_H_
+#define LIBDEX_DEXUTF_H_
#include "DexFile.h"
* is for anything but "void". */
bool dexIsFieldDescriptor(const char* s);
-#endif /* def _LIBDEX_DEXUTF */
+#endif // LIBDEX_DEXUTF_H_
/*
* Dalvik instruction utility functions.
*/
-#ifndef _LIBDEX_INSTRUTILS
-#define _LIBDEX_INSTRUTILS
+#ifndef LIBDEX_INSTRUTILS_H_
+#define LIBDEX_INSTRUTILS_H_
#include "DexFile.h"
#include "DexOpcodes.h"
*/
void dexDecodeInstruction(const u2* insns, DecodedInstruction* pDec);
-#endif /*_LIBDEX_INSTRUTILS*/
+#endif // LIBDEX_INSTRUTILS_H_
* Functions for interpreting LEB128 (little endian base 128) values
*/
-#ifndef _LIBDEX_LEB128
-#define _LIBDEX_LEB128
+#ifndef LIBDEX_LEB128_H_
+#define LIBDEX_LEB128_H_
#include "DexFile.h"
/*
* Utility functions related to "dexopt".
*/
-#ifndef _LIBDEX_OPTINVOCATION
-#define _LIBDEX_OPTINVOCATION
+#ifndef LIBDEX_OPTINVOCATION_H_
+#define LIBDEX_OPTINVOCATION_H_
/*
* Utility routines, used by the VM.
const char* subFileName);
int dexOptCreateEmptyHeader(int fd);
-#endif /*_LIBDEX_OPTINVOCATION*/
+#endif // LIBDEX_OPTINVOCATION_H_
/*
* System utilities.
*/
-#ifndef _LIBDEX_SYSUTIL
-#define _LIBDEX_SYSUTIL
+#ifndef LIBDEX_SYSUTIL_H_
+#define LIBDEX_SYSUTIL_H_
#include <sys/types.h>
*/
int sysCopyFileToFile(int outFd, int inFd, size_t count);
-#endif /*_DALVIK_SYSUTIL*/
+#endif // LIBDEX_SYSUTIL_H_
/*
* Read-only access to Zip archives, with minimal heap allocation.
*/
-#ifndef _LIBDEX_ZIPARCHIVE
-#define _LIBDEX_ZIPARCHIVE
+#ifndef LIBDEX_ZIPARCHIVE_H_
+#define LIBDEX_ZIPARCHIVE_H_
#include "SysUtil.h"
#include "DexFile.h" // need DEX_INLINE
u4 dexInitCrc32(void);
u4 dexComputeCrc32(u4 crc, const void* buf, size_t len);
-#endif /*_LIBDEX_ZIPARCHIVE*/
+#endif // LIBDEX_ZIPARCHIVE_H_
/*
* See "sha1.cpp" for author info.
*/
-#ifndef _DALVIK_SHA1
-#define _DALVIK_SHA1
+#ifndef LIBDEX_SHA1_H_
+#define LIBDEX_SHA1_H_
struct SHA1_CTX {
unsigned long state[5];
unsigned long len);
void SHA1Final(unsigned char digest[HASHSIZE], SHA1_CTX* context);
-#endif /*_DALVIK_SHA1*/
+#endif // LIBDEX_SHA1_H_
* This file may be included by C or C++ code, which is trouble because jni.h
* uses different typedefs for JNIEnv in each language.
*/
-#ifndef _NATIVEHELPER_JNIHELP_H
-#define _NATIVEHELPER_JNIHELP_H
+#ifndef NATIVEHELPER_JNIHELP_H_
+#define NATIVEHELPER_JNIHELP_H_
#include "jni.h"
#include "cutils/log.h"
_rc; })
#endif
-#endif /*_NATIVEHELPER_JNIHELP_H*/
+#endif /* NATIVEHELPER_JNIHELP_H_ */
* Everything here is expected to be VM-neutral.
*/
-#ifndef _JNI_H
-#define _JNI_H
+#ifndef JNI_H_
+#define JNI_H_
#include <stdarg.h>
#define JNIEXPORT
#define JNICALL
-#endif /*_JNI_H*/
+#endif /* JNI_H_ */
/*
* Allocation tracking and reporting.
*/
-#ifndef _DALVIK_ALLOCTRACKER
-#define _DALVIK_ALLOCTRACKER
+#ifndef DALVIK_ALLOCTRACKER_H_
+#define DALVIK_ALLOCTRACKER_H_
/* initialization */
bool dvmAllocTrackerStartup(void);
*/
void dvmDumpTrackedAllocations(bool enable);
-#endif /*_DALVIK_ALLOCTRACKER*/
+#endif // DALVIK_ALLOCTRACKER_H_
/*
* Atomic operations
*/
-#ifndef _DALVIK_ATOMIC
-#define _DALVIK_ATOMIC
+#ifndef DALVIK_ATOMIC_H_
+#define DALVIK_ATOMIC_H_
#include <cutils/atomic.h> /* use common Android atomic ops */
#include <cutils/atomic-inline.h> /* and some uncommon ones */
int dvmQuasiAtomicCas64(int64_t oldvalue, int64_t newvalue,
volatile int64_t* addr);
-#endif /*_DALVIK_ATOMIC*/
+#endif // DALVIK_ATOMIC_H_
/*
* Mutex-free cache for key1+key2=value.
*/
-#ifndef _DALVIK_ATOMICCACHE
-#define _DALVIK_ATOMICCACHE
+#ifndef DALVIK_ATOMICCACHE_H_
+#define DALVIK_ATOMICCACHE_H_
/*
* If set to "1", gather some stats on our caching success rate.
*/
void dvmDumpAtomicCacheStats(const AtomicCache* pCache);
-#endif /*_DALVIK_ATOMICCACHE*/
+#endif // DALVIK_ATOMICCACHE_H_
/*
* Miscellaneous utility functions.
*/
-#ifndef _DALVIK_BITVECTOR
-#define _DALVIK_BITVECTOR
+#ifndef DALVIK_BITVECTOR_H_
+#define DALVIK_BITVECTOR_H_
/*
* Expanding bitmap, used for tracking resources. Bits are numbered starting
/* Return the next position set to 1. -1 means end-of-vector reached */
int dvmBitVectorIteratorNext(BitVectorIterator* iterator);
-#endif /*_DALVIK_BITVECTOR*/
+#endif // DALVIK_BITVECTOR_H_
*
* These get inlined, so prefer small size over maximum speed.
*/
-#ifndef _DALVIK_BITS
-#define _DALVIK_BITS
+#ifndef DALVIK_BITS_H_
+#define DALVIK_BITS_H_
#include "Common.h"
#include "Inlines.h"
memcpy(buf + sizeof(u4), str, strLen);
}
-#endif /*_DALVIK_BITS*/
+#endif // DALVIK_BITS_H_
/*
* Common defines for all Dalvik code.
*/
-#ifndef _DALVIK_COMMON
-#define _DALVIK_COMMON
+#ifndef DALVIK_COMMON_H_
+#define DALVIK_COMMON_H_
#ifndef LOG_TAG
# define LOG_TAG "dalvikvm"
#define NELEM(x) ((int) (sizeof(x) / sizeof((x)[0])))
-#endif /*_DALVIK_COMMON*/
+#endif // DALVIK_COMMON_H_
/*
* All-inclusive internal header file. Include this to get everything useful.
*/
-#ifndef _DALVIK_DALVIK
-#define _DALVIK_DALVIK
+#ifndef DALVIK_DALVIK_H_
+#define DALVIK_DALVIK_H_
#include "Common.h"
#include "Inlines.h"
#include "InlineNative.h"
#include "oo/ObjectInlines.h"
-#endif /*_DALVIK_DALVIK*/
+#endif // DALVIK_DALVIK_H_
/*
* Dalvik VM version info.
*/
-#ifndef _DALVIK_VERSION
-#define _DALVIK_VERSION
+#ifndef DALVIK_VERSION_H_
+#define DALVIK_VERSION_H_
/*
* The version we show to tourists.
*/
#define DALVIK_VM_BUILD 27
-#endif /*_DALVIK_VERSION*/
+#endif // DALVIK_VERSION_H_
/*
* Dalvik Debug Monitor
*/
-#ifndef _DALVIK_DDM
-#define _DALVIK_DDM
+#ifndef DALVIK_DDM_H_
+#define DALVIK_DDM_H_
/*
* Handle a packet full of DDM goodness.
*/
ArrayObject* dvmDdmGetRecentAllocations(void);
-#endif /*_DALVIK_DDM*/
+#endif // DALVIK_DDM_H_
* Dalvik-specific side of debugger support. (The JDWP code is intended to
* be relatively generic.)
*/
-#ifndef _DALVIK_DEBUGGER
-#define _DALVIK_DEBUGGER
+#ifndef DALVIK_DEBUGGER_H_
+#define DALVIK_DEBUGGER_H_
#include <pthread.h>
#include "Common.h"
#define CHUNK_TYPE(_name) \
((_name)[0] << 24 | (_name)[1] << 16 | (_name)[2] << 8 | (_name)[3])
-#endif /*_DALVIK_DEBUGGER*/
+#endif // DALVIK_DEBUGGER_H_
* The VM wraps some additional data structures around the DexFile. These
* are defined here.
*/
-#ifndef _DALVIK_DVMDEX
-#define _DALVIK_DVMDEX
+#ifndef DALVIK_DVMDEX_H_
+#define DALVIK_DVMDEX_H_
#include "libdex/DexFile.h"
pDvmDex->pResFields[fieldIdx] = field;
}
-#endif /*_DALVIK_DVMDEX*/
+#endif // DALVIK_DVMDEX_H_
/*
* Exception handling.
*/
-#ifndef _DALVIK_EXCEPTION
-#define _DALVIK_EXCEPTION
+#ifndef DALVIK_EXCEPTION_H_
+#define DALVIK_EXCEPTION_H_
/*
* Create a Throwable and throw an exception in the current thread (where
*/
void dvmThrowVirtualMachineError(const char* msg);
-#endif /*_DALVIK_EXCEPTION*/
+#endif // DALVIK_EXCEPTION_H_
* accessed through a Thread field). May need to pass it around for some
* of the early initialization functions.
*/
-#ifndef _DALVIK_GLOBALS
-#define _DALVIK_GLOBALS
+#ifndef DALVIK_GLOBALS_H_
+#define DALVIK_GLOBALS_H_
#include <string>
#include <vector>
extern struct DvmJniGlobals gDvmJni;
-#endif /*_DALVIK_GLOBALS*/
+#endif // DALVIK_GLOBALS_H_
* When the number of elements reaches a certain percentage of the table's
* capacity, the table will be resized.
*/
-#ifndef _DALVIK_HASH
-#define _DALVIK_HASH
+#ifndef DALVIK_HASH_H_
+#define DALVIK_HASH_H_
/* compute the hash of an item with a specific type */
typedef u4 (*HashCompute)(const void* item);
void dvmHashTableProbeCount(HashTable* pHashTable, HashCalcFunc calcFunc,
HashCompareFunc cmpFunc);
-#endif /*_DALVIK_HASH*/
+#endif // DALVIK_HASH_H_
* limitations under the License.
*/
-#ifndef _DALVIK_INDIRECTREFTABLE
-#define _DALVIK_INDIRECTREFTABLE
+#ifndef DALVIK_INDIRECTREFTABLE_H_
+#define DALVIK_INDIRECTREFTABLE_H_
/*
* Maintain a table of indirect references. Used for local/global JNI
*/
void dvmDumpIndirectRefTable(const IndirectRefTable* pRef, const char* descr);
-#endif /*_DALVIK_INDIRECTREFTABLE*/
+#endif // DALVIK_INDIRECTREFTABLE_H_
/*
* VM initialization and shutdown.
*/
-#ifndef _DALVIK_INIT
-#define _DALVIK_INIT
+#ifndef DALVIK_INIT_H_
+#define DALVIK_INIT_H_
/*
* Standard VM initialization, usually invoked through JNI.
#endif
;
-#endif /*_DALVIK_INIT*/
+#endif // DALVIK_INIT_H_
/*
* Inlined native functions.
*/
-#ifndef _DALVIK_INLINENATIVE
-#define _DALVIK_INLINENATIVE
+#ifndef DALVIK_INLINENATIVE_H_
+#define DALVIK_INLINENATIVE_H_
/* startup/shutdown */
bool dvmInlineNativeStartup(void);
bool javaLangDouble_longBitsToDouble(u4 arg0, u4 arg1, u4 arg2, u4 arg,
JValue* pResult);
-#endif /*_DALVIK_INLINENATIVE*/
+#endif // DALVIK_INLINENATIVE_H_
/*
* Interned strings.
*/
-#ifndef _DALVIK_INTERN
-#define _DALVIK_INTERN
+#ifndef DALVIK_INTERN_H_
+#define DALVIK_INTERN_H_
bool dvmStringInternStartup(void);
void dvmStringInternShutdown(void);
bool dvmIsWeakInternedString(StringObject* strObj);
void dvmGcDetachDeadInternedStrings(int (*isUnmarkedObject)(void *));
-#endif /*_DALVIK_INTERN*/
+#endif // DALVIK_INTERN_H_
/*
* Decode jar/apk/zip files.
*/
-#ifndef _DALVIK_JARFILE
-#define _DALVIK_JARFILE
+#ifndef DALVIK_JARFILE_H_
+#define DALVIK_JARFILE_H_
/*
* This represents an open, scanned Jar file. (It's actually for any Zip
*/
DexCacheStatus dvmDexCacheStatus(const char *fileName);
-#endif /*_DALVIK_JARFILE*/
+#endif // DALVIK_JARFILE_H_
/*
* JNI innards, common to the regular and "checked" interfaces.
*/
-#ifndef _DALVIK_JNIINTERNAL
-#define _DALVIK_JNIINTERNAL
+#ifndef DALVIK_JNIINTERNAL_H_
+#define DALVIK_JNIINTERNAL_H_
#include "jni.h"
*/
void dvmDumpJniReferenceTables(void);
-#endif /*_DALVIK_JNIINTERNAL*/
+#endif // DALVIK_JNIINTERNAL_H_
/*
* Simple linear memory allocator.
*/
-#ifndef _DALVIK_LINEARALLOC
-#define _DALVIK_LINEARALLOC
+#ifndef DALVIK_LINEARALLOC_H_
+#define DALVIK_LINEARALLOC_H_
/*
* If this is set, we create additional data structures and make many
*/
bool dvmLinearAllocContains(const void* start, size_t length);
-#endif /*_DALVIK_LINEARALLOC*/
+#endif // DALVIK_LINEARALLOC_H_
/*
* Miscellaneous utility functions.
*/
-#ifndef _DALVIK_MISC
-#define _DALVIK_MISC
+#ifndef DALVIK_MISC_H_
+#define DALVIK_MISC_H_
#include <string>
*/
std::string dvmStringPrintf(const char* fmt, ...) __attribute__((__format__ (__printf__, 1, 2)));
-#endif /*_DALVIK_MISC*/
+#endif // DALVIK_MISC_H_
* You should follow the JNI function naming conventions, but prefix with
* "Dalvik_" instead of "Java_".
*/
-#ifndef _DALVIK_NATIVE
-#define _DALVIK_NATIVE
+#ifndef DALVIK_NATIVE_H_
+#define DALVIK_NATIVE_H_
/*
* Method description; equivalent to a JNI struct.
void dvmLogNativeMethodExit(const Method* method, struct Thread* self,
const JValue retval);
-#endif /*_DALVIK_NATIVE*/
+#endif // DALVIK_NATIVE_H_
* Maintain an expanding set of unique pointer values. The set is
* kept in sorted order.
*/
-#ifndef _DALVIK_POINTERSET
-#define _DALVIK_POINTERSET
+#ifndef DALVIK_POINTERSET_H_
+#define DALVIK_POINTERSET_H_
struct PointerSet; /* private */
*/
void dvmPointerSetDump(const PointerSet* pSet);
-#endif /*_DALVIK_POINTERSET*/
+#endif // DALVIK_POINTERSET_H_
/*
* Android's method call profiling goodies.
*/
-#ifndef _DALVIK_PROFILE
-#define _DALVIK_PROFILE
+#ifndef DALVIK_PROFILE_H_
+#define DALVIK_PROFILE_H_
#ifndef NOT_VM /* for utilities that sneakily include this file */
#define METHOD_ACTION(_method) (((unsigned int)(_method)) & METHOD_ACTION_MASK)
#define METHOD_COMBINE(_method, _action) ((_method) | (_action))
-#endif /*_DALVIK_PROFILE*/
+#endif // DALVIK_PROFILE_H_
* them directly, except to create the optimized version that we tuck in
* the cache area.
*/
-#ifndef _DALVIK_RAWDEXFILE
-#define _DALVIK_RAWDEXFILE
+#ifndef DALVIK_RAWDEXFILE_H_
+#define DALVIK_RAWDEXFILE_H_
/*
* Structure representing a "raw" DEX file, in its unswapped unoptimized
return pRawDexFile->cacheFileName;
}
-#endif /*_DALVIK_RAWDEXFILE*/
+#endif // DALVIK_RAWDEXFILE_H_
*
* None of the table functions are synchronized.
*/
-#ifndef _DALVIK_REFERENCETABLE
-#define _DALVIK_REFERENCETABLE
+#ifndef DALVIK_REFERENCETABLE_H_
+#define DALVIK_REFERENCETABLE_H_
/*
* Table definition.
void dvmDumpReferenceTableContents(Object* const* refs, size_t count,
const char* descr);
-#endif /*_DALVIK_REFERENCETABLE*/
+#endif // DALVIK_REFERENCETABLE_H_
/*
* Signal catcher thread.
*/
-#ifndef _DALVIK_SIGNALCATCHER
-#define _DALVIK_SIGNALCATCHER
+#ifndef DALVIK_SIGNALCATCHER_H_
+#define DALVIK_SIGNALCATCHER_H_
bool dvmSignalCatcherStartup(void);
void dvmSignalCatcherShutdown(void);
-#endif /*_DALVIK_SIGNALCATCHER*/
+#endif // DALVIK_SIGNALCATCHER_H_
/*
* Stdout/stderr conversion thread.
*/
-#ifndef _DALVIK_STDOUTCONVERTER
-#define _DALVIK_STDOUTCONVERTER
+#ifndef DALVIK_STDOUTCONVERTER_H_
+#define DALVIK_STDOUTCONVERTER_H_
bool dvmStdioConverterStartup(void);
void dvmStdioConverterShutdown(void);
-#endif /*_DALVIK_STDOUTCONVERTER*/
+#endif // DALVIK_STDOUTCONVERTER_H_
/*
* Object synchronization functions.
*/
-#ifndef _DALVIK_SYNC
-#define _DALVIK_SYNC
+#ifndef DALVIK_SYNC_H_
+#define DALVIK_SYNC_H_
/*
* Monitor shape field. Used to distinguish immediate thin locks from
int dvmRelativeCondWait(pthread_cond_t* cond, pthread_mutex_t* mutex,
s8 msec, s4 nsec);
-#endif /*_DALVIK_SYNC*/
+#endif // DALVIK_SYNC_H_
/*
* VM thread support.
*/
-#ifndef _DALVIK_THREAD
-#define _DALVIK_THREAD
+#ifndef DALVIK_THREAD_H_
+#define DALVIK_THREAD_H_
#include "jni.h"
#include "interp/InterpState.h"
*/
void dvmNukeThread(Thread* thread);
-#endif /*_DALVIK_THREAD*/
+#endif // DALVIK_THREAD_H_
* UTF-8 and Unicode string manipulation functions, plus convenience
* functions for working with java/lang/String.
*/
-#ifndef _DALVIK_STRING
-#define _DALVIK_STRING
+#ifndef DALVIK_STRING_H_
+#define DALVIK_STRING_H_
#include <string>
#include <vector>
*/
int dvmHashcmpStrings(const void* vstrObj1, const void* vstrObj2);
-#endif /*_DALVIK_STRING*/
+#endif // DALVIK_STRING_H_
/*
* Garbage-collecting allocator.
*/
-#ifndef _DALVIK_ALLOC_ALLOC
-#define _DALVIK_ALLOC_ALLOC
+#ifndef DALVIK_ALLOC_ALLOC_H_
+#define DALVIK_ALLOC_ALLOC_H_
#include <stddef.h>
bool dvmIsNonMovingObject(const Object* object);
-#endif /*_DALVIK_ALLOC_ALLOC*/
+#endif // DALVIK_ALLOC_ALLOC_H_
* WriteBarrier, and from there to here.
*/
-#ifndef _DALVIK_ALLOC_CARDTABLE
-#define _DALVIK_ALLOC_CARDTABLE
+#ifndef DALVIK_ALLOC_CARDTABLE_H_
+#define DALVIK_ALLOC_CARDTABLE_H_
#define GC_CARD_SHIFT 7
#define GC_CARD_SIZE (1 << GC_CARD_SHIFT)
*/
void dvmVerifyCardTable(void);
-#endif /*_DALVIK_ALLOC_CARDTABLE*/
+#endif // DALVIK_ALLOC_CARDTABLE_H_
/*
* DDM-specific internal heap functions.
*/
-#ifndef _DALVIK_ALLOC_DDMHEAP
-#define _DALVIK_ALLOC_DDMHEAP
+#ifndef DALVIK_ALLOC_DDMHEAP_H_
+#define DALVIK_ALLOC_DDMHEAP_H_
/*
* Sends the current heap info to the DDM server.
*/
void dvmDdmSendHeapSegments(bool shouldLock, bool native);
-#endif // _DALVIK_ALLOC_DDMHEAP
+#endif // DALVIK_ALLOC_DDMHEAP_H_
/*
* Internal heap functions
*/
-#ifndef _DALVIK_ALLOC_HEAP
-#define _DALVIK_ALLOC_HEAP
+#ifndef DALVIK_ALLOC_HEAP_H_
+#define DALVIK_ALLOC_HEAP_H_
struct GcSpec {
/* If true, only the application heap is threatened. */
*/
void dvmWaitForConcurrentGcToComplete(void);
-#endif // _DALVIK_ALLOC_HEAP
+#endif // DALVIK_ALLOC_HEAP_H_
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef _DALVIK_HEAP_BITMAP
-#define _DALVIK_HEAP_BITMAP
+#ifndef DALVIK_HEAP_BITMAP_H_
+#define DALVIK_HEAP_BITMAP_H_
#include <limits.h>
#include <stdint.h>
uintptr_t base, uintptr_t max,
BitmapSweepCallback *callback, void *callbackArg);
-#endif /* _DALVIK_HEAP_BITMAP */
+#endif // DALVIK_HEAP_BITMAP_H_
* limitations under the License.
*/
-#ifndef _DALVIK_HEAP_BITMAPINLINES
-#define _DALVIK_HEAP_BITMAPINLINES
+#ifndef DALVIK_HEAP_BITMAPINLINES_H_
+#define DALVIK_HEAP_BITMAPINLINES_H_
static unsigned long dvmHeapBitmapSetAndReturnObjectBit(HeapBitmap *hb, const void *obj) __attribute__((used));
static void dvmHeapBitmapSetObjectBit(HeapBitmap *hb, const void *obj) __attribute__((used));
}
}
-#endif /* _DALVIK_HEAP_BITMAPINLINES */
+#endif // DALVIK_HEAP_BITMAPINLINES_H_
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef _DALVIK_HEAPDEBUG
-#define _DALVIK_HEAPDEBUG
+#ifndef DALVIK_HEAPDEBUG_H_
+#define DALVIK_HEAPDEBUG_H_
enum HeapDebugInfoType {
kVirtualHeapSize = 0,
*/
int dvmGetHeapDebugInfo(HeapDebugInfoType info);
-#endif // _DALVIK_HEAPDEBUG
+#endif // DALVIK_HEAPDEBUG_H_
/*
* Types and macros used internally by the heap.
*/
-#ifndef _DALVIK_ALLOC_HEAP_INTERNAL
-#define _DALVIK_ALLOC_HEAP_INTERNAL
+#ifndef DALVIK_ALLOC_HEAP_INTERNAL_H_
+#define DALVIK_ALLOC_HEAP_INTERNAL_H_
#include "MarkSweep.h"
#define FRACTIONAL_PCT(n,max) ((n) * 100) / (max), \
(((n) * 1000) / (max)) % 10
-#endif // _DALVIK_ALLOC_HEAP_INTERNAL
+#endif // DALVIK_ALLOC_HEAP_INTERNAL_H_
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef _DALVIK_HEAP_SOURCE
-#define _DALVIK_HEAP_SOURCE
+#ifndef DALVIK_HEAP_SOURCE_H_
+#define DALVIK_HEAP_SOURCE_H_
#include "alloc/Heap.h"
#include "alloc/HeapInternal.h" // for GcHeap
*/
size_t dvmHeapSourceGetMaximumSize(void);
-#endif // _DALVIK_HEAP_SOURCE
+#endif // DALVIK_HEAP_SOURCE_H_
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef _DALVIK_ALLOC_MARK_SWEEP
-#define _DALVIK_ALLOC_MARK_SWEEP
+#ifndef DALVIK_ALLOC_MARK_SWEEP_H_
+#define DALVIK_ALLOC_MARK_SWEEP_H_
#include "alloc/HeapBitmap.h"
#include "alloc/HeapSource.h"
size_t *numObjects, size_t *numBytes);
void dvmEnqueueClearedReferences(Object **references);
-#endif // _DALVIK_ALLOC_MARK_SWEEP
+#endif // DALVIK_ALLOC_MARK_SWEEP_H_
* limitations under the License.
*/
-#ifndef _DALVIK_ALLOC_VERIFY
-#define _DALVIK_ALLOC_VERIFY
+#ifndef DALVIK_ALLOC_VERIFY_H_
+#define DALVIK_ALLOC_VERIFY_H_
/*
* Verifies an object reference.
*/
void dvmVerifyRoots(void);
-#endif /* _DALVIK_ALLOC_VERIFY */
+#endif // DALVIK_ALLOC_VERIFY_H_
* limitations under the License.
*/
-#ifndef _DALVIK_ALLOC_VISIT
-#define _DALVIK_ALLOC_VISIT
+#ifndef DALVIK_ALLOC_VISIT_H_
+#define DALVIK_ALLOC_VISIT_H_
#include "Dalvik.h"
*/
void dvmVisitRoots(RootVisitor *visitor, void *arg);
-#endif /* _DALVIK_ALLOC_VISIT */
+#endif // DALVIK_ALLOC_VISIT_H_
* limitations under the License.
*/
-#ifndef _DALVIK_ALLOC_VISITINLINES
-#define _DALVIK_ALLOC_VISITINLINES
+#ifndef DALVIK_ALLOC_VISITINLINES_H_
+#define DALVIK_ALLOC_VISITINLINES_H_
/*
* Visits the instance fields of a class or data object.
}
}
-#endif /* _DALVIK_ALLOC_VISITINLINES */
+#endif // DALVIK_ALLOC_VISITINLINES_H_
* limitations under the License.
*/
-#ifndef _DALVIK_ALLOC_WRITEBARRIER
-#define _DALVIK_ALLOC_WRITEBARRIER
+#ifndef DALVIK_ALLOC_WRITEBARRIER_H_
+#define DALVIK_ALLOC_WRITEBARRIER_H_
/*
* Note writes to the heap. These functions must be called if a field
dvmMarkCard((Object *)obj);
}
-#endif /* _DALVIK_ALLOC_WRITEBARRIER */
+#endif // DALVIK_ALLOC_WRITEBARRIER_H_
/*
* Dalvik bytecode verifier.
*/
-#ifndef _DALVIK_CODEVERIFY
-#define _DALVIK_CODEVERIFY
+#ifndef DALVIK_CODEVERIFY_H_
+#define DALVIK_CODEVERIFY_H_
#include "analysis/VerifySubs.h"
#include "analysis/VfyBasicBlock.h"
*/
bool dvmVerifyCodeFlow(VerifierData* vdata);
-#endif /*_DALVIK_CODEVERIFY*/
+#endif // DALVIK_CODEVERIFY_H_
/*
* DEX preparation declarations.
*/
-#ifndef _DALVIK_DEXPREPARE
-#define _DALVIK_DEXPREPARE
+#ifndef DALVIK_DEXPREPARE_H_
+#define DALVIK_DEXPREPARE_H_
/*
* Global DEX optimizer control. Determines the circumstances in which we
bool dvmCreateInlineSubsTable(void);
void dvmFreeInlineSubsTable(void);
-#endif /*_DALVIK_DEXPREPARE*/
+#endif // DALVIK_DEXPREPARE_H_
/*
* Dalvik classfile verification.
*/
-#ifndef _DALVIK_DEXVERIFY
-#define _DALVIK_DEXVERIFY
+#ifndef DALVIK_DEXVERIFY_H_
+#define DALVIK_DEXVERIFY_H_
/*
* Global verification mode. These must be in order from least verification
*/
void dvmFreeRegisterMap(RegisterMap* pMap);
-#endif /*_DALVIK_DEXVERIFY*/
+#endif // DALVIK_DEXVERIFY_H_
/*
* Liveness analysis.
*/
-#ifndef _DALVIK_LIVENESS
-#define _DALVIK_LIVENESS
+#ifndef DALVIK_LIVENESS_H_
+#define DALVIK_LIVENESS_H_
struct VerifierData;
bool dvmComputeLiveness(struct VerifierData* vdata);
-#endif /*_DALVIK_LIVENESS*/
+#endif // DALVIK_LIVENESS_H_
/*
* Bytecode optimization declarations.
*/
-#ifndef _DALVIK_OPTIMIZE
-#define _DALVIK_OPTIMIZE
+#ifndef DALVIK_OPTIMIZE_H_
+#define DALVIK_OPTIMIZE_H_
/*
* Entry point from DEX preparation.
StaticField* dvmOptResolveStaticField(ClassObject* referrer, u4 sfieldIdx,
VerifyError* pFailure);
-#endif /*_DALVIK_OPTIMIZE*/
+#endif // DALVIK_OPTIMIZE_H_
*
* These structures should be treated as opaque through most of the VM.
*/
-#ifndef _DALVIK_REGISTERMAP
-#define _DALVIK_REGISTERMAP
+#ifndef DALVIK_REGISTERMAP_H_
+#define DALVIK_REGISTERMAP_H_
#include "analysis/VerifySubs.h"
#include "analysis/CodeVerify.h"
/* dump stats gathered during register map creation process */
void dvmRegisterMapDumpStats(void);
-#endif /*_DALVIK_REGISTERMAP*/
+#endif // DALVIK_REGISTERMAP_H_
/*
* Dalvik bytecode verification subroutines.
*/
-#ifndef _DALVIK_VERIFYSUBS
-#define _DALVIK_VERIFYSUBS
+#ifndef DALVIK_VERIFYSUBS_H_
+#define DALVIK_VERIFYSUBS_H_
/*
* InsnFlags is a 32-bit integer with the following layout:
/* debugging */
bool dvmWantVerboseVerification(const Method* meth);
-#endif /*_DALVIK_VERIFYSUBS*/
+#endif // DALVIK_VERIFYSUBS_H_
* Basic block functions, as used by the verifier. (The names were chosen
* to avoid conflicts with similar structures used by the compiler.)
*/
-#ifndef _DALVIK_VFYBASICBLOCK
-#define _DALVIK_VFYBASICBLOCK
+#ifndef DALVIK_VFYBASICBLOCK_H_
+#define DALVIK_VFYBASICBLOCK_H_
#include "PointerSet.h"
*/
void dvmFreeVfyBasicBlocks(struct VerifierData* vdata);
-#endif /*_DALVIK_VFYBASICBLOCK*/
+#endif // DALVIK_VFYBASICBLOCK_H_
* limitations under the License.
*/
-#ifndef _DALVIK_VM_COMPILER
-#define _DALVIK_VM_COMPILER
+#ifndef DALVIK_VM_COMPILER_H_
+#define DALVIK_VM_COMPILER_H_
#include <setjmp.h>
#include "Thread.h"
u8 dvmGetRegResourceMask(int reg);
void dvmDumpCFG(struct CompilationUnit *cUnit, const char *dirPrefix);
-#endif /* _DALVIK_VM_COMPILER */
+#endif // DALVIK_VM_COMPILER_H_
* limitations under the License.
*/
-#ifndef _DALVIK_VM_COMPILER_IR
-#define _DALVIK_VM_COMPILER_IR
+#ifndef DALVIK_VM_COMPILER_IR_H_
+#define DALVIK_VM_COMPILER_IR_H_
#include "codegen/Optimizer.h"
/* Debug Utilities */
void dvmCompilerDumpCompilationUnit(CompilationUnit *cUnit);
-#endif /* _DALVIK_VM_COMPILER_IR */
+#endif // DALVIK_VM_COMPILER_IR_H_
* limitations under the License.
*/
-#ifndef _DALVIK_VM_COMPILER_INTERNAL
-#define _DALVIK_VM_COMPILER_INTERNAL
+#ifndef DALVIK_VM_COMPILER_INTERNAL_H_
+#define DALVIK_VM_COMPILER_INTERNAL_H_
#include "Dalvik.h"
#include "CompilerUtility.h"
#include "codegen/CompilerCodegen.h"
#include "interp/Jit.h"
-#endif /* _DALVIK_VM_COMPILER_INTERNAL */
+#endif // DALVIK_VM_COMPILER_INTERNAL_H_
* limitations under the License.
*/
-#ifndef _DALVIK_VM_COMPILER_UTILITY
-#define _DALVIK_VM_COMPILER_UTILITY
+#ifndef DALVIK_VM_COMPILER_UTILITY_H_
+#define DALVIK_VM_COMPILER_UTILITY_H_
#include "Dalvik.h"
int dvmCompilerCacheFlush(long start, long end, long flags);
-#endif /* _DALVIK_COMPILER_UTILITY */
+#endif // DALVIK_COMPILER_UTILITY_H_
* limitations under the License.
*/
-#ifndef _DALVIK_VM_DATAFLOW
-#define _DALVIK_VM_DATAFLOW
+#ifndef DALVIK_VM_DATAFLOW_H_
+#define DALVIK_VM_DATAFLOW_H_
#include "Dalvik.h"
#include "CompilerInternals.h"
#define DECODE_REG(v) (v & 0xffff)
#define DECODE_SUB(v) (((unsigned int) v) >> 16)
-#endif /* _DALVIK_VM_DATAFLOW */
+#endif // DALVIK_VM_DATAFLOW_H_
* limitations under the License.
*/
-#ifndef _DALVIK_VM_LOOP
-#define _DALVIK_VM_LOOP
+#ifndef DALVIK_VM_LOOP_H_
+#define DALVIK_VM_LOOP_H_
#include "Dalvik.h"
#include "CompilerInternals.h"
return false; \
}
-#endif /* _DALVIK_VM_LOOP */
+#endif // DALVIK_VM_LOOP_H_
* limitations under the License.
*/
-#ifndef _DALVIK_VM_COMPILERCODEGEN_H_
-#define _DALVIK_VM_COMPILERCODEGEN_H_
+#ifndef DALVIK_VM_COMPILERCODEGEN_H_
+#define DALVIK_VM_COMPILERCODEGEN_H_
#include "compiler/CompilerIR.h"
/* Implemented in codegen/<target>/<target_variant>/ArchVariant.c */
void dvmCompilerGenMemBarrier(CompilationUnit *cUnit, int barrierKind);
-#endif /* _DALVIK_VM_COMPILERCODEGEN_H_ */
+#endif // DALVIK_VM_COMPILERCODEGEN_H_
* limitations under the License.
*/
-#ifndef _DALVIK_VM_COMPILER_OPTIMIZATION_H
-#define _DALVIK_VM_COMPILER_OPTIMIZATION_H
+#ifndef DALVIK_VM_COMPILER_OPTIMIZATION_H_
+#define DALVIK_VM_COMPILER_OPTIMIZATION_H_
#include "Dalvik.h"
void dvmCompilerApplyGlobalOptimizations(struct CompilationUnit *cUnit);
-#endif /* _DALVIK_VM_COMPILER_OPTIMIZATION_H */
+#endif // DALVIK_VM_COMPILER_OPTIMIZATION_H_
* limitations under the License.
*/
+#ifndef DALVIK_VM_COMPILER_CODEGEN_ARM_ARMLIR_H_
+#define DALVIK_VM_COMPILER_CODEGEN_ARM_ARMLIR_H_
+
#include "Dalvik.h"
#include "compiler/CompilerInternals.h"
-#ifndef _DALVIK_VM_COMPILER_CODEGEN_ARM_ARMLIR_H
-#define _DALVIK_VM_COMPILER_CODEGEN_ARM_ARMLIR_H
-
/*
* r0, r1, r2, r3 are always scratch
* r4 (rPC) is scratch for Jit, but most be restored when resuming interp
#define CHAIN_CELL_NORMAL_SIZE 12
#define CHAIN_CELL_PREDICTED_SIZE 16
-#endif /* _DALVIK_VM_COMPILER_CODEGEN_ARM_ARMLIR_H */
+#endif // DALVIK_VM_COMPILER_CODEGEN_ARM_ARMLIR_H_
* limitations under the License.
*/
-#include "Dalvik.h"
+#ifndef DALVIK_VM_COMPILER_CODEGEN_ARM_CALLOUT_HELPER_H_
+#define DALVIK_VM_COMPILER_CODEGEN_ARM_CALLOUT_HELPER_H_
-#ifndef _DALVIK_VM_COMPILER_CODEGEN_ARM_CALLOUT_HELPER_H
-#define _DALVIK_VM_COMPILER_CODEGEN_ARM_CALLOUT_HELPER_H
+#include "Dalvik.h"
/*
* Declare/comment prototypes of all native callout functions invoked by the
* dvmLockObject // MONITOR_ENTER
*/
-#endif /* _DALVIK_VM_COMPILER_CODEGEN_ARM_CALLOUT_HELPER_H */
+#endif // DALVIK_VM_COMPILER_CODEGEN_ARM_CALLOUT_HELPER_H_
* limitations under the License.
*/
-#ifndef _DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV5TE_VFP_ARCHVARIANT_H
-#define _DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV5TE_VFP_ARCHVARIANT_H
+#ifndef DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV5TE_VFP_ARCHVARIANT_H_
+#define DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV5TE_VFP_ARCHVARIANT_H_
/* Create the TemplateOpcode enum */
#define JIT_TEMPLATE(X) TEMPLATE_##X,
};
#undef JIT_TEMPLATE
-#endif /* _DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV5TE_VFP_ARCHVARIANT_H */
+#endif // DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV5TE_VFP_ARCHVARIANT_H_
* limitations under the License.
*/
-#ifndef _DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV5TE_ARCHVARIANT_H
-#define _DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV5TE_ARCHVARIANT_H
+#ifndef DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV5TE_ARCHVARIANT_H_
+#define DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV5TE_ARCHVARIANT_H_
/* Create the TemplateOpcode enum */
#define JIT_TEMPLATE(X) TEMPLATE_##X,
};
#undef JIT_TEMPLATE
-#endif /* _DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV5TE_ARCHVARIANT_H */
+#endif // DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV5TE_ARCHVARIANT_H_
* limitations under the License.
*/
-#ifndef _DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV5TE_VFP_ARCHVARIANT_H
-#define _DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV5TE_VFP_ARCHVARIANT_H
+#ifndef DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV5TE_VFP_ARCHVARIANT_H_
+#define DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV5TE_VFP_ARCHVARIANT_H_
/* Create the TemplateOpcode enum */
#define JIT_TEMPLATE(X) TEMPLATE_##X,
} TemplateOpcode;
#undef JIT_TEMPLATE
-#endif /* _DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV5TE_VFP_ARCHVARIANT_H */
+#endif // DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV5TE_VFP_ARCHVARIANT_H_
* limitations under the License.
*/
-#ifndef _DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV7_A_ARCHVARIANT_H
-#define _DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV7_A_ARCHVARIANT_H
+#ifndef DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV7_A_ARCHVARIANT_H_
+#define DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV7_A_ARCHVARIANT_H_
/* Create the TemplateOpcode enum */
#define JIT_TEMPLATE(X) TEMPLATE_##X,
};
#undef JIT_TEMPLATE
-#endif /* _DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV7_A_ARCHVARIANT_H */
+#endif // DALVIK_VM_COMPILER_CODEGEN_ARM_ARMV7_A_ARCHVARIANT_H_
* limitations under the License.
*/
-#include "Dalvik.h"
+#ifndef DALVIK_VM_COMPILER_CODEGEN_X86_CALLOUT_HELPER_H_
+#define DALVIK_VM_COMPILER_CODEGEN_X86_CALLOUT_HELPER_H_
-#ifndef _DALVIK_VM_COMPILER_CODEGEN_X86_CALLOUT_HELPER_H
-#define _DALVIK_VM_COMPILER_CODEGEN_X86_CALLOUT_HELPER_H
+#include "Dalvik.h"
/*
* Declare/comment prototypes of all native callout functions invoked by the
*/
extern "C" double sqrt(double x); // INLINE_MATH_SQRT
-#endif /* _DALVIK_VM_COMPILER_CODEGEN_X86_CALLOUT_HELPER_H */
+#endif // DALVIK_VM_COMPILER_CODEGEN_X86_CALLOUT_HELPER_H_
* limitations under the License.
*/
+#ifndef DALVIK_VM_COMPILER_CODEGEN_X86_X86LIR_H_
+#define DALVIK_VM_COMPILER_CODEGEN_X86_X86LIR_H_
+
#include "Dalvik.h"
#include "compiler/CompilerInternals.h"
-#ifndef _DALVIK_VM_COMPILER_CODEGEN_X86_X86LIR_H
-#define _DALVIK_VM_COMPILER_CODEGEN_X86_X86LIR_H
-
/*
* For both JIT & interpreter:
* esi is Dalvik FP
#define CHAIN_CELL_NORMAL_SIZE 12
#define CHAIN_CELL_PREDICTED_SIZE 16
-#endif /* _DALVIK_VM_COMPILER_CODEGEN_X86_X86LIR_H */
+#endif // DALVIK_VM_COMPILER_CODEGEN_X86_X86LIR_H_
* limitations under the License.
*/
-#ifndef _DALVIK_VM_COMPILER_CODEGEN_X86_IA32_ARCHVARIANT_H
-#define _DALVIK_VM_COMPILER_CODEGEN_X86_IA32_ARCHVARIANT_H
+#ifndef DALVIK_VM_COMPILER_CODEGEN_X86_IA32_ARCHVARIANT_H_
+#define DALVIK_VM_COMPILER_CODEGEN_X86_IA32_ARCHVARIANT_H_
/* Create the TemplateOpcode enum */
#define JIT_TEMPLATE(X) TEMPLATE_##X,
};
#undef JIT_TEMPLATE
-#endif /* _DALVIK_VM_COMPILER_CODEGEN_X86_IA32_ARCHVARIANT_H */
+#endif // DALVIK_VM_COMPILER_CODEGEN_X86_IA32_ARCHVARIANT_H_
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef _DALVIK_HPROF_HPROF
-#define _DALVIK_HPROF_HPROF
+#ifndef DALVIK_HPROF_HPROF_H_
+#define DALVIK_HPROF_HPROF_H_
#include "Dalvik.h"
void hprofFreeContext(hprof_context_t *ctx);
int hprofDumpHeap(const char* fileName, int fd, bool directToDdms);
-#endif // _DALVIK_HPROF_HPROF
+#endif // DALVIK_HPROF_HPROF_H_
/*
* Dalvik interpreter public definitions.
*/
-#ifndef _DALVIK_INTERP_INTERP
-#define _DALVIK_INTERP_INTERP
+#ifndef DALVIK_INTERP_INTERP_H_
+#define DALVIK_INTERP_INTERP_H_
/*
* Stash the dalvik PC in the frame. Called during interpretation.
extern void* dvmAsmAltInstructionStart[];
#endif
-#endif /*_DALVIK_INTERP_INTERP*/
+#endif // DALVIK_INTERP_INTERP_H_
*
* Functions and globals declared here are defined in Interp.c.
*/
-#ifndef _DALVIK_INTERP_DEFS
-#define _DALVIK_INTERP_DEFS
+#ifndef DALVIK_INTERP_DEFS_H_
+#define DALVIK_INTERP_DEFS_H_
#if defined(WITH_JIT)
/*
#endif
-#endif /*_DALVIK_INTERP_DEFS*/
+#endif // DALVIK_INTERP_DEFS_H_
*
* Functions and globals declared here are defined in Interp.c.
*/
-#ifndef _DALVIK_INTERP_STATE
-#define _DALVIK_INTERP_STATE
+#ifndef DALVIK_INTERP_STATE_H_
+#define DALVIK_INTERP_STATE_H_
/*
* Execution mode, e.g. interpreter vs. JIT.
#endif
-#endif /*_DALVIK_INTERP_STATE*/
+#endif // DALVIK_INTERP_STATE_H_
/*
* Jit control
*/
-#ifndef _DALVIK_INTERP_JIT
-#define _DALVIK_INTERP_JIT
+#ifndef DALVIK_INTERP_JIT_H_
+#define DALVIK_INTERP_JIT_H_
#include "InterpDefs.h"
#include "mterp/common/jit-config.h"
void dvmJitResumeTranslation(Thread* self, const u2* pc, const u4* fp);
}
-#endif /*_DALVIK_INTERP_JIT*/
+#endif // DALVIK_INTERP_JIT_H_
/*
* Stack frames, and uses thereof.
*/
-#ifndef _DALVIK_INTERP_STACK
-#define _DALVIK_INTERP_STACK
+#ifndef DALVIK_INTERP_STACK_H_
+#define DALVIK_INTERP_STACK_H_
#include "jni.h"
#include <stdarg.h>
void dvmDumpThreadStack(const DebugOutputTarget* target, Thread* thread);
void dvmDumpRunningThreadStack(const DebugOutputTarget* target, Thread* thread);
-#endif /*_DALVIK_INTERP_STACK*/
+#endif // DALVIK_INTERP_STACK_H_
/*
* Expanding byte buffer, with primitives for appending basic data types.
*/
-#ifndef _DALVIK_JDWP_EXPANDBUF
-#define _DALVIK_JDWP_EXPANDBUF
+#ifndef DALVIK_JDWP_EXPANDBUF_H_
+#define DALVIK_JDWP_EXPANDBUF_H_
#include "Common.h" // need u1/u2/u4/u8 types
void expandBufAdd8BE(ExpandBuf* pBuf, u8 val);
void expandBufAddUtf8String(ExpandBuf* pBuf, const u1* str);
-#endif /*_DALVIK_JDWP_EXPANDBUF*/
+#endif // DALVIK_JDWP_EXPANDBUF_H_
* attempts to remain independent of VM innards (e.g. it doesn't access VM
* data structures directly). All calls go through Debugger.c.
*/
-#ifndef _DALVIK_JDWP_JDWP
-#define _DALVIK_JDWP_JDWP
+#ifndef DALVIK_JDWP_JDWP_H_
+#define DALVIK_JDWP_JDWP_H_
#include "jdwp/JdwpConstants.h"
#include "jdwp/ExpandBuf.h"
void dvmJdwpDdmSendChunkV(JdwpState* state, int type, const struct iovec* iov,
int iovcnt);
-#endif /*_DALVIK_JDWP_JDWP*/
+#endif // DALVIK_JDWP_JDWP_H_
/*
* These come out of the JDWP documentation.
*/
-#ifndef _DALVIK_JDWP_JDWPCONSTANTS
-#define _DALVIK_JDWP_JDWPCONSTANTS
+#ifndef DALVIK_JDWP_JDWPCONSTANTS_H_
+#define DALVIK_JDWP_JDWPCONSTANTS_H_
/*
* Error constants.
JT_CLASS_OBJECT = 'c',
};
-#endif /*_DALVIK_JDWP_JDWPCONSTANTS*/
+#endif // DALVIK_JDWP_JDWPCONSTANTS_H_
/*
* Handle registration of events, and debugger event notification.
*/
-#ifndef _DALVIK_JDWP_JDWPEVENT
-#define _DALVIK_JDWP_JDWPEVENT
+#ifndef DALVIK_JDWP_JDWPEVENT_H_
+#define DALVIK_JDWP_JDWPEVENT_H_
#include "JdwpConstants.h"
#include "ExpandBuf.h"
*/
bool dvmJdwpSendRequest(JdwpState* state, ExpandBuf* pReq);
-#endif /*_DALVIK_JDWP_JDWPEVENT*/
+#endif // DALVIK_JDWP_JDWPEVENT_H_
/*
* Handle requests.
*/
-#ifndef _DALVIK_JDWP_JDWPHANDLER
-#define _DALVIK_JDWP_JDWPHANDLER
+#ifndef DALVIK_JDWP_JDWPHANDLER_H_
+#define DALVIK_JDWP_JDWPHANDLER_H_
#include "Common.h"
#include "ExpandBuf.h"
/* helper function */
void dvmJdwpAddLocation(ExpandBuf* pReply, const JdwpLocation* pLoc);
-#endif /*_DALVIK_JDWP_JDWPHANDLER*/
+#endif // DALVIK_JDWP_JDWPHANDLER_H_
/*
* JDWP internal interfaces.
*/
-#ifndef _DALVIK_JDWP_JDWPPRIV
-#define _DALVIK_JDWP_JDWPPRIV
+#ifndef DALVIK_JDWP_JDWPPRIV_H_
+#define DALVIK_JDWP_JDWPPRIV_H_
#define LOG_TAG "jdwp"
return (*state->transport->sendBufferedRequest)(state, iov, iovcnt);
}
-#endif /*_DALVIK_JDWP_JDWPPRIV*/
+#endif // DALVIK_JDWP_JDWPPRIV_H_
/*
* Some declarations used throughout mterp.
*/
-#ifndef _DALVIK_MTERP_MTERP
-#define _DALVIK_MTERP_MTERP
+#ifndef DALVIK_MTERP_MTERP_H_
+#define DALVIK_MTERP_MTERP_H_
#include "Dalvik.h"
#include "interp/InterpDefs.h"
*/
extern "C" void dvmMterpPrintMethod(Method* method);
-#endif /*_DALVIK_MTERP_MTERP*/
+#endif // DALVIK_MTERP_MTERP_H_
* limitations under the License.
*/
-#ifndef _DALVIK_NATIVE_INTERNALNATIVE
-#define _DALVIK_NATIVE_INTERNALNATIVE
+#ifndef DALVIK_NATIVE_INTERNALNATIVE_H_
+#define DALVIK_NATIVE_INTERNALNATIVE_H_
/*
* Some setup for internal native functions.
/* exception-throwing stub for abstract methods (DalvikNativeFunc) */
extern "C" void dvmAbstractMethodStub(const u4* args, JValue* pResult);
-#endif /*_DALVIK_NATIVE_INTERNALNATIVE*/
+#endif // DALVIK_NATIVE_INTERNALNATIVE_H_
/*
* Declarations and definitions common to internal native code.
*/
-#ifndef _DALVIK_NATIVE_INTERNALNATIVEPRIV
-#define _DALVIK_NATIVE_INTERNALNATIVEPRIV
+#ifndef DALVIK_NATIVE_INTERNALNATIVEPRIV_H_
+#define DALVIK_NATIVE_INTERNALNATIVEPRIV_H_
/*
* Return macros. Note we use "->i" instead of "->z" for boolean; this
extern const DalvikNativeMethod dvm_org_apache_harmony_dalvik_NativeTestTarget[];
extern const DalvikNativeMethod dvm_sun_misc_Unsafe[];
-#endif /*_DALVIK_NATIVE_INTERNALNATIVEPRIV*/
+#endif // DALVIK_NATIVE_INTERNALNATIVEPRIV_H_
/*
* Check access to fields and methods.
*/
-#ifndef _DALVIK_OO_ACCESSCHECK
-#define _DALVIK_OO_ACCESSCHECK
+#ifndef DALVIK_OO_ACCESSCHECK_H_
+#define DALVIK_OO_ACCESSCHECK_H_
/*
* Determine whether the "accessFrom" class is allowed to get at "clazz".
*/
bool dvmInSamePackage(const ClassObject* class1, const ClassObject* class2);
-#endif /*_DALVIK_OO_ACCESSCHECK*/
+#endif // DALVIK_OO_ACCESSCHECK_H_
/*
* Array handling.
*/
-#ifndef _DALVIK_OO_ARRAY
-#define _DALVIK_OO_ARRAY
+#ifndef DALVIK_OO_ARRAY_H_
+#define DALVIK_OO_ARRAY_H_
/*
* Find a matching array class. If it doesn't exist, create it.
*/
size_t dvmArrayClassElementWidth(const ClassObject* clazz);
-#endif /*_DALVIK_OO_ARRAY*/
+#endif // DALVIK_OO_ARRAY_H_
/*
* Class loader.
*/
-#ifndef _DALVIK_OO_CLASS
-#define _DALVIK_OO_CLASS
+#ifndef DALVIK_OO_CLASS_H_
+#define DALVIK_OO_CLASS_H_
/*
* The classpath and bootclasspath differ in that only the latter is
*/
size_t dvmClassObjectSize(const ClassObject *clazz);
-#endif /*_DALVIK_OO_CLASS*/
+#endif // DALVIK_OO_CLASS_H_
* Declaration of the fundamental Object type and refinements thereof, plus
* some functions for manipulating them.
*/
-#ifndef _DALVIK_OO_OBJECT
-#define _DALVIK_OO_OBJECT
+#ifndef DALVIK_OO_OBJECT_H_
+#define DALVIK_OO_OBJECT_H_
#include <stddef.h>
#include "Atomic.h"
/* debugging */
void dvmDumpObject(const Object* obj);
-#endif /*_DALVIK_OO_OBJECT*/
+#endif // DALVIK_OO_OBJECT_H_
/*
* Helper functions to access data fields in Objects.
*/
-#ifndef _DALVIK_OO_OBJECTINLINES
-#define _DALVIK_OO_OBJECTINLINES
+#ifndef DALVIK_OO_OBJECTINLINES_H_
+#define DALVIK_OO_OBJECTINLINES_H_
/*
* Store a single value in the array, and if the value isn't null,
}
}
-#endif /*_DALVIK_OO_OBJECTINLINES*/
+#endif // DALVIK_OO_OBJECTINLINES_H_
/*
* Resolve "constant pool" references into pointers to VM structs.
*/
-#ifndef _DALVIK_OO_RESOLVE
-#define _DALVIK_OO_RESOLVE
+#ifndef DALVIK_OO_RESOLVE_H_
+#define DALVIK_OO_RESOLVE_H_
/*
* "Direct" and "virtual" methods are stored independently. The type of call
*/
const char* dvmMethodTypeStr(MethodType methodType);
-#endif /*_DALVIK_OO_RESOLVE*/
+#endif // DALVIK_OO_RESOLVE_H_
/*
* instanceof, checkcast, etc.
*/
-#ifndef _DALVIK_OO_TYPECHECK
-#define _DALVIK_OO_TYPECHECK
+#ifndef DALVIK_OO_TYPECHECK_H_
+#define DALVIK_OO_TYPECHECK_H_
/* VM startup/shutdown */
bool dvmInstanceofStartup(void);
extern "C" bool dvmCanPutArrayElement(const ClassObject* elemClass,
const ClassObject* arrayClass);
-#endif /*_DALVIK_OO_TYPECHECK*/
+#endif // DALVIK_OO_TYPECHECK_H_
/*
* Basic reflection calls and utility functions.
*/
-#ifndef _DALVIK_REFLECT_REFLECT
-#define _DALVIK_REFLECT_REFLECT
+#ifndef DALVIK_REFLECT_REFLECT_H_
+#define DALVIK_REFLECT_REFLECT_H_
/*
* During startup, validate the "box" classes, e.g. java/lang/Integer.
bool dvmEncodedArrayIteratorGetNext(EncodedArrayIterator* iterator,
AnnotationValue* value);
-#endif /*_DALVIK_REFLECT_REFLECT*/
+#endif // DALVIK_REFLECT_REFLECT_H_
/*
* Internal unit tests.
*/
-#ifndef _DALVIK_TEST_TEST
-#define _DALVIK_TEST_TEST
+#ifndef DALVIK_TEST_TEST_H_
+#define DALVIK_TEST_TEST_H_
bool dvmTestHash(void);
bool dvmTestAtomicSpeed(void);
bool dvmTestIndirectRefTable(void);
-#endif /*_DALVIK_TEST_TEST*/
+#endif // DALVIK_TEST_TEST_H_