Skip to content

Commit db4fd0e

Browse files
committed
Improve the way we return values from modules
1 parent c5f3336 commit db4fd0e

File tree

12 files changed

+72
-62
lines changed

12 files changed

+72
-62
lines changed

graalpython/com.oracle.graal.python.test/testData/goldenFiles/CompilerTests/testImportAs.co

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ Disassembly of <module>:
77
000000 9 POP_TOP
88
000000 10 IMPORT_FROM 2 (c)
99
000000 12 STORE_NAME 3 (d)
10-
000000 14 RETURN_VALUE
10+
000000 14 POP_TOP
11+
000000 15 LOAD_NONE
12+
000000 16 RETURN_VALUE

graalpython/com.oracle.graal.python.test/testData/goldenFiles/CompilerTests/testImportFrom.co

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ Disassembly of <module>:
66
000000 8 STORE_NAME 1 (sqrt)
77
000000 10 IMPORT_FROM 2 (sin)
88
000000 12 STORE_NAME 3 (sine)
9-
000000 14 RETURN_VALUE
9+
000000 14 POP_TOP
10+
000000 15 LOAD_NONE
11+
000000 16 RETURN_VALUE

graalpython/com.oracle.graal.python.test/testData/goldenFiles/CompilerTests/testLoadClassDefRef.co

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Disassembly of <module>:
44
000030 5 LOAD_NAME 0 (f)
55
000032 7 LOAD_BYTE_O 1
66
000030 9 CALL_FUNCTION 1
7-
000030 11 RETURN_VALUE
7+
000000 11 RETURN_VALUE
88

99
Disassembly of f:
1010
000015 0 LOAD_BUILD_CLASS

graalpython/com.oracle.graal.python.test/testData/goldenFiles/CompilerTests/testTryExcept.co

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ Disassembly of <module>:
4747
000121 >> 78 LOAD_NAME 0 (print)
4848
000127 80 LOAD_STRING 4 ('after')
4949
000121 82 CALL_FUNCTION 1
50-
000121 84 RETURN_VALUE
50+
000104 84 RETURN_VALUE

graalpython/com.oracle.graal.python.test/testData/goldenFiles/CompilerTests/testTryExceptBare.co

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ Disassembly of <module>:
3737
000109 >> 59 LOAD_NAME 0 (print)
3838
000115 61 LOAD_STRING 4 ('after')
3939
000109 63 CALL_FUNCTION 1
40-
000109 65 RETURN_VALUE
40+
000088 65 RETURN_VALUE

graalpython/com.oracle.graal.python.test/testData/goldenFiles/CompilerTests/testTryExceptElse.co

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ Disassembly of <module>:
5252
000143 >> 87 LOAD_NAME 0 (print)
5353
000149 89 LOAD_STRING 5 ('after')
5454
000143 91 CALL_FUNCTION 1
55-
000143 93 RETURN_VALUE
55+
000129 93 RETURN_VALUE

graalpython/com.oracle.graal.python.test/testData/goldenFiles/CompilerTests/testTryExceptElseFinally.co

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ Disassembly of <module>:
6868
000171 112 LOAD_NAME 0 (print)
6969
000177 114 LOAD_STRING 6 ('after')
7070
000171 116 CALL_FUNCTION 1
71-
000171 118 RETURN_VALUE
71+
000154 118 RETURN_VALUE

graalpython/com.oracle.graal.python.test/testData/goldenFiles/CompilerTests/testTryExceptFinally.co

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ Disassembly of <module>:
6363
000149 103 LOAD_NAME 0 (print)
6464
000155 105 LOAD_STRING 5 ('after')
6565
000149 107 CALL_FUNCTION 1
66-
000149 109 RETURN_VALUE
66+
000132 109 RETURN_VALUE

graalpython/com.oracle.graal.python.test/testData/goldenFiles/CompilerTests/testTryFinally.co

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ Disassembly of <module>:
2121
000064 32 LOAD_NAME 0 (print)
2222
000070 34 LOAD_STRING 3 ('after')
2323
000064 36 CALL_FUNCTION 1
24-
000064 38 RETURN_VALUE
24+
000047 38 RETURN_VALUE

graalpython/com.oracle.graal.python.test/testData/goldenFiles/CompilerTests/testWith.co

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ Disassembly of <module>:
1818
000062 27 LOAD_NAME 0 (print)
1919
000068 29 LOAD_STRING 3 ('after')
2020
000062 31 CALL_FUNCTION 1
21-
000062 33 RETURN_VALUE
21+
000016 33 RETURN_VALUE

0 commit comments

Comments
 (0)