mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-30 10:50:08 +00:00 
			
		
		
		
	experimenting with v8-compile-cache -- buggy...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									405c6da334
								
							
						
					
					
						commit
						38b43cef81
					
				| @ -6,6 +6,8 @@ | |||||||
| * | * | ||||||
| **********************************************************************/ | **********************************************************************/ | ||||||
| 
 | 
 | ||||||
|  | //require('v8-compile-cache')
 | ||||||
|  | 
 | ||||||
| var electron = require('electron') | var electron = require('electron') | ||||||
| var app = electron.app | var app = electron.app | ||||||
| var BrowserWindow = electron.BrowserWindow | var BrowserWindow = electron.BrowserWindow | ||||||
|  | |||||||
| @ -8,6 +8,8 @@ | |||||||
| 
 | 
 | ||||||
| //var DEBUG = DEBUG != null ? DEBUG : true
 | //var DEBUG = DEBUG != null ? DEBUG : true
 | ||||||
| 
 | 
 | ||||||
|  | //require('v8-compile-cache')
 | ||||||
|  | 
 | ||||||
| require('./cfg/requirejs') | require('./cfg/requirejs') | ||||||
| 
 | 
 | ||||||
| nodeRequire = | nodeRequire = | ||||||
|  | |||||||
| @ -25,6 +25,29 @@ var util = require('lib/util') | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | /*********************************************************************/ | ||||||
|  | 
 | ||||||
|  | // XXX a Set-like back-end...
 | ||||||
|  | // 		API:
 | ||||||
|  | // 			.has(..)
 | ||||||
|  | // 				-> bool
 | ||||||
|  | //
 | ||||||
|  | // 			Unite two sets...
 | ||||||
|  | // 			.unite(..)
 | ||||||
|  | // 				-> new
 | ||||||
|  | //
 | ||||||
|  | // 			Intersection of two sets...
 | ||||||
|  | // 			.intersect(..)
 | ||||||
|  | // 				-> new
 | ||||||
|  | //
 | ||||||
|  | // 			Difference of two sets...
 | ||||||
|  | // 			.subtract(..)
 | ||||||
|  | // 				-> new
 | ||||||
|  | 
 | ||||||
|  | // extend Set to support the needed basics...
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| /*********************************************************************/ | /*********************************************************************/ | ||||||
| 
 | 
 | ||||||
| var TagsClassPrototype = { | var TagsClassPrototype = { | ||||||
|  | |||||||
| @ -214,6 +214,19 @@ Array.prototype.sortAs = function(other){ | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | // Set set operation shorthands...
 | ||||||
|  | Set.prototype.unite = function(other){  | ||||||
|  | 	return new Set([...this, ...other]) } | ||||||
|  | Set.prototype.intersect = function(other){ | ||||||
|  | 	var test = other.has ?  'has' : 'includes' | ||||||
|  | 	return new Set([...this] | ||||||
|  | 		.filter(function(e){ return other[test](e) })) } | ||||||
|  | Set.prototype.subtract = function(other){ | ||||||
|  | 	var test = other.has ?  'has' : 'includes' | ||||||
|  | 	return new Set([...this] | ||||||
|  | 		.filter(function(e){ return !other[test](e) })) } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| module.chainCmp = function(cmp_chain){ | module.chainCmp = function(cmp_chain){ | ||||||
| 	return function(a, b, get, data){ | 	return function(a, b, get, data){ | ||||||
| 		var res | 		var res | ||||||
|  | |||||||
| @ -20,6 +20,8 @@ if((typeof(process) != 'undefined' ? process : {}).__nwjs){ | |||||||
| //
 | //
 | ||||||
| // NOTE: no need to do this in browser...
 | // NOTE: no need to do this in browser...
 | ||||||
| if(typeof(process) != 'undefined'){ | if(typeof(process) != 'undefined'){ | ||||||
|  | 	//require('v8-compile-cache')
 | ||||||
|  | 
 | ||||||
| 	requirejs =  | 	requirejs =  | ||||||
| 	global.requirejs =  | 	global.requirejs =  | ||||||
| 	window.requirejs =  | 	window.requirejs =  | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user