Skip to content
This repository was archived by the owner on Dec 8, 2025. It is now read-only.

Commit 2945f77

Browse files
committed
patch: load bytecode instead of assembly
1 parent eea64a6 commit 2945f77

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

cli/src/build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
compile,
1212
jacdacDefaultSpecifications,
1313
JacsDiagnostic,
14-
DEVS_ASSEMBLY_FILE,
14+
DEVS_BYTECODE_FILE,
1515
} from "devicescript-compiler"
1616
import { CmdOptions } from "./command"
1717
import { startDevTools } from "./devtools"
@@ -95,7 +95,7 @@ export async function build(file: string, options: BuildOptions) {
9595
}
9696

9797
async function buildWatch(file: string, options: BuildOptions) {
98-
const bytecodeFile = join(options.outDir, DEVS_ASSEMBLY_FILE)
98+
const bytecodeFile = join(options.outDir, DEVS_BYTECODE_FILE)
9999

100100
// start watch source file
101101
console.log(`watching ${file}...`)

cli/src/devtools.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import fs from "fs"
1010
const log = console.log
1111
const debug = console.debug
1212
const error = console.error
13+
const dasboardPath = "editors/devicescript"
1314

1415
function fetchProxy(localhost: boolean): Promise<string> {
1516
const protocol = localhost ? http : https
@@ -31,8 +32,8 @@ function fetchProxy(localhost: boolean): Promise<string> {
3132
body = body.replace(
3233
/https:\/\/microsoft.github.io\/jacdac-docs\/dashboard/g,
3334
localhost
34-
? "http://localhost:8000/devicescript/"
35-
: "https://microsoft.github.io/jacdac-docs/editors/devicescript/"
35+
? `http://localhost:8000/${dasboardPath}/`
36+
: `https://microsoft.github.io/jacdac-docs/${dasboardPath}/`
3637
)
3738
resolve(body)
3839
})
@@ -54,8 +55,7 @@ export async function startDevTools(
5455
const tcpPort = 8082
5556
const listenHost = internet ? undefined : "127.0.0.1"
5657

57-
log(`start dev tools for ${bytecodeFile}`)
58-
log(` dashboard: http://localhost:${port}`)
58+
log(`starting dev tools at http://localhost:${port}`)
5959
log(` websocket: ws://localhost:${port}`)
6060
log(` tcpsocket: tcp://localhost:${tcpPort}`)
6161

compiler/src/compiler.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export const CMD_GET_REG = 0x1000
7373
export const CMD_SET_REG = 0x2000
7474

7575
export const DEVS_ASSEMBLY_FILE = "prog.jasm"
76+
export const DEVS_BYTECODE_FILE = "prog.jacs"
7677

7778
class Cell {
7879
_index: number
@@ -2803,7 +2804,7 @@ class Program implements TopOpWriter {
28032804
globals: this.globals.list.map(r => r.debugInfo()),
28042805
source: this._source,
28052806
}
2806-
this.host.write("prog.jacs", b)
2807+
this.host.write(DEVS_BYTECODE_FILE, b)
28072808
const progJson = {
28082809
text: this._source,
28092810
blocks: "",

0 commit comments

Comments
 (0)