// Copyright 2017 the V8 project authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.// Flags: --validate-asm --allow-natives-syntaxconstkMaxLocals=50000;constfn_template='"use asm";\nfunction f() { LOCALS }\nreturn f;';for(varnum_locals=kMaxLocals;num_locals<kMaxLocals+2;++num_locals){constfn_code=fn_template.replace('LOCALS',Array(num_locals).fill().map((_,idx)=>'var l'+idx+' = 0;').join('\n'));constasm_fn=newFunction(fn_code);constf=asm_fn();f();assertEquals(num_locals<=kMaxLocals,%IsAsmWasmCode(asm_fn));}