jilc-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Jilc-patches] CVS: jilc/src codegen.h,1.3,1.4 jparser.c,1.4,1.5 jparser


From: Gaurav Vaish <address@hidden>
Subject: [Jilc-patches] CVS: jilc/src codegen.h,1.3,1.4 jparser.c,1.4,1.5 jparser.h,1.4,1.5
Date: Fri, 12 Apr 2002 11:47:14 -0400

Update of /cvsroot/jilc/jilc/src
In directory subversions:/tmp/cvs-serv19928

Modified Files:
        codegen.h jparser.c jparser.h 
Log Message:
2002-04-12   Gaurav Vaish <address@hidden>

* Comming patches by Abhaya Agarwal...



Index: codegen.h
===================================================================
RCS file: /cvsroot/jilc/jilc/src/codegen.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -C0 -r1.3 -r1.4
*** codegen.h   9 Apr 2002 05:04:35 -0000       1.3
--- codegen.h   12 Apr 2002 15:47:12 -0000      1.4
***************
*** 13,23 ****
! #include <defines.h>
! #include <jparser.h>
! #include <jopcodes.h>
! #include <ilopcodes.h>
! 
! int jilc_class(JVClass* klass, FILE* output);
! int jilc_props(JVClass* klass, FILE* output);
! int jilc_method(JVClass* klass, FILE* output);
! int jilc_statement(JVCLass* klass, int* count, int* line_count, FILE* output);
! 
! int jilc_opcode(jopcode_map opcode, FILE* output);
--- 13,28 ----
! #include "defines.h"
! #include "jparser.h"
! #include "jopcodes.h"
! #include "ilopcodes.h"
! 
! int write_class(JVClass* klass, FILE* output);
! int write_class_head(JVClass* klass,FILE* output);
! int write_class_attributes(UInt16 acc_flag, FILE* output);
! int write_class_name(char* name,FILE* output);
! int write_super_class(char* name,FILE* output);
! int write_implemented_interfaces(JVClass* klass,FILE* output);
! 
! int jilc_field(JVClass* klass, int index, FILE* output);
! int jilc_method(JVClass* klass,int index, FILE* output);
! int jilc_statement(JVClass* klass, int* count, int* line_count, FILE* output);
! int jilc_instruction(jopcode_map opcode, FILE* output);
***************
*** 24 ****
--- 30,32 ----
+ char * jilc_access_flag(UInt16 access_flag,int type);
+ char * jilc_interface(JVClass* klass);
+ 

Index: jparser.c
===================================================================
RCS file: /cvsroot/jilc/jilc/src/jparser.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -C0 -r1.4 -r1.5
*** jparser.c   26 Feb 2002 22:31:23 -0000      1.4
--- jparser.c   12 Apr 2002 15:47:12 -0000      1.5
***************
*** 11 ****
! #include <jparser.h>
--- 11 ----
! #include "jparser.h"
***************
*** 343,371 ****
! char* resolve_flags(UInt16 flags)
! {
!       char *retVal = (char *)calloc(101, sizeof(char));
! 
!       if(flags == 0x0000)
!               strcat(retVal, " ");
!       if(is_set(flags, ACCESS_PUBLIC))
!               strcat(retVal, "public ");
!       if(is_set(flags, ACCESS_PRIVATE))
!               strcat(retVal, "private ");
!       if(is_set(flags, ACCESS_PROTECTED))
!               strcat(retVal, "protected ");
!       if(is_set(flags, ACCESS_STATIC))
!               strcat(retVal, " static ");
!       if(is_set(flags, ACCESS_FINAL))
!               strcat(retVal, " final ");
!       if(is_set(flags, ACCESS_SYNCHRONIZED))
!               strcat(retVal, " synchronized ");
!       if(is_set(flags, ACCESS_VOLATILE))
!               strcat(retVal, " volatile ");
!       if(is_set(flags, ACCESS_TRANSIENT))
!               strcat(retVal, " transient ");
!       if(is_set(flags, ACCESS_NATIVE))
!               strcat(retVal, " native ");
!       if(is_set(flags, ACCESS_ABSTRACT))
!               strcat(retVal, " abstract ");
! 
!       retVal = (char *)realloc(retVal, strlen(retVal));
! 
--- 343,380 ----
! char* resolve_flags(UInt16 flags,UInt32 type)
! {
!       char *retVal = (char *)calloc(101, sizeof(char));
!       if(flags == 0x0000)
!               strcat(retVal, " ");
!       if(is_set(flags, ACCESS_PUBLIC))
!               strcat(retVal, "public ");
!       if(is_set(flags, ACCESS_PRIVATE))
!               strcat(retVal, "private ");
!       if(is_set(flags, ACCESS_PROTECTED))
!               strcat(retVal, "protected ");
!       if(is_set(flags, ACCESS_STATIC))
!               strcat(retVal, "static ");
!       if(is_set(flags, ACCESS_FINAL)){
!               if(type==CLASS)
!                       strcat(retVal, "sealed ");
!               else if(type==FIELD)
!                       strcat(retVal, "initonly ");
!               else if(type==METHOD)
!                       strcat(retVal, "final ");
!       }
!       if(is_set(flags, ACCESS_SYNCHRONIZED)){
!               if(type==CLASS)
!                       strcat(retVal,"specialname ");
!               else if(type==METHOD)
!                       strcat(retVal, " synchronized ");
!       }
!       if(is_set(flags, ACCESS_VOLATILE))
!               strcat(retVal, " volatile ");
!       if(is_set(flags, ACCESS_TRANSIENT))
!               strcat(retVal, " transient ");
!       if(is_set(flags, ACCESS_NATIVE))
!               strcat(retVal, " native ");
!       if(is_set(flags, ACCESS_ABSTRACT))
!               strcat(retVal, " abstract ");
! 
!       retVal = (char *)realloc(retVal, strlen(retVal));
! 
***************
*** 373 ****
! }
--- 382 ----
!       }
***************
*** 402 ****
!       field_entry->full_flags = resolve_flags(field_entry->acc_flags);
--- 411 ----
!       field_entry->full_flags = resolve_flags(field_entry->acc_flags,FIELD);
***************
*** 445 ****
!       method->full_flags = resolve_flags(method->acc_flags);
--- 454 ----
!       method->full_flags = resolve_flags(method->acc_flags,METHOD);
***************
*** 466 ****
!       klass->full_flags = resolve_flags(klass->acc_flags);
--- 475 ----
!       klass->full_flags = resolve_flags(klass->acc_flags,CLASS);

Index: jparser.h
===================================================================
RCS file: /cvsroot/jilc/jilc/src/jparser.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -C0 -r1.4 -r1.5
*** jparser.h   26 Feb 2002 22:31:23 -0000      1.4
--- jparser.h   12 Apr 2002 15:47:12 -0000      1.5
***************
*** 13,15 ****
! #include <jopcodes.h>
! #include <defines.h>
! #include <stdio.h>
--- 13,15 ----
! #include "jopcodes.h"
! #include "defines.h"
! #include "stdio.h"
***************
*** 62 ****
--- 63,69 ----
+ 
+ /**
+  * Type for flag
+  */
+ #define CLASS 0
+ #define FIELD 1
+ #define METHOD 2
***************
*** 287 ****
! char* resolve_flags(UInt16 flags);
--- 294 ----
! char* resolve_flags(UInt16 flags,UInt32 type);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]