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
21953d8b
Commit
21953d8b
authored
Sep 12, 2016
by
Alex Beregszaszi
Committed by
GitHub
Sep 12, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #220 from ethereum/optimize-checkbox
Fix optimize flag handling
parents
a919af55
fc2e5b14
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
app.js
src/app.js
+5
-2
compiler.js
src/app/compiler.js
+7
-2
No files found.
src/app.js
View file @
21953d8b
...
...
@@ -407,7 +407,7 @@ var run = function () {
}
var
executionContext
=
new
ExecutionContext
();
var
compiler
=
new
Compiler
(
editor
,
queryParams
,
handleGithubCall
,
updateFiles
);
var
compiler
=
new
Compiler
(
editor
,
handleGithubCall
);
var
formalVerification
=
new
FormalVerification
(
$
(
'#verificationView'
),
compiler
.
event
);
var
transactionDebugger
=
new
Debugger
(
'#debugger'
,
editor
,
compiler
,
executionContext
.
event
,
swicthToFile
);
...
...
@@ -521,9 +521,12 @@ var run = function () {
// set default
$
(
'#optimize'
).
attr
(
'checked'
,
(
queryParams
.
get
().
optimize
===
'true'
));
compiler
.
setOptimize
(
document
.
querySelector
(
'#optimize'
).
checked
);
document
.
querySelector
(
'#optimize'
).
addEventListener
(
'change'
,
function
()
{
queryParams
.
update
({
optimize
:
document
.
querySelector
(
'#optimize'
).
checked
});
var
optimize
=
document
.
querySelector
(
'#optimize'
).
checked
;
queryParams
.
update
({
optimize
:
optimize
});
compiler
.
setOptimize
(
optimize
);
compiler
.
compile
();
});
...
...
src/app/compiler.js
View file @
21953d8b
...
...
@@ -10,7 +10,7 @@ var EventManager = require('../lib/eventManager');
/*
trigger compilationFinished, compilerLoaded, compilationStarted
*/
function
Compiler
(
editor
,
queryParams
,
handleGithubCall
,
updateFiles
)
{
function
Compiler
(
editor
,
handleGithubCall
)
{
var
self
=
this
;
this
.
event
=
new
EventManager
();
...
...
@@ -20,6 +20,12 @@ function Compiler (editor, queryParams, handleGithubCall, updateFiles) {
var
cachedRemoteFiles
=
{};
var
worker
=
null
;
var
optimize
=
false
;
this
.
setOptimize
=
function
(
_optimize
)
{
optimize
=
_optimize
;
};
var
compile
=
function
(
missingInputs
)
{
editor
.
clearAnnotations
();
self
.
event
.
trigger
(
'compilationStarted'
,
[]);
...
...
@@ -33,7 +39,6 @@ function Compiler (editor, queryParams, handleGithubCall, updateFiles) {
self
.
lastCompilationResult
=
null
;
self
.
event
.
trigger
(
'compilationFinished'
,
[
false
,
{
'error'
:
error
},
files
]);
}
else
{
var
optimize
=
queryParams
.
get
().
optimize
;
compileJSON
(
input
,
optimize
?
1
:
0
);
}
});
...
...
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