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
d50bd168
Commit
d50bd168
authored
Sep 28, 2020
by
aniket-engg
Committed by
Aniket
Sep 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added runs for compiler
parent
aac57736
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
compiler-input.ts
libs/remix-solidity/src/compiler/compiler-input.ts
+1
-1
compiler.ts
libs/remix-solidity/src/compiler/compiler.ts
+5
-6
types.ts
libs/remix-solidity/src/compiler/types.ts
+2
-0
No files found.
libs/remix-solidity/src/compiler/compiler-input.ts
View file @
d50bd168
...
...
@@ -9,7 +9,7 @@ export default (sources: Source, opts: CompilerInputOptions): string => {
settings
:
{
optimizer
:
{
enabled
:
opts
.
optimize
===
true
||
opts
.
optimize
===
1
,
runs
:
200
runs
:
opts
.
runs
},
libraries
:
opts
.
libraries
,
outputSelection
:
{
...
...
libs/remix-solidity/src/compiler/compiler.ts
View file @
d50bd168
...
...
@@ -23,6 +23,7 @@ export class Compiler {
worker
:
null
,
currentVersion
:
null
,
optimize
:
false
,
runs
:
200
,
evmVersion
:
null
,
language
:
'Solidity'
,
compilationStartTime
:
null
,
...
...
@@ -109,7 +110,8 @@ export class Compiler {
let
result
:
CompilationResult
=
{}
try
{
if
(
source
&&
source
.
sources
)
{
const
input
=
compilerInput
(
source
.
sources
,
{
optimize
:
this
.
state
.
optimize
,
evmVersion
:
this
.
state
.
evmVersion
,
language
:
this
.
state
.
language
})
const
{
optimize
,
runs
,
evmVersion
,
language
}
=
this
.
state
const
input
=
compilerInput
(
source
.
sources
,
{
optimize
,
runs
,
evmVersion
,
language
})
result
=
JSON
.
parse
(
compiler
.
compile
(
input
,
{
import
:
missingInputsCallback
}))
}
}
catch
(
exception
)
{
...
...
@@ -247,15 +249,12 @@ export class Compiler {
this
.
state
.
compileJSON
=
(
source
:
SourceWithTarget
)
=>
{
if
(
source
&&
source
.
sources
)
{
const
{
optimize
,
runs
,
evmVersion
,
language
}
=
this
.
state
jobs
.
push
({
sources
:
source
})
this
.
state
.
worker
.
postMessage
({
cmd
:
'compile'
,
job
:
jobs
.
length
-
1
,
input
:
compilerInput
(
source
.
sources
,
{
optimize
:
this
.
state
.
optimize
,
evmVersion
:
this
.
state
.
evmVersion
,
language
:
this
.
state
.
language
})
input
:
compilerInput
(
source
.
sources
,
{
optimize
,
runs
,
evmVersion
,
language
})
})
}
}
...
...
libs/remix-solidity/src/compiler/types.ts
View file @
d50bd168
...
...
@@ -143,6 +143,7 @@ export interface Source {
export
interface
CompilerInputOptions
{
optimize
:
boolean
|
number
,
runs
:
number
,
libraries
?:
{
[
fileName
:
string
]:
Record
<
string
,
string
>
},
...
...
@@ -159,6 +160,7 @@ export interface CompilerState {
worker
:
any
,
currentVersion
:
string
|
null
|
undefined
,
optimize
:
boolean
,
runs
:
number
evmVersion
:
EVMVersion
|
null
,
language
:
Language
,
compilationStartTime
:
number
|
null
,
...
...
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