This repository was archived by the owner on Jun 10, 2024. It is now read-only.
File tree 11 files changed +12
-13
lines changed
liblumen_eir_interpreter/src/exec
11 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ impl FreeBlocks {
54
54
let mut cursor = self . addr_tree . front ( ) ;
55
55
let mut result = None ;
56
56
57
- let aligned = layout. pad_to_align ( ) . unwrap ( ) ;
57
+ let aligned = layout. pad_to_align ( ) ;
58
58
let requested = aligned. size ( ) ;
59
59
60
60
while let Some ( block) = cursor. get ( ) {
@@ -77,7 +77,7 @@ impl FreeBlocks {
77
77
let mut result = None ;
78
78
let mut best_size = 0 ;
79
79
80
- let aligned = layout. pad_to_align ( ) . unwrap ( ) ;
80
+ let aligned = layout. pad_to_align ( ) ;
81
81
let requested = aligned. size ( ) ;
82
82
83
83
match self . order {
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ impl HeapAlloc for HeapFragment {
123
123
use liblumen_core:: sys:: sysconf:: MIN_ALIGN ;
124
124
125
125
// Ensure layout has alignment padding
126
- let layout = layout. align_to ( MIN_ALIGN ) . unwrap ( ) . pad_to_align ( ) . unwrap ( ) ;
126
+ let layout = layout. align_to ( MIN_ALIGN ) . unwrap ( ) . pad_to_align ( ) ;
127
127
// Capture the base pointer for this allocation
128
128
let top = self . heap_top ( ) as * mut u8 ;
129
129
// Calculate available space and fail if not enough is free
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ impl HeapAlloc for OldHeap {
85
85
unsafe fn alloc_layout ( & mut self , layout : Layout ) -> AllocResult < NonNull < Term > > {
86
86
use liblumen_core:: sys:: sysconf:: MIN_ALIGN ;
87
87
88
- let layout = layout. align_to ( MIN_ALIGN ) . unwrap ( ) . pad_to_align ( ) . unwrap ( ) ;
88
+ let layout = layout. align_to ( MIN_ALIGN ) . unwrap ( ) . pad_to_align ( ) ;
89
89
90
90
let needed = layout. size ( ) ;
91
91
let available = self . heap_available ( ) * mem:: size_of :: < Term > ( ) ;
Original file line number Diff line number Diff line change 72
72
73
73
let layout = Layout :: from_size_align ( words * mem:: size_of :: < Term > ( ) , MIN_ALIGN )
74
74
. unwrap ( )
75
- . pad_to_align ( )
76
- . unwrap ( ) ;
75
+ . pad_to_align ( ) ;
77
76
let total_size = layout. size ( ) ;
78
77
79
78
// Allocate space for move
Original file line number Diff line number Diff line change @@ -353,7 +353,7 @@ impl HeapAlloc for YoungHeap {
353
353
unsafe fn alloc_layout ( & mut self , layout : Layout ) -> AllocResult < NonNull < Term > > {
354
354
use liblumen_core:: sys:: sysconf:: MIN_ALIGN ;
355
355
356
- let layout = layout. align_to ( MIN_ALIGN ) . unwrap ( ) . pad_to_align ( ) . unwrap ( ) ;
356
+ let layout = layout. align_to ( MIN_ALIGN ) . unwrap ( ) . pad_to_align ( ) ;
357
357
358
358
let needed = layout. size ( ) ;
359
359
let available = self . heap_available ( ) * mem:: size_of :: < Term > ( ) ;
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ impl HeapBin {
90
90
// We pad to alignment so that the Layout produced here
91
91
// matches that returned by `Layout::for_value` on the
92
92
// final `HeapBin`
93
- let layout = unpadded_layout. pad_to_align ( ) . unwrap ( ) ;
93
+ let layout = unpadded_layout. pad_to_align ( ) ;
94
94
95
95
( layout, flags_offset, data_offset)
96
96
}
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ impl ProcBin {
134
134
// We pad to alignment so that the Layout produced here
135
135
// matches that returned by `Layout::for_value` on the
136
136
// final `ProcBinInner`
137
- let layout = unpadded_layout. pad_to_align ( ) . unwrap ( ) ;
137
+ let layout = unpadded_layout. pad_to_align ( ) ;
138
138
139
139
unsafe {
140
140
let non_null = sys_alloc:: alloc ( layout) ?;
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ impl ClosureLayout {
59
59
let ( layout, code_offset) = layout. extend ( Layout :: new :: < Option < Code > > ( ) ) . unwrap ( ) ;
60
60
let ( layout, env_offset) = layout. extend ( Layout :: for_value ( env) ) . unwrap ( ) ;
61
61
62
- let layout = layout. pad_to_align ( ) . unwrap ( ) ;
62
+ let layout = layout. pad_to_align ( ) ;
63
63
64
64
Self {
65
65
layout,
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ impl Tuple {
112
112
// We pad to alignment so that the Layout produced here
113
113
// matches that returned by `Layout::for_value` on the
114
114
// final `Tuple`
115
- let layout = base_layout. pad_to_align ( ) . unwrap ( ) ;
115
+ let layout = base_layout. pad_to_align ( ) ;
116
116
117
117
( layout, data_offset)
118
118
}
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ impl HeapAlloc for RegionHeap {
142
142
/// process heap during garbage collection
143
143
unsafe fn alloc_layout ( & mut self , layout : Layout ) -> AllocResult < NonNull < Term > > {
144
144
// Ensure layout has alignment padding
145
- let layout = layout. align_to ( MIN_ALIGN ) . unwrap ( ) . pad_to_align ( ) . unwrap ( ) ;
145
+ let layout = layout. align_to ( MIN_ALIGN ) . unwrap ( ) . pad_to_align ( ) ;
146
146
// Capture the base pointer for this allocation
147
147
let top = self . top ;
148
148
// Calculate available space and fail if not enough is free
Original file line number Diff line number Diff line change @@ -313,7 +313,7 @@ impl CallExecutor {
313
313
314
314
let mut exec = self ;
315
315
// Outer loop for optimized execution within the current function
316
- ' outer : loop {
316
+ loop {
317
317
// Insert block argument into environment
318
318
let block_arg_vals = fun. fun . block_args ( block) ;
319
319
//trace!("{:?} {:?}", &block_arg_vals, &exec.next_args);
You can’t perform that action at this time.
0 commit comments