Commit 8a09a4cb authored by chriseth's avatar chriseth Committed by yann300

Rely on standard wrapper for single-file compiler versions.

parent 4d5ea4f4
...@@ -33,8 +33,7 @@ module.exports = function (self) { ...@@ -33,8 +33,7 @@ module.exports = function (self) {
self.postMessage({ self.postMessage({
cmd: 'versionLoaded', cmd: 'versionLoaded',
data: compiler.version(), data: compiler.version()
acceptsMultipleFiles: compiler.supportsMulti
}) })
break break
case 'compile': case 'compile':
......
...@@ -19,7 +19,6 @@ function Compiler (handleImportCall) { ...@@ -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) { ...@@ -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) { ...@@ -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) { ...@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment