enclose-io/compiler

View on GitHub
lts/deps/v8/tools/ic-processor.js

Summary

Maintainability
F
6 days
Test Coverage

Function IcProcessor has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function IcProcessor() {
  var propertyICParser = [parseInt, parseInt, parseInt, parseString,
      parseString, parseInt, parseString, parseString, parseString];
  LogReader.call(this, {
      'code-creation': {
Severity: Minor
Found in lts/deps/v8/tools/ic-processor.js - About 1 hr to fix

    Function processPropertyIC has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        type, pc, line, column, old_state, new_state, map, name, modifier,
        slow_reason) {
    Severity: Major
    Found in lts/deps/v8/tools/ic-processor.js - About 1 hr to fix

      Function processCodeCreation has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          type, kind, timestamp, start, size, name, maybe_func) {
      Severity: Major
      Found in lts/deps/v8/tools/ic-processor.js - About 50 mins to fix

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

        function IcProcessor() {
          var propertyICParser = [parseInt, parseInt, parseInt, parseString,
              parseString, parseInt, parseString, parseString, parseString];
          LogReader.call(this, {
              'code-creation': {
        Severity: Major
        Found in lts/deps/v8/tools/ic-processor.js and 1 other location - About 2 days to fix
        current/deps/v8/tools/ic-processor.js on lines 34..79

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 428.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

        IcProcessor.prototype.processLogFile = function(fileName) {
          this.collectEntries = true
          this.lastLogFileName_ = fileName;
          var line;
          while (line = readline()) {
        Severity: Major
        Found in lts/deps/v8/tools/ic-processor.js and 1 other location - About 7 hrs to fix
        current/deps/v8/tools/ic-processor.js on lines 106..122

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 191.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

        IcProcessor.prototype.processPropertyIC = function (
            type, pc, line, column, old_state, new_state, map, name, modifier,
            slow_reason) {
          this[type]++;
          var entry = this.profile_.findEntry(pc);
        Severity: Major
        Found in lts/deps/v8/tools/ic-processor.js and 1 other location - About 6 hrs to fix
        current/deps/v8/tools/ic-processor.js on lines 163..172

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 159.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

        IcProcessor.prototype.processString = function(string) {
          var end = string.length;
          var current = 0;
          var next = 0;
          var line;
        Severity: Major
        Found in lts/deps/v8/tools/ic-processor.js and 1 other location - About 5 hrs to fix
        current/deps/v8/tools/ic-processor.js on lines 89..104

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 144.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

        IcProcessor.prototype.processCodeCreation = function(
            type, kind, timestamp, start, size, name, maybe_func) {
          if (maybe_func.length) {
            var funcAddr = parseInt(maybe_func[0]);
            var state = parseState(maybe_func[1]);
        Severity: Major
        Found in lts/deps/v8/tools/ic-processor.js and 3 other locations - About 3 hrs to fix
        current/deps/v8/tools/ic-processor.js on lines 128..137
        current/deps/v8/tools/tickprocessor.js on lines 299..308
        lts/deps/v8/tools/tickprocessor.js on lines 299..308

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 112.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

        IcProcessor.prototype.formatName = function(entry) {
          if (!entry) return "<unknown>"
          var name = entry.func.getName();
          var re = /(.*):[0-9]+:[0-9]+$/;
          var array = re.exec(name);
        Severity: Major
        Found in lts/deps/v8/tools/ic-processor.js and 1 other location - About 3 hrs to fix
        current/deps/v8/tools/ic-processor.js on lines 154..161

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 97.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Identical blocks of code found in 4 locations. Consider refactoring.
        Open

        function parseState(s) {
          switch (s) {
          case "": return Profile.CodeState.COMPILED;
          case "~": return Profile.CodeState.OPTIMIZABLE;
          case "*": return Profile.CodeState.OPTIMIZED;
        Severity: Major
        Found in lts/deps/v8/tools/ic-processor.js and 3 other locations - About 1 hr to fix
        current/deps/v8/tools/ic-processor.js on lines 24..31
        current/deps/v8/tools/tickprocessor.js on lines 76..83
        lts/deps/v8/tools/tickprocessor.js on lines 76..83

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 71.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

        function readFile(fileName) {
          try {
            return read(fileName);
          } catch (e) {
            print(fileName + ': ' + (e.message || e));
        Severity: Major
        Found in lts/deps/v8/tools/ic-processor.js and 3 other locations - About 1 hr to fix
        current/deps/v8/tools/ic-processor.js on lines 12..19
        current/deps/v8/tools/tickprocessor.js on lines 63..70
        lts/deps/v8/tools/tickprocessor.js on lines 63..70

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 60.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

        class ArgumentsProcessor extends BaseArgumentsProcessor {
          getArgsDispatch() {
            return {
              '--range': ['range', 'auto,auto',
                  'Specify the range limit as [start],[end]'],
        Severity: Major
        Found in lts/deps/v8/tools/ic-processor.js and 1 other location - About 1 hr to fix
        current/deps/v8/tools/ic-processor.js on lines 175..190

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 60.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        There are no issues that match your filters.

        Category
        Status