Skip to content

Commit

Permalink
Convert LLVM compiler to TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk committed May 10, 2015
1 parent 56c35b2 commit cd6a1e7
Show file tree
Hide file tree
Showing 4 changed files with 1,216 additions and 1,371 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ src/typesystem.js
src/typesystem/bootstrap.js
src/typesystem/scope.js
src/targets/javascript.js
src/targets/llvm.js
src/targets/llvm/native-function.js
src/targets/llvm/native-types.js
src/**/*.js.map
Expand Down
7 changes: 4 additions & 3 deletions src/command-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var fs = require('fs'),

// Load source map support and LLVM target
require('source-map-support').install()
require('./targets/llvm')
var LLVMCompiler = require('./targets/llvm').LLVMCompiler

// Command-line arguments ----------------------------------------------------

Expand Down Expand Up @@ -112,8 +112,9 @@ try {
process.exit(1)
}

var outputs = []
tree.emitToFile({logger: logger, outputs: outputs, dump: Opts.dump})
var outputs = [],
compiler = new LLVMCompiler()
compiler.emitToFile(tree, {logger: logger, outputs: outputs, dump: Opts.dump})

function objectFileForBitcodeFile (path) {
return path.replace(/\.bc$/, '.o')
Expand Down
Loading

0 comments on commit cd6a1e7

Please sign in to comment.