@galacean/engine-shader-compiler 0.0.0-experimental-2.0-migrate.5 → 0.0.0-experimental-2.0-skill.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser.js CHANGED
@@ -362,11 +362,6 @@
362
362
  ShaderCompilerUtils._shaderCompilerObjectPoolSet[i].clear();
363
363
  }
364
364
  };
365
- /** Release all objects retained by the compiler pools. */ ShaderCompilerUtils.releaseAllShaderCompilerObjectPool = function releaseAllShaderCompilerObjectPool() {
366
- for(var i = 0, n = ShaderCompilerUtils._shaderCompilerObjectPoolSet.length; i < n; i++){
367
- ShaderCompilerUtils._shaderCompilerObjectPoolSet[i].garbageCollection();
368
- }
369
- };
370
365
  ShaderCompilerUtils.createGSError = function createGSError(message, errorName, source, location, file) {
371
366
  console.error(message);
372
367
  var err = new Error(message);
@@ -6224,10 +6219,6 @@
6224
6219
  this._stateItemPool.set(mapId, newItem);
6225
6220
  return newItem;
6226
6221
  };
6227
- /** Release the state graph after the action/goto tables have been generated. */ State.clearPool = function clearPool() {
6228
- this.closureMap.clear();
6229
- this.pool.clear();
6230
- };
6231
6222
  State.create = function create(cores) {
6232
6223
  var cacheKey = this.getMapKey(cores);
6233
6224
  var state = this.closureMap.get(cacheKey);
@@ -6362,9 +6353,6 @@
6362
6353
  _proto.generate = function generate() {
6363
6354
  this.computeFirstSet();
6364
6355
  this.buildStateTable();
6365
- // Runtime parsing only needs the numeric action/goto tables. The state closure graph is
6366
- // construction-only data and otherwise keeps thousands of StateItem/Set objects alive.
6367
- State.clearPool();
6368
6356
  };
6369
6357
  _proto.buildStateTable = function buildStateTable() {
6370
6358
  var startStateItemCore = [
@@ -6403,7 +6391,7 @@
6403
6391
  var terminalExist = false;
6404
6392
  // when A :=> a.BC, a; ==》 B :=> .xy, First(Ca)
6405
6393
  // newLookAhead = First(Ca)
6406
- for(var i = 1, nextSymbol = item.symbolByOffset(1); nextSymbol; nextSymbol = item.symbolByOffset(++i)){
6394
+ for(var i = 1, nextSymbol = item.symbolByOffset(1); !!nextSymbol; nextSymbol = item.symbolByOffset(++i)){
6407
6395
  if (GrammarUtils.isTerminal(nextSymbol)) {
6408
6396
  newLookaheadSet.add(nextSymbol);
6409
6397
  terminalExist = true;
@@ -8918,13 +8906,6 @@
8918
8906
  variableMap: renderStates.variableMap
8919
8907
  };
8920
8908
  };
8921
- /**
8922
- * Release token and AST pools retained at their compilation-time peak.
8923
- * Call this after shader warm-up when no further compilation is expected soon.
8924
- * Later compilation remains supported and will allocate pool entries on demand.
8925
- */ ShaderCompiler.releaseCompilationCache = function releaseCompilationCache() {
8926
- ShaderCompilerUtils.releaseAllShaderCompilerObjectPool();
8927
- };
8928
8909
  ShaderCompiler.createPosition = function createPosition(index, line, column) {
8929
8910
  var position = this._shaderPositionPool.get();
8930
8911
  position.set(index);
@@ -8942,7 +8923,7 @@
8942
8923
  ShaderCompiler._shaderRangePool = ShaderCompilerUtils.createObjectPool(ShaderRange);
8943
8924
 
8944
8925
  //@ts-ignore
8945
- var version = "0.0.0-experimental-2.0-migrate.5";
8926
+ var version = "0.0.0-experimental-2.0-skill.0";
8946
8927
  var mode = "Release";
8947
8928
  console.log("Galacean Engine Shader Compiler Version: " + version + " | Mode: " + mode);
8948
8929