javascript 0.3.0

A JavaScript engine implementation in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');

function extractMeta(filePath) {
  const src = fs.readFileSync(filePath, 'utf8');
  const m = src.match(/\/\*---([\s\S]*?)---\*\//);
  if (!m) return '';
  return m[1];
}

function parseList(meta, key) {
  // simple parser for lines like: includes: ["a.js", "b.js"]
  const re = new RegExp(`${key}:\\s*\\[(.*?)\\]`, 's');
  const m = meta.match(re);
  if (!m) return [];
  const inner = m[1];
  return inner.split(',').map(s => s.trim().replace(/^['\"]|['\"]$/g, '')).filter(Boolean);
}

function hasFeature(meta, name) {
  const arr = parseList(meta, 'features');
  return arr.includes(name);
}

function hasFlag(meta, name) {
  const re = /flags:\s*\[([\s\S]*?)\]/;
  const m = meta.match(re);
  if (!m) return false;
  return m[1].includes(name);
}

function referencesAssert(filePath) {
  const src = fs.readFileSync(filePath, 'utf8');
  return /\bassert\b/.test(src);
}

function references262(filePath) {
  const src = fs.readFileSync(filePath, 'utf8');
  return /\$262\b/.test(src);
}

function ensureArrayDistinct(arr) {
  const seen = new Set();
  const out = [];
  for (const p of arr) {
    if (!p) continue;
    const b = path.basename(p);
    if (!seen.has(b)) {
      seen.add(b);
      out.push(p);
    }
  }
  return out;
}

function createComposedTarget(testPath) {
  const testDir = path.dirname(path.resolve(testPath));
  const base = path.basename(testPath, path.extname(testPath));
  const ext = path.extname(testPath);
  const tmpName = `.test262_composed_${base}${ext}`;
  const tmpPath = path.join(testDir, tmpName);
  return { tmpDir: testDir, tmpPath };
}

function createModuleBootstrapTarget(testPath) {
  const testDir = path.dirname(path.resolve(testPath));
  const base = path.basename(testPath, path.extname(testPath));
  const ext = path.extname(testPath);
  const tmpName = `.test262_bootstrap_${base}${ext}`;
  const tmpPath = path.join(testDir, tmpName);
  return { tmpDir: testDir, tmpPath };
}

const realmFeatureName = 'cross-realm';
const realmMarker = '// Inject: unified $262 shim - idempotent';

function getAgentBootstrapLines() {
  return [
    'var __agentGlobal = typeof globalThis !== "undefined" ? globalThis : this;',
    'if (!__agentGlobal.$262) { __agentGlobal.$262 = {}; }',
    'var $262 = __agentGlobal.$262;',
    'if (!$262.agent) { $262.agent = {}; }',
    '$262.agent.receiveBroadcast = function(callback) { return __agent_receiveBroadcast(callback); };',
    '$262.agent.report = function(value) { return __agent_report(String(value)); };',
    '$262.agent.sleep = function(ms) { return __agent_sleep(ms); };',
    '$262.agent.monotonicNow = function() { return __agent_monotonicNow(); };',
    '$262.agent.leaving = function() { return __agent_leaving(); };',
  ];
}

function get262StubLines() {
  // Minimal, idempotent $262 shim with createRealm support
  return [
    '// Inject: unified $262 shim - idempotent',
    'if (typeof $262 === "undefined") {',
    '  var $262 = (typeof globalThis !== "undefined" && globalThis.$262 && typeof globalThis.$262 === "object") ? globalThis.$262 : {};',
    '}',
    'if (typeof globalThis !== "undefined" && (typeof globalThis.$262 === "undefined" || globalThis.$262 !== $262)) {',
    '  globalThis.$262 = $262;',
    '}',
    'if (typeof $262.AbstractModuleSource === "undefined" && typeof globalThis !== "undefined" && typeof globalThis.__abstract_module_source_ctor === "function") {',
    '  $262.AbstractModuleSource = globalThis.__abstract_module_source_ctor;',
    '}',
    'if (typeof $262.global === "undefined") {',
    '  $262.global = this;',
    '}',
    'if (typeof $262.evalScript !== "function") {',
    '  $262.evalScript = function(src) {',
    '    if (typeof globalThis !== "undefined" && typeof globalThis.__evalScript__ === "function") {',
    '      return globalThis.__evalScript__(String(src));',
    '    }',
    '    return (0, eval)(String(src));',
    '  };',
    '}',
    'if (typeof $262.detachArrayBuffer !== "function" && typeof globalThis !== "undefined" && typeof globalThis.__detachArrayBuffer__ === "function") {',
    '  $262.detachArrayBuffer = function(buffer) {',
    '    return globalThis.__detachArrayBuffer__(buffer);',
    '  };',
    '}',
    'if (typeof $262.IsHTMLDDA === "undefined" && typeof globalThis !== "undefined") {',
    '  try { var __htmlDDAHook = globalThis.__isHTMLDDA__; if (__htmlDDAHook !== undefined && __htmlDDAHook !== null && (__htmlDDAHook() === null)) $262.IsHTMLDDA = __htmlDDAHook; } catch(e) {}',
    '}',
    'if (typeof $262.createRealm !== "function") {',
    '  $262.createRealm = function() {',
    '      // Delegate to runner-provided native hook when available.',
    '      if (typeof globalThis.__createRealm__ === "function") {',
    '        try {',
    '          var nativeRealm = globalThis.__createRealm__();',
    '          if (nativeRealm && nativeRealm.global) return nativeRealm;',
    '        } catch (e) { }',
    '      }',
    '',
    '      // Fallback: emulate a realm with distinct object intrinsics.',
    '      var g = Object.create(null);',
    '      var realmObjectProto = Object.create(null);',
    '      var realmObjectCtor = function Object(value) {',
    '        if (value === null || value === undefined) {',
    '          var o = {};',
    '          try { Object.setPrototypeOf(o, realmObjectProto); } catch (_) {}',
    '          return o;',
    '        }',
    '        return Object(value);',
    '      };',
    '      realmObjectCtor.prototype = realmObjectProto;',
    '      try { realmObjectProto.constructor = realmObjectCtor; } catch (_) {}',
    '',
    '      var GlobalFunction = Function;',
    '      var realmFunctionCtor = function RealmFunction() {',
    '        var args = Array.prototype.slice.call(arguments);',
    '        var f = Reflect.construct(GlobalFunction, args);',
    '        try { f.__origin_global = g; } catch (_) {}',
    '        try {',
    '          if (f && typeof f === "function" && f.prototype && typeof f.prototype === "object") {',
    '            Object.setPrototypeOf(f.prototype, realmObjectProto);',
    '          }',
    '        } catch (_) {}',
    '        return f;',
    '      };',
    '      try { Object.setPrototypeOf(realmFunctionCtor, GlobalFunction); } catch (_) {}',
    '      realmFunctionCtor.prototype = GlobalFunction.prototype;',
    '',
    '      g.globalThis = g;',
    '      g.this = g;',
    '      g.Object = realmObjectCtor;',
    '      g.Function = realmFunctionCtor;',
    '      g.TypeError = TypeError;',
    '      g.RangeError = RangeError;',
    '      g.ReferenceError = ReferenceError;',
    '      g.SyntaxError = SyntaxError;',
    '      g.Error = Error;',
    '      g.AggregateError = AggregateError;',
    '      g.Array = Array;',
    '      g.ArrayBuffer = ArrayBuffer;',
    '      g.SharedArrayBuffer = (typeof SharedArrayBuffer !== "undefined") ? SharedArrayBuffer : undefined;',
    '      g.DataView = DataView;',
    '      g.Date = Date;',
    '      g.RegExp = RegExp;',
    '      g.Int8Array = Int8Array;',
    '      g.Uint8Array = Uint8Array;',
    '      g.Uint8ClampedArray = Uint8ClampedArray;',
    '      g.Int16Array = Int16Array;',
    '      g.Uint16Array = Uint16Array;',
    '      g.Int32Array = Int32Array;',
    '      g.Uint32Array = Uint32Array;',
    '      g.Float32Array = Float32Array;',
    '      g.Float64Array = Float64Array;',
    '      g.BigInt64Array = (typeof BigInt64Array !== "undefined") ? BigInt64Array : undefined;',
    '      g.BigUint64Array = (typeof BigUint64Array !== "undefined") ? BigUint64Array : undefined;',
    '      g.Map = Map;',
    '      g.Set = Set;',
    '      g.WeakMap = WeakMap;',
    '      g.WeakSet = WeakSet;',
    '      g.WeakRef = (typeof WeakRef !== "undefined") ? WeakRef : undefined;',
    '      g.Proxy = Proxy;',
    '      g.Reflect = Reflect;',
    '      g.Math = Math;',
    '      g.JSON = JSON;',
    '      g.Promise = Promise;',
    '      g.Symbol = Symbol;',
    '      g.Number = Number;',
    '      g.String = String;',
    '      g.Boolean = Boolean;',
    '      g.BigInt = (typeof BigInt !== "undefined") ? BigInt : undefined;',
    '      g.parseInt = parseInt;',
    '      g.parseFloat = parseFloat;',
    '      g.isNaN = isNaN;',
    '      g.isFinite = isFinite;',
    '      function __wrapRealmCallable(fn) {',
    '        if (typeof fn !== "function") return fn;',
    '        var defaultProto = null;',
    '        try {',
    '          if (fn.prototype && typeof fn.prototype === "object") {',
    '            defaultProto = Object.getPrototypeOf(fn.prototype);',
    '          }',
    '        } catch (_) {}',
    '        var wrapped = function() {',
    '          var out = fn.apply(this, arguments);',
    '          try {',
    '            var ctorProto = wrapped.prototype;',
    '            var nonObjectProto = (ctorProto === null) || (typeof ctorProto !== "object" && typeof ctorProto !== "function");',
    '            if (nonObjectProto && out && typeof out === "object" && defaultProto && Object.getPrototypeOf(out) !== defaultProto) {',
    '              Object.setPrototypeOf(out, defaultProto);',
    '            }',
    '          } catch (_) {}',
    '          return out;',
    '        };',
    '        try { Object.setPrototypeOf(wrapped, fn); } catch (_) {}',
    '        try { wrapped.__origin_global = g; } catch (_) {}',
    '        try {',
    '          Object.defineProperty(wrapped, "prototype", {',
    '            get: function() { return fn.prototype; },',
    '            set: function(v) { fn.prototype = v; },',
    '            enumerable: false,',
    '            configurable: true',
    '          });',
    '        } catch (_) {',
    '          try { wrapped.prototype = fn.prototype; } catch (_) {}',
    '        }',
    '        return wrapped;',
    '      }',
    '      g.eval = function(src) {',
    '        src = String(src);',
    '        var transformed = "";',
    '        var re = /\\bvar\\s+([^;]+)/g;',
    '        var lastIndex = 0;',
    '        var match;',
    '        while ((match = re.exec(src)) !== null) {',
    '          transformed += src.slice(lastIndex, match.index);',
    '          var decls = match[1];',
    '          var repl = decls.split(",").map(function(p) {',
    '            var s = p.trim();',
    '            var mm = s.match(/^([A-Za-z_$][\\w$]*)(\\s*=\\s*[\\s\\S]+)?$/);',
    '            if (!mm) return "";',
    '            var name = mm[1];',
    '            var init = mm[2];',
    '            if (init) return "this." + name + init;',
    '            return "this." + name + " = undefined";',
    '          }).join("; ");',
    '          transformed += repl;',
    '          lastIndex = re.lastIndex;',
    '        }',
    '        transformed += src.slice(lastIndex);',
    '        // Execute with `this` bound to the emulated realm global.',
    '        try {',
    '          var ret = (new Function("with (this) { return (" + transformed + "); }")).call(g);',
    '          return __wrapRealmCallable(ret);',
    '        } catch (e) {',
    '          var ret2 = (new Function("with (this) { " + transformed + " }")).call(g);',
    '          return __wrapRealmCallable(ret2);',
    '        }',
    '      };',
    '      return { global: g };',
    '    };',
    '}',
  ];
}

function inject262Shim(outLines, testPath, meta, prependFiles = [], needsAgent = false) {
  let need262Shim = references262(testPath) || hasFeature(meta, realmFeatureName) || needsAgent;
  if (!need262Shim) {
    for (const p of prependFiles) {
      if (p && fs.existsSync(p) && references262(p)) {
        need262Shim = true;
        break;
      }
    }
  }
  if (!need262Shim) return;
  if (!outLines.some(l => l.indexOf(realmMarker) !== -1)) {
    outLines.push(...get262StubLines());
    outLines.push('');
  }
}

function verifyComposeStubMarkerCount(testPath, harnessIndex = {}, prependFiles = [], needStrict = true, expected = 1) {
  const { tmpPath } = composeTest({ testPath, repoDir: '.', harnessIndex, prependFiles, needStrict });
  const src = fs.readFileSync(tmpPath, 'utf8');
  const re = new RegExp(realmMarker.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'g');
  const count = (src.match(re) || []).length;
  return count === expected;
}

function composeTest({ testPath, repoDir, harnessIndex, prependFiles = [], needStrict = true, needsAgent = false, expectedNegative = null }) {
  const meta = extractMeta(testPath);
  const isRaw = hasFlag(meta, 'raw');
  // For non-runtime negative tests (parse/early/resolution phase), skip all
  // harness injections so the composed file matches the original source exactly.
  const skipInjects = isRaw || (expectedNegative && expectedNegative.phase && expectedNegative.phase !== 'runtime');

  let PREPEND_FILES = prependFiles.slice();

  // If test references assert, ensure assert/sta will be available
  if (referencesAssert(testPath)) {
    const assertPath = harnessIndex['assert.js'];
    const staPath = harnessIndex['sta.js'];
    if (assertPath) {
      const fixed = [];
      if (staPath) fixed.push(staPath);
      fixed.push(assertPath);
      for (const p of PREPEND_FILES) {
        const b = path.basename(p);
        if (!fixed.some(q => path.basename(q) === b)) fixed.push(p);
      }
      PREPEND_FILES = fixed;
    }
  }

  // If any PREPEND_FILES reference 'assert' but do NOT define it,
  // ensure sta.js/assert.js are injected before them.
  (function ensureAssertForIncludes() {
    const assertPath = harnessIndex['assert.js'];
    const staPath = harnessIndex['sta.js'];
    if (!assertPath) return;

    let needInject = false;
    for (const p of PREPEND_FILES) {
      if (!p || !fs.existsSync(p)) continue;
      const src = fs.readFileSync(p, 'utf8');
      const references = /\bassert\b/.test(src);
      const definesMeta = parseList(extractMeta(p), 'defines');
      const defines = /function\s+assert\b|var\s+assert\b|assert\._isSameValue/.test(src) || definesMeta.includes('assert');
      if (references && !defines) { needInject = true; break; }
    }
    if (needInject) {
      const fixed = [];
      if (staPath) fixed.push(staPath);
      fixed.push(assertPath);
      for (const p of PREPEND_FILES) {
        const b = path.basename(p);
        if (!fixed.some(q => path.basename(q) === b)) fixed.push(p);
      }
      PREPEND_FILES = fixed;
    }
  })();

  // If the test references Test262Error, ensure sta.js is injected.
  (function ensureTest262Error() {
    const src = fs.readFileSync(testPath, 'utf8');
    if (/\bTest262Error\b/.test(src)) {
      let definesTest262Error = false;
      for (const p of PREPEND_FILES) {
        if (!p || !fs.existsSync(p)) continue;
        const s = fs.readFileSync(p, 'utf8');
        if (/function\s+Test262Error\b|Test262Error.prototype/.test(s) ||
            /defines:\s*\[[^\]]*\bTest262Error\b/.test(extractMeta(p))) {
          definesTest262Error = true;
          break;
        }
      }
      if (!definesTest262Error) {
        const sta = harnessIndex['sta.js'];
        if (sta && fs.existsSync(sta)) {
          PREPEND_FILES.unshift(sta);
        }
      }
    }
  })();

  // Create composed target file
  const composed = createComposedTarget(testPath);
  const tmpName = composed.tmpPath;
  try { fs.unlinkSync(tmpName); } catch (_) {}
  const outLines = [];

  // Always prepend "use strict" for onlyStrict tests, even when skipInjects is true
  // (parse-phase negative tests must still run in strict mode to produce the expected SyntaxError).
  if (needStrict) {
    outLines.push('"use strict";');
    outLines.push('');
  }

  PREPEND_FILES = ensureArrayDistinct(PREPEND_FILES);
  const isModule = hasFlag(meta, 'module');

  let moduleBootstrapPath = null;
  if (!skipInjects) {
    inject262Shim(outLines, testPath, meta, PREPEND_FILES, needsAgent);

    if (isModule) {
      const bootstrapPrepends = ensureArrayDistinct(
        PREPEND_FILES.filter((p) => {
          const base = path.basename(p);
          return base === 'sta.js' || base === 'assert.js';
        })
      );
      if (bootstrapPrepends.length > 0) {
        moduleBootstrapPath = createModuleBootstrapTarget(testPath).tmpPath;
        const bootstrapLines = [];
        for (const p of bootstrapPrepends) {
          const absP = path.resolve(p);
          bootstrapLines.push(`// Inject: ${absP}`);
          bootstrapLines.push(fs.readFileSync(p, 'utf8'));
          bootstrapLines.push('');
        }
        bootstrapLines.push('// Inject: expose common harness helpers on globalThis for imported modules');
        bootstrapLines.push('if (typeof globalThis !== "undefined") {');
        bootstrapLines.push('  if (typeof assert !== "undefined" && typeof globalThis.assert === "undefined") globalThis.assert = assert;');
        bootstrapLines.push('  if (typeof Test262Error !== "undefined" && typeof globalThis.Test262Error === "undefined") globalThis.Test262Error = Test262Error;');
        bootstrapLines.push('}');
        bootstrapLines.push('');
        fs.writeFileSync(moduleBootstrapPath, bootstrapLines.join('\n'));
      }
    }
  }

  if (moduleBootstrapPath) {
    outLines.push(`import ${JSON.stringify(`./${path.basename(moduleBootstrapPath)}`)};`);
    outLines.push('');
  }

  if (!skipInjects) {
    // Inject $262.agent shim BEFORE harness files
    if (needsAgent) {
      const agentBootstrap = JSON.stringify(`${getAgentBootstrapLines().join('\n')}\n`);
      outLines.push('// Inject: $262.agent shim for multi-agent tests');
      outLines.push('if (!$262.agent) { $262.agent = {}; }');
      outLines.push(`var __agentBootstrap = ${agentBootstrap};`);
      outLines.push('$262.agent.start = function(script) { __agent_start(__agentBootstrap + String(script)); };');
      outLines.push('$262.agent.broadcast = function(sab) {');
      outLines.push('  if (sab && sab.buffer) { __agent_broadcast(sab.buffer); }');
      outLines.push('  else { __agent_broadcast(sab); }');
      outLines.push('};');
      outLines.push('$262.agent.getReport = function() { return __agent_getReport(); };');
      outLines.push('$262.agent.sleep = function(ms) { __agent_sleep(ms); };');
      outLines.push('$262.agent.monotonicNow = function() { return __agent_monotonicNow(); };');
      outLines.push('$262.agent.leaving = function() { __agent_leaving(); };');
      outLines.push('$262.agent.report = function(val) { __agent_report(String(val)); };');
      outLines.push('');
    }

    for (const p of PREPEND_FILES) {
      if (!p) continue;
      if (fs.existsSync(p)) {
        const absP = path.resolve(p);
        outLines.push(`// Inject: ${absP}`);
        outLines.push(fs.readFileSync(p, 'utf8'));
        outLines.push('');
      }
    }

    // Ensure host-provided `print` exists for test harnesses
    outLines.push('// Inject: ensure print is defined for harnesses');
    outLines.push('if (typeof print === "undefined") {');
    outLines.push('  if (typeof console !== "undefined" && typeof console.log === "function") {');
    outLines.push('    var print = function(msg) { console.log(msg); };');
    outLines.push('  } else {');
    outLines.push('    var print = function() {};');
    outLines.push('  }');
    outLines.push('}');
    outLines.push('');

    // Override harness buildString with native implementation when available
    // This replaces the JS loop (5s for 1.1M code points) with a Rust function (~1ms).
    outLines.push('// Inject: native buildString override for performance');
    outLines.push('if (typeof __buildString__ !== "undefined" && typeof buildString !== "undefined") { buildString = __buildString__; }');
    outLines.push('');

    // Expose common harness helpers on globalThis for imported modules
    outLines.push('// Inject: expose common harness helpers on globalThis for imported modules');
    outLines.push('if (typeof globalThis !== "undefined") {');
    outLines.push('  if (typeof assert !== "undefined" && typeof globalThis.assert === "undefined") globalThis.assert = assert;');
    outLines.push('  if (typeof Test262Error !== "undefined" && typeof globalThis.Test262Error === "undefined") globalThis.Test262Error = Test262Error;');
    outLines.push('  if (typeof $DONE !== "undefined" && typeof globalThis.$DONE === "undefined") globalThis.$DONE = $DONE;');
    outLines.push('}');
    outLines.push('');
  }

  // Ensure dynamic import resolves relative to the original test file path
  const _test_src = fs.readFileSync(testPath, 'utf8');
  const _uses_import = /^\s*import\b/m.test(_test_src) || /\bimport\s*\(/.test(_test_src);
  if (_uses_import && !skipInjects) {
    outLines.push('// Inject: stabilize __filepath for module resolution (only for tests that use import)');
    outLines.push(`globalThis.__filepath = ${JSON.stringify(path.resolve(testPath))};`);
    outLines.push('');
  }

  if (!skipInjects && (testPath.includes('/language/global-code/') || /\$262\.evalScript\b/.test(_test_src))) {
    outLines.push('// Inject: enable focused global-code semantics mode');
    outLines.push('// __test262_global_code_mode');
    outLines.push('');
  }

  // Append test source
  const absTest = path.resolve(testPath);
  if (!skipInjects) {
    outLines.push(`// Inject: ${absTest}`);
  }
  outLines.push(fs.readFileSync(testPath, 'utf8'));

  fs.writeFileSync(tmpName, outLines.join('\n'));

  return { testToRun: tmpName, tmpPath: tmpName, cleanupTmp: true };
}

module.exports = { extractMeta, parseList, hasFlag, hasFeature, get262StubLines, composeTest, referencesAssert, verifyComposeStubMarkerCount };