--- a/LLVMExamples.st Fri Aug 05 17:12:05 2016 +0100
+++ b/LLVMExamples.st Thu Aug 11 09:12:17 2016 +0100
@@ -76,6 +76,7 @@
"/ Now, the module should look like
self assert: (module dumpString =
'; ModuleID = ''example1_sum''
+source_filename = "example1_sum"
define i64 @sum(i64, i64) {
entry:
@@ -100,7 +101,7 @@
"
"Created: / 17-07-2015 / 11:47:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 08-08-2015 / 04:33:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 11-08-2016 / 09:06:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
example2_function_call
@@ -125,6 +126,7 @@
asm ret: (asm call: calleeFunction _: { (callerFunction parameterAt: 1) . (callerFunction parameterAt: 2) }).
self assert: (module dumpString =
'; ModuleID = ''example2_function_call''
+source_filename = "example2_function_call"
define i64 @sum(i64, i64) {
entry:
@@ -149,7 +151,7 @@
"
"Created: / 17-07-2015 / 12:45:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 10-08-2015 / 18:58:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 11-08-2016 / 09:06:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
example3_hello_world
@@ -297,8 +299,8 @@
asm block:entry.
result := asm alloca:LLVMType intptr as:'result'.
i := asm alloca:LLVMType intptr as:'i'.
- asm store:(function parameterAt:1) _:i.
- asm store:(LLVMConstant sintptr: 1) _:result.
+ asm store:(function parameterAt:1) at:i.
+ asm store:(LLVMConstant sintptr: 1) at:result.
asm br:loop.
"/ Generate loop that computes the factorial
@@ -322,8 +324,8 @@
then:loopBody
else:exit.
asm block:loopBody.
- asm store:(asm mul:(asm load:result) _:(asm load:i)) _:result.
- asm store:(asm sub:(asm load:i) _:(LLVMConstant sintptr:1)) _:i.
+ asm store:(asm mul:(asm load:result) _:(asm load:i)) at:result.
+ asm store:(asm sub:(asm load:i) _:(LLVMConstant sintptr:1)) at:i.
asm br:loop.
"/ Generate return from function
@@ -344,8 +346,7 @@
"
"Created: / 10-08-2015 / 09:46:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 17-08-2015 / 07:39:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified (comment): / 21-04-2016 / 21:37:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 11-08-2016 / 09:06:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
example5_factorial_phi
@@ -438,8 +439,8 @@
asm block:entry.
result := asm alloca:LLVMType intptr as:'result'.
i := asm alloca:LLVMType intptr as:'i'.
- asm store:(function parameterAt:1) _:i.
- asm store:(LLVMConstant sintptr: 1) _:result.
+ asm store:(function parameterAt:1) at:i.
+ asm store:(LLVMConstant sintptr: 1) at:result.
asm br:loop.
"/ Generate loop that computes the factorial
@@ -477,8 +478,8 @@
then:overflow
else:loopBody2.
asm block:loopBody2.
- asm store:(asm extractvalue:smulWithOverflowValue at:0) _:result.
- asm store:(asm sub:(asm load:i) _:(LLVMConstant sintptr:1)) _:i.
+ asm store:(asm extractvalue:smulWithOverflowValue at:0) at:result.
+ asm store:(asm sub:(asm load:i) _:(LLVMConstant sintptr:1)) at:i.
asm br:loop.
"/ Generate return from function
@@ -505,8 +506,7 @@
"sly LLVMExamples example3_cond"
"Created: / 14-08-2015 / 06:46:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 17-08-2015 / 07:40:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified (comment): / 21-04-2016 / 21:37:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 10-08-2016 / 23:01:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
example7_factorial_with_debug_info
@@ -558,10 +558,10 @@
dib insertDeclare: i variable: iDI expression: dib createExpression location: asm location atEndOf: entry.
asm line: 6 column: 3 scope: functionDI.
- asm store:(function parameterAt:1) _:i.
+ asm store:(function parameterAt:1) at:i.
asm line: 7 column: 3 scope: functionDI.
- asm store:(LLVMConstant sintptr: 1) _:result.
+ asm store:(LLVMConstant sintptr: 1) at:result.
asm br:loop.
"/ Generate loop that computes the factorial
@@ -587,9 +587,9 @@
else:exit.
asm block:loopBody.
asm line: 9 column: 3 scope: functionDI.
- asm store:(asm mul:(asm load:result) _:(asm load:i)) _:result.
+ asm store:(asm mul:(asm load:result) _:(asm load:i)) at:result.
asm line: 10 column: 3 scope: functionDI.
- asm store:(asm sub:(asm load:i) _:(LLVMConstant sintptr:1)) _:i.
+ asm store:(asm sub:(asm load:i) _:(LLVMConstant sintptr:1)) at:i.
asm line: 11 column: 3 scope: functionDI.
asm br:loop.