.githooks/
compiler/
kernel/
lib/
examples/
std/
arch/
rv64/
asm/
image/
tests.rad
16.7 KiB
shared/
tests/
asm.rad
32.4 KiB
atomics.rad
5.1 KiB
decode.rad
27.1 KiB
emit.rad
34.6 KiB
encode.rad
30.9 KiB
image.rad
6.1 KiB
isel.rad
138.3 KiB
printer.rad
19.2 KiB
shared.rad
21.1 KiB
tests.rad
73.3 KiB
vector.rad
59.4 KiB
rv64.rad
22.4 KiB
bits/
char/
collections/
fs/
hash/
lang/
mem/
sys/
arch.rad
68 B
bits.rad
1.6 KiB
char.rad
1.5 KiB
collections.rad
39 B
fmt.rad
11.6 KiB
fs.rad
11.0 KiB
hash.rad
41 B
intrinsics.rad
467 B
io.rad
1.7 KiB
lang.rad
335 B
mem.rad
12.0 KiB
mem.ras
919 B
process.rad
6.2 KiB
std.manifest
4.9 KiB
std.rad
349 B
sys.rad
1.0 KiB
testing.rad
2.4 KiB
tests.rad
26.6 KiB
vec.rad
3.2 KiB
scripts/
seed/
sublime/
test/
vim/
.gitignore
333 B
.gitsigners
224 B
AGENTS.md
8.3 KiB
CONTRIBUTING
2.1 KiB
LICENSE
1.1 KiB
Makefile
2.5 KiB
README
3.4 KiB
STYLE
3.2 KiB
std.lib
2.1 KiB
std.lib.test
1.1 KiB
lib/std/arch/rv64/image/tests.rad
raw
| 1 | //! Native image placement, relocation, and wire-header checks. |
| 2 | |
| 3 | use std::testing; |
| 4 | use std::lang::il; |
| 5 | use std::lang::alloc; |
| 6 | use std::mem::heap; |
| 7 | use std::lang::gen::data; |
| 8 | use std::lang::gen::labels; |
| 9 | use std::collections::dict; |
| 10 | use std::arch::rv64; |
| 11 | use std::arch::rv64::image; |
| 12 | use std::arch::rv64::emit; |
| 13 | use std::arch::rv64::encode; |
| 14 | |
| 15 | /// Arena for one emitter and its bounded relocation tables. |
| 16 | static MEMORY: [u8; 16777216] = [0; 16777216]; |
| 17 | |
| 18 | /// Code generation storage of one test program, allocated in the arena of its generator. |
| 19 | record Tables { |
| 20 | /// Block and function label tables. |
| 21 | funcLabels: labels::Labels, |
| 22 | /// Data symbol storage for [`rv64::finishProgram`]. |
| 23 | storage: rv64::Storage, |
| 24 | } |
| 25 | |
| 26 | /// Allocate the tables of a test program in `arena`. |
| 27 | fn tables(arena: &heap::Heap) -> Tables throws (alloc::AllocError) { |
| 28 | let mut blockOffsets: *mut [i32] = &mut []; |
| 29 | try blockOffsets.resize(labels::MAX_BLOCKS_PER_FN, 0, arena); |
| 30 | let mut funcEntries: *mut [dict::Entry] = &mut []; |
| 31 | try funcEntries.resize(labels::FUNC_TABLE_SIZE, dict::Entry { key: &[], value: 0 }, arena); |
| 32 | let mut dataSyms: *mut [data::DataSym] = &mut []; |
| 33 | try dataSyms.resize(3, data::DataSym { name: &[], addr: 0 }, arena); |
| 34 | let mut symEntries: *mut [dict::Entry] = &mut []; |
| 35 | try symEntries.resize(data::DATA_SYM_TABLE_SIZE, dict::Entry { key: &[], value: 0 }, arena); |
| 36 | return Tables { |
| 37 | funcLabels: labels::init(blockOffsets, funcEntries), |
| 38 | storage: rv64::Storage { dataSyms, dataSymTable: dict::init(symEntries) }, |
| 39 | }; |
| 40 | } |
| 41 | |
| 42 | /// Construct a small image with three disjoint high-address segments. |
| 43 | fn layout() -> image::Layout { |
| 44 | return image::Layout { |
| 45 | code: image::Segment { address: 0x80000000, size: 8 }, |
| 46 | roData: image::Segment { address: 0x80001000, size: 3 }, |
| 47 | rwData: image::Segment { address: 0x80002000, size: 4 }, |
| 48 | rwTail: 4092, |
| 49 | }; |
| 50 | } |
| 51 | |
| 52 | /// Check the exact 48-byte little-endian header. |
| 53 | @test fn header() throws (testing::TestError) { |
| 54 | let bytes = try image::header(layout()) catch { |
| 55 | throw testing::TestError::Failed; |
| 56 | }; |
| 57 | try testing::expectBytesEq( |
| 58 | &bytes[..], |
| 59 | &[ |
| 60 | 82, 65, 68, 73, 65, 78, 67, 69, |
| 61 | 0, 0, 0, 128, 0, 0, 0, 0, 8, 0, 0, 0, |
| 62 | 0, 16, 0, 128, 0, 0, 0, 0, 3, 0, 0, 0, |
| 63 | 0, 32, 0, 128, 0, 0, 0, 0, 4, 0, 0, 0, 252, 15, 0, 0, |
| 64 | ] |
| 65 | ); |
| 66 | } |
| 67 | |
| 68 | /// Parsing a header returns the layout that produced it. |
| 69 | @test fn parseRoundTrip() throws (testing::TestError) { |
| 70 | let item = layout(); |
| 71 | let bytes = try image::header(item) catch { |
| 72 | throw testing::TestError::Failed; |
| 73 | }; |
| 74 | let parsed = try image::parse(&bytes[..]) catch { |
| 75 | throw testing::TestError::Failed; |
| 76 | }; |
| 77 | try testing::expect(parsed.code.address == item.code.address); |
| 78 | try testing::expect(parsed.code.size == item.code.size); |
| 79 | try testing::expect(parsed.roData.address == item.roData.address); |
| 80 | try testing::expect(parsed.roData.size == item.roData.size); |
| 81 | try testing::expect(parsed.rwData.address == item.rwData.address); |
| 82 | try testing::expect(parsed.rwData.size == item.rwData.size); |
| 83 | try testing::expect(parsed.rwTail == item.rwTail); |
| 84 | } |
| 85 | |
| 86 | /// Check a rejected header. |
| 87 | fn parseFails(bytes: &[u8], expected: image::Error) throws (testing::TestError) { |
| 88 | let mut failed = false; |
| 89 | try image::parse(bytes) catch err { |
| 90 | try testing::expect(err == expected); |
| 91 | set failed = true; |
| 92 | }; |
| 93 | try testing::expect(failed); |
| 94 | } |
| 95 | |
| 96 | /// Parsing rejects short input, a bad signature and an invalid layout. |
| 97 | @test fn parseRejects() throws (testing::TestError) { |
| 98 | let mut bytes = try image::header(layout()) catch { |
| 99 | throw testing::TestError::Failed; |
| 100 | }; |
| 101 | try parseFails(&bytes[.. image::HEADER_SIZE - 1], image::Error::Truncated); |
| 102 | try parseFails(&bytes[.. 0], image::Error::Truncated); |
| 103 | set bytes[0] = 0; |
| 104 | try parseFails(&bytes[..], image::Error::Signature); |
| 105 | set bytes[0] = 82; |
| 106 | // The rwdata address becomes unaligned. |
| 107 | set bytes[32] = 1; |
| 108 | try parseFails(&bytes[..], image::Error::Alignment); |
| 109 | } |
| 110 | |
| 111 | /// Check a rejected image layout. |
| 112 | fn invalid(item: image::Layout, expected: image::Error) throws (testing::TestError) { |
| 113 | let mut failed = false; |
| 114 | try image::validate(item) catch err { |
| 115 | try testing::expect(err == expected); |
| 116 | set failed = true; |
| 117 | }; |
| 118 | try testing::expect(failed); |
| 119 | } |
| 120 | |
| 121 | /// Check overlap, alignment, and overflow failures. |
| 122 | @test fn validation() throws (testing::TestError) { |
| 123 | let mut item = layout(); |
| 124 | set item.rwData.address = item.roData.address; |
| 125 | try invalid(item, image::Error::Overlap); |
| 126 | set item = layout(); |
| 127 | set item.roData.address = item.code.address; |
| 128 | try invalid(item, image::Error::Overlap); |
| 129 | set item = layout(); |
| 130 | set item.rwData.address += 1; |
| 131 | try invalid(item, image::Error::Alignment); |
| 132 | set item = layout(); |
| 133 | set item.code.size = 6; |
| 134 | try invalid(item, image::Error::Alignment); |
| 135 | set item = layout(); |
| 136 | set item.rwTail = 0xffffffff; |
| 137 | try invalid(item, image::Error::Overflow); |
| 138 | set item = layout(); |
| 139 | set item.rwData.address = 0xfffffffffffffff8; |
| 140 | try invalid(item, image::Error::Overflow); |
| 141 | set item = layout(); |
| 142 | set item.roData.address = item.code.address + 8; |
| 143 | try image::validate(item) catch { |
| 144 | throw testing::TestError::Failed; |
| 145 | }; |
| 146 | } |
| 147 | |
| 148 | /// Check AUIPC/ADDI limits without overflowing unsigned address arithmetic. |
| 149 | @test fn displacements() throws (testing::TestError) { |
| 150 | try testing::expect(image::displacement(0x180000000, 0x180002000) == 8192); |
| 151 | try testing::expect(image::displacement(0x180002000, 0x180000000) == -8192); |
| 152 | try testing::expect(image::displacement(0, 0x7ffff7ff) == 0x7ffff7ff); |
| 153 | try testing::expect(image::displacement(0, 0x7ffff800) == nil); |
| 154 | try testing::expect(image::displacement(0x80000000, 0) == -2147483648); |
| 155 | try testing::expect(image::displacement(0x80000001, 0) == nil); |
| 156 | try testing::expect(image::displacement(0, 0xffffffffffffffff) == nil); |
| 157 | try testing::expect(image::displacement(0xffffffffffffffff, 0) == nil); |
| 158 | } |
| 159 | |
| 160 | /// Check high physical placement, zero-fill extents, and 64-bit data relocations. |
| 161 | @test unsafe fn nativeProgram() throws (testing::TestError) { |
| 162 | let arena = heap::over(&mut MEMORY[..]); |
| 163 | let case Tables { funcLabels, storage } = try! tables(arena) else panic "nativeProgram: tables"; |
| 164 | let mut generator = try! rv64::beginProgram( |
| 165 | rv64::ProgramOptions { |
| 166 | stack: rv64::StackCheck::Off, |
| 167 | entryPatch: rv64::EntryPatch::None, |
| 168 | debug: false, |
| 169 | placement: image::Placement::Physical { |
| 170 | code: 0x180000000, roData: 0x180001000, rwData: 0x180002000 |
| 171 | }, |
| 172 | }, |
| 173 | arena, |
| 174 | funcLabels |
| 175 | ); |
| 176 | try! emit::recordFunc(&mut generator.e, "p::entry"); |
| 177 | try! emit::recordFuncOffset(&mut generator.e, "p::entry"); |
| 178 | try! emit::recordDataAddrLoad(&mut generator.e, "p::pointer", rv64::A0); |
| 179 | try! emit::recordDataAddrLoad(&mut generator.e, "p::zero", rv64::A1); |
| 180 | let globals = &[ |
| 181 | il::Data { |
| 182 | name: "p::pointer", |
| 183 | size: 8, |
| 184 | alignment: 8, |
| 185 | layout: 0, |
| 186 | readOnly: false, |
| 187 | heap: nil, |
| 188 | isZeroInit: false, |
| 189 | values: &[il::DataValue { item: il::DataItem::Fn("p::entry"), count: 1 }], |
| 190 | }, |
| 191 | il::Data { |
| 192 | name: "p::zero", |
| 193 | size: 4096, |
| 194 | alignment: 8, |
| 195 | layout: 0, |
| 196 | readOnly: false, |
| 197 | heap: nil, |
| 198 | isZeroInit: true, |
| 199 | values: &[], |
| 200 | }, |
| 201 | ]; |
| 202 | let mut ro: [u8; 8] = [0; 8]; |
| 203 | let mut rw: [u8; 8] = [0; 8]; |
| 204 | let result = try rv64::finishProgram( |
| 205 | &mut generator, globals, storage, &[], &mut ro[..], &mut rw[..] |
| 206 | ) catch { |
| 207 | throw testing::TestError::Failed; |
| 208 | }; |
| 209 | try testing::expect(result.layout.code.address == 0x180000000); |
| 210 | try testing::expect(result.layout.rwData.size == 8); |
| 211 | try testing::expect(result.layout.rwTail == 4096); |
| 212 | try testing::expectBytesEq(&rw[..], &[0, 0, 0, 128, 1, 0, 0, 0]); |
| 213 | try testing::expect(result.code[0] == encode::auipc(rv64::A0, 2)); |
| 214 | try testing::expect(result.code[1] == encode::addi(rv64::A0, rv64::A0, 0)); |
| 215 | try testing::expect(result.code[2] == encode::auipc(rv64::A1, 2)); |
| 216 | try testing::expect(result.code[3] == encode::addi(rv64::A1, rv64::A1, 0)); |
| 217 | } |
| 218 | |
| 219 | /// Check bounded data-layout failure without wrapped addresses or symbol writes. |
| 220 | @test unsafe fn dataLayout() throws (testing::TestError) { |
| 221 | let item = data::Data { |
| 222 | name: "p::data", |
| 223 | size: 16, |
| 224 | alignment: 8, |
| 225 | readOnly: false, |
| 226 | isZeroInit: true, |
| 227 | values: &[], |
| 228 | }; |
| 229 | unsafe static syms: [data::DataSym; 1] = undefined; |
| 230 | let mut count: u32 = 0; |
| 231 | let mut failed = false; |
| 232 | try data::layoutSection( |
| 233 | &[item], &mut syms[..], &mut count, 0xfffffffffffffff8, false |
| 234 | ) catch err { |
| 235 | try testing::expect(err == data::Error::Overflow); |
| 236 | set failed = true; |
| 237 | }; |
| 238 | try testing::expect(failed and count == 0); |
| 239 | set failed = false; |
| 240 | try data::layoutSection(&[item], &mut syms[.. 0], &mut count, 0x80000000, false) catch err { |
| 241 | try testing::expect(err == data::Error::Capacity); |
| 242 | set failed = true; |
| 243 | }; |
| 244 | try testing::expect(failed and count == 0); |
| 245 | set failed = false; |
| 246 | try data::layoutSectionAtOffset( |
| 247 | &[item], &mut syms[..], &mut count, 0, 0xfffffff8, false |
| 248 | ) catch err { |
| 249 | try testing::expect(err == data::Error::Overflow); |
| 250 | set failed = true; |
| 251 | }; |
| 252 | try testing::expect(failed and count == 0); |
| 253 | } |
| 254 | |
| 255 | /// Keep declared symbol extents and alignment gaps in initialized data. |
| 256 | @test unsafe fn initializedExtents() throws (testing::TestError) { |
| 257 | let arena = heap::over(&mut MEMORY[..]); |
| 258 | let case Tables { funcLabels, storage } = try! tables(arena) |
| 259 | else panic "initializedExtents: tables"; |
| 260 | let mut generator = try! rv64::beginProgram( |
| 261 | rv64::ProgramOptions { |
| 262 | stack: rv64::StackCheck::Off, |
| 263 | entryPatch: rv64::EntryPatch::None, |
| 264 | debug: false, |
| 265 | placement: image::Placement::Physical { |
| 266 | code: 0x80000000, roData: 0x80001000, rwData: 0x80002000 |
| 267 | }, |
| 268 | }, |
| 269 | arena, |
| 270 | funcLabels |
| 271 | ); |
| 272 | try! emit::recordDataAddrLoad(&mut generator.e, "p::second", rv64::A0); |
| 273 | let globals = &[ |
| 274 | il::Data { |
| 275 | name: "p::first", |
| 276 | size: 5, |
| 277 | alignment: 1, |
| 278 | layout: 0, |
| 279 | readOnly: false, |
| 280 | heap: nil, |
| 281 | isZeroInit: false, |
| 282 | values: &[il::DataValue { item: il::DataItem::Str("a"), count: 1 }], |
| 283 | }, |
| 284 | il::Data { |
| 285 | name: "p::second", |
| 286 | size: 8, |
| 287 | alignment: 8, |
| 288 | layout: 0, |
| 289 | readOnly: false, |
| 290 | heap: nil, |
| 291 | isZeroInit: false, |
| 292 | values: &[il::DataValue { item: il::DataItem::Str("b"), count: 1 }], |
| 293 | }, |
| 294 | ]; |
| 295 | let mut ro: [u8; 0] = []; |
| 296 | let mut rw: [u8; 16] = [255; 16]; |
| 297 | let result = try rv64::finishProgram( |
| 298 | &mut generator, globals, storage, &[], &mut ro[..], &mut rw[..] |
| 299 | ) catch { |
| 300 | throw testing::TestError::Failed; |
| 301 | }; |
| 302 | try testing::expect(result.layout.rwData.size == 16); |
| 303 | try testing::expect(result.code[0] == encode::auipc(rv64::A0, 2)); |
| 304 | try testing::expect(result.code[1] == encode::addi(rv64::A0, rv64::A0, 8)); |
| 305 | try testing::expectBytesEq(&rw[..], &[97, 0, 0, 0, 0, 0, 0, 0, 98, 0, 0, 0, 0, 0, 0, 0]); |
| 306 | } |
| 307 | |
| 308 | /// Check that a hosted program produces a valid header with its zero-fill extent. |
| 309 | @test unsafe fn hostedProgram() throws (testing::TestError) { |
| 310 | let arena = heap::over(&mut MEMORY[..]); |
| 311 | let case Tables { funcLabels, storage } = try! tables(arena) else panic "hostedProgram: tables"; |
| 312 | let mut generator = try! rv64::beginProgram( |
| 313 | rv64::ProgramOptions { |
| 314 | stack: rv64::StackCheck::Off, |
| 315 | entryPatch: rv64::EntryPatch::None, |
| 316 | debug: false, |
| 317 | placement: image::Placement::Hosted, |
| 318 | }, |
| 319 | arena, |
| 320 | funcLabels |
| 321 | ); |
| 322 | try! emit::recordDataAddrLoad(&mut generator.e, "p::value", rv64::A0); |
| 323 | try! emit::recordDataAddrLoad(&mut generator.e, "p::zero", rv64::A1); |
| 324 | let globals = &[ |
| 325 | il::Data { |
| 326 | name: "p::text", |
| 327 | size: 3, |
| 328 | alignment: 1, |
| 329 | layout: 0, |
| 330 | readOnly: true, |
| 331 | heap: nil, |
| 332 | isZeroInit: false, |
| 333 | values: &[il::DataValue { item: il::DataItem::Str("abc"), count: 1 }], |
| 334 | }, |
| 335 | il::Data { |
| 336 | name: "p::value", |
| 337 | size: 8, |
| 338 | alignment: 8, |
| 339 | layout: 0, |
| 340 | readOnly: false, |
| 341 | heap: nil, |
| 342 | isZeroInit: false, |
| 343 | values: &[ |
| 344 | il::DataValue { |
| 345 | item: il::DataItem::Val { typ: il::Type::W64, val: 42 }, count: 1 |
| 346 | }, |
| 347 | ], |
| 348 | }, |
| 349 | il::Data { |
| 350 | name: "p::zero", |
| 351 | size: 4096, |
| 352 | alignment: 8, |
| 353 | layout: 0, |
| 354 | readOnly: false, |
| 355 | heap: nil, |
| 356 | isZeroInit: true, |
| 357 | values: &[], |
| 358 | }, |
| 359 | ]; |
| 360 | let mut ro: [u8; 8] = [0; 8]; |
| 361 | let mut rw: [u8; 8] = [0; 8]; |
| 362 | let result = try rv64::finishProgram( |
| 363 | &mut generator, globals, storage, &[], &mut ro[..], &mut rw[..] |
| 364 | ) catch { |
| 365 | throw testing::TestError::Failed; |
| 366 | }; |
| 367 | let item = result.layout; |
| 368 | try testing::expect(item.roData.address == rv64::RO_DATA_BASE as u64); |
| 369 | try testing::expect(item.roData.size == 3); |
| 370 | try testing::expect(item.code.address == rv64::RO_DATA_BASE as u64 + 8); |
| 371 | try testing::expect(item.code.size == 16); |
| 372 | try testing::expect(item.rwData.address == rv64::RW_DATA_BASE as u64); |
| 373 | try testing::expect(item.rwData.size == 8); |
| 374 | try testing::expect(item.rwTail == 4096); |
| 375 | let bytes = try image::header(item) catch { |
| 376 | throw testing::TestError::Failed; |
| 377 | }; |
| 378 | try testing::expectBytesEq(&bytes[.. 8], &[82, 65, 68, 73, 65, 78, 67, 69]); |
| 379 | try testing::expect(bytes[40] == 8 and bytes[44] == 0 and bytes[45] == 16); |
| 380 | } |
| 381 | |
| 382 | /// Check the layout of a hosted image with no writable data. |
| 383 | @test fn hostedLayout() throws (testing::TestError) { |
| 384 | let item = rv64::hostedLayout(12, 5); |
| 385 | try testing::expect(item.roData.address == rv64::RO_DATA_BASE as u64); |
| 386 | try testing::expect(item.roData.size == 5); |
| 387 | try testing::expect(item.code.address == rv64::RO_DATA_BASE as u64 + 8); |
| 388 | try testing::expect(item.code.size == 12); |
| 389 | try testing::expect(item.rwData.address == rv64::RW_DATA_BASE as u64); |
| 390 | try testing::expect(item.rwData.size == 0 and item.rwTail == 0); |
| 391 | try image::validate(item) catch { |
| 392 | throw testing::TestError::Failed; |
| 393 | }; |
| 394 | } |
| 395 | |
| 396 | /// A heap region becomes a header that holds the used bytes, the size and the address of a |
| 397 | /// pool of zero-filled data aligned to sixteen bytes. Other data stays as it is. |
| 398 | @test unsafe fn expandHeap() throws (testing::TestError) { |
| 399 | let arena = heap::over(&mut MEMORY[..]); |
| 400 | let plain = il::Data { |
| 401 | name: "p::plain", |
| 402 | size: 8, |
| 403 | alignment: 8, |
| 404 | layout: 0, |
| 405 | readOnly: true, |
| 406 | heap: nil, |
| 407 | isZeroInit: false, |
| 408 | values: &[], |
| 409 | }; |
| 410 | let unchanged = try! data::prepare(&[plain], arena); |
| 411 | assert unchanged.len == 1; |
| 412 | assert unchanged[0].name == plain.name and unchanged[0].size == plain.size; |
| 413 | |
| 414 | let region = il::Data { |
| 415 | name: "p::pool", |
| 416 | size: 4096, |
| 417 | alignment: 1, |
| 418 | layout: 0, |
| 419 | readOnly: false, |
| 420 | heap: il::HeapType::Typed, |
| 421 | isZeroInit: true, |
| 422 | values: &[], |
| 423 | }; |
| 424 | let expanded = try! data::prepare(&[plain, region], arena); |
| 425 | try testing::expect(expanded.len == 3); |
| 426 | try testing::expect(expanded[0].name == "p::plain"); |
| 427 | let header = expanded[1]; |
| 428 | try testing::expect(header.name == "p::pool" and header.size == heap::HEADER_SIZE); |
| 429 | try testing::expect(header.alignment == 8 and not header.isZeroInit and not header.readOnly); |
| 430 | try testing::expect(header.values.len == 4); |
| 431 | try testing::expect( |
| 432 | header.values[0] == il::DataValue { |
| 433 | item: il::DataItem::Val { typ: il::Type::W64, val: 0 }, count: 1 |
| 434 | } |
| 435 | ); |
| 436 | try testing::expect( |
| 437 | header.values[1] == il::DataValue { |
| 438 | item: il::DataItem::Val { typ: il::Type::W64, val: 4096 }, count: 1 |
| 439 | } |
| 440 | ); |
| 441 | let pool = expanded[2]; |
| 442 | try testing::expect(pool.size == 4096 and pool.alignment == heap::POOL_ALIGNMENT); |
| 443 | try testing::expect(pool.isZeroInit and pool.values.len == 0); |
| 444 | let case il::DataItem::Sym(target) = header.values[2].item else { |
| 445 | throw testing::TestError::Failed; |
| 446 | }; |
| 447 | try testing::expect(target == pool.name and pool.name <> header.name); |
| 448 | // The fourth word is zero. |
| 449 | try testing::expect( |
| 450 | header.values[3] == il::DataValue { |
| 451 | item: il::DataItem::Val { typ: il::Type::W64, val: 0 }, count: 1 |
| 452 | } |
| 453 | ); |
| 454 | } |