aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--src/cljcc/compiler.clj4
-rw-r--r--src/cljcc/driver.clj2
3 files changed, 5 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 1548a67..e6d2d5b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,6 +23,7 @@
*.jar
*.swp
*~
+/test-programs
/checkouts
/classes
/target
diff --git a/src/cljcc/compiler.clj b/src/cljcc/compiler.clj
index 6a4d13d..9e0a9a4 100644
--- a/src/cljcc/compiler.clj
+++ b/src/cljcc/compiler.clj
@@ -54,9 +54,11 @@
(defn il->assembly [il]
(let [fn-assembly (emit-function-assembly (first il))]
(if (= :linux (get-os))
- (conj fn-assembly linux-assembly-end)
+ (concat fn-assembly [linux-assembly-end])
fn-assembly)))
+(conj [1 2 3] 1)
+
(defn join-assembly [assembly-lines]
(str/join "\n" assembly-lines))
diff --git a/src/cljcc/driver.clj b/src/cljcc/driver.clj
index ad9c3a4..e3c4822 100644
--- a/src/cljcc/driver.clj
+++ b/src/cljcc/driver.clj
@@ -91,6 +91,6 @@
(comment
- (run "/Users/shagunagrawal/Development/c_tests/ex3.c" {})
+ (run "./test-programs/ex1.c" {})
,)