Displaying (unformatted) function code.

This commit is contained in:
Ben Vanik
2013-12-22 09:25:44 -08:00
parent 4ecdfed46f
commit c92142ca02
20 changed files with 242 additions and 44 deletions

View File

@@ -18,6 +18,7 @@ namespace hir {
class FunctionBuilder;
}
namespace runtime {
class DebugInfo;
class Function;
class FunctionInfo;
class Runtime;
@@ -41,7 +42,7 @@ public:
virtual int Assemble(
runtime::FunctionInfo* symbol_info, hir::FunctionBuilder* builder,
runtime::Function** out_function) = 0;
runtime::DebugInfo* debug_info, runtime::Function** out_function) = 0;
protected:
Backend* backend_;

View File

@@ -53,8 +53,9 @@ void IVMAssembler::Reset() {
int IVMAssembler::Assemble(
FunctionInfo* symbol_info, FunctionBuilder* builder,
Function** out_function) {
DebugInfo* debug_info, Function** out_function) {
IVMFunction* fn = new IVMFunction(symbol_info);
fn->set_debug_info(debug_info);
TranslationContext ctx;
ctx.access_callbacks = backend_->runtime()->access_callbacks();

View File

@@ -31,7 +31,7 @@ public:
virtual int Assemble(
runtime::FunctionInfo* symbol_info, hir::FunctionBuilder* builder,
runtime::Function** out_function);
runtime::DebugInfo* debug_info, runtime::Function** out_function);
private:
Arena intcode_arena_;