更新 emcc,修复解析器 heap 区域分配错误导致解析异常的问题

This commit is contained in:
锦恢 2024-11-30 18:42:56 +08:00
parent 43f4245cac
commit 1cf41bd897
11 changed files with 40 additions and 8035 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -16,8 +16,8 @@
<script> <script>
window.readVcdFile = async () => { window.readVcdFile = async () => {
let inputVcdFile = 'test.vcd'; let inputVcdFile = 'Tb_Sync_FIFO.vcd';
let inputViewFile = 'test.view'; let inputViewFile = 'Tb_Sync_FIFO.view';
const response = await fetch(inputVcdFile); const response = await fetch(inputVcdFile);
const arrayBuffer = await response.arrayBuffer(); const arrayBuffer = await response.arrayBuffer();
return [arrayBuffer, inputVcdFile, inputViewFile]; return [arrayBuffer, inputVcdFile, inputViewFile];

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -2,7 +2,7 @@ import os
os.system('npm run build') os.system('npm run build')
for file in os.listdir('dist'): for file in os.listdir('dist'):
if file.endswith('.vcd'): if file.endswith('.vcd') or file.endswith('.view'):
os.remove('dist/' + file) os.remove('dist/' + file)
with open('./dist/index.html', 'r', encoding='utf-8') as fp: with open('./dist/index.html', 'r', encoding='utf-8') as fp:

View File

@ -113,7 +113,7 @@ emitter.on('meta-ready', () => {
.current-display-cursor-up { .current-display-cursor-up {
height: var(--time-scale-height); height: var(--time-scale-height);
width: 60px; width: 50px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
@ -134,11 +134,10 @@ emitter.on('meta-ready', () => {
} }
.current-time-value { .current-time-value {
border-radius: .4em; border-radius: .3em;
color: var(--sidebar); color: var(--sidebar);
padding: 5px; padding: 5px;
width: fit-content; position: absolute;
font-size: 1.05rem;
font-family: var(--vcd-value-font-family); font-family: var(--vcd-value-font-family);
white-space: nowrap; white-space: nowrap;
z-index: 60; z-index: 60;
@ -147,16 +146,16 @@ emitter.on('meta-ready', () => {
.cursor-down-arrow { .cursor-down-arrow {
transform: rotate(225deg); transform: rotate(225deg);
position: absolute; position: absolute;
width: 15px; width: 10px;
height: 15px; height: 10px;
/* 30px - 10 * 2 / \sqrt{2} */ /* 25px - 10 * 2 / \sqrt{2} */
left: 19.93px; left: 17.93px;
bottom: -3px; bottom: 0;
z-index: 50; z-index: 50;
} }
.vertical-line { .vertical-line {
height: calc(100vh - 2 * var(--time-scale-height) - 65px); height: calc(100vh - 2 * var(--time-scale-height) - 63px);
} }
.cursor-up-arrow { .cursor-up-arrow {
@ -165,7 +164,7 @@ emitter.on('meta-ready', () => {
width: 15px; width: 15px;
height: 15px; height: 15px;
left: 19.93px; left: 19.93px;
top: -3px; top: 0px;
z-index: 50; z-index: 50;
} }
</style> </style>

View File

@ -98,10 +98,10 @@ const renderPivot = computed(() => {
} }
.current-time-value { .current-time-value {
border-radius: .4em; border-radius: .3em;
color: var(--vscode-foreground); color: var(--vscode-foreground);
padding: 5px; padding: 5px;
width: fit-content; position: absolute;
font-family: var(--vcd-value-font-family); font-family: var(--vcd-value-font-family);
white-space: nowrap; white-space: nowrap;
} }

View File

@ -298,10 +298,10 @@ onMounted(() => {
} }
.current-time-value { .current-time-value {
border-radius: .4em; border-radius: .3em;
color: var(--vscode-foreground); color: var(--vscode-foreground);
padding: 5px; padding: 5px;
width: fit-content; position: absolute;
font-family: var(--vcd-value-font-family); font-family: var(--vcd-value-font-family);
white-space: nowrap; white-space: nowrap;
} }

View File

@ -109,11 +109,17 @@ export class FormatValueRender {
const width = this.width; const width = this.width;
const replacer = this.replacer; const replacer = this.replacer;
if (value === 'x') { switch (value) {
return 'x'; case 'x':
return 'x';
break;
case '?':
return '?';
break;
default:
value = BigInt(value);
break;
} }
value = BigInt(value);
// 如果是有符号数 // 如果是有符号数
if (sign) { if (sign) {
@ -301,10 +307,17 @@ export class JSValueRender {
const width = this.width; const width = this.width;
const replacer = this.replacer; const replacer = this.replacer;
if (value === 'x') { switch (value) {
return -1; case 'x':
return -1;
break;
case '?':
return -1;
break;
default:
value = BigInt(value);
break;
} }
value = BigInt(value);
// 如果是有符号数 // 如果是有符号数
if (sign) { if (sign) {