@@ -5,7 +5,6 @@ pub(super) struct GccExceptTable {
5
5
pub call_sites : CallSiteTable ,
6
6
pub actions : ActionTable ,
7
7
pub type_info : TypeInfoTable ,
8
- pub exception_specs : ExceptionSpecTable ,
9
8
}
10
9
11
10
impl GccExceptTable {
@@ -80,8 +79,7 @@ impl GccExceptTable {
80
79
// type_info
81
80
self . type_info . write ( w, encoding) ?;
82
81
83
- // exception specs
84
- self . exception_specs . write ( w) ?;
82
+ // exception specs (unused for rust)
85
83
86
84
// align to 4 bytes
87
85
while w. len ( ) % 4 != 0 {
@@ -194,11 +192,7 @@ impl Action {
194
192
fn write < W : Writer > ( & self , w : & mut W , action_table_offset : u64 ) -> gimli:: write:: Result < ( ) > {
195
193
// ttypeIndex
196
194
let ttype_index = match self . kind {
197
- ActionKind :: Cleanup => 0 ,
198
195
ActionKind :: Catch ( type_info_id) => type_info_id. 0 as i64 + 1 ,
199
- ActionKind :: ExceptionSpec ( exception_spec_offset) => {
200
- -( exception_spec_offset. 0 as i64 + 1 )
201
- }
202
196
} ;
203
197
w. write_sleb128 ( ttype_index) ?;
204
198
// actionOffset
@@ -215,12 +209,8 @@ impl Action {
215
209
}
216
210
217
211
#[ derive( Copy , Clone ) ]
218
- #[ expect( dead_code) ]
219
212
pub ( super ) enum ActionKind {
220
- Cleanup ,
221
213
Catch ( TypeInfoId ) ,
222
- // FIXME
223
- ExceptionSpec ( ExceptionSpecOffset ) ,
224
214
}
225
215
226
216
pub ( super ) struct TypeInfoTable {
@@ -257,53 +247,6 @@ impl TypeInfoTable {
257
247
#[ derive( Copy , Clone ) ]
258
248
pub ( super ) struct TypeInfoId ( u64 ) ;
259
249
260
- pub ( super ) struct ExceptionSpecTable {
261
- specs : Vec < ExceptionSpec > ,
262
- encoded_length : u64 ,
263
- }
264
-
265
- impl ExceptionSpecTable {
266
- pub ( super ) fn new ( ) -> ExceptionSpecTable {
267
- ExceptionSpecTable { specs : vec ! [ ] , encoded_length : 0 }
268
- }
269
-
270
- #[ expect( dead_code) ] // FIXME
271
- pub ( super ) fn add ( & mut self , exception_spec : ExceptionSpec ) -> ExceptionSpecOffset {
272
- let id = ExceptionSpecOffset ( self . encoded_length ) ;
273
- self . encoded_length += exception_spec. encoded_size ( ) ;
274
- self . specs . push ( exception_spec) ;
275
- id
276
- }
277
-
278
- fn write < W : Writer > ( & self , w : & mut W ) -> gimli:: write:: Result < ( ) > {
279
- for exception_spec in & self . specs {
280
- exception_spec. write ( w) ?;
281
- }
282
-
283
- Ok ( ( ) )
284
- }
285
- }
286
-
287
- #[ derive( Copy , Clone ) ]
288
- pub ( super ) struct ExceptionSpecOffset ( u64 ) ;
289
-
290
- pub ( super ) struct ExceptionSpec ( pub Vec < TypeInfoId > ) ;
291
-
292
- impl ExceptionSpec {
293
- fn encoded_size ( & self ) -> u64 {
294
- let mut len = LenWriter ( 0 ) ;
295
- self . write ( & mut len) . unwrap ( ) ;
296
- len. 0 as u64
297
- }
298
-
299
- fn write < W : Writer > ( & self , w : & mut W ) -> gimli:: write:: Result < ( ) > {
300
- for type_info_id in & self . 0 {
301
- w. write_uleb128 ( type_info_id. 0 + 1 ) ?;
302
- }
303
- w. write_u8 ( 0 )
304
- }
305
- }
306
-
307
250
struct LenWriter ( usize ) ;
308
251
309
252
impl Writer for LenWriter {
0 commit comments