<commit_before>var interpreterOptions = systemOptions.register(new OptionSet("Interpreter Options"));

var traceInterpreter = interpreterOptions.register(new Option("ti", "traceInterpreter", "number", 0, "trace interpreter execution"));

var Interpreter = (function () {

  const Operator = Compiler.Operator;

  /**
   * N.B. These operators are two-part in that they require you to negate the
   * result, so they can't be straightforwardly used for compilation.
   */
  const NLT = new Operator("!<", function (l, r) { return !(l < r); }, true, true);
  const NLE = new Operator("!<=", function (l, r) { return !(l <= r); }, true, true);
  const NGT = new Operator("!>", function (l, r) { return !(l > r); }, true, true);
  const NGE = new Operator("!>=", function (l, r) { return !(l >= r); }, true, true);

  function Interpreter(abc) {
    this.abc = abc;
  }

  Interpreter.prototype = {
    interpretMethod: function interpretMethod($this, method, savedScope, args) {
      assert(method.analysis);

      const abc = this.abc;
      const ints = abc.constantPool.ints;
      const uints = abc.constantPool.uints;
      const doubles = abc.constantPool.doubles;
      const strings = abc.constantPool.strings;
      const methods = abc.methods;
      const multinames = abc.constantPool.multinames;
      const runtime = abc.runtime;
      const domain = abc.domain;
      const rtstack = Runtime.stack;

      var exceptions = method.exceptions;

      var locals = [$this];
      var scope = savedScope;
      var scopeHeight = 0;
      var stack = [];

      const Apslice = [].slice;
      var parameterCount = method.parameters.length;

      rtstack.push(runtime);

      locals.push.apply(locals, Apslice.call(args, 0, parameterCount));

      if (method.needsRest()) {
        locals.push(Apslice.call(args, parameterCount));
      } else if (method.needsArguments()) {
        locals.push(Apslice.call(args, 0));
      }

      function applyNew(constructor, args) {
        return new (Function.bind.apply(constructor.instance, [,].concat(args)));
      }

      function evaluateBinary(operator) {
        var b = stack.pop();
        var a = stack.pop();
        stack.push(operator.fn(a, b));
      }
<commit_msg>interpreter: Make sure to care about default parameter values<commit_after>var interpreterOptions = systemOptions.register(new OptionSet("Interpreter Options"));

var traceInterpreter = interpreterOptions.register(new Option("ti", "traceInterpreter", "number", 0, "trace interpreter execution"));

var Interpreter = (function () {

  const Operator = Compiler.Operator;

  /**
   * N.B. These operators are two-part in that they require you to negate the
   * result, so they can't be straightforwardly used for compilation.
   */
  const NLT = new Operator("!<", function (l, r) { return !(l < r); }, true, true);
  const NLE = new Operator("!<=", function (l, r) { return !(l <= r); }, true, true);
  const NGT = new Operator("!>", function (l, r) { return !(l > r); }, true, true);
  const NGE = new Operator("!>=", function (l, r) { return !(l >= r); }, true, true);

  function Interpreter(abc) {
    this.abc = abc;
  }

  Interpreter.prototype = {
    interpretMethod: function interpretMethod($this, method, savedScope, args) {
      assert(method.analysis);

      const abc = this.abc;
      const ints = abc.constantPool.ints;
      const uints = abc.constantPool.uints;
      const doubles = abc.constantPool.doubles;
      const strings = abc.constantPool.strings;
      const methods = abc.methods;
      const multinames = abc.constantPool.multinames;
      const runtime = abc.runtime;
      const domain = abc.domain;
      const rtstack = Runtime.stack;

      var exceptions = method.exceptions;

      var locals = [$this];
      var scope = savedScope;
      var scopeHeight = 0;
      var stack = [];

      const Apslice = [].slice;
      var parameterCount = method.parameters.length;
      var argCount = args.length;

      rtstack.push(runtime);

      for (var i = 0; i < parameterCount; i++) {
        var value;
        var parameter = method.parameters[i];
        if (i < argCount) {
          value = args[i];
        } else {
          value = parameter.value;
        }

        locals.push(value);
      }

      if (method.needsRest()) {
        locals.push(Apslice.call(args, parameterCount));
      } else if (method.needsArguments()) {
        locals.push(Apslice.call(args, 0));
      }

      function applyNew(constructor, args) {
        return new (Function.bind.apply(constructor.instance, [,].concat(args)));
      }

      function evaluateBinary(operator) {
        var b = stack.pop();
        var a = stack.pop();
        stack.push(operator.fn(a, b));
      }

{'fraction_non_alphanumeric': 0.1359039190897598, 'fraction_numerical': 0.001685630004214075, 'mean_word_length': 2.859349593495935, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4003204', 'n_tokens_mistral': 1435, 'n_tokens_neox': 1418, 'n_words': 396}