Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
Summary: Test for the optimisation regression fixed in D65059643

Reviewed By: malanka

Differential Revision: D65061785

fbshipit-source-id: 5dcb0a6dd3ae23039e1d09099f99a04c2ad57df2
  • Loading branch information
Simon Marlow authored and facebook-github-bot committed Oct 28, 2024
1 parent b69cafd commit 87128a1
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
[
"@generated",
{
"key": {
"file": { "key": "www/RefClass.php" },
"xref": {
"target": {
"name": "bazza",
"file": { "key": "www/RefClass.php" },
"location": { "span": { "start": 475, "length": 5 } }
},
"source": { "span": { "start": 888, "length": 5 } }
},
"entity": {
"decl": {
"method": {
"key": {
"name": { "key": "bazza" },
"container": {
"class_": {
"key": {
"name": { "key": { "name": { "key": "RefClass" } } }
}
}
}
}
}
}
}
}
},
{
"key": {
"file": { "key": "www/RefClass.php" },
"xref": {
"target": {
"name": "foo",
"file": { "key": "www/RefClass.php" },
"location": { "span": { "start": 411, "length": 3 } }
},
"source": { "span": { "start": 846, "length": 3 } }
},
"entity": {
"decl": {
"method": {
"key": {
"name": { "key": "foo" },
"container": {
"class_": {
"key": {
"name": { "key": { "name": { "key": "RefClass" } } }
}
}
}
}
}
}
}
}
},
{
"key": {
"file": { "key": "www/RefClass.php" },
"xref": {
"target": {
"name": "quux",
"file": { "key": "www/SourceTrait.php" },
"location": { "span": { "start": 264, "length": 4 } }
},
"source": { "span": { "start": 804, "length": 4 } }
},
"entity": {
"decl": {
"method": {
"key": {
"name": { "key": "quux" },
"container": {
"trait": {
"key": {
"name": { "key": { "name": { "key": "SourceTrait" } } }
}
}
}
}
}
}
}
}
},
{
"key": {
"file": { "key": "www/RefClass.php" },
"xref": {
"target": {
"name": "superAdd",
"file": { "key": "www/SuperClass.php" },
"location": { "span": { "start": 288, "length": 8 } }
},
"source": { "span": { "start": 911, "length": 8 } }
},
"entity": {
"decl": {
"method": {
"key": {
"name": { "key": "superAdd" },
"container": {
"class_": {
"key": {
"name": { "key": { "name": { "key": "SuperClass" } } }
}
}
}
}
}
}
}
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"@generated": null,
"hack.DeclarationLocation.6": 8,
"hack.FileXRefs.6": 5,
"src.File.1": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
query:
X0 where
X1 = codemarkup.hack.HackFileEntityXRefLocations.2
{file="www/RefClass.php"};
codemarkup.hack.HackFileEntityXRefLocations.2
{entity={decl={method=hack.MethodDeclaration.6 {}}}}=X1;
X0=X1
perf: true
transform: [gensort, []]

0 comments on commit 87128a1

Please sign in to comment.