@@ -89,7 +89,6 @@ export function same(a, b) {
8989export function call ( lookup , dangling , entry , signature , body ) {
9090 const args = [ ] ;
9191 let ret = "" ;
92- const rets = 1 ;
9392
9493 for ( let arg of Array . from ( signature ) ) {
9594 var id , shadow ;
@@ -99,7 +98,6 @@ export function call(lookup, dangling, entry, signature, body) {
9998 let other = null ;
10099 let meta = null ;
101100 let omit = false ;
102- const { inout } = arg ;
103101
104102 const isReturn = name === $ . RETURN_ARG ;
105103
@@ -178,7 +176,6 @@ export function build(body, calls) {
178176 // Check if we're only calling one snippet with identical signature
179177 // and not building void main();
180178 if ( calls && calls . length === 1 && entry !== "main" ) {
181- const a = body ;
182179 const b = calls [ 0 ] . module ;
183180
184181 if ( same ( body . signature , b . main . signature ) ) {
@@ -304,7 +301,8 @@ export const link = (link, out) => {
304301
305302 // Build wrapper function for the calling side
306303 const outer = body ( ) ;
307- const wrapper = call ( _lookup , _dangling , entry , external . signature , outer ) ;
304+ call ( _lookup , _dangling , entry , external . signature , outer ) ;
305+
308306 outer . calls = inner . calls ;
309307 outer . entry = name ;
310308
@@ -317,7 +315,7 @@ export function defuse(code) {
317315 // Don't try this at home kids
318316 const re =
319317 / ( [ A - Z a - z 0 - 9 _ ] + \s + ) ? [ A - Z a - z 0 - 9 _ ] + \s + [ A - Z a - z 0 - 9 _ ] + \s * \( [ ^ ) ] * \) \s * ; \s * / gm;
320- const strip = ( code ) => code . replace ( re , ( m ) => "" ) ;
318+ const strip = ( code ) => code . replace ( re , ( _m ) => "" ) ;
321319
322320 // Split into scopes by braces
323321 const blocks = code . split ( / (? = [ { } ] ) / g) ;
@@ -366,7 +364,7 @@ export function dedupe(code) {
366364 const map = { } ;
367365 const re =
368366 / ( ( a t t r i b u t e | u n i f o r m | v a r y i n g ) \s + ) [ A - Z a - z 0 - 9 _ ] + \s + ( [ A - Z a - z 0 - 9 _ ] + ) \s * ( \[ [ ^ \] ] * \] \s * ) ? ; \s * / gm;
369- return code . replace ( re , function ( m , qual , type , name , struct ) {
367+ return code . replace ( re , function ( m , qual , type , name , _struct ) {
370368 if ( map [ name ] ) {
371369 return "" ;
372370 }
0 commit comments