@@ -32,6 +32,12 @@ JavaScriptCompiler.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
compilerInfo: function() {
|
||||
var revision = COMPILER_REVISION,
|
||||
versions = REVISION_CHANGES[revision];
|
||||
return "this.compilerInfo = ["+revision+",'"+versions+"'];\n";
|
||||
},
|
||||
|
||||
appendToBuffer: function(string) {
|
||||
if (this.environment.isSimple) {
|
||||
return "return " + string + ";";
|
||||
@@ -165,9 +171,7 @@ JavaScriptCompiler.prototype = {
|
||||
var source = this.mergeSource();
|
||||
|
||||
if (!this.isChild) {
|
||||
var revision = COMPILER_REVISION,
|
||||
versions = REVISION_CHANGES[revision];
|
||||
source = "this.compilerInfo = ["+revision+",'"+versions+"'];\n"+source;
|
||||
source = this.compilerInfo()+source;
|
||||
}
|
||||
|
||||
if (asObject) {
|
||||
|
||||
@@ -2,7 +2,7 @@ module Utils from "./utils";
|
||||
import Exception from "./exception";
|
||||
import { COMPILER_REVISION, REVISION_CHANGES } from "./base";
|
||||
|
||||
function checkRevision(compilerInfo) {
|
||||
export function checkRevision(compilerInfo) {
|
||||
var compilerRevision = compilerInfo && compilerInfo[0] || 1,
|
||||
currentRevision = COMPILER_REVISION;
|
||||
|
||||
@@ -89,7 +89,7 @@ export function template(templateSpec, env) {
|
||||
options.data);
|
||||
|
||||
if (!options.partial) {
|
||||
checkRevision(container.compilerInfo);
|
||||
env.VM.checkRevision(container.compilerInfo);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user