Skip to content

Speed up engine262 test #97

@Jack-Works

Description

@Jack-Works

Hi! We recent fix engine262's RegExp implementation and boost buildString in regExpUtils.js by a native implementation.

You can call boostTest262Harness(realm) after a user land buildString is defined.

This is how we use it:


    test.attrs.includes.unshift('assert.js', 'sta.js');
    if (test.attrs.flags.async) {
      test.attrs.includes.unshift('doneprintHandle.js');
    }
    // evaluates all harness file required by the teset
    for (const include of test.attrs.includes) {
      if (includeCache[include] === undefined) {
        const p = path.resolve(TEST262, `harness/${include}`);
        includeCache[include] = {
          source: fs.readFileSync(p, 'utf8'),
          specifier: p,
        };
      }
      const entry = includeCache[include];
      const completion = realm.evaluateScript(entry.source, { specifier: entry.specifier });
      if (completion instanceof AbruptCompletion) {
        return fails(test, inspect(completion));
      }
    }
    // boost it
    boostTest262Harness(realm);

By using the boost, all RegExp related test can save 2 minutes on build the large string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions