buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /* |
| 18 | * Common defines for all Dalvik code. |
| 19 | */ |
| 20 | #ifndef DALVIK_COMMON_H_ |
| 21 | #define DALVIK_COMMON_H_ |
| 22 | |
| 23 | #include <stdbool.h> |
| 24 | #include <stdint.h> |
| 25 | #include <stdio.h> |
| 26 | #include <assert.h> |
buzbee | c143c55 | 2011-08-20 17:38:58 -0700 | [diff] [blame^] | 27 | #include "logging.h" |
| 28 | #include "object.h" |
| 29 | #include "thread.h" |
| 30 | #include "class_linker.h" |
| 31 | #include "dex_cache.h" |
| 32 | #include "utils.h" |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 33 | |
| 34 | // From Common.h |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 35 | typedef uint8_t u1; |
| 36 | typedef uint16_t u2; |
| 37 | typedef uint32_t u4; |
| 38 | typedef uint64_t u8; |
| 39 | typedef int8_t s1; |
| 40 | typedef int16_t s2; |
| 41 | typedef int32_t s4; |
| 42 | typedef int64_t s8; |
| 43 | typedef unsigned long long u8; |
| 44 | |
buzbee | c143c55 | 2011-08-20 17:38:58 -0700 | [diff] [blame^] | 45 | //Skip old DexFile.h |
| 46 | #define LIBDEX_DEXFILE_H_ |
| 47 | //Skip old vm/Common.h |
| 48 | #define DALVIK_COMMON_H_ |
| 49 | //Make inlines inline |
| 50 | #define DEX_INLINE inline |
| 51 | #include "DexOpcodes.h" |
| 52 | #include "InstrUtils.h" |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 53 | |
buzbee | c143c55 | 2011-08-20 17:38:58 -0700 | [diff] [blame^] | 54 | typedef art::JValue JValue; |
| 55 | typedef art::Thread Thread; |
| 56 | typedef art::Class Class; |
| 57 | typedef art::Array Array; |
| 58 | typedef art::Method Method; |
| 59 | typedef art::Object Object; |
| 60 | typedef art::Field Field; |
| 61 | typedef art::String String; |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 62 | |
| 63 | // From alloc/CardTable.h |
| 64 | #define GC_CARD_SHIFT 7 |
| 65 | |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 66 | #include "Compiler.h" |
| 67 | |
| 68 | #endif |