Wiki

Ticket #226 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

Simplify some long/complex methods in Compiler code

Reported by: hopscc Owned by: Chuck
Priority: major Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:

Description

Prototype complexity metrics code run on compiler shows some methods
with linecount>100 and rough mccabe complexity >25.

These should probably be shortened and simplified.

METHOD                                 LINES   McCABE
Compiler.__loadReference               53      27 
          IfStmt._bindImp              84      29
CobraParser.typeSpecDecls              78      30
CobraParser.declareMethod              128     33

Attachments

big-or-complex.patch Download (37.9 KB) - added by hopscc 14 years ago.

Change History

Changed 14 years ago by hopscc

Heres a more complete List

                                      ...METHOD...              LINES   McCABE
                          Compiler.__loadReference              81      27
                             Compiler.compileSharp              102     21
                         CobraParser.declareMethod              132     34
                           CobraParser.expression2              122     41
                                  CobraParser.stmt              109     11
                         CobraParser.typeSpecDecls              78      26
                ClrTypeProxy._realTypeWithoutCache              119     28
                MemberOverload.computeBestOverload              90      31
                                   IfStmt._bindImp              86      26
                         NumericPromoExpr._bindImp              88      31

Changed 14 years ago by hopscc

Changed 14 years ago by hopscc

  • status changed from new to assigned
  • owner set to Chuck

Refactoring of all methods >100 LOC or CCC >25. shorten and/or simplify.
No new tests.

Changed 14 years ago by Chuck

  • status changed from assigned to closed
  • resolution set to fixed

Applied in changeset:2451

Note: See TracTickets for help on using tickets.