更新 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>
window.readVcdFile = async () => {
let inputVcdFile = 'test.vcd';
let inputViewFile = 'test.view';
let inputVcdFile = 'Tb_Sync_FIFO.vcd';
let inputViewFile = 'Tb_Sync_FIFO.view';
const response = await fetch(inputVcdFile);
const arrayBuffer = await response.arrayBuffer();
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')
for file in os.listdir('dist'):
if file.endswith('.vcd'):
if file.endswith('.vcd') or file.endswith('.view'):
os.remove('dist/' + file)
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 {
height: var(--time-scale-height);
width: 60px;
width: 50px;
display: flex;
align-items: center;
justify-content: space-around;
@ -134,11 +134,10 @@ emitter.on('meta-ready', () => {
}
.current-time-value {
border-radius: .4em;
border-radius: .3em;
color: var(--sidebar);
padding: 5px;
width: fit-content;
font-size: 1.05rem;
position: absolute;
font-family: var(--vcd-value-font-family);
white-space: nowrap;
z-index: 60;
@ -147,16 +146,16 @@ emitter.on('meta-ready', () => {
.cursor-down-arrow {
transform: rotate(225deg);
position: absolute;
width: 15px;
height: 15px;
/* 30px - 10 * 2 / \sqrt{2} */
left: 19.93px;
bottom: -3px;
width: 10px;
height: 10px;
/* 25px - 10 * 2 / \sqrt{2} */
left: 17.93px;
bottom: 0;
z-index: 50;
}
.vertical-line {
height: calc(100vh - 2 * var(--time-scale-height) - 65px);
height: calc(100vh - 2 * var(--time-scale-height) - 63px);
}
.cursor-up-arrow {
@ -165,7 +164,7 @@ emitter.on('meta-ready', () => {
width: 15px;
height: 15px;
left: 19.93px;
top: -3px;
top: 0px;
z-index: 50;
}
</style>

View File

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

View File

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

View File

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