Elliott Hughes | 0f3c553 | 2012-03-30 14:51:51 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2012 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 | */ |
Shih-wei Liao | a8a9c34 | 2012-03-03 22:35:16 -0800 | [diff] [blame] | 16 | |
| 17 | #ifndef ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_H_ |
| 18 | #define ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_H_ |
| 19 | |
| 20 | namespace art { |
| 21 | |
Shih-wei Liao | 113f4fc | 2012-03-04 14:28:35 -0800 | [diff] [blame] | 22 | //---------------------------------------------------------------------------- |
| 23 | // Thread |
| 24 | //---------------------------------------------------------------------------- |
| 25 | |
Shih-wei Liao | a8a9c34 | 2012-03-03 22:35:16 -0800 | [diff] [blame] | 26 | void art_push_shadow_frame_from_code(void* new_shadow_frame); |
| 27 | |
| 28 | void art_pop_shadow_frame_from_code(); |
| 29 | |
Shih-wei Liao | 113f4fc | 2012-03-04 14:28:35 -0800 | [diff] [blame] | 30 | |
| 31 | //---------------------------------------------------------------------------- |
| 32 | // Exception |
| 33 | //---------------------------------------------------------------------------- |
| 34 | |
Shih-wei Liao | a8a9c34 | 2012-03-03 22:35:16 -0800 | [diff] [blame] | 35 | bool art_is_exception_pending_from_code(); |
| 36 | |
Shih-wei Liao | 113f4fc | 2012-03-04 14:28:35 -0800 | [diff] [blame] | 37 | void art_throw_div_zero_from_code(); |
| 38 | |
| 39 | void art_throw_array_bounds_from_code(int32_t length, int32_t index); |
| 40 | |
| 41 | void art_throw_no_such_method_from_code(int32_t method_idx); |
| 42 | |
| 43 | void art_throw_null_pointer_exception_from_code(); |
| 44 | |
TDYa127 | 4165a83 | 2012-04-03 17:47:16 -0700 | [diff] [blame^] | 45 | void art_throw_stack_overflow_from_code(); |
Shih-wei Liao | 113f4fc | 2012-03-04 14:28:35 -0800 | [diff] [blame] | 46 | |
| 47 | void art_throw_exception_from_code(Object* exception); |
| 48 | |
TDYa127 | 2d70217 | 2012-04-01 15:15:13 -0700 | [diff] [blame] | 49 | int32_t art_find_catch_block_from_code(Method* current_method, int32_t dex_pc); |
Shih-wei Liao | 113f4fc | 2012-03-04 14:28:35 -0800 | [diff] [blame] | 50 | |
| 51 | |
Shih-wei Liao | a8a9c34 | 2012-03-03 22:35:16 -0800 | [diff] [blame] | 52 | void art_test_suspend_from_code(); |
| 53 | |
| 54 | void art_set_current_thread_from_code(void* thread_object_addr); |
| 55 | |
Logan Chien | 2771fb1 | 2012-03-06 16:28:35 +0800 | [diff] [blame] | 56 | //---------------------------------------------------------------------------- |
| 57 | // Runtime Support Function Lookup Callback |
| 58 | //---------------------------------------------------------------------------- |
| 59 | |
| 60 | void* art_find_runtime_support_func(void* context, char const* name); |
| 61 | |
Shih-wei Liao | a8a9c34 | 2012-03-03 22:35:16 -0800 | [diff] [blame] | 62 | } // namespace art |
| 63 | |
| 64 | #endif // ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_H_ |