forked from NUDT-compiler/nudt-compiler-cpp
Compare commits
16 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
bca490f52e | 1 day ago |
|
|
f15ad90289 | 1 day ago |
|
|
65d678fcd3 | 1 day ago |
|
|
346a9c4099 | 2 days ago |
|
|
693f54adf7 | 2 days ago |
|
|
3078c4cc5a | 2 days ago |
|
|
4413cfc4f5 | 2 days ago |
|
|
1fbdbb2ea1 | 3 days ago |
|
|
6faa67fb65 | 4 weeks ago |
|
|
9184ba9c9d | 1 month ago |
|
|
c33d36e040 | 1 month ago |
|
|
97d5ec1d48 | 1 month ago |
|
|
f16c29db26 | 1 month ago |
|
|
04a29b2bf9 | 1 month ago |
|
|
477720eb5e | 1 month ago |
|
|
192b8004ed | 1 month ago |
@ -0,0 +1,59 @@
|
||||
# 测试结果总结
|
||||
|
||||
## 功能测试 (Functional Tests): 10/11 通过 (90.9%)
|
||||
|
||||
### ✓ 通过的测试 (10个):
|
||||
1. 05_arr_defn4 - 数组定义和初始化
|
||||
2. 09_func_defn - 函数定义
|
||||
3. 11_add2 - 加法运算
|
||||
4. 13_sub2 - 减法运算
|
||||
5. 15_graph_coloring - 图着色算法 (使用2D数组和指针参数)
|
||||
6. 22_matrix_multiply - 矩阵乘法 (2D数组)
|
||||
7. 25_scope3 - 作用域测试
|
||||
|
||||
8. 29_break - break语句
|
||||
9. 36_op_priority2 - 运算符优先级
|
||||
10. simple_add - 简单加法
|
||||
### ✗ 失败的测试 (1个):
|
||||
- 95_float - **需要浮点数常量支持** (当前仅支持int)
|
||||
|
||||
## 性能测试 (Performance Tests): 8/10 编译成功 (80%)
|
||||
|
||||
### ✓ 编译成功 (8个):
|
||||
1. 01_mm2 - 矩阵乘法 (已验证输出正确: 1691748973)
|
||||
2. 02_mv3 - 矩阵向量乘法
|
||||
3. 03_sort1 - 排序算法
|
||||
4. 2025-MYO-20 - 综合测试
|
||||
5. fft0 - 快速傅里叶变换
|
||||
6. gameoflife-oscillator - 生命游戏
|
||||
7. if-combine3 - 条件分支优化
|
||||
8. transpose0 - 矩阵转置
|
||||
|
||||
### ✗ 编译失败 (2个):
|
||||
- large_loop_array_2 - **需要float返回类型支持**
|
||||
- vector_mul3 - **需要float变量支持**
|
||||
|
||||
## 总体成绩
|
||||
- **总计**: 18/21 测试通过/编译成功 (85.7%)
|
||||
- **整数支持**: 完整 (所有整数相关测试100%通过)
|
||||
- **浮点支持**: 未实现 (3个浮点测试全部失败)
|
||||
|
||||
## 已实现功能
|
||||
✓ 基本运算 (加减乘除、取模、比较、逻辑运算)
|
||||
✓ 控制流 (if/else, while, break, continue)
|
||||
✓ 函数调用 (参数传递、返回值)
|
||||
✓ 数组支持 (1D/2D数组、全局/局部数组)
|
||||
✓ 指针参数传递 (函数接收数组指针)
|
||||
✓ GEP指令 (数组元素地址计算)
|
||||
✓ AArch64代码生成 (完整的汇编输出)
|
||||
|
||||
## 未实现功能
|
||||
✗ 浮点数类型 (float/double)
|
||||
✗ 浮点运算
|
||||
✗ 浮点常量
|
||||
|
||||
## 关键修复
|
||||
1. **GEP指令实现** - 支持全局数组、局部数组、指针参数的元素访问
|
||||
2. **指针参数传递** - 区分数组地址传递和指针值加载
|
||||
3. **2D数组支持** - 完整的多维数组线性化和访问
|
||||
4. **栈帧管理** - 正确的栈偏移计算和指针存储
|
||||
@ -1,178 +1,151 @@
|
||||
#ifndef SEMANTIC_ANALYSIS_H
|
||||
#define SEMANTIC_ANALYSIS_H
|
||||
|
||||
#include "SymbolTable.h"
|
||||
#include "../../generated/antlr4/SysYBaseVisitor.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <unordered_map>
|
||||
#include <any>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "SymbolTable.h"
|
||||
#include "SysYBaseVisitor.h"
|
||||
#include "SysYParser.h"
|
||||
|
||||
// 错误信息结构体
|
||||
struct ErrorMsg {
|
||||
std::string msg;
|
||||
int line;
|
||||
int column;
|
||||
ErrorMsg(std::string m, int l, int c) : msg(std::move(m)), line(l), column(c) {}
|
||||
};
|
||||
std::string msg;
|
||||
int line;
|
||||
int column;
|
||||
|
||||
// 前向声明
|
||||
namespace antlr4 {
|
||||
class ParserRuleContext;
|
||||
namespace tree {
|
||||
class ParseTree;
|
||||
}
|
||||
}
|
||||
ErrorMsg(std::string m, int l, int c) : msg(std::move(m)), line(l), column(c) {}
|
||||
};
|
||||
|
||||
// 语义/IR生成上下文核心类
|
||||
class IRGenContext {
|
||||
public:
|
||||
// 错误管理
|
||||
void RecordError(const ErrorMsg& err) { errors_.push_back(err); }
|
||||
const std::vector<ErrorMsg>& GetErrors() const { return errors_; }
|
||||
bool HasError() const { return !errors_.empty(); }
|
||||
void ClearErrors() { errors_.clear(); }
|
||||
|
||||
// 类型绑定/查询 - 使用 void* 以兼容测试代码
|
||||
void SetType(void* ctx, SymbolType type) {
|
||||
node_type_map_[ctx] = type;
|
||||
}
|
||||
|
||||
SymbolType GetType(void* ctx) const {
|
||||
auto it = node_type_map_.find(ctx);
|
||||
return it == node_type_map_.end() ? SymbolType::TYPE_UNKNOWN : it->second;
|
||||
}
|
||||
|
||||
// 常量值绑定/查询 - 使用 void* 以兼容测试代码
|
||||
void SetConstVal(void* ctx, const std::any& val) {
|
||||
const_val_map_[ctx] = val;
|
||||
}
|
||||
|
||||
std::any GetConstVal(void* ctx) const {
|
||||
auto it = const_val_map_.find(ctx);
|
||||
return it == const_val_map_.end() ? std::any() : it->second;
|
||||
}
|
||||
|
||||
// 循环状态管理
|
||||
void EnterLoop() { sym_table_.EnterLoop(); }
|
||||
void ExitLoop() { sym_table_.ExitLoop(); }
|
||||
bool InLoop() const { return sym_table_.InLoop(); }
|
||||
|
||||
// 类型判断工具函数
|
||||
bool IsIntType(const std::any& val) const {
|
||||
return val.type() == typeid(long) || val.type() == typeid(int);
|
||||
}
|
||||
|
||||
bool IsFloatType(const std::any& val) const {
|
||||
return val.type() == typeid(double) || val.type() == typeid(float);
|
||||
}
|
||||
|
||||
// 当前函数返回类型
|
||||
SymbolType GetCurrentFuncReturnType() const {
|
||||
return current_func_ret_type_;
|
||||
}
|
||||
|
||||
void SetCurrentFuncReturnType(SymbolType type) {
|
||||
current_func_ret_type_ = type;
|
||||
}
|
||||
|
||||
// 符号表访问
|
||||
SymbolTable& GetSymbolTable() { return sym_table_; }
|
||||
const SymbolTable& GetSymbolTable() const { return sym_table_; }
|
||||
|
||||
// 作用域管理
|
||||
void EnterScope() { sym_table_.EnterScope(); }
|
||||
void LeaveScope() { sym_table_.LeaveScope(); }
|
||||
size_t GetScopeDepth() const { return sym_table_.GetScopeDepth(); }
|
||||
|
||||
private:
|
||||
SymbolTable sym_table_;
|
||||
std::unordered_map<void*, SymbolType> node_type_map_;
|
||||
std::unordered_map<void*, std::any> const_val_map_;
|
||||
std::vector<ErrorMsg> errors_;
|
||||
SymbolType current_func_ret_type_ = SymbolType::TYPE_UNKNOWN;
|
||||
public:
|
||||
void RecordError(const ErrorMsg& err) { errors_.push_back(err); }
|
||||
const std::vector<ErrorMsg>& GetErrors() const { return errors_; }
|
||||
bool HasError() const { return !errors_.empty(); }
|
||||
void ClearErrors() { errors_.clear(); }
|
||||
|
||||
void SetType(void* ctx, SymbolType type) { node_type_map_[ctx] = type; }
|
||||
|
||||
SymbolType GetType(void* ctx) const {
|
||||
auto it = node_type_map_.find(ctx);
|
||||
return it == node_type_map_.end() ? SymbolType::TYPE_UNKNOWN : it->second;
|
||||
}
|
||||
|
||||
void SetConstVal(void* ctx, const std::any& val) { const_val_map_[ctx] = val; }
|
||||
|
||||
std::any GetConstVal(void* ctx) const {
|
||||
auto it = const_val_map_.find(ctx);
|
||||
return it == const_val_map_.end() ? std::any() : it->second;
|
||||
}
|
||||
|
||||
void EnterLoop() { sym_table_.EnterLoop(); }
|
||||
void ExitLoop() { sym_table_.ExitLoop(); }
|
||||
bool InLoop() const { return sym_table_.InLoop(); }
|
||||
|
||||
bool IsIntType(const std::any& val) const {
|
||||
return val.type() == typeid(long) || val.type() == typeid(int);
|
||||
}
|
||||
|
||||
bool IsFloatType(const std::any& val) const {
|
||||
return val.type() == typeid(double) || val.type() == typeid(float);
|
||||
}
|
||||
|
||||
SymbolType GetCurrentFuncReturnType() const { return current_func_ret_type_; }
|
||||
void SetCurrentFuncReturnType(SymbolType type) { current_func_ret_type_ = type; }
|
||||
|
||||
SymbolTable& GetSymbolTable() { return sym_table_; }
|
||||
const SymbolTable& GetSymbolTable() const { return sym_table_; }
|
||||
|
||||
void EnterScope() { sym_table_.EnterScope(); }
|
||||
void LeaveScope() { sym_table_.LeaveScope(); }
|
||||
size_t GetScopeDepth() const { return sym_table_.GetScopeDepth(); }
|
||||
|
||||
private:
|
||||
SymbolTable sym_table_;
|
||||
std::unordered_map<void*, SymbolType> node_type_map_;
|
||||
std::unordered_map<void*, std::any> const_val_map_;
|
||||
std::vector<ErrorMsg> errors_;
|
||||
SymbolType current_func_ret_type_ = SymbolType::TYPE_UNKNOWN;
|
||||
};
|
||||
|
||||
class SemanticContext {
|
||||
public:
|
||||
void BindVarUse(const SysYParser::LValueContext* use,
|
||||
SysYParser::VarDefContext* decl) {
|
||||
var_uses_[use] = decl;
|
||||
}
|
||||
|
||||
SysYParser::VarDefContext* ResolveVarUse(
|
||||
const SysYParser::LValueContext* use) const {
|
||||
auto it = var_uses_.find(use);
|
||||
return it == var_uses_.end() ? nullptr : it->second;
|
||||
}
|
||||
|
||||
private:
|
||||
std::unordered_map<const SysYParser::LValueContext*, SysYParser::VarDefContext*>
|
||||
var_uses_;
|
||||
};
|
||||
|
||||
// 错误信息格式化工具函数
|
||||
inline std::string FormatErrMsg(const std::string& msg, int line, int col) {
|
||||
std::ostringstream oss;
|
||||
oss << "[行:" << line << ",列:" << col << "] " << msg;
|
||||
return oss.str();
|
||||
std::ostringstream oss;
|
||||
oss << "[行:" << line << ",列:" << col << "] " << msg;
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
// 语义分析访问器 - 继承自生成的基类
|
||||
class SemaVisitor : public SysYBaseVisitor {
|
||||
public:
|
||||
explicit SemaVisitor(IRGenContext& ctx) : ir_ctx_(ctx) {}
|
||||
|
||||
// 必须实现的 ANTLR4 接口
|
||||
std::any visit(antlr4::tree::ParseTree* tree) override {
|
||||
if (tree) {
|
||||
return tree->accept(this);
|
||||
}
|
||||
return std::any();
|
||||
}
|
||||
|
||||
std::any visitTerminal(antlr4::tree::TerminalNode* node) override {
|
||||
return std::any();
|
||||
}
|
||||
|
||||
std::any visitErrorNode(antlr4::tree::ErrorNode* node) override {
|
||||
if (node) {
|
||||
int line = node->getSymbol()->getLine();
|
||||
int col = node->getSymbol()->getCharPositionInLine() + 1;
|
||||
ir_ctx_.RecordError(ErrorMsg("语法错误节点", line, col));
|
||||
}
|
||||
return std::any();
|
||||
}
|
||||
|
||||
// 核心访问方法
|
||||
std::any visitCompUnit(SysYParser::CompUnitContext* ctx) override;
|
||||
std::any visitFuncDef(SysYParser::FuncDefContext* ctx) override;
|
||||
std::any visitDecl(SysYParser::DeclContext* ctx) override;
|
||||
std::any visitConstDecl(SysYParser::ConstDeclContext* ctx) override;
|
||||
std::any visitVarDecl(SysYParser::VarDeclContext* ctx) override;
|
||||
std::any visitBlock(SysYParser::BlockContext* ctx) override;
|
||||
std::any visitStmt(SysYParser::StmtContext* ctx) override;
|
||||
std::any visitLVal(SysYParser::LValContext* ctx) override;
|
||||
std::any visitExp(SysYParser::ExpContext* ctx) override;
|
||||
std::any visitCond(SysYParser::CondContext* ctx) override;
|
||||
std::any visitPrimaryExp(SysYParser::PrimaryExpContext* ctx) override;
|
||||
std::any visitUnaryExp(SysYParser::UnaryExpContext* ctx) override;
|
||||
std::any visitMulExp(SysYParser::MulExpContext* ctx) override;
|
||||
std::any visitAddExp(SysYParser::AddExpContext* ctx) override;
|
||||
std::any visitRelExp(SysYParser::RelExpContext* ctx) override;
|
||||
std::any visitEqExp(SysYParser::EqExpContext* ctx) override;
|
||||
std::any visitLAndExp(SysYParser::LAndExpContext* ctx) override;
|
||||
std::any visitLOrExp(SysYParser::LOrExpContext* ctx) override;
|
||||
std::any visitConstExp(SysYParser::ConstExpContext* ctx) override;
|
||||
std::any visitNumber(SysYParser::NumberContext* ctx) override;
|
||||
std::any visitFuncRParams(SysYParser::FuncRParamsContext* ctx) override;
|
||||
|
||||
// 通用子节点访问
|
||||
std::any visitChildren(antlr4::tree::ParseTree* node) override {
|
||||
std::any result;
|
||||
if (node) {
|
||||
for (auto* child : node->children) {
|
||||
if (child) {
|
||||
result = child->accept(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// 获取上下文引用
|
||||
IRGenContext& GetContext() { return ir_ctx_; }
|
||||
const IRGenContext& GetContext() const { return ir_ctx_; }
|
||||
|
||||
private:
|
||||
IRGenContext& ir_ctx_;
|
||||
public:
|
||||
explicit SemaVisitor(IRGenContext& ctx, SemanticContext* sema_ctx = nullptr)
|
||||
: ir_ctx_(ctx), sema_ctx_(sema_ctx) {}
|
||||
|
||||
std::any visitCompUnit(SysYParser::CompUnitContext* ctx) override;
|
||||
std::any visitDecl(SysYParser::DeclContext* ctx) override;
|
||||
std::any visitConstDecl(SysYParser::ConstDeclContext* ctx) override;
|
||||
std::any visitBtype(SysYParser::BtypeContext* ctx) override;
|
||||
std::any visitConstDef(SysYParser::ConstDefContext* ctx) override;
|
||||
std::any visitConstInitValue(SysYParser::ConstInitValueContext* ctx) override;
|
||||
std::any visitVarDecl(SysYParser::VarDeclContext* ctx) override;
|
||||
std::any visitVarDef(SysYParser::VarDefContext* ctx) override;
|
||||
std::any visitInitValue(SysYParser::InitValueContext* ctx) override;
|
||||
std::any visitFuncDef(SysYParser::FuncDefContext* ctx) override;
|
||||
std::any visitFuncType(SysYParser::FuncTypeContext* ctx) override;
|
||||
std::any visitFuncFParams(SysYParser::FuncFParamsContext* ctx) override;
|
||||
std::any visitFuncFParam(SysYParser::FuncFParamContext* ctx) override;
|
||||
std::any visitBlockStmt(SysYParser::BlockStmtContext* ctx) override;
|
||||
std::any visitBlockItem(SysYParser::BlockItemContext* ctx) override;
|
||||
std::any visitStmt(SysYParser::StmtContext* ctx) override;
|
||||
std::any visitReturnStmt(SysYParser::ReturnStmtContext* ctx) override;
|
||||
std::any visitExp(SysYParser::ExpContext* ctx) override;
|
||||
std::any visitCond(SysYParser::CondContext* ctx) override;
|
||||
std::any visitLValue(SysYParser::LValueContext* ctx) override;
|
||||
std::any visitPrimaryExp(SysYParser::PrimaryExpContext* ctx) override;
|
||||
std::any visitNumber(SysYParser::NumberContext* ctx) override;
|
||||
std::any visitUnaryExp(SysYParser::UnaryExpContext* ctx) override;
|
||||
std::any visitUnaryOp(SysYParser::UnaryOpContext* ctx) override;
|
||||
std::any visitFuncRParams(SysYParser::FuncRParamsContext* ctx) override;
|
||||
std::any visitMulExp(SysYParser::MulExpContext* ctx) override;
|
||||
std::any visitAddExp(SysYParser::AddExpContext* ctx) override;
|
||||
std::any visitRelExp(SysYParser::RelExpContext* ctx) override;
|
||||
std::any visitEqExp(SysYParser::EqExpContext* ctx) override;
|
||||
std::any visitLAndExp(SysYParser::LAndExpContext* ctx) override;
|
||||
std::any visitLOrExp(SysYParser::LOrExpContext* ctx) override;
|
||||
std::any visitConstExp(SysYParser::ConstExpContext* ctx) override;
|
||||
|
||||
IRGenContext& GetContext() { return ir_ctx_; }
|
||||
const IRGenContext& GetContext() const { return ir_ctx_; }
|
||||
|
||||
private:
|
||||
void RecordNodeError(antlr4::ParserRuleContext* ctx, const std::string& msg);
|
||||
|
||||
IRGenContext& ir_ctx_;
|
||||
SemanticContext* sema_ctx_ = nullptr;
|
||||
SymbolType current_decl_type_ = SymbolType::TYPE_UNKNOWN;
|
||||
bool current_decl_is_const_ = false;
|
||||
};
|
||||
|
||||
// 语义分析入口函数
|
||||
void RunSemanticAnalysis(SysYParser::CompUnitContext* ctx, IRGenContext& ir_ctx);
|
||||
SemanticContext RunSema(SysYParser::CompUnitContext& comp_unit);
|
||||
|
||||
#endif // SEMANTIC_ANALYSIS_H
|
||||
#endif // SEMANTIC_ANALYSIS_H
|
||||
|
||||
@ -0,0 +1,76 @@
|
||||
---
|
||||
📊 Lab3 完成情况总结
|
||||
|
||||
✅ 最终测试结果
|
||||
|
||||
- 通过率: 21/21 测试全部通过 ✓ (100%)
|
||||
- Functional 测试: 11/11 通过
|
||||
- Performance 测试: 10/10 通过
|
||||
- 测试时间: 2026年04月24日
|
||||
- 状态: Lab3 要求完全满足 ✓
|
||||
|
||||
---
|
||||
🎯 核心技术实现
|
||||
|
||||
1. 完整数组支持 (主要提交: 1fbdbb2)
|
||||
|
||||
- ✅ 实现 GEP 指令支持全局数组、局部数组、指针参数
|
||||
- ✅ 2D 数组线性化及正确地址计算
|
||||
- ✅ 指针参数传递机制(区分数组地址传递和指针值加载)
|
||||
- ✅ 新增 MIR 指令: LoadIndirect, StoreIndirect, LoadStackAddr
|
||||
- ✅ 支持多维数组访问 array[i][j]
|
||||
|
||||
2. 浮点数支持 (提交: 1fbdbb2 + 346a9c4)
|
||||
|
||||
- ✅ IR 类型系统扩展: Float32 和 PtrFloat32
|
||||
- ✅ 浮点常量 ConstantFloat 及 Context 管理
|
||||
- ✅ IRGen 支持浮点变量、字面量、函数参数/返回值
|
||||
- ✅ MIR 浮点寄存器: S0-S10
|
||||
- ✅ MIR 浮点指令: FAddRR, FSubRR, FMulRR, FDivRR, FCmpRR
|
||||
- ✅ IEEE 754 合规: 修复 NaN 比较的正确处理
|
||||
|
||||
3. 关键 Bug 修复
|
||||
|
||||
- ✅ 大偏移量栈访问 (提交: 3078c4c): 修复寄存器冲突问题
|
||||
- ✅ 控制流指令 (提交: 693f54a): 消除 Br 和 CondBr 编译警告
|
||||
- ✅ 浮点比较 (提交: 346a9c4): IEEE 754 标准 NaN 处理
|
||||
- ✅ GEP 结果存储: 使用 8 字节指针槽
|
||||
- ✅ 函数调用: 修复数组参数传递机制
|
||||
|
||||
---
|
||||
🛠️ 测试效率优化
|
||||
|
||||
创建批量测试脚本 scripts/batch_test.sh
|
||||
|
||||
功能特性:
|
||||
- 📁 自动测试 functional 和 performance 两个目录
|
||||
- ⏱️ 智能超时控制 (functional: 60s, performance: 600s)
|
||||
- 📊 自动对比输出和退出码
|
||||
- 📝 生成详细测试报告 (test_results.txt)
|
||||
- 📈 实时统计: 总计/通过/失败/跳过/通过率
|
||||
|
||||
使用方式:
|
||||
./scripts/batch_test.sh
|
||||
|
||||
---
|
||||
📈 代码变更统计
|
||||
|
||||
涉及 30 个文件, 主要修改:
|
||||
- src/mir/Lowering.cpp: +994 行 (核心指令选择逻辑)
|
||||
- src/mir/AsmPrinter.cpp: +421 行 (汇编生成)
|
||||
- src/irgen/IRGenDecl.cpp: +330 行 (数组/浮点声明)
|
||||
- src/mir/passes/Peephole.cpp: +292 行 (窥孔优化)
|
||||
- include/mir/MIR.h: +91 行 (MIR 指令扩展)
|
||||
- 总计: +2700 行, -257 行
|
||||
|
||||
---
|
||||
🎓 技术亮点
|
||||
|
||||
1. 完整的编译链路: SysY源码 → IR → MIR → AArch64汇编 → 可执行程序
|
||||
2. 严格的语义支持: 完全覆盖 Lab3 要求的 SysY 语义
|
||||
3. 健壮的测试: 包含矩阵乘法、图算法、FFT、康威生命游戏等复杂测试
|
||||
4. 自动化工具: 显著提升测试效率和开发体验
|
||||
|
||||
---
|
||||
结论: Lab3 不仅完成了基本要求,还在数组、浮点、测试自动化方面做了深度优化,实现了 100%
|
||||
测试通过率 🎉
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "nudt-compiler-cpp",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,3 @@
|
||||
This project is dual-licensed under the Unlicense and MIT licenses.
|
||||
|
||||
You may use this code under the terms of either license.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,46 @@
|
||||
# `@img/sharp-libvips-linux-x64`
|
||||
|
||||
Prebuilt libvips and dependencies for use with sharp on Linux (glibc) x64.
|
||||
|
||||
## Licensing
|
||||
|
||||
This software contains third-party libraries
|
||||
used under the terms of the following licences:
|
||||
|
||||
| Library | Used under the terms of |
|
||||
|---------------|-----------------------------------------------------------------------------------------------------------|
|
||||
| aom | BSD 2-Clause + [Alliance for Open Media Patent License 1.0](https://aomedia.org/license/patent-license/) |
|
||||
| cairo | Mozilla Public License 2.0 |
|
||||
| cgif | MIT Licence |
|
||||
| expat | MIT Licence |
|
||||
| fontconfig | [fontconfig Licence](https://gitlab.freedesktop.org/fontconfig/fontconfig/blob/main/COPYING) (BSD-like) |
|
||||
| freetype | [freetype Licence](https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/FTL.TXT) (BSD-like) |
|
||||
| fribidi | LGPLv3 |
|
||||
| glib | LGPLv3 |
|
||||
| harfbuzz | MIT Licence |
|
||||
| highway | Apache-2.0 License, BSD 3-Clause |
|
||||
| lcms | MIT Licence |
|
||||
| libarchive | BSD 2-Clause |
|
||||
| libexif | LGPLv3 |
|
||||
| libffi | MIT Licence |
|
||||
| libheif | LGPLv3 |
|
||||
| libimagequant | [BSD 2-Clause](https://github.com/lovell/libimagequant/blob/main/COPYRIGHT) |
|
||||
| libnsgif | MIT Licence |
|
||||
| libpng | [libpng License](https://github.com/pnggroup/libpng/blob/master/LICENSE) |
|
||||
| librsvg | LGPLv3 |
|
||||
| libspng | [BSD 2-Clause, libpng License](https://github.com/randy408/libspng/blob/master/LICENSE) |
|
||||
| libtiff | [libtiff License](https://gitlab.com/libtiff/libtiff/blob/master/LICENSE.md) (BSD-like) |
|
||||
| libvips | LGPLv3 |
|
||||
| libwebp | New BSD License |
|
||||
| libxml2 | MIT Licence |
|
||||
| mozjpeg | [zlib License, IJG License, BSD-3-Clause](https://github.com/mozilla/mozjpeg/blob/master/LICENSE.md) |
|
||||
| pango | LGPLv3 |
|
||||
| pixman | MIT Licence |
|
||||
| proxy-libintl | LGPLv3 |
|
||||
| zlib-ng | [zlib Licence](https://github.com/zlib-ng/zlib-ng/blob/develop/LICENSE.md) |
|
||||
|
||||
Use of libraries under the terms of the LGPLv3 is via the
|
||||
"any later version" clause of the LGPLv2 or LGPLv2.1.
|
||||
|
||||
Please report any errors or omissions via
|
||||
https://github.com/lovell/sharp-libvips/issues/new
|
||||
@ -0,0 +1,221 @@
|
||||
/* glibconfig.h
|
||||
*
|
||||
* This is a generated file. Please modify 'glibconfig.h.in'
|
||||
*/
|
||||
|
||||
#ifndef __GLIBCONFIG_H__
|
||||
#define __GLIBCONFIG_H__
|
||||
|
||||
#include <glib/gmacros.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <float.h>
|
||||
#define GLIB_HAVE_ALLOCA_H
|
||||
|
||||
#define GLIB_STATIC_COMPILATION 1
|
||||
#define GOBJECT_STATIC_COMPILATION 1
|
||||
#define GIO_STATIC_COMPILATION 1
|
||||
#define GMODULE_STATIC_COMPILATION 1
|
||||
#define GI_STATIC_COMPILATION 1
|
||||
#define G_INTL_STATIC_COMPILATION 1
|
||||
#define FFI_STATIC_BUILD 1
|
||||
|
||||
/* Specifies that GLib's g_print*() functions wrap the
|
||||
* system printf functions. This is useful to know, for example,
|
||||
* when using glibc's register_printf_function().
|
||||
*/
|
||||
#define GLIB_USING_SYSTEM_PRINTF
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_MINFLOAT FLT_MIN
|
||||
#define G_MAXFLOAT FLT_MAX
|
||||
#define G_MINDOUBLE DBL_MIN
|
||||
#define G_MAXDOUBLE DBL_MAX
|
||||
#define G_MINSHORT SHRT_MIN
|
||||
#define G_MAXSHORT SHRT_MAX
|
||||
#define G_MAXUSHORT USHRT_MAX
|
||||
#define G_MININT INT_MIN
|
||||
#define G_MAXINT INT_MAX
|
||||
#define G_MAXUINT UINT_MAX
|
||||
#define G_MINLONG LONG_MIN
|
||||
#define G_MAXLONG LONG_MAX
|
||||
#define G_MAXULONG ULONG_MAX
|
||||
|
||||
typedef signed char gint8;
|
||||
typedef unsigned char guint8;
|
||||
|
||||
typedef signed short gint16;
|
||||
typedef unsigned short guint16;
|
||||
|
||||
#define G_GINT16_MODIFIER "h"
|
||||
#define G_GINT16_FORMAT "hi"
|
||||
#define G_GUINT16_FORMAT "hu"
|
||||
|
||||
|
||||
typedef signed int gint32;
|
||||
typedef unsigned int guint32;
|
||||
|
||||
#define G_GINT32_MODIFIER ""
|
||||
#define G_GINT32_FORMAT "i"
|
||||
#define G_GUINT32_FORMAT "u"
|
||||
|
||||
|
||||
#define G_HAVE_GINT64 1 /* deprecated, always true */
|
||||
|
||||
typedef signed long gint64;
|
||||
typedef unsigned long guint64;
|
||||
|
||||
#define G_GINT64_CONSTANT(val) (val##L)
|
||||
#define G_GUINT64_CONSTANT(val) (val##UL)
|
||||
|
||||
#define G_GINT64_MODIFIER "l"
|
||||
#define G_GINT64_FORMAT "li"
|
||||
#define G_GUINT64_FORMAT "lu"
|
||||
|
||||
|
||||
#define GLIB_SIZEOF_VOID_P 8
|
||||
#define GLIB_SIZEOF_LONG 8
|
||||
#define GLIB_SIZEOF_SIZE_T 8
|
||||
#define GLIB_SIZEOF_SSIZE_T 8
|
||||
|
||||
typedef signed long gssize;
|
||||
typedef unsigned long gsize;
|
||||
#define G_GSIZE_MODIFIER "l"
|
||||
#define G_GSSIZE_MODIFIER "l"
|
||||
#define G_GSIZE_FORMAT "lu"
|
||||
#define G_GSSIZE_FORMAT "li"
|
||||
|
||||
#define G_MAXSIZE G_MAXULONG
|
||||
#define G_MINSSIZE G_MINLONG
|
||||
#define G_MAXSSIZE G_MAXLONG
|
||||
|
||||
typedef gint64 goffset;
|
||||
#define G_MINOFFSET G_MININT64
|
||||
#define G_MAXOFFSET G_MAXINT64
|
||||
|
||||
#define G_GOFFSET_MODIFIER G_GINT64_MODIFIER
|
||||
#define G_GOFFSET_FORMAT G_GINT64_FORMAT
|
||||
#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val)
|
||||
|
||||
#define G_POLLFD_FORMAT "%d"
|
||||
|
||||
#define GPOINTER_TO_INT(p) ((gint) (glong) (p))
|
||||
#define GPOINTER_TO_UINT(p) ((guint) (gulong) (p))
|
||||
|
||||
#define GINT_TO_POINTER(i) ((gpointer) (glong) (i))
|
||||
#define GUINT_TO_POINTER(u) ((gpointer) (gulong) (u))
|
||||
|
||||
typedef signed long gintptr;
|
||||
typedef unsigned long guintptr;
|
||||
|
||||
#define G_GINTPTR_MODIFIER "l"
|
||||
#define G_GINTPTR_FORMAT "li"
|
||||
#define G_GUINTPTR_FORMAT "lu"
|
||||
|
||||
#define GLIB_MAJOR_VERSION 2
|
||||
#define GLIB_MINOR_VERSION 86
|
||||
#define GLIB_MICRO_VERSION 1
|
||||
|
||||
#define G_OS_UNIX
|
||||
|
||||
#define G_VA_COPY va_copy
|
||||
|
||||
#define G_VA_COPY_AS_ARRAY 1
|
||||
|
||||
#define G_HAVE_ISO_VARARGS 1
|
||||
|
||||
/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
|
||||
* is passed ISO vararg support is turned off, and there is no work
|
||||
* around to turn it on, so we unconditionally turn it off.
|
||||
*/
|
||||
#if __GNUC__ == 2 && __GNUC_MINOR__ == 95
|
||||
# undef G_HAVE_ISO_VARARGS
|
||||
#endif
|
||||
|
||||
#define G_HAVE_GROWING_STACK 0
|
||||
|
||||
#ifndef _MSC_VER
|
||||
# define G_HAVE_GNUC_VARARGS 1
|
||||
#endif
|
||||
|
||||
#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
|
||||
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
|
||||
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
|
||||
#define G_GNUC_INTERNAL __hidden
|
||||
#elif defined (__GNUC__) && defined (G_HAVE_GNUC_VISIBILITY)
|
||||
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
|
||||
#else
|
||||
#define G_GNUC_INTERNAL
|
||||
#endif
|
||||
|
||||
#define G_THREADS_ENABLED
|
||||
#define G_THREADS_IMPL_POSIX
|
||||
|
||||
#define G_ATOMIC_LOCK_FREE
|
||||
|
||||
#define GINT16_TO_LE(val) ((gint16) (val))
|
||||
#define GUINT16_TO_LE(val) ((guint16) (val))
|
||||
#define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val))
|
||||
#define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
|
||||
|
||||
#define GINT32_TO_LE(val) ((gint32) (val))
|
||||
#define GUINT32_TO_LE(val) ((guint32) (val))
|
||||
#define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val))
|
||||
#define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val))
|
||||
|
||||
#define GINT64_TO_LE(val) ((gint64) (val))
|
||||
#define GUINT64_TO_LE(val) ((guint64) (val))
|
||||
#define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val))
|
||||
#define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val))
|
||||
|
||||
#define GLONG_TO_LE(val) ((glong) GINT64_TO_LE (val))
|
||||
#define GULONG_TO_LE(val) ((gulong) GUINT64_TO_LE (val))
|
||||
#define GLONG_TO_BE(val) ((glong) GINT64_TO_BE (val))
|
||||
#define GULONG_TO_BE(val) ((gulong) GUINT64_TO_BE (val))
|
||||
#define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val))
|
||||
#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val))
|
||||
#define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val))
|
||||
#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val))
|
||||
#define GSIZE_TO_LE(val) ((gsize) GUINT64_TO_LE (val))
|
||||
#define GSSIZE_TO_LE(val) ((gssize) GINT64_TO_LE (val))
|
||||
#define GSIZE_TO_BE(val) ((gsize) GUINT64_TO_BE (val))
|
||||
#define GSSIZE_TO_BE(val) ((gssize) GINT64_TO_BE (val))
|
||||
#define G_BYTE_ORDER G_LITTLE_ENDIAN
|
||||
|
||||
#define GLIB_SYSDEF_POLLIN =1
|
||||
#define GLIB_SYSDEF_POLLOUT =4
|
||||
#define GLIB_SYSDEF_POLLPRI =2
|
||||
#define GLIB_SYSDEF_POLLHUP =16
|
||||
#define GLIB_SYSDEF_POLLERR =8
|
||||
#define GLIB_SYSDEF_POLLNVAL =32
|
||||
|
||||
/* No way to disable deprecation warnings for macros, so only emit deprecation
|
||||
* warnings on platforms where usage of this macro is broken */
|
||||
#if defined(__APPLE__) || defined(_MSC_VER) || defined(__CYGWIN__)
|
||||
#define G_MODULE_SUFFIX "so" GLIB_DEPRECATED_MACRO_IN_2_76
|
||||
#else
|
||||
#define G_MODULE_SUFFIX "so"
|
||||
#endif
|
||||
|
||||
typedef int GPid;
|
||||
#define G_PID_FORMAT "i"
|
||||
|
||||
#define GLIB_SYSDEF_AF_UNIX 1
|
||||
#define GLIB_SYSDEF_AF_INET 2
|
||||
#define GLIB_SYSDEF_AF_INET6 10
|
||||
|
||||
#define GLIB_SYSDEF_MSG_OOB 1
|
||||
#define GLIB_SYSDEF_MSG_PEEK 2
|
||||
#define GLIB_SYSDEF_MSG_DONTROUTE 4
|
||||
|
||||
#define G_DIR_SEPARATOR '/'
|
||||
#define G_DIR_SEPARATOR_S "/"
|
||||
#define G_SEARCHPATH_SEPARATOR ':'
|
||||
#define G_SEARCHPATH_SEPARATOR_S ":"
|
||||
|
||||
#undef G_HAVE_FREE_SIZED
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GLIBCONFIG_H__ */
|
||||
@ -0,0 +1 @@
|
||||
module.exports = __dirname;
|
||||
Binary file not shown.
@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "@img/sharp-libvips-linux-x64",
|
||||
"version": "1.2.4",
|
||||
"description": "Prebuilt libvips and dependencies for use with sharp on Linux (glibc) x64",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/lovell/sharp-libvips.git",
|
||||
"directory": "npm/linux-x64"
|
||||
},
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
"versions.json"
|
||||
],
|
||||
"type": "commonjs",
|
||||
"exports": {
|
||||
"./lib": "./lib/index.js",
|
||||
"./package": "./package.json",
|
||||
"./versions": "./versions.json"
|
||||
},
|
||||
"config": {
|
||||
"glibc": ">=2.26"
|
||||
},
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"cpu": [
|
||||
"x64"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
{
|
||||
"aom": "3.13.1",
|
||||
"archive": "3.8.2",
|
||||
"cairo": "1.18.4",
|
||||
"cgif": "0.5.0",
|
||||
"exif": "0.6.25",
|
||||
"expat": "2.7.3",
|
||||
"ffi": "3.5.2",
|
||||
"fontconfig": "2.17.1",
|
||||
"freetype": "2.14.1",
|
||||
"fribidi": "1.0.16",
|
||||
"glib": "2.86.1",
|
||||
"harfbuzz": "12.1.0",
|
||||
"heif": "1.20.2",
|
||||
"highway": "1.3.0",
|
||||
"imagequant": "2.4.1",
|
||||
"lcms": "2.17",
|
||||
"mozjpeg": "0826579",
|
||||
"pango": "1.57.0",
|
||||
"pixman": "0.46.4",
|
||||
"png": "1.6.50",
|
||||
"proxy-libintl": "0.5",
|
||||
"rsvg": "2.61.2",
|
||||
"spng": "0.7.4",
|
||||
"tiff": "4.7.1",
|
||||
"vips": "8.17.3",
|
||||
"webp": "1.6.0",
|
||||
"xml2": "2.15.1",
|
||||
"zlib-ng": "2.2.5"
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
# `@img/sharp-libvips-linuxmusl-x64`
|
||||
|
||||
Prebuilt libvips and dependencies for use with sharp on Linux (musl) x64.
|
||||
|
||||
## Licensing
|
||||
|
||||
This software contains third-party libraries
|
||||
used under the terms of the following licences:
|
||||
|
||||
| Library | Used under the terms of |
|
||||
|---------------|-----------------------------------------------------------------------------------------------------------|
|
||||
| aom | BSD 2-Clause + [Alliance for Open Media Patent License 1.0](https://aomedia.org/license/patent-license/) |
|
||||
| cairo | Mozilla Public License 2.0 |
|
||||
| cgif | MIT Licence |
|
||||
| expat | MIT Licence |
|
||||
| fontconfig | [fontconfig Licence](https://gitlab.freedesktop.org/fontconfig/fontconfig/blob/main/COPYING) (BSD-like) |
|
||||
| freetype | [freetype Licence](https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/FTL.TXT) (BSD-like) |
|
||||
| fribidi | LGPLv3 |
|
||||
| glib | LGPLv3 |
|
||||
| harfbuzz | MIT Licence |
|
||||
| highway | Apache-2.0 License, BSD 3-Clause |
|
||||
| lcms | MIT Licence |
|
||||
| libarchive | BSD 2-Clause |
|
||||
| libexif | LGPLv3 |
|
||||
| libffi | MIT Licence |
|
||||
| libheif | LGPLv3 |
|
||||
| libimagequant | [BSD 2-Clause](https://github.com/lovell/libimagequant/blob/main/COPYRIGHT) |
|
||||
| libnsgif | MIT Licence |
|
||||
| libpng | [libpng License](https://github.com/pnggroup/libpng/blob/master/LICENSE) |
|
||||
| librsvg | LGPLv3 |
|
||||
| libspng | [BSD 2-Clause, libpng License](https://github.com/randy408/libspng/blob/master/LICENSE) |
|
||||
| libtiff | [libtiff License](https://gitlab.com/libtiff/libtiff/blob/master/LICENSE.md) (BSD-like) |
|
||||
| libvips | LGPLv3 |
|
||||
| libwebp | New BSD License |
|
||||
| libxml2 | MIT Licence |
|
||||
| mozjpeg | [zlib License, IJG License, BSD-3-Clause](https://github.com/mozilla/mozjpeg/blob/master/LICENSE.md) |
|
||||
| pango | LGPLv3 |
|
||||
| pixman | MIT Licence |
|
||||
| proxy-libintl | LGPLv3 |
|
||||
| zlib-ng | [zlib Licence](https://github.com/zlib-ng/zlib-ng/blob/develop/LICENSE.md) |
|
||||
|
||||
Use of libraries under the terms of the LGPLv3 is via the
|
||||
"any later version" clause of the LGPLv2 or LGPLv2.1.
|
||||
|
||||
Please report any errors or omissions via
|
||||
https://github.com/lovell/sharp-libvips/issues/new
|
||||
221
node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h
generated
vendored
221
node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h
generated
vendored
@ -0,0 +1,221 @@
|
||||
/* glibconfig.h
|
||||
*
|
||||
* This is a generated file. Please modify 'glibconfig.h.in'
|
||||
*/
|
||||
|
||||
#ifndef __GLIBCONFIG_H__
|
||||
#define __GLIBCONFIG_H__
|
||||
|
||||
#include <glib/gmacros.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <float.h>
|
||||
#define GLIB_HAVE_ALLOCA_H
|
||||
|
||||
#define GLIB_STATIC_COMPILATION 1
|
||||
#define GOBJECT_STATIC_COMPILATION 1
|
||||
#define GIO_STATIC_COMPILATION 1
|
||||
#define GMODULE_STATIC_COMPILATION 1
|
||||
#define GI_STATIC_COMPILATION 1
|
||||
#define G_INTL_STATIC_COMPILATION 1
|
||||
#define FFI_STATIC_BUILD 1
|
||||
|
||||
/* Specifies that GLib's g_print*() functions wrap the
|
||||
* system printf functions. This is useful to know, for example,
|
||||
* when using glibc's register_printf_function().
|
||||
*/
|
||||
#define GLIB_USING_SYSTEM_PRINTF
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_MINFLOAT FLT_MIN
|
||||
#define G_MAXFLOAT FLT_MAX
|
||||
#define G_MINDOUBLE DBL_MIN
|
||||
#define G_MAXDOUBLE DBL_MAX
|
||||
#define G_MINSHORT SHRT_MIN
|
||||
#define G_MAXSHORT SHRT_MAX
|
||||
#define G_MAXUSHORT USHRT_MAX
|
||||
#define G_MININT INT_MIN
|
||||
#define G_MAXINT INT_MAX
|
||||
#define G_MAXUINT UINT_MAX
|
||||
#define G_MINLONG LONG_MIN
|
||||
#define G_MAXLONG LONG_MAX
|
||||
#define G_MAXULONG ULONG_MAX
|
||||
|
||||
typedef signed char gint8;
|
||||
typedef unsigned char guint8;
|
||||
|
||||
typedef signed short gint16;
|
||||
typedef unsigned short guint16;
|
||||
|
||||
#define G_GINT16_MODIFIER "h"
|
||||
#define G_GINT16_FORMAT "hi"
|
||||
#define G_GUINT16_FORMAT "hu"
|
||||
|
||||
|
||||
typedef signed int gint32;
|
||||
typedef unsigned int guint32;
|
||||
|
||||
#define G_GINT32_MODIFIER ""
|
||||
#define G_GINT32_FORMAT "i"
|
||||
#define G_GUINT32_FORMAT "u"
|
||||
|
||||
|
||||
#define G_HAVE_GINT64 1 /* deprecated, always true */
|
||||
|
||||
typedef signed long gint64;
|
||||
typedef unsigned long guint64;
|
||||
|
||||
#define G_GINT64_CONSTANT(val) (val##L)
|
||||
#define G_GUINT64_CONSTANT(val) (val##UL)
|
||||
|
||||
#define G_GINT64_MODIFIER "l"
|
||||
#define G_GINT64_FORMAT "li"
|
||||
#define G_GUINT64_FORMAT "lu"
|
||||
|
||||
|
||||
#define GLIB_SIZEOF_VOID_P 8
|
||||
#define GLIB_SIZEOF_LONG 8
|
||||
#define GLIB_SIZEOF_SIZE_T 8
|
||||
#define GLIB_SIZEOF_SSIZE_T 8
|
||||
|
||||
typedef signed long gssize;
|
||||
typedef unsigned long gsize;
|
||||
#define G_GSIZE_MODIFIER "l"
|
||||
#define G_GSSIZE_MODIFIER "l"
|
||||
#define G_GSIZE_FORMAT "lu"
|
||||
#define G_GSSIZE_FORMAT "li"
|
||||
|
||||
#define G_MAXSIZE G_MAXULONG
|
||||
#define G_MINSSIZE G_MINLONG
|
||||
#define G_MAXSSIZE G_MAXLONG
|
||||
|
||||
typedef gint64 goffset;
|
||||
#define G_MINOFFSET G_MININT64
|
||||
#define G_MAXOFFSET G_MAXINT64
|
||||
|
||||
#define G_GOFFSET_MODIFIER G_GINT64_MODIFIER
|
||||
#define G_GOFFSET_FORMAT G_GINT64_FORMAT
|
||||
#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val)
|
||||
|
||||
#define G_POLLFD_FORMAT "%d"
|
||||
|
||||
#define GPOINTER_TO_INT(p) ((gint) (glong) (p))
|
||||
#define GPOINTER_TO_UINT(p) ((guint) (gulong) (p))
|
||||
|
||||
#define GINT_TO_POINTER(i) ((gpointer) (glong) (i))
|
||||
#define GUINT_TO_POINTER(u) ((gpointer) (gulong) (u))
|
||||
|
||||
typedef signed long gintptr;
|
||||
typedef unsigned long guintptr;
|
||||
|
||||
#define G_GINTPTR_MODIFIER "l"
|
||||
#define G_GINTPTR_FORMAT "li"
|
||||
#define G_GUINTPTR_FORMAT "lu"
|
||||
|
||||
#define GLIB_MAJOR_VERSION 2
|
||||
#define GLIB_MINOR_VERSION 86
|
||||
#define GLIB_MICRO_VERSION 1
|
||||
|
||||
#define G_OS_UNIX
|
||||
|
||||
#define G_VA_COPY va_copy
|
||||
|
||||
#define G_VA_COPY_AS_ARRAY 1
|
||||
|
||||
#define G_HAVE_ISO_VARARGS 1
|
||||
|
||||
/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
|
||||
* is passed ISO vararg support is turned off, and there is no work
|
||||
* around to turn it on, so we unconditionally turn it off.
|
||||
*/
|
||||
#if __GNUC__ == 2 && __GNUC_MINOR__ == 95
|
||||
# undef G_HAVE_ISO_VARARGS
|
||||
#endif
|
||||
|
||||
#define G_HAVE_GROWING_STACK 0
|
||||
|
||||
#ifndef _MSC_VER
|
||||
# define G_HAVE_GNUC_VARARGS 1
|
||||
#endif
|
||||
|
||||
#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
|
||||
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
|
||||
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
|
||||
#define G_GNUC_INTERNAL __hidden
|
||||
#elif defined (__GNUC__) && defined (G_HAVE_GNUC_VISIBILITY)
|
||||
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
|
||||
#else
|
||||
#define G_GNUC_INTERNAL
|
||||
#endif
|
||||
|
||||
#define G_THREADS_ENABLED
|
||||
#define G_THREADS_IMPL_POSIX
|
||||
|
||||
#define G_ATOMIC_LOCK_FREE
|
||||
|
||||
#define GINT16_TO_LE(val) ((gint16) (val))
|
||||
#define GUINT16_TO_LE(val) ((guint16) (val))
|
||||
#define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val))
|
||||
#define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
|
||||
|
||||
#define GINT32_TO_LE(val) ((gint32) (val))
|
||||
#define GUINT32_TO_LE(val) ((guint32) (val))
|
||||
#define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val))
|
||||
#define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val))
|
||||
|
||||
#define GINT64_TO_LE(val) ((gint64) (val))
|
||||
#define GUINT64_TO_LE(val) ((guint64) (val))
|
||||
#define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val))
|
||||
#define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val))
|
||||
|
||||
#define GLONG_TO_LE(val) ((glong) GINT64_TO_LE (val))
|
||||
#define GULONG_TO_LE(val) ((gulong) GUINT64_TO_LE (val))
|
||||
#define GLONG_TO_BE(val) ((glong) GINT64_TO_BE (val))
|
||||
#define GULONG_TO_BE(val) ((gulong) GUINT64_TO_BE (val))
|
||||
#define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val))
|
||||
#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val))
|
||||
#define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val))
|
||||
#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val))
|
||||
#define GSIZE_TO_LE(val) ((gsize) GUINT64_TO_LE (val))
|
||||
#define GSSIZE_TO_LE(val) ((gssize) GINT64_TO_LE (val))
|
||||
#define GSIZE_TO_BE(val) ((gsize) GUINT64_TO_BE (val))
|
||||
#define GSSIZE_TO_BE(val) ((gssize) GINT64_TO_BE (val))
|
||||
#define G_BYTE_ORDER G_LITTLE_ENDIAN
|
||||
|
||||
#define GLIB_SYSDEF_POLLIN =1
|
||||
#define GLIB_SYSDEF_POLLOUT =4
|
||||
#define GLIB_SYSDEF_POLLPRI =2
|
||||
#define GLIB_SYSDEF_POLLHUP =16
|
||||
#define GLIB_SYSDEF_POLLERR =8
|
||||
#define GLIB_SYSDEF_POLLNVAL =32
|
||||
|
||||
/* No way to disable deprecation warnings for macros, so only emit deprecation
|
||||
* warnings on platforms where usage of this macro is broken */
|
||||
#if defined(__APPLE__) || defined(_MSC_VER) || defined(__CYGWIN__)
|
||||
#define G_MODULE_SUFFIX "so" GLIB_DEPRECATED_MACRO_IN_2_76
|
||||
#else
|
||||
#define G_MODULE_SUFFIX "so"
|
||||
#endif
|
||||
|
||||
typedef int GPid;
|
||||
#define G_PID_FORMAT "i"
|
||||
|
||||
#define GLIB_SYSDEF_AF_UNIX 1
|
||||
#define GLIB_SYSDEF_AF_INET 2
|
||||
#define GLIB_SYSDEF_AF_INET6 10
|
||||
|
||||
#define GLIB_SYSDEF_MSG_OOB 1
|
||||
#define GLIB_SYSDEF_MSG_PEEK 2
|
||||
#define GLIB_SYSDEF_MSG_DONTROUTE 4
|
||||
|
||||
#define G_DIR_SEPARATOR '/'
|
||||
#define G_DIR_SEPARATOR_S "/"
|
||||
#define G_SEARCHPATH_SEPARATOR ':'
|
||||
#define G_SEARCHPATH_SEPARATOR_S ":"
|
||||
|
||||
#undef G_HAVE_FREE_SIZED
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GLIBCONFIG_H__ */
|
||||
@ -0,0 +1 @@
|
||||
module.exports = __dirname;
|
||||
Binary file not shown.
@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "@img/sharp-libvips-linuxmusl-x64",
|
||||
"version": "1.2.4",
|
||||
"description": "Prebuilt libvips and dependencies for use with sharp on Linux (musl) x64",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/lovell/sharp-libvips.git",
|
||||
"directory": "npm/linuxmusl-x64"
|
||||
},
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
"versions.json"
|
||||
],
|
||||
"type": "commonjs",
|
||||
"exports": {
|
||||
"./lib": "./lib/index.js",
|
||||
"./package": "./package.json",
|
||||
"./versions": "./versions.json"
|
||||
},
|
||||
"config": {
|
||||
"musl": ">=1.2.2"
|
||||
},
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"cpu": [
|
||||
"x64"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
{
|
||||
"aom": "3.13.1",
|
||||
"archive": "3.8.2",
|
||||
"cairo": "1.18.4",
|
||||
"cgif": "0.5.0",
|
||||
"exif": "0.6.25",
|
||||
"expat": "2.7.3",
|
||||
"ffi": "3.5.2",
|
||||
"fontconfig": "2.17.1",
|
||||
"freetype": "2.14.1",
|
||||
"fribidi": "1.0.16",
|
||||
"glib": "2.86.1",
|
||||
"harfbuzz": "12.1.0",
|
||||
"heif": "1.20.2",
|
||||
"highway": "1.3.0",
|
||||
"imagequant": "2.4.1",
|
||||
"lcms": "2.17",
|
||||
"mozjpeg": "0826579",
|
||||
"pango": "1.57.0",
|
||||
"pixman": "0.46.4",
|
||||
"png": "1.6.50",
|
||||
"proxy-libintl": "0.5",
|
||||
"rsvg": "2.61.2",
|
||||
"spng": "0.7.4",
|
||||
"tiff": "4.7.1",
|
||||
"vips": "8.17.3",
|
||||
"webp": "1.6.0",
|
||||
"xml2": "2.15.1",
|
||||
"zlib-ng": "2.2.5"
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "nudt-compiler-cpp",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {}
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
{}
|
||||
@ -0,0 +1,133 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
output_file="test_results.txt"
|
||||
test_dirs=("test/test_case/functional" "test/test_case/performance")
|
||||
|
||||
# 初始化输出文件
|
||||
{
|
||||
echo "开始批量测试..."
|
||||
echo "测试时间: $(date)"
|
||||
echo "========================================"
|
||||
echo ""
|
||||
} > "$output_file"
|
||||
|
||||
total=0
|
||||
passed=0
|
||||
failed=0
|
||||
skipped=0
|
||||
|
||||
for test_dir in "${test_dirs[@]}"; do
|
||||
if [[ ! -d "$test_dir" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "测试目录: $test_dir" | tee -a "$output_file"
|
||||
echo "----------------------------------------" >> "$output_file"
|
||||
|
||||
# 使用简单的 for 循环
|
||||
for test_file in "$test_dir"/*.sy; do
|
||||
if [[ ! -f "$test_file" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
((total++))
|
||||
name=$(basename "$test_file" .sy)
|
||||
|
||||
# 显示当前测试
|
||||
echo -n "测试 $name ... "
|
||||
echo ""
|
||||
|
||||
# 根据目录设置输出路径和超时时间
|
||||
if [[ "$test_dir" == *"functional"* ]]; then
|
||||
out_dir="test/test_result/function/asm"
|
||||
timeout_sec=60
|
||||
else
|
||||
out_dir="test/test_result/performance/asm"
|
||||
timeout_sec=600 # 性能测试增加到 3 分钟
|
||||
fi
|
||||
|
||||
# 运行测试
|
||||
temp_output=$(mktemp)
|
||||
if timeout ${timeout_sec}s ./scripts/verify_asm.sh "$test_file" "$out_dir" --run > "$temp_output" 2>&1; then
|
||||
# 提取并保存关键信息到文件
|
||||
{
|
||||
grep "运行 " "$temp_output" || echo "运行 $out_dir/$name ..."
|
||||
grep "退出码:" "$temp_output" || echo "退出码: 失败"
|
||||
|
||||
if grep -q "输出匹配:" "$temp_output"; then
|
||||
grep "输出匹配:" "$temp_output"
|
||||
echo ""
|
||||
((passed++))
|
||||
echo "✓"
|
||||
echo ""
|
||||
elif grep -q "输出不匹配:" "$temp_output"; then
|
||||
grep "输出不匹配:" "$temp_output"
|
||||
echo ""
|
||||
((failed++))
|
||||
echo "✗ (输出不匹配)"
|
||||
elif grep -q "未找到预期输出文件" "$temp_output"; then
|
||||
echo "未找到预期输出文件,跳过比对"
|
||||
echo ""
|
||||
((skipped++))
|
||||
echo "⊘ (无期望输出)"
|
||||
else
|
||||
echo "测试完成"
|
||||
echo ""
|
||||
((passed++))
|
||||
echo "✓"
|
||||
echo ""
|
||||
fi
|
||||
} >> "$output_file"
|
||||
else
|
||||
# 测试失败或超时
|
||||
{
|
||||
echo "运行 $out_dir/$name ..."
|
||||
echo "退出码: 超时或失败"
|
||||
echo "测试失败"
|
||||
echo ""
|
||||
} >> "$output_file"
|
||||
((failed++))
|
||||
echo "✗ (失败/超时)"
|
||||
fi
|
||||
|
||||
rm -f "$temp_output"
|
||||
done
|
||||
|
||||
echo "" >> "$output_file"
|
||||
done
|
||||
|
||||
# 输出统计
|
||||
echo ""
|
||||
echo "========================================"
|
||||
echo "测试统计:"
|
||||
echo " 总计: $total"
|
||||
echo " 通过: $passed"
|
||||
echo " 失败: $failed"
|
||||
echo " 跳过: $skipped"
|
||||
if [[ $total -gt 0 ]]; then
|
||||
pass_rate=$(awk "BEGIN {printf \"%.1f\", ($passed/$total)*100}")
|
||||
echo " 通过率: ${pass_rate}%"
|
||||
fi
|
||||
echo ""
|
||||
echo "详细结果已保存到: $output_file"
|
||||
|
||||
# 保存统计到文件
|
||||
{
|
||||
echo "========================================"
|
||||
echo "测试统计:"
|
||||
echo " 总计: $total"
|
||||
echo " 通过: $passed"
|
||||
echo " 失败: $failed"
|
||||
echo " 跳过: $skipped"
|
||||
if [[ $total -gt 0 ]]; then
|
||||
pass_rate=$(awk "BEGIN {printf \"%.1f\", ($passed/$total)*100}")
|
||||
echo " 通过率: ${pass_rate}%"
|
||||
fi
|
||||
} >> "$output_file"
|
||||
|
||||
# 返回状态码
|
||||
if [[ $failed -eq 0 ]]; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
@ -0,0 +1,137 @@
|
||||
#include "irgen/IRGen.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
#include "SysYParser.h"
|
||||
#include "utils/Log.h"
|
||||
|
||||
// 内部辅助:不依赖类成员,只需 ConstEnv。
|
||||
namespace {
|
||||
|
||||
double EvalAddExp(SysYParser::AddExpContext* ctx,
|
||||
const IRGenImpl::ConstEnv& int_env,
|
||||
const IRGenImpl::ConstFloatEnv& float_env);
|
||||
double EvalMulExp(SysYParser::MulExpContext* ctx,
|
||||
const IRGenImpl::ConstEnv& int_env,
|
||||
const IRGenImpl::ConstFloatEnv& float_env);
|
||||
double EvalUnaryExp(SysYParser::UnaryExpContext* ctx,
|
||||
const IRGenImpl::ConstEnv& int_env,
|
||||
const IRGenImpl::ConstFloatEnv& float_env);
|
||||
|
||||
int ParseIntLiteral(const std::string& text) {
|
||||
if (text.size() >= 2 && text[0] == '0' &&
|
||||
(text[1] == 'x' || text[1] == 'X')) {
|
||||
return std::stoi(text, nullptr, 16);
|
||||
}
|
||||
if (text.size() > 1 && text[0] == '0') {
|
||||
return std::stoi(text, nullptr, 8);
|
||||
}
|
||||
return std::stoi(text);
|
||||
}
|
||||
|
||||
double EvalPrimary(SysYParser::PrimaryExpContext* ctx,
|
||||
const IRGenImpl::ConstEnv& int_env,
|
||||
const IRGenImpl::ConstFloatEnv& float_env) {
|
||||
if (!ctx) throw std::runtime_error(FormatError("consteval", "空主表达式"));
|
||||
if (ctx->number()) {
|
||||
if (ctx->number()->ILITERAL()) {
|
||||
return static_cast<double>(ParseIntLiteral(ctx->number()->getText()));
|
||||
}
|
||||
if (ctx->number()->FLITERAL()) {
|
||||
return static_cast<double>(std::strtof(ctx->number()->getText().c_str(), nullptr));
|
||||
}
|
||||
throw std::runtime_error(FormatError("consteval", "非法数字字面量"));
|
||||
}
|
||||
if (ctx->exp()) return EvalAddExp(ctx->exp()->addExp(), int_env, float_env);
|
||||
if (ctx->lValue()) {
|
||||
if (!ctx->lValue()->ID())
|
||||
throw std::runtime_error(FormatError("consteval", "非法 lValue"));
|
||||
const std::string name = ctx->lValue()->ID()->getText();
|
||||
auto it_int = int_env.find(name);
|
||||
if (it_int != int_env.end()) return static_cast<double>(it_int->second);
|
||||
auto it_float = float_env.find(name);
|
||||
if (it_float != float_env.end()) return static_cast<double>(it_float->second);
|
||||
throw std::runtime_error(
|
||||
FormatError("consteval", "constExp 引用非 const 变量: " + name));
|
||||
}
|
||||
throw std::runtime_error(FormatError("consteval", "不支持的主表达式形式"));
|
||||
}
|
||||
|
||||
double EvalUnaryExp(SysYParser::UnaryExpContext* ctx,
|
||||
const IRGenImpl::ConstEnv& int_env,
|
||||
const IRGenImpl::ConstFloatEnv& float_env) {
|
||||
if (!ctx) throw std::runtime_error(FormatError("consteval", "空一元表达式"));
|
||||
if (ctx->primaryExp()) return EvalPrimary(ctx->primaryExp(), int_env, float_env);
|
||||
if (ctx->unaryOp() && ctx->unaryExp()) {
|
||||
double v = EvalUnaryExp(ctx->unaryExp(), int_env, float_env);
|
||||
if (ctx->unaryOp()->SUB()) return -v;
|
||||
if (ctx->unaryOp()->ADD()) return v;
|
||||
if (ctx->unaryOp()->NOT()) return (v == 0.0) ? 1.0 : 0.0;
|
||||
}
|
||||
throw std::runtime_error(
|
||||
FormatError("consteval", "函数调用不能出现在 constExp 中"));
|
||||
}
|
||||
|
||||
double EvalMulExp(SysYParser::MulExpContext* ctx,
|
||||
const IRGenImpl::ConstEnv& int_env,
|
||||
const IRGenImpl::ConstFloatEnv& float_env) {
|
||||
if (!ctx) throw std::runtime_error(FormatError("consteval", "空乘法表达式"));
|
||||
if (ctx->mulExp()) {
|
||||
double lhs = EvalMulExp(ctx->mulExp(), int_env, float_env);
|
||||
double rhs = EvalUnaryExp(ctx->unaryExp(), int_env, float_env);
|
||||
if (ctx->MUL()) return lhs * rhs;
|
||||
if (ctx->DIV()) {
|
||||
if (rhs == 0.0) throw std::runtime_error("除以零");
|
||||
return lhs / rhs;
|
||||
}
|
||||
if (ctx->MOD()) {
|
||||
if (rhs == 0.0) throw std::runtime_error("模零");
|
||||
return std::fmod(lhs, rhs);
|
||||
}
|
||||
throw std::runtime_error(FormatError("consteval", "未知乘法运算符"));
|
||||
}
|
||||
return EvalUnaryExp(ctx->unaryExp(), int_env, float_env);
|
||||
}
|
||||
|
||||
double EvalAddExp(SysYParser::AddExpContext* ctx,
|
||||
const IRGenImpl::ConstEnv& int_env,
|
||||
const IRGenImpl::ConstFloatEnv& float_env) {
|
||||
if (!ctx) throw std::runtime_error(FormatError("consteval", "空加法表达式"));
|
||||
if (ctx->addExp()) {
|
||||
double lhs = EvalAddExp(ctx->addExp(), int_env, float_env);
|
||||
double rhs = EvalMulExp(ctx->mulExp(), int_env, float_env);
|
||||
if (ctx->ADD()) return lhs + rhs;
|
||||
if (ctx->SUB()) return lhs - rhs;
|
||||
throw std::runtime_error(FormatError("consteval", "未知加法运算符"));
|
||||
}
|
||||
return EvalMulExp(ctx->mulExp(), int_env, float_env);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
int IRGenImpl::EvalConstExpr(SysYParser::ConstExpContext* ctx) const {
|
||||
if (!ctx || !ctx->addExp())
|
||||
throw std::runtime_error(FormatError("consteval", "空 constExp"));
|
||||
return static_cast<int>(EvalAddExp(ctx->addExp(), const_env_, const_float_env_));
|
||||
}
|
||||
|
||||
float IRGenImpl::EvalConstExprAsFloat(SysYParser::ConstExpContext* ctx) const {
|
||||
if (!ctx || !ctx->addExp())
|
||||
throw std::runtime_error(FormatError("consteval", "空 constExp"));
|
||||
return static_cast<float>(EvalAddExp(ctx->addExp(), const_env_, const_float_env_));
|
||||
}
|
||||
|
||||
int IRGenImpl::EvalExpAsConst(SysYParser::ExpContext* ctx) const {
|
||||
if (!ctx || !ctx->addExp())
|
||||
throw std::runtime_error(FormatError("consteval", "空 exp"));
|
||||
return static_cast<int>(EvalAddExp(ctx->addExp(), const_env_, const_float_env_));
|
||||
}
|
||||
|
||||
float IRGenImpl::EvalExpAsConstFloat(SysYParser::ExpContext* ctx) const {
|
||||
if (!ctx || !ctx->addExp())
|
||||
throw std::runtime_error(FormatError("consteval", "空 exp"));
|
||||
return static_cast<float>(EvalAddExp(ctx->addExp(), const_env_, const_float_env_));
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,2 +1,2 @@
|
||||
1
|
||||
1
|
||||
0
|
||||
@ -0,0 +1,143 @@
|
||||
开始批量测试...
|
||||
测试时间: 2026年 04月 24日 星期五 10:53:20 CST
|
||||
========================================
|
||||
|
||||
测试目录: test/test_case/functional
|
||||
----------------------------------------
|
||||
运行 test/test_result/function/asm/05_arr_defn4 ...
|
||||
退出码: 21
|
||||
输出匹配: test/test_case/functional/05_arr_defn4.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/function/asm/09_func_defn ...
|
||||
退出码: 9
|
||||
输出匹配: test/test_case/functional/09_func_defn.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/function/asm/11_add2 ...
|
||||
退出码: 9
|
||||
输出匹配: test/test_case/functional/11_add2.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/function/asm/13_sub2 ...
|
||||
退出码: 248
|
||||
输出匹配: test/test_case/functional/13_sub2.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/function/asm/15_graph_coloring ...
|
||||
退出码: 0
|
||||
输出匹配: test/test_case/functional/15_graph_coloring.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/function/asm/22_matrix_multiply ...
|
||||
退出码: 0
|
||||
输出匹配: test/test_case/functional/22_matrix_multiply.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/function/asm/25_scope3 ...
|
||||
退出码: 46
|
||||
输出匹配: test/test_case/functional/25_scope3.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/function/asm/29_break ...
|
||||
退出码: 201
|
||||
输出匹配: test/test_case/functional/29_break.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/function/asm/36_op_priority2 ...
|
||||
退出码: 24
|
||||
输出匹配: test/test_case/functional/36_op_priority2.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/function/asm/95_float ...
|
||||
退出码: 0
|
||||
输出匹配: test/test_case/functional/95_float.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/function/asm/simple_add ...
|
||||
退出码: 3
|
||||
输出匹配: test/test_case/functional/simple_add.out
|
||||
|
||||
✓
|
||||
|
||||
|
||||
测试目录: test/test_case/performance
|
||||
----------------------------------------
|
||||
运行 test/test_result/performance/asm/01_mm2 ...
|
||||
退出码: 0
|
||||
输出匹配: test/test_case/performance/01_mm2.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/performance/asm/02_mv3 ...
|
||||
退出码: 0
|
||||
输出匹配: test/test_case/performance/02_mv3.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/performance/asm/03_sort1 ...
|
||||
退出码: 0
|
||||
输出匹配: test/test_case/performance/03_sort1.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/performance/asm/2025-MYO-20 ...
|
||||
退出码: 0
|
||||
输出匹配: test/test_case/performance/2025-MYO-20.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/performance/asm/fft0 ...
|
||||
退出码: 0
|
||||
输出匹配: test/test_case/performance/fft0.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/performance/asm/gameoflife-oscillator ...
|
||||
退出码: 0
|
||||
输出匹配: test/test_case/performance/gameoflife-oscillator.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/performance/asm/if-combine3 ...
|
||||
退出码: 0
|
||||
输出匹配: test/test_case/performance/if-combine3.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/performance/asm/large_loop_array_2 ...
|
||||
0退出码: 0
|
||||
输出匹配: test/test_case/performance/large_loop_array_2.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/performance/asm/transpose0 ...
|
||||
退出码: 0
|
||||
输出匹配: test/test_case/performance/transpose0.out
|
||||
|
||||
✓
|
||||
|
||||
运行 test/test_result/performance/asm/vector_mul3 ...
|
||||
退出码: 0
|
||||
输出匹配: test/test_case/performance/vector_mul3.out
|
||||
|
||||
✓
|
||||
|
||||
|
||||
========================================
|
||||
测试统计:
|
||||
总计: 21
|
||||
通过: 21
|
||||
失败: 0
|
||||
跳过: 0
|
||||
通过率: 100.0%
|
||||
@ -0,0 +1,14 @@
|
||||
批量测试示例
|
||||
========================================
|
||||
运行 test/test_result/performance/asm/vector_mul3 ...
|
||||
退出码: 0
|
||||
输出匹配: test/test_case/performance/vector_mul3.out
|
||||
|
||||
运行 test/test_result/functional/asm/95_float ...
|
||||
退出码: 0
|
||||
输出匹配: test/test_case/functional/95_float.out
|
||||
|
||||
运行 test/test_result/functional/asm/22_matrix_multiply ...
|
||||
退出码: 0
|
||||
输出匹配: test/test_case/functional/22_matrix_multiply.out
|
||||
|
||||
Loading…
Reference in new issue