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 | |
Elliott Hughes | 54e7df1 | 2011-09-16 11:47:04 -0700 | [diff] [blame] | 23 | #include <assert.h> |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 24 | #include <stdbool.h> |
| 25 | #include <stdint.h> |
| 26 | #include <stdio.h> |
Elliott Hughes | 54e7df1 | 2011-09-16 11:47:04 -0700 | [diff] [blame] | 27 | |
Ian Rogers | 5d76c43 | 2011-10-31 21:42:49 -0700 | [diff] [blame^] | 28 | #include "card_table.h" |
buzbee | c143c55 | 2011-08-20 17:38:58 -0700 | [diff] [blame] | 29 | #include "class_linker.h" |
Brian Carlstrom | 1619286 | 2011-09-12 17:50:06 -0700 | [diff] [blame] | 30 | #include "compiler.h" |
buzbee | c143c55 | 2011-08-20 17:38:58 -0700 | [diff] [blame] | 31 | #include "dex_cache.h" |
Elliott Hughes | 54e7df1 | 2011-09-16 11:47:04 -0700 | [diff] [blame] | 32 | #include "logging.h" |
| 33 | #include "monitor.h" |
| 34 | #include "object.h" |
| 35 | #include "thread.h" |
buzbee | c143c55 | 2011-08-20 17:38:58 -0700 | [diff] [blame] | 36 | #include "utils.h" |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 37 | |
| 38 | // From Common.h |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 39 | typedef uint8_t u1; |
| 40 | typedef uint16_t u2; |
| 41 | typedef uint32_t u4; |
| 42 | typedef uint64_t u8; |
| 43 | typedef int8_t s1; |
| 44 | typedef int16_t s2; |
| 45 | typedef int32_t s4; |
| 46 | typedef int64_t s8; |
| 47 | typedef unsigned long long u8; |
| 48 | |
buzbee | c143c55 | 2011-08-20 17:38:58 -0700 | [diff] [blame] | 49 | //Skip old DexFile.h |
| 50 | #define LIBDEX_DEXFILE_H_ |
| 51 | //Skip old vm/Common.h |
| 52 | #define DALVIK_COMMON_H_ |
| 53 | //Make inlines inline |
| 54 | #define DEX_INLINE inline |
| 55 | #include "DexOpcodes.h" |
| 56 | #include "InstrUtils.h" |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 57 | |
buzbee | c143c55 | 2011-08-20 17:38:58 -0700 | [diff] [blame] | 58 | typedef art::Array Array; |
Brian Carlstrom | 1619286 | 2011-09-12 17:50:06 -0700 | [diff] [blame] | 59 | typedef art::Class Class; |
| 60 | typedef art::Compiler Compiler; |
| 61 | typedef art::Field Field; |
| 62 | typedef art::JValue JValue; |
buzbee | c143c55 | 2011-08-20 17:38:58 -0700 | [diff] [blame] | 63 | typedef art::Method Method; |
Brian Carlstrom | 3320cf4 | 2011-10-04 14:58:28 -0700 | [diff] [blame] | 64 | typedef art::CompiledMethod CompiledMethod; |
buzbee | c143c55 | 2011-08-20 17:38:58 -0700 | [diff] [blame] | 65 | typedef art::Object Object; |
buzbee | c143c55 | 2011-08-20 17:38:58 -0700 | [diff] [blame] | 66 | typedef art::String String; |
Brian Carlstrom | 1619286 | 2011-09-12 17:50:06 -0700 | [diff] [blame] | 67 | typedef art::Thread Thread; |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 68 | |
buzbee | ed3e930 | 2011-09-23 17:34:19 -0700 | [diff] [blame] | 69 | // use to switch visibility on DCHECK tracebacks |
| 70 | #if 1 |
| 71 | #define STATIC |
| 72 | #else |
| 73 | #define STATIC static |
| 74 | #endif |
| 75 | |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 76 | #include "Compiler.h" |
| 77 | |
| 78 | #endif |