File tree 3 files changed +235
-245
lines changed
3 files changed +235
-245
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ impl JumpTableData {
33
33
table : Vec :: with_capacity ( capacity) ,
34
34
}
35
35
}
36
+ /// Create a new jump table with the provided blocks
37
+ pub fn with_blocks ( table : Vec < Block > ) -> Self {
38
+ Self { table }
39
+ }
36
40
37
41
/// Get the number of table entries.
38
42
pub fn len ( & self ) -> usize {
Original file line number Diff line number Diff line change @@ -16,10 +16,7 @@ pub struct Config {
16
16
/// This value does not apply to block0 which takes the function params
17
17
/// and is thus governed by `signature_params`
18
18
pub block_signature_params : RangeInclusive < usize > ,
19
- /// Max number of jump tables generated per function
20
- /// Note, the actual number of jump tables may be larger if the Switch interface
21
- /// decides to insert more.
22
- pub jump_tables_per_function : RangeInclusive < usize > ,
19
+ /// Max number of jump tables entries to generate
23
20
pub jump_table_entries : RangeInclusive < usize > ,
24
21
25
22
/// The Switch API specializes either individual blocks or contiguous ranges.
@@ -66,7 +63,6 @@ impl Default for Config {
66
63
vars_per_function : 0 ..=16 ,
67
64
blocks_per_function : 0 ..=16 ,
68
65
block_signature_params : 0 ..=16 ,
69
- jump_tables_per_function : 0 ..=4 ,
70
66
jump_table_entries : 0 ..=16 ,
71
67
switch_cases : 0 ..=64 ,
72
68
// Ranges smaller than 2 don't make sense.
You can’t perform that action at this time.
0 commit comments