diff --git a/benchmark/less-benchmark.js b/benchmark/less-benchmark.js index ba789d52..31347286 100644 --- a/benchmark/less-benchmark.js +++ b/benchmark/less-benchmark.js @@ -15,7 +15,7 @@ fs.readFile(file, 'utf8', function (e, data) { start = new(Date); - new(less.Parser)({ optimization: 2 }).parse(data, function (err, tree) { + new(less.Parser)().parse(data, function (err, tree) { end = new Date(); total = end - start; diff --git a/lib/less/browser.js b/lib/less/browser.js index ffcf82fc..cbc64063 100644 --- a/lib/less/browser.js +++ b/lib/less/browser.js @@ -568,7 +568,6 @@ function loadStyleSheets(callback, reload, modifyVars) { function initRunningMode(){ if (less.env === 'development') { - less.optimization = 0; less.watchTimer = setInterval(function () { if (less.watchMode) { loadStyleSheets(function (e, root, _, sheet, env) { @@ -580,8 +579,6 @@ function initRunningMode(){ }); } }, less.poll); - } else { - less.optimization = 3; } } diff --git a/lib/less/env.js b/lib/less/env.js index 10c73029..41eabe50 100644 --- a/lib/less/env.js +++ b/lib/less/env.js @@ -2,7 +2,6 @@ var parseCopyProperties = [ 'paths', // option - unmodified - paths to search for imports on - 'optimization', // option - optimization level (for the chunker) 'files', // list of files that have been imported, used for import-once 'contents', // map - filename to contents of all the files 'contentsIgnoredChars', // map - filename to lines at the begining of each file to ignore diff --git a/lib/less/lessc_helper.js b/lib/less/lessc_helper.js index 76355eb9..ce758b79 100644 --- a/lib/less/lessc_helper.js +++ b/lib/less/lessc_helper.js @@ -61,10 +61,6 @@ var lessc_helper = { console.log(" --modify-var='VAR=VALUE' Modifies a variable already declared in the file."); console.log(""); console.log("-------------------------- Deprecated ----------------"); - console.log(" -O0, -O1, -O2 Set the parser's optimization level. The lower"); - console.log(" the number, the less nodes it will create in the"); - console.log(" tree. This could matter for debugging, or if you"); - console.log(" want to access the individual nodes in the tree."); console.log(" --line-numbers=TYPE Outputs filename and line numbers."); console.log(" TYPE can be either 'comments', which will output"); console.log(" the debug info within comments, 'mediaquery'"); diff --git a/lib/less/parser.js b/lib/less/parser.js index 018a280f..30635a14 100644 --- a/lib/less/parser.js +++ b/lib/less/parser.js @@ -335,12 +335,6 @@ less.Parser = function Parser(env) { this.env = env = env || {}; - // The optimization level dictates the thoroughness of the parser, - // the lower the number, the less nodes it will create in the tree. - // This could matter for debugging, or if you want to access - // the individual nodes in the tree. - this.optimization = ('optimization' in this.env) ? this.env.optimization : 1; - // // The Parser // diff --git a/lib/less/rhino.js b/lib/less/rhino.js index 0ff7aaf5..f9610111 100644 --- a/lib/less/rhino.js +++ b/lib/less/rhino.js @@ -150,7 +150,6 @@ function writeFile(filename, content) { compress: false, cleancss: false, max_line_len: -1, - optimization: 1, silent: false, verbose: false, lint: false, @@ -269,9 +268,6 @@ function writeFile(filename, content) { }); } break; - case 'O0': options.optimization = 0; break; - case 'O1': options.optimization = 1; break; - case 'O2': options.optimization = 2; break; case 'line-numbers': if (checkArgFunc(arg, match[2])) { options.dumpLineNumbers = match[2];