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
5811ac8f
Commit
5811ac8f
authored
Jun 03, 2016
by
Alex Beregszaszi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move all compiler primitives to compiler.js from app.js
parent
cda62365
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
13 deletions
+20
-13
app.js
src/app.js
+1
-11
compiler.js
src/app/compiler.js
+19
-2
No files found.
src/app.js
View file @
5811ac8f
...
@@ -424,17 +424,7 @@ var run = function () {
...
@@ -424,17 +424,7 @@ var run = function () {
// resort to non-worker version in that case.
// resort to non-worker version in that case.
compiler
.
initializeWorker
(
version
,
setVersionText
);
compiler
.
initializeWorker
(
version
,
setVersionText
);
}
else
{
}
else
{
Module
=
null
;
compiler
.
loadVersion
(
version
,
setVersionText
);
compiler
.
setCompileJSON
()
var
newScript
=
document
.
createElement
(
'script'
);
newScript
.
type
=
'text/javascript'
;
newScript
.
src
=
'https://ethereum.github.io/solc-bin/bin/'
+
version
;
document
.
getElementsByTagName
(
'head'
)[
0
].
appendChild
(
newScript
);
var
check
=
window
.
setInterval
(
function
()
{
if
(
!
Module
)
return
;
window
.
clearInterval
(
check
);
compiler
.
onCompilerLoaded
(
setVersionText
);
},
200
);
}
}
};
};
...
...
src/app/compiler.js
View file @
5811ac8f
...
@@ -63,9 +63,10 @@ function Compiler (editor, handleGithubCall, outputField, hidingRHP, updateFiles
...
@@ -63,9 +63,10 @@ function Compiler (editor, handleGithubCall, outputField, hidingRHP, updateFiles
editor
.
setAnnotations
(
sourceAnnotations
);
editor
.
setAnnotations
(
sourceAnnotations
);
};
};
this
.
setCompileJSON
=
function
()
{
function
setCompileJSON
()
{
compileJSON
=
function
(
source
,
optimize
)
{
compilationFinished
(
'{}'
);
};
compileJSON
=
function
(
source
,
optimize
)
{
compilationFinished
(
'{}'
);
};
};
};
this
.
setCompileJSON
=
setCompileJSON
;
function
onCompilerLoaded
(
setVersionText
)
{
function
onCompilerLoaded
(
setVersionText
)
{
if
(
worker
===
null
)
{
if
(
worker
===
null
)
{
...
@@ -136,6 +137,22 @@ function Compiler (editor, handleGithubCall, outputField, hidingRHP, updateFiles
...
@@ -136,6 +137,22 @@ function Compiler (editor, handleGithubCall, outputField, hidingRHP, updateFiles
}
}
}
}
this
.
loadVersion
=
function
(
version
,
setVersionText
)
{
Module
=
null
;
setCompileJSON
();
var
newScript
=
document
.
createElement
(
'script'
);
newScript
.
type
=
'text/javascript'
;
newScript
.
src
=
url
;
document
.
getElementsByTagName
(
'head'
)[
0
].
appendChild
(
newScript
);
var
check
=
window
.
setInterval
(
function
()
{
if
(
!
Module
)
{
return
;
}
window
.
clearInterval
(
check
);
onCompilerLoaded
(
setVersionText
);
},
200
);
};
this
.
initializeWorker
=
function
(
version
,
setVersionText
)
{
this
.
initializeWorker
=
function
(
version
,
setVersionText
)
{
if
(
worker
!==
null
)
{
if
(
worker
!==
null
)
{
worker
.
terminate
();
worker
.
terminate
();
...
...
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