blob: 1040b9015964d45fc458752b99603fd8c8bd6398 [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
TDYa12785321912012-04-01 15:24:56 -070022class Method;
23class Object;
24
Shih-wei Liao113f4fc2012-03-04 14:28:35 -080025//----------------------------------------------------------------------------
26// Thread
27//----------------------------------------------------------------------------
28
Shih-wei Liaoa8a9c342012-03-03 22:35:16 -080029void art_push_shadow_frame_from_code(void* new_shadow_frame);
30
31void art_pop_shadow_frame_from_code();
32
Shih-wei Liao113f4fc2012-03-04 14:28:35 -080033
34//----------------------------------------------------------------------------
35// Exception
36//----------------------------------------------------------------------------
37
Shih-wei Liaoa8a9c342012-03-03 22:35:16 -080038bool art_is_exception_pending_from_code();
39
Shih-wei Liao113f4fc2012-03-04 14:28:35 -080040void art_throw_div_zero_from_code();
41
42void art_throw_array_bounds_from_code(int32_t length, int32_t index);
43
44void art_throw_no_such_method_from_code(int32_t method_idx);
45
46void art_throw_null_pointer_exception_from_code();
47
TDYa1274165a832012-04-03 17:47:16 -070048void art_throw_stack_overflow_from_code();
Shih-wei Liao113f4fc2012-03-04 14:28:35 -080049
50void art_throw_exception_from_code(Object* exception);
51
TDYa1272d702172012-04-01 15:15:13 -070052int32_t art_find_catch_block_from_code(Method* current_method, int32_t dex_pc);
Shih-wei Liao113f4fc2012-03-04 14:28:35 -080053
54
Shih-wei Liaoa8a9c342012-03-03 22:35:16 -080055void art_test_suspend_from_code();
56
57void art_set_current_thread_from_code(void* thread_object_addr);
58
Logan Chien2771fb12012-03-06 16:28:35 +080059//----------------------------------------------------------------------------
60// Runtime Support Function Lookup Callback
61//----------------------------------------------------------------------------
62
63void* art_find_runtime_support_func(void* context, char const* name);
64
TDYa12785321912012-04-01 15:24:56 -070065void art_ensure_link_from_code(Method* method);
66
Shih-wei Liaoa8a9c342012-03-03 22:35:16 -080067} // namespace art
68
69#endif // ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_H_