|
|
@ -19,7 +19,6 @@ function Compiler (handleImportCall) { |
|
|
|
this.event = new EventManager() |
|
|
|
this.event = new EventManager() |
|
|
|
|
|
|
|
|
|
|
|
var compileJSON |
|
|
|
var compileJSON |
|
|
|
var compilerAcceptsMultipleFiles |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var worker = null |
|
|
|
var worker = null |
|
|
|
|
|
|
|
|
|
|
@ -74,8 +73,6 @@ function Compiler (handleImportCall) { |
|
|
|
if (worker === null) { |
|
|
|
if (worker === null) { |
|
|
|
var compiler = solc(window.Module) |
|
|
|
var compiler = solc(window.Module) |
|
|
|
|
|
|
|
|
|
|
|
compilerAcceptsMultipleFiles = compiler.supportsMulti |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
compileJSON = function (source, optimize, cb) { |
|
|
|
compileJSON = function (source, optimize, cb) { |
|
|
|
var missingInputs = [] |
|
|
|
var missingInputs = [] |
|
|
|
var missingInputsCallback = function (path) { |
|
|
|
var missingInputsCallback = function (path) { |
|
|
@ -261,7 +258,6 @@ function Compiler (handleImportCall) { |
|
|
|
var data = msg.data |
|
|
|
var data = msg.data |
|
|
|
switch (data.cmd) { |
|
|
|
switch (data.cmd) { |
|
|
|
case 'versionLoaded': |
|
|
|
case 'versionLoaded': |
|
|
|
compilerAcceptsMultipleFiles = !!data.acceptsMultipleFiles |
|
|
|
|
|
|
|
onCompilerLoaded(data.data) |
|
|
|
onCompilerLoaded(data.data) |
|
|
|
break |
|
|
|
break |
|
|
|
case 'compiled': |
|
|
|
case 'compiled': |
|
|
@ -295,10 +291,6 @@ function Compiler (handleImportCall) { |
|
|
|
|
|
|
|
|
|
|
|
function gatherImports (files, target, importHints, cb) { |
|
|
|
function gatherImports (files, target, importHints, cb) { |
|
|
|
importHints = importHints || [] |
|
|
|
importHints = importHints || [] |
|
|
|
if (!compilerAcceptsMultipleFiles) { |
|
|
|
|
|
|
|
cb(null, files[target]) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// FIXME: This will only match imports if the file begins with one.
|
|
|
|
// FIXME: This will only match imports if the file begins with one.
|
|
|
|
// It should tokenize by lines and check each.
|
|
|
|
// It should tokenize by lines and check each.
|
|
|
|