changeset 13:f442aa72b246

remove prototype and header from conv1
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Fri, 17 Apr 2015 15:09:42 +0900
parents 0d306982c8b9
children 7d168c1829c9
files Makefile assignment.c conv1/conv1.c test_cs.c test_csp1.c
diffstat 5 files changed, 20 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Fri Apr 17 14:02:00 2015 +0900
+++ b/Makefile	Fri Apr 17 15:09:42 2015 +0900
@@ -1,5 +1,5 @@
 CC=/Users/e105711/prog/seminar/CbC/llvmInst/Debug+Asserts/bin/clang
-TARGET=bug conv fact-a loto6 normal normal2 test01 test02 test04 test05 test_array test_call test_cs test_para test_para2 test_para4 test_return test_struct test_tailcall1 test_tree tmp1 tmp2 tmp4 test_csp1 test_func2code tmpa too-long-argument test1 stack1 test2 arg test_para3 proto
+TARGET=bug conv fact-a loto6 normal normal2 test01 test02 test04 test05 test_array test_call test_cs test_para test_para2 test_para4 test_return test_struct test_tailcall1 test_tree tmp1 tmp2 tmp4 test_csp1 test_func2code tmpa too-long-argument test1 stack1 test2 arg test_para3 proto assignment
 
 CFLAGS= -D"CLANG"
 .SUFFIXES: .c .s
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/assignment.c	Fri Apr 17 15:09:42 2015 +0900
@@ -0,0 +1,16 @@
+#include<stdio.h>
+
+int main(){
+  goto test(1,'a');
+}
+
+__code test(int i, char c){
+  __code (*csp)(int,char,double) = test2;
+  goto (*csp)(i,c,0.2);
+}
+
+__code test2(int i, char c, double d){
+  printf("i : %d \n",i);
+  printf("i : %c \n",c);
+  printf("i : %f \n",d);
+}
--- a/conv1/conv1.c	Fri Apr 17 14:02:00 2015 +0900
+++ b/conv1/conv1.c	Fri Apr 17 15:09:42 2015 +0900
@@ -14,7 +14,9 @@
 #endif
 
 typedef char *stack;
-#include "conv1.h"
+int f0(int i);
+int g0(int i);
+int h0(int i);
 
 /* classical function call case (0) */
 int f0(int i) {
@@ -52,8 +54,6 @@
   int i_,k_,j_;
 };
 
-__code f_g1(int j,stack sp);
-
 __code f_g0(int i,int k,stack sp) { // Caller
   struct f_g0_interface *c = 
     (struct f_g0_interface *)(sp -= sizeof(struct f_g0_interface));
@@ -73,7 +73,6 @@
   goto (c->ret)(k+4+j,sp);
 }
 
-__code g_h1(int j,stack sp);
 
 __code g(int i,stack sp) { // Caller
   struct f_g0_interface *c = 
@@ -153,7 +152,6 @@
   goto h2_11(k,i+4,sp);
 }
 
-__code f2_0_1(int k,int j,char *sp);
 __code h2_1_1(int i,int k,int j,char *sp) {
   goto f2_0_1(k,i+j,sp);
 }
--- a/test_cs.c	Fri Apr 17 14:02:00 2015 +0900
+++ b/test_cs.c	Fri Apr 17 15:09:42 2015 +0900
@@ -1,9 +1,6 @@
 #include<stdio.h>
 #include<stdlib.h>
 
-__code cs_exit(int , double , char );
-__code cs1(int, int, int, int);
-__code cs2(double, double, int, double);
 void test_goto(void);
 
 int main(int argc, char **argv){
--- a/test_csp1.c	Fri Apr 17 14:02:00 2015 +0900
+++ b/test_csp1.c	Fri Apr 17 15:09:42 2015 +0900
@@ -2,10 +2,7 @@
 #include<stdlib.h>
 
 
-__code cs_end (int a);
-__code cs0 (int a, int b, int c, int d);
 void* freturn ();
-__code cs_goto (int a, int b, int c, int d);
 void function (double a, float b, int c);
 int main (int argc, char **argv);