Skip to content

Commit 11dd1ca

Browse files
For 262 tests, emit a bit in the baseline stating if the node had an error or not.
1 parent 7f09714 commit 11dd1ca

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

src/compiler/parser.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ module ts {
99
export function getNodeConstructor(kind: SyntaxKind): new () => Node {
1010
return nodeConstructors[kind] || (nodeConstructors[kind] = objectAllocator.getNodeConstructor(kind));
1111
}
12-
12+
1313
export function createNode(kind: SyntaxKind): Node {
14-
return new (getNodeConstructor(kind))();
14+
return new (getNodeConstructor(kind))();
1515
}
1616

1717
// Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes
@@ -286,11 +286,11 @@ module ts {
286286
}
287287
text = "";
288288
}
289-
289+
290290
return text !== undefined ? createSourceFile(filename, text, languageVersion) : undefined;
291291
}
292292

293-
function writeFile(fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) {
293+
function writeFile(fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void) {
294294
function directoryExists(directoryPath: string): boolean {
295295
if (hasProperty(existingDirectories, directoryPath)) {
296296
return true;
@@ -400,7 +400,7 @@ module ts {
400400
}
401401
return 0;
402402
}
403-
403+
404404
function fixupParentReferences(sourceFile: SourceFile) {
405405
// normally parent references are set during binding.
406406
// however here SourceFile data is used only for syntactic features so running the whole binding process is an overhead.
@@ -422,7 +422,7 @@ module ts {
422422

423423
forEachChild(sourceFile, walk);
424424
}
425-
425+
426426
function isEvalOrArgumentsIdentifier(node: Node): boolean {
427427
return node.kind === SyntaxKind.Identifier &&
428428
((<Identifier>node).text === "eval" || (<Identifier>node).text === "arguments");
@@ -434,8 +434,8 @@ module ts {
434434
var nodeText = getSourceTextOfNodeFromSourceFile(sourceFile,(<ExpressionStatement>node).expression);
435435
return nodeText === '"use strict"' || nodeText === "'use strict'";
436436
}
437-
438-
export function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes = false): SourceFile {
437+
438+
export function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes = false): SourceFile {
439439
var parsingContext: ParsingContext;
440440
var identifiers: Map<string> = {};
441441
var identifierCount = 0;

src/harness/test262Runner.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class Test262BaselineRunner extends RunnerBase {
6868

6969
function serializeNode(n: ts.Node): any {
7070
var o: any = { kind: getKindName(n.kind) };
71+
o.containsParseError = ts.containsParseError(n);
7172

7273
ts.forEach(Object.getOwnPropertyNames(n), propertyName => {
7374
switch (propertyName) {

0 commit comments

Comments
 (0)