mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-13 16:15:16 +00:00
Remove optimization unit test
This commit is contained in:
parent
868fdfcc36
commit
3f9dd3dd4c
2 changed files with 0 additions and 152 deletions
|
@ -2367,9 +2367,4 @@ mod tests {
|
|||
"if (True and False) or (False and True):\n pass\n"
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_constant_optimization() {
|
||||
insta::assert_ron_snapshot!(compile_exec("1 + 2 + 3 + 4\n1.5 * 2.5"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,147 +0,0 @@
|
|||
---
|
||||
source: compiler/src/compile.rs
|
||||
expression: "compile_exec(\"1 + 2 + 3 + 4\\n1.5 * 2.5\")"
|
||||
---
|
||||
CodeObject(
|
||||
instructions: [
|
||||
LoadConst(
|
||||
idx: 0,
|
||||
),
|
||||
LoadConst(
|
||||
idx: 1,
|
||||
),
|
||||
BinaryOperation(
|
||||
op: Add,
|
||||
inplace: false,
|
||||
),
|
||||
LoadConst(
|
||||
idx: 2,
|
||||
),
|
||||
BinaryOperation(
|
||||
op: Add,
|
||||
inplace: false,
|
||||
),
|
||||
LoadConst(
|
||||
idx: 3,
|
||||
),
|
||||
BinaryOperation(
|
||||
op: Add,
|
||||
inplace: false,
|
||||
),
|
||||
Pop,
|
||||
LoadConst(
|
||||
idx: 4,
|
||||
),
|
||||
LoadConst(
|
||||
idx: 5,
|
||||
),
|
||||
BinaryOperation(
|
||||
op: Multiply,
|
||||
inplace: false,
|
||||
),
|
||||
Pop,
|
||||
LoadConst(
|
||||
idx: 6,
|
||||
),
|
||||
ReturnValue,
|
||||
],
|
||||
label_map: {},
|
||||
locations: [
|
||||
Location(
|
||||
row: 1,
|
||||
column: 1,
|
||||
),
|
||||
Location(
|
||||
row: 1,
|
||||
column: 5,
|
||||
),
|
||||
Location(
|
||||
row: 1,
|
||||
column: 5,
|
||||
),
|
||||
Location(
|
||||
row: 1,
|
||||
column: 9,
|
||||
),
|
||||
Location(
|
||||
row: 1,
|
||||
column: 9,
|
||||
),
|
||||
Location(
|
||||
row: 1,
|
||||
column: 13,
|
||||
),
|
||||
Location(
|
||||
row: 1,
|
||||
column: 13,
|
||||
),
|
||||
Location(
|
||||
row: 1,
|
||||
column: 13,
|
||||
),
|
||||
Location(
|
||||
row: 2,
|
||||
column: 1,
|
||||
),
|
||||
Location(
|
||||
row: 2,
|
||||
column: 7,
|
||||
),
|
||||
Location(
|
||||
row: 2,
|
||||
column: 7,
|
||||
),
|
||||
Location(
|
||||
row: 2,
|
||||
column: 7,
|
||||
),
|
||||
Location(
|
||||
row: 2,
|
||||
column: 7,
|
||||
),
|
||||
Location(
|
||||
row: 2,
|
||||
column: 7,
|
||||
),
|
||||
],
|
||||
flags: CodeFlags(
|
||||
bits: 8,
|
||||
),
|
||||
posonlyarg_count: 0,
|
||||
arg_names: [],
|
||||
varargs_name: None,
|
||||
kwonlyarg_names: [],
|
||||
varkeywords_name: None,
|
||||
source_path: "source_path",
|
||||
first_line_number: 0,
|
||||
obj_name: "<module>",
|
||||
constants: [
|
||||
Integer(
|
||||
value: (1, [
|
||||
1,
|
||||
]),
|
||||
),
|
||||
Integer(
|
||||
value: (1, [
|
||||
2,
|
||||
]),
|
||||
),
|
||||
Integer(
|
||||
value: (1, [
|
||||
3,
|
||||
]),
|
||||
),
|
||||
Integer(
|
||||
value: (1, [
|
||||
4,
|
||||
]),
|
||||
),
|
||||
Float(
|
||||
value: 1.5,
|
||||
),
|
||||
Float(
|
||||
value: 2.5,
|
||||
),
|
||||
None,
|
||||
],
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue