mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-02 04:49:46 -06:00
fix: update imports for asm-docs directory
This commit is contained in:
@@ -135,7 +135,7 @@ def parse_descriptions(line, line_num, cpu_type, instructions):
|
||||
|
||||
|
||||
def write_script(filename, instructions):
|
||||
script = ["import {AssemblyInstructionInfo} from '../base';",
|
||||
script = ["import {AssemblyInstructionInfo} from '../base.js';",
|
||||
"",
|
||||
"export function getAsmOpcode(opcode: string | undefined): AssemblyInstructionInfo | undefined {",
|
||||
" if (!opcode) return;",
|
||||
|
||||
@@ -354,7 +354,7 @@ def main():
|
||||
print(f"Writing {len(instructions)} instructions")
|
||||
with open(args.outputpath, 'w') as f:
|
||||
f.write("""
|
||||
import {AssemblyInstructionInfo} from '../base';
|
||||
import {AssemblyInstructionInfo} from '../base.js';
|
||||
|
||||
export function getAsmOpcode(opcode: string | undefined): AssemblyInstructionInfo | undefined {
|
||||
if (!opcode) return;
|
||||
|
||||
@@ -179,7 +179,7 @@ def docenizer():
|
||||
print("Writing {} instructions".format(len(instructions)))
|
||||
with open(args.outputpath, 'w') as f:
|
||||
f.write("""
|
||||
import {AssemblyInstructionInfo} from '../base';
|
||||
import {AssemblyInstructionInfo} from '../base.js';
|
||||
|
||||
export function getAsmOpcode(opcode: string | undefined): AssemblyInstructionInfo | undefined {
|
||||
if (!opcode) return;
|
||||
|
||||
@@ -89,7 +89,7 @@ def process_description(desc):
|
||||
def write_script(filename, instructions):
|
||||
log_message(f"writing to {filename}...")
|
||||
with open(filename, "w") as script:
|
||||
script.write("import {AssemblyInstructionInfo} from '../base';\n")
|
||||
script.write("import {AssemblyInstructionInfo} from '../base.js';\n")
|
||||
script.write("\n")
|
||||
script.write("export function getAsmOpcode(opcode: string | undefined): AssemblyInstructionInfo | undefined {\n")
|
||||
script.write(" if (!opcode) return;\n")
|
||||
|
||||
@@ -126,7 +126,7 @@ def main():
|
||||
print(f"Writing {len(instructions)} instructions")
|
||||
with open(args.outputpath, 'w') as f:
|
||||
f.write("""
|
||||
import {AssemblyInstructionInfo} from '../base';
|
||||
import {AssemblyInstructionInfo} from '../base.js';
|
||||
|
||||
export function getAsmOpcode(opcode: string | undefined): AssemblyInstructionInfo | undefined {
|
||||
if (!opcode) return;
|
||||
|
||||
@@ -87,7 +87,7 @@ const main = async () => {
|
||||
.slice(1) // Drop 1 because the first is the "mne monic"
|
||||
.map(it => extract($(it), $))
|
||||
.flat();
|
||||
console.log('import {AssemblyInstructionInfo} from \'../base\';');
|
||||
console.log('import {AssemblyInstructionInfo} from \'../base.js\';');
|
||||
console.log('');
|
||||
console.log('export function getAsmOpcode(opcode: string | undefined): AssemblyInstructionInfo | undefined {');
|
||||
console.log(' if (!opcode) return;');
|
||||
|
||||
@@ -49,7 +49,7 @@ const $ = cheerio.load(contents);
|
||||
const names = getInstructionList($.root(), $);
|
||||
const info = names.map((x) => getInstructionInfo(x, $.root(), $));
|
||||
|
||||
console.log('import {AssemblyInstructionInfo} from \'../base\';');
|
||||
console.log('import {AssemblyInstructionInfo} from \'../base.js\';');
|
||||
console.log('');
|
||||
console.log('export function getAsmOpcode(opcode: string | undefined): AssemblyInstructionInfo | undefined {');
|
||||
console.log(' if (!opcode) return;');
|
||||
|
||||
@@ -114,7 +114,7 @@ def main():
|
||||
print(f"Writing {len(instructions)} instructions")
|
||||
with open(args.outputpath, 'w') as f:
|
||||
f.write("""
|
||||
import {AssemblyInstructionInfo} from '../base';
|
||||
import {AssemblyInstructionInfo} from '../base.js';
|
||||
|
||||
export function getAsmOpcode(opcode: string | undefined): AssemblyInstructionInfo | undefined {
|
||||
if (!opcode) return;
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
export {Amd64DocumentationProvider} from './amd64';
|
||||
export {Arm32DocumentationProvider} from './arm32';
|
||||
export {AvrDocumentationProvider} from './avr';
|
||||
export {EvmDocumentationProvider} from './evm';
|
||||
export {JavaDocumentationProvider} from './java';
|
||||
export {LLVMDocumentationProvider} from './llvm';
|
||||
export {Mos6502DocumentationProvider} from './mos6502';
|
||||
export {PythonDocumentationProvider} from './python';
|
||||
export {Amd64DocumentationProvider} from './amd64.js';
|
||||
export {Arm32DocumentationProvider} from './arm32.js';
|
||||
export {AvrDocumentationProvider} from './avr.js';
|
||||
export {EvmDocumentationProvider} from './evm.js';
|
||||
export {JavaDocumentationProvider} from './java.js';
|
||||
export {LLVMDocumentationProvider} from './llvm.js';
|
||||
export {Mos6502DocumentationProvider} from './mos6502.js';
|
||||
export {PythonDocumentationProvider} from './python.js';
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import {AssemblyInstructionInfo, BaseAssemblyDocumentationProvider} from './base';
|
||||
import {getAsmOpcode} from './generated/asm-docs-amd64';
|
||||
import {AssemblyInstructionInfo, BaseAssemblyDocumentationProvider} from './base.js';
|
||||
import {getAsmOpcode} from './generated/asm-docs-amd64.js';
|
||||
|
||||
export class Amd64DocumentationProvider extends BaseAssemblyDocumentationProvider {
|
||||
private static readonly ATT_SUFFIX_REMOVER = /^([a-z]+)[blqw]$/i;
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import {AssemblyInstructionInfo, BaseAssemblyDocumentationProvider} from './base';
|
||||
import {getAsmOpcode} from './generated/asm-docs-arm32';
|
||||
import {AssemblyInstructionInfo, BaseAssemblyDocumentationProvider} from './base.js';
|
||||
import {getAsmOpcode} from './generated/asm-docs-arm32.js';
|
||||
|
||||
export class Arm32DocumentationProvider extends BaseAssemblyDocumentationProvider {
|
||||
private static readonly CONDITIONAL_INSTRUCTION_REGEXP =
|
||||
|
||||
+2
-2
@@ -22,8 +22,8 @@
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import {AssemblyInstructionInfo, BaseAssemblyDocumentationProvider} from './base';
|
||||
import {getAsmOpcode} from './generated/asm-docs-avr';
|
||||
import {AssemblyInstructionInfo, BaseAssemblyDocumentationProvider} from './base.js';
|
||||
import {getAsmOpcode} from './generated/asm-docs-avr.js';
|
||||
|
||||
export class AvrDocumentationProvider extends BaseAssemblyDocumentationProvider {
|
||||
public static get key() {
|
||||
|
||||
+2
-2
@@ -22,8 +22,8 @@
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import {AssemblyInstructionInfo, BaseAssemblyDocumentationProvider} from './base';
|
||||
import {getAsmOpcode} from './generated/asm-docs-evm';
|
||||
import {AssemblyInstructionInfo, BaseAssemblyDocumentationProvider} from './base.js';
|
||||
import {getAsmOpcode} from './generated/asm-docs-evm.js';
|
||||
|
||||
export class EvmDocumentationProvider extends BaseAssemblyDocumentationProvider {
|
||||
public static get key() {
|
||||
|
||||
Generated
+1
-1
@@ -1,4 +1,4 @@
|
||||
import {AssemblyInstructionInfo} from '../base';
|
||||
import {AssemblyInstructionInfo} from '../base.js';
|
||||
|
||||
export function getAsmOpcode(opcode: string | undefined): AssemblyInstructionInfo | undefined {
|
||||
if (!opcode) return;
|
||||
|
||||
Generated
+1
-1
@@ -1,4 +1,4 @@
|
||||
import {AssemblyInstructionInfo} from '../base';
|
||||
import {AssemblyInstructionInfo} from '../base.js';
|
||||
|
||||
export function getAsmOpcode(opcode: string | undefined): AssemblyInstructionInfo | undefined {
|
||||
if (!opcode) return;
|
||||
|
||||
Generated
+1
-1
@@ -1,4 +1,4 @@
|
||||
import {AssemblyInstructionInfo} from '../base';
|
||||
import {AssemblyInstructionInfo} from '../base.js';
|
||||
|
||||
export function getAsmOpcode(opcode: string | undefined): AssemblyInstructionInfo | undefined {
|
||||
if (!opcode) return;
|
||||
|
||||
Generated
+1
-1
@@ -1,4 +1,4 @@
|
||||
import {AssemblyInstructionInfo} from '../base';
|
||||
import {AssemblyInstructionInfo} from '../base.js';
|
||||
|
||||
export function getAsmOpcode(opcode: string | undefined): AssemblyInstructionInfo | undefined {
|
||||
if (!opcode) return;
|
||||
|
||||
Generated
+1
-1
@@ -1,4 +1,4 @@
|
||||
import {AssemblyInstructionInfo} from '../base';
|
||||
import {AssemblyInstructionInfo} from '../base.js';
|
||||
|
||||
export function getAsmOpcode(opcode: string | undefined): AssemblyInstructionInfo | undefined {
|
||||
if (!opcode) return;
|
||||
|
||||
Generated
+1
-1
@@ -1,4 +1,4 @@
|
||||
import {AssemblyInstructionInfo} from '../base';
|
||||
import {AssemblyInstructionInfo} from '../base.js';
|
||||
|
||||
export function getAsmOpcode(opcode: string | undefined): AssemblyInstructionInfo | undefined {
|
||||
if (!opcode) return;
|
||||
|
||||
Generated
+1
-1
@@ -1,4 +1,4 @@
|
||||
import {AssemblyInstructionInfo} from '../base';
|
||||
import {AssemblyInstructionInfo} from '../base.js';
|
||||
|
||||
export function getAsmOpcode(opcode: string | undefined): AssemblyInstructionInfo | undefined {
|
||||
if (!opcode) return;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import {AssemblyInstructionInfo} from '../base';
|
||||
import {AssemblyInstructionInfo} from '../base.js';
|
||||
|
||||
export function getAsmOpcode(opcode: string | undefined): AssemblyInstructionInfo | undefined {
|
||||
if (!opcode) return;
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import {makeKeyedTypeGetter} from '../keyed-type';
|
||||
import {makeKeyedTypeGetter} from '../keyed-type.js';
|
||||
|
||||
import * as all from './_all';
|
||||
import * as all from './_all.js';
|
||||
|
||||
export {BaseAssemblyDocumentationProvider} from './base';
|
||||
export * from './_all';
|
||||
export {BaseAssemblyDocumentationProvider} from './base.js';
|
||||
export * from './_all.js';
|
||||
|
||||
export const getDocumentationProviderTypeByKey = makeKeyedTypeGetter('documentation provider', all);
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import {AssemblyInstructionInfo, BaseAssemblyDocumentationProvider} from './base';
|
||||
import {getAsmOpcode} from './generated/asm-docs-java';
|
||||
import {AssemblyInstructionInfo, BaseAssemblyDocumentationProvider} from './base.js';
|
||||
import {getAsmOpcode} from './generated/asm-docs-java.js';
|
||||
|
||||
export class JavaDocumentationProvider extends BaseAssemblyDocumentationProvider {
|
||||
public static get key() {
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import {AssemblyInstructionInfo, BaseAssemblyDocumentationProvider} from './base';
|
||||
import {getAsmOpcode} from './generated/asm-docs-llvm';
|
||||
import {AssemblyInstructionInfo, BaseAssemblyDocumentationProvider} from './base.js';
|
||||
import {getAsmOpcode} from './generated/asm-docs-llvm.js';
|
||||
|
||||
export class LLVMDocumentationProvider extends BaseAssemblyDocumentationProvider {
|
||||
public static get key() {
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import {AssemblyInstructionInfo, BaseAssemblyDocumentationProvider} from './base';
|
||||
import {getAsmOpcode} from './generated/asm-docs-6502';
|
||||
import {AssemblyInstructionInfo, BaseAssemblyDocumentationProvider} from './base.js';
|
||||
import {getAsmOpcode} from './generated/asm-docs-6502.js';
|
||||
|
||||
export class Mos6502DocumentationProvider extends BaseAssemblyDocumentationProvider {
|
||||
public static get key() {
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import {AssemblyInstructionInfo, BaseAssemblyDocumentationProvider} from './base';
|
||||
import {getAsmOpcode} from './generated/asm-docs-python';
|
||||
import {AssemblyInstructionInfo, BaseAssemblyDocumentationProvider} from './base.js';
|
||||
import {getAsmOpcode} from './generated/asm-docs-python.js';
|
||||
|
||||
export class PythonDocumentationProvider extends BaseAssemblyDocumentationProvider {
|
||||
public static get key() {
|
||||
|
||||
Reference in New Issue
Block a user