harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vera Volynets (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-3741) [drlvm][classloader] Class_File_Loader.cpp small file defects improvement
Date Tue, 24 Apr 2007 09:07:15 GMT
[drlvm][classloader] Class_File_Loader.cpp small file defects improvement
-------------------------------------------------------------------------

                 Key: HARMONY-3741
                 URL: https://issues.apache.org/jira/browse/HARMONY-3741
             Project: Harmony
          Issue Type: Improvement
          Components: DRLVM
         Environment: all
            Reporter: Vera Volynets
            Priority: Trivial


I've noticed that file Class_File_Loader.cpp has many small defects which should be improved.
Here is the list of it.
This list will be expanded as I look through it.

0 80 symbols per line

0)17 remove @author

1)18 remove @revision

2)26 reduce #include list

3)42 remove #ifdef _IPF_ from this file

4)47 misprint th->the

5)51-54 remove comment

6)56 think of making this inline function, add a comment to this function / macro

7)60 check what currently ReportFailedClass does

8)64 add a comment how output of this function is used

9)66 use return <value> instead of assignment name = <value>

10)107 add a comment, name function is_valid_cp_entry

11)107 add inline prefix

12)64, 107 use either "tag", or "type" term consistently in the file for any constant pool
tag

13)125- use static const int instead of #define

14)130 comment: explain +1 in following declarations, or remove terminators from these arrays
by using for() instead of while(), remove +1

15)143 initialize -> initializes

16)145 think of creating static const char* table of strings, attribute table size can be
obtained via sizeof, filling arrays can be done via inline function, merge arrays into array
of struct

17)239 make the function void

18)240 incorrect comment, think of renaming the function

19)243 parse_signature_attr function should be static

20)261 don't use sig, just return a result

21)267 should be static

22)269 excessive argument, can be get from class

23)274 add a comment why this works

24)275 rethink this comment

25)291, 284 change if with reading length

26)277 think of using excessive variable result

27)294 think of improving code/style here

28)304 change message

29)310, 314, 365 parse_annotation[_value] should be static

30)0 add "Truncated class file: " message to REPORT_FAILED_CLASS messages, see http://issues.apache.org/jira/browse/HARMONY-3670

31)329 ask Nadya "parse number" or "parse a number"

32)337, 532 investigate if we can remove antn->elements assignment (use array of zero length
or just getter function for antn->elements)

33)0 add a comment before each parse 

34)345 rename parse_u2_be -> parse_2?

35)340, 358 add a comment, calculate number of bytes by subtracting a start offset from the
end offset, change function contract to boolean? remove read_len averywhere in all functions,
ask cfs if needed

36)378 don't use nested switches? 

37)512 operator ? prints integer anyway - don't need it

38)533 rewrite FIXME OOM with raise + return 0, may use preallocated exception object (preallocate
Out of C heap exception object) or lazy exception with const char string

39)365 exchange parse_annotation and parse_annotation_value in code 

40)551 One general's star is better than three colonel's stars



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message