blob: 51d238ba5fadf26be0af25227c7e124ced86c824 [file] [log] [blame]
Elliott Hughes0f3c5532012-03-30 14:51:51 -07001/*
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 Liaoa8a9c342012-03-03 22:35:16 -080016
17#ifndef ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_H_
18#define ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_H_
19
20namespace art {
21
Shih-wei Liao113f4fc2012-03-04 14:28:35 -080022//----------------------------------------------------------------------------
23// Thread
24//----------------------------------------------------------------------------
25
Shih-wei Liaoa8a9c342012-03-03 22:35:16 -080026void art_push_shadow_frame_from_code(void* new_shadow_frame);
27
28void art_pop_shadow_frame_from_code();
29
Shih-wei Liao113f4fc2012-03-04 14:28:35 -080030
31//----------------------------------------------------------------------------
32// Exception
33//----------------------------------------------------------------------------
34
Shih-wei Liaoa8a9c342012-03-03 22:35:16 -080035bool art_is_exception_pending_from_code();
36
Shih-wei Liao113f4fc2012-03-04 14:28:35 -080037void art_throw_div_zero_from_code();
38
39void art_throw_array_bounds_from_code(int32_t length, int32_t index);
40
41void art_throw_no_such_method_from_code(int32_t method_idx);
42
43void art_throw_null_pointer_exception_from_code();
44
TDYa1274165a832012-04-03 17:47:16 -070045void art_throw_stack_overflow_from_code();
Shih-wei Liao113f4fc2012-03-04 14:28:35 -080046
47void art_throw_exception_from_code(Object* exception);
48
TDYa1272d702172012-04-01 15:15:13 -070049int32_t art_find_catch_block_from_code(Method* current_method, int32_t dex_pc);
Shih-wei Liao113f4fc2012-03-04 14:28:35 -080050
51
Shih-wei Liaoa8a9c342012-03-03 22:35:16 -080052void art_test_suspend_from_code();
53
54void art_set_current_thread_from_code(void* thread_object_addr);
55
Logan Chien2771fb12012-03-06 16:28:35 +080056//----------------------------------------------------------------------------
57// Runtime Support Function Lookup Callback
58//----------------------------------------------------------------------------
59
60void* art_find_runtime_support_func(void* context, char const* name);
61
Shih-wei Liaoa8a9c342012-03-03 22:35:16 -080062} // namespace art
63
64#endif // ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_H_