Compile just start and stop of a slice (for BINARY_SLICE/STORE_SLICE) = codegen_slice_two_parts
(&mut self, s: &ast::ExprSlice)
| 491 | /// Compile just start and stop of a slice (for BINARY_SLICE/STORE_SLICE) |
| 492 | // = codegen_slice_two_parts |
| 493 | fn compile_slice_two_parts(&mut self, s: &ast::ExprSlice) -> CompileResult<()> { |
| 494 | // Compile lower (or None) |
| 495 | if let Some(lower) = &s.lower { |
| 496 | self.compile_expression(lower)?; |
| 497 | } else { |
| 498 | self.emit_load_const(ConstantData::None); |
| 499 | } |
| 500 | |
| 501 | // Compile upper (or None) |
| 502 | if let Some(upper) = &s.upper { |
| 503 | self.compile_expression(upper)?; |
| 504 | } else { |
| 505 | self.emit_load_const(ConstantData::None); |
| 506 | } |
| 507 | |
| 508 | Ok(()) |
| 509 | } |
| 510 | /// Compile a subscript expression |
| 511 | // = compiler_subscript |
| 512 | fn compile_subscript( |
no test coverage detected