Merge branch 'master' into pca954x_select_api
This commit is contained in:
commit
41355e27f5
@ -273,7 +273,7 @@ pub unsafe extern fn raise(exception: *const Exception) -> ! {
|
|||||||
error!("too many nested exceptions");
|
error!("too many nested exceptions");
|
||||||
// TODO: better reporting?
|
// TODO: better reporting?
|
||||||
let exception = Exception {
|
let exception = Exception {
|
||||||
id: get_exception_id("runtimeerror"),
|
id: get_exception_id("RuntimeError"),
|
||||||
file: file!().as_c_slice(),
|
file: file!().as_c_slice(),
|
||||||
line: line!(),
|
line: line!(),
|
||||||
column: column!(),
|
column: column!(),
|
||||||
@ -405,13 +405,18 @@ extern fn stop_fn(_version: c_int,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static EXCEPTION_ID_LOOKUP: [(&str, u32); 6] = [
|
// Must be kept in sync with preallocate_runtime_exception_names() in artiq/language/embedding_map.py
|
||||||
("runtimeerror", 0),
|
static EXCEPTION_ID_LOOKUP: [(&str, u32); 10] = [
|
||||||
|
("RuntimeError", 0),
|
||||||
("RTIOUnderflow", 1),
|
("RTIOUnderflow", 1),
|
||||||
("RTIOOverflow", 2),
|
("RTIOOverflow", 2),
|
||||||
("RTIODestinationUnreachable", 3),
|
("RTIODestinationUnreachable", 3),
|
||||||
("DMAError", 4),
|
("DMAError", 4),
|
||||||
("I2CError", 5),
|
("I2CError", 5),
|
||||||
|
("CacheError", 6),
|
||||||
|
("SPIError", 7),
|
||||||
|
("ZeroDivisionError", 8),
|
||||||
|
("IndexError", 9)
|
||||||
];
|
];
|
||||||
|
|
||||||
pub fn get_exception_id(name: &str) -> u32 {
|
pub fn get_exception_id(name: &str) -> u32 {
|
||||||
|
@ -203,6 +203,11 @@ pub fn resolve(required: &[u8]) -> Option<u32> {
|
|||||||
|
|
||||||
// exceptions
|
// exceptions
|
||||||
api!(_Unwind_Resume = unwind::_Unwind_Resume),
|
api!(_Unwind_Resume = unwind::_Unwind_Resume),
|
||||||
|
api!(__nac3_personality = eh_artiq::artiq_personality),
|
||||||
|
api!(__nac3_raise = eh_artiq::raise),
|
||||||
|
api!(__nac3_resume = eh_artiq::resume),
|
||||||
|
api!(__nac3_end_catch = eh_artiq::end_catch),
|
||||||
|
// legacy exception symbols
|
||||||
api!(__artiq_personality = eh_artiq::artiq_personality),
|
api!(__artiq_personality = eh_artiq::artiq_personality),
|
||||||
api!(__artiq_raise = eh_artiq::raise),
|
api!(__artiq_raise = eh_artiq::raise),
|
||||||
api!(__artiq_resume = eh_artiq::resume),
|
api!(__artiq_resume = eh_artiq::resume),
|
||||||
|
Loading…
Reference in New Issue
Block a user