# HG changeset patch # User Kaito Tokumori # Date 1429250982 -32400 # Node ID f442aa72b2462f215e837a338ea951b0fa753e10 # Parent 0d306982c8b9eaf4fb9bab26b8d157b5d1bccc9a remove prototype and header from conv1 diff -r 0d306982c8b9 -r f442aa72b246 Makefile --- 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 diff -r 0d306982c8b9 -r f442aa72b246 assignment.c --- /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 + +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); +} diff -r 0d306982c8b9 -r f442aa72b246 conv1/conv1.c --- 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); } diff -r 0d306982c8b9 -r f442aa72b246 test_cs.c --- 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 #include -__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){ diff -r 0d306982c8b9 -r f442aa72b246 test_csp1.c --- 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 -__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);