Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
be2d4f15
Commit
be2d4f15
authored
Jun 03, 2016
by
Alex Beregszaszi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compiler: use a single copy of the solc url
parent
d18ba015
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
compiler.js
src/app/compiler.js
+7
-5
No files found.
src/app/compiler.js
View file @
be2d4f15
...
...
@@ -136,14 +136,16 @@ function Compiler (editor, handleGithubCall, outputField, hidingRHP, updateFiles
}
this
.
loadVersion
=
function
(
usingWorker
,
version
,
setVersionText
)
{
var
url
=
'https://ethereum.github.io/solc-bin/bin/'
+
version
;
if
(
usingWorker
)
{
loadWorker
(
version
,
setVersionText
);
loadWorker
(
url
,
setVersionText
);
}
else
{
loadInternal
(
version
,
setVersionText
);
loadInternal
(
url
,
setVersionText
);
}
};
function
loadInternal
(
version
,
setVersionText
)
{
function
loadInternal
(
url
,
setVersionText
)
{
Module
=
null
;
// Set a safe fallback until the new one is loaded
compileJSON
=
function
(
source
,
optimize
)
{
compilationFinished
(
'{}'
);
};
...
...
@@ -161,7 +163,7 @@ function Compiler (editor, handleGithubCall, outputField, hidingRHP, updateFiles
},
200
);
}
function
loadWorker
(
version
,
setVersionText
)
{
function
loadWorker
(
url
,
setVersionText
)
{
if
(
worker
!==
null
)
{
worker
.
terminate
();
}
...
...
@@ -183,7 +185,7 @@ function Compiler (editor, handleGithubCall, outputField, hidingRHP, updateFiles
compileJSON
=
function
(
source
,
optimize
)
{
worker
.
postMessage
({
cmd
:
'compile'
,
source
:
source
,
optimize
:
optimize
});
};
worker
.
postMessage
({
cmd
:
'loadVersion'
,
data
:
'https://ethereum.github.io/solc-bin/bin/'
+
version
});
worker
.
postMessage
({
cmd
:
'loadVersion'
,
data
:
url
});
};
function
gatherImports
(
files
,
importHints
,
cb
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment