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" |
Brian Carlstrom | 1619286 | 2011-09-12 17:50:06 -0700 | [diff] [blame] | 31 | #include "compiler.h" |
buzbee | c143c55 | 2011-08-20 17:38:58 -0700 | [diff] [blame] | 32 | #include "dex_cache.h" |
Elliott Hughes | 5f79133 | 2011-09-15 17:45:30 -0700 | [diff] [blame] | 33 | #include "sync.h" |
buzbee | c143c55 | 2011-08-20 17:38:58 -0700 | [diff] [blame] | 34 | #include "utils.h" |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 35 | |
| 36 | // From Common.h |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 37 | typedef uint8_t u1; |
| 38 | typedef uint16_t u2; |
| 39 | typedef uint32_t u4; |
| 40 | typedef uint64_t u8; |
| 41 | typedef int8_t s1; |
| 42 | typedef int16_t s2; |
| 43 | typedef int32_t s4; |
| 44 | typedef int64_t s8; |
| 45 | typedef unsigned long long u8; |
| 46 | |
buzbee | c143c55 | 2011-08-20 17:38:58 -0700 | [diff] [blame] | 47 | //Skip old DexFile.h |
| 48 | #define LIBDEX_DEXFILE_H_ |
| 49 | //Skip old vm/Common.h |
| 50 | #define DALVIK_COMMON_H_ |
| 51 | //Make inlines inline |
| 52 | #define DEX_INLINE inline |
| 53 | #include "DexOpcodes.h" |
| 54 | #include "InstrUtils.h" |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 55 | |
buzbee | c143c55 | 2011-08-20 17:38:58 -0700 | [diff] [blame] | 56 | typedef art::Array Array; |
Brian Carlstrom | 1619286 | 2011-09-12 17:50:06 -0700 | [diff] [blame] | 57 | typedef art::Class Class; |
| 58 | typedef art::Compiler Compiler; |
| 59 | typedef art::Field Field; |
| 60 | typedef art::JValue JValue; |
buzbee | c143c55 | 2011-08-20 17:38:58 -0700 | [diff] [blame] | 61 | typedef art::Method Method; |
| 62 | typedef art::Object Object; |
buzbee | c143c55 | 2011-08-20 17:38:58 -0700 | [diff] [blame] | 63 | typedef art::String String; |
Brian Carlstrom | 1619286 | 2011-09-12 17:50:06 -0700 | [diff] [blame] | 64 | typedef art::Thread Thread; |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 65 | |
| 66 | // From alloc/CardTable.h |
| 67 | #define GC_CARD_SHIFT 7 |
| 68 | |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 69 | #include "Compiler.h" |
| 70 | |
| 71 | #endif |