Merge pull request #2 from nyu-compiler-construction/bill/misc

Bill/misc
master
sunyinqi0508 4 years ago committed by GitHub
commit afaa20a44d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,3 @@
#!/bin/bash
mvn clean package -e

@ -0,0 +1,12 @@
#!/bin/bash
FILENAME=$1
if [ -z "$1" ] ; then
echo "FILENAME is missing"
exit 1
fi
echo "Generating assembly code for file ${FILENAME}"
java -cp "chocopy-ref.jar:target/assignment.jar" chocopy.ChocoPy --pass=rrr ${FILENAME}

@ -0,0 +1,12 @@
#!/bin/bash
FILENAME=$1
if [ -z "$1" ] ; then
echo "FILENAME is missing"
exit 1
fi
echo "Generating assembly code for file ${FILENAME}"
java -cp "chocopy-ref.jar:target/assignment.jar" chocopy.ChocoPy --pass=rrs ${FILENAME}

@ -0,0 +1,12 @@
#!/bin/bash
FILENAME=$1
if [ -z "$1" ] ; then
echo "FILENAME is missing"
exit 1
fi
echo "Running file ${FILENAME}"
java -cp "chocopy-ref.jar:target/assignment.jar" chocopy.ChocoPy --pass=rrr --run ${FILENAME}

@ -0,0 +1,12 @@
#!/bin/bash
FILENAME=$1
if [ -z "$1" ] ; then
echo "FILENAME is missing"
exit 1
fi
echo "Running file ${FILENAME}"
java -cp "chocopy-ref.jar:target/assignment.jar" chocopy.ChocoPy --pass=rrs --run ${FILENAME}

@ -0,0 +1,22 @@
la a0, $str$prototype
lw t0, 0(a0)
lw t1, 4(a0)
lw t2, 8(a0)
li t3, 1
la a0, allChars
li t4, 256
mv t5, zero
initchars_1:
sw t0, 0(a0)
sw t1, 4(a0)
sw t2, 8(a0)
sw t3, 12(a0)
sw t5, 16(a0)
addi a0, a0, 20
addi t5, t5, 1
bne t4, t5, initchars_1
jr ra
.data
.align 2

@ -1,11 +1,11 @@
addi sp, sp, -8
sw ra, 4(sp)
sw a0, 0(sp)
la a0, $int$prototype
jal ra, alloc
lw t0, 0(sp)
sw t0, @.__int__(a0)
lw ra, 4(sp)
addi sp, sp, 8
jr ra
# Box integer
addi sp, sp, -8
sw ra, 4(sp)
sw a0, 0(sp)
la a0, $int$prototype
jal ra, alloc
lw t0, 0(sp)
sw t0, @.__int__(a0)
lw ra, 4(sp)
addi sp, sp, 8
jr ra

File diff suppressed because it is too large Load Diff

@ -0,0 +1,5 @@
#!/bin/bash
echo "Running all test cases inside src/test/data/pa3/sample/ folder)"
java -cp "chocopy-ref.jar:target/assignment.jar" chocopy.ChocoPy --pass=rrs --test --run --dir src/test/data/pa3/sample/ --maxCycles 65536
Loading…
Cancel
Save