Merge pull request #11012 from Snuffleupagus/EvaluatorPreprocessor-read-fewer-function-calls
Reduce the number of function calls in `EvaluatorPreprocessor.read`
This commit is contained in:
		
						commit
						323b2eabcf
					
				| @ -21,7 +21,7 @@ import { | |||||||
| } from '../shared/util'; | } from '../shared/util'; | ||||||
| import { CMapFactory, IdentityCMap } from './cmap'; | import { CMapFactory, IdentityCMap } from './cmap'; | ||||||
| import { | import { | ||||||
|   Dict, isCmd, isDict, isEOF, isName, isRef, isStream, Name |   Cmd, Dict, EOF, isDict, isName, isRef, isStream, Name | ||||||
| } from './primitives'; | } from './primitives'; | ||||||
| import { | import { | ||||||
|   ErrorFont, Font, FontFlags, getFontType, IdentityToUnicodeMap, ToUnicodeMap |   ErrorFont, Font, FontFlags, getFontType, IdentityToUnicodeMap, ToUnicodeMap | ||||||
| @ -2999,7 +2999,7 @@ var EvaluatorPreprocessor = (function EvaluatorPreprocessorClosure() { | |||||||
|       var args = operation.args; |       var args = operation.args; | ||||||
|       while (true) { |       while (true) { | ||||||
|         var obj = this.parser.getObj(); |         var obj = this.parser.getObj(); | ||||||
|         if (isCmd(obj)) { |         if (obj instanceof Cmd) { | ||||||
|           var cmd = obj.cmd; |           var cmd = obj.cmd; | ||||||
|           // Check that the command is valid
 |           // Check that the command is valid
 | ||||||
|           var opSpec = this.opMap[cmd]; |           var opSpec = this.opMap[cmd]; | ||||||
| @ -3061,7 +3061,7 @@ var EvaluatorPreprocessor = (function EvaluatorPreprocessorClosure() { | |||||||
|           operation.args = args; |           operation.args = args; | ||||||
|           return true; |           return true; | ||||||
|         } |         } | ||||||
|         if (isEOF(obj)) { |         if (obj === EOF) { | ||||||
|           return false; // no more commands
 |           return false; // no more commands
 | ||||||
|         } |         } | ||||||
|         // argument
 |         // argument
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user