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] Commented: (HARMONY-3741) [drlvm][classloader] Class_File_Loader.cpp small file defects improvement
Date Wed, 25 Apr 2007 14:03:15 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-3741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491650
] 

Vera Volynets commented on HARMONY-3741:
----------------------------------------

41)584, 591 delete comments

42)610, 611 add comment if this is a copy or direct reference to the constant pool

43)616 remove code duplication (for example transfer UTF-8 to UTF-16, or move UTF-8 iteration
to the portlib header)

44)652-654 fix the comment

45)661 iterate over UTF-8 chars

46)656 comment that <init> and <clinit> are not passed to this function

47)680 rename to check_(member_?)descriptor

48)706 delete id_len (replace with descriptor - iterator)

49)734 improve the comment to add 255 there

50)738 return check_field_descriptor

51)746 delete line

52)665, 680 rename check_ to is_valid_

53)750 race condition (move to v_init())

54)749 make this function non-static, and use in other places

55)766 incorrect is_trusted_classloader (returns true for javaxx) should compare with the
system.classloader, add one more synthetic field

56)779 fix comment

57)782 remove clss parameter

58)782 add bool old_version = class->get_version() < ...

59)788 rewrite if twice less space



> [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
>         Assigned To: Gregory Shimansky
>            Priority: Trivial
>         Attachments: class_file_loader_improvement_01.patch
>
>
> 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