Merge pull request #15309 from Snuffleupagus/function-rm-closure
Remove the remaining closure in the `src/core/function.js` file
This commit is contained in:
commit
c81903d72d
@ -815,13 +815,6 @@ class PostScriptEvaluator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Most of the PDFs functions consist of simple operations such as:
|
|
||||||
// roll, exch, sub, cvr, pop, index, dup, mul, if, gt, add.
|
|
||||||
//
|
|
||||||
// We can compile most of such programs, and at the same moment, we can
|
|
||||||
// optimize some expressions using basic math properties. Keeping track of
|
|
||||||
// min/max values will allow us to avoid extra Math.min/Math.max calls.
|
|
||||||
const PostScriptCompiler = (function PostScriptCompilerClosure() {
|
|
||||||
class AstNode {
|
class AstNode {
|
||||||
constructor(type) {
|
constructor(type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
@ -1061,7 +1054,12 @@ const PostScriptCompiler = (function PostScriptCompilerClosure() {
|
|||||||
return new AstMin(num1, max);
|
return new AstMin(num1, max);
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line no-shadow
|
// Most of the PDFs functions consist of simple operations such as:
|
||||||
|
// roll, exch, sub, cvr, pop, index, dup, mul, if, gt, add.
|
||||||
|
//
|
||||||
|
// We can compile most of such programs, and at the same moment, we can
|
||||||
|
// optimize some expressions using basic math properties. Keeping track of
|
||||||
|
// min/max values will allow us to avoid extra Math.min/Math.max calls.
|
||||||
class PostScriptCompiler {
|
class PostScriptCompiler {
|
||||||
compile(code, domain, range) {
|
compile(code, domain, range) {
|
||||||
const stack = [];
|
const stack = [];
|
||||||
@ -1246,9 +1244,6 @@ const PostScriptCompiler = (function PostScriptCompilerClosure() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return PostScriptCompiler;
|
|
||||||
})();
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
isPDFFunction,
|
isPDFFunction,
|
||||||
PDFFunctionFactory,
|
PDFFunctionFactory,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user