not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

1 lines
1.9 MiB

{"version":3,"file":"squeak.min.js","sources":["../squeak.js","../vm.js","../jit.js","../plugins/ADPCMCodecPlugin.js","../plugins/B2DPlugin.js","../plugins/BitBltPlugin.js","../plugins/FFTPlugin.js","../plugins/FloatArrayPlugin.js","../plugins/GeniePlugin.js","../plugins/JPEGReaderPlugin.js","../plugins/KedamaPlugin.js","../plugins/KedamaPlugin2.js","../plugins/Klatt.js","../plugins/LargeIntegers.js","../plugins/Matrix2x3Plugin.js","../plugins/MiscPrimitivePlugin.js","../plugins/ScratchPlugin.js","../plugins/SoundGenerationPlugin.js","../plugins/StarSqueakPlugin.js","../plugins/ZipPlugin.js","../lib/lz-string.js"],"names":["window","module","dottedPath","path","split","name","pop","parent","join","self","loaded","pending","requires","req","toRun","code","load","forEach","f","push","Object","extend","obj","i","arguments","length","Function","prototype","subclass","classPath","this","initialize","apply","protoclass","modulePath","className","scripts","document","getElementsByTagName","squeakjs","vmDir","src","replace","match","filename","script","createElement","setAttribute","appendChild","setupFullscreen","display","canvas","options","fullscreenChange","fullscreen","box","style","background","header","footer","fullscreenCheckbox","checked","setTimeout","onresize","parentElement","fullscreenEvent","fullscreenElement","fullscreenEnabled","requestFullscreen","webkitRequestFullscreen","exit","webkitExitFullscreen","evt","elem","enable","mozRequestFullScreen","mozCancelFullScreen","msRequestFullscreen","msExitFullscreen","browser","exitFullscreen","checkFullscreen","addEventListener","isFullscreen","onclick","setupSwapButtons","swapCheckbox","imageName","localStorage","settings","JSON","parse","swapButtons","stringify","recordModifiers","shiftPressed","shiftKey","ctrlPressed","ctrlKey","altKey","cmdPressed","metaKey","modifiers","Squeak","Keyboard_Shift","Keyboard_Ctrl","Keyboard_Cmd","buttons","Keyboard_All","updateMousePos","evtX","canUseMouseOffset","offsetX","layerX","evtY","offsetY","layerY","cursorCanvas","left","offsetLeft","cursorOffsetX","top","offsetTop","cursorOffsetY","x","width","offsetWidth","y","height","offsetHeight","mouseX","Math","max","min","mouseY","recordMouseEvent","what","eventQueue","vm","Mouse_All","button","Mouse_Red","Mouse_Yellow","Mouse_Blue","EventTypeMouse","timeStamp","signalInputEvent","idle","runFor","runNow","recordKeyboardEvent","key","timestamp","interruptKeycode","interruptPending","EventTypeKeyboard","EventKeyChar","keys","recordDragDropEvent","type","EventTypeDragDropFiles","droppedFiles","fakeCmdOrCtrlKey","makeSqueakEvent","sqEvtBuf","sqTimeOffset","MillisecondClockMask","createSqueakDisplay","touchToMouse","touches","touch","pageX","pageY","dd","ax","ay","bx","by","sqrt","dist","a","b","adjustDisplay","l","t","w","h","scale","pixelated","classList","add","remove","zoomStart","down","orig","right","bottom","zoomMove","minScale","nowScale","maxZoom","zoomEnd","dragEventHasFiles","dataTransfer","types","body","margin","backgroundColor","ontouchmove","preventDefault","context","getContext","clipboardString","clipboardStringChanged","reset","lastTick","getNextEvent","firstEvtBuf","firstOffset","offset","Date","now","evtBuf","timeOffset","shift","EventTypeNone","fullscreenRequest","thenDo","resizeTodo","resizeTodoTimeout","resizeDone","clearTimeout","todo","clear","showBanner","msg","ctx","clearRect","fillStyle","color","font","textAlign","textBaseline","fillText","showProgress","value","fillRect","lineWidth","strokeStyle","strokeRect","executeClipboardPaste","text","charCodeAt","err","console","error","executeClipboardCopy","start","interpret","onmousedown","onmouseup","onmousemove","oncontextmenu","state","ontouchstart","e","changedTouches","first","didMove","abs","ontouchend","ontouchcancel","position","cursor","pointerEvents","onkeypress","test","String","fromCharCode","charCode","onkeydown","squeakCode",8,9,13,27,33,34,35,36,37,38,39,40,45,46,"keyCode","keyIdentifier","slice","parseInt","onkeyup","oncopy","clipboardData","setData","oncut","onpaste","getData","ondragover","dropEffect","EventDragMove","ondragenter","EventDragEnter","ondragleave","EventDragLeave","ondrop","image","files","call","reader","FileReader","onload","buffer","result","filePut","confirm","SqueakJS","appName","runImage","EventDragDrop","readAsArrayBuffer","debounceWidth","innerWidth","debounceHeight","innerHeight","paddingX","paddingY","fixedWidth","fixedHeight","wantRatio","haveRatio","floor","preserveScreen","imgData","getImageData","putImageData","setupSpinner","spinner","updateSpinner","idleMS","busy","animating","becameBusy","spinnerAngle","webkitTransform","transform","processOptions","search","location","hash","args","keyAndVal","val","decodeURIComponent","root","splitFilePath","fullname","dirCreate","url","fetchTemplates","templates","constructor","Array","fetchTemplateDir","Error","loop","navigator","userAgent","onbeforeunload","returnValue","Image","readFromBuffer","run","quitFlag","onQuit","ms","alert","Interpreter","milliseconds","stoptime","runSqueak","imageUrl","getNextFile","whenAllDone","imageData","file","forceDownload","fileExists","fileGet","data","fileDelete","unshift","rq","XMLHttpRequest","open","responseType","onprogress","lengthComputable","total","status","response","onerror","statusText","warn","proxy","retry","send","protocol","fsck","basename","baseUrl","docName","documentName","quitSqueak","applicationCache","reload","users","bert","vmVersion","vmBuild","vmPath","vmFile","platformName","platformSubtype","osVersion","windowSystem","HeaderTypeMask","HeaderTypeSizeAndClass","HeaderTypeClass","HeaderTypeFree","HeaderTypeShort","splOb_NilObject","splOb_FalseObject","splOb_TrueObject","splOb_SchedulerAssociation","splOb_ClassBitmap","splOb_ClassInteger","splOb_ClassString","splOb_ClassArray","splOb_SmalltalkDictionary","splOb_ClassFloat","splOb_ClassMethodContext","splOb_ClassBlockContext","splOb_ClassPoint","splOb_ClassLargePositiveInteger","splOb_TheDisplay","splOb_ClassMessage","splOb_ClassCompiledMethod","splOb_TheLowSpaceSemaphore","splOb_ClassSemaphore","splOb_ClassCharacter","splOb_SelectorDoesNotUnderstand","splOb_SelectorCannotReturn","splOb_TheInputSemaphore","splOb_SpecialSelectors","splOb_CharacterTable","splOb_SelectorMustBeBoolean","splOb_ClassByteArray","splOb_ClassProcess","splOb_CompactClasses","splOb_TheTimerSemaphore","splOb_TheInterruptSemaphore","splOb_FloatProto","splOb_SelectorCannotInterpret","splOb_MethodContextProto","splOb_ClassBlockClosure","splOb_BlockContextProto","splOb_ExternalObjectsArray","splOb_ClassPseudoContext","splOb_ClassTranslatedMethod","splOb_TheFinalizationSemaphore","splOb_ClassLargeNegativeInteger","splOb_ClassExternalAddress","splOb_ClassExternalStructure","splOb_ClassExternalData","splOb_ClassExternalFunction","splOb_ClassExternalLibrary","splOb_SelectorAboutToReturn","splOb_SelectorRunWithIn","splOb_SelectorAttemptToAssign","splOb_PrimErrTableIndex","splOb_ClassAlien","splOb_InvokeCallbackSelector","splOb_ClassUnsafeAlien","splOb_ClassWeakFinalizer","Class_superclass","Class_mdict","Class_format","Class_instVars","Class_name","Context_sender","Context_instructionPointer","Context_stackPointer","Context_method","Context_closure","Context_receiver","Context_tempFrameStart","Context_smallFrameSize","Context_largeFrameSize","BlockContext_caller","BlockContext_argumentCount","BlockContext_initialIP","BlockContext_home","Closure_outerContext","Closure_startpc","Closure_numArgs","Closure_firstCopiedValue","Stream_array","Stream_position","Stream_limit","ProcSched_processLists","ProcSched_activeProcess","Link_nextLink","LinkedList_firstLink","LinkedList_lastLink","Semaphore_excessSignals","Proc_suspendedContext","Proc_priority","Proc_myList","Assn_key","Assn_value","MethodDict_array","MethodDict_selectorStart","Message_selector","Message_arguments","Message_lookupClass","Point_x","Point_y","LargeInteger_bytes","LargeInteger_neg","BitBlt_dest","BitBlt_source","BitBlt_halftone","BitBlt_combinationRule","BitBlt_destX","BitBlt_destY","BitBlt_width","BitBlt_height","BitBlt_sourceX","BitBlt_sourceY","BitBlt_clipX","BitBlt_clipY","BitBlt_clipW","BitBlt_clipH","BitBlt_colorMap","BitBlt_warpBase","Form_bits","Form_width","Form_height","Form_depth","Form_offset","WeakFinalizationList_first","WeakFinalizerItem_list","WeakFinalizerItem_next","Keyboard_Alt","EventKeyDown","EventKeyUp","MinSmallInt","MaxSmallInt","NonSmallInt","externalModules","registerExternalModule","whenDone","dir","stats","dirs","bytes","deleted","indexedDB","dbTransaction","fileStore","cursorReq","openCursor","onsuccess","target","continue","entries","dirList","isDir","exists","log","dirDelete","toFixed","orphaned","delete","mode","description","transactionFunc","completionFunc","fakeTransaction","dbFake","startTransaction","trans","SqueakDB","transaction","objectStore","oncomplete","onabort","openReq","onversionchange","close","onupgradeneeded","db","createObjectStore","onblocked","SqueakDBFake","bigFiles","bigFileThreshold","get","string","compressed","LZString","decompressFromUTF16","Uint8Array","put","byteLength","bytesAsString","compressToUTF16","filepath","errorDo","getReq","undefined","fetchTemplateFile","template","fakeReq","contents","optSuccess","directory","dirname","entry","totalSeconds","entryOnly","fileRename","from","to","oldpath","newpath","olddir","samedir","newdir","bind","dirpath","withParents","children","child","includeTemplates","addEntries","hasOwnProperty","localEntries","matches","flushFile","modified","size","ArrayBuffer","set","subarray","flushAllFiles","SqueakFiles","closeAllFiles","ensureTemplateParent","checkSubTemplates","index","ifFound","ifNotFound","timeout","onreadystatechange","readyState","DONE","startAudioOut","audioOutContext","ctxProto","AudioContext","webkitAudioContext","mozAudioContext","msAudioContext","startAudioIn","audioInContext","audioInSource","disconnect","getUserMedia","webkitGetUserMedia","mozGetUserMedia","msGetUserMedia","audio","toString","stream","createMediaStreamSource","stopAudio","Epoch","UTC","getTimezoneOffset","EpochUTC","chars","about","totalMemory","gcCount","gcTenured","gcMilliseconds","allocationCount","oldSpaceCount","newSpaceCount","hasNewInstances","arraybuffer","progressDo","mapSomeObjects","stop","done","installFromImage","oopMap","compactClasses","floatClass","littleEndian","nativeFloats","nextObject","specialObjectsArray","splObs","decorateKnownObjects","fixCompiledMethods","fixCompactOops","mapSomeObjectsAsync","startupTime","DataView","pos","readWord","int","getUint32","readBits","nWords","format","oops","bits","Uint32Array","versions","version","fileHeaderSize","indexOf","hasClosures","imageHeaderSize","objectMemorySize","oldBaseAddr","specialObjectsOopInt","lastHash","prevObj","headerSize","classInt","oop","object","initFromImage","firstOldObject","lastOldObject","oldSpaceBytes","cc","renamedObj","renameFromImage","splObjs","pointers","isNil","isTrue","isFalse","isFloatClass","isCompact","Number","sqInstName","defineProperty","enumerable","adjust","hadCompactHeader","mightBeCompact","sqClass","snapshotSize","compiledMethodClass","partialGC","fullGC","reason","addMessage","newObjects","markReachableObjects","removeUnmarkedOldObjects","appendToOldObjects","finalizeWeakReferences","storeContextRegisters","activeContext","mark","n","isContext","contextSizeWithStack","nilObj","isWeak","classInstSize","sort","removedCount","removedBytes","next","corpse","totalBytes","oldObj","newObj","setAddr","weakObj","firstWeak","finalized","pendingFinalizationSignals","list","specialObjects","items","forceInterruptCheck","registerObject","instantiateClass","aClass","indexableSize","filler","newObject","classInstProto","initInstanceOf","clone","initAsClone","bulkBecome","fromArray","toArray","twoWay","copyHash","mutations","fromHash","mut","j","flushMethodCacheAfterBecome","objectAfter","someInstanceOf","clsObj","nextObjectWithGCFor","nextInstanceAfter","writeToBuffer","writeWord","word","setUint32","formatVersion","addr","objectToOop","writeTo","bytesLeft","segmentVersion","dnu","wholeWord","loadImageSegment","segmentWordArray","outPointerArray","words","segment","fakeClsOop","compactClassOops","map","cls","roots","instSpec","instSize","fillArray","isFloat","float","original","fmt","hsh","classNameFromImage","decodeBytes","ccArray","classObj","instProto","ccInt","decodePointers","methodHeader","decodeWords","numLits","decodeFloat","decodeFloatDeoptimized","theBits","ptrs","byteOffset","wordOffset","fmtLowBits","nBytes","wordsAsBytes","getFloat64","swapped","array","bytesAsNumberString","negative","hex","digits","sign","approx","assnKeyAsString","slotNameAt","allInstVarNames","str","isWords","isBytes","isWordsOrBytes","isPointers","isMethod","pointersSize","bytesSize","wordsSize","floatData","setFloat64","wordsAsFloat32Array","float32Array","Float32Array","wordsAsFloat64Array","float64Array","Float64Array","wordsAsInt32Array","int32Array","Int32Array","wordsAsInt16Array","int16Array","Int16Array","wordsAsUint16Array","uint16Array","Uint16Array","wordsAsUint8Array","uint8Array","wordsOrBytes","uint32Array","extraHeader","beforePos","formatAndHash","classIndex","setUint8","instVarNames","each","superclass","concat","clsIndex","proto","safeName","methodNumLits","methodNumArgs","methodPrimitiveIndex","primBits","methodClassForSuper","assn","methodNeedsLargeFrame","methodAddPointers","headerAndLits","methodTempCount","methodGetLiteral","zeroBasedIndex","methodGetSelector","methodSetLiteral","contextHome","contextIsBlock","contextMethod","contextSender","sp","primHandler","Primitives","loadImageState","hackImage","initVMState","loadInitialContext","initCompiler","specialSelectors","falseObj","trueObj","globals","findGlobals","findMethod","emulateMac","reverseDisplay","byteCodeCount","sendCount","interruptCheckCounter","interruptCheckCounterFeedBackReset","interruptChecksEveryNms","nextPollTick","nextWakeupTick","freeContexts","freeLargeContexts","reclaimableContextCount","nRecycledContexts","nAllocatedContexts","methodCacheSize","methodCacheMask","methodCacheRandomish","methodCache","lkupClass","selector","method","primIndex","argCount","mClass","breakOutOfInterpreter","breakOutTick","breakOnMethod","breakOnNewMethod","breakOnContextChanged","breakOnContextReturned","messages","schedAssn","sched","proc","fetchContextRegisters","smalltalk","smalltalkClass","globalsClass","Compiler","kObjPerSec","compiler","m","primitive","interpretOne","singleStep","compiled","enableSingleStepping","breakNow","b2","nextByte","receiver","homeContext","doReturn","nono","extendedPush","extendedStore","extendedStorePop","doubleExtendedDoAnything","exportThisContext","pushNewArray","pushClosureCopy","pc","jumpIfFalse","checkForInterrupts","jumpIfTrue","success","resultIsFloat","pop2AndPushNumResult","stackIntOrFloat","sendSpecial","pop2AndPushBoolResult","pop2AndPushIntResult","quickDivide","stackInteger","mod","primitiveMakePoint","safeShift","div","quickSendOther","forMilliseconds","frozen","isIdle","millisecondClockValue","goIdle","hadTimer","hasTimer","breakOut","freeze","frozenDo","continueFunc","unfreeze","methodBytes","sema","synchronousSignal","semaphoresToSignal","signalExternalSemaphores","compile","lobits","byte2","byte3","delta","popValues","count","stackValue","popN","numArgsNumCopied","numArgs","numCopied","blockSizeHigh","blockSize","initialPC","encodeSqueakPC","closure","newClosure","doSuper","newRcvr","lookupClass","getClass","findSelectorInClass","verifyAtSelector","verifyAtClass","executeNewMethod","sendAsPrimitiveFailure","rcvr","startingClass","cacheEntry","findMethodCacheEntry","mDict","currentClass","cantInterpSel","cantInterpMsg","createActualMessage","popNandPush","newMethod","lookupSelectorInDict","currentSelector","currentLookupClass","dnuSel","dnuMsg","messageSelector","dictSize","mask","hasWrapped","nextSelector","methArray","argumentCount","primitiveIndex","optClass","optSel","printMethod","logSends","tryPrimitive","newContext","allocateOrRecycleContext","tempCount","newPC","newSP","arrayCopy","arrayFill","targetContext","cannotReturn","thisContext","isUnwindMarked","aboutToReturnThrough","nextContext","recycleIfPossible","resultObj","aContext","aboutToReturnSel","cannotReturnSel","doPrimitive","message","argArray","primitivePerform","trueArgCount","selectorIndex","stack","primitivePerformWithArgs","supered","primitiveInvokeObjectAsMethod","orgArgs","orgReceiver","orgSelector","runWithIn","firstProbe","probe","flushMethodCache","flushMethodCacheForSelector","flushMethodCacheForMethod","isMethodContext","newActiveContext","ctxt","meth","isSmallInt","decodeSqueakPC","decodeSqueakSP","encodeSqueakSP","intPC","squeakPC","intSP","squeakSP","needsLarge","freebie","nToPop","depthIntoStack","checkSmallInt","num","intResult","canBeSmallInt","numResult","makeFloat","unsigned","lgIntClass","lgIntObj","boolResult","anInt","maybeSmallInt","arg","smallInt","shiftCount","shifted","fromIndex","toIndex","srcPos","dest","destPos","warnOnce","aMethod","optContext","found","allMethodsDo","methodObj","selectorObj","allInstancesOf","callback","globalNamed","instances","inst","allGlobalsDo","nameObj","globalObj","globalNameObj","clsAndMeta","c","mdict","methods","selectors","printStack","limit","contexts","hardLimit","extra","block","classAndMethodString","methodName","breakOn","breakOnReturnFromThisContext","breakOnSendOrReturn","printActiveContext","isBlock","isClosure","homeCtx","stackBottom","stackTop","firstTemp","lastTemp","label","nArgs","firstArg","lastArg","printAllProcesses","activeProc","printProcess","lists","priority","process","semaClass","active","printByteCodes","optionalIndent","optionalHighlight","optionalPC","printer","InstructionPrinter","printInstructions","willSendOrReturn","byte","litIndex","oldPrims","allowAccessBeyondSP","deferDisplayUpdates","initDisplay","initAtCache","initModules","loadedModules","builtinModules","JavaScriptPlugin","findPluginFunctions","FilePlugin","DropPlugin","SoundPlugin","JPEGReadWriter2Plugin","SecurityPlugin","primitiveDisableImageWrite","fakePrimitive","patchModules","ScratchPlugin","interpreterProxy","InterpreterProxy","prefix","bindLate","plugin","regex","RegExp","funcName","primName","toLowerCase","indexedColors","popNandPushIfOK","objectAt","objectAtPut","objectSize","pop2andPushBoolIfOK","doBlockCopy","primitiveBlockValue","primMethod","popNandPushIntIfOK","doBitAnd","doBitOr","doBitXor","doBitShift","primitiveLessThanLargeIntegers","primitiveGreaterThanLargeIntegers","primitiveLessOrEqualLargeIntegers","primitiveGreaterOrEqualLargeIntegers","primitiveEqualLargeIntegers","primitiveNotEqualLargeIntegers","popNandPushFloatIfOK","stackFloat","safeFDiv","floatAsSmallInt","frexp_exponent","ldexp","sin","atan","exp","stackNonInteger","stackPos32BitInt","primitiveArrayBecome","primitiveStoreStackp","primitiveNewMethod","primitiveBlockValueWithArgs","primitiveSignal","primitiveWait","primitiveResume","primitiveSuspend","primitiveMousePoint","primitiveTestDisplayDepth","primitiveInputSemaphore","primitiveGetNextEvent","primitiveInputWord","namedPrimitive","primitiveSnapshot","primitiveLoadImageSegment","primitiveBeCursor","primitiveBeDisplay","doStringReplace","primitiveScreenSize","primitiveMouseButtons","primitiveKeyboardNext","primitiveKeyboardPeek","primitiveQuit","primitiveExitToDebugger","primitiveChangeClass","doNamedPrimitive","primitiveDoPrimitiveWithArgs","primitiveImageName","primitiveReverseDisplay","registerSemaphore","setLowSpaceThreshold","primitiveDeferDisplayUpdates","primitiveShowDisplayRect","primitiveFullGC","pointsTo","primitiveSignalAtMilliseconds","secondClock","someObject","primitiveBeep","primitiveClipboardText","makeStString","filenameToSqueak","primitiveShortAtAndPut","primitiveConstantFill","primitiveGetAttribute","primitiveFileAtEnd","primitiveFileClose","primitiveFileGetPosition","primitiveFileOpen","primitiveFileRead","primitiveFileSetPosition","primitiveFileDelete","primitiveFileSize","primitiveFileWrite","primitiveFileRename","primitiveDirectoryCreate","primitiveDirectoryDelimitor","primitiveDirectoryLookup","primitiveDirectoryDelete","primitiveIntegerAtAndPut","primitiveCopyObject","primitiveDirectorySetMacTypeAndCreator","primitiveNotIdentical","primitiveExecuteMethodArgsArray","primitiveClosureCopyWithCopiedValues","primitiveClosureValue","primitiveClosureValueWithArgs","primitiveClosureValueNoContextSwitch","primitiveRelinquishProcessorForMicroseconds","primitiveForceDisplayUpdate","primitiveSetFullScreen","microsecondClockUTC","microsecondClockLocal","primitiveVMParameter","primitiveUnloadModule","primitiveListBuiltinModule","primitiveListLoadedModule","modName","functionName","loadModule","firstLiteral","moduleName","prim","retVal","makeStObject","patchModule","setInterpreter","initFunc","initialiseModule","failed","patch","unloadModule","unloadFunc","loadFunctionFrom","func","popNIfOK","moduleNames","getModuleName","bool","nDeep","checkNonInteger","positive32BitValueOf","pos32BitIntFor","signed32","pos64BitIntFor","longlong","sz","stackSigned32BitInt","stackVal","isA","signed32BitIntegerFor","checkFloat","stackBoolean","checkBoolean","stackSigned53BitInt","dividend","divisor","truncated","ceil","ensureSmallInt","pow","exponent","mantissa","floatOrInt","maybeFloat","maybeSmall","knownClass","isKindOf","classOrSuper","theClass","isAssociation","number","charFromInt","ascii","charTable","newFloat","makeLargeIfNeeded","integer","makeLargeInt","makePointWithXandY","pointClass","newPoint","makeStArray","jsArray","proxyClass","jsString","stString","stObj","jsObject","asUint8Array","unixpath","slash","filenameFromSqueak","cameFromBytecode","convertChars","includeInstVars","info","atCache","atCacheMask","makeAtCacheInfo","ivarOffset","atPutCache","wordToPut","objToPut","intToPut","atCacheSize","nonCachedInfo","clearAtCache","atOrPutCache","atOrPutSelector","cacheable","someInstance","nextInstance","checkNumbers","newStackp","stackp","argumentArray","primIdx","arraySize","cntxSize","bytecodeCount","litCount","argsArray","doBothWays","dst","dstPos","srcFmt","dstFmt","totalLength","srcInstSize","dstInstSize","sqArgCount","homeCtxt","newBlock","blockArgCount","initialIP","blockClosure","activateNewClosureMethod","outerContext","where","resume","getScheduler","transferTo","pickTopProcess","newProc","activePriority","newPriority","putToSleep","aProcess","processLists","processList","linkProcessToList","oldProc","schedLists","p","isEmptyList","removeFirstLinkOfList","aList","lastLink","aLinkedList","last","specialObjIndex","excessSignals","msTime","signalSemaphoreWithIndex","semaIndex","semaphores","attr","lowSpaceThreshold","paramsArraySize","arrayObj","vmParameterAt","parm","primitiveSetGCBiasToGrow","primitiveSetGCBiasToGrowGCLimit","cursorForm","loadForm","maskForm","bounds","depth","cursorMergeMask","showForm","bit","merged","msb","pixPerWord","pitch","displayObj","redrawDisplay","rect","theDisplay","displayUpdate","form","cursorColors","srcX","srcY","srcW","srcH","pixels","createImageData","pixelData","colors","swappedColors","argb","abgr","reversedColors","leftSrcShift","srcIndex","srcShift","dstIndex","rgb","opaque","flag","supportedDepths","formObj","withOffset","displayDirty","beep","createOscillator","connect","destination","frequency","noteOn","noteOff","currentTime","stringObj","inputEventSemaIndex","millisecondClockValueSet","clock","millis","dirNameObj","dirName","delimitor","primitiveDirectoryEntry","sqDirName","handle","filePos","fileClose","fileNameObj","fileName","primitiveFileFlush","writeFlag","fileOpen","fileWrite","startIndex","fileContentsDo","srcArray","dstArray","oldNameObj","newNameObj","oldName","newName","primitiveFileStdioHandles","primitiveFileTruncate","primitiveDisableFileAccess","newSize","refCount","primitiveDropRequestFileHandle","fileNames","primitiveDropRequestFileName","snd_primitiveSoundStart","snd_primitiveSoundStartWithSemaphore","bufFrames","samplesPerSec","stereoFlag","audioContext","audioSema","audioNextTimeSlot","audioBuffersReady","audioBuffersUnused","createBuffer","snd_playNextBuffer","source","createBufferSource","duration","snd_primitiveSoundAvailableSpace","available","buf","numberOfChannels","snd_primitiveSoundPlaySamples","sqSamples","channels","channel","jsSamples","getChannelData","snd_primitiveSoundPlaySilence","snd_primitiveSoundStop","snd_primitiveSoundStartRecording","audioInSema","audioInBuffers","audioInBufferIndex","audioInOverSample","sampleRate","bufferSize","audioInProcessor","createScriptProcessor","onaudioprocess","event","snd_recordNextBuffer","inputBuffer","audioBuffer","snd_primitiveSoundGetRecordingSampleRate","actualRate","snd_primitiveSoundRecordSamples","sqStartIndex","sampleCount","sqStep","jsStep","sqCount","jsCount","jsIndex","sqIndex","snd_primitiveSoundStopRecording","snd_primitiveSoundSetRecordLevel","jpeg2_primJPEGPluginIsPresent","jpeg2_primImageHeight","decompressStruct","jpeg2_primImageWidth","jpeg2_primJPEGCompressStructSize","jpeg2_primJPEGDecompressStructSize","jpeg2_primJPEGErrorMgr2StructSize","jpeg2_primJPEGReadHeaderfromByteArrayerrorMgr","jpeg2_readImageFromBytes","jpeg2state","img","jpeg2_primJPEGReadImagefromByteArrayonFormdoDitheringerrorMgr","ditherFlag","jpeg2_getPixelsFromImage","formBits","jpeg2_copyPixelsToForm32","jpeg2_ditherPixelsToForm16","jpeg2_copyPixelsToForm16","jpeg2_primJPEGWriteImageonByteArrayformqualityprogressiveJPEGerrorMgr","blob","Blob","URL","webkitURL","createObjectURL","drawImage","r","g","r1","g1","b1","r2","g2","formPix","ditherMatrix1","ditherMatrix2","di","dmi","dmo","v","dmv1","dmv2","scratch_primitiveOpenURL","scratch_primitiveGetFolderPath","js_primitiveDoUnderstand","js_objectOrGlobal","isGlobal","jsResult","js_activeCallback","propName","js_setError","propValue","js_fromStArray","js_fromStObject","newArgs","stResult","js_primitiveAsString","js_primitiveTypeof","js_primitiveAt","jsRcvr","jsPropName","jsPropValue","js_primitiveAtPut","js_primitiveSqueakAsJSObject","js_primitiveInitCallbacks","js_callbackSema","js_primitiveGetActiveCallbackBlock","js_primitiveGetActiveCallbackArgs","js_primitiveReturnFromCallback","js_primitiveGetError","js_error","js_fromStBlock","objs","maybeDict","js_fromStDict","jsDict","assoc","jsKey","jsValue","squeak","js_executeCallback","sqObject","primitiveFloatArrayAt","primitiveFloatArrayMulFloatArray","primitiveFloatArrayAddScalar","primitiveFloatArrayDivFloatArray","primitiveFloatArrayDivScalar","primitiveFloatArrayHash","primitiveFloatArrayAtPut","primitiveFloatArrayMulScalar","primitiveFloatArrayAddFloatArray","primitiveFloatArraySubScalar","primitiveFloatArraySubFloatArray","primitiveFloatArrayEqual","primitiveFloatArrayDotProduct","m23PrimitiveInvertRectInto","m23PrimitiveTransformPoint","m23PrimitiveIsPureTranslation","m23PrimitiveComposeMatrix","m23PrimitiveTransformRectInto","m23PrimitiveIsIdentity","m23PrimitiveInvertPoint","primitiveDeflateBlock","primitiveDeflateUpdateHashTable","primitiveUpdateGZipCrc32","primitiveInflateDecompressBlock","primitiveZipSendBlock","primitiveFFTTransformData","primitiveFFTScaleData","primitiveFFTPermuteData","gePrimitiveMergeFillFrom","gePrimitiveCopyBuffer","gePrimitiveAddRect","gePrimitiveAddGradientFill","gePrimitiveSetClipRect","gePrimitiveSetBitBltPlugin","gePrimitiveRegisterExternalEdge","gePrimitiveGetClipRect","gePrimitiveAddBezier","gePrimitiveInitializeProcessing","gePrimitiveRenderImage","gePrimitiveGetOffset","gePrimitiveSetDepth","gePrimitiveAddBezierShape","gePrimitiveSetEdgeTransform","gePrimitiveGetTimes","gePrimitiveNextActiveEdgeEntry","gePrimitiveAddBitmapFill","gePrimitiveGetDepth","gePrimitiveAbortProcessing","gePrimitiveNextGlobalEdgeEntry","gePrimitiveGetFailureReason","gePrimitiveDisplaySpanBuffer","gePrimitiveGetCounts","gePrimitiveChangedActiveEdgeEntry","gePrimitiveRenderScanline","gePrimitiveGetBezierStats","gePrimitiveFinishedProcessing","gePrimitiveNeedsFlush","gePrimitiveAddLine","gePrimitiveSetOffset","gePrimitiveNextFillEntry","gePrimitiveInitializeBuffer","gePrimitiveDoProfileStats","gePrimitiveAddActiveEdgeEntry","gePrimitiveSetAALevel","gePrimitiveNeedsFlushPut","gePrimitiveAddCompressedShape","gePrimitiveSetColorTransform","gePrimitiveAddOval","gePrimitiveRegisterExternalFill","gePrimitiveAddPolygon","gePrimitiveGetAALevel","VM_PROXY_MAJOR","VM_PROXY_MINOR","remappableOops","majorVersion","minorVersion","successFlag","primitiveFail","primitiveFailFor","boolean","popthenPush","pushBool","pushInteger","pushFloat","floatObjectOf","stackIntegerValue","stackFloatValue","stackObjectValue","stackBytes","stackWords","stackInt32Array","stackInt16Array","stackUint16Array","isIntegerValue","isArray","isMemberOf","nameBytes","booleanValueOf","positive32BitIntegerFor","floatValueOf","fetchPointerofObject","fetchBytesofObject","fetchWordsofObject","fetchInt32ArrayofObject","fetchInt16ArrayofObject","fetchUint16ArrayofObject","fetchIntegerofObject","fetchLong32ofObject","fetchFloatofObject","storeIntegerofObjectwithValue","storePointerofObjectwithValue","stObjectatput","classArray","isKindOfInteger","classLargeNegativeInteger","classLargePositiveInteger","classBitmap","classSmallInteger","classPoint","classString","nilObject","falseObject","trueObject","instantiateClassindexableSize","methodArgumentCount","makePointwithxValueyValue","pushRemappableOop","popRemappableOop","showDisplayBitsLeftTopRightBottom","ioLoadFunctionFrom","pluginName","indent","highlight","highlightPC","innerIndents","scanner","InstructionStream","oldPC","endPC","interpretNextInstructionFor","print","instruction","substr","toUpperCase","blockReturnTop","doDup","doPop","jump","jumpIf","condition","methodReturnReceiver","methodReturnTop","methodReturnConstant","popIntoLiteralVariable","anAssociation","popIntoReceiverVariable","popIntoTemporaryVariable","pushActiveContext","pushConstant","pushLiteralVariable","pushReceiver","pushReceiverVariable","pushTemporaryVariable","numberArguments","storeIntoLiteralVariable","storeIntoReceiverVariable","storeIntoTemporaryVariable","popIntoNewArray","numElements","pushRemoteTemp","arrayOffset","storeIntoRemoteTemp","popIntoRemoteTemp","specialConstants","client","interpretExtension","offset2","byte4","comments","isHot","debug","clsName","sel","generate","canSingleStep","clsAndSel","functionNameFor","op","char","repl","|","~","<","=",">","&","@","*","+","\\","-",",","/","?","prevPC","sourceLabels","needsLabel","needsBreak","generatePush","generatePopInto","generateReturn","generateBlockReturn","generateExtended","generateJump","generateJumpIf","generateNumericOp","generateQuickPrim","generateSend","deleteUnneededLabels","bytecode","generateStoreInto","generateInstruction","generateClosureTemps","generateClosureCopy","arg1","suffix1","arg2","suffix2","generateDebugCode","generateLabel","distance","suffix","superSend","comment","bytecodes","instr","SHL","SHR","indexForDeltaFromto","thisSample","nextSample","bestIndex","diff","stepSizeTable","nextBits","remaining","bitPosition","currentByte","encodedBytes","byteIndex","nextBitsput","anInteger","bitsAvailable","bufBits","primitiveDecodeMono","predictedDelta","step","bitsPerSample","deltaSignMask","deltaValueHighBit","deltaValueMask","frameSizeMask","indexTable","predicted","sampleIndex","samples","primitiveDecodeStereo","deltaLeft","deltaRight","indexLeft","indexRight","predictedDeltaLeft","predictedDeltaRight","predictedLeft","predictedRight","stepLeft","stepRight","rightSamples","primitiveEncodeMono","primitiveEncodeStereo","anInterpreter","ok","CLASSOF","SIZEOF","BYTESIZEOF","DIV","MOD","PTR_ADD","FPTR_ADD","aaColorMaskGet","workBuffer","GWAAColorMask","aaColorMaskPut","aaColorShiftGet","GWAAColorShift","aaColorShiftPut","aaFirstPixelFromto","leftX","rightX","firstPixel","aaLevelGet","aaHalfPixelPut","GWAAHalfPixel","aaLastPixelFromto","GWAALevel","aaLevelPut","aaScanMaskGet","GWAAScanMask","aaScanMaskPut","aaShiftGet","GWAAShift","aaShiftPut","absoluteSquared8Dot24","word1","word2","accurateLengthOfwith","deltaX","deltaY","length2","computeSqrt","addEdgeToGET","edge","allocateGETEntry","getBuffer","getUsedGet","getUsedPut","adjustWideBezierLeftwidthoffsetendX","bezier","lineOffset","endX","lastX","lastY","bezierUpdateDataOf","GBUpdateX","wideBezierUpdateDataOf","GBUpdateY","bezierFinalXOfput","adjustWideBezierRightwidthoffsetendX","adjustWideLineafterSteppingFromto","line","nextX","baseWidth","xDir","yEntry","yExit","wideLineEntryOf","wideLineExitOf","wideLineExtentOf","offsetFromWidth","wideLineWidthOf","lineXDirectionOf","edgeXValueOfput","lineXIncrementOf","wideLineWidthOfput","aetStartGet","GWAETStart","aetStartPut","aetUsedGet","GWAETUsed","aetUsedPut","allocateAETEntry","nSlots","needAvailableSpace","allocateBezier","allocateObjEntry","GBBaseSize","objUsed","objectTypeOfput","GEPrimitiveBezier","objectIndexOfput","objectLengthOfput","allocateBezierStackEntry","wbStackPush","wbStackSize","allocateBitmapFillcolormap","cmSize","cmBits","cm","fill","fillSize","GBMBaseSize","GEPrimitiveClippedBitmapFill","colormapOf","hasColorTransform","transformColor","bitmapCmSizeOfput","iLimiT","aetBuffer","allocateGradientFillrampWidthisRadial","ramp","rampWidth","isRadial","rampPtr","GGBaseSize","GEPrimitiveRadialGradientFill","GEPrimitiveLinearGradientFill","gradientRampOf","gradientRampLengthOfput","allocateLine","GLBaseSize","GEPrimitiveLine","allocateStackEntry","allocateStackFillEntry","stackFillEntryLength","allocateWideBezier","GBWideSize","GEPrimitiveWideBezier","allocateWideLine","GLWideSize","GEPrimitiveWideLine","areEdgeFillsValid","objectHeaderOf","GEEdgeFillsInvalid","assureValuebetweenand","val1","val2","val3","bezierEndXOf","objat","GBEndX","bezierEndXOfput","objatput","bezierEndYOf","GBEndY","bezierEndYOfput","bezierFinalXOf","GBFinalX","objBuffer","GBUpdateData","bezierViaXOf","GBViaX","bezierViaXOfput","bezierViaYOf","GBViaY","bezierViaYOfput","bitmapCmSizeOf","bmFill","GBColormapSize","bitmapDepthOf","GBBitmapDepth","bitmapDepthOfput","bitmapHeightOf","GBBitmapHeight","bitmapHeightOfput","bitmapRasterOf","GBBitmapRaster","bitmapRasterOfput","bitmapSizeOf","GBBitmapSize","bitmapSizeOfput","bitmapTileFlagOf","GBTileFlag","bitmapTileFlagOfput","bitmapValuebitsatXy","xp","yp","bmDepth","bmRaster","cMask","rShift","uncheckedTransformColor","rShiftTable","bitmapWidthOf","GBBitmapWidth","bitmapWidthOfput","bzEndX","wbStackValue","bzEndXput","wbStackValueput","bzEndY","bzEndYput","bzStartX","bzStartXput","bzStartY","bzStartYput","bzViaX","bzViaXput","bzViaY","bzViaYput","checkCompressedFillIndexListmaxsegments","fillList","maxIndex","nSegs","fillPtr","nFills","runLength","runValue","shortRunLengthAtfrom","shortRunValueAtfrom","checkCompressedFills","indexList","fillIndex","isFillOkay","checkCompressedLineWidthssegments","lineWidthList","nSegments","nItems","ptr","checkCompressedPointssegments","points","pSize","checkCompressedShapesegmentsleftFillsrightFillslineWidthslineFillsfillIndexList","leftFills","rightFills","lineWidths","lineFills","fillIndexList","maxFillIndex","checkedAddBezierToGET","isWide","wideBezierExtentOf","fillMinYGet","edgeXValueOf","fillMaxXGet","checkedAddEdgeToGET","isLine","checkedAddLineToGET","isBezier","lineEndYOf","lineEndXOf","circleCosTable","theTable","circleSinTable","clampValuemax","maxValue","clearSpanBuffer","x0","x1","spanStartGet","spanEndGet","spanSizeGet","spanBuffer","spanStartPut","spanEndPut","clearSpanBufferGet","GWClearSpanBuffer","clearSpanBufferPut","clipMaxXGet","GWClipMaxX","clipMaxXPut","clipMaxYGet","GWClipMaxY","clipMaxYPut","clipMinXGet","GWClipMinX","clipMinXPut","clipMinYGet","GWClipMinY","clipMinYPut","colorTransform","GWColorTransform","GBColormapOffset","computeBeziersplitAt","param","endY","leftViaX","leftViaY","newIndex","rightViaX","rightViaY","sharedX","sharedY","startX","startY","viaX","viaY","engineStopped","computeBezierSplitAtHalf","computeFinalWideBezierValueswidth","temp","wideBezierWidthOfput","smallSqrtTable","copyBitsFromtoat","yValue","copyBitsFn","createGlobalEdgeTable","end","isEdge","edgeYValueOf","fillMaxYGet","objectLengthOf","currentYGet","GWCurrentY","currentYPut","currentZGet","GWCurrentZ","currentZPut","destOffsetXGet","GWDestOffsetX","destOffsetXPut","destOffsetYGet","GWDestOffsetY","destOffsetYPut","displaySpanBufferAt","targetX0","targetX1","targetY","edgeFillsInvalidate","objectTypeOf","edgeFillsValidate","edgeLeftFillOf","GEFillIndexLeft","edgeLeftFillOfput","edgeNumLinesOf","GENumLines","edgeNumLinesOfput","edgeRightFillOf","GEFillIndexRight","edgeRightFillOfput","edgeTransform","GWEdgeTransform","edgeTypeOf","GEXValue","GEYValue","edgeYValueOfput","edgeZValueOf","GEZValue","edgeZValueOfput","errorWrongIndex","fillAllFromto","stopX","topFill","topRightX","fillSpanfromto","quickRemoveInvalidFillsAt","fillBitmapSpan","fillBitmapSpanfromtoat","lastExportedFillGet","lastExportedLeftXGet","lastExportedRightXGet","fillBitmapSpanfromto","baseShift","bitX","colorMask","colorShift","fillValue","spanEndAAGet","spanEndAAPut","bmHeight","bmWidth","ds","dsX","dt","dtX","tileFlag","fillBitmapSpanAAfromtoat","loadBitsFrom","fillOriginXOf","fillOriginYOf","fillDirectionXOf","fillNormalXOf","fillDirectionYOf","fillNormalYOf","repeatValuemax","aaLevel","cShift","idx","lastPixel","fillColorSpanfromto","pixelValue32","fillColorSpanAAx0x1","pv32","GFDirectionX","fillDirectionXOfput","GFDirectionY","fillDirectionYOfput","fillLinearGradient","fillLinearGradientfromtoat","rampIndex","rampSize","gradientRampLengthOf","fillLinearGradientAArampdsdsXfromto","deltaS","rampValue","GWFillMaxX","fillMaxXPut","GWFillMaxY","fillMaxYPut","fillMinXGet","GWFillMinX","fillMinXPut","GWFillMinY","fillMinYPut","GFNormalX","fillNormalXOfput","GFNormalY","fillNormalYOfput","GFOriginX","fillOriginXOfput","GFOriginY","fillOriginYOfput","fillRadialDecreasingrampdeltaSTdsXdtXfromto","deltaST","nextLength","squaredLengthOfwith","fillRadialDecreasingAArampdeltaSTdsXdtXfromto","fillRadialGradient","fillRadialGradientfromtoat","point1Get","fillRadialIncreasingrampdeltaSTdsXdtXfromto","fillRadialIncreasingAArampdeltaSTdsXdtXfromto","lastLength","fillSortsbefore","fillEntry1","fillEntry2","stackFillDepth","stackFillValue","isFillColor","lastExportedFillPut","lastExportedLeftXPut","lastExportedRightXPut","fillTypeOf","GEPrimitiveFillMask","findNextExternalEntryFromGET","getStartGet","GEPrimitiveWideMask","GEPrimitiveEdge","stepToFirstLine","stepToFirstWideLine","stepToFirstBezier","stepToFirstWideBezier","insertEdgeIntoAET","getStartPut","findNextExternalFillFromAET","leftEdge","rightEdge","toggleWideFillOf","toggleFillsOf","findNextExternalUpdateFromAET","removeFirstAETEntry","stepToNextLine","stepToNextWideLine","stepToNextBezier","stepToNextWideBezier","resortFirstAETEntry","findStackFilldepth","stackFillSize","finishedProcessing","stateGet","GEStateCompleted","freeStackFillEntry","wbStackPop","getSortsbefore","edge1","edge2","GWGETStart","GWGETUsed","GFRampLength","GFRampOffset","hasColorTransformGet","GWHasColorTransform","hasColorTransformPut","hasEdgeTransform","hasEdgeTransformGet","GWHasEdgeTransform","hasEdgeTransformPut","hideFilldepth","newDepth","newRightX","newTop","newTopIndex","stackFillValueput","stackFillDepthput","stackFillRightXput","stackFillRightX","topFillValue","topFillValuePut","topFillDepth","topFillDepthPut","topFillRightX","topFillRightXPut","incrementStatby","statIndex","indexForInsertingIntoAET","initialX","initColorTransform","initEdgeTransform","loadBBFn","bbPluginName","initializeGETProcessing","setAALevel","sortGlobalEdgeTable","insertToAETbeforeIndex","GEPrimitiveEdgeMask","isFill","isRealFill","isObject","GEPrimitiveWide","lastExportedEdgeGet","GWLastExportedEdge","lastExportedEdgePut","GWLastExportedFill","GWLastExportedLeftX","GWLastExportedRightX","GLEndX","lineEndXOfput","GLEndY","lineEndYOfput","lineErrorAdjDownOf","GLErrorAdjDown","lineErrorAdjDownOfput","lineErrorAdjUpOf","GLErrorAdjUp","lineErrorAdjUpOfput","lineErrorOf","GLError","lineErrorOfput","GLXDirection","lineXDirectionOfput","GLXIncrement","lineXIncrementOfput","lineYDirectionOfput","GLYDirection","loadAndSubdivideBezierFromviatoisWide","point1","point2","point3","wideFlag","bz1","bz2","index1","index2","subdivideToBeMonotoninX","subdivideBezierFrom","loadArrayPolygonnPointsfilllineWidthlineFill","nPoints","lineFill","y0","y1","loadPointfrom","point2Get","transformPoints","loadWideLinefromtolineFillleftFillrightFill","loadArrayShapenSegmentsfilllineWidthlineFill","pointOop","segs","x2","y2","point3Get","loadWideBezierlineFillleftFillrightFilln","loadArrayTransformFromintolength","transformOop","destPtr","loadBeziersegmentleftFillrightFilloffset","leftFillIndex","rightFillIndex","yOffset","loadBitBltFrom","bbObj","loadBitmapFillcolormaptilefromalongnormalxIndex","formOop","cmOop","xIndex","bmBits","bmBitsSize","ppw","loadFillOrientationfromalongnormalwidthheight","bitsLen","bitsOop","objectIndexOf","formArray","loadColorTransformFrom","okay","loadTransformFromintolength","loadCompressedSegmentfromshortleftFillrightFilllineWidthlineColor","segmentIndex","pointsShort","leftFill","rightFill","loadCompressedShapesegmentsleftFillsrightFillslineWidthslineFillsfillIndexListpointShort","leftLength","leftRun","leftValue","lineFillLength","lineFillRun","lineFillValue","rightLength","rightRun","rightValue","widthLength","widthRun","widthValue","transformWidth","loadEdgeStateFrom","edgeOop","ETBalloonEdgeDataSize","ETXValueIndex","ETYValueIndex","ETZValueIndex","ETLinesIndex","loadEdgeTransformFrom","fillWidth","fillHeight","dirX","dirY","dsLength2","dsY","dtLength2","dtY","nrmX","nrmY","transformPoint","loadFormsFrom","arrayOop","loadGradientFillfromalongnormalisRadial","rampOop","loadLinefromtooffsetleftFillrightFill","p1","p2","yDir","loadOvallineFillleftFillrightFill","cx","cy","loadOvalSegmentwhcxcy","seg","pointArray","loadPolygonnPointsfilllineWidthlineFillpointsShort","isShort","loadRectanglelineFillleftFillrightFill","point4Get","loadRenderingState","failCode","fillOop","PrimErrBadNumArgs","quickLoadEngineFrom","PrimErrBadArgument","loadSpanBufferFrom","BESpanIndex","engine","BEBitBltIndex","BEFormsIndex","GEFEdgeDataTooSmall","FTBalloonFillDataSize","GEFFillDataTooSmall","GEStateWaitingForEdge","GEStateWaitingForFill","GEStateWaitingChange","GEFWrongState","GEFFormLoadFailed","GEFBitBltLoadFailed","loadShapenSegmentsfilllineWidthlineFillpointsShort","spanOop","GEFClassMismatch","spanSizePut","loadWordTransformFromintolength","wide","wideBezierFillOfput","wideBezierExtentOfput","wbStackClear","wideLineFillOfput","wideLineExtentOfput","srcPtr","loadWorkBufferFrom","wbOop","GEFWorkBufferIsInteger","GWMinimalSize","GEFWorkBufferTooSmall","workBufferPut","magicNumberGet","GWMagicNumber","GEFWorkBufferBadMagic","wbSizeGet","GEFWorkBufferWrongSize","objStartGet","GWHeaderSize","GEFWorkBufferStartWrong","objUsedGet","GEFWorkTooBig","GEFWorkBufferIsPointers","GWMagicIndex","magicNumberPut","moduleUnloaded","aModuleName","strcmp","moveAETEntryFromedgex","xValue","wbTopGet","stopBecauseOf","GErrorNoMoreSpace","needsFlush","needsFlushGet","GWNeedsFlush","needsFlushPut","GWObjStart","objStartPut","GWObjUsed","objUsedPut","GEObjectType","GEObjectIndex","GEObjectLength","GEPrimitiveTypeMask","GWPoint1","GWPoint2","GWPoint3","GWPoint4","postDisplayAction","statePut","primitiveAbortProcessing","failureCode","storeEngineStateInto","primitiveAddActiveEdgeEntry","doProfileStats","geProfileTime","ioMicroMSecs","quickLoadEngineFromrequiredState","GEFEngineStopped","GEStateAddingFromGET","GWCountAddAETEntry","GWTimeAddAETEntry","primitiveAddBezier","endOop","startOop","viaOop","GEStateUnlocked","GEFEntityLoadFailed","GEFWrongFill","primitiveAddBezierShape","pointsIsArray","segSize","primitiveAddBitmapFill","dirOop","nrmOop","originOop","GEFBadPoint","primitiveAddCompressedShape","GEFEntityCheckFailed","primitiveAddGradientFill","primitiveAddLine","primitiveAddOval","borderIndex","borderWidth","primitiveAddPolygon","primitiveAddRect","primitiveChangedActiveEdgeEntry","GEStateUpdateEdges","GWCountChangeAETEntry","GWTimeChangeAETEntry","primitiveCopyBuffer","buf1","buf2","GEFSizeMismatch","GWBufferTop","GWSize","primitiveDisplaySpanBuffer","GEStateBlitBuffer","GWCountDisplaySpan","GWTimeDisplaySpan","primitiveDoProfileStats","newValue","oldValue","primitiveFinishedProcessing","finished","GWCountFinishTest","GWTimeFinishTest","primitiveGetAALevel","primitiveGetBezierStats","statOop","GWBezierMonotonSubdivisions","GWBezierHeightSubdivisions","GWBezierOverflowSubdivisions","GWBezierLineConversions","primitiveGetClipRect","rectOop","topRemappableOop","primitiveGetCounts","GWCountInitializing","GWCountNextGETEntry","GWCountNextFillEntry","GWCountMergeFill","GWCountNextAETEntry","primitiveGetDepth","primitiveGetFailureReason","GEFEngineIsInteger","BEBalloonEngineSize","GEFEngineTooSmall","BEWorkBufferIndex","stopReasonGet","GEFEngineIsWords","primitiveGetOffset","primitiveGetTimes","GWTimeInitializing","GWTimeNextGETEntry","GWTimeNextFillEntry","GWTimeMergeFill","GWTimeNextAETEntry","primitiveInitializeBuffer","wbSizePut","wbTopPut","GEPrimitiveFill","stopReasonPut","resetGraphicsEngineStats","primitiveInitializeProcessing","primitiveMergeFillFrom","FTIndexIndex","FTMinXIndex","FTMaxXIndex","GEStateScanningAET","primitiveNeedsFlush","needFlush","primitiveNeedsFlushPut","primitiveNextActiveEdgeEntry","hasEdge","quickLoadEngineFromrequiredStateor","storeEdgeStateFrominto","primitiveNextFillEntry","hasFill","storeFillStateInto","primitiveNextGlobalEdgeEntry","GEFWrongEdge","primitiveRegisterExternalEdge","initialY","initialZ","GEBaseEdgeSize","primitiveRegisterExternalFill","GEBaseFillSize","primitiveRenderImage","proceedRenderingScanline","storeRenderingState","proceedRenderingImage","primitiveRenderScanline","primitiveSetAALevel","level","primitiveSetBitBltPlugin","needReload","newPluginName","primitiveSetClipRect","primitiveSetColorTransform","primitiveSetDepth","primitiveSetEdgeTransform","primitiveSetOffset","external","GErrorGETEntry","GErrorFillEntry","GErrorAETEntry","engineOop","GEFAlreadyFailed","requiredState","GErrorBadState","alternativeState","topDepth","quickSortGlobalEdgeTablefromto","again","before","dij","dj","ij","k","tmp","tt","newDelta","returnWideBezierFill","dispatchReturnValue","wideBezierFillOf","dispatchedValue","returnWideBezierWidth","wideBezierWidthOf","returnWideLineFill","wideLineFillOf","returnWideLineWidth","runArray","showFilldepthrightX","GWSpanEndAA","GWSpanEnd","GWSpanSize","GWSpanStart","GWState","stepToFirstBezierInat","fwDDx","fwDDy","fwDx","fwDy","fwX1","fwX2","fwY1","fwY2","maxSteps","scaledStepSize","squaredStepSize","updateData","GBUpdateDX","GBUpdateDY","GBUpdateDDX","GBUpdateDDY","stepToNextBezierInat","stepToFirstLineInat","errorAdjUp","widthX","xInc","stepToNextLineInat","stepToFirstWideBezierInat","nLines","wideBezierEntryOfput","wideBezierExitOfput","stepToNextWideBezierInat","stepToFirstWideLineInat","wideLineEntryOfput","wideLineExitOfput","stepToNextWideLineInat","stepToNextBezierForwardat","minY","wideBezierEntryOf","wideBezierExitOf","stopReason","GWStopReason","ETIndexIndex","FTYValueIndex","storeStopStateIntoEdgefill","subdivideBezier","otherIndex","base","doTestX","base2","subdivideToBeMonotonInY","subdivideToBeMonotonInX","denom","dx1","dx2","dy1","dy2","toggleFilldepthrightX","hidden","alphaScale","GErrorNeedFlush","point","transformPointinto","srcPoint","dstPoint","transformPointXyinto","dstWidth","dstWidth2","GBWideEntry","GBWideExit","GBWideExtent","GBWideFill","GBWideUpdateData","GBWideWidth","GLWideEntry","GLWideExit","GLWideExtent","GLWideFill","GLWideWidth","SHIFT","OLDrgbDiffwith","sourceWord","destinationWord","pixMask","destDepth","maskTable","bitCount","partitionedSubfromnBitsnPartitions","OLDtallyIntoMapwith","mapIndex","shiftWord","cmFlags","ColorMapPresent","ColorMapIndexedPart","cmMask","destPPW","tallyMapAtput","tallyMapAt","rgbMapfromto","cmBitsPerColor","addWordwith","alphaBlendwith","unAlpha","blendRB","blendAG","alpha","alphaBlendConstwith","alphaBlendConstwithpaintMode","paintMode","rgbMask","pixBlend","sourceShifted","sourcePixVal","destPixVal","bitsPerColor","blend","destShifted","maskShifted","sourceAlpha","destMask","alphaBlendScaledwith","rb","ag","alphaPaintConstwith","alphaSourceBlendBits16","ditherBase","ditherThreshold","srcAlpha","dstMask","destWord","dstY","ditherIndex","bbH","sy","dy","dx","destMSB","mask1","sourcePitch","sx","destPitch","bbW","ditherMatrix4x4","sourceBits","dither32To16threshold","dstLongAtputmask","destBits","alphaSourceBlendBits32","alphaSourceBlendBits8","mappingTable","mapperFlags","default8To32Table","ColorMapNewStyle","mask2","AllOnes","mapPixelflags","bitAndwith","bitAndInvertwith","bitInvertAndwith","bitInvertAndInvertwith","bitInvertDestinationwith","bitInvertOrwith","bitInvertOrInvertwith","bitInvertSourcewith","bitInvertXorwith","bitOrwith","bitOrInvertwith","bitXorwith","checkSourceOverlap","sourceForm","destForm","vDir","hDir","destIndex","destDelta","clearWordwith","clipRange","destX","clipX","sourceX","clipWidth","destY","clipY","sourceY","clipHeight","noSource","sourceWidth","sourceHeight","copyBits","affectedL","affectedR","affectedT","affectedB","lockSurfaces","copyBitsLockedAndClipped","unlockSurfaces","showDisplayBits","copyBitsRule41Test","tryCopyingBitsQuickly","combinationRule","performCopyLoop","ungammaLookupTableOop","gammaLookupTableOop","componentAlphaModeAlpha","componentAlphaModeColor","gammaLookupTable","ungammaLookupTable","copyLoop","mergeWord","skewWord","skewMask","halftoneWord","unskew","mergeFnwith","hInc","prevWord","thisWord","notSkewMask","opTable","skew","noHalftone","halftoneHeight","halftoneAt","preload","sourceIndex","sourceDelta","copyLoopNoSource","copyLoopPixMap","srcShiftInc","dstShiftLeft","sourcePixMask","nSourceIncs","startBits","dstShift","destPixMask","dstShiftInc","endBits","nPix","scrStartBits","sourcePPW","sourceDepth","sourceMSB","srcBitShift","dstBitShift","pickSourcePixelsflagssrcMaskdestMasksrcShiftIncdstShiftInc","deltaFromtonSteps","FixedPt1","destMaskAndPointerInit","pixPerM1","destinationWordwith","srcWord","ditherValue","addThreshold","dither8Lookup","drawLoopXY","xDelta","yDelta","P","affT","px","affR","affL","py","affB","BBDestXIndex","bitBltOop","BBDestYIndex","srcValue","dstValue","expensiveDither32To16threshold","pv","threshold","out","ditherThresholds16","ditherValues16","fetchIntOrFloatofObject","fieldIndex","objectPointer","floatValue","fieldOop","fetchIntOrFloatofObjectifNil","defaultValue","fixAlphawith","halftoneBase","ignoreSourceOrHalftone","formPointer","initBBOpTable","sourceWordwith","subWordwith","rgbAddwith","rgbSubwith","pixPaintwith","pixMaskwith","rgbMaxwith","rgbMinwith","rgbMinInvertwith","rgbDiffwith","tallyIntoMapwith","rgbMulwith","pixSwapwith","pixClearwith","rgbComponentAlphawith","initDither8Lookup","isIdentityMapwith","shifts","masks","RedIndex","GreenIndex","BlueIndex","AlphaIndex","loadBitBltDestForm","destBitsSize","FormBitsIndex","destWidth","FormWidthIndex","destHeight","FormHeightIndex","FormDepthIndex","queryDestSurface","loadBitBltFromwarping","aBool","isWarping","BBRuleIndex","OpTableSize","BBSourceFormIndex","halftoneForm","BBHalftoneFormIndex","BBDestFormIndex","BBWidthIndex","BBHeightIndex","loadBitBltSourceForm","loadColorMap","setupColorMasks","BBSourceXIndex","BBSourceYIndex","loadHalftoneForm","BBClipXIndex","BBClipYIndex","BBClipWidthIndex","BBClipHeightIndex","sourceBitsSize","querySourceSurface","oldStyle","cmShiftTable","cmMaskTable","cmLookupTable","BBColorMapIndex","loadColorMapShiftOrMaskFrom","ColorMapFixedPart","mapOop","halftoneBits","loadSurfacePlugin","querySurfaceFn","lockSurfaceFn","unlockSurfaceFn","loadWarpBltFrom","destHandle","sourceHandle","fn","hasSurfaceLock","sourcePixel","rgbMapPixelflags","partitionedANDtonBitsnPartitions","nBits","nParts","partitionedAddtonBitscomponentMaskcarryOverflowMask","componentMask","carryOverflowMask","w2","carryOverflow","sum","w1","partitionedMaxwithnBitsnPartitions","partitionedMinwithnBitsnPartitions","partitionedMulwithnBitsnPartitions","dMask","product","sMask","partitionedRgbComponentAlphadestnBitsnPartitions","rgbMap16To32","rgbComponentAlpha32with","sourceSkewAndPointerInit","nPixels","srcMask","sourcePix","destPix","pickWarpPixelAtXy","xx","yy","warpAlignShift","warpBitShiftTable","warpAlignMask","warpSrcMask","lowMask","highMask","primitiveCopyBits","primitiveDisplayString","charIndex","sourcePtr","stopIndex","xTable","maxGlyph","quickBlt","glyphIndex","glyphMap","kernDelta","sourceString","primitiveDrawLoop","primitivePixelValueAt","pixel","bitmap","ppW","stride","bitsSize","xVal","yVal","_return_value","primitiveWarpBits","warpBits","d","rgbComponentAlpha16","rgbComponentAlpha32","srcColor","aG","aA","aR","aB","answer","s","rgbComponentAlpha8","rgbMap32To32","nBitsIn","nBitsOut","srcPix","wordToInvert","targetBits","setupColorMasksFromto","srcBits","deltaBits","dxLowBits","sxLowBits","dWid","pixVal","destLocked","ns","warpLoop","nSteps","deltaP43y","deltaP43x","pBy","pAy","pBx","sourceMapOop","pAx","deltaP12y","deltaP12x","smoothingCount","BBWarpBase","warpLoopSetup","warpPickSourcePixelsxDeltahyDeltahxDeltavyDeltavdstShiftIncflags","warpPickSmoothPixelsxDeltahyDeltahxDeltavyDeltavsourceMapsmoothingdstShiftInc","warpSrcShift","xDeltah","yDeltah","xDeltav","yDeltav","sourceMap","xdh","ydh","xdv","ydv","checkedFloatPtrOf","checkedWordPtrOf","loadFFTFrom","fftOop","nu","fftSize","sinTableSize","sinTable","permTableSize","permTable","realDataSize","realData","imagDataSize","imagData","permuteData","scaleData","forward","transformData","realN","transformForward","fftScale","fftSize2","fftSize4","ii","imagT","imagU","ip","lev","lev1","realT","realU","theta","primitiveAddFloatArray","argPtr","rcvrPtr","primitiveAddScalar","primitiveAt","floatPtr","primitiveAtPut","primitiveDivFloatArray","primitiveDivScalar","inverse","primitiveDotProduct","primitiveEqual","primitiveHashArray","primitiveLength","primitiveMulFloatArray","primitiveMulScalar","primitiveNormalize","len","primitiveSubFloatArray","primitiveSubScalar","primitiveSum","cSquaredDistanceFromto","aPoint","bPoint","aPointX","bPointX","xDiff","aPointY","bPointY","yDiff","cSubstAngleFactorFromto","startDegreeNumber","endDegreeNumber","absDiff","majorNO","minorNO","primSameClassAbsoluteStrokeDistanceMyPoints_otherPoints_myVectors_otherVectors_mySquaredLengths_otherSquaredLengths_myAngles_otherAngles_maxSizeAndReferenceFlag_rowBase_rowInsertRemove_rowInsertRemoveCount","otherAngles","otherSquaredLengthsSize","forReference","jM1","iM1","jM1T2","insert","otherVectors","otherVectorsSize","otherSquaredLengths","rowBaseSize","myPoints","jLimiT","mySquaredLengths","additionalMultiInsertRemoveCost","otherPoints","otherPointsSize","myVectors","rowInsertRemoveCount","rowBase","maxDist","iM1T2","insertRemove","myVectorsSize","subst","maxSize","removeBase","substBase","myAngles","insertRemoveCount","rowInsertRemove","insertBase","myPointsOop","otherPointsOop","myVectorsOop","otherVectorsOop","mySquaredLengthsOop","otherSquaredLengthsOop","myAnglesOop","otherAnglesOop","maxSizeAndRefFlag","rowBaseOop","rowInsertRemoveOop","rowInsertRemoveCountOop","primVersionNO","cbColorComponentFrom","colorComponentfrom","cbComponent","colorComponentBlocksfrom","cbBlocks","aColorComponent","MinComponentSize","CurrentXIndex","CurrentYIndex","HScaleIndex","VScaleIndex","BlockWidthIndex","MCUWidthIndex","PriorDCValueIndex","blocks","blockOop","MCUBlockIndex","MaxMCUBlocks","DCTSize2","colorConvertGrayscaleMCU","yComponent","jpegBitsSize","nextSampleY","residuals","MaxSample","ditherMask","jpegBits","colorConvertMCU","blue","cb","cr","green","red","crComponent","nextSampleCb","SampleOffset","nextSampleCr","FIXn1n40200","FIXn0n34414","FIXn0n71414","FIXn1n77200","crColorComponentFrom","crBlocks","decodeBlockIntocomponent","anArray","zeroCount","jpegDecodeValueFromsize","dcTable","dcTableSize","getBits","scaleAndSignExtendinFieldWidth","acTable","acTableSize","jpegNaturalOrder","fillBuffer","jsBitCount","jsReadLimit","jsPosition","jsCollection","jsBitBuffer","requestedBits","idctBlockIntqt","qt","anACTerm","dcval","row","t0","t1","t10","t11","t12","t13","t2","t3","z1","z2","z3","z4","z5","ws","DCTSize","FIXn0n541196100","FIXn1n847759065","FIXn0n765366865","FIXn1n175875602","FIXn0n298631336","FIXn2n053119869","FIXn3n072711026","FIXn1n501321110","FIXn0n899976223","FIXn2n562915447","FIXn1n961570560","FIXn0n390180644","table","tableSize","bitsNeeded","tableIndex","MaxBits","loadJPEGStreamFrom","streamOop","blockIndex","curX","sample","yBlocks","primitiveColorConvertGrayscaleMCU","stInit","yColorComponentFrom","primitiveColorConvertMCU","primitiveDecodeMCU","storeJPEGStreamOn","primitiveIdctInt","aNumber","degreesFromXy","tanVal","degreesToRadians","degrees","deg","headingRadians","q","drawTurtlesInArray","bitsIndex","colorArray","colorOop","destOop","visible","visibleArray","visibleOop","xArray","xOop","yArray","yOop","getHeadingArrayInto","heading","headingArray","headingOop","resultArray","resultOop","getScalarHeading","radiansToDegrees","kedamaRandomSeed","randA","randM","randQ","randR","kedamaRandom2","range","hi","lo","kedamaSetRandomSeed","seed","makeMask","dOrigin","dataBits","dataSize","mOrigin","maskBits","maskSize","shiftAmount","makeMaskLog","maxFirst","maxLog","maxOop","makeTurtlesMap","whoArray","whoOop","primPixelAtXY","ret","xPos","yPos","primPixelAtXYPut","primPixelsAtXY","bitsHeight","bitsWidth","destWords","destWordsOop","xArrayOop","yArrayOop","primScalarForward","bottomEdgeMode","leftEdgeMode","newX","newY","rightEdgeMode","topEdgeMode","cos","scalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode","scalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode","primSetPixelsAtXY","intValue","isValueInt","valueOop","wordsValue","primTurtlesForward","isValVector","valArray","valOop","primUpHill","maxVal","maxValX","maxValY","rowOffset","sniffRange","tH","tX","tY","thisVal","turtleX","turtleY","primitiveAddArrays","argOop","floatsArg","floatsRcvr","floatsResult","isArgWords","isRcvrWords","rcvrOop","wordsArg","wordsRcvr","wordsResult","floatArg","intArg","isArgInt","primitiveDivArrays","primitiveMulArrays","primitiveSubArrays","radians","randomIntoFloatArray","factor","floatArray","floatArrayOop","randomIntoIntegerArray","integerArray","integerArrayOop","randomRange","scalarGetAngleTo","fromX","fromY","toX","toY","scalarGetDistanceTo","setHeadingArrayFrom","setScalarHeading","shutdownModule","turtleScalarSetX","turtleScalarSetY","yIndex","turtlesSetX","turtlesSetY","vectorGetAngleTo","isVector","pX","pXOop","pY","pYOop","ppx","ppy","vectorGetDistanceTo","zoomBitmap","dstSize","dummy","sHeight","sOrigin","sWidth","srcOrigin","srcSize","xFactor","yFactor","floatsValue","fv","isValueWordArray","pArray","pArrayOop","pOop","primitiveAndByteArray","length1","otherArray","otherOop","rcvrArray","primitiveEQArrays","bytesResult","primitiveEQScalar","primitiveGEArrays","primitiveGEScalar","primitiveGTArrays","primitiveGTScalar","primitiveLEArrays","primitiveLEScalar","primitiveLTArrays","primitiveLTScalar","primitiveNEArrays","primitiveNEScalar","primitiveNotByteArray","primitiveOrByteArray","primitivePredicateAtAllPutBoolean","predicates","predicatesOop","values","valuesOop","primitivePredicateAtAllPutColor","primitivePredicateAtAllPutNumber","primitivePredicateAtAllPutObject","primitivePredicateReplaceBytes","predicatesSize","repOop","repStart","replacement","replacementSize","valuesSize","primitivePredicateReplaceWords","floatReplacement","floatValues","rIsFloat","vIsFloat","primitiveRemArrays","floatRcvr","floatResult","wordArg","wordRcvr","wordResult","primitiveRemScalar","isWordVector","wordValArray","addAmplitudeDiplophonia","periodCount","frame","Diplophonia","addFlutter","asin","bsin","csin","deltaF0","timeCount","samplesCount","samplingRate","PI","Flutter","F0","addFrequencyDiplophonia","Ro","addJitter","nextRandom","Jitter","addShimmer","Shimmer","antiResonatorfrequencybandwidth","freq","bw","resonatorAput","resonatorBput","resonatorCput","antiResonatorvalue","aFloat","resonatorA","resonatorB","resonatorP1","resonatorC","resonatorP2","resonatorP2put","resonatorP1put","cascadeBranch","cascade","Rnz","resonatorvalue","Rnpc","Rtz","Rtpc","R8c","R7c","R6c","R5c","R4c","R3c","R2c","R1c","checkedShortPtrOf","glottalSource","nopen","nper","a1","a2","c1","pitchSynchronousReset","linearFromdB","loadFrom","klattOop","resonators","nmod","glast","vlast","nlast","samplesPerFrame","normalizeGlottalPulse","ingore","s0","s1","s2","parallelFrictionBranch","R2fp","R3fp","R4fp","R5fp","R6fp","parallelVoicedBranch","R1vp","R2vp","R3vp","R4vp","Rnpp","Rtpp","voicedPitchSynchronousReset","primitiveSynthesizeFrameIntoStartingAt","aKlattFrame","bufferOop","synthesizeFrameintostartingAt","saveTo","quphicosphisinphirphid","u","phi","cosphi","sinphi","rphid","expuphi","resonatorfrequencybandwidth","resonatorfrequencybandwidthgain","gain","rorark","roNumber","raNumber","rkNumber","gamma","gammapwr","ra","rho","rk","ro","te","zeroQphicosphisinphirphid","origKlattOop","a1Oop","a2Oop","b1Oop","c1Oop","glastOop","nlastOop","pitchOop","vlastOop","x1Oop","x2Oop","setCurrentFrame","ampF1V","ampF2F","ampF2V","ampF3F","ampF3V","ampF4F","ampF4V","ampF5F","ampF6F","ampFNV","ampFTV","Anv","Atv","A1v","A2v","A3v","A4v","A2f","A3f","A4f","A5f","A6f","F6","B6","F5","B5","F4","B4","F3","B3","F2","B2","F1","B1","Fnp","Bnp","Ftp","Btp","Fnz","Bnz","Ftz","Btz","B2f","B3f","B4f","B5f","B6f","ampGain","aspiration","aspirationNoise","bypass","friction","frictionNoise","glotout","noise","parGlotout","parVoicing","turbulence","voice","voicing","Voicing","Turbulence","Friction","Aspiration","Bypass","Gain","Rout","Ra","Rk","qa","qb","qc","qzero","ua","ub","uc","Epsilon","anyBitOfBytesfromto","aBytesOop","stopArg","lastByteIx","digit","magnitude","leftShift","rightShift","firstByteIx","ix","highBitOfBytes","digitOfBytesat","bytesgrowTo","aBytesObject","newLen","oldLen","copyLen","newBytes","cDigitCopyFromtolen","bytesOrIntgrowTo","sq_class","cCopyIntValtoBytes","pByte","ixLimiT","cDigitLengthOfCSI","cDigitOfCSIat","cDigitAddlenwithleninto","pByteShort","shortLen","pByteLong","longLen","pByteRes","accum","cDigitComparewithlen","pFirst","pSecond","firstDigit","secondDigit","pFrom","pTo","cDigitDivlenremlenquolen","pDiv","divLen","pRem","remLen","pQuo","quoLen","dnh","r3","mul","cond","dl","ql","r1r2","dh","cDigitHighBitlen","lastDigit","realLength","cHighBit","csi","cDigitLshiftfromlentolen","lenFrom","lenTo","digitShift","carry","bitShift","rshift","cDigitReplacefromtowithstartingAt","cDigitMontgomerylentimeslenmodulolenmInvModBinto","pBytesFirst","firstLen","pBytesSecond","secondLen","pBytesThird","thirdLen","mInv","pBytesRes","lastByte","limit3","limit2","limit1","cDigitMultiplylenwithleninto","ab","limitLong","limitShort","cDigitOpshortlenlongleninto","opIndex","andOpIndex","orOpIndex","xorOpIndex","cDigitRshiftfromlentolen","fromLen","toLen","cDigitSublenwithleninto","pByteSmall","smallLen","pByteLarge","largeLen","z","uint","bitNo","createLargeFromSmallInteger","anOop","res","digitLshift","highBit","digitRshiftlookfirst","newOop","oldDigitLen","newByteLen","newBitLen","oldBitLen","digitAddLargewith","firstInteger","secondInteger","over","shortInt","resClass","newSum","longInt","digitBitLogicwithopIndex","opIx","shortLarge","firstLarge","secondLarge","longLarge","normalizePositive","digitCompareLargewith","digitDivLargewithnegative","neg","resultClass","rem","quo","unsafeByteOfat","digitLength","digitMontgomerytimesmodulomInvModB","thirdLarge","prod","digitMultiplyLargewithnegative","normalize","digitSubLargewith","smallerLen","larger","smaller","resLen","largerLen","firstNeg","normalizeNegative","isNormalized","sLen","minVal","aLargeInteger","aLargeNegativeInteger","aLargePositiveInteger","primAnyBitFromTo","large","primAsLargeInteger","primCheckIfCModuleExists","_primDigitBitShift","aLarge","primDigitAdd","primDigitAddWith","primDigitBitAnd","primDigitBitLogicWithOp","primDigitBitOr","primDigitBitShift","primDigitBitShiftMagnitude","primDigitBitXor","primDigitCompare","firstVal","secondVal","primDigitCompareWith","primDigitDivNegative","firstAsLargeInteger","secondAsLargeInteger","primDigitDivWithNegative","primDigitMultiplyNegative","primDigitMultiplyWithNegative","primDigitSubtract","primDigitSubtractWith","primGetModuleName","strPtr","strLen","strOop","strlen","primMontgomeryTimesModulo","secondOperandInteger","thirdModuloInteger","smallInverseInteger","primNormalize","primNormalizeNegative","primNormalizePositive","bytesOop","pointer","loadArgumentMatrix","matrix","loadArgumentPoint","isInt","m23ArgX","m23ArgY","matrix2x3ComposeMatrixwithinto","m1","m2","m3","a11","a12","a13","a21","a22","a23","matrix2x3InvertPoint","det","detX","detY","m23ResultX","m23ResultY","matrix2x3TransformPoint","okayIntValue","primitiveComposeMatrix","primitiveInvertPoint","roundAndStoreResultPoint","primitiveInvertRectInto","cornerX","cornerY","dstOop","maxX","maxY","minX","originX","originY","srcOop","roundAndStoreResultRectx0y0x1y1","primitiveIsIdentity","primitiveIsPureTranslation","primitiveTransformPoint","primitiveTransformRectInto","nItemsToPop","cornerOop","encodeBytesOfinat","ba","encodeIntinat","primitiveCompareString","string1","string2","order","c2","len1","len2","primitiveCompressToByteArray","bm","eqBytes","lowByte","primitiveConvert8BitSigned","aByteArray","aSoundBuffer","primitiveDecompressFromByteArray","pastEnd","primitiveFindFirstInString","aString","inclusionMap","stringSize","primitiveFindSubstring","matchTable","primitiveIndexOfAsciiInString","primitiveStringHash","speciesHash","byteArraySize","low","primitiveTranslateStringWithTable","bitmapatputHsv","hue","saturation","brightness","hF","hI","outPix","checkedUnsignedIntPtrOf","hueFromRGBminmax","span","interpolateandfrac","pix1","pix2","frac2","frac1","interpolatedFromxywidthheight","xFixed","yFixed","bottomPix","topPix","xFrac","yFrac","primitiveBlur","bTotal","dX","dY","gTotal","in_","inOop","outOop","pix","rTotal","primitiveBrightnessShift","primitiveCondenseSound","_src","_dst","primitiveDoubleSize","baseIndex","dstX","inH","inW","outH","outW","primitiveExtractChannel","rightFlag","primitiveFisheye","ang","centerX","centerY","power","scaledPower","atan2","primitiveHalfSizeAverage","dstH","dstW","primitiveHalfSizeDiagonal","primitiveHueShift","primitiveInterpolate","primitiveSaturationShift","primitiveScale","inX","inY","outX","outY","p3","p4","tWeight","w3","w4","xIncr","yIncr","primitiveWaterRipples1","aArOop","aArray","allPix","bArOop","bArray","blops","newLoc","ripply","random","primitiveWhirl","cosa","radius","radiusSquared","scaleX","scaleY","sina","whirlRadians","primitiveApplyReverb","delayedLeft","delayedRight","sliceIndex","tapGain","tapIndex","bufferIndex","leftBuffer","rightBuffer","tapCount","tapDelays","tapGains","primitiveMixFMSound","leftVol","rightVol","doingFM","lastIndex","normalizedModulation","scaledIndex","scaledIndexIncr","scaledOffsetIndex","scaledOffsetIndexIncr","scaledVol","scaledVolIncr","scaledVolLimit","scaledWaveTableSize","waveTable","primitiveMixLoopedSampledSound","compositeLeftVol","compositeRightVol","isInStereo","leftVal","nextSampleIndex","rightVal","lastSample","leftSamples","loopEnd","releaseCount","scaledLoopLength","LoopIndexFractionMask","LoopIndexScaleFactor","primitiveMixPluckedSound","average","scaledNextIndex","scaledThisIndex","ring","scaledIndexLimit","ScaleFactor","primitiveMixSampledSound","outIndex","overflow","indexHighBits","samplesSize","scaledIncrement","ScaledIndexOverflow","primitiveDiffuseFromToWidthHeightDelta","area","rowStart","primitiveEvaporateRate","patchVar","patchVarOop","rate","primitiveMapFromToWidthHeightPatchSizeRgbFlagsShift","patchSize","rgbFlags","rgbMult","comparewithmin","here","matchPos","minLength","zipCollection","DeflateMaxMatch","deflateBlockchainLengthgoodMatch","chainLength","goodMatch","flushNeeded","hasMatch","hereLength","hereMatch","matchResult","newLength","newMatch","zipBlockPos","zipLiteralCount","zipLiteralSize","findMatchlastLengthlastMatchchainLengthgoodMatch","DeflateMinMatch","insertStringAt","encodeMatchdistance","encodeLiteral","determineSizeOfReadStream","readStreamInstSize","determineSizeOfWriteStream","writeStreamInstSize","lit","zipLiterals","zipDistances","zipLiteralFreq","shouldFlush","literal","zipMatchLengthCodes","zipDistanceCodes","zipDistanceFreq","zipMatchCount","lastMatch","maxChainLength","bestLength","zipHashHead","updateHashAt","DeflateMaxDistance","zipPosition","zipHashTail","DeflateWindowMask","prevEntry","zipHashValue","loadDeflateStreamFrom","zipCollectionSize","zipReadLimit","DeflateHashTableSize","DeflateWindowSize","DeflateMaxLiteralCodes","DeflateMaxDistanceCodes","loadZipEncoderFrom","zipBitBuf","zipBitPos","nextZipBitsput","tablePtr","zipDistTable","zipDistTableSize","zipLitTable","zipLitTableSize","zipState","zipSourcePos","zipSourceLimit","zipSource","zipDecompressBlock","primitiveUpdateAdler32","adler32","bytePtr","collection","crc","zipCrcTable","distStream","distTree","litStream","litTree","sendBlockwithwithwith","literalStream","distanceStream","distArray","distBitLengths","distBlCount","distCodes","litArray","litBlCount","litLimit","litPos","llBitLengths","llCodes","zipExtraLengthBits","zipBaseLength","zipExtraDistanceBits","zipBaseDistance","nLits","updateHash","nextValue","DeflateHashMask","zipDecodeValueFromsize","zipNextBits","oldBitPos","oldBits","oldPos","StateNoMoreData","_keyStr","_f","compressToBase64","input","chr1","chr2","chr3","enc1","enc2","enc3","enc4","output","compress","NaN","isNaN","charAt","decompressFromBase64","output_","ol","decompress","current","uncompressed","context_dictionary","context_dictionaryToCreate","context_c","context_wc","context_w","context_enlargeIn","context_dictSize","context_numBits","context_data_string","context_data_val","context_data_position","resb","maxpower","dictionary","enlargeIn","numBits","exports"],"mappings":"AAsBA,YAOAA,QAAOC,OAAS,SAASC,GACrB,GAAmB,KAAfA,EAAmB,MAAOF,OAC9B,IAAIG,GAAOD,EAAWE,MAAM,KACxBC,EAAOF,EAAKG,MACZC,EAASN,OAAOE,EAAKK,KAAK,MAC1BC,EAAOF,EAAOF,EAqBlB,OApBKI,KAAMF,EAAOF,GAAQI,GACtBC,QAAQ,EACRC,WACAC,SAAU,SAASC,GACf,OACIC,MAAO,SAASC,GACZ,QAASC,KACLD,IACAN,EAAKC,QAAS,EACdD,EAAKE,QAAQM,QAAQ,SAASC,GAAGA,MAEjCL,IAAQZ,OAAOY,GAAKH,OACpBT,OAAOY,GAAKF,QAAQQ,KAAKH,GAEzBA,SAMbP,GAGXW,OAAOC,OAAS,SAASC,GAErB,IAAK,GAAIC,GAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAClC,GAA2B,gBAAhBC,WAAUD,GACjB,IAAK,GAAIlB,KAAQmB,WAAUD,GACvBD,EAAIjB,GAAQmB,UAAUD,GAAGlB,IAGzCqB,SAASC,UAAUC,SAAW,SAASC,GAEnC,GAAID,GAAW,WAEX,MADIE,MAAKC,YAAYD,KAAKC,WAAWC,MAAMF,KAAMN,WAC1CM,MAGPG,EAAa,YACjBA,GAAWN,UAAYG,KAAKH,UAC5BC,EAASD,UAAY,GAAIM,EAEzB,KAAK,GAAIV,GAAI,EAAGA,EAAIC,UAAUC,OAAQF,I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B,EAAIqc,EAAMw3H,OAAO,GAC1CqB,IAEAl1I,EAAIqc,EAEa,GAAb64H,IACFA,EAAYx4I,KAAKiyC,IAAI,EAAGwmG,GACxBA,OAOc,oBAAX3gJ,SAAoC,MAAVA,SACnCA,OAAO4gJ,QAAUj6H","sourcesContent":["/*\n * Copyright (c) 2013-2016 Bert Freudenberg\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n\"use strict\"; \n\n//////////////////////////////////////////////////////////////////////////////\n// these functions fake the Lively module and class system\n// just enough so the loading of vm.js succeeds\n//////////////////////////////////////////////////////////////////////////////\n\nwindow.module = function(dottedPath) {\n if (dottedPath === \"\") return window;\n var path = dottedPath.split(\".\"),\n name = path.pop(),\n parent = module(path.join(\".\")),\n self = parent[name];\n if (!self) parent[name] = self = {\n loaded: false,\n pending: [],\n requires: function(req) {\n return {\n toRun: function(code) {\n function load() {\n code();\n self.loaded = true;\n self.pending.forEach(function(f){f();});\n }\n if (req && !module(req).loaded) {\n module(req).pending.push(load);\n } else {\n load();\n }\n }\n };\n },\n };\n return self;\n};\n\nObject.extend = function(obj /* + more args */ ) {\n // skip arg 0, copy properties of other args to obj\n for (var i = 1; i < arguments.length; i++)\n if (typeof arguments[i] == 'object')\n for (var name in arguments[i])\n obj[name] = arguments[i][name];\n};\n\nFunction.prototype.subclass = function(classPath /* + more args */ ) {\n // create subclass\n var subclass = function() {\n if (this.initialize) this.initialize.apply(this, arguments);\n return this;\n };\n // set up prototype\n var protoclass = function() { };\n protoclass.prototype = this.prototype;\n subclass.prototype = new protoclass();\n // skip arg 0, copy properties of other args to prototype\n for (var i = 1; i < arguments.length; i++)\n Object.extend(subclass.prototype, arguments[i]);\n // add class to module\n var modulePath = classPath.split(\".\"),\n className = modulePath.pop();\n module(modulePath.join('.'))[className] = subclass;\n return subclass;\n};\n\n//////////////////////////////////////////////////////////////////////////////\n// load vm, plugins, and other libraries\n//////////////////////////////////////////////////////////////////////////////\n\n(function(){\n var scripts = document.getElementsByTagName(\"script\"),\n squeakjs = scripts[scripts.length - 1],\n vmDir = squeakjs.src.replace(/[^\\/]*$/, \"\");\n if (squeakjs.src.match(/squeak\\.min\\.js$/)) return;\n [ \"vm.js\",\n \"jit.js\",\n \"plugins/ADPCMCodecPlugin.js\",\n \"plugins/B2DPlugin.js\",\n \"plugins/BitBltPlugin.js\",\n \"plugins/FFTPlugin.js\",\n \"plugins/FloatArrayPlugin.js\",\n \"plugins/GeniePlugin.js\",\n \"plugins/JPEGReaderPlugin.js\",\n \"plugins/KedamaPlugin.js\",\n \"plugins/KedamaPlugin2.js\",\n \"plugins/Klatt.js\",\n \"plugins/LargeIntegers.js\",\n \"plugins/Matrix2x3Plugin.js\",\n \"plugins/MiscPrimitivePlugin.js\",\n \"plugins/ScratchPlugin.js\",\n \"plugins/SoundGenerationPlugin.js\",\n \"plugins/StarSqueakPlugin.js\",\n \"plugins/ZipPlugin.js\",\n \"lib/lz-string.js\",\n ].forEach(function(filename) {\n var script = document.createElement('script');\n script.setAttribute(\"type\",\"text/javascript\");\n script.setAttribute(\"src\", vmDir + filename);\n document.getElementsByTagName(\"head\")[0].appendChild(script);\n });\n})();\n\nmodule(\"SqueakJS\").requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\n// if in private mode set localStorage to a regular dict\nvar localStorage = window.localStorage;\ntry {\n localStorage[\"squeak-foo:\"] = \"bar\";\n if (localStorage[\"squeak-foo:\"] !== \"bar\") throw Error();\n delete localStorage[\"squeak-foo:\"];\n} catch(e) {\n localStorage = {};\n}\n\n//////////////////////////////////////////////////////////////////////////////\n// display & event setup\n//////////////////////////////////////////////////////////////////////////////\n\nfunction setupFullscreen(display, canvas, options) {\n // Fullscreen can only be enabled in an event handler. So we check the\n // fullscreen flag on every mouse down/up and keyboard event.\n var box = canvas.parentElement,\n fullscreenEvent = \"fullscreenchange\",\n fullscreenElement = \"fullscreenElement\",\n fullscreenEnabled = \"fullscreenEnabled\";\n\n if (!box.requestFullscreen) {\n [ // Fullscreen support is still very browser-dependent\n {req: box.webkitRequestFullscreen, exit: document.webkitExitFullscreen,\n evt: \"webkitfullscreenchange\", elem: \"webkitFullscreenElement\", enable: \"webkitFullscreenEnabled\"},\n {req: box.mozRequestFullScreen, exit: document.mozCancelFullScreen,\n evt: \"mozfullscreenchange\", elem: \"mozFullScreenElement\", enable: \"mozFullScreenEnabled\"},\n {req: box.msRequestFullscreen, exit: document.msExitFullscreen,\n evt: \"MSFullscreenChange\", elem: \"msFullscreenElement\", enable: \"msFullscreenEnabled\"},\n ].forEach(function(browser) {\n if (browser.req) {\n box.requestFullscreen = browser.req;\n document.exitFullscreen = browser.exit;\n fullscreenEvent = browser.evt;\n fullscreenElement = browser.elem;\n fullscreenEnabled = browser.enable;\n }\n });\n }\n\n // If the user canceled fullscreen, turn off the fullscreen flag so\n // we don't try to enable it again in the next event\n function fullscreenChange(fullscreen) {\n display.fullscreen = fullscreen;\n box.style.background = fullscreen ? 'black' : '';\n if (options.header) options.header.style.display = fullscreen ? 'none' : '';\n if (options.footer) options.footer.style.display = fullscreen ? 'none' : '';\n if (options.fullscreenCheckbox) options.fullscreenCheckbox.checked = fullscreen;\n setTimeout(window.onresize, 0);\n }\n \n var checkFullscreen;\n \n if (box.requestFullscreen) {\n document.addEventListener(fullscreenEvent, function(){fullscreenChange(box == document[fullscreenElement]);});\n checkFullscreen = function() {\n if (document[fullscreenEnabled] && (box == document[fullscreenElement]) != display.fullscreen) {\n if (display.fullscreen) box.requestFullscreen();\n else document.exitFullscreen();\n }\n };\n } else {\n var isFullscreen = false;\n checkFullscreen = function() {\n if ((options.header || options.footer) && isFullscreen != display.fullscreen) {\n isFullscreen = display.fullscreen;\n fullscreenChange(isFullscreen);\n }\n };\n }\n\n if (options.fullscreenCheckbox) options.fullscreenCheckbox.onclick = function() {\n display.fullscreen = options.fullscreenCheckbox.checked;\n checkFullscreen();\n };\n\n return checkFullscreen;\n}\n\nfunction setupSwapButtons(options) {\n if (options.swapCheckbox) {\n var imageName = localStorage[\"squeakImageName\"] || \"default\",\n settings = JSON.parse(localStorage[\"squeakSettings:\" + imageName] || \"{}\");\n if (\"swapButtons\" in settings) options.swapButtons = settings.swapButtons;\n options.swapCheckbox.checked = options.swapButtons;\n options.swapCheckbox.onclick = function() {\n options.swapButtons = options.swapCheckbox.checked;\n settings[\"swapButtons\"] = options.swapButtons;\n localStorage[\"squeakSettings:\" + imageName] = JSON.stringify(settings);\n };\n }\n}\n\nfunction recordModifiers(evt, display) {\n var shiftPressed = evt.shiftKey,\n ctrlPressed = evt.ctrlKey && !evt.altKey,\n cmdPressed = evt.metaKey || (evt.altKey && !evt.ctrlKey),\n modifiers =\n (shiftPressed ? Squeak.Keyboard_Shift : 0) +\n (ctrlPressed ? Squeak.Keyboard_Ctrl : 0) +\n (cmdPressed ? Squeak.Keyboard_Cmd : 0);\n display.buttons = (display.buttons & ~Squeak.Keyboard_All) | modifiers;\n return modifiers;\n}\n\nvar canUseMouseOffset = navigator.userAgent.match(\"AppleWebKit/\");\n\nfunction updateMousePos(evt, canvas, display) {\n var evtX = canUseMouseOffset ? evt.offsetX : evt.layerX,\n evtY = canUseMouseOffset ? evt.offsetY : evt.layerY;\n display.cursorCanvas.style.left = (evtX + canvas.offsetLeft + display.cursorOffsetX) + \"px\";\n display.cursorCanvas.style.top = (evtY + canvas.offsetTop + display.cursorOffsetY) + \"px\";\n var x = (evtX * canvas.width / canvas.offsetWidth) | 0,\n y = (evtY * canvas.height / canvas.offsetHeight) | 0;\n // clamp to display size\n display.mouseX = Math.max(0, Math.min(display.width, x));\n display.mouseY = Math.max(0, Math.min(display.height, y));\n}\n\nfunction recordMouseEvent(what, evt, canvas, display, eventQueue, options) {\n updateMousePos(evt, canvas, display);\n if (!display.vm) return;\n var buttons = display.buttons & Squeak.Mouse_All;\n switch (what) {\n case 'mousedown':\n switch (evt.button || 0) {\n case 0: buttons = Squeak.Mouse_Red; break; // left\n case 1: buttons = Squeak.Mouse_Yellow; break; // middle\n case 2: buttons = Squeak.Mouse_Blue; break; // right\n }\n if (options.swapButtons)\n if (buttons == Squeak.Mouse_Yellow) buttons = Squeak.Mouse_Blue;\n else if (buttons == Squeak.Mouse_Blue) buttons = Squeak.Mouse_Yellow;\n break;\n case 'mousemove':\n break; // nothing more to do\n case 'mouseup':\n buttons = 0;\n break;\n }\n display.buttons = buttons | recordModifiers(evt, display);\n if (eventQueue) {\n eventQueue.push([\n Squeak.EventTypeMouse,\n evt.timeStamp, // converted to Squeak time in makeSqueakEvent()\n display.mouseX,\n display.mouseY,\n display.buttons & Squeak.Mouse_All,\n display.buttons >> 3,\n ]);\n if (display.signalInputEvent)\n display.signalInputEvent();\n }\n display.idle = 0;\n if (what == 'mouseup') {\n if (display.runFor) display.runFor(100); // maybe we catch the fullscreen flag change\n } else {\n if (display.runNow) display.runNow(); // don't wait for timeout to run\n }\n}\n\nfunction recordKeyboardEvent(key, timestamp, display, eventQueue) {\n if (!display.vm) return;\n var code = (display.buttons >> 3) << 8 | key;\n if (code === display.vm.interruptKeycode) {\n display.vm.interruptPending = true;\n } else if (eventQueue) {\n eventQueue.push([\n Squeak.EventTypeKeyboard,\n timestamp, // converted to Squeak time in makeSqueakEvent()\n key, // MacRoman\n Squeak.EventKeyChar,\n display.buttons >> 3,\n key, // Unicode\n ]);\n if (display.signalInputEvent)\n display.signalInputEvent();\n } else {\n // no event queue, queue keys the old-fashioned way\n display.keys.push(code);\n }\n display.idle = 0;\n if (display.runNow) display.runNow(); // don't wait for timeout to run\n}\n\nfunction recordDragDropEvent(type, evt, canvas, display, eventQueue) {\n if (!display.vm || !eventQueue) return;\n updateMousePos(evt, canvas, display);\n eventQueue.push([\n Squeak.EventTypeDragDropFiles,\n evt.timeStamp, // converted to Squeak time in makeSqueakEvent()\n type,\n display.mouseX,\n display.mouseY,\n display.buttons >> 3,\n display.droppedFiles.length,\n ]);\n if (display.signalInputEvent)\n display.signalInputEvent();\n}\n\nfunction fakeCmdOrCtrlKey(key, timestamp, display, eventQueue) {\n // set both Cmd and Ctrl bit, because we don't know what the image wants\n display.buttons &= ~Squeak.Keyboard_All; // remove all modifiers\n display.buttons |= Squeak.Keyboard_Cmd | Squeak.Keyboard_Ctrl;\n display.keys = []; // flush other keys\n recordKeyboardEvent(key, timestamp, display, eventQueue);\n}\n\nfunction makeSqueakEvent(evt, sqEvtBuf, sqTimeOffset) {\n sqEvtBuf[0] = evt[0];\n sqEvtBuf[1] = (evt[1] - sqTimeOffset) & Squeak.MillisecondClockMask;\n for (var i = 2; i < evt.length; i++)\n sqEvtBuf[i] = evt[i];\n}\n\nfunction createSqueakDisplay(canvas, options) {\n options = options || {};\n if (options.fullscreen) {\n document.body.style.margin = 0;\n document.body.style.backgroundColor = 'black';\n document.ontouchmove = function(evt) { evt.preventDefault(); };\n if (options.header) options.header.style.display = 'none';\n if (options.footer) options.footer.style.display = 'none';\n }\n var display = {\n context: canvas.getContext(\"2d\"),\n fullscreen: false,\n width: 0, // if 0, VM uses canvas.width\n height: 0, // if 0, VM uses canvas.height\n mouseX: 0,\n mouseY: 0,\n buttons: 0,\n keys: [],\n clipboardString: '',\n clipboardStringChanged: false,\n cursorCanvas: document.createElement(\"canvas\"),\n cursorOffsetX: 0,\n cursorOffsetY: 0,\n droppedFiles: [],\n signalInputEvent: null, // function set by VM\n // additional functions added below\n };\n setupSwapButtons(options);\n if (options.pixelated) {\n canvas.classList.add(\"pixelated\");\n display.cursorCanvas.classList.add(\"pixelated\");\n }\n\n var eventQueue = null;\n display.reset = function() {\n eventQueue = null;\n display.signalInputEvent = null;\n display.lastTick = 0;\n display.getNextEvent = function(firstEvtBuf, firstOffset) {\n // might be called from VM to get queued event\n eventQueue = []; // create queue on first call\n eventQueue.push = function(evt) {\n eventQueue.offset = Date.now() - evt[1]; // get epoch from first event\n delete eventQueue.push; // use original push from now on\n eventQueue.push(evt);\n };\n display.getNextEvent = function(evtBuf, timeOffset) {\n var evt = eventQueue.shift();\n if (evt) makeSqueakEvent(evt, evtBuf, timeOffset - eventQueue.offset);\n else evtBuf[0] = Squeak.EventTypeNone;\n };\n display.getNextEvent(firstEvtBuf, firstOffset);\n };\n };\n display.reset();\n\n var checkFullscreen = setupFullscreen(display, canvas, options);\n display.fullscreenRequest = function(fullscreen, thenDo) {\n // called from primitive to change fullscreen mode\n if (display.fullscreen != fullscreen) {\n display.fullscreen = fullscreen;\n display.resizeTodo = thenDo; // called after resizing\n display.resizeTodoTimeout = setTimeout(display.resizeDone, 1000);\n checkFullscreen();\n } else thenDo();\n };\n display.resizeDone = function() {\n clearTimeout(display.resizeTodoTimeout);\n var todo = display.resizeTodo;\n if (todo) {\n display.resizeTodo = null;\n todo();\n }\n };\n display.clear = function() {\n canvas.width = canvas.width;\n };\n display.showBanner = function(msg, style) {\n style = style || {};\n var ctx = display.context;\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.fillStyle = style.color || \"#F90\";\n ctx.font = style.font || 'bold 48px sans-serif';\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n ctx.fillText(msg, canvas.width / 2, canvas.height / 2);\n };\n display.showProgress = function(value, style) {\n style = style || {};\n var ctx = display.context,\n w = (canvas.width / 3) | 0,\n h = 24,\n x = canvas.width * 0.5 - w / 2,\n y = canvas.height * 0.5 + 2 * h;\n ctx.fillStyle = style.background || \"#000\";\n ctx.fillRect(x, y, w, h);\n ctx.lineWidth = 2;\n ctx.strokeStyle = style.color || \"#F90\";\n ctx.strokeRect(x, y, w, h);\n ctx.fillStyle = style.color || \"#F90\";\n ctx.fillRect(x, y, w * value, h);\n };\n display.executeClipboardPaste = function(text, timestamp) {\n if (!display.vm) return true;\n try {\n display.clipboardString = text;\n // simulate paste event for Squeak\n fakeCmdOrCtrlKey('v'.charCodeAt(0), timestamp, display, eventQueue);\n } catch(err) {\n console.error(\"paste error \" + err);\n }\n };\n display.executeClipboardCopy = function(key, timestamp) {\n if (!display.vm) return true;\n // simulate copy event for Squeak so it places its text in clipboard\n display.clipboardStringChanged = false;\n fakeCmdOrCtrlKey((key || 'c').charCodeAt(0), timestamp, display, eventQueue);\n var start = Date.now();\n // now interpret until Squeak has copied to the clipboard\n while (!display.clipboardStringChanged && Date.now() - start < 500)\n display.vm.interpret(20);\n if (!display.clipboardStringChanged) return;\n // got it, now copy to the system clipboard\n try {\n return display.clipboardString;\n } catch(err) {\n console.error(\"copy error \" + err);\n }\n };\n canvas.onmousedown = function(evt) {\n checkFullscreen();\n recordMouseEvent('mousedown', evt, canvas, display, eventQueue, options);\n evt.preventDefault();\n return false;\n };\n canvas.onmouseup = function(evt) {\n recordMouseEvent('mouseup', evt, canvas, display, eventQueue, options);\n checkFullscreen();\n evt.preventDefault();\n };\n canvas.onmousemove = function(evt) {\n recordMouseEvent('mousemove', evt, canvas, display, eventQueue, options);\n evt.preventDefault();\n };\n canvas.oncontextmenu = function() {\n return false;\n };\n // touch event handling\n var touch = {\n state: 'idle',\n button: 0,\n x: 0,\n y: 0,\n dist: 0,\n down: {},\n };\n function touchToMouse(evt) {\n if (evt.touches.length) {\n // average all touch positions\n touch.x = touch.y = 0;\n for (var i = 0; i < evt.touches.length; i++) {\n touch.x += evt.touches[i].pageX / evt.touches.length;\n touch.y += evt.touches[i].pageY / evt.touches.length;\n }\n }\n return {\n timeStamp: evt.timeStamp,\n button: touch.button,\n offsetX: touch.x - canvas.offsetLeft,\n offsetY: touch.y - canvas.offsetTop,\n };\n }\n function dd(ax, ay, bx, by) {var x = ax - bx, y = ay - by; return Math.sqrt(x*x + y*y);}\n function dist(a, b) {return dd(a.pageX, a.pageY, b.pageX, b.pageY);}\n function dent(n, l, t, u) { return n < l ? n + t - l : n > u ? n + t - u : t; }\n function adjustDisplay(l, t, w, h) {\n var cursorCanvas = display.cursorCanvas,\n scale = w / canvas.width;\n canvas.style.left = (l|0) + \"px\";\n canvas.style.top = (t|0) + \"px\";\n canvas.style.width = (w|0) + \"px\";\n canvas.style.height = (h|0) + \"px\";\n cursorCanvas.style.left = (l + display.cursorOffsetX + display.mouseX * scale|0) + \"px\";\n cursorCanvas.style.top = (t + display.cursorOffsetY + display.mouseY * scale|0) + \"px\";\n cursorCanvas.style.width = (cursorCanvas.width * scale|0) + \"px\";\n cursorCanvas.style.height = (cursorCanvas.height * scale|0) + \"px\";\n if (!options.pixelated) {\n if (scale >= 3) {\n canvas.classList.add(\"pixelated\");\n display.cursorCanvas.classList.add(\"pixelated\");\n } else {\n canvas.classList.remove(\"pixelated\");\n display.cursorCanvas.classList.remove(\"pixelated\");\n }\n }\n }\n // zooming/panning with two fingers\n var maxZoom = 5;\n function zoomStart(evt) {\n touch.dist = dist(evt.touches[0], evt.touches[1]);\n touch.down.x = touch.x;\n touch.down.y = touch.y;\n touch.down.dist = touch.dist;\n touch.down.left = canvas.offsetLeft;\n touch.down.top = canvas.offsetTop;\n touch.down.width = canvas.offsetWidth;\n touch.down.height = canvas.offsetHeight;\n // store original canvas bounds\n if (!touch.orig) touch.orig = {\n left: touch.down.left,\n top: touch.down.top,\n right: touch.down.left + touch.down.width,\n bottom: touch.down.top + touch.down.height,\n width: touch.down.width,\n height: touch.down.height,\n };\n }\n function zoomMove(evt) {\n if (evt.touches.length < 2) return;\n touch.dist = dist(evt.touches[0], evt.touches[1]);\n var minScale = touch.orig.width / touch.down.width,\n //nowScale = dent(touch.dist / touch.down.dist, 0.8, 1, 1.5),\n nowScale = touch.dist / touch.down.dist,\n scale = Math.min(Math.max(nowScale, minScale * 0.95), minScale * maxZoom),\n w = touch.down.width * scale,\n h = touch.orig.height * w / touch.orig.width,\n l = touch.down.left - (touch.down.x - touch.down.left) * (scale - 1) + (touch.x - touch.down.x),\n t = touch.down.top - (touch.down.y - touch.down.top) * (scale - 1) + (touch.y - touch.down.y);\n // allow to rubber-band by 20px for feedback\n l = Math.max(Math.min(l, touch.orig.left + 20), touch.orig.right - w - 20);\n t = Math.max(Math.min(t, touch.orig.top + 20), touch.orig.bottom - h - 20);\n adjustDisplay(l, t, w, h);\n }\n function zoomEnd(evt) {\n var l = canvas.offsetLeft,\n t = canvas.offsetTop,\n w = canvas.offsetWidth,\n h = canvas.offsetHeight;\n w = Math.min(Math.max(w, touch.orig.width), touch.orig.width * maxZoom);\n h = touch.orig.height * w / touch.orig.width;\n l = Math.max(Math.min(l, touch.orig.left), touch.orig.right - w);\n t = Math.max(Math.min(t, touch.orig.top), touch.orig.bottom - h);\n adjustDisplay(l, t, w, h);\n }\n // State machine to distinguish between 1st/2nd mouse button and zoom/pan:\n // * if moved, or no 2nd finger within 100ms of 1st down, start mousing\n // * if fingers moved significantly within 200ms of 2nd down, start zooming\n // * if touch ended within this time, generate click (down+up)\n // * otherwise, start mousing with 2nd button\n // When mousing, always generate a move event before down event so that\n // mouseover eventhandlers in image work better \n canvas.ontouchstart = function(evt) {\n evt.preventDefault();\n var e = touchToMouse(evt);\n for (var i = 0; i < evt.changedTouches.length; i++) {\n switch (touch.state) {\n case 'idle':\n touch.state = 'got1stFinger';\n touch.first = e;\n setTimeout(function(){\n if (touch.state !== 'got1stFinger') return;\n touch.state = 'mousing';\n touch.button = e.button = 0;\n recordMouseEvent('mousemove', e, canvas, display, eventQueue, options);\n recordMouseEvent('mousedown', e, canvas, display, eventQueue, options);\n }, 100);\n break;\n case 'got1stFinger':\n touch.state = 'got2ndFinger';\n zoomStart(evt);\n setTimeout(function(){\n if (touch.state !== 'got2ndFinger') return;\n var didMove = Math.abs(touch.down.dist - touch.dist) > 10 ||\n dd(touch.down.x, touch.down.y, touch.x, touch.y) > 10;\n if (didMove) {\n touch.state = 'zooming';\n } else {\n touch.state = 'mousing';\n touch.button = e.button = 2;\n recordMouseEvent('mousemove', e, canvas, display, eventQueue, options);\n recordMouseEvent('mousedown', e, canvas, display, eventQueue, options);\n }\n }, 200);\n break;\n }\n }\n };\n canvas.ontouchmove = function(evt) {\n evt.preventDefault();\n var e = touchToMouse(evt);\n switch (touch.state) {\n case 'got1stFinger': \n touch.state = 'mousing';\n touch.button = e.button = 0;\n recordMouseEvent('mousemove', e, canvas, display, eventQueue, options);\n recordMouseEvent('mousedown', e, canvas, display, eventQueue, options);\n break;\n case 'mousing':\n recordMouseEvent('mousemove', e, canvas, display, eventQueue, options);\n return;\n case 'got2ndFinger':\n if (evt.touches.length > 1)\n touch.dist = dist(evt.touches[0], evt.touches[1]);\n return;\n case 'zooming':\n zoomMove(evt);\n return;\n }\n };\n canvas.ontouchend = function(evt) {\n evt.preventDefault();\n checkFullscreen();\n var e = touchToMouse(evt);\n for (var i = 0; i < evt.changedTouches.length; i++) {\n switch (touch.state) {\n case 'mousing':\n if (evt.touches.length > 0) break;\n touch.state = 'idle';\n recordMouseEvent('mouseup', e, canvas, display, eventQueue, options);\n return;\n case 'got1stFinger': \n touch.state = 'idle';\n touch.button = e.button = 0;\n recordMouseEvent('mousemove', e, canvas, display, eventQueue, options);\n recordMouseEvent('mousedown', e, canvas, display, eventQueue, options);\n recordMouseEvent('mouseup', e, canvas, display, eventQueue, options);\n return;\n case 'got2ndFinger':\n touch.state = 'mousing';\n touch.button = e.button = 2;\n recordMouseEvent('mousemove', e, canvas, display, eventQueue, options);\n recordMouseEvent('mousedown', e, canvas, display, eventQueue, options);\n break;\n case 'zooming':\n if (evt.touches.length > 0) break;\n touch.state = 'idle';\n zoomEnd(evt);\n return;\n }\n }\n };\n canvas.ontouchcancel = function(evt) {\n canvas.ontouchend(evt);\n };\n // cursorCanvas shows Squeak cursor\n display.cursorCanvas.style.display = \"block\";\n display.cursorCanvas.style.position = \"absolute\";\n display.cursorCanvas.style.cursor = \"none\";\n display.cursorCanvas.style.background = \"transparent\";\n display.cursorCanvas.style.pointerEvents = \"none\";\n canvas.parentElement.appendChild(display.cursorCanvas);\n canvas.style.cursor = \"none\";\n // keyboard stuff\n document.onkeypress = function(evt) {\n if (!display.vm) return true;\n // check for ctrl-x/c/v/r\n if (/[CXVR]/.test(String.fromCharCode(evt.charCode + 64)))\n return true; // let browser handle cut/copy/paste/reload\n recordModifiers(evt, display);\n recordKeyboardEvent(evt.charCode, evt.timeStamp, display, eventQueue);\n evt.preventDefault();\n };\n document.onkeydown = function(evt) {\n checkFullscreen();\n if (!display.vm) return true;\n recordModifiers(evt, display);\n var squeakCode = ({\n 8: 8, // Backspace\n 9: 9, // Tab\n 13: 13, // Return\n 27: 27, // Escape\n 33: 11, // PageUp\n 34: 12, // PageDown\n 35: 4, // End\n 36: 1, // Home\n 37: 28, // Left\n 38: 30, // Up\n 39: 29, // Right\n 40: 31, // Down\n 45: 5, // Insert\n 46: 127, // Delete\n })[evt.keyCode];\n if (squeakCode) { // special key pressed\n recordKeyboardEvent(squeakCode, evt.timeStamp, display, eventQueue);\n return evt.preventDefault();\n }\n if ((evt.metaKey || (evt.altKey && !evt.ctrlKey))) {\n var key = evt.key; // only supported in FireFox, others have keyIdentifier\n if (!key && evt.keyIdentifier && evt.keyIdentifier.slice(0,2) == 'U+')\n key = String.fromCharCode(parseInt(evt.keyIdentifier.slice(2), 16));\n if (key && key.length == 1) {\n if (/[CXVR]/i.test(key))\n return true; // let browser handle cut/copy/paste/reload\n var code = key.charCodeAt(0);\n if (/[A-Z]/.test(key) && !evt.shiftKey) code += 32; // make lower-case\n recordKeyboardEvent(code, evt.timeStamp, display, eventQueue);\n return evt.preventDefault();\n }\n }\n };\n document.onkeyup = function(evt) {\n if (!display.vm) return true;\n recordModifiers(evt, display);\n };\n document.oncopy = function(evt, key) {\n var text = display.executeClipboardCopy(key, evt.timeStamp);\n if (typeof text === 'string') {\n evt.clipboardData.setData(\"Text\", text);\n }\n evt.preventDefault();\n };\n document.oncut = function(evt) {\n if (!display.vm) return true;\n document.oncopy(evt, 'x');\n };\n document.onpaste = function(evt) {\n var text = evt.clipboardData.getData('Text');\n display.executeClipboardPaste(text, evt.timeStamp);\n evt.preventDefault();\n };\n // do not use addEventListener, we want to replace any previous drop handler\n function dragEventHasFiles(evt) {\n for (var i = 0; i < evt.dataTransfer.types.length; i++)\n if (evt.dataTransfer.types[i] == 'Files') return true;\n return false;\n }\n document.ondragover = function(evt) {\n evt.preventDefault();\n if (!dragEventHasFiles(evt)) {\n evt.dataTransfer.dropEffect = 'none';\n } else {\n evt.dataTransfer.dropEffect = 'copy';\n recordDragDropEvent(Squeak.EventDragMove, evt, canvas, display, eventQueue);\n }\n };\n document.ondragenter = function(evt) {\n if (!dragEventHasFiles(evt)) return;\n recordDragDropEvent(Squeak.EventDragEnter, evt, canvas, display, eventQueue);\n };\n document.ondragleave = function(evt) {\n if (!dragEventHasFiles(evt)) return;\n recordDragDropEvent(Squeak.EventDragLeave, evt, canvas, display, eventQueue);\n };\n document.ondrop = function(evt) {\n evt.preventDefault();\n if (!dragEventHasFiles(evt)) return false;\n var files = [].slice.call(evt.dataTransfer.files),\n loaded = [],\n image, imageName = null;\n display.droppedFiles = [];\n files.forEach(function(f) {\n display.droppedFiles.push(f.name);\n var reader = new FileReader();\n reader.onload = function () {\n var buffer = this.result;\n Squeak.filePut(f.name, buffer);\n loaded.push(f.name);\n if (!image && /.*image$/.test(f.name) && (!display.vm || confirm(\"Run \" + f.name + \" now?\\n(cancel to use as file)\"))) {\n image = buffer;\n imageName = f.name;\n }\n if (loaded.length == files.length) { \n if (image) {\n SqueakJS.appName = imageName.slice(0, -6);\n SqueakJS.runImage(image, imageName, display, options);\n } else {\n recordDragDropEvent(Squeak.EventDragDrop, evt, canvas, display, eventQueue);\n }\n }\n };\n reader.readAsArrayBuffer(f);\n });\n return false;\n };\n window.onresize = function() {\n if (touch.orig) return; // manually resized\n // call resizeDone only if window size didn't change for 300ms\n var debounceWidth = window.innerWidth,\n debounceHeight = window.innerHeight;\n setTimeout(function() {\n if (debounceWidth == window.innerWidth && debounceHeight == window.innerHeight)\n display.resizeDone();\n }, 300);\n // if no fancy layout, don't bother\n if ((!options.header || !options.footer) && !options.fullscreen) {\n display.width = canvas.width;\n display.height = canvas.height;\n return;\n }\n // CSS won't let us do what we want so we will layout the canvas ourselves.\n var fullscreen = options.fullscreen || display.fullscreen,\n x = 0,\n y = fullscreen ? 0 : options.header.offsetTop + options.header.offsetHeight,\n w = window.innerWidth,\n h = fullscreen ? window.innerHeight : Math.max(100, options.footer.offsetTop - y),\n paddingX = 0, // padding outside canvas\n paddingY = 0;\n // above are the default values for laying out the canvas\n if (!options.fixedWidth) { // set canvas resolution\n display.width = w;\n display.height = h;\n } else { // fixed resolution and aspect ratio\n display.width = options.fixedWidth;\n display.height = options.fixedHeight;\n var wantRatio = display.width / display.height,\n haveRatio = w / h;\n if (haveRatio > wantRatio) {\n paddingX = w - Math.floor(h * wantRatio);\n } else {\n paddingY = h - Math.floor(w / wantRatio);\n }\n }\n // set size and position\n canvas.style.left = (x + Math.floor(paddingX / 2)) + \"px\";\n canvas.style.top = (y + Math.floor(paddingY / 2)) + \"px\";\n canvas.style.width = (w - paddingX) + \"px\";\n canvas.style.height = (h - paddingY) + \"px\";\n // set resolution\n if (canvas.width != display.width || canvas.height != display.height) {\n var preserveScreen = options.fixedWidth || !display.resizeTodo, // preserve unless changing fullscreen\n imgData = preserveScreen && display.context.getImageData(0, 0, canvas.width, canvas.height);\n canvas.width = display.width;\n canvas.height = display.height;\n if (imgData) display.context.putImageData(imgData, 0, 0);\n }\n // set cursor scale\n if (options.fixedWidth) {\n var cursorCanvas = display.cursorCanvas,\n scale = canvas.offsetWidth / canvas.width;\n cursorCanvas.style.width = (cursorCanvas.width * scale) + \"px\";\n cursorCanvas.style.height = (cursorCanvas.height * scale) + \"px\";\n }\n };\n window.onresize();\n return display;\n}\n\nfunction setupSpinner(vm, options) {\n var spinner = options.spinner;\n if (!spinner) return null;\n spinner.onmousedown = function(evt) {\n if (confirm(SqueakJS.appName + \" is busy. Interrupt?\"))\n vm.interruptPending = true;\n };\n return spinner.style;\n}\n\nvar spinnerAngle = 0,\n becameBusy = 0;\nfunction updateSpinner(spinner, idleMS, vm, display) {\n var busy = idleMS === 0,\n animating = vm.lastTick - display.lastTick < 500;\n if (!busy || animating) {\n spinner.display = \"none\";\n becameBusy = 0;\n } else {\n if (becameBusy === 0) {\n becameBusy = vm.lastTick;\n } else if (vm.lastTick - becameBusy > 1000) {\n spinner.display = \"block\";\n spinnerAngle = (spinnerAngle + 30) % 360;\n spinner.webkitTransform = spinner.transform = \"rotate(\" + spinnerAngle + \"deg)\";\n }\n }\n}\n\n//////////////////////////////////////////////////////////////////////////////\n// main loop\n//////////////////////////////////////////////////////////////////////////////\n\nvar loop; // holds timeout for main loop\n\nSqueakJS.runImage = function(buffer, name, display, options) {\n window.onbeforeunload = function(evt) {\n var msg = SqueakJS.appName + \" is still running\"; \n evt.returnValue = msg;\n return msg;\n };\n window.clearTimeout(loop);\n display.reset();\n display.clear();\n display.showBanner(\"Loading \" + SqueakJS.appName);\n display.showProgress(0);\n var self = this;\n window.setTimeout(function() {\n var image = new Squeak.Image(name);\n image.readFromBuffer(buffer, function() {\n display.quitFlag = false;\n var vm = new Squeak.Interpreter(image, display);\n SqueakJS.vm = vm;\n localStorage[\"squeakImageName\"] = name;\n setupSwapButtons(options);\n display.clear();\n display.showBanner(\"Starting \" + SqueakJS.appName);\n var spinner = setupSpinner(vm, options);\n function run() {\n try {\n if (display.quitFlag) self.onQuit(vm, display, options);\n else vm.interpret(50, function(ms) {\n if (ms == \"sleep\") ms = 200;\n if (spinner) updateSpinner(spinner, ms, vm, display);\n loop = window.setTimeout(run, ms);\n });\n } catch(error) {\n console.error(error);\n alert(error);\n }\n }\n display.runNow = function() {\n window.clearTimeout(loop);\n run();\n };\n display.runFor = function(milliseconds) {\n var stoptime = Date.now() + milliseconds;\n do {\n display.runNow();\n } while (Date.now() < stoptime);\n };\n run();\n },\n function readProgress(value) {display.showProgress(value);});\n }, 0);\n};\n\nfunction processOptions(options) {\n var search = window.location.hash.slice(1),\n args = search && search.split(\"&\");\n if (args) for (var i = 0; i < args.length; i++) {\n var keyAndVal = args[i].split(\"=\"),\n key = keyAndVal[0],\n val = true;\n if (keyAndVal.length > 1) {\n val = decodeURIComponent(keyAndVal.slice(1).join(\"=\"));\n if (val.match(/^(true|false|null|[0-9\"[{].*)$/))\n try { val = JSON.parse(val); } catch(e) {\n if (val[0] === \"[\") val = val.slice(1,-1).split(\",\"); // handle string arrays\n // if not JSON use string itself\n }\n }\n options[key] = val;\n }\n var root = Squeak.splitFilePath(options.root || \"/\").fullname;\n Squeak.dirCreate(root, true);\n if (!/\\/$/.test(root)) root += \"/\";\n options.root = root;\n if (options.url && options.files && !options.image)\n options.image = options.url + \"/\" + options.files[0];\n}\n\nfunction fetchTemplates(options) {\n if (options.templates) {\n if (options.templates.constructor === Array) {\n var templates = {};\n options.templates.forEach(function(path){ templates[path] = path; });\n options.templates = templates;\n }\n for (var path in options.templates)\n Squeak.fetchTemplateDir(path[0] == \"/\" ? path : options.root + path, options.templates[path]);\n }\n}\n\nSqueakJS.runSqueak = function(imageUrl, canvas, options) {\n processOptions(options);\n if (options.image) imageUrl = options.image;\n else options.image = imageUrl;\n if (imageUrl.match(/^http:/) && location.protocol.match(/^https/)) {\n location.protocol = 'http';\n return;\n }\n SqueakJS.options = options;\n SqueakJS.appName = options.appName || imageUrl.replace(/.*\\//, \"\").replace(/\\.image$/, \"\");\n Squeak.fsck();\n fetchTemplates(options);\n var display = createSqueakDisplay(canvas, options),\n imageName = Squeak.splitFilePath(imageUrl).basename,\n imageData = null,\n baseUrl = imageUrl.replace(/[^\\/]*$/, \"\"),\n files = [{url: imageUrl, name: imageName}];\n if (options.files) {\n options.files.forEach(function(f) { if (f !== imageName) files.push({url: baseUrl + f, name: f}); });\n }\n if (options.document) {\n var docName = Squeak.splitFilePath(options.document).basename;\n files.push({url: options.document, name: docName, forceDownload: options.forceDownload !== false});\n display.documentName = options.root + docName;\n }\n function getNextFile(whenAllDone) {\n if (files.length === 0) return whenAllDone(imageData);\n var file = files.shift(),\n forceDownload = options.forceDownload || file.forceDownload;\n if (!forceDownload && Squeak.fileExists(options.root + file.name)) {\n if (file.name == imageName) {\n Squeak.fileGet(options.root + file.name, function(data) {\n imageData = data;\n getNextFile(whenAllDone);\n }, function onError() {\n Squeak.fileDelete(options.root + file.name);\n files.unshift(file);\n getNextFile(whenAllDone);\n });\n } else getNextFile(whenAllDone);\n return;\n }\n display.showBanner(\"Downloading \" + file.name);\n var rq = new XMLHttpRequest();\n rq.open('GET', file.url);\n rq.responseType = 'arraybuffer';\n rq.onprogress = function(e) {\n if (e.lengthComputable) display.showProgress(e.loaded / e.total);\n };\n rq.onload = function(e) {\n if (this.status == 200) {\n if (file.name == imageName) {imageData = this.response;}\n Squeak.filePut(options.root + file.name, this.response, function() {\n getNextFile(whenAllDone);\n });\n }\n else this.onerror(this.statusText);\n };\n rq.onerror = function(e) {\n console.warn('Retrying with CORS proxy: ' + file.url);\n var proxy = options.proxy || 'https://crossorigin.me/',\n retry = new XMLHttpRequest();\n retry.open('GET', proxy + file.url);\n retry.responseType = rq.responseType;\n retry.onprogress = rq.onprogress;\n retry.onload = rq.onload;\n retry.onerror = function() {alert(\"Failed to download:\\n\" + file.url)};\n retry.send();\n };\n rq.send();\n }\n getNextFile(function whenAllDone(imageData) {\n SqueakJS.runImage(imageData, options.root + imageName, display, options);\n });\n return display;\n};\n\nSqueakJS.quitSqueak = function() {\n SqueakJS.vm.quitFlag = true;\n};\n\nSqueakJS.onQuit = function(vm, display, options) {\n window.onbeforeunload = null;\n display.vm = null;\n if (options.spinner) options.spinner.style.display = \"none\";\n if (options.onQuit) options.onQuit(vm, display, options);\n else display.showBanner(SqueakJS.appName + \" stopped.\");\n};\n\n}); // end module\n\n//////////////////////////////////////////////////////////////////////////////\n// browser stuff\n//////////////////////////////////////////////////////////////////////////////\n\nif (window.applicationCache) {\n applicationCache.addEventListener('updateready', function() {\n // use original appName from options\n var appName = window.SqueakJS && SqueakJS.options && SqueakJS.options.appName || \"SqueakJS\";\n if (confirm(appName + ' has been updated. Restart now?')) {\n window.onbeforeunload = null;\n window.location.reload();\n }\n });\n}\n","module('users.bert.SqueakJS.vm').requires().toRun(function() {\n\"use strict\"; \n/*\n * Copyright (c) 2013-2016 Bert Freudenberg\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n// shorter name for convenience\nwindow.Squeak = users.bert.SqueakJS.vm;\n\n// if in private mode set localStorage to a regular dict\nvar localStorage = window.localStorage;\ntry {\n localStorage[\"squeak-foo:\"] = \"bar\";\n if (localStorage[\"squeak-foo:\"] !== \"bar\") throw Error();\n delete localStorage[\"squeak-foo:\"];\n} catch(e) {\n console.warn(\"localStorage not available, faking\");\n localStorage = {};\n}\n\nObject.extend(Squeak,\n\"version\", {\n // system attributes\n vmVersion: \"SqueakJS 0.8.2\",\n vmBuild: \"unknown\", // replace at runtime by last-modified?\n vmPath: \"/\",\n vmFile: \"vm.js\",\n platformName: \"Web\",\n platformSubtype: \"unknown\",\n osVersion: navigator.userAgent, // might want to parse\n windowSystem: \"HTML\",\n},\n\"object header\", {\n // object headers\n HeaderTypeMask: 3,\n HeaderTypeSizeAndClass: 0, //3-word header\n HeaderTypeClass: 1, //2-word header\n HeaderTypeFree: 2, //free block\n HeaderTypeShort: 3, //1-word header\n},\n\"special objects\", {\n // Indices into SpecialObjects array\n splOb_NilObject: 0,\n splOb_FalseObject: 1,\n splOb_TrueObject: 2,\n splOb_SchedulerAssociation: 3,\n splOb_ClassBitmap: 4,\n splOb_ClassInteger: 5,\n splOb_ClassString: 6,\n splOb_ClassArray: 7,\n splOb_SmalltalkDictionary: 8,\n splOb_ClassFloat: 9,\n splOb_ClassMethodContext: 10,\n splOb_ClassBlockContext: 11,\n splOb_ClassPoint: 12,\n splOb_ClassLargePositiveInteger: 13,\n splOb_TheDisplay: 14,\n splOb_ClassMessage: 15,\n splOb_ClassCompiledMethod: 16,\n splOb_TheLowSpaceSemaphore: 17,\n splOb_ClassSemaphore: 18,\n splOb_ClassCharacter: 19,\n splOb_SelectorDoesNotUnderstand: 20,\n splOb_SelectorCannotReturn: 21,\n splOb_TheInputSemaphore: 22,\n splOb_SpecialSelectors: 23,\n splOb_CharacterTable: 24,\n splOb_SelectorMustBeBoolean: 25,\n splOb_ClassByteArray: 26,\n splOb_ClassProcess: 27,\n splOb_CompactClasses: 28,\n splOb_TheTimerSemaphore: 29,\n splOb_TheInterruptSemaphore: 30,\n splOb_FloatProto: 31,\n splOb_SelectorCannotInterpret: 34,\n splOb_MethodContextProto: 35,\n splOb_ClassBlockClosure: 36,\n splOb_BlockContextProto: 37,\n splOb_ExternalObjectsArray: 38,\n splOb_ClassPseudoContext: 39,\n splOb_ClassTranslatedMethod: 40,\n splOb_TheFinalizationSemaphore: 41,\n splOb_ClassLargeNegativeInteger: 42,\n splOb_ClassExternalAddress: 43,\n splOb_ClassExternalStructure: 44,\n splOb_ClassExternalData: 45,\n splOb_ClassExternalFunction: 46,\n splOb_ClassExternalLibrary: 47,\n splOb_SelectorAboutToReturn: 48,\n splOb_SelectorRunWithIn: 49,\n splOb_SelectorAttemptToAssign: 50,\n splOb_PrimErrTableIndex: 51,\n splOb_ClassAlien: 52,\n splOb_InvokeCallbackSelector: 53,\n splOb_ClassUnsafeAlien: 54,\n splOb_ClassWeakFinalizer: 55,\n},\n\"known classes\", {\n // Class layout:\n Class_superclass: 0,\n Class_mdict: 1,\n Class_format: 2,\n Class_instVars: null, // 3 or 4 depending on image, see instVarNames()\n Class_name: 6,\n // Context layout:\n Context_sender: 0,\n Context_instructionPointer: 1,\n Context_stackPointer: 2,\n Context_method: 3,\n Context_closure: 4,\n Context_receiver: 5,\n Context_tempFrameStart: 6,\n Context_smallFrameSize: 17,\n Context_largeFrameSize: 57,\n BlockContext_caller: 0,\n BlockContext_argumentCount: 3,\n BlockContext_initialIP: 4,\n BlockContext_home: 5,\n // Closure layout:\n Closure_outerContext: 0,\n Closure_startpc: 1,\n Closure_numArgs: 2,\n Closure_firstCopiedValue: 3,\n // Stream layout:\n Stream_array: 0,\n Stream_position: 1,\n Stream_limit: 2,\n //ProcessorScheduler layout:\n ProcSched_processLists: 0,\n ProcSched_activeProcess: 1,\n //Link layout:\n Link_nextLink: 0,\n //LinkedList layout:\n LinkedList_firstLink: 0,\n LinkedList_lastLink: 1,\n //Semaphore layout:\n Semaphore_excessSignals: 2,\n //Process layout:\n Proc_suspendedContext: 1,\n Proc_priority: 2,\n Proc_myList: 3,\n // Association layout:\n Assn_key: 0,\n Assn_value: 1,\n // MethodDict layout:\n MethodDict_array: 1,\n MethodDict_selectorStart: 2,\n // Message layout\n Message_selector: 0,\n Message_arguments: 1,\n Message_lookupClass: 2,\n // Point layout:\n Point_x: 0,\n Point_y: 1,\n // LargeInteger layout:\n LargeInteger_bytes: 0,\n LargeInteger_neg: 1,\n // BitBlt layout:\n BitBlt_dest: 0,\n BitBlt_source: 1,\n BitBlt_halftone: 2,\n BitBlt_combinationRule: 3,\n BitBlt_destX: 4,\n BitBlt_destY: 5,\n BitBlt_width: 6,\n BitBlt_height: 7,\n BitBlt_sourceX: 8,\n BitBlt_sourceY: 9,\n BitBlt_clipX: 10,\n BitBlt_clipY: 11,\n BitBlt_clipW: 12,\n BitBlt_clipH: 13,\n BitBlt_colorMap: 14,\n BitBlt_warpBase: 15,\n // Form layout:\n Form_bits: 0,\n Form_width: 1,\n Form_height: 2,\n Form_depth: 3,\n Form_offset: 4,\n // WeakFinalizationList layout:\n WeakFinalizationList_first: 0,\n // WeakFinalizerItem layout:\n WeakFinalizerItem_list: 0,\n WeakFinalizerItem_next: 1,\n},\n\"events\", {\n Mouse_Blue: 1,\n Mouse_Yellow: 2,\n Mouse_Red: 4,\n Keyboard_Shift: 8,\n Keyboard_Ctrl: 16,\n Keyboard_Alt: 32,\n Keyboard_Cmd: 64,\n Mouse_All: 1 + 2 + 4,\n Keyboard_All: 8 + 16 + 32 + 64,\n EventTypeNone: 0,\n EventTypeMouse: 1,\n EventTypeKeyboard: 2,\n EventTypeDragDropFiles: 3,\n EventKeyChar: 0,\n EventKeyDown: 1,\n EventKeyUp: 2,\n EventDragEnter: 1,\n EventDragMove: 2,\n EventDragLeave: 3,\n EventDragDrop: 4,\n},\n\"constants\", {\n MinSmallInt: -0x40000000,\n MaxSmallInt: 0x3FFFFFFF,\n NonSmallInt: -0x50000000, // non-small and neg (so non pos32 too)\n MillisecondClockMask: 0x1FFFFFFF,\n},\n\"modules\", {\n // don't clobber registered modules\n externalModules: Squeak.externalModules || {},\n registerExternalModule: function(name, module) {\n this.externalModules[name] = module;\n },\n},\n\"files\", {\n fsck: function(whenDone, dir, files, stats) {\n dir = dir || \"\";\n stats = stats || {dirs: 0, files: 0, bytes: 0, deleted: 0};\n if (!files) {\n // find existing files\n files = {};\n for (var key in localStorage) {\n var match = key.match(/squeak-file(\\.lz)?:(.*)$/);\n if (match) {files[match[2]] = true};\n }\n if (typeof indexedDB !== \"undefined\") {\n return this.dbTransaction(\"readonly\", \"fsck cursor\", function(fileStore) {\n var cursorReq = fileStore.openCursor();\n cursorReq.onsuccess = function(e) {\n var cursor = e.target.result;\n if (cursor) {\n files[cursor.key] = true;\n cursor.continue();\n } else { // done\n Squeak.fsck(whenDone, dir, files, stats);\n }\n }\n cursorReq.onerror = function(e) {\n console.error(\"fsck failed\");\n }\n });\n }\n }\n // check directories\n var entries = Squeak.dirList(dir);\n for (var name in entries) {\n var path = dir + \"/\" + name,\n isDir = entries[name][3];\n if (isDir) {\n var exists = \"squeak:\" + path in localStorage;\n if (exists) {\n Squeak.fsck(null, path, files, stats);\n stats.dirs++;\n } else {\n console.log(\"Deleting stale directory \" + path);\n Squeak.dirDelete(path);\n stats.deleted++;\n }\n } else {\n if (!files[path]) {\n console.log(\"Deleting stale file entry \" + path);\n Squeak.fileDelete(path, true);\n stats.deleted++;\n } else {\n files[path] = false; // mark as visited\n stats.files++;\n stats.bytes += entries[name][4];\n }\n }\n }\n // check orphaned files\n if (dir === \"\") {\n console.log(\"squeak fsck: \" + stats.dirs + \" directories, \" + stats.files + \" files, \" + (stats.bytes/1000000).toFixed(1) + \" MBytes\");\n var orphaned = [],\n total = 0;\n for (var path in files) {\n total++;\n if (files[path]) orphaned.push(path); // not marked visited\n }\n if (orphaned.length > 0) {\n for (var i = 0; i < orphaned.length; i++) {\n console.log(\"Deleting orphaned file \" + orphaned[i]);\n delete localStorage[\"squeak-file:\" + orphaned[i]];\n delete localStorage[\"squeak-file.lz:\" + orphaned[i]];\n stats.deleted++;\n }\n if (typeof indexedDB !== \"undefined\") {\n this.dbTransaction(\"readwrite\", \"fsck delete\", function(fileStore) {\n for (var i = 0; i < orphaned.length; i++) {\n fileStore.delete(orphaned[i]);\n };\n });\n }\n }\n if (whenDone) whenDone(stats);\n }\n },\n dbTransaction: function(mode, description, transactionFunc, completionFunc) {\n // File contents is stored in the IndexedDB named \"squeak\" in object store \"files\"\n // and directory entries in localStorage with prefix \"squeak:\"\n function fakeTransaction() {\n transactionFunc(Squeak.dbFake());\n if (completionFunc) completionFunc();\n }\n \n if (typeof indexedDB == \"undefined\") {\n return fakeTransaction();\n }\n\n function startTransaction() {\n var trans = SqueakDB.transaction(\"files\", mode),\n fileStore = trans.objectStore(\"files\");\n trans.oncomplete = function(e) { if (completionFunc) completionFunc(); }\n trans.onerror = function(e) { console.error(e.target.error.name + \": \" + description) }\n trans.onabort = function(e) {\n console.error(e.target.error.name + \": aborting \" + description);\n // fall back to local/memory storage\n transactionFunc(Squeak.dbFake());\n if (completionFunc) completionFunc();\n }\n transactionFunc(fileStore);\n };\n\n // if database connection already opened, just do transaction\n if (window.SqueakDB) return startTransaction();\n\n // otherwise, open SqueakDB first\n var openReq = indexedDB.open(\"squeak\");\n \n // UIWebView implements the interface but only returns null\n // https://stackoverflow.com/questions/27415998/indexeddb-open-returns-null-on-safari-ios-8-1-1-and-halts-execution-on-cordova\n if (!openReq) {\n return fakeTransaction();\n }\n\n openReq.onsuccess = function(e) {\n console.log(\"Opened files database.\");\n window.SqueakDB = this.result;\n SqueakDB.onversionchange = function(e) {\n delete window.SqueakDB;\n this.close();\n };\n SqueakDB.onerror = function(e) {\n console.error(\"Error accessing database: \" + e.target.error.name);\n };\n startTransaction();\n };\n openReq.onupgradeneeded = function (e) {\n // run only first time, or when version changed\n console.log(\"Creating files database\");\n var db = e.target.result;\n db.createObjectStore(\"files\");\n };\n openReq.onerror = function(e) {\n console.error(e.target.error.name + \": cannot open files database\");\n console.warn(\"Falling back to local storage\");\n fakeTransaction();\n };\n openReq.onblocked = function(e) {\n // If some other tab is loaded with the database, then it needs to be closed\n // before we can proceed upgrading the database.\n console.log(\"Database upgrade needed, but was blocked.\");\n console.warn(\"Falling back to local storage\");\n fakeTransaction();\n };\n },\n dbFake: function() {\n // indexedDB is not supported by this browser, fake it using localStorage\n // since localStorage space is severly limited, use LZString if loaded\n // see https://github.com/pieroxy/lz-string\n if (typeof SqueakDBFake == \"undefined\") {\n if (typeof indexedDB == \"undefined\")\n console.warn(\"IndexedDB not supported by this browser, using localStorage\");\n window.SqueakDBFake = {\n bigFiles: {},\n bigFileThreshold: 100000,\n get: function(filename) {\n var buffer = SqueakDBFake.bigFiles[filename];\n if (!buffer) {\n var string = localStorage[\"squeak-file:\" + filename];\n if (!string) {\n var compressed = localStorage[\"squeak-file.lz:\" + filename];\n if (compressed) {\n if (typeof LZString == \"object\") {\n string = LZString.decompressFromUTF16(compressed);\n } else {\n console.error(\"LZString not loaded: cannot decompress \" + filename);\n }\n }\n }\n if (string) {\n var bytes = new Uint8Array(string.length);\n for (var i = 0; i < bytes.length; i++)\n bytes[i] = string.charCodeAt(i) & 0xFF;\n buffer = bytes.buffer;\n }\n }\n var req = {result: buffer};\n setTimeout(function(){\n if (req.onsuccess) req.onsuccess({target: req});\n }, 0);\n return req;\n },\n put: function(buffer, filename) {\n if (buffer.byteLength > SqueakDBFake.bigFileThreshold) {\n if (!SqueakDBFake.bigFiles[filename])\n console.log(\"File \" + filename + \" (\" + buffer.byteLength + \" bytes) too large, storing in memory only\");\n SqueakDBFake.bigFiles[filename] = buffer;\n } else {\n var string = Squeak.bytesAsString(new Uint8Array(buffer));\n if (typeof LZString == \"object\") {\n var compressed = LZString.compressToUTF16(string);\n localStorage[\"squeak-file.lz:\" + filename] = compressed;\n delete localStorage[\"squeak-file:\" + filename];\n } else {\n localStorage[\"squeak-file:\" + filename] = string;\n }\n }\n var req = {};\n setTimeout(function(){if (req.onsuccess) req.onsuccess()}, 0);\n return req;\n },\n delete: function(filename) {\n delete localStorage[\"squeak-file:\" + filename];\n delete localStorage[\"squeak-file.lz:\" + filename];\n delete SqueakDBFake.bigFiles[filename];\n var req = {};\n setTimeout(function(){if (req.onsuccess) req.onsuccess()}, 0);\n return req;\n },\n openCursor: function() {\n var req = {};\n setTimeout(function(){if (req.onsuccess) req.onsuccess({target: req})}, 0);\n return req;\n },\n }\n }\n return SqueakDBFake;\n },\n fileGet: function(filepath, thenDo, errorDo) {\n if (!errorDo) errorDo = function(err) { console.log(err) };\n var path = this.splitFilePath(filepath);\n if (!path.basename) return errorDo(\"Invalid path: \" + filepath);\n // if we have been writing to memory, return that version\n if (window.SqueakDBFake && SqueakDBFake.bigFiles[path.fullname])\n return thenDo(SqueakDBFake.bigFiles[path.fullname]);\n this.dbTransaction(\"readonly\", \"get \" + filepath, function(fileStore) {\n var getReq = fileStore.get(path.fullname);\n getReq.onerror = function(e) { errorDo(e.target.error.name) };\n getReq.onsuccess = function(e) {\n if (this.result !== undefined) return thenDo(this.result);\n // might be a template\n Squeak.fetchTemplateFile(path.fullname,\n function gotTemplate(template) {thenDo(template)},\n function noTemplate() {\n // if no indexedDB then we have checked fake db already\n if (typeof indexedDB == \"undefined\") return errorDo(\"file not found: \" + path.fullname);\n // fall back on fake db, may be file is there\n var fakeReq = Squeak.dbFake().get(path.fullname);\n fakeReq.onerror = function(e) { errorDo(\"file not found: \" + path.fullname) };\n fakeReq.onsuccess = function(e) { thenDo(this.result); }\n });\n };\n });\n },\n filePut: function(filepath, contents, optSuccess) {\n // store file, return dir entry if successful\n var path = this.splitFilePath(filepath); if (!path.basename) return null;\n var directory = this.dirList(path.dirname); if (!directory) return null;\n // get or create entry\n var entry = directory[path.basename],\n now = this.totalSeconds();\n if (!entry) { // new file\n entry = [/*name*/ path.basename, /*ctime*/ now, /*mtime*/ 0, /*dir*/ false, /*size*/ 0];\n directory[path.basename] = entry;\n } else if (entry[3]) // is a directory\n return null;\n // update directory entry\n entry[2] = now; // modification time\n entry[4] = contents.byteLength || contents.length || 0;\n localStorage[\"squeak:\" + path.dirname] = JSON.stringify(directory);\n // put file contents (async)\n this.dbTransaction(\"readwrite\", \"put \" + filepath,\n function(fileStore) {\n fileStore.put(contents, path.fullname);\n },\n function transactionComplete() {\n if (optSuccess) optSuccess();\n });\n return entry;\n },\n fileDelete: function(filepath, entryOnly) {\n var path = this.splitFilePath(filepath); if (!path.basename) return false;\n var directory = this.dirList(path.dirname); if (!directory) return false;\n var entry = directory[path.basename]; if (!entry || entry[3]) return false; // not found or is a directory\n // delete entry from directory\n delete directory[path.basename];\n localStorage[\"squeak:\" + path.dirname] = JSON.stringify(directory);\n if (entryOnly) return true;\n // delete file contents (async)\n this.dbTransaction(\"readwrite\", \"delete \" + filepath, function(fileStore) {\n fileStore.delete(path.fullname);\n });\n return true;\n },\n fileRename: function(from, to) {\n var oldpath = this.splitFilePath(from); if (!oldpath.basename) return false;\n var newpath = this.splitFilePath(to); if (!newpath.basename) return false;\n var olddir = this.dirList(oldpath.dirname); if (!olddir) return false;\n var entry = olddir[oldpath.basename]; if (!entry || entry[3]) return false; // not found or is a directory\n var samedir = oldpath.dirname == newpath.dirname;\n var newdir = samedir ? olddir : this.dirList(newpath.dirname); if (!newdir) return false;\n if (newdir[newpath.basename]) return false; // exists already\n delete olddir[oldpath.basename]; // delete old entry\n entry[0] = newpath.basename; // rename entry\n newdir[newpath.basename] = entry; // add new entry\n localStorage[\"squeak:\" + newpath.dirname] = JSON.stringify(newdir);\n if (!samedir) localStorage[\"squeak:\" + oldpath.dirname] = JSON.stringify(olddir);\n // move file contents (async)\n this.fileGet(oldpath.fullname,\n function success(contents) {\n this.dbTransaction(\"readwrite\", \"rename \" + oldpath.fullname + \" to \" + newpath.fullname, function(fileStore) {\n fileStore.delete(oldpath.fullname);\n fileStore.put(contents, newpath.fullname);\n });\n }.bind(this),\n function error(msg) {\n console.log(\"File rename failed: \" + msg);\n }.bind(this));\n return true;\n },\n fileExists: function(filepath) {\n var path = this.splitFilePath(filepath); if (!path.basename) return false;\n var directory = this.dirList(path.dirname); if (!directory) return false;\n var entry = directory[path.basename]; if (!entry || entry[3]) return false; // not found or is a directory\n return true;\n },\n dirCreate: function(dirpath, withParents) {\n var path = this.splitFilePath(dirpath); if (!path.basename) return false;\n if (withParents && !localStorage[\"squeak:\" + path.dirname]) Squeak.dirCreate(path.dirname, true);\n var directory = this.dirList(path.dirname); if (!directory) return false;\n if (directory[path.basename]) return false;\n var now = this.totalSeconds(),\n entry = [/*name*/ path.basename, /*ctime*/ now, /*mtime*/ now, /*dir*/ true, /*size*/ 0];\n directory[path.basename] = entry;\n localStorage[\"squeak:\" + path.fullname] = JSON.stringify({});\n localStorage[\"squeak:\" + path.dirname] = JSON.stringify(directory);\n return true;\n },\n dirDelete: function(dirpath) {\n var path = this.splitFilePath(dirpath); if (!path.basename) return false;\n var directory = this.dirList(path.dirname); if (!directory) return false;\n if (!directory[path.basename]) return false;\n var children = this.dirList(path.fullname);\n if (!children) return false;\n for (var child in children) return false; // not empty\n // delete from parent\n delete directory[path.basename];\n localStorage[\"squeak:\" + path.dirname] = JSON.stringify(directory);\n // delete itself\n delete localStorage[\"squeak:\" + path.fullname];\n return true;\n },\n dirList: function(dirpath, includeTemplates) {\n // return directory entries or null\n var path = this.splitFilePath(dirpath),\n localEntries = localStorage[\"squeak:\" + path.fullname],\n template = includeTemplates && localStorage[\"squeak-template:\" + path.fullname];\n function addEntries(dir, entries) {\n for (var key in entries) {\n if (entries.hasOwnProperty(key)) {\n var entry = entries[key];\n dir[entry[0]] = entry;\n }\n }\n }\n if (localEntries || template) {\n // local entries override templates\n var dir = {};\n if (template) addEntries(dir, JSON.parse(template).entries);\n if (localEntries) addEntries(dir, JSON.parse(localEntries));\n return dir;\n }\n if (path.fullname == \"/\") return {};\n return null;\n },\n splitFilePath: function(filepath) {\n if (filepath[0] !== '/') filepath = '/' + filepath;\n filepath = filepath.replace(/\\/\\//ig, '/'); // replace double-slashes\n var matches = filepath.match(/(.*)\\/(.*)/),\n dirname = matches[1].length ? matches[1] : '/',\n basename = matches[2].length ? matches[2] : null;\n return {fullname: filepath, dirname: dirname, basename: basename};\n },\n flushFile: function(file) {\n if (file.modified) {\n var buffer = file.contents.buffer;\n if (buffer.byteLength !== file.size) {\n buffer = new ArrayBuffer(file.size);\n (new Uint8Array(buffer)).set(file.contents.subarray(0, file.size));\n }\n Squeak.filePut(file.name, buffer);\n // if (/SqueakDebug.log/.test(file.name)) {\n // var chars = Squeak.bytesAsString(new Uint8Array(buffer));\n // console.warn(chars.replace(/\\r/g, '\\n'));\n // }\n file.modified = false;\n }\n },\n flushAllFiles: function() {\n if (typeof SqueakFiles == 'undefined') return;\n for (var name in SqueakFiles)\n this.flushFile(SqueakFiles[name]);\n },\n closeAllFiles: function() {\n // close the files held open in memory\n Squeak.flushAllFiles();\n delete window.SqueakFiles;\n },\n fetchTemplateDir: function(path, url) {\n // Called on app startup. Fetch url/sqindex.json and\n // cache all subdirectory entries in localStorage.\n // File contents is only fetched on demand\n path = Squeak.splitFilePath(path).fullname;\n function ensureTemplateParent(template) {\n var path = Squeak.splitFilePath(template);\n if (path.dirname !== \"/\") ensureTemplateParent(path.dirname);\n var template = JSON.parse(localStorage[\"squeak-template:\" + path.dirname] || '{\"entries\": {}}');\n if (!template.entries[path.basename]) {\n var now = Squeak.totalSeconds();\n template.entries[path.basename] = [path.basename, now, now, true, 0];\n localStorage[\"squeak-template:\" + path.dirname] = JSON.stringify(template);\n }\n }\n function checkSubTemplates(path, url) {\n var template = JSON.parse(localStorage[\"squeak-template:\" + path]);\n for (var key in template.entries) {\n var entry = template.entries[key];\n if (entry[3]) Squeak.fetchTemplateDir(path + \"/\" + entry[0], url + \"/\" + entry[0]);\n };\n }\n if (localStorage[\"squeak-template:\" + path]) {\n checkSubTemplates(path, url);\n } else {\n var index = url + \"/sqindex.json\";\n var rq = new XMLHttpRequest();\n rq.open('GET', index, true);\n rq.onload = function(e) {\n if (rq.status == 200) {\n console.log(\"adding template \" + path);\n ensureTemplateParent(path);\n var entries = JSON.parse(rq.response),\n template = {url: url, entries: {}};\n for (var key in entries) {\n var entry = entries[key];\n template.entries[entry[0]] = entry;\n }\n localStorage[\"squeak-template:\" + path] = JSON.stringify(template);\n checkSubTemplates(path, url);\n }\n else rq.onerror(rq.statusText);\n };\n rq.onerror = function(e) {\n console.log(\"cannot load template index \" + index);\n }\n rq.send();\n }\n },\n fetchTemplateFile: function(path, ifFound, ifNotFound) {\n path = Squeak.splitFilePath(path);\n var template = localStorage[\"squeak-template:\" + path.dirname];\n if (!template) return ifNotFound();\n var url = JSON.parse(template).url;\n if (!url) return ifNotFound();\n url += \"/\" + path.basename;\n var rq = new XMLHttpRequest();\n rq.open(\"get\", url, true);\n rq.responseType = \"arraybuffer\";\n rq.timeout = 30000;\n rq.onreadystatechange = function() {\n if (this.readyState != this.DONE) return;\n if (this.status == 200) {\n var buffer = this.response;\n console.log(\"Got \" + buffer.byteLength + \" bytes from \" + url);\n Squeak.dirCreate(path.dirname, true);\n Squeak.filePut(path.fullname, buffer);\n ifFound(buffer);\n } else {\n alert(\"Download failed (\" + this.status + \") \" + url);\n ifNotFound();\n }\n }\n console.log(\"Fetching \" + url);\n rq.send();\n },\n},\n\"audio\", {\n startAudioOut: function() {\n if (!this.audioOutContext) {\n var ctxProto = window.AudioContext || window.webkitAudioContext\n || window.mozAudioContext || window.msAudioContext;\n this.audioOutContext = ctxProto && new ctxProto();\n }\n return this.audioOutContext;\n },\n startAudioIn: function(thenDo, errorDo) {\n if (this.audioInContext) {\n this.audioInSource.disconnect();\n return thenDo(this.audioInContext, this.audioInSource);\n }\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia\n || navigator.mozGetUserMedia || navigator.msGetUserMedia;\n if (!navigator.getUserMedia) return errorDo(\"test: audio input not supported\");\n navigator.getUserMedia({audio: true, toString: function() {return \"audio\"}},\n function onSuccess(stream) {\n var ctxProto = window.AudioContext || window.webkitAudioContext\n || window.mozAudioContext || window.msAudioContext;\n this.audioInContext = ctxProto && new ctxProto();\n this.audioInSource = this.audioInContext.createMediaStreamSource(stream);\n thenDo(this.audioInContext, this.audioInSource);\n },\n function onError() {\n errorDo(\"cannot access microphone\");\n });\n },\n stopAudio: function() {\n if (this.audioInSource)\n this.audioInSource.disconnect();\n },\n},\n\"time\", {\n Epoch: Date.UTC(1901,0,1) + (new Date()).getTimezoneOffset()*60000, // local timezone\n EpochUTC: Date.UTC(1901,0,1),\n totalSeconds: function() {\n // seconds since 1901-01-01, local time\n return Math.floor((Date.now() - Squeak.Epoch) / 1000);\n },\n},\n\"utils\", {\n bytesAsString: function(bytes) {\n var chars = [];\n for (var i = 0; i < bytes.length; i++)\n chars.push(String.fromCharCode(bytes[i]));\n return chars.join('');\n },\n});\n\n\nObject.subclass('Squeak.Image',\n'about', {\n about: function() {\n /*\n Object Format\n =============\n Each Squeak object is a Squeak.Object instance, only SmallIntegers are JS numbers.\n Instance variables/fields reference other objects directly via the \"pointers\" property.\n {\n sqClass: reference to class object\n format: format integer as in Squeak oop header\n hash: identity hash integer\n pointers: (optional) Array referencing inst vars + indexable fields\n words: (optional) Array of numbers (words)\n bytes: (optional) Array of numbers (bytes)\n float: (optional) float value if this is a Float object\n isNil: (optional) true if this is the nil object\n isTrue: (optional) true if this is the true object\n isFalse: (optional) true if this is the false object\n isFloat: (optional) true if this is a Float object\n isFloatClass: (optional) true if this is the Float class\n isCompact: (optional) true if this is a compact class\n oop: identifies this object in a snapshot (assigned on GC, new space object oops are negative)\n mark: boolean (used only during GC, otherwise false)\n nextObject: linked list of objects in old space (new space objects do not have this yet)\n }\n\n Object Table\n ============\n There is no actual object table. Instead, objects in old space are a linked list.\n New objects are only referenced by other objects' pointers, and thus can be garbage-collected\n at any time by the Javascript GC.\n\n Weak references are only finalized during a full GC.\n\n */\n }\n},\n'initializing', {\n initialize: function(name) {\n this.totalMemory = 100000000;\n this.name = name;\n this.gcCount = 0;\n this.gcTenured = 0;\n this.gcMilliseconds = 0;\n this.allocationCount = 0;\n this.oldSpaceCount = 0;\n this.newSpaceCount = 0;\n this.hasNewInstances = {};\n },\n readFromBuffer: function(arraybuffer, thenDo, progressDo) {\n console.log('squeak: reading ' + this.name + ' (' + arraybuffer.byteLength + ' bytes)');\n this.startupTime = Date.now();\n var data = new DataView(arraybuffer),\n littleEndian = false,\n pos = 0;\n var readWord = function() {\n var int = data.getUint32(pos, littleEndian);\n pos += 4;\n return int;\n };\n var readBits = function(nWords, format) {\n if (format < 5) { // pointers (do endian conversion)\n var oops = [];\n while (oops.length < nWords)\n oops.push(readWord());\n return oops;\n } else { // words (no endian conversion yet)\n var bits = new Uint32Array(arraybuffer, pos, nWords);\n pos += nWords*4;\n return bits;\n }\n };\n // read version and determine endianness\n var versions = [6501, 6502, 6504, 6505, 68000, 68002, 68003],\n version = 0,\n fileHeaderSize = 0;\n while (true) { // try all four endianness + header combos\n littleEndian = !littleEndian;\n pos = fileHeaderSize;\n version = readWord();\n if (versions.indexOf(version) >= 0) break;\n if (!littleEndian) fileHeaderSize += 512;\n if (fileHeaderSize > 512) throw Error(\"bad image version\");\n };\n this.version = version;\n var nativeFloats = [6505, 68003].indexOf(version) >= 0;\n this.hasClosures = [6504, 6505, 68002, 68003].indexOf(version) >= 0;\n if (version >= 68000) throw Error(\"64 bit images not supported yet\");\n // parse image header\n var imageHeaderSize = readWord();\n var objectMemorySize = readWord(); //first unused location in heap\n var oldBaseAddr = readWord(); //object memory base address of image\n var specialObjectsOopInt = readWord(); //oop of array of special oops\n this.lastHash = readWord(); //Should be loaded from, and saved to the image header\n var savedWindowSize = readWord();\n var fullScreenFlag = readWord();\n var extraVMMemory = readWord();\n pos += imageHeaderSize - (9 * 4); //skip to end of header\n // read objects\n var prevObj;\n var oopMap = {};\n var headerSize = fileHeaderSize + imageHeaderSize;\n while (pos < headerSize + objectMemorySize) {\n var nWords = 0;\n var classInt = 0;\n var header = readWord();\n switch (header & Squeak.HeaderTypeMask) {\n case Squeak.HeaderTypeSizeAndClass:\n nWords = header >> 2;\n classInt = readWord();\n header = readWord();\n break;\n case Squeak.HeaderTypeClass:\n classInt = header - Squeak.HeaderTypeClass;\n header = readWord();\n nWords = (header >> 2) & 63;\n break;\n case Squeak.HeaderTypeShort:\n nWords = (header >> 2) & 63;\n classInt = (header >> 12) & 31; //compact class index\n //Note classInt<32 implies compact class index\n break;\n case Squeak.HeaderTypeFree:\n throw Error(\"Unexpected free block\");\n }\n nWords--; //length includes base header which we have already read\n var oop = pos - 4 - headerSize, //0-rel byte oop of this object (base header)\n format = (header>>8) & 15,\n hash = (header>>17) & 4095,\n bits = readBits(nWords, format);\n\n var object = new Squeak.Object();\n object.initFromImage(oop, classInt, format, hash, bits);\n if (classInt < 32) object.hash |= 0x10000000; // see fixCompactOops()\n if (prevObj) prevObj.nextObject = object;\n this.oldSpaceCount++;\n prevObj = object;\n //oopMap is from old oops to actual objects\n oopMap[oldBaseAddr + oop] = object;\n }\n this.firstOldObject = oopMap[oldBaseAddr+4];\n this.lastOldObject = object;\n this.oldSpaceBytes = objectMemorySize;\n \n if (true) {\n // For debugging: re-create all objects with properly named prototypes\n var cc = oopMap[oopMap[specialObjectsOopInt].bits[Squeak.splOb_CompactClasses]].bits;\n var renamedObj = null;\n object = this.firstOldObject;\n prevObj = null;\n while (object) {\n prevObj = renamedObj;\n renamedObj = object.renameFromImage(oopMap, cc);\n if (prevObj) prevObj.nextObject = renamedObj;\n oopMap[oldBaseAddr + object.oop] = renamedObj;\n object = object.nextObject;\n }\n this.firstOldObject = oopMap[oldBaseAddr+4];\n this.lastOldObject = renamedObj;\n }\n \n //create proper objects by mapping via oopMap\n var splObs = oopMap[specialObjectsOopInt];\n var compactClasses = oopMap[splObs.bits[Squeak.splOb_CompactClasses]].bits;\n var floatClass = oopMap[splObs.bits[Squeak.splOb_ClassFloat]];\n var obj = this.firstOldObject,\n done = 0,\n self = this;\n function mapSomeObjects() {\n if (obj) {\n var stop = done + (self.oldSpaceCount / 10 | 0); // do it in 10 chunks\n while (obj && done < stop) {\n obj.installFromImage(oopMap, compactClasses, floatClass, littleEndian, nativeFloats);\n obj = obj.nextObject;\n done++;\n }\n if (progressDo) progressDo(done / self.oldSpaceCount);\n return true; // do more\n } else { // done\n self.specialObjectsArray = splObs;\n self.decorateKnownObjects();\n self.fixCompiledMethods();\n self.fixCompactOops();\n return false; // don't do more\n }\n };\n function mapSomeObjectsAsync() {\n if (mapSomeObjects()) {\n window.setTimeout(mapSomeObjectsAsync, 0);\n } else {\n if (thenDo) thenDo();\n }\n };\n if (!progressDo) {\n while (mapSomeObjects()); // do it synchronously\n if (thenDo) thenDo();\n } else {\n window.setTimeout(mapSomeObjectsAsync, 0);\n }\n },\n decorateKnownObjects: function() {\n var splObjs = this.specialObjectsArray.pointers;\n splObjs[Squeak.splOb_NilObject].isNil = true;\n splObjs[Squeak.splOb_TrueObject].isTrue = true;\n splObjs[Squeak.splOb_FalseObject].isFalse = true;\n splObjs[Squeak.splOb_ClassFloat].isFloatClass = true;\n this.compactClasses = this.specialObjectsArray.pointers[Squeak.splOb_CompactClasses].pointers;\n for (var i = 0; i < this.compactClasses.length; i++)\n if (!this.compactClasses[i].isNil)\n this.compactClasses[i].isCompact = true;\n if (!Number.prototype.sqInstName)\n Object.defineProperty(Number.prototype, 'sqInstName', {\n enumerable: false,\n value: function() { return this.toString() }\n });\n },\n fixCompactOops: function() {\n // instances of compact classes might have been saved with a non-compact header\n // fix their oops here so validation succeeds later\n var obj = this.firstOldObject,\n adjust = 0;\n while (obj) {\n var hadCompactHeader = obj.hash > 0x0FFFFFFF,\n mightBeCompact = !!obj.sqClass.isCompact;\n if (hadCompactHeader !== mightBeCompact) {\n var isCompact = obj.snapshotSize().header === 0;\n if (hadCompactHeader !== isCompact) {\n adjust += isCompact ? -4 : 4;\n }\n }\n obj.hash &= 0x0FFFFFFF;\n obj.oop += adjust;\n obj = obj.nextObject;\n }\n this.oldSpaceBytes += adjust;\n },\n fixCompiledMethods: function() {\n // in the 6501 pre-release image, some CompiledMethods\n // do not have the proper class\n if (this.version >= 6502) return;\n var obj = this.firstOldObject,\n compiledMethodClass = this.specialObjectsArray.pointers[Squeak.splOb_ClassCompiledMethod];\n while (obj) {\n if (obj.format >= 12) obj.sqClass = compiledMethodClass;\n obj = obj.nextObject;\n }\n },\n},\n'garbage collection', {\n partialGC: function() {\n // no partial GC needed since new space uses the Javascript GC\n return this.totalMemory - this.oldSpaceBytes;\n },\n fullGC: function(reason) {\n // Collect garbage and return first tenured object (to support object enumeration)\n // Old space is a linked list of objects - each object has an \"nextObject\" reference.\n // New space objects do not have that pointer, they are garbage-collected by JavaScript.\n // But they have an allocation id so the survivors can be ordered on tenure.\n // The \"nextObject\" references are created by collecting all new objects,\n // sorting them by id, and then linking them into old space.\n\n this.vm.addMessage(\"fullGC: \" + reason);\n var start = Date.now();\n var newObjects = this.markReachableObjects();\n this.removeUnmarkedOldObjects();\n this.appendToOldObjects(newObjects);\n this.finalizeWeakReferences();\n this.allocationCount += this.newSpaceCount;\n this.newSpaceCount = 0;\n this.hasNewInstances = {};\n this.gcCount++;\n this.gcMilliseconds += Date.now() - start;\n return newObjects.length > 0 ? newObjects[0] : null;\n },\n markReachableObjects: function() {\n // Visit all reachable objects and mark them.\n // Return surviving new objects\n // Contexts are handled specially: they have garbage beyond the stack pointer\n // which must not be traced, and is cleared out here\n // In weak objects, only the inst vars are traced\n this.vm.storeContextRegisters(); // update active context\n var todo = [this.specialObjectsArray, this.vm.activeContext];\n var newObjects = [];\n while (todo.length > 0) {\n var object = todo.pop();\n if (object.mark) continue; // objects are added to todo more than once\n if (!object.nextObject && object !== this.lastOldObject) // it's a new object\n newObjects.push(object);\n object.mark = true; // mark it\n if (!object.sqClass.mark) // trace class if not marked\n todo.push(object.sqClass);\n var body = object.pointers;\n if (body) { // trace all unmarked pointers\n var n = body.length;\n if (this.vm.isContext(object)) { // contexts have garbage beyond SP\n n = object.contextSizeWithStack();\n for (var i = n; i < body.length; i++) // clean up that garbage\n body[i] = this.vm.nilObj;\n } else if (object.sqClass.isWeak()) { // do not trace the indexed part in weak arrays\n n = object.sqClass.classInstSize();\n }\n for (var i = 0; i < n; i++)\n if (typeof body[i] === \"object\" && !body[i].mark) // except SmallInts\n todo.push(body[i]);\n }\n }\n // sort by oop to preserve creation order\n return newObjects.sort(function(a,b){return b.oop - a.oop});\n },\n removeUnmarkedOldObjects: function() {\n // Unlink unmarked old objects from the nextObject linked list\n // Reset marks of remaining objects, and adjust their oops\n // Set this.lastOldObject to last old object\n var removedCount = 0,\n removedBytes = 0,\n obj = this.firstOldObject;\n obj.mark = false; // we know the first object (nil) was marked\n while (true) {\n var next = obj.nextObject;\n if (!next) {// we're done\n this.lastOldObject = obj;\n this.oldSpaceBytes -= removedBytes;\n this.oldSpaceCount -= removedCount;\n return;\n }\n // if marked, continue with next object\n if (next.mark) {\n obj = next;\n obj.mark = false; // unmark for next GC\n obj.oop -= removedBytes; // compact oops\n } else { // otherwise, remove it\n var corpse = next;\n obj.nextObject = corpse.nextObject; // drop from old-space list\n corpse.oop = -(++this.newSpaceCount); // move to new-space for finalizing \n removedBytes += corpse.totalBytes();\n removedCount++;\n //console.log(\"removing \" + removedCount + \" \" + removedBytes + \" \" + corpse.totalBytes() + \" \" + corpse.toString())\n }\n }\n },\n appendToOldObjects: function(newObjects) {\n // append new objects to linked list of old objects\n // and unmark them\n var oldObj = this.lastOldObject;\n //var oldBytes = this.oldSpaceBytes;\n for (var i = 0; i < newObjects.length; i++) {\n var newObj = newObjects[i];\n newObj.mark = false;\n this.oldSpaceBytes = newObj.setAddr(this.oldSpaceBytes); // add at end of memory\n oldObj.nextObject = newObj;\n oldObj = newObj;\n //console.log(\"tenuring \" + (i+1) + \" \" + (this.oldSpaceBytes - oldBytes) + \" \" + newObj.totalBytes() + \" \" + newObj.toString());\n }\n this.lastOldObject = oldObj;\n this.oldSpaceCount += newObjects.length;\n this.gcTenured += newObjects.length;\n },\n finalizeWeakReferences: function() {\n // nil out all weak fields that did not survive GC\n var weakObj = this.firstOldObject;\n while (weakObj) {\n if (weakObj.sqClass.isWeak()) {\n var pointers = weakObj.pointers || [],\n firstWeak = weakObj.sqClass.classInstSize(),\n finalized = false;\n for (var i = firstWeak; i < pointers.length; i++) {\n if (pointers[i].oop < 0) { // ref is not in old-space\n pointers[i] = this.vm.nilObj;\n finalized = true;\n }\n }\n if (finalized) {\n this.vm.pendingFinalizationSignals++;\n if (firstWeak >= 2) { // check if weak obj is a finalizer item\n var list = weakObj.pointers[Squeak.WeakFinalizerItem_list];\n if (list.sqClass == this.vm.specialObjects[Squeak.splOb_ClassWeakFinalizer]) {\n // add weak obj as first in the finalization list\n var items = list.pointers[Squeak.WeakFinalizationList_first];\n weakObj.pointers[Squeak.WeakFinalizerItem_next] = items;\n list.pointers[Squeak.WeakFinalizationList_first] = weakObj;\n }\n }\n }\n }\n weakObj = weakObj.nextObject;\n };\n if (this.vm.pendingFinalizationSignals > 0) {\n this.vm.forceInterruptCheck(); // run finalizer asap\n }\n },\n},\n'creating', {\n registerObject: function(obj) {\n // We don't actually register the object yet, because that would prevent\n // it from being garbage-collected by the Javascript collector\n obj.oop = -(++this.newSpaceCount); // temp oops are negative. Real oop assigned when surviving GC\n // Note this is also done in loadImageSegment()\n this.lastHash = (13849 + (27181 * this.lastHash)) & 0xFFFFFFFF;\n return this.lastHash & 0xFFF;\n },\n instantiateClass: function(aClass, indexableSize, filler) {\n var newObject = new (aClass.classInstProto()); // Squeak.Object\n var hash = this.registerObject(newObject);\n newObject.initInstanceOf(aClass, indexableSize, hash, filler);\n this.hasNewInstances[aClass.oop] = true; // need GC to find all instances\n return newObject;\n },\n clone: function(object) {\n var newObject = new (object.sqClass.classInstProto()); // Squeak.Object\n var hash = this.registerObject(newObject);\n newObject.initAsClone(object, hash);\n this.hasNewInstances[newObject.sqClass.oop] = true; // need GC to find all instances\n return newObject;\n },\n},\n'operations', {\n bulkBecome: function(fromArray, toArray, twoWay, copyHash) {\n if (!fromArray)\n return !toArray;\n var n = fromArray.length;\n if (n !== toArray.length)\n return false;\n // need to visit all objects, so ensure new objects have\n // nextObject pointers and permanent oops\n if (this.newSpaceCount > 0)\n this.fullGC(\"become\"); // does update context\n else\n this.vm.storeContextRegisters(); // still need to update active context\n // obj.oop used as dict key here is why we store them\n // rather than just calculating at image snapshot time\n var mutations = {};\n for (var i = 0; i < n; i++) {\n var obj = fromArray[i];\n if (!obj.sqClass) return false; //non-objects in from array\n if (mutations[obj.oop]) return false; //repeated oops in from array\n else mutations[obj.oop] = toArray[i];\n }\n if (twoWay) for (var i = 0; i < n; i++) {\n var obj = toArray[i];\n if (!obj.sqClass) return false; //non-objects in to array\n if (mutations[obj.oop]) return false; //repeated oops in to array\n else mutations[obj.oop] = fromArray[i];\n }\n // unless copyHash is false, make hash stay with the reference, not with the object\n if (copyHash) for (var i = 0; i < n; i++) {\n if (!toArray[i].sqClass) return false; //cannot change hash of non-objects\n var fromHash = fromArray[i].hash;\n fromArray[i].hash = toArray[i].hash;\n toArray[i].hash = fromHash;\n }\n // Now, for every object...\n var obj = this.firstOldObject;\n while (obj) {\n // mutate the class\n var mut = mutations[obj.sqClass.oop];\n if (mut) obj.sqClass = mut;\n // and mutate body pointers\n var body = obj.pointers;\n if (body) for (var j = 0; j < body.length; j++) {\n mut = mutations[body[j].oop];\n if (mut) body[j] = mut;\n }\n obj = obj.nextObject;\n }\n this.vm.flushMethodCacheAfterBecome(mutations);\n return true;\n },\n objectAfter: function(obj) {\n // if this was the last old object, tenure new objects and try again\n return obj.nextObject || (this.newSpaceCount > 0 && this.fullGC(\"nextObject\"));\n },\n someInstanceOf: function(clsObj) {\n var obj = this.firstOldObject;\n while (true) {\n if (obj.sqClass === clsObj)\n return obj;\n obj = obj.nextObject || this.nextObjectWithGCFor(clsObj);\n if (!obj) return null;\n }\n },\n nextInstanceAfter: function(obj) {\n var clsObj = obj.sqClass;\n while (true) {\n obj = obj.nextObject || this.nextObjectWithGCFor(clsObj);\n if (!obj) return null;\n if (obj.sqClass === clsObj)\n return obj;\n }\n },\n nextObjectWithGCFor: function(clsObj) {\n if (this.newSpaceCount === 0 || !this.hasNewInstances[clsObj.oop]) return null;\n return this.fullGC(\"instance of \" + clsObj.className());\n },\n writeToBuffer: function() {\n var headerSize = 64,\n data = new DataView(new ArrayBuffer(headerSize + this.oldSpaceBytes)),\n pos = 0;\n var writeWord = function(word) {\n data.setUint32(pos, word);\n pos += 4;\n };\n writeWord(this.formatVersion()); // magic number\n writeWord(headerSize);\n writeWord(this.oldSpaceBytes); // end of memory\n writeWord(this.firstOldObject.addr()); // base addr (0)\n writeWord(this.objectToOop(this.specialObjectsArray));\n writeWord(this.lastHash);\n writeWord((800 << 16) + 600); // window size\n while (pos < headerSize)\n writeWord(0);\n // objects\n var obj = this.firstOldObject,\n n = 0;\n while (obj) {\n pos = obj.writeTo(data, pos, this);\n obj = obj.nextObject;\n n++;\n }\n if (pos !== data.byteLength) throw Error(\"wrong image size\");\n if (n !== this.oldSpaceCount) throw Error(\"wrong object count\");\n return data.buffer;\n },\n objectToOop: function(obj) {\n // unsigned word for use in snapshot\n if (typeof obj === \"number\")\n return obj << 1 | 1; // add tag bit\n if (obj.oop < 0) throw Error(\"temporary oop\");\n return obj.oop;\n },\n bytesLeft: function() {\n return this.totalMemory - this.oldSpaceBytes;\n },\n formatVersion: function() {\n return this.hasClosures ? 6504 : 6502;\n },\n segmentVersion: function() {\n var dnu = this.specialObjectsArray.pointers[Squeak.splOb_SelectorDoesNotUnderstand],\n wholeWord = new Uint32Array(dnu.bytes.buffer, 0, 1);\n return this.formatVersion() | (wholeWord[0] & 0xFF000000);\n },\n loadImageSegment: function(segmentWordArray, outPointerArray) {\n // The C VM creates real objects from the segment in-place. We need to create\n // real objects, which we just put in new space.\n // The code below is almost the same as readFromBuffer() ... should unify\n var data = new DataView(segmentWordArray.words.buffer),\n littleEndian = false,\n nativeFloats = false,\n pos = 0;\n var readWord = function() {\n var int = data.getUint32(pos, littleEndian);\n pos += 4;\n return int;\n };\n var readBits = function(nWords, format) {\n if (format < 5) { // pointers (do endian conversion)\n var oops = [];\n while (oops.length < nWords)\n oops.push(readWord());\n return oops;\n } else { // words (no endian conversion yet)\n var bits = new Uint32Array(data.buffer, pos, nWords);\n pos += nWords * 4;\n return bits;\n }\n };\n // check version\n var version = readWord();\n if (version & 0xFFFF !== 6502) {\n littleEndian = true; pos = 0;\n version = readWord();\n if (version & 0xFFFF !== 6502) {\n console.error(\"image segment format not supported\");\n return null;\n }\n }\n // read objects\n var segment = [],\n oopMap = {};\n while (pos < data.byteLength) {\n var nWords = 0,\n classInt = 0,\n header = readWord();\n switch (header & Squeak.HeaderTypeMask) {\n case Squeak.HeaderTypeSizeAndClass:\n nWords = header >> 2;\n classInt = readWord();\n header = readWord();\n break;\n case Squeak.HeaderTypeClass:\n classInt = header - Squeak.HeaderTypeClass;\n header = readWord();\n nWords = (header >> 2) & 63;\n break;\n case Squeak.HeaderTypeShort:\n nWords = (header >> 2) & 63;\n classInt = (header >> 12) & 31; //compact class index\n //Note classInt<32 implies compact class index\n break;\n case Squeak.HeaderTypeFree:\n throw Error(\"Unexpected free block\");\n }\n nWords--; //length includes base header which we have already read\n var oop = pos, //0-rel byte oop of this object (base header)\n format = (header>>8) & 15,\n hash = (header>>17) & 4095,\n bits = readBits(nWords, format);\n\n var object = new Squeak.Object();\n object.initFromImage(oop, classInt, format, hash, bits);\n segment.push(object);\n oopMap[oop] = object;\n }\n // add outPointers to oopMap\n for (var i = 0; i < outPointerArray.pointers.length; i++)\n oopMap[0x80000004 + i * 4] = outPointerArray.pointers[i];\n // add compactClasses to oopMap\n var compactClasses = this.specialObjectsArray.pointers[Squeak.splOb_CompactClasses].pointers,\n fakeClsOop = 0, // make up a compact-classes array with oops, as if loading an image\n compactClassOops = compactClasses.map(function(cls) {\n oopMap[--fakeClsOop] = cls; return fakeClsOop; });\n // map objects using oopMap, and assign new oops\n var roots = oopMap[8] || oopMap[12] || oopMap[16], // might be 1/2/3 header words\n floatClass = this.specialObjectsArray.pointers[Squeak.splOb_ClassFloat];\n for (var i = 0; i < segment.length; i++) {\n var obj = segment[i];\n obj.installFromImage(oopMap, compactClassOops, floatClass, littleEndian, nativeFloats);\n obj.oop = -(++this.newSpaceCount); // make this a proper new-space object (see registerObject)\n this.hasNewInstances[obj.sqClass.oop] = true; // need GC to find all instances\n }\n // don't truncate segmentWordArray now like the C VM does. It does not seem to be\n // worth the trouble of adjusting the following oops\n return roots;\n },\n});\n\nObject.subclass('Squeak.Object',\n'initialization', {\n initInstanceOf: function(aClass, indexableSize, hash, nilObj) {\n this.sqClass = aClass;\n this.hash = hash;\n var instSpec = aClass.pointers[Squeak.Class_format],\n instSize = ((instSpec>>1) & 0x3F) + ((instSpec>>10) & 0xC0) - 1; //0-255\n this.format = (instSpec>>7) & 0xF; //This is the 0-15 code\n\n if (this.format < 8) {\n if (this.format != 6) {\n if (instSize + indexableSize > 0)\n this.pointers = this.fillArray(instSize + indexableSize, nilObj);\n } else // Words\n if (indexableSize > 0)\n if (aClass.isFloatClass) {\n this.isFloat = true;\n this.float = 0.0;\n } else\n this.words = new Uint32Array(indexableSize);\n } else // Bytes\n if (indexableSize > 0) {\n // this.format |= -indexableSize & 3; //deferred to writeTo()\n this.bytes = new Uint8Array(indexableSize); //Methods require further init of pointers\n }\n\n// Definition of Squeak's format code...\n//\n// Pointers only...\n// 0 no fields\n// 1 fixed fields only (all containing pointers)\n// 2 indexable fields only (all containing pointers)\n// 3 both fixed and indexable fields (all containing pointers)\n// 4 both fixed and indexable weak fields (all containing pointers).\n// 5 unused\n// Bits only...\n// 6 indexable word fields only (no pointers)\n// 7 unused\n// 8-11 indexable byte fields only (no pointers) (low 2 bits are low 2 bits of size)\n// Pointer and bits (CompiledMethods only)...\n// 12-15 compiled methods:\n// # of literal oops specified in method header,\n// followed by indexable bytes (same interpretation of low 2 bits as above)\n },\n initAsClone: function(original, hash) {\n this.sqClass = original.sqClass;\n this.hash = hash;\n this.format = original.format;\n if (original.isFloat) {\n this.isFloat = original.isFloat;\n this.float = original.float;\n } else {\n if (original.pointers) this.pointers = original.pointers.slice(0); // copy\n if (original.words) this.words = new Uint32Array(original.words); // copy\n if (original.bytes) this.bytes = new Uint8Array(original.bytes); // copy\n }\n },\n initFromImage: function(oop, cls, fmt, hsh, data) {\n // initial creation from Image, with unmapped data\n this.oop = oop;\n this.sqClass = cls;\n this.format = fmt;\n this.hash = hsh;\n this.bits = data;\n },\n classNameFromImage: function(oopMap) {\n var name = oopMap[this.bits[Squeak.Class_name]];\n if (name && name.format >= 8 && name.format < 12) {\n var bytes = name.decodeBytes(name.bits.length, name.bits, 0, name.format & 3);\n return Squeak.bytesAsString(bytes);\n }\n return \"Class\";\n },\n renameFromImage: function(oopMap, ccArray) {\n var classObj = this.sqClass < 32 ? oopMap[ccArray[this.sqClass-1]] : oopMap[this.sqClass];\n var instProto = classObj.instProto || classObj.classInstProto(classObj.classNameFromImage(oopMap));\n if (!instProto) return this;\n var renamedObj = new instProto; // Squeak.Object\n renamedObj.oop = this.oop;\n renamedObj.sqClass = this.sqClass;\n renamedObj.format = this.format;\n renamedObj.hash = this.hash;\n renamedObj.bits = this.bits;\n return renamedObj;\n },\n installFromImage: function(oopMap, ccArray, floatClass, littleEndian, nativeFloats) {\n //Install this object by decoding format, and rectifying pointers\n var ccInt = this.sqClass;\n // map compact classes\n if ((ccInt>0) && (ccInt<32))\n this.sqClass = oopMap[ccArray[ccInt-1]];\n else\n this.sqClass = oopMap[ccInt];\n var nWords = this.bits.length;\n if (this.format < 5) {\n //Formats 0...4 -- Pointer fields\n if (nWords > 0) {\n var oops = this.bits; // endian conversion was already done\n this.pointers = this.decodePointers(nWords, oops, oopMap);\n }\n } else if (this.format >= 12) {\n //Formats 12-15 -- CompiledMethods both pointers and bits\n var methodHeader = this.decodeWords(1, this.bits, littleEndian)[0],\n numLits = (methodHeader>>10) & 255,\n oops = this.decodeWords(numLits+1, this.bits, littleEndian);\n this.pointers = this.decodePointers(numLits+1, oops, oopMap); //header+lits\n this.bytes = this.decodeBytes(nWords-(numLits+1), this.bits, numLits+1, this.format & 3);\n } else if (this.format >= 8) {\n //Formats 8..11 -- ByteArrays (and ByteStrings)\n if (nWords > 0)\n this.bytes = this.decodeBytes(nWords, this.bits, 0, this.format & 3);\n } else if (this.sqClass == floatClass) {\n //These words are actually a Float\n this.isFloat = true;\n this.float = this.decodeFloat(this.bits, littleEndian, nativeFloats);\n if (this.float == 1.3797216632888e-310) {\n if (/noFloatDecodeWorkaround/.test(window.location.hash)) {\n // floatDecode workaround disabled\n } else {\n this.constructor.prototype.decodeFloat = this.decodeFloatDeoptimized;\n this.float = this.decodeFloat(this.bits, littleEndian, nativeFloats);\n if (this.float == 1.3797216632888e-310)\n throw Error(\"Cannot deoptimize decodeFloat\");\n }\n }\n } else {\n if (nWords > 0)\n this.words = this.decodeWords(nWords, this.bits, littleEndian);\n }\n delete this.bits;\n this.mark = false; // for GC\n },\n decodePointers: function(nWords, theBits, oopMap) {\n //Convert small ints and look up object pointers in oopMap\n var ptrs = new Array(nWords);\n for (var i = 0; i < nWords; i++) {\n var oop = theBits[i];\n if ((oop & 1) === 1) { // SmallInteger\n ptrs[i] = oop >> 1;\n } else { // Object\n ptrs[i] = oopMap[oop] || 42424242;\n // when loading a context from image segment, there is\n // garbage beyond its stack pointer, resulting in the oop\n // not being found in oopMap. We just fill in an arbitrary\n // SmallInteger - it's never accessed anyway\n }\n }\n return ptrs;\n },\n decodeWords: function(nWords, theBits, littleEndian) {\n var data = new DataView(theBits.buffer, theBits.byteOffset),\n words = new Uint32Array(nWords);\n for (var i = 0; i < nWords; i++)\n words[i] = data.getUint32(i*4, littleEndian);\n return words;\n },\n decodeBytes: function (nWords, theBits, wordOffset, fmtLowBits) {\n // Adjust size for low bits and make a copy\n var nBytes = (nWords * 4) - fmtLowBits,\n wordsAsBytes = new Uint8Array(theBits.buffer, theBits.byteOffset + wordOffset * 4, nBytes),\n bytes = new Uint8Array(nBytes);\n bytes.set(wordsAsBytes);\n return bytes;\n },\n decodeFloat: function(theBits, littleEndian, nativeFloats) {\n var data = new DataView(theBits.buffer, theBits.byteOffset);\n // it's either big endian ...\n if (!littleEndian) return data.getFloat64(0, false);\n // or real little endian\n if (nativeFloats) return data.getFloat64(0, true);\n // or little endian, but with swapped words\n var buffer = new ArrayBuffer(8),\n swapped = new DataView(buffer);\n swapped.setUint32(0, data.getUint32(4));\n swapped.setUint32(4, data.getUint32(0));\n return swapped.getFloat64(0, true);\n },\n decodeFloatDeoptimized: function(theBits, littleEndian, nativeFloats) {\n var data = new DataView(theBits.buffer, theBits.byteOffset);\n // it's either big endian ...\n if (!littleEndian) return data.getFloat64(0, false);\n // or real little endian\n if (nativeFloats) return data.getFloat64(0, true);\n // or little endian, but with swapped words\n var buffer = new ArrayBuffer(8),\n swapped = new DataView(buffer);\n // wrap in function to defeat Safari's optimizer, which always\n // answers 1.3797216632888e-310 if called more than 25000 times\n (function() {\n swapped.setUint32(0, data.getUint32(4));\n swapped.setUint32(4, data.getUint32(0));\n })();\n return swapped.getFloat64(0, true);\n },\n fillArray: function(length, filler) {\n for (var array = [], i = 0; i < length; i++)\n array[i] = filler;\n return array;\n },\n},\n'printing', {\n toString: function() {\n return this.sqInstName();\n },\n bytesAsString: function() {\n if (!this.bytes) return '';\n return Squeak.bytesAsString(this.bytes);\n },\n bytesAsNumberString: function(negative) {\n if (!this.bytes) return '';\n var hex = '0123456789ABCDEF',\n digits = [],\n value = 0;\n for (var i = this.bytes.length - 1; i >= 0; i--) {\n digits.push(hex[this.bytes[i] >> 4]);\n digits.push(hex[this.bytes[i] & 15]);\n value = value * 256 + this.bytes[i];\n }\n var sign = negative ? '-' : '',\n approx = value >= 9007199254740992 ? '≈' : '';\n return sign + '16r' + digits.join('') + ' (' + approx + sign + value + 'L)';\n },\n assnKeyAsString: function() {\n return this.pointers[Squeak.Assn_key].bytesAsString();\n },\n slotNameAt: function(index) {\n // one-based index\n var instSize = this.instSize();\n if (index <= instSize)\n return this.sqClass.allInstVarNames()[index - 1];\n else\n return (index - instSize).toString();\n },\n sqInstName: function() {\n if (this.isNil) return \"nil\";\n if (this.isTrue) return \"true\";\n if (this.isFalse) return \"false\";\n if (this.isFloat) {var str = this.float.toString(); if (!/\\./.test(str)) str += '.0'; return str; }\n var className = this.sqClass.className();\n if (/ /.test(className))\n return 'the ' + className;\n switch (className) {\n case 'String':\n case 'ByteString': return \"'\" + this.bytesAsString() + \"'\";\n case 'Symbol':\n case 'ByteSymbol': return \"#\" + this.bytesAsString();\n case 'Point': return this.pointers.join(\"@\");\n case 'Rectangle': return this.pointers.join(\" corner: \");\n case 'Association':\n case 'ReadOnlyVariableBinding': return this.pointers.join(\"->\");\n case 'LargePositiveInteger': return this.bytesAsNumberString(false);\n case 'LargeNegativeInteger': return this.bytesAsNumberString(true);\n case 'Character': return \"$\" + String.fromCharCode(this.pointers[0]) + \" (\" + this.pointers[0].toString() + \")\";\n }\n return /^[aeiou]/i.test(className) ? 'an ' + className : 'a ' + className;\n },\n},\n'accessing', {\n isWords: function() {\n return this.format === 6;\n },\n isBytes: function() {\n var fmt = this.format;\n return fmt >= 8 && fmt <= 11;\n },\n isWordsOrBytes: function() {\n var fmt = this.format;\n return fmt == 6 || (fmt >= 8 && fmt <= 11);\n },\n isPointers: function() {\n return this.format <= 4;\n },\n isMethod: function() {\n return this.format >= 12;\n },\n pointersSize: function() {\n return this.pointers ? this.pointers.length : 0;\n },\n bytesSize: function() {\n return this.bytes ? this.bytes.length : 0;\n },\n wordsSize: function() {\n return this.isFloat ? 2 : this.words ? this.words.length : 0;\n },\n instSize: function() {//same as class.classInstSize, but faster from format\n if (this.format>4 || this.format==2) return 0; //indexable fields only\n if (this.format<2) return this.pointersSize(); //indexable fields only\n return this.sqClass.classInstSize(); //0-255\n },\n floatData: function() {\n var buffer = new ArrayBuffer(8);\n var data = new DataView(buffer);\n data.setFloat64(0, this.float, false);\n //1st word is data.getUint32(0, false);\n //2nd word is data.getUint32(4, false);\n return data;\n },\n wordsAsFloat32Array: function() {\n return this.float32Array\n || (this.words && (this.float32Array = new Float32Array(this.words.buffer)));\n },\n wordsAsFloat64Array: function() {\n return this.float64Array\n || (this.words && (this.float64Array = new Float64Array(this.words.buffer)));\n },\n wordsAsInt32Array: function() {\n return this.int32Array\n || (this.words && (this.int32Array = new Int32Array(this.words.buffer)));\n },\n wordsAsInt16Array: function() {\n return this.int16Array\n || (this.words && (this.int16Array = new Int16Array(this.words.buffer)));\n },\n wordsAsUint16Array: function() {\n return this.uint16Array\n || (this.words && (this.uint16Array = new Uint16Array(this.words.buffer)));\n },\n wordsAsUint8Array: function() {\n return this.uint8Array\n || (this.words && (this.uint8Array = new Uint8Array(this.words.buffer)));\n },\n wordsOrBytes: function() {\n if (this.words) return this.words;\n if (this.uint32Array) return this.uint32Array;\n if (!this.bytes) return null;\n return this.uint32Array = new Uint32Array(this.bytes.buffer, 0, this.bytes.length >> 2);\n },\n setAddr: function(addr) {\n // Move this object to addr by setting its oop. Answer address after this object.\n // Used to assign an oop for the first time when tenuring this object during GC.\n // When compacting, the oop is adjusted directly, since header size does not change.\n var words = this.snapshotSize();\n this.oop = addr + words.header * 4;\n return addr + (words.header + words.body) * 4;\n },\n snapshotSize: function() {\n // words of extra object header and body this object would take up in image snapshot\n // body size includes one header word that is always present\n var nWords =\n this.isFloat ? 2 :\n this.words ? this.words.length :\n this.pointers ? this.pointers.length : 0;\n // methods have both pointers and bytes\n if (this.bytes) nWords += (this.bytes.length + 3) >> 2;\n nWords++; // one header word always present\n var extraHeader = nWords > 63 ? 2 : this.sqClass.isCompact ? 0 : 1;\n return {header: extraHeader, body: nWords};\n },\n addr: function() { // start addr of this object in a snapshot\n return this.oop - this.snapshotSize().header * 4;\n },\n totalBytes: function() {\n // size in bytes this object would take up in image snapshot\n var words = this.snapshotSize();\n return (words.header + words.body) * 4;\n },\n writeTo: function(data, pos, image) {\n // Write 1 to 3 header words encoding type, class, and size, then instance data\n if (this.bytes) this.format |= -this.bytes.length & 3;\n var beforePos = pos,\n size = this.snapshotSize(),\n formatAndHash = ((this.format & 15) << 8) | ((this.hash & 4095) << 17);\n // write header words first\n switch (size.header) {\n case 2:\n data.setUint32(pos, size.body << 2 | Squeak.HeaderTypeSizeAndClass); pos += 4;\n data.setUint32(pos, this.sqClass.oop | Squeak.HeaderTypeSizeAndClass); pos += 4;\n data.setUint32(pos, formatAndHash | Squeak.HeaderTypeSizeAndClass); pos += 4;\n break;\n case 1:\n data.setUint32(pos, this.sqClass.oop | Squeak.HeaderTypeClass); pos += 4;\n data.setUint32(pos, formatAndHash | size.body << 2 | Squeak.HeaderTypeClass); pos += 4;\n break;\n case 0:\n var classIndex = image.compactClasses.indexOf(this.sqClass) + 1;\n data.setUint32(pos, formatAndHash | classIndex << 12 | size.body << 2 | Squeak.HeaderTypeShort); pos += 4;\n }\n // now write body, if any\n if (this.isFloat) {\n data.setFloat64(pos, this.float); pos += 8;\n } else if (this.words) {\n for (var i = 0; i < this.words.length; i++) {\n data.setUint32(pos, this.words[i]); pos += 4;\n }\n } else if (this.pointers) {\n for (var i = 0; i < this.pointers.length; i++) {\n data.setUint32(pos, image.objectToOop(this.pointers[i])); pos += 4;\n }\n }\n // no \"else\" because CompiledMethods have both pointers and bytes\n if (this.bytes) {\n for (var i = 0; i < this.bytes.length; i++)\n data.setUint8(pos++, this.bytes[i]);\n // skip to next word\n pos += -this.bytes.length & 3;\n }\n // done\n if (pos !== beforePos + this.totalBytes()) throw Error(\"written size does not match\");\n return pos;\n },\n},\n'as class', {\n classInstSize: function() {\n // this is a class, answer number of named inst vars\n var format = this.pointers[Squeak.Class_format];\n return ((format >> 10) & 0xC0) + ((format >> 1) & 0x3F) - 1;\n },\n isWeak: function() {\n var format = this.pointers[Squeak.Class_format];\n return ((format >> 7) & 0xF) == 4;\n },\n instVarNames: function() {\n var index = this.pointers.length > 12 ? 4 :\n this.pointers.length > 9 ? 3 : 4; // index changed in newer images\n return (this.pointers[index].pointers || []).map(function(each) {\n return each.bytesAsString();\n });\n },\n allInstVarNames: function() {\n var superclass = this.superclass();\n if (superclass.isNil)\n return this.instVarNames();\n else\n return superclass.allInstVarNames().concat(this.instVarNames());\n },\n superclass: function() {\n return this.pointers[0];\n },\n className: function() {\n if (!this.pointers) return \"_NOTACLASS_\";\n var name = this.pointers[Squeak.Class_name];\n if (name && name.bytes) return name.bytesAsString();\n // must be meta class\n for (var clsIndex = 5; clsIndex <= 6; clsIndex++) {\n var cls = this.pointers[clsIndex];\n if (cls && cls.pointers) {\n name = cls.pointers[Squeak.Class_name];\n if (name && name.bytes) return name.bytesAsString() + \" class\";\n }\n }\n return \"_SOMECLASS_\";\n },\n classInstProto: function(className) {\n if (this.instProto) return this.instProto;\n var proto = Squeak.Object; // in case below fails\n try {\n if (!className) className = this.className();\n var safeName = className.replace(/[^A-Za-z0-9]/g,'_');\n if (safeName === \"UndefinedObject\") safeName = \"nil\";\n else if (safeName === \"True\") safeName = \"true_\";\n else if (safeName === \"False\") safeName = \"false_\";\n else safeName = ((/^[AEIOU]/.test(safeName)) ? 'an' : 'a') + safeName;\n // fail okay if no eval()\n proto = new Function(\"return function \" + safeName + \"() {};\")();\n proto.prototype = Squeak.Object.prototype;\n } catch(e) {}\n Object.defineProperty(this, 'instProto', { value: proto });\n return proto;\n },\n},\n'as method', {\n methodHeader: function() {\n return this.pointers[0];\n },\n methodNumLits: function() {\n return this.pointers.length - 1;\n },\n methodNumArgs: function() {\n return (this.methodHeader()>>24) & 0xF;\n },\n methodPrimitiveIndex: function() {\n var primBits = (this.methodHeader()) & 0x300001FF;\n if (primBits > 0x1FF)\n return (primBits & 0x1FF) + (primBits >> 19);\n else\n return primBits;\n },\n methodClassForSuper: function() {//assn found in last literal\n var assn = this.pointers[this.methodNumLits()];\n return assn.pointers[Squeak.Assn_value];\n },\n methodNeedsLargeFrame: function() {\n return (this.methodHeader() & 0x20000) > 0;\n },\n methodAddPointers: function(headerAndLits) {\n this.pointers = headerAndLits;\n },\n methodTempCount: function() {\n return (this.methodHeader()>>18) & 63;\n },\n methodGetLiteral: function(zeroBasedIndex) {\n return this.pointers[1+zeroBasedIndex]; // step over header\n },\n methodGetSelector: function(zeroBasedIndex) {\n return this.pointers[1+zeroBasedIndex]; // step over header\n },\n methodSetLiteral: function(zeroBasedIndex, value) {\n this.pointers[1+zeroBasedIndex] = value; // step over header\n },\n},\n'as context',\n{\n contextHome: function() {\n return this.contextIsBlock() ? this.pointers[Squeak.BlockContext_home] : this;\n },\n contextIsBlock: function() {\n return typeof this.pointers[Squeak.BlockContext_argumentCount] === 'number';\n },\n contextMethod: function() {\n return this.contextHome().pointers[Squeak.Context_method];\n },\n contextSender: function() {\n return this.pointers[Squeak.Context_sender];\n },\n contextSizeWithStack: function(vm) {\n // Actual context size is inst vars + stack size. Slots beyond that may contain garbage.\n // If passing in a VM, and this is the activeContext, use the VM's current value.\n if (vm && vm.activeContext === this)\n return vm.sp + 1;\n // following is same as decodeSqueakSP() but works without vm ref\n var sp = this.pointers[Squeak.Context_stackPointer];\n return Squeak.Context_tempFrameStart + (typeof sp === \"number\" ? sp : 0);\n },\n});\n\nObject.subclass('Squeak.Interpreter',\n'initialization', {\n initialize: function(image, display) {\n console.log('squeak: initializing interpreter ' + Squeak.vmVersion);\n this.Squeak = Squeak; // store locally to avoid dynamic lookup in Lively\n this.image = image;\n this.image.vm = this;\n this.primHandler = new Squeak.Primitives(this, display);\n this.loadImageState();\n this.hackImage();\n this.initVMState();\n this.loadInitialContext();\n this.initCompiler();\n console.log('squeak: ready');\n },\n loadImageState: function() {\n this.specialObjects = this.image.specialObjectsArray.pointers;\n this.specialSelectors = this.specialObjects[Squeak.splOb_SpecialSelectors].pointers;\n this.nilObj = this.specialObjects[Squeak.splOb_NilObject];\n this.falseObj = this.specialObjects[Squeak.splOb_FalseObject];\n this.trueObj = this.specialObjects[Squeak.splOb_TrueObject];\n this.hasClosures = this.image.hasClosures;\n this.globals = this.findGlobals();\n // hack for old image that does not support Unix files\n if (!this.hasClosures && !this.findMethod(\"UnixFileDirectory class>>pathNameDelimiter\"))\n this.primHandler.emulateMac = true;\n // pre-release image has inverted colors\n if (this.image.version == 6501)\n this.primHandler.reverseDisplay = true;\n },\n initVMState: function() {\n this.byteCodeCount = 0;\n this.sendCount = 0;\n this.interruptCheckCounter = 0;\n this.interruptCheckCounterFeedBackReset = 1000;\n this.interruptChecksEveryNms = 3;\n this.nextPollTick = 0;\n this.nextWakeupTick = 0;\n this.lastTick = 0;\n this.interruptKeycode = 2094; //\"cmd-.\"\n this.interruptPending = false;\n this.pendingFinalizationSignals = 0;\n this.freeContexts = this.nilObj;\n this.freeLargeContexts = this.nilObj;\n this.reclaimableContextCount = 0;\n this.nRecycledContexts = 0;\n this.nAllocatedContexts = 0;\n this.methodCacheSize = 1024;\n this.methodCacheMask = this.methodCacheSize - 1;\n this.methodCacheRandomish = 0;\n this.methodCache = [];\n for (var i = 0; i < this.methodCacheSize; i++)\n this.methodCache[i] = {lkupClass: null, selector: null, method: null, primIndex: 0, argCount: 0, mClass: null};\n this.breakOutOfInterpreter = false;\n this.breakOutTick = 0;\n this.breakOnMethod = null; // method to break on\n this.breakOnNewMethod = false;\n this.breakOnContextChanged = false;\n this.breakOnContextReturned = null; // context to break on\n this.messages = {};\n this.startupTime = Date.now(); // base for millisecond clock\n },\n loadInitialContext: function() {\n var schedAssn = this.specialObjects[Squeak.splOb_SchedulerAssociation];\n var sched = schedAssn.pointers[Squeak.Assn_value];\n var proc = sched.pointers[Squeak.ProcSched_activeProcess];\n this.activeContext = proc.pointers[Squeak.Proc_suspendedContext];\n this.fetchContextRegisters(this.activeContext);\n this.reclaimableContextCount = 0;\n },\n findGlobals: function() {\n var smalltalk = this.specialObjects[Squeak.splOb_SmalltalkDictionary],\n smalltalkClass = smalltalk.sqClass.className();\n if (smalltalkClass === \"Association\") {\n smalltalk = smalltalk.pointers[1];\n smalltalkClass = smalltalk.sqClass.className();\n }\n if (smalltalkClass === \"SystemDictionary\")\n return smalltalk.pointers[1].pointers;\n if (smalltalkClass === \"SmalltalkImage\") {\n var globals = smalltalk.pointers[0],\n globalsClass = globals.sqClass.className();\n if (globalsClass === \"SystemDictionary\")\n return globals.pointers[1].pointers;\n if (globalsClass === \"Environment\")\n return globals.pointers[2].pointers[1].pointers\n }\n throw Error(\"cannot find global dict\");\n },\n initCompiler: function() {\n if (!Squeak.Compiler)\n return console.warn(\"Squeak.Compiler not loaded, using interpreter only\");\n // some JS environments disallow creating functions at runtime (e.g. FireFox OS apps)\n try {\n if (new Function(\"return 42\")() !== 42)\n return console.warn(\"function constructor not working, disabling JIT\");\n } catch (e) {\n return console.warn(\"disabling JIT: \" + e);\n }\n // disable JIT on slow machines, which are likely memory-limited\n var kObjPerSec = this.image.oldSpaceCount / (this.startupTime - this.image.startupTime);\n if (kObjPerSec < 10)\n return console.warn(\"Slow machine detected (loaded \" + (kObjPerSec*1000|0) + \" objects/sec), using interpreter only\");\n // compiler might decide to not handle current image\n try {\n console.log(\"squeak: initializing JIT compiler\");\n this.compiler = new Squeak.Compiler(this);\n } catch(e) {\n console.warn(\"Compiler \" + e);\n }\n },\n hackImage: function() {\n // hack methods to make work for now\n var returnSelf = 256,\n returnTrue = 257,\n returnFalse = 258,\n returnNil = 259;\n [\n // Etoys fallback for missing translation files is hugely inefficient.\n // This speeds up opening a viewer by 10x (!)\n // Remove when we added translation files.\n //{method: \"String>>translated\", primitive: returnSelf},\n //{method: \"String>>translatedInAllDomains\", primitive: returnSelf},\n // Squeak: disable syntax highlighting for speed\n //{method: \"PluggableTextMorphPlus>>useDefaultStyler\", primitive: returnSelf},\n ].forEach(function(each) {\n var m = this.findMethod(each.method);\n if (m) {\n m.pointers[0] |= each.primitive;\n console.warn(\"Hacking \" + each.method);\n }\n }, this);\n },\n},\n'interpreting', {\n interpretOne: function(singleStep) {\n if (this.method.compiled) {\n if (singleStep) {\n if (!this.compiler.enableSingleStepping(this.method)) {\n this.method.compiled = null;\n return this.interpretOne(singleStep);\n }\n this.breakNow();\n }\n this.byteCodeCount += this.method.compiled(this);\n return;\n }\n var Squeak = this.Squeak; // avoid dynamic lookup of \"Squeak\" in Lively\n var b, b2;\n this.byteCodeCount++;\n b = this.nextByte();\n if (b < 128) // Chrome only optimized up to 128 cases\n switch (b) { /* The Main Bytecode Dispatch Loop */\n\n // load receiver variable\n case 0x00: case 0x01: case 0x02: case 0x03: case 0x04: case 0x05: case 0x06: case 0x07:\n case 0x08: case 0x09: case 0x0A: case 0x0B: case 0x0C: case 0x0D: case 0x0E: case 0x0F:\n this.push(this.receiver.pointers[b&0xF]); return;\n\n // load temporary variable\n case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17:\n case 0x18: case 0x19: case 0x1A: case 0x1B: case 0x1C: case 0x1D: case 0x1E: case 0x1F:\n this.push(this.homeContext.pointers[Squeak.Context_tempFrameStart+(b&0xF)]); return;\n\n // loadLiteral\n case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27:\n case 0x28: case 0x29: case 0x2A: case 0x2B: case 0x2C: case 0x2D: case 0x2E: case 0x2F:\n case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37:\n case 0x38: case 0x39: case 0x3A: case 0x3B: case 0x3C: case 0x3D: case 0x3E: case 0x3F:\n this.push(this.method.methodGetLiteral(b&0x1F)); return;\n\n // loadLiteralIndirect\n case 0x40: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47:\n case 0x48: case 0x49: case 0x4A: case 0x4B: case 0x4C: case 0x4D: case 0x4E: case 0x4F:\n case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57:\n case 0x58: case 0x59: case 0x5A: case 0x5B: case 0x5C: case 0x5D: case 0x5E: case 0x5F:\n this.push((this.method.methodGetLiteral(b&0x1F)).pointers[Squeak.Assn_value]); return;\n\n // storeAndPop rcvr, temp\n case 0x60: case 0x61: case 0x62: case 0x63: case 0x64: case 0x65: case 0x66: case 0x67:\n this.receiver.pointers[b&7] = this.pop(); return;\n case 0x68: case 0x69: case 0x6A: case 0x6B: case 0x6C: case 0x6D: case 0x6E: case 0x6F:\n this.homeContext.pointers[Squeak.Context_tempFrameStart+(b&7)] = this.pop(); return;\n\n // Quick push\n case 0x70: this.push(this.receiver); return;\n case 0x71: this.push(this.trueObj); return;\n case 0x72: this.push(this.falseObj); return;\n case 0x73: this.push(this.nilObj); return;\n case 0x74: this.push(-1); return;\n case 0x75: this.push(0); return;\n case 0x76: this.push(1); return;\n case 0x77: this.push(2); return;\n\n // Quick return\n case 0x78: this.doReturn(this.receiver); return;\n case 0x79: this.doReturn(this.trueObj); return;\n case 0x7A: this.doReturn(this.falseObj); return;\n case 0x7B: this.doReturn(this.nilObj); return;\n case 0x7C: this.doReturn(this.pop()); return;\n case 0x7D: this.doReturn(this.pop(), this.activeContext.pointers[Squeak.BlockContext_caller]); return; // blockReturn\n case 0x7E: this.nono(); return;\n case 0x7F: this.nono(); return;\n } else switch (b) { // Chrome only optimized up to 128 cases\n // Sundry\n case 0x80: this.extendedPush(this.nextByte()); return;\n case 0x81: this.extendedStore(this.nextByte()); return;\n case 0x82: this.extendedStorePop(this.nextByte()); return;\n // singleExtendedSend\n case 0x83: b2 = this.nextByte(); this.send(this.method.methodGetSelector(b2&31), b2>>5, false); return;\n case 0x84: this.doubleExtendedDoAnything(this.nextByte()); return;\n // singleExtendedSendToSuper\n case 0x85: b2= this.nextByte(); this.send(this.method.methodGetSelector(b2&31), b2>>5, true); return;\n // secondExtendedSend\n case 0x86: b2= this.nextByte(); this.send(this.method.methodGetSelector(b2&63), b2>>6, false); return;\n case 0x87: this.pop(); return; // pop\n case 0x88: this.push(this.top()); return; // dup\n // thisContext\n case 0x89: this.push(this.exportThisContext()); return;\n\n // Closures\n case 0x8A: this.pushNewArray(this.nextByte()); // create new temp vector\n return;\n case 0x8B: this.nono(); return;\n case 0x8C: b2 = this.nextByte(); // remote push from temp vector\n this.push(this.homeContext.pointers[Squeak.Context_tempFrameStart+this.nextByte()].pointers[b2]);\n return;\n case 0x8D: b2 = this.nextByte(); // remote store into temp vector\n this.homeContext.pointers[Squeak.Context_tempFrameStart+this.nextByte()].pointers[b2] = this.top();\n return;\n case 0x8E: b2 = this.nextByte(); // remote store and pop into temp vector\n this.homeContext.pointers[Squeak.Context_tempFrameStart+this.nextByte()].pointers[b2] = this.pop();\n return;\n case 0x8F: this.pushClosureCopy(); return;\n\n // Short jmp\n case 0x90: case 0x91: case 0x92: case 0x93: case 0x94: case 0x95: case 0x96: case 0x97:\n this.pc += (b&7)+1; return;\n // Short conditional jump on false\n case 0x98: case 0x99: case 0x9A: case 0x9B: case 0x9C: case 0x9D: case 0x9E: case 0x9F:\n this.jumpIfFalse((b&7)+1); return;\n // Long jump, forward and back\n case 0xA0: case 0xA1: case 0xA2: case 0xA3: case 0xA4: case 0xA5: case 0xA6: case 0xA7:\n b2 = this.nextByte();\n this.pc += (((b&7)-4)*256 + b2);\n if ((b&7)<4) // check for process switch on backward jumps (loops)\n if (this.interruptCheckCounter-- <= 0) this.checkForInterrupts();\n return;\n // Long conditional jump on true\n case 0xA8: case 0xA9: case 0xAA: case 0xAB:\n this.jumpIfTrue((b&3)*256 + this.nextByte()); return;\n // Long conditional jump on false\n case 0xAC: case 0xAD: case 0xAE: case 0xAF:\n this.jumpIfFalse((b&3)*256 + this.nextByte()); return;\n\n // Arithmetic Ops... + - < > <= >= = ~= * / @ lshift: lxor: land: lor:\n case 0xB0: this.success = true; this.resultIsFloat = false;\n if(!this.pop2AndPushNumResult(this.stackIntOrFloat(1) + this.stackIntOrFloat(0))) this.sendSpecial(b&0xF); return; // PLUS +\n case 0xB1: this.success = true; this.resultIsFloat = false;\n if(!this.pop2AndPushNumResult(this.stackIntOrFloat(1) - this.stackIntOrFloat(0))) this.sendSpecial(b&0xF); return; // MINUS -\n case 0xB2: this.success = true;\n if(!this.pop2AndPushBoolResult(this.stackIntOrFloat(1) < this.stackIntOrFloat(0))) this.sendSpecial(b&0xF); return; // LESS <\n case 0xB3: this.success = true;\n if(!this.pop2AndPushBoolResult(this.stackIntOrFloat(1) > this.stackIntOrFloat(0))) this.sendSpecial(b&0xF); return; // GRTR >\n case 0xB4: this.success = true;\n if(!this.pop2AndPushBoolResult(this.stackIntOrFloat(1) <= this.stackIntOrFloat(0))) this.sendSpecial(b&0xF); return; // LEQ <=\n case 0xB5: this.success = true;\n if(!this.pop2AndPushBoolResult(this.stackIntOrFloat(1) >= this.stackIntOrFloat(0))) this.sendSpecial(b&0xF); return; // GEQ >=\n case 0xB6: this.success = true;\n if(!this.pop2AndPushBoolResult(this.stackIntOrFloat(1) === this.stackIntOrFloat(0))) this.sendSpecial(b&0xF); return; // EQU =\n case 0xB7: this.success = true;\n if(!this.pop2AndPushBoolResult(this.stackIntOrFloat(1) !== this.stackIntOrFloat(0))) this.sendSpecial(b&0xF); return; // NEQ ~=\n case 0xB8: this.success = true; this.resultIsFloat = false;\n if(!this.pop2AndPushNumResult(this.stackIntOrFloat(1) * this.stackIntOrFloat(0))) this.sendSpecial(b&0xF); return; // TIMES *\n case 0xB9: this.success = true;\n if(!this.pop2AndPushIntResult(this.quickDivide(this.stackInteger(1),this.stackInteger(0)))) this.sendSpecial(b&0xF); return; // Divide /\n case 0xBA: this.success = true;\n if(!this.pop2AndPushIntResult(this.mod(this.stackInteger(1),this.stackInteger(0)))) this.sendSpecial(b&0xF); return; // MOD \\\n case 0xBB: this.success = true;\n if(!this.primHandler.primitiveMakePoint(1, true)) this.sendSpecial(b&0xF); return; // MakePt int@int\n case 0xBC: this.success = true;\n if(!this.pop2AndPushIntResult(this.safeShift(this.stackInteger(1),this.stackInteger(0)))) this.sendSpecial(b&0xF); return; // bitShift:\n case 0xBD: this.success = true;\n if(!this.pop2AndPushIntResult(this.div(this.stackInteger(1),this.stackInteger(0)))) this.sendSpecial(b&0xF); return; // Divide //\n case 0xBE: this.success = true;\n if(!this.pop2AndPushIntResult(this.stackInteger(1) & this.stackInteger(0))) this.sendSpecial(b&0xF); return; // bitAnd:\n case 0xBF: this.success = true;\n if(!this.pop2AndPushIntResult(this.stackInteger(1) | this.stackInteger(0))) this.sendSpecial(b&0xF); return; // bitOr:\n\n // at:, at:put:, size, next, nextPut:, ...\n case 0xC0: case 0xC1: case 0xC2: case 0xC3: case 0xC4: case 0xC5: case 0xC6: case 0xC7:\n case 0xC8: case 0xC9: case 0xCA: case 0xCB: case 0xCC: case 0xCD: case 0xCE: case 0xCF:\n if (!this.primHandler.quickSendOther(this.receiver, b&0xF))\n this.sendSpecial((b&0xF)+16); return;\n\n // Send Literal Selector with 0, 1, and 2 args\n case 0xD0: case 0xD1: case 0xD2: case 0xD3: case 0xD4: case 0xD5: case 0xD6: case 0xD7:\n case 0xD8: case 0xD9: case 0xDA: case 0xDB: case 0xDC: case 0xDD: case 0xDE: case 0xDF:\n this.send(this.method.methodGetSelector(b&0xF), 0, false); return;\n case 0xE0: case 0xE1: case 0xE2: case 0xE3: case 0xE4: case 0xE5: case 0xE6: case 0xE7:\n case 0xE8: case 0xE9: case 0xEA: case 0xEB: case 0xEC: case 0xED: case 0xEE: case 0xEF:\n this.send(this.method.methodGetSelector(b&0xF), 1, false); return;\n case 0xF0: case 0xF1: case 0xF2: case 0xF3: case 0xF4: case 0xF5: case 0xF6: case 0xF7:\n case 0xF8: case 0xF9: case 0xFA: case 0xFB: case 0xFC: case 0xFD: case 0xFE: case 0xFF:\n this.send(this.method.methodGetSelector(b&0xF), 2, false); return;\n }\n throw Error(\"not a bytecode: \" + b);\n },\n interpret: function(forMilliseconds, thenDo) {\n // run for a couple milliseconds (but only until idle or break)\n // answer milliseconds to sleep (until next timer wakeup)\n // or 'break' if reached breakpoint\n // call thenDo with that result when done\n if (this.frozen) return 'frozen';\n this.isIdle = false;\n this.breakOutOfInterpreter = false;\n this.breakOutTick = this.primHandler.millisecondClockValue() + (forMilliseconds || 500);\n while (this.breakOutOfInterpreter === false)\n if (this.method.compiled) {\n this.byteCodeCount += this.method.compiled(this);\n } else {\n this.interpretOne();\n }\n // this is to allow 'freezing' the interpreter and restarting it asynchronously. See freeze()\n if (typeof this.breakOutOfInterpreter == \"function\")\n return this.breakOutOfInterpreter(thenDo);\n // normally, we answer regularly\n var result = this.breakOutOfInterpreter == 'break' ? 'break'\n : !this.isIdle ? 0\n : !this.nextWakeupTick ? 'sleep' // all processes waiting\n : Math.max(1, this.nextWakeupTick - this.primHandler.millisecondClockValue());\n if (thenDo) thenDo(result);\n return result;\n },\n goIdle: function() {\n // make sure we tend to pending delays\n var hadTimer = this.nextWakeupTick !== 0;\n this.forceInterruptCheck();\n this.checkForInterrupts();\n var hasTimer = this.nextWakeupTick !== 0;\n // go idle unless a timer just expired\n this.isIdle = hasTimer || !hadTimer;\n this.breakOut();\n },\n freeze: function(frozenDo) {\n // Stop the interpreter. Answer a function that can be\n // called to continue interpreting.\n // Optionally, frozenDo is called asynchronously when frozen\n var continueFunc;\n this.frozen = true;\n this.breakOutOfInterpreter = function(thenDo) {\n if (!thenDo) throw Error(\"need function to restart interpreter\");\n continueFunc = thenDo;\n return \"frozen\";\n }.bind(this);\n var unfreeze = function() {\n this.frozen = false;\n if (!continueFunc) throw Error(\"no continue function\");\n continueFunc(0); //continue without timeout\n }.bind(this);\n if (frozenDo) window.setTimeout(function(){frozenDo(unfreeze)}, 0);\n return unfreeze;\n },\n breakOut: function() {\n this.breakOutOfInterpreter = this.breakOutOfInterpreter || true; // do not overwrite break string\n },\n nextByte: function() {\n return this.methodBytes[this.pc++];\n },\n nono: function() {\n throw Error(\"Oh No!\");\n },\n forceInterruptCheck: function() {\n this.interruptCheckCounter = -1000;\n },\n checkForInterrupts: function() {\n //Check for interrupts at sends and backward jumps\n var now = this.primHandler.millisecondClockValue();\n if (now < this.lastTick) { // millisecond clock wrapped\n this.nextPollTick = now + (this.nextPollTick - this.lastTick);\n this.breakOutTick = now + (this.breakOutTick - this.lastTick);\n if (this.nextWakeupTick !== 0)\n this.nextWakeupTick = now + (this.nextWakeupTick - this.lastTick);\n }\n //Feedback logic attempts to keep interrupt response around 3ms...\n if (this.interruptCheckCounter > -100) { // only if not a forced check\n if ((now - this.lastTick) < this.interruptChecksEveryNms) { //wrapping is not a concern\n this.interruptCheckCounterFeedBackReset += 10;\n } else { // do a thousand sends even if we are too slow for 3ms\n if (this.interruptCheckCounterFeedBackReset <= 1000)\n this.interruptCheckCounterFeedBackReset = 1000;\n else\n this.interruptCheckCounterFeedBackReset -= 12;\n }\n }\n this.interruptCheckCounter = this.interruptCheckCounterFeedBackReset; //reset the interrupt check counter\n this.lastTick = now; //used to detect wraparound of millisecond clock\n // if(signalLowSpace) {\n // signalLowSpace= false; //reset flag\n // sema= getSpecialObject(Squeak.splOb_TheLowSpaceSemaphore);\n // if(sema != nilObj) synchronousSignal(sema); }\n // if(now >= nextPollTick) {\n // ioProcessEvents(); //sets interruptPending if interrupt key pressed\n // nextPollTick= now + 500; } //msecs to wait before next call to ioProcessEvents\"\n if (this.interruptPending) {\n this.interruptPending = false; //reset interrupt flag\n var sema = this.specialObjects[Squeak.splOb_TheInterruptSemaphore];\n if (!sema.isNil) this.primHandler.synchronousSignal(sema);\n }\n if ((this.nextWakeupTick !== 0) && (now >= this.nextWakeupTick)) {\n this.nextWakeupTick = 0; //reset timer interrupt\n var sema = this.specialObjects[Squeak.splOb_TheTimerSemaphore];\n if (!sema.isNil) this.primHandler.synchronousSignal(sema);\n }\n if (this.pendingFinalizationSignals > 0) { //signal any pending finalizations\n var sema = this.specialObjects[Squeak.splOb_TheFinalizationSemaphore];\n this.pendingFinalizationSignals = 0;\n if (!sema.isNil) this.primHandler.synchronousSignal(sema);\n }\n if (this.primHandler.semaphoresToSignal.length > 0)\n this.primHandler.signalExternalSemaphores(); // signal pending semaphores, if any\n // if this is a long-running do-it, compile it\n if (!this.method.compiled && this.compiler)\n this.compiler.compile(this.method);\n // have to return to web browser once in a while\n if (now >= this.breakOutTick)\n this.breakOut();\n },\n extendedPush: function(nextByte) {\n var lobits = nextByte & 63;\n switch (nextByte>>6) {\n case 0: this.push(this.receiver.pointers[lobits]);break;\n case 1: this.push(this.homeContext.pointers[Squeak.Context_tempFrameStart+lobits]); break;\n case 2: this.push(this.method.methodGetLiteral(lobits)); break;\n case 3: this.push(this.method.methodGetLiteral(lobits).pointers[Squeak.Assn_value]); break;\n }\n },\n extendedStore: function( nextByte) {\n var lobits = nextByte & 63;\n switch (nextByte>>6) {\n case 0: this.receiver.pointers[lobits] = this.top(); break;\n case 1: this.homeContext.pointers[Squeak.Context_tempFrameStart+lobits] = this.top(); break;\n case 2: this.nono(); break;\n case 3: this.method.methodGetLiteral(lobits).pointers[Squeak.Assn_value] = this.top(); break;\n }\n },\n extendedStorePop: function(nextByte) {\n var lobits = nextByte & 63;\n switch (nextByte>>6) {\n case 0: this.receiver.pointers[lobits] = this.pop(); break;\n case 1: this.homeContext.pointers[Squeak.Context_tempFrameStart+lobits] = this.pop(); break;\n case 2: this.nono(); break;\n case 3: this.method.methodGetLiteral(lobits).pointers[Squeak.Assn_value] = this.pop(); break;\n }\n },\n doubleExtendedDoAnything: function(byte2) {\n var byte3 = this.nextByte();\n switch (byte2>>5) {\n case 0: this.send(this.method.methodGetSelector(byte3), byte2&31, false); break;\n case 1: this.send(this.method.methodGetSelector(byte3), byte2&31, true); break;\n case 2: this.push(this.receiver.pointers[byte3]); break;\n case 3: this.push(this.method.methodGetLiteral(byte3)); break;\n case 4: this.push(this.method.methodGetLiteral(byte3).pointers[Squeak.Assn_value]); break;\n case 5: this.receiver.pointers[byte3] = this.top(); break;\n case 6: this.receiver.pointers[byte3] = this.pop(); break;\n case 7: this.method.methodGetLiteral(byte3).pointers[Squeak.Assn_value] = this.top(); break;\n }\n },\n jumpIfTrue: function(delta) {\n var top = this.pop();\n if (top.isTrue) {this.pc += delta; return;}\n if (top.isFalse) return;\n this.push(top); //Uh-oh it's not even a boolean (that we know of ;-). Restore stack...\n this.send(this.specialObjects[Squeak.splOb_SelectorMustBeBoolean], 0, false);\n },\n jumpIfFalse: function(delta) {\n var top = this.pop();\n if (top.isFalse) {this.pc += delta; return;}\n if (top.isTrue) return;\n this.push(top); //Uh-oh it's not even a boolean (that we know of ;-). Restore stack...\n this.send(this.specialObjects[Squeak.splOb_SelectorMustBeBoolean], 0, false);\n },\n sendSpecial: function(lobits) {\n this.send(this.specialSelectors[lobits*2],\n this.specialSelectors[(lobits*2)+1],\n false); //specialSelectors is {...sel,nArgs,sel,nArgs,...)\n },\n},\n'closures', {\n pushNewArray: function(nextByte) {\n var popValues = nextByte > 127,\n count = nextByte & 127,\n array = this.instantiateClass(this.specialObjects[Squeak.splOb_ClassArray], count);\n if (popValues) {\n for (var i = 0; i < count; i++)\n array.pointers[i] = this.stackValue(count - i - 1);\n this.popN(count);\n }\n this.push(array);\n },\n pushClosureCopy: function() {\n // The compiler has pushed the values to be copied, if any. Find numArgs and numCopied in the byte following.\n // Create a Closure with space for the copiedValues and pop numCopied values off the stack into the closure.\n // Set numArgs as specified, and set startpc to the pc following the block size and jump over that code.\n var numArgsNumCopied = this.nextByte(),\n numArgs = numArgsNumCopied & 0xF,\n numCopied = numArgsNumCopied >> 4,\n blockSizeHigh = this.nextByte(),\n blockSize = blockSizeHigh * 256 + this.nextByte(),\n initialPC = this.encodeSqueakPC(this.pc, this.method),\n closure = this.newClosure(numArgs, initialPC, numCopied);\n closure.pointers[Squeak.Closure_outerContext] = this.activeContext;\n this.reclaimableContextCount = 0; // The closure refers to thisContext so it can't be reclaimed\n if (numCopied > 0) {\n for (var i = 0; i < numCopied; i++)\n closure.pointers[Squeak.Closure_firstCopiedValue + i] = this.stackValue(numCopied - i - 1);\n this.popN(numCopied);\n }\n this.pc += blockSize;\n this.push(closure);\n },\n newClosure: function(numArgs, initialPC, numCopied) {\n var closure = this.instantiateClass(this.specialObjects[Squeak.splOb_ClassBlockClosure], numCopied);\n closure.pointers[Squeak.Closure_startpc] = initialPC;\n closure.pointers[Squeak.Closure_numArgs] = numArgs;\n return closure;\n },\n},\n'sending', {\n send: function(selector, argCount, doSuper) {\n var newRcvr = this.stackValue(argCount);\n var lookupClass = this.getClass(newRcvr);\n if (doSuper) {\n lookupClass = this.method.methodClassForSuper();\n lookupClass = lookupClass.pointers[Squeak.Class_superclass];\n }\n var entry = this.findSelectorInClass(selector, argCount, lookupClass);\n if (entry.primIndex) {\n //note details for verification of at/atput primitives\n this.verifyAtSelector = selector;\n this.verifyAtClass = lookupClass;\n }\n this.executeNewMethod(newRcvr, entry.method, entry.argCount, entry.primIndex, entry.mClass, selector);\n },\n sendAsPrimitiveFailure: function(rcvr, method, argCount) {\n this.executeNewMethod(rcvr, method, argCount, 0);\n },\n findSelectorInClass: function(selector, argCount, startingClass) {\n var cacheEntry = this.findMethodCacheEntry(selector, startingClass);\n if (cacheEntry.method) return cacheEntry; // Found it in the method cache\n var currentClass = startingClass;\n var mDict;\n while (!currentClass.isNil) {\n mDict = currentClass.pointers[Squeak.Class_mdict];\n if (mDict.isNil) {\n // MethodDict pointer is nil (hopefully due a swapped out stub)\n // -- send #cannotInterpret:\n var cantInterpSel = this.specialObjects[Squeak.splOb_SelectorCannotInterpret],\n cantInterpMsg = this.createActualMessage(selector, argCount, startingClass);\n this.popNandPush(argCount, cantInterpMsg);\n return this.findSelectorInClass(cantInterpSel, 1, currentClass.superclass());\n }\n var newMethod = this.lookupSelectorInDict(mDict, selector);\n if (!newMethod.isNil) {\n this.currentSelector = selector;\n this.currentLookupClass = startingClass;\n //if method is not actually a CompiledMethod, invoke primitiveInvokeObjectAsMethod (248) instead\n cacheEntry.method = newMethod;\n cacheEntry.primIndex = newMethod.isMethod() ? newMethod.methodPrimitiveIndex() : 248;\n cacheEntry.argCount = argCount;\n cacheEntry.mClass = currentClass;\n return cacheEntry;\n }\n currentClass = currentClass.superclass();\n }\n //Cound not find a normal message -- send #doesNotUnderstand:\n var dnuSel = this.specialObjects[Squeak.splOb_SelectorDoesNotUnderstand];\n if (selector === dnuSel) // Cannot find #doesNotUnderstand: -- unrecoverable error.\n throw Error(\"Recursive not understood error encountered\");\n var dnuMsg = this.createActualMessage(selector, argCount, startingClass); //The argument to doesNotUnderstand:\n this.popNandPush(argCount, dnuMsg);\n return this.findSelectorInClass(dnuSel, 1, startingClass);\n },\n lookupSelectorInDict: function(mDict, messageSelector) {\n //Returns a method or nilObject\n var dictSize = mDict.pointersSize();\n var mask = (dictSize - Squeak.MethodDict_selectorStart) - 1;\n var index = (mask & messageSelector.hash) + Squeak.MethodDict_selectorStart;\n // If there are no nils (should always be), then stop looping on second wrap.\n var hasWrapped = false;\n while (true) {\n var nextSelector = mDict.pointers[index];\n if (nextSelector === messageSelector) {\n var methArray = mDict.pointers[Squeak.MethodDict_array];\n return methArray.pointers[index - Squeak.MethodDict_selectorStart];\n }\n if (nextSelector.isNil) return this.nilObj;\n if (++index === dictSize) {\n if (hasWrapped) return this.nilObj;\n index = Squeak.MethodDict_selectorStart;\n hasWrapped = true;\n }\n }\n },\n executeNewMethod: function(newRcvr, newMethod, argumentCount, primitiveIndex, optClass, optSel) {\n this.sendCount++;\n if (newMethod === this.breakOnMethod) this.breakNow(\"executing method \" + this.printMethod(newMethod, optClass, optSel));\n if (this.logSends) console.log(this.sendCount + ' ' + this.printMethod(newMethod, optClass, optSel));\n if (this.breakOnContextChanged) {\n this.breakOnContextChanged = false;\n this.breakNow();\n }\n if (primitiveIndex > 0)\n if (this.tryPrimitive(primitiveIndex, argumentCount, newMethod))\n return; //Primitive succeeded -- end of story\n var newContext = this.allocateOrRecycleContext(newMethod.methodNeedsLargeFrame());\n var tempCount = newMethod.methodTempCount();\n var newPC = 0; // direct zero-based index into byte codes\n var newSP = Squeak.Context_tempFrameStart + tempCount - 1; // direct zero-based index into context pointers\n newContext.pointers[Squeak.Context_method] = newMethod;\n //Following store is in case we alloc without init; all other fields get stored\n newContext.pointers[Squeak.BlockContext_initialIP] = this.nilObj;\n newContext.pointers[Squeak.Context_sender] = this.activeContext;\n //Copy receiver and args to new context\n //Note this statement relies on the receiver slot being contiguous with args...\n this.arrayCopy(this.activeContext.pointers, this.sp-argumentCount, newContext.pointers, Squeak.Context_tempFrameStart-1, argumentCount+1);\n //...and fill the remaining temps with nil\n this.arrayFill(newContext.pointers, Squeak.Context_tempFrameStart+argumentCount, Squeak.Context_tempFrameStart+tempCount, this.nilObj);\n this.popN(argumentCount+1);\n this.reclaimableContextCount++;\n this.storeContextRegisters();\n /////// Woosh //////\n this.activeContext = newContext; //We're off and running...\n //Following are more efficient than fetchContextRegisters() in newActiveContext()\n this.homeContext = newContext;\n this.method = newMethod;\n this.methodBytes = newMethod.bytes;\n this.pc = newPC;\n this.sp = newSP;\n this.storeContextRegisters(); // not really necessary, I claim\n this.receiver = newContext.pointers[Squeak.Context_receiver];\n if (this.receiver !== newRcvr)\n throw Error(\"receivers don't match\");\n if (!newMethod.compiled && this.compiler)\n this.compiler.compile(newMethod, optClass, optSel);\n // check for process switch on full method activation\n if (this.interruptCheckCounter-- <= 0) this.checkForInterrupts();\n },\n doReturn: function(returnValue, targetContext) {\n // get sender from block home or closure's outerContext\n if (!targetContext) {\n var ctx = this.homeContext;\n if (this.hasClosures) {\n var closure;\n while (!(closure = ctx.pointers[Squeak.Context_closure]).isNil)\n ctx = closure.pointers[Squeak.Closure_outerContext];\n }\n targetContext = ctx.pointers[Squeak.Context_sender];\n }\n if (targetContext.isNil || targetContext.pointers[Squeak.Context_instructionPointer].isNil)\n return this.cannotReturn(returnValue);\n // search up stack for unwind\n var thisContext = this.activeContext.pointers[Squeak.Context_sender];\n while (thisContext !== targetContext) {\n if (thisContext.isNil)\n return this.cannotReturn(returnValue);\n if (this.isUnwindMarked(thisContext))\n return this.aboutToReturnThrough(returnValue, thisContext);\n thisContext = thisContext.pointers[Squeak.Context_sender];\n }\n // no unwind to worry about, just peel back the stack (usually just to sender)\n var nextContext;\n thisContext = this.activeContext;\n while (thisContext !== targetContext) {\n if (this.breakOnContextReturned === thisContext) {\n this.breakOnContextReturned = null;\n this.breakNow();\n }\n nextContext = thisContext.pointers[Squeak.Context_sender];\n thisContext.pointers[Squeak.Context_sender] = this.nilObj;\n thisContext.pointers[Squeak.Context_instructionPointer] = this.nilObj;\n if (this.reclaimableContextCount > 0) {\n this.reclaimableContextCount--;\n this.recycleIfPossible(thisContext);\n }\n thisContext = nextContext;\n }\n this.activeContext = thisContext;\n this.fetchContextRegisters(this.activeContext);\n this.push(returnValue);\n if (this.breakOnContextChanged) {\n this.breakOnContextChanged = false;\n this.breakNow();\n }\n },\n aboutToReturnThrough: function(resultObj, aContext) {\n this.push(this.exportThisContext());\n this.push(resultObj);\n this.push(aContext);\n var aboutToReturnSel = this.specialObjects[Squeak.splOb_SelectorAboutToReturn];\n this.send(aboutToReturnSel, 2);\n },\n cannotReturn: function(resultObj) {\n this.push(this.exportThisContext());\n this.push(resultObj);\n var cannotReturnSel = this.specialObjects[Squeak.splOb_SelectorCannotReturn];\n this.send(cannotReturnSel, 1);\n },\n tryPrimitive: function(primIndex, argCount, newMethod) {\n if ((primIndex > 255) && (primIndex < 520)) {\n if (primIndex >= 264) {//return instvars\n this.popNandPush(1, this.top().pointers[primIndex - 264]);\n return true;\n }\n switch (primIndex) {\n case 256: //return self\n return true;\n case 257: this.popNandPush(1, this.trueObj); //return true\n return true;\n case 258: this.popNandPush(1, this.falseObj); //return false\n return true;\n case 259: this.popNandPush(1, this.nilObj); //return nil\n return true;\n }\n this.popNandPush(1, primIndex - 261); //return -1...2\n return true;\n }\n var success = this.primHandler.doPrimitive(primIndex, argCount, newMethod);\n return success;\n },\n createActualMessage: function(selector, argCount, cls) {\n //Bundle up receiver, args and selector as a messageObject\n var message = this.instantiateClass(this.specialObjects[Squeak.splOb_ClassMessage], 0);\n var argArray = this.instantiateClass(this.specialObjects[Squeak.splOb_ClassArray], argCount);\n this.arrayCopy(this.activeContext.pointers, this.sp-argCount+1, argArray.pointers, 0, argCount); //copy args from stack\n message.pointers[Squeak.Message_selector] = selector;\n message.pointers[Squeak.Message_arguments] = argArray;\n if (message.pointers.length > Squeak.Message_lookupClass) //Early versions don't have lookupClass\n message.pointers[Squeak.Message_lookupClass] = cls;\n return message;\n },\n primitivePerform: function(argCount) {\n var selector = this.stackValue(argCount-1);\n var rcvr = this.stackValue(argCount);\n // NOTE: findNewMethodInClass may fail and be converted to #doesNotUnderstand:,\n // (Whoah) so we must slide args down on the stack now, so that would work\n var trueArgCount = argCount - 1;\n var selectorIndex = this.sp - trueArgCount;\n var stack = this.activeContext.pointers; // slide eveything down...\n this.arrayCopy(stack, selectorIndex+1, stack, selectorIndex, trueArgCount);\n this.sp--; // adjust sp accordingly\n var entry = this.findSelectorInClass(selector, trueArgCount, this.getClass(rcvr));\n this.executeNewMethod(rcvr, entry.method, entry.argCount, entry.primIndex, entry.mClass, selector);\n return true;\n },\n primitivePerformWithArgs: function(argCount, supered) {\n var rcvr = this.stackValue(argCount);\n var selector = this.stackValue(argCount - 1);\n var args = this.stackValue(argCount - 2);\n if (args.sqClass !== this.specialObjects[Squeak.splOb_ClassArray])\n return false;\n var lookupClass = supered ? this.stackValue(argCount - 3) : this.getClass(rcvr);\n if (supered) { // verify that lookupClass is in fact in superclass chain of receiver;\n var cls = this.getClass(rcvr);\n while (cls !== lookupClass) {\n cls = cls.pointers[Squeak.Class_superclass];\n if (cls.isNil) return false;\n }\n }\n var trueArgCount = args.pointersSize();\n var stack = this.activeContext.pointers;\n this.arrayCopy(args.pointers, 0, stack, this.sp - 1, trueArgCount);\n this.sp += trueArgCount - argCount; //pop selector and array then push args\n var entry = this.findSelectorInClass(selector, trueArgCount, lookupClass);\n this.executeNewMethod(rcvr, entry.method, entry.argCount, entry.primIndex, entry.mClass, selector);\n return true;\n },\n primitiveInvokeObjectAsMethod: function(argCount, method) {\n // invoked from VM if non-method found in lookup\n var orgArgs = this.instantiateClass(this.specialObjects[Squeak.splOb_ClassArray], argCount);\n for (var i = 0; i < argCount; i++)\n orgArgs.pointers[argCount - i - 1] = this.pop();\n var orgReceiver = this.pop(),\n orgSelector = this.currentSelector;\n // send run:with:in: to non-method object\n var runWithIn = this.specialObjects[Squeak.splOb_SelectorRunWithIn];\n this.push(method); // not actually a method\n this.push(orgSelector);\n this.push(orgArgs);\n this.push(orgReceiver);\n this.send(runWithIn, 3, false);\n return true;\n },\n findMethodCacheEntry: function(selector, lkupClass) {\n //Probe the cache, and return the matching entry if found\n //Otherwise return one that can be used (selector and class set) with method == null.\n //Initial probe is class xor selector, reprobe delta is selector\n //We do not try to optimize probe time -- all are equally 'fast' compared to lookup\n //Instead we randomize the reprobe so two or three very active conflicting entries\n //will not keep dislodging each other\n var entry;\n this.methodCacheRandomish = (this.methodCacheRandomish + 1) & 3;\n var firstProbe = (selector.hash ^ lkupClass.hash) & this.methodCacheMask;\n var probe = firstProbe;\n for (var i = 0; i < 4; i++) { // 4 reprobes for now\n entry = this.methodCache[probe];\n if (entry.selector === selector && entry.lkupClass === lkupClass) return entry;\n if (i === this.methodCacheRandomish) firstProbe = probe;\n probe = (probe + selector.hash) & this.methodCacheMask;\n }\n entry = this.methodCache[firstProbe];\n entry.lkupClass = lkupClass;\n entry.selector = selector;\n entry.method = null;\n return entry;\n },\n flushMethodCache: function() { //clear all cache entries (prim 89)\n for (var i = 0; i < this.methodCacheSize; i++) {\n this.methodCache[i].selector = null; // mark it free\n this.methodCache[i].method = null; // release the method\n }\n return true;\n },\n flushMethodCacheForSelector: function(selector) { //clear cache entries for selector (prim 119)\n for (var i = 0; i < this.methodCacheSize; i++)\n if (this.methodCache[i].selector === selector) {\n this.methodCache[i].selector = null; // mark it free\n this.methodCache[i].method = null; // release the method\n }\n return true;\n },\n flushMethodCacheForMethod: function(method) { //clear cache entries for method (prim 116)\n for (var i = 0; i < this.methodCacheSize; i++)\n if (this.methodCache[i].method === method) {\n this.methodCache[i].selector = null; // mark it free\n this.methodCache[i].method = null; // release the method\n }\n return true;\n },\n flushMethodCacheAfterBecome: function(mutations) {\n // could be selective by checking lkupClass, selector,\n // and method against mutations dict\n this.flushMethodCache();\n },\n},\n'contexts', {\n isUnwindMarked: function(ctx) {\n if (!this.isMethodContext(ctx)) return false;\n var method = ctx.pointers[Squeak.Context_method];\n return method.methodPrimitiveIndex() == 198;\n },\n newActiveContext: function(newContext) {\n // Note: this is inlined in executeNewMethod() and doReturn()\n this.storeContextRegisters();\n this.activeContext = newContext; //We're off and running...\n this.fetchContextRegisters(newContext);\n },\n exportThisContext: function() {\n this.storeContextRegisters();\n this.reclaimableContextCount = 0;\n return this.activeContext;\n },\n fetchContextRegisters: function(ctxt) {\n var meth = ctxt.pointers[Squeak.Context_method];\n if (this.isSmallInt(meth)) { //if the Method field is an integer, activeCntx is a block context\n this.homeContext = ctxt.pointers[Squeak.BlockContext_home];\n meth = this.homeContext.pointers[Squeak.Context_method];\n } else { //otherwise home==ctxt\n this.homeContext = ctxt;\n }\n this.receiver = this.homeContext.pointers[Squeak.Context_receiver];\n this.method = meth;\n this.methodBytes = meth.bytes;\n this.pc = this.decodeSqueakPC(ctxt.pointers[Squeak.Context_instructionPointer], meth);\n this.sp = this.decodeSqueakSP(ctxt.pointers[Squeak.Context_stackPointer]);\n },\n storeContextRegisters: function() {\n //Save pc, sp into activeContext object, prior to change of context\n // see fetchContextRegisters for symmetry\n // expects activeContext, pc, sp, and method state vars to still be valid\n this.activeContext.pointers[Squeak.Context_instructionPointer] = this.encodeSqueakPC(this.pc, this.method);\n this.activeContext.pointers[Squeak.Context_stackPointer] = this.encodeSqueakSP(this.sp);\n },\n encodeSqueakPC: function(intPC, method) {\n // Squeak pc is offset by header and literals\n // and 1 for z-rel addressing\n return intPC + method.pointers.length * 4 + 1;\n },\n decodeSqueakPC: function(squeakPC, method) {\n return squeakPC - method.pointers.length * 4 - 1;\n },\n encodeSqueakSP: function(intSP) {\n // sp is offset by tempFrameStart, -1 for z-rel addressing\n return intSP - (Squeak.Context_tempFrameStart - 1);\n },\n decodeSqueakSP: function(squeakSP) {\n return squeakSP + (Squeak.Context_tempFrameStart - 1);\n },\n recycleIfPossible: function(ctxt) {\n if (!this.isMethodContext(ctxt)) return;\n if (ctxt.pointersSize() === (Squeak.Context_tempFrameStart+Squeak.Context_smallFrameSize)) {\n // Recycle small contexts\n ctxt.pointers[0] = this.freeContexts;\n this.freeContexts = ctxt;\n } else { // Recycle large contexts\n if (ctxt.pointersSize() !== (Squeak.Context_tempFrameStart+Squeak.Context_largeFrameSize))\n return;\n ctxt.pointers[0] = this.freeLargeContexts;\n this.freeLargeContexts = ctxt;\n }\n },\n allocateOrRecycleContext: function(needsLarge) {\n //Return a recycled context or a newly allocated one if none is available for recycling.\"\n var freebie;\n if (needsLarge) {\n if (!this.freeLargeContexts.isNil) {\n freebie = this.freeLargeContexts;\n this.freeLargeContexts = freebie.pointers[0];\n this.nRecycledContexts++;\n return freebie;\n }\n this.nAllocatedContexts++;\n return this.instantiateClass(this.specialObjects[Squeak.splOb_ClassMethodContext], Squeak.Context_largeFrameSize);\n } else {\n if (!this.freeContexts.isNil) {\n freebie = this.freeContexts;\n this.freeContexts = freebie.pointers[0];\n this.nRecycledContexts++;\n return freebie;\n }\n this.nAllocatedContexts++;\n return this.instantiateClass(this.specialObjects[Squeak.splOb_ClassMethodContext], Squeak.Context_smallFrameSize);\n }\n },\n},\n'stack access', {\n pop: function() {\n //Note leaves garbage above SP. Cleaned out by fullGC.\n return this.activeContext.pointers[this.sp--];\n },\n popN: function(nToPop) {\n this.sp -= nToPop;\n },\n push: function(object) {\n this.activeContext.pointers[++this.sp] = object;\n },\n popNandPush: function(nToPop, object) {\n this.activeContext.pointers[this.sp -= nToPop - 1] = object;\n },\n top: function() {\n return this.activeContext.pointers[this.sp];\n },\n stackValue: function(depthIntoStack) {\n return this.activeContext.pointers[this.sp - depthIntoStack];\n },\n stackInteger: function(depthIntoStack) {\n return this.checkSmallInt(this.stackValue(depthIntoStack));\n },\n stackIntOrFloat: function(depthIntoStack) {\n var num = this.stackValue(depthIntoStack);\n // is it a SmallInt?\n if (typeof num === \"number\") return num;\n // is it a Float?\n if (num.isFloat) {\n this.resultIsFloat = true; // need to return result as Float\n return num.float;\n }\n // maybe a 32-bit LargeInt?\n var bytes = num.bytes;\n if (bytes && bytes.length == 4) {\n var value = 0;\n for (var i = 3; i >= 0; i--)\n value = value * 256 + bytes[i];\n if (num.sqClass === this.specialObjects[Squeak.splOb_ClassLargePositiveInteger])\n return value;\n if (num.sqClass === this.specialObjects[Squeak.splOb_ClassLargeNegativeInteger])\n return -value;\n }\n // none of the above\n this.success = false;\n return 0;\n },\n pop2AndPushIntResult: function(intResult) {// returns success boolean\n if (this.success && this.canBeSmallInt(intResult)) {\n this.popNandPush(2, intResult);\n return true;\n }\n return false;\n },\n pop2AndPushNumResult: function(numResult) {// returns success boolean\n if (this.success) {\n if (this.resultIsFloat) {\n this.popNandPush(2, this.primHandler.makeFloat(numResult));\n return true;\n }\n if (numResult >= Squeak.MinSmallInt && numResult <= Squeak.MaxSmallInt) {\n this.popNandPush(2, numResult);\n return true;\n }\n if (numResult >= -0xFFFFFFFF && numResult <= 0xFFFFFFFF) {\n var negative = numResult < 0,\n unsigned = negative ? -numResult : numResult,\n lgIntClass = negative ? Squeak.splOb_ClassLargeNegativeInteger : Squeak.splOb_ClassLargePositiveInteger,\n lgIntObj = this.instantiateClass(this.specialObjects[lgIntClass], 4),\n bytes = lgIntObj.bytes;\n bytes[0] = unsigned & 255;\n bytes[1] = unsigned>>8 & 255;\n bytes[2] = unsigned>>16 & 255;\n bytes[3] = unsigned>>24 & 255;\n this.popNandPush(2, lgIntObj);\n return true;\n }\n }\n return false;\n },\n pop2AndPushBoolResult: function(boolResult) {\n if (!this.success) return false;\n this.popNandPush(2, boolResult ? this.trueObj : this.falseObj);\n return true;\n },\n},\n'numbers', {\n getClass: function(obj) {\n if (this.isSmallInt(obj))\n return this.specialObjects[Squeak.splOb_ClassInteger];\n return obj.sqClass;\n },\n canBeSmallInt: function(anInt) {\n return (anInt >= Squeak.MinSmallInt) && (anInt <= Squeak.MaxSmallInt);\n },\n isSmallInt: function(object) {\n return typeof object === \"number\";\n },\n checkSmallInt: function(maybeSmallInt) { // returns an int and sets success\n if (typeof maybeSmallInt === \"number\")\n return maybeSmallInt;\n this.success = false;\n return 1;\n },\n quickDivide: function(rcvr, arg) { // must only handle exact case\n if (arg === 0) return Squeak.NonSmallInt; // fail if divide by zero\n var result = rcvr / arg | 0;\n if (result * arg === rcvr) return result;\n return Squeak.NonSmallInt; // fail if result is not exact\n },\n div: function(rcvr, arg) {\n if (arg === 0) return Squeak.NonSmallInt; // fail if divide by zero\n return Math.floor(rcvr/arg);\n },\n mod: function(rcvr, arg) {\n if (arg === 0) return Squeak.NonSmallInt; // fail if divide by zero\n return rcvr - Math.floor(rcvr/arg) * arg;\n },\n safeShift: function(smallInt, shiftCount) {\n // JS shifts only up to 31 bits\n if (shiftCount < 0) {\n if (shiftCount < -31) return smallInt < 0 ? -1 : 0;\n return smallInt >> -shiftCount; // OK to lose bits shifting right\n }\n if (shiftCount > 31) return smallInt == 0 ? 0 : Squeak.NonSmallInt;\n // check for lost bits by seeing if computation is reversible\n var shifted = smallInt << shiftCount;\n if ((shifted>>shiftCount) === smallInt) return shifted;\n return Squeak.NonSmallInt; //non-small result will cause failure\n },\n},\n'utils',\n{\n isContext: function(obj) {//either block or methodContext\n if (obj.sqClass === this.specialObjects[Squeak.splOb_ClassMethodContext]) return true;\n if (obj.sqClass === this.specialObjects[Squeak.splOb_ClassBlockContext]) return true;\n return false;\n },\n isMethodContext: function(obj) {\n return obj.sqClass === this.specialObjects[Squeak.splOb_ClassMethodContext];\n },\n isMethod: function(obj, index) {\n return obj.sqClass === this.specialObjects[Squeak.splOb_ClassCompiledMethod];\n },\n instantiateClass: function(aClass, indexableSize) {\n return this.image.instantiateClass(aClass, indexableSize, this.nilObj);\n },\n arrayFill: function(array, fromIndex, toIndex, value) {\n // assign value to range from fromIndex (inclusive) to toIndex (exclusive)\n for (var i = fromIndex; i < toIndex; i++)\n array[i] = value;\n },\n arrayCopy: function(src, srcPos, dest, destPos, length) {\n // copy length elements from src at srcPos to dest at destPos\n if (src === dest && srcPos < destPos)\n for (var i = length - 1; i >= 0; i--)\n dest[destPos + i] = src[srcPos + i];\n else\n for (var i = 0; i < length; i++)\n dest[destPos + i] = src[srcPos + i];\n },\n},\n'debugging', {\n addMessage: function(message) {\n return this.messages[message] ? ++this.messages[message] : this.messages[message] = 1;\n },\n warnOnce: function(message) {\n if (this.addMessage(message) == 1)\n console.warn(message);\n },\n printMethod: function(aMethod, optContext, optSel) {\n // return a 'class>>selector' description for the method\n if (optSel) return optContext.className() + '>>' + optSel.bytesAsString();\n // this is expensive, we have to search all classes\n if (!aMethod) aMethod = this.activeContext.contextMethod();\n var found;\n this.allMethodsDo(function(classObj, methodObj, selectorObj) {\n if (methodObj === aMethod)\n return found = classObj.className() + '>>' + selectorObj.bytesAsString();\n });\n if (found) return found;\n if (optContext) {\n var rcvr = optContext.pointers[Squeak.Context_receiver];\n return \"(\" + rcvr + \")>>?\";\n }\n return \"?>>?\";\n },\n allInstancesOf: function(classObj, callback) {\n if (typeof classObj === \"string\") classObj = this.globalNamed(classObj);\n var instances = [],\n inst = this.image.someInstanceOf(classObj);\n while (inst) {\n if (callback) callback(inst);\n else instances.push(inst);\n inst = this.image.nextInstanceAfter(inst);\n }\n return instances;\n },\n globalNamed: function(name) {\n return this.allGlobalsDo(function(nameObj, globalObj){\n if (nameObj.bytesAsString() === name) return globalObj;\n });\n },\n allGlobalsDo: function(callback) {\n // callback(globalNameObj, globalObj) should return true to break out of iteration\n var globals = this.globals;\n for (var i = 0; i < globals.length; i++) {\n var assn = globals[i];\n if (!assn.isNil) {\n var result = callback(assn.pointers[0], assn.pointers[1]);\n if (result) return result;\n }\n }\n },\n allMethodsDo: function(callback) {\n // callback(classObj, methodObj, selectorObj) should return true to break out of iteration\n var self = this;\n this.allGlobalsDo(function(globalNameObj, globalObj) {\n if (globalObj.pointers && globalObj.pointers.length >= 9) {\n var clsAndMeta = [globalObj, globalObj.sqClass];\n for (var c = 0; c < clsAndMeta.length; c++) {\n var cls = clsAndMeta[c];\n var mdict = cls.pointers[1];\n if (!mdict.pointers || !mdict.pointers[1]) continue;\n var methods = mdict.pointers[1].pointers;\n if (!methods) continue;\n var selectors = mdict.pointers;\n for (var j = 0; j < methods.length; j++) {\n if (callback.call(this, cls, methods[j], selectors[2+j]))\n return true;\n }\n }\n }\n });\n },\n printStack: function(ctx, limit) {\n // both args are optional\n if (typeof ctx == \"number\") {limit = ctx; ctx = null;}\n if (!ctx) ctx = this.activeContext;\n if (!limit) limit = 100;\n var contexts = [],\n hardLimit = Math.max(limit, 1000000);\n while (!ctx.isNil && hardLimit-- > 0) {\n contexts.push(ctx);\n ctx = ctx.pointers[Squeak.Context_sender];\n }\n var extra = 200;\n if (contexts.length > limit + extra) {\n if (!ctx.isNil) contexts.push('...'); // over hard limit\n contexts = contexts.slice(0, limit).concat(['...']).concat(contexts.slice(-extra));\n }\n var stack = [],\n i = contexts.length;\n while (i-- > 0) {\n var ctx = contexts[i];\n if (!ctx.pointers) {\n stack.push('...\\n');\n } else {\n var block = '',\n method = ctx.pointers[Squeak.Context_method];\n if (typeof method === 'number') { // it's a block context, fetch home\n method = ctx.pointers[Squeak.BlockContext_home].pointers[Squeak.Context_method];\n block = '[] in ';\n } else if (!ctx.pointers[Squeak.Context_closure].isNil) {\n block = '[] in '; // it's a closure activation\n }\n stack.push(block + this.printMethod(method, ctx) + '\\n');\n }\n }\n return stack.join('');\n },\n findMethod: function(classAndMethodString) {\n // classAndMethodString is 'Class>>method'\n var found,\n className = classAndMethodString.split('>>')[0],\n methodName = classAndMethodString.split('>>')[1];\n this.allMethodsDo(function(classObj, methodObj, selectorObj) {\n if (methodName.length == selectorObj.bytesSize()\n && methodName == selectorObj.bytesAsString()\n && className == classObj.className())\n return found = methodObj;\n });\n return found;\n },\n breakNow: function(msg) {\n if (msg) console.log(\"Break: \" + msg);\n this.breakOutOfInterpreter = 'break';\n },\n breakOn: function(classAndMethodString) {\n // classAndMethodString is 'Class>>method'\n return this.breakOnMethod = classAndMethodString && this.findMethod(classAndMethodString);\n },\n breakOnReturnFromThisContext: function() {\n this.breakOnContextChanged = false;\n this.breakOnContextReturned = this.activeContext;\n },\n breakOnSendOrReturn: function() {\n this.breakOnContextChanged = true;\n this.breakOnContextReturned = null;\n },\n printActiveContext: function() {\n // temps and stack in current context\n var ctx = this.activeContext;\n var isBlock = typeof ctx.pointers[Squeak.BlockContext_argumentCount] === 'number';\n var closure = ctx.pointers[Squeak.Context_closure];\n var isClosure = !isBlock && !closure.isNil;\n var homeCtx = isBlock ? ctx.pointers[Squeak.BlockContext_home] : ctx;\n var tempCount = isClosure\n ? closure.pointers[Squeak.Closure_numArgs]\n : homeCtx.pointers[Squeak.Context_method].methodTempCount();\n var stackBottom = this.decodeSqueakSP(0);\n var stackTop = homeCtx.contextSizeWithStack(this) - 1;\n var firstTemp = stackBottom + 1;\n var lastTemp = firstTemp + tempCount - 1;\n var stack = '';\n for (var i = stackBottom; i <= stackTop; i++) {\n var obj = homeCtx.pointers[i];\n var value = obj.sqInstName ? obj.sqInstName() : obj.toString();\n var label = '';\n if (i == stackBottom) label = '=rcvr'; else\n if (i <= lastTemp) label = '=tmp' + (i - firstTemp);\n stack += '\\nctx[' + i + ']' + label +': ' + value;\n }\n if (isBlock) {\n stack += '\\n';\n var nArgs = ctx.pointers[3];\n var firstArg = this.decodeSqueakSP(1);\n var lastArg = firstArg + nArgs;\n for (var i = firstArg; i <= this.sp; i++) {\n var obj = ctx.pointers[i];\n var value = obj.sqInstName ? obj.sqInstName() : obj.toString();\n var label = '';\n if (i <= lastArg) label = '=arg' + (i - firstArg);\n stack += '\\nblk[' + i + ']' + label +': ' + value;\n }\n }\n return stack;\n },\n printAllProcesses: function() {\n var schedAssn = this.specialObjects[Squeak.splOb_SchedulerAssociation],\n sched = schedAssn.pointers[Squeak.Assn_value];\n // print active process\n var activeProc = sched.pointers[Squeak.ProcSched_activeProcess],\n result = \"Active: \" + this.printProcess(activeProc, true);\n // print other runnable processes\n var lists = sched.pointers[Squeak.ProcSched_processLists].pointers;\n for (var priority = lists.length - 1; priority >= 0; priority--) {\n var process = lists[priority].pointers[Squeak.LinkedList_firstLink];\n while (!process.isNil) {\n result += \"\\nRunnable: \" + this.printProcess(process);\n process = process.pointers[Squeak.Link_nextLink];\n }\n }\n // print all processes waiting on a semaphore\n var semaClass = this.specialObjects[Squeak.splOb_ClassSemaphore],\n sema = this.image.someInstanceOf(semaClass);\n while (sema) {\n var process = sema.pointers[Squeak.LinkedList_firstLink];\n while (!process.isNil) {\n result += \"\\nWaiting: \" + this.printProcess(process);\n process = process.pointers[Squeak.Link_nextLink];\n }\n sema = this.image.nextInstanceAfter(sema);\n }\n return result;\n },\n printProcess: function(process, active) {\n var context = process.pointers[Squeak.Proc_suspendedContext],\n priority = process.pointers[Squeak.Proc_priority],\n stack = this.printStack(active ? null : context);\n return process.toString() +\" at priority \" + priority + \"\\n\" + stack;\n },\n printByteCodes: function(aMethod, optionalIndent, optionalHighlight, optionalPC) {\n if (!aMethod) aMethod = this.method;\n var printer = new Squeak.InstructionPrinter(aMethod, this);\n return printer.printInstructions(optionalIndent, optionalHighlight, optionalPC);\n },\n willSendOrReturn: function() {\n // Answer whether the next bytecode corresponds to a Smalltalk\n // message send or return\n var byte = this.method.bytes[this.pc];\n if (byte >= 120 && byte <= 125) return true; // return\n if (byte < 131 || byte == 200) return false;\n if (byte >= 176) return true; // special send or short send\n if (byte <= 134) { // long sends\n // long form support demands we check the selector\n var litIndex;\n if (byte === 132) {\n if ((this.method.bytes[this.pc + 1] >> 5) > 1) return false;\n litIndex = this.method.bytes[this.pc + 2];\n } else\n litIndex = this.method.bytes[this.pc + 1] & (byte === 134 ? 63 : 31);\n var selectorObj = this.method.pointers[litIndex + 1];\n if (selectorObj.bytesAsString() != 'blockCopy:') return true;\n }\n return false;\n },\n});\n\nObject.subclass('Squeak.Primitives',\n'initialization', {\n initialize: function(vm, display) {\n this.vm = vm;\n this.display = display;\n this.display.vm = this.vm;\n this.oldPrims = !this.vm.image.hasClosures;\n this.allowAccessBeyondSP = this.oldPrims;\n this.deferDisplayUpdates = false;\n this.semaphoresToSignal = [];\n this.initDisplay();\n this.initAtCache();\n this.initModules();\n },\n initModules: function() {\n this.loadedModules = {};\n this.builtinModules = {\n JavaScriptPlugin: this.findPluginFunctions(\"js_\", \"\", true),\n FilePlugin: this.findPluginFunctions(\"\", \"primitive(Disable)?(File|Directory)\"),\n DropPlugin: this.findPluginFunctions(\"\", \"primitiveDropRequest\"),\n SoundPlugin: this.findPluginFunctions(\"snd_\"),\n JPEGReadWriter2Plugin: this.findPluginFunctions(\"jpeg2_\"),\n SecurityPlugin: {\n primitiveDisableImageWrite: this.fakePrimitive.bind(this, \"SecurityPlugin.primitiveDisableImageWrite\", 0),\n },\n };\n this.patchModules = {\n ScratchPlugin: this.findPluginFunctions(\"scratch_\"),\n };\n this.interpreterProxy = new Squeak.InterpreterProxy(this.vm);\n },\n findPluginFunctions: function(prefix, match, bindLate) {\n match = match || \"(initialise|shutdown|prim)\";\n var plugin = {},\n regex = new RegExp(\"^\" + prefix + match, \"i\");\n for (var funcName in this)\n if (regex.test(funcName) && typeof this[funcName] == \"function\") {\n var primName = funcName;\n if (prefix) primName = funcName[prefix.length].toLowerCase() + funcName.slice(prefix.length + 1);\n plugin[primName] = bindLate ? funcName : this[funcName].bind(this);\n }\n return plugin;\n },\n initDisplay: function() {\n this.indexedColors = [\n 0xFFFFFFFF, 0xFF000001, 0xFFFFFFFF, 0xFF808080, 0xFFFF0000, 0xFF00FF00, 0xFF0000FF, 0xFF00FFFF,\n 0xFFFFFF00, 0xFFFF00FF, 0xFF202020, 0xFF404040, 0xFF606060, 0xFF9F9F9F, 0xFFBFBFBF, 0xFFDFDFDF,\n 0xFF080808, 0xFF101010, 0xFF181818, 0xFF282828, 0xFF303030, 0xFF383838, 0xFF484848, 0xFF505050,\n 0xFF585858, 0xFF686868, 0xFF707070, 0xFF787878, 0xFF878787, 0xFF8F8F8F, 0xFF979797, 0xFFA7A7A7,\n 0xFFAFAFAF, 0xFFB7B7B7, 0xFFC7C7C7, 0xFFCFCFCF, 0xFFD7D7D7, 0xFFE7E7E7, 0xFFEFEFEF, 0xFFF7F7F7,\n 0xFF000001, 0xFF003300, 0xFF006600, 0xFF009900, 0xFF00CC00, 0xFF00FF00, 0xFF000033, 0xFF003333,\n 0xFF006633, 0xFF009933, 0xFF00CC33, 0xFF00FF33, 0xFF000066, 0xFF003366, 0xFF006666, 0xFF009966,\n 0xFF00CC66, 0xFF00FF66, 0xFF000099, 0xFF003399, 0xFF006699, 0xFF009999, 0xFF00CC99, 0xFF00FF99,\n 0xFF0000CC, 0xFF0033CC, 0xFF0066CC, 0xFF0099CC, 0xFF00CCCC, 0xFF00FFCC, 0xFF0000FF, 0xFF0033FF,\n 0xFF0066FF, 0xFF0099FF, 0xFF00CCFF, 0xFF00FFFF, 0xFF330000, 0xFF333300, 0xFF336600, 0xFF339900,\n 0xFF33CC00, 0xFF33FF00, 0xFF330033, 0xFF333333, 0xFF336633, 0xFF339933, 0xFF33CC33, 0xFF33FF33,\n 0xFF330066, 0xFF333366, 0xFF336666, 0xFF339966, 0xFF33CC66, 0xFF33FF66, 0xFF330099, 0xFF333399,\n 0xFF336699, 0xFF339999, 0xFF33CC99, 0xFF33FF99, 0xFF3300CC, 0xFF3333CC, 0xFF3366CC, 0xFF3399CC,\n 0xFF33CCCC, 0xFF33FFCC, 0xFF3300FF, 0xFF3333FF, 0xFF3366FF, 0xFF3399FF, 0xFF33CCFF, 0xFF33FFFF,\n 0xFF660000, 0xFF663300, 0xFF666600, 0xFF669900, 0xFF66CC00, 0xFF66FF00, 0xFF660033, 0xFF663333,\n 0xFF666633, 0xFF669933, 0xFF66CC33, 0xFF66FF33, 0xFF660066, 0xFF663366, 0xFF666666, 0xFF669966,\n 0xFF66CC66, 0xFF66FF66, 0xFF660099, 0xFF663399, 0xFF666699, 0xFF669999, 0xFF66CC99, 0xFF66FF99,\n 0xFF6600CC, 0xFF6633CC, 0xFF6666CC, 0xFF6699CC, 0xFF66CCCC, 0xFF66FFCC, 0xFF6600FF, 0xFF6633FF,\n 0xFF6666FF, 0xFF6699FF, 0xFF66CCFF, 0xFF66FFFF, 0xFF990000, 0xFF993300, 0xFF996600, 0xFF999900,\n 0xFF99CC00, 0xFF99FF00, 0xFF990033, 0xFF993333, 0xFF996633, 0xFF999933, 0xFF99CC33, 0xFF99FF33,\n 0xFF990066, 0xFF993366, 0xFF996666, 0xFF999966, 0xFF99CC66, 0xFF99FF66, 0xFF990099, 0xFF993399,\n 0xFF996699, 0xFF999999, 0xFF99CC99, 0xFF99FF99, 0xFF9900CC, 0xFF9933CC, 0xFF9966CC, 0xFF9999CC,\n 0xFF99CCCC, 0xFF99FFCC, 0xFF9900FF, 0xFF9933FF, 0xFF9966FF, 0xFF9999FF, 0xFF99CCFF, 0xFF99FFFF,\n 0xFFCC0000, 0xFFCC3300, 0xFFCC6600, 0xFFCC9900, 0xFFCCCC00, 0xFFCCFF00, 0xFFCC0033, 0xFFCC3333,\n 0xFFCC6633, 0xFFCC9933, 0xFFCCCC33, 0xFFCCFF33, 0xFFCC0066, 0xFFCC3366, 0xFFCC6666, 0xFFCC9966,\n 0xFFCCCC66, 0xFFCCFF66, 0xFFCC0099, 0xFFCC3399, 0xFFCC6699, 0xFFCC9999, 0xFFCCCC99, 0xFFCCFF99,\n 0xFFCC00CC, 0xFFCC33CC, 0xFFCC66CC, 0xFFCC99CC, 0xFFCCCCCC, 0xFFCCFFCC, 0xFFCC00FF, 0xFFCC33FF,\n 0xFFCC66FF, 0xFFCC99FF, 0xFFCCCCFF, 0xFFCCFFFF, 0xFFFF0000, 0xFFFF3300, 0xFFFF6600, 0xFFFF9900,\n 0xFFFFCC00, 0xFFFFFF00, 0xFFFF0033, 0xFFFF3333, 0xFFFF6633, 0xFFFF9933, 0xFFFFCC33, 0xFFFFFF33,\n 0xFFFF0066, 0xFFFF3366, 0xFFFF6666, 0xFFFF9966, 0xFFFFCC66, 0xFFFFFF66, 0xFFFF0099, 0xFFFF3399,\n 0xFFFF6699, 0xFFFF9999, 0xFFFFCC99, 0xFFFFFF99, 0xFFFF00CC, 0xFFFF33CC, 0xFFFF66CC, 0xFFFF99CC,\n 0xFFFFCCCC, 0xFFFFFFCC, 0xFFFF00FF, 0xFFFF33FF, 0xFFFF66FF, 0xFFFF99FF, 0xFFFFCCFF, 0xFFFFFFFF];\n },\n},\n'dispatch', {\n quickSendOther: function(rcvr, lobits) {\n // returns true if it succeeds\n this.success = true;\n switch (lobits) {\n case 0x0: return this.popNandPushIfOK(2, this.objectAt(true,true,false)); // at:\n case 0x1: return this.popNandPushIfOK(3, this.objectAtPut(true,true,false)); // at:put:\n case 0x2: return this.popNandPushIfOK(1, this.objectSize(true)); // size\n //case 0x3: return false; // next\n //case 0x4: return false; // nextPut:\n //case 0x5: return false; // atEnd\n case 0x6: return this.pop2andPushBoolIfOK(this.vm.stackValue(1) === this.vm.stackValue(0)); // ==\n case 0x7: return this.popNandPushIfOK(1,this.vm.getClass(this.vm.top())); // class\n case 0x8: return this.popNandPushIfOK(2,this.doBlockCopy()); // blockCopy:\n case 0x9: return this.primitiveBlockValue(0); // value\n case 0xA: return this.primitiveBlockValue(1); // value:\n //case 0xB: return false; // do:\n //case 0xC: return false; // new\n //case 0xD: return false; // new:\n //case 0xE: return false; // x\n //case 0xF: return false; // y\n }\n return false;\n },\n doPrimitive: function(index, argCount, primMethod) {\n this.success = true;\n if (index < 128) // Chrome only optimized up to 128 cases\n switch (index) {\n // Integer Primitives (0-19)\n case 1: return this.popNandPushIntIfOK(2,this.stackInteger(1) + this.stackInteger(0)); // Integer.add\n case 2: return this.popNandPushIntIfOK(2,this.stackInteger(1) - this.stackInteger(0)); // Integer.subtract\n case 3: return this.pop2andPushBoolIfOK(this.stackInteger(1) < this.stackInteger(0)); // Integer.less\n case 4: return this.pop2andPushBoolIfOK(this.stackInteger(1) > this.stackInteger(0)); // Integer.greater\n case 5: return this.pop2andPushBoolIfOK(this.stackInteger(1) <= this.stackInteger(0)); // Integer.leq\n case 6: return this.pop2andPushBoolIfOK(this.stackInteger(1) >= this.stackInteger(0)); // Integer.geq\n case 7: return this.pop2andPushBoolIfOK(this.stackInteger(1) === this.stackInteger(0)); // Integer.equal\n case 8: return this.pop2andPushBoolIfOK(this.stackInteger(1) !== this.stackInteger(0)); // Integer.notequal\n case 9: return this.popNandPushIntIfOK(2,this.stackInteger(1) * this.stackInteger(0)); // Integer.multiply *\n case 10: return this.popNandPushIntIfOK(2,this.vm.quickDivide(this.stackInteger(1),this.stackInteger(0))); // Integer.divide / (fails unless exact)\n case 11: return this.popNandPushIntIfOK(2,this.vm.mod(this.stackInteger(1),this.stackInteger(0))); // Integer.mod \\\\\n case 12: return this.popNandPushIntIfOK(2,this.vm.div(this.stackInteger(1),this.stackInteger(0))); // Integer.div //\n case 13: return this.popNandPushIntIfOK(2,this.stackInteger(1) / this.stackInteger(0) | 0); // Integer.quo\n case 14: return this.popNandPushIfOK(2,this.doBitAnd()); // SmallInt.bitAnd\n case 15: return this.popNandPushIfOK(2,this.doBitOr()); // SmallInt.bitOr\n case 16: return this.popNandPushIfOK(2,this.doBitXor()); // SmallInt.bitXor\n case 17: return this.popNandPushIfOK(2,this.doBitShift()); // SmallInt.bitShift\n case 18: return this.primitiveMakePoint(argCount, false);\n case 19: return false; // Guard primitive for simulation -- *must* fail\n // LargeInteger Primitives (20-39)\n // 32-bit logic is aliased to Integer prims above\n case 20: return false; // primitiveRemLargeIntegers\n case 21: return false; // primitiveAddLargeIntegers\n case 22: return false; // primitiveSubtractLargeIntegers\n case 23: return this.primitiveLessThanLargeIntegers();\n case 24: return this.primitiveGreaterThanLargeIntegers();\n case 25: return this.primitiveLessOrEqualLargeIntegers();\n case 26: return this.primitiveGreaterOrEqualLargeIntegers();\n case 27: return this.primitiveEqualLargeIntegers();\n case 28: return this.primitiveNotEqualLargeIntegers();\n case 29: return false; // primitiveMultiplyLargeIntegers\n case 30: return false; // primitiveDivideLargeIntegers\n case 31: return false; // primitiveModLargeIntegers\n case 32: return false; // primitiveDivLargeIntegers\n case 33: return false; // primitiveQuoLargeIntegers\n case 34: return false; // primitiveBitAndLargeIntegers\n case 35: return false; // primitiveBitOrLargeIntegers\n case 36: return false; // primitiveBitXorLargeIntegers\n case 37: return false; // primitiveBitShiftLargeIntegers\n case 38: return this.popNandPushIfOK(2, this.objectAt(false,false,false)); // Float basicAt\n case 39: return this.popNandPushIfOK(3, this.objectAtPut(false,false,false)); // Float basicAtPut\n // Float Primitives (40-59)\n case 40: return this.popNandPushFloatIfOK(1,this.stackInteger(0)); // primitiveAsFloat\n case 41: return this.popNandPushFloatIfOK(2,this.stackFloat(1)+this.stackFloat(0)); // Float +\n case 42: return this.popNandPushFloatIfOK(2,this.stackFloat(1)-this.stackFloat(0)); // Float -\n case 43: return this.pop2andPushBoolIfOK(this.stackFloat(1)<this.stackFloat(0)); // Float <\n case 44: return this.pop2andPushBoolIfOK(this.stackFloat(1)>this.stackFloat(0)); // Float >\n case 45: return this.pop2andPushBoolIfOK(this.stackFloat(1)<=this.stackFloat(0)); // Float <=\n case 46: return this.pop2andPushBoolIfOK(this.stackFloat(1)>=this.stackFloat(0)); // Float >=\n case 47: return this.pop2andPushBoolIfOK(this.stackFloat(1)===this.stackFloat(0)); // Float =\n case 48: return this.pop2andPushBoolIfOK(this.stackFloat(1)!==this.stackFloat(0)); // Float !=\n case 49: return this.popNandPushFloatIfOK(2,this.stackFloat(1)*this.stackFloat(0)); // Float.mul\n case 50: return this.popNandPushFloatIfOK(2,this.safeFDiv(this.stackFloat(1),this.stackFloat(0))); // Float.div\n case 51: return this.popNandPushIfOK(1,this.floatAsSmallInt(this.stackFloat(0))); // Float.asInteger\n case 52: return false; // Float.fractionPart (modf)\n case 53: return this.popNandPushIntIfOK(1, this.frexp_exponent(this.stackFloat(0)) - 1); // Float.exponent\n case 54: return this.popNandPushFloatIfOK(2, this.ldexp(this.stackFloat(1), this.stackFloat(0))); // Float.timesTwoPower\n case 55: return this.popNandPushFloatIfOK(1, Math.sqrt(this.stackFloat(0))); // SquareRoot\n case 56: return this.popNandPushFloatIfOK(1, Math.sin(this.stackFloat(0))); // Sine\n case 57: return this.popNandPushFloatIfOK(1, Math.atan(this.stackFloat(0))); // Arctan\n case 58: return this.popNandPushFloatIfOK(1, Math.log(this.stackFloat(0))); // LogN\n case 59: return this.popNandPushFloatIfOK(1, Math.exp(this.stackFloat(0))); // Exp\n // Subscript and Stream Primitives (60-67)\n case 60: return this.popNandPushIfOK(2, this.objectAt(false,false,false)); // basicAt:\n case 61: return this.popNandPushIfOK(3, this.objectAtPut(false,false,false)); // basicAt:put:\n case 62: return this.popNandPushIfOK(1, this.objectSize(false)); // size\n case 63: return this.popNandPushIfOK(2, this.objectAt(false,true,false)); // String.basicAt:\n case 64: return this.popNandPushIfOK(3, this.objectAtPut(false,true,false)); // String.basicAt:put:\n case 65: return false; // primitiveNext\n case 66: return false; // primitiveNextPut\n case 67: return false; // primitiveAtEnd\n // StorageManagement Primitives (68-79)\n case 68: return this.popNandPushIfOK(2, this.objectAt(false,false,true)); // Method.objectAt:\n case 69: return this.popNandPushIfOK(3, this.objectAtPut(false,false,true)); // Method.objectAt:put:\n case 70: return this.popNandPushIfOK(1, this.instantiateClass(this.stackNonInteger(0), 0)); // Class.new\n case 71: return this.popNandPushIfOK(2, this.instantiateClass(this.stackNonInteger(1), this.stackPos32BitInt(0))); // Class.new:\n case 72: return this.primitiveArrayBecome(argCount, false); // one way\n case 73: return this.popNandPushIfOK(2, this.objectAt(false,false,true)); // instVarAt:\n case 74: return this.popNandPushIfOK(3, this.objectAtPut(false,false,true)); // instVarAt:put:\n case 75: return this.popNandPushIfOK(1, this.stackNonInteger(0).hash); // Object.identityHash\n case 76: return this.primitiveStoreStackp(argCount); // (Blue Book: primitiveAsObject)\n case 77: return this.popNandPushIfOK(1, this.someInstanceOf(this.stackNonInteger(0))); // Class.someInstance\n case 78: return this.popNandPushIfOK(1, this.nextInstanceAfter(this.stackNonInteger(0))); // Object.nextInstance\n case 79: return this.primitiveNewMethod(argCount); // Compiledmethod.new\n // Control Primitives (80-89)\n case 80: return this.popNandPushIfOK(2,this.doBlockCopy()); // blockCopy:\n case 81: return this.primitiveBlockValue(argCount); // BlockContext.value\n case 82: return this.primitiveBlockValueWithArgs(argCount); // BlockContext.valueWithArguments:\n case 83: return this.vm.primitivePerform(argCount); // Object.perform:(with:)*\n case 84: return this.vm.primitivePerformWithArgs(argCount, false); // Object.perform:withArguments:\n case 85: return this.primitiveSignal(); // Semaphore.wait\n case 86: return this.primitiveWait(); // Semaphore.wait\n case 87: return this.primitiveResume(); // Process.resume\n case 88: return this.primitiveSuspend(); // Process.suspend\n case 89: return this.vm.flushMethodCache(); //primitiveFlushCache\n // Input/Output Primitives (90-109)\n case 90: return this.primitiveMousePoint(argCount); // mousePoint\n case 91: return this.primitiveTestDisplayDepth(argCount); // cursorLocPut in old images\n // case 92: return false; // primitiveSetDisplayMode\n case 93: return this.primitiveInputSemaphore(argCount);\n case 94: return this.primitiveGetNextEvent(argCount);\n case 95: return this.primitiveInputWord(argCount);\n case 96: return this.namedPrimitive('BitBltPlugin', 'primitiveCopyBits', argCount);\n case 97: return this.primitiveSnapshot(argCount);\n //case 98: return false; // primitiveStoreImageSegment\n case 99: return this.primitiveLoadImageSegment(argCount);\n case 100: return this.vm.primitivePerformWithArgs(argCount, true); // Object.perform:withArguments:inSuperclass: (Blue Book: primitiveSignalAtTick)\n case 101: return this.primitiveBeCursor(argCount); // Cursor.beCursor\n case 102: return this.primitiveBeDisplay(argCount); // DisplayScreen.beDisplay\n case 103: return false; // primitiveScanCharacters\n case 104: return false; // primitiveDrawLoop\n case 105: return this.popNandPushIfOK(5, this.doStringReplace()); // string and array replace\n case 106: return this.primitiveScreenSize(argCount); // actualScreenSize\n case 107: return this.primitiveMouseButtons(argCount); // Sensor mouseButtons\n case 108: return this.primitiveKeyboardNext(argCount); // Sensor kbdNext\n case 109: return this.primitiveKeyboardPeek(argCount); // Sensor kbdPeek\n // System Primitives (110-119)\n case 110: return this.pop2andPushBoolIfOK(this.vm.stackValue(1) === this.vm.stackValue(0)); // ==\n case 111: return this.popNandPushIfOK(1, this.vm.getClass(this.vm.top())); // Object.class\n case 112: return this.popNandPushIfOK(1, this.vm.image.bytesLeft()); //primitiveBytesLeft\n case 113: return this.primitiveQuit(argCount);\n case 114: return this.primitiveExitToDebugger(argCount);\n case 115: return this.primitiveChangeClass(argCount);\n case 116: return this.vm.flushMethodCacheForMethod(this.vm.top()); // after Squeak 2.2 uses 119\n case 117: return this.doNamedPrimitive(argCount, primMethod); // named prims\n case 118: return this.primitiveDoPrimitiveWithArgs(argCount);\n case 119: return this.vm.flushMethodCacheForSelector(this.vm.top()); // before Squeak 2.3 uses 116\n // Miscellaneous Primitives (120-149)\n case 120: return false; //primitiveCalloutToFFI\n case 121: return this.primitiveImageName(argCount); //get+set imageName\n case 122: return this.primitiveReverseDisplay(argCount); // Blue Book: primitiveImageVolume\n //case 123: return false; //TODO primitiveValueUninterruptably\n case 124: return this.popNandPushIfOK(2, this.registerSemaphore(Squeak.splOb_TheLowSpaceSemaphore));\n case 125: return this.popNandPushIfOK(2, this.setLowSpaceThreshold());\n case 126: return this.primitiveDeferDisplayUpdates(argCount);\n case 127: return this.primitiveShowDisplayRect(argCount);\n } else if (index < 256) switch (index) { // Chrome only optimized up to 128 cases\n case 128: return this.primitiveArrayBecome(argCount, true); // both ways\n case 129: return this.popNandPushIfOK(1, this.vm.image.specialObjectsArray); //specialObjectsOop\n case 130: return this.primitiveFullGC(argCount);\n case 131: return this.popNandPushIfOK(1, this.vm.image.partialGC()); // GCmost\n case 132: return this.pop2andPushBoolIfOK(this.pointsTo(this.stackNonInteger(1), this.vm.top())); //Object.pointsTo\n case 133: return true; //TODO primitiveSetInterruptKey\n case 134: return this.popNandPushIfOK(2, this.registerSemaphore(Squeak.splOb_TheInterruptSemaphore));\n case 135: return this.popNandPushIfOK(1, this.millisecondClockValue());\n case 136: return this.primitiveSignalAtMilliseconds(argCount); //Delay signal:atMs:());\n case 137: return this.popNandPushIfOK(1, this.secondClock()); // seconds since Jan 1, 1901\n case 138: return this.popNandPushIfOK(1, this.someObject()); // Object.someObject\n case 139: return this.popNandPushIfOK(1, this.nextObject(this.vm.top())); // Object.nextObject\n case 140: return this.primitiveBeep(argCount);\n case 141: return this.primitiveClipboardText(argCount);\n case 142: return this.popNandPushIfOK(1, this.makeStString(this.filenameToSqueak(Squeak.vmPath)));\n case 143: // short at and shortAtPut\n case 144: return this.primitiveShortAtAndPut(argCount);\n case 145: return this.primitiveConstantFill(argCount);\n case 146: return this.namedPrimitive('JoystickTabletPlugin', 'primitiveReadJoystick', argCount);\n case 147: return this.namedPrimitive('BitBltPlugin', 'primitiveWarpBits', argCount);\n case 148: return this.popNandPushIfOK(1, this.vm.image.clone(this.vm.top())); //shallowCopy\n case 149: return this.primitiveGetAttribute(argCount);\n // File Primitives (150-169)\n case 150: if (this.oldPrims) return this.primitiveFileAtEnd(argCount);\n case 151: if (this.oldPrims) return this.primitiveFileClose(argCount);\n case 152: if (this.oldPrims) return this.primitiveFileGetPosition(argCount);\n case 153: if (this.oldPrims) return this.primitiveFileOpen(argCount);\n case 154: if (this.oldPrims) return this.primitiveFileRead(argCount);\n case 155: if (this.oldPrims) return this.primitiveFileSetPosition(argCount);\n case 156: if (this.oldPrims) return this.primitiveFileDelete(argCount);\n case 157: if (this.oldPrims) return this.primitiveFileSize(argCount);\n case 158: if (this.oldPrims) return this.primitiveFileWrite(argCount);\n case 159: if (this.oldPrims) return this.primitiveFileRename(argCount);\n case 160: if (this.oldPrims) return this.primitiveDirectoryCreate(argCount); // new: primitiveAdoptInstance\n case 161: if (this.oldPrims) return this.primitiveDirectoryDelimitor(argCount); // new: primitiveSetIdentityHash\n case 162: if (this.oldPrims) return this.primitiveDirectoryLookup(argCount);\n case 163: if (this.oldPrims) return this.primitiveDirectoryDelete(argCount);\n break; // fail 150-163 if fell through\n // 164: unused\n case 165:\n case 166: return this.primitiveIntegerAtAndPut(argCount);\n case 167: return false; // Processor.yield\n case 168: return this.primitiveCopyObject(argCount);\n case 169: if (this.oldPrims) return this.primitiveDirectorySetMacTypeAndCreator(argCount);\n else return this.primitiveNotIdentical(argCount);\n // Sound Primitives (170-199)\n case 170: if (this.oldPrims) return this.namedPrimitive('SoundPlugin', 'primitiveSoundStart', argCount);\n case 171: if (this.oldPrims) return this.namedPrimitive('SoundPlugin', 'primitiveSoundStartWithSemaphore', argCount);\n case 172: if (this.oldPrims) return this.namedPrimitive('SoundPlugin', 'primitiveSoundStop', argCount);\n case 173: if (this.oldPrims) return this.namedPrimitive('SoundPlugin', 'primitiveSoundAvailableSpace', argCount);\n case 174: if (this.oldPrims) return this.namedPrimitive('SoundPlugin', 'primitiveSoundPlaySamples', argCount);\n case 175: if (this.oldPrims) return this.namedPrimitive('SoundPlugin', 'primitiveSoundPlaySilence', argCount);\n case 176: if (this.oldPrims) return this.namedPrimitive('SoundGenerationPlugin', 'primWaveTableSoundmixSampleCountintostartingAtpan', argCount);\n case 177: if (this.oldPrims) return this.namedPrimitive('SoundGenerationPlugin', 'primFMSoundmixSampleCountintostartingAtpan', argCount);\n case 178: if (this.oldPrims) return this.namedPrimitive('SoundGenerationPlugin', 'primPluckedSoundmixSampleCountintostartingAtpan', argCount);\n case 179: if (this.oldPrims) return this.namedPrimitive('SoundGenerationPlugin', 'primSampledSoundmixSampleCountintostartingAtpan', argCount);\n case 180: if (this.oldPrims) return this.namedPrimitive('SoundGenerationPlugin', 'primitiveMixFMSound', argCount);\n case 181: if (this.oldPrims) return this.namedPrimitive('SoundGenerationPlugin', 'primitiveMixPluckedSound', argCount);\n case 182: if (this.oldPrims) return this.namedPrimitive('SoundGenerationPlugin', 'oldprimSampledSoundmixSampleCountintostartingAtleftVolrightVol', argCount);\n case 183: if (this.oldPrims) return this.namedPrimitive('SoundGenerationPlugin', 'primitiveApplyReverb', argCount);\n case 184: if (this.oldPrims) return this.namedPrimitive('SoundGenerationPlugin', 'primitiveMixLoopedSampledSound', argCount);\n case 185: if (this.oldPrims) return this.namedPrimitive('SoundGenerationPlugin', 'primitiveMixSampledSound', argCount);\n break; // fail 170-185 if fell through\n // 186-188: was unused\n case 188: if (!this.oldPrims) return this.primitiveExecuteMethodArgsArray(argCount);\n break; // fail 188 if fell through\n case 189: if (this.oldPrims) return this.namedPrimitive('SoundPlugin', 'primitiveSoundInsertSamples', argCount);\n case 190: if (this.oldPrims) return this.namedPrimitive('SoundPlugin', 'primitiveSoundStartRecording', argCount);\n case 191: if (this.oldPrims) return this.namedPrimitive('SoundPlugin', 'primitiveSoundStopRecording', argCount);\n case 192: if (this.oldPrims) return this.namedPrimitive('SoundPlugin', 'primitiveSoundGetRecordingSampleRate', argCount);\n case 193: if (this.oldPrims) return this.namedPrimitive('SoundPlugin', 'primitiveSoundRecordSamples', argCount);\n case 194: if (this.oldPrims) return this.namedPrimitive('SoundPlugin', 'primitiveSoundSetRecordLevel', argCount);\n break; // fail 189-194 if fell through\n case 195: return false; // Context.findNextUnwindContextUpTo:\n case 196: return false; // Context.terminateTo:\n case 197: return false; // Context.findNextHandlerContextStarting\n case 198: return false; // MarkUnwindMethod (must fail)\n case 199: return false; // MarkHandlerMethod (must fail)\n // Networking Primitives (200-229)\n case 200: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveInitializeNetwork', argCount);\n else return this.primitiveClosureCopyWithCopiedValues(argCount);\n case 201: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveResolverStartNameLookup', argCount);\n else return this.primitiveClosureValue(argCount);\n case 202: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveResolverNameLookupResult', argCount);\n else return this.primitiveClosureValue(argCount);\n case 203: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveResolverStartAddressLookup', argCount);\n else return this.primitiveClosureValue(argCount);\n case 204: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveResolverAddressLookupResult', argCount);\n else return this.primitiveClosureValue(argCount);\n case 205: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveResolverAbortLookup', argCount);\n else return this.primitiveClosureValue(argCount);\n case 206: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveResolverLocalAddress', argCount);\n else return this.primitiveClosureValueWithArgs(argCount);\n case 207: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveResolverStatus', argCount);\n case 208: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveResolverError', argCount);\n case 209: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveSocketCreate', argCount);\n break; // fail 207-209 if fell through\n case 210: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveSocketDestroy', argCount);\n else return this.popNandPushIfOK(2, this.objectAt(false,false,false)); // contextAt:\n case 211: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveSocketConnectionStatus', argCount);\n else return this.popNandPushIfOK(3, this.objectAtPut(false,false,false)); // contextAt:put:\n case 212: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveSocketError', argCount);\n else return this.popNandPushIfOK(1, this.objectSize(false)); // contextSize\n case 213: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveSocketLocalAddress', argCount);\n case 214: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveSocketLocalPort', argCount);\n case 215: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveSocketRemoteAddress', argCount);\n case 216: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveSocketRemotePort', argCount);\n case 217: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveSocketConnectToPort', argCount);\n case 218: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveSocketListenOnPort', argCount);\n case 219: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveSocketCloseConnection', argCount);\n case 220: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveSocketAbortConnection', argCount);\n break; // fail 212-220 if fell through\n case 221: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveSocketReceiveDataBufCount', argCount);\n else return this.primitiveClosureValueNoContextSwitch(argCount);\n case 222: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveSocketReceiveDataAvailable', argCount);\n else return this.primitiveClosureValueNoContextSwitch(argCount);\n case 223: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveSocketSendDataBufCount', argCount);\n case 224: if (this.oldPrims) return this.namedPrimitive('SocketPlugin', 'primitiveSocketSendDone', argCount);\n break; // fail 223-229 if fell through\n // 225-229: unused\n // Other Primitives (230-249)\n case 230: return this.primitiveRelinquishProcessorForMicroseconds(argCount);\n case 231: return this.primitiveForceDisplayUpdate(argCount);\n // case 232: return this.primitiveFormPrint(argCount);\n case 233: return this.primitiveSetFullScreen(argCount);\n case 234: if (this.oldPrims) return this.namedPrimitive('MiscPrimitivePlugin', 'primitiveDecompressFromByteArray', argCount);\n case 235: if (this.oldPrims) return this.namedPrimitive('MiscPrimitivePlugin', 'primitiveCompareString', argCount);\n case 236: if (this.oldPrims) return this.namedPrimitive('MiscPrimitivePlugin', 'primitiveConvert8BitSigned', argCount);\n case 237: if (this.oldPrims) return this.namedPrimitive('MiscPrimitivePlugin', 'primitiveCompressToByteArray', argCount);\n case 238: if (this.oldPrims) return this.namedPrimitive('SerialPlugin', 'primitiveSerialPortOpen', argCount);\n case 239: if (this.oldPrims) return this.namedPrimitive('SerialPlugin', 'primitiveSerialPortClose', argCount);\n break; // fail 234-239 if fell through\n case 240: if (this.oldPrims) return this.namedPrimitive('SerialPlugin', 'primitiveSerialPortWrite', argCount);\n else return this.popNandPushIfOK(1, this.microsecondClockUTC());\n case 241: if (this.oldPrims) return this.namedPrimitive('SerialPlugin', 'primitiveSerialPortRead', argCount);\n else return this.popNandPushIfOK(1, this.microsecondClockLocal());\n // 242: unused\n case 243: if (this.oldPrims) return this.namedPrimitive('MiscPrimitivePlugin', 'primitiveTranslateStringWithTable', argCount);\n case 244: if (this.oldPrims) return this.namedPrimitive('MiscPrimitivePlugin', 'primitiveFindFirstInString' , argCount);\n case 245: if (this.oldPrims) return this.namedPrimitive('MiscPrimitivePlugin', 'primitiveIndexOfAsciiInString', argCount);\n case 246: if (this.oldPrims) return this.namedPrimitive('MiscPrimitivePlugin', 'primitiveFindSubstring', argCount);\n break; // fail 243-246 if fell through\n // 247: unused\n case 248: return this.vm.primitiveInvokeObjectAsMethod(argCount, primMethod); // see findSelectorInClass()\n case 249: return this.primitiveArrayBecome(argCount, false); // one way, opt. copy hash\n case 254: return this.primitiveVMParameter(argCount);\n } else switch (index) { // Chrome only optimized up to 128 cases\n //MIDI Primitives (520-539)\n case 521: return this.namedPrimitive('MIDIPlugin', 'primitiveMIDIClosePort', argCount);\n case 522: return this.namedPrimitive('MIDIPlugin', 'primitiveMIDIGetClock', argCount);\n case 523: return this.namedPrimitive('MIDIPlugin', 'primitiveMIDIGetPortCount', argCount);\n case 524: return this.namedPrimitive('MIDIPlugin', 'primitiveMIDIGetPortDirectionality', argCount);\n case 525: return this.namedPrimitive('MIDIPlugin', 'primitiveMIDIGetPortName', argCount);\n case 526: return this.namedPrimitive('MIDIPlugin', 'primitiveMIDIOpenPort', argCount);\n case 527: return this.namedPrimitive('MIDIPlugin', 'primitiveMIDIParameterGetOrSet', argCount);\n case 528: return this.namedPrimitive('MIDIPlugin', 'primitiveMIDIRead', argCount);\n case 529: return this.namedPrimitive('MIDIPlugin', 'primitiveMIDIWrite', argCount);\n // 530-539: reserved for extended MIDI primitives\n // Sound Codec Primitives\n case 550: return this.namedPrimitive('ADPCMCodecPlugin', 'primitiveDecodeMono', argCount);\n case 551: return this.namedPrimitive('ADPCMCodecPlugin', 'primitiveDecodeStereo', argCount);\n case 552: return this.namedPrimitive('ADPCMCodecPlugin', 'primitiveEncodeMono', argCount);\n case 553: return this.namedPrimitive('ADPCMCodecPlugin', 'primitiveEncodeStereo', argCount);\n // External primitive support primitives (570-574)\n // case 570: return this.primitiveFlushExternalPrimitives(argCount);\n case 571: return this.primitiveUnloadModule(argCount);\n case 572: return this.primitiveListBuiltinModule(argCount);\n case 573: return this.primitiveListLoadedModule(argCount);\n }\n console.error(\"primitive \" + index + \" not implemented yet\");\n return false;\n },\n namedPrimitive: function(modName, functionName, argCount) {\n // duplicated in loadFunctionFrom()\n var mod = modName === \"\" ? this : this.loadedModules[modName];\n if (mod === undefined) { // null if earlier load failed\n mod = this.loadModule(modName);\n this.loadedModules[modName] = mod;\n }\n var result = false;\n if (mod) {\n this.interpreterProxy.argCount = argCount;\n var primitive = mod[functionName];\n if (typeof primitive === \"function\") {\n result = mod[functionName](argCount);\n } else if (typeof primitive === \"string\") {\n // allow late binding for built-ins\n result = this[primitive](argCount);\n } else {\n this.vm.warnOnce(\"missing primitive: \" + modName + \".\" + functionName);\n }\n } else {\n this.vm.warnOnce(\"missing module: \" + modName + \" (\" + functionName + \")\");\n }\n if (result === true || result === false) return result;\n return this.success;\n },\n doNamedPrimitive: function(argCount, primMethod) {\n if (primMethod.pointersSize() < 2) return false;\n var firstLiteral = primMethod.pointers[1]; // skip method header\n if (firstLiteral.pointersSize() !== 4) return false;\n this.primMethod = primMethod;\n var moduleName = firstLiteral.pointers[0].bytesAsString();\n var functionName = firstLiteral.pointers[1].bytesAsString();\n return this.namedPrimitive(moduleName, functionName, argCount);\n },\n fakePrimitive: function(prim, retVal, argCount) {\n // fake a named primitive\n // prim and retVal need to be curried when used:\n // this.fakePrimitive.bind(this, \"Module.primitive\", 42)\n this.vm.warnOnce(\"faking primitive: \" + prim);\n if (retVal === undefined) this.vm.popN(argCount);\n else this.vm.popNandPush(argCount+1, this.makeStObject(retVal));\n return true;\n },\n},\n'modules', {\n loadModule: function(modName) {\n var mod = Squeak.externalModules[modName] || this.builtinModules[modName];\n if (!mod) return null;\n if (this.patchModules[modName])\n this.patchModule(mod, modName);\n if (mod.setInterpreter) {\n if (!mod.setInterpreter(this.interpreterProxy)) {\n console.log(\"Wrong interpreter proxy version: \" + modName);\n return null;\n }\n }\n var initFunc = mod.initialiseModule;\n if (typeof initFunc === 'function') {\n mod.initialiseModule();\n } else if (typeof initFunc === 'string') {\n // allow late binding for built-ins\n this[initFunc]();\n }\n if (this.interpreterProxy.failed()) {\n console.log(\"Module initialization failed: \" + modName);\n return null;\n }\n console.log(\"Loaded module: \" + modName);\n return mod;\n },\n patchModule: function(mod, modName) {\n var patch = this.patchModules[modName];\n for (var key in patch)\n mod[key] = patch[key];\n },\n unloadModule: function(modName) {\n var mod = this.loadedModules[modName];\n if (!modName || !mod|| mod === this) return null;\n delete this.loadedModules[modName];\n var unloadFunc = mod.unloadModule;\n if (typeof unloadFunc === 'function') {\n mod.unloadModule(this);\n } else if (typeof unloadFunc === 'string') {\n // allow late binding for built-ins\n this[unloadFunc](this);\n }\n console.log(\"Unloaded module: \" + modName);\n return mod;\n },\n loadFunctionFrom: function(functionName, modName) {\n // copy of namedPrimitive() returning the bound function instead of calling it\n var mod = modName === \"\" ? this : this.loadedModules[modName];\n if (mod === undefined) { // null if earlier load failed\n mod = this.loadModule(modName);\n this.loadedModules[modName] = mod;\n }\n if (!mod) return null;\n var func = mod[functionName];\n if (typeof func === \"function\") {\n return func.bind(mod);\n } else if (typeof func === \"string\") {\n return (this[func]).bind(this);\n }\n this.vm.warnOnce(\"missing primitive: \" + modName + \".\" + functionName);\n return null;\n },\n primitiveUnloadModule: function(argCount) {\n var moduleName = this.stackNonInteger(0).bytesAsString();\n if (!moduleName) return false;\n this.unloadModule(moduleName);\n return this.popNIfOK(argCount);\n },\n primitiveListBuiltinModule: function(argCount) {\n var index = this.stackInteger(0) - 1;\n if (!this.success) return false;\n var moduleNames = Object.keys(this.builtinModules);\n return this.popNandPushIfOK(argCount + 1, this.makeStObject(moduleNames[index]));\n },\n primitiveListLoadedModule: function(argCount) {\n var index = this.stackInteger(0) - 1;\n if (!this.success) return false;\n var moduleNames = [];\n for (var key in this.loadedModules) {\n var module = this.loadedModules[key];\n if (module) {\n var moduleName = module.getModuleName ? module.getModuleName() : key;\n moduleNames.push(moduleName);\n }\n }\n return this.popNandPushIfOK(argCount + 1, this.makeStObject(moduleNames[index]));\n },\n},\n'stack access', {\n popNIfOK: function(nToPop) {\n if (!this.success) return false;\n this.vm.popN(nToPop);\n return true;\n },\n pop2andPushBoolIfOK: function(bool) {\n this.vm.success = this.success;\n return this.vm.pop2AndPushBoolResult(bool);\n },\n popNandPushIfOK: function(nToPop, returnValue) {\n if (!this.success || returnValue == null) return false;\n this.vm.popNandPush(nToPop, returnValue);\n return true;\n },\n popNandPushIntIfOK: function(nToPop, returnValue) {\n if (!this.success || !this.vm.canBeSmallInt(returnValue)) return false;\n return this.popNandPushIfOK(nToPop, returnValue);\n },\n popNandPushFloatIfOK: function(nToPop, returnValue) {\n if (!this.success) return false;\n return this.popNandPushIfOK(nToPop, this.makeFloat(returnValue));\n },\n stackNonInteger: function(nDeep) {\n return this.checkNonInteger(this.vm.stackValue(nDeep));\n },\n stackInteger: function(nDeep) {\n return this.checkSmallInt(this.vm.stackValue(nDeep));\n },\n stackPos32BitInt: function(nDeep) {\n return this.positive32BitValueOf(this.vm.stackValue(nDeep));\n },\n pos32BitIntFor: function(signed32) {\n // Return the 32-bit quantity as an unsigned 32-bit integer\n if (signed32 >= 0 && signed32 <= Squeak.MaxSmallInt) return signed32;\n var lgIntClass = this.vm.specialObjects[Squeak.splOb_ClassLargePositiveInteger],\n lgIntObj = this.vm.instantiateClass(lgIntClass, 4),\n bytes = lgIntObj.bytes;\n for (var i=0; i<4; i++)\n bytes[i] = (signed32>>>(8*i)) & 255;\n return lgIntObj;\n },\n pos64BitIntFor: function(longlong) {\n // Return the quantity as an unsigned 64-bit integer\n if (longlong <= 0xFFFFFFFF) return this.pos32BitIntFor(longlong);\n var sz = longlong <= 0xFFFFFFFFFF ? 5 :\n longlong <= 0xFFFFFFFFFFFF ? 6 :\n longlong <= 0xFFFFFFFFFFFFFF ? 7 : 8;\n var lgIntClass = this.vm.specialObjects[Squeak.splOb_ClassLargePositiveInteger],\n lgIntObj = this.vm.instantiateClass(lgIntClass, sz),\n bytes = lgIntObj.bytes;\n for (var i = 0; i < sz; i++) {\n bytes[i] = longlong & 255;\n longlong /= 256;\n }\n return lgIntObj;\n },\n stackSigned32BitInt: function(nDeep) {\n var stackVal = this.vm.stackValue(nDeep);\n if (typeof stackVal === \"number\") { // SmallInteger\n return stackVal;\n }\n if (stackVal.bytesSize() !== 4) {\n this.success = false;\n return 0;\n }\n var bytes = stackVal.bytes,\n value = 0;\n for (var i = 0, f = 1; i < 4; i++, f *= 256)\n value += bytes[i] * f;\n if (this.isA(stackVal, Squeak.splOb_ClassLargePositiveInteger))\n return value;\n if (this.isA(stackVal, Squeak.splOb_ClassLargeNegativeInteger))\n return -value;\n this.success = false;\n return 0;\n },\n signed32BitIntegerFor: function(signed32) {\n // Return the 32-bit quantity as a signed 32-bit integer\n if (signed32 >= Squeak.MinSmallInt && signed32 <= Squeak.MaxSmallInt) return signed32;\n var negative = signed32 < 0,\n unsigned = negative ? -signed32 : signed32,\n lgIntClass = negative ? Squeak.splOb_ClassLargeNegativeInteger : Squeak.splOb_ClassLargePositiveInteger,\n lgIntObj = this.vm.instantiateClass(this.vm.specialObjects[lgIntClass], 4),\n bytes = lgIntObj.bytes;\n for (var i=0; i<4; i++)\n bytes[i] = (unsigned>>>(8*i)) & 255;\n return lgIntObj;\n },\n stackFloat: function(nDeep) {\n return this.checkFloat(this.vm.stackValue(nDeep));\n },\n stackBoolean: function(nDeep) {\n return this.checkBoolean(this.vm.stackValue(nDeep));\n },\n stackSigned53BitInt:function(nDeep) {\n var stackVal = this.vm.stackValue(nDeep);\n if (typeof stackVal === \"number\") { // SmallInteger\n return stackVal;\n }\n var n = stackVal.bytesSize();\n if (n <= 7) {\n var bytes = stackVal.bytes,\n value = 0;\n for (var i = 0, f = 1; i < n; i++, f *= 256)\n value += bytes[i] * f;\n if (value < 9007199254740992) {\n if (this.isA(stackVal, Squeak.splOb_ClassLargePositiveInteger))\n return value;\n if (this.isA(stackVal, Squeak.splOb_ClassLargeNegativeInteger))\n return -value;\n }\n }\n this.success = false;\n return 0;\n },\n},\n'numbers', {\n doBitAnd: function() {\n var rcvr = this.stackPos32BitInt(1);\n var arg = this.stackPos32BitInt(0);\n if (!this.success) return 0;\n return this.pos32BitIntFor(rcvr & arg);\n },\n doBitOr: function() {\n var rcvr = this.stackPos32BitInt(1);\n var arg = this.stackPos32BitInt(0);\n if (!this.success) return 0;\n return this.pos32BitIntFor(rcvr | arg);\n },\n doBitXor: function() {\n var rcvr = this.stackPos32BitInt(1);\n var arg = this.stackPos32BitInt(0);\n if (!this.success) return 0;\n return this.pos32BitIntFor(rcvr ^ arg);\n },\n doBitShift: function() {\n var rcvr = this.stackPos32BitInt(1);\n var arg = this.stackInteger(0);\n if (!this.success) return 0;\n var result = this.vm.safeShift(rcvr, arg); // returns negative result if failed\n if (result > 0)\n return this.pos32BitIntFor(this.vm.safeShift(rcvr, arg));\n this.success = false;\n return 0;\n },\n safeFDiv: function(dividend, divisor) {\n if (divisor === 0.0) {\n this.success = false;\n return 1.0;\n }\n return dividend / divisor;\n },\n floatAsSmallInt: function(float) {\n var truncated = float >= 0 ? Math.floor(float) : Math.ceil(float);\n return this.ensureSmallInt(truncated);\n },\n frexp_exponent: function(value) {\n // frexp separates a float into its mantissa and exponent\n if (value == 0.0) return 0; // zero is special\n var data = new DataView(new ArrayBuffer(8));\n data.setFloat64(0, value); // for accessing IEEE-754 exponent bits\n var bits = (data.getUint32(0) >>> 20) & 0x7FF;\n if (bits === 0) { // we have a subnormal float (actual zero was handled above)\n // make it normal by multiplying a large number\n data.setFloat64(0, value * Math.pow(2, 64));\n // access its exponent bits, and subtract the large number's exponent\n bits = ((data.getUint32(0) >>> 20) & 0x7FF) - 64;\n }\n var exponent = bits - 1022; // apply bias\n // mantissa = this.ldexp(value, -exponent) // not needed for Squeak\n return exponent;\n },\n ldexp: function(mantissa, exponent) {\n // construct a float from mantissa and exponent\n return exponent > 1023 // avoid multiplying by infinity\n ? mantissa * Math.pow(2, 1023) * Math.pow(2, exponent - 1023)\n : exponent < -1074 // avoid multiplying by zero\n ? mantissa * Math.pow(2, -1074) * Math.pow(2, exponent + 1074)\n : mantissa * Math.pow(2, exponent);\n },\n primitiveLessThanLargeIntegers: function() {\n return this.pop2andPushBoolIfOK(this.stackSigned53BitInt(1) < this.stackSigned53BitInt(0));\n },\n primitiveGreaterThanLargeIntegers: function() {\n return this.pop2andPushBoolIfOK(this.stackSigned53BitInt(1) > this.stackSigned53BitInt(0));\n },\n primitiveLessOrEqualLargeIntegers: function() {\n return this.pop2andPushBoolIfOK(this.stackSigned53BitInt(1) <= this.stackSigned53BitInt(0));\n },\n primitiveGreaterOrEqualLargeIntegers: function() {\n return this.pop2andPushBoolIfOK(this.stackSigned53BitInt(1) >= this.stackSigned53BitInt(0));\n },\n primitiveEqualLargeIntegers: function() {\n return this.pop2andPushBoolIfOK(this.stackSigned53BitInt(1) === this.stackSigned53BitInt(0));\n },\n primitiveNotEqualLargeIntegers: function() {\n return this.pop2andPushBoolIfOK(this.stackSigned53BitInt(1) !== this.stackSigned53BitInt(0));\n },\n},\n'utils', {\n floatOrInt: function(obj) {\n if (obj.isFloat) return obj.float;\n if (typeof obj === \"number\") return obj; // SmallInteger\n return 0;\n },\n positive32BitValueOf: function(obj) {\n if (typeof obj === \"number\") { // SmallInteger\n if (obj >= 0)\n return obj;\n this.success = false;\n return 0;\n }\n if (!this.isA(obj, Squeak.splOb_ClassLargePositiveInteger) || obj.bytesSize() !== 4) {\n this.success = false;\n return 0;\n }\n var bytes = obj.bytes,\n value = 0;\n for (var i = 0, f = 1; i < 4; i++, f *= 256)\n value += bytes[i] * f;\n return value;\n },\n checkFloat: function(maybeFloat) { // returns a number and sets success\n if (maybeFloat.isFloat)\n return maybeFloat.float;\n if (typeof maybeFloat === \"number\") // SmallInteger\n return maybeFloat;\n this.success = false;\n return 0.0;\n },\n checkSmallInt: function(maybeSmall) { // returns an int and sets success\n if (typeof maybeSmall === \"number\")\n return maybeSmall;\n this.success = false;\n return 0;\n },\n checkNonInteger: function(obj) { // returns a SqObj and sets success\n if (typeof obj !== \"number\")\n return obj;\n this.success = false;\n return this.vm.nilObj;\n },\n checkBoolean: function(obj) { // returns true/false and sets success\n if (obj.isTrue) return true;\n if (obj.isFalse) return false;\n return this.success = false;\n },\n indexableSize: function(obj) {\n if (typeof obj === \"number\") return -1; // -1 means not indexable\n var fmt = obj.format;\n if (fmt<2) return -1; //not indexable\n if (fmt===3 && this.vm.isContext(obj) && !this.allowAccessBeyondSP)\n return obj.pointers[Squeak.Context_stackPointer]; // no access beyond top of stacks\n if (fmt<6) return obj.pointersSize() - obj.instSize(); // pointers\n if (fmt<8) return obj.wordsSize(); // words\n if (fmt<12) return obj.bytesSize(); // bytes\n return obj.bytesSize() + (4 * obj.pointersSize()); // methods\n },\n isA: function(obj, knownClass) {\n return obj.sqClass === this.vm.specialObjects[knownClass];\n },\n isKindOf: function(obj, knownClass) {\n var classOrSuper = obj.sqClass;\n var theClass = this.vm.specialObjects[knownClass];\n while (!classOrSuper.isNil) {\n if (classOrSuper === theClass) return true;\n classOrSuper = classOrSuper.pointers[Squeak.Class_superclass];\n }\n return false;\n },\n isAssociation: function(obj) {\n return typeof obj !== \"number\" && obj.pointersSize() == 2;\n },\n ensureSmallInt: function(number) {\n if (number === (number|0) && this.vm.canBeSmallInt(number))\n return number;\n this.success = false;\n return 0;\n },\n charFromInt: function(ascii) {\n var charTable = this.vm.specialObjects[Squeak.splOb_CharacterTable];\n return charTable.pointers[ascii];\n },\n makeFloat: function(value) {\n var floatClass = this.vm.specialObjects[Squeak.splOb_ClassFloat];\n var newFloat = this.vm.instantiateClass(floatClass, 2);\n newFloat.float = value;\n return newFloat;\n },\n makeLargeIfNeeded: function(integer) {\n return this.vm.canBeSmallInt(integer) ? integer : this.makeLargeInt(integer);\n },\n makeLargeInt: function(integer) {\n if (integer < 0) throw Error(\"negative large ints not implemented yet\");\n if (integer > 0xFFFFFFFF) throw Error(\"large large ints not implemented yet\");\n return this.pos32BitIntFor(integer);\n },\n makePointWithXandY: function(x, y) {\n var pointClass = this.vm.specialObjects[Squeak.splOb_ClassPoint];\n var newPoint = this.vm.instantiateClass(pointClass, 0);\n newPoint.pointers[Squeak.Point_x] = x;\n newPoint.pointers[Squeak.Point_y] = y;\n return newPoint;\n },\n makeStArray: function(jsArray, proxyClass) {\n var array = this.vm.instantiateClass(this.vm.specialObjects[Squeak.splOb_ClassArray], jsArray.length);\n for (var i = 0; i < jsArray.length; i++)\n array.pointers[i] = this.makeStObject(jsArray[i], proxyClass);\n return array;\n },\n makeStString: function(jsString) {\n var bytes = [];\n for (var i = 0; i < jsString.length; ++i)\n bytes.push(jsString.charCodeAt(i) & 0xFF);\n var stString = this.vm.instantiateClass(this.vm.specialObjects[Squeak.splOb_ClassString], bytes.length);\n stString.bytes = bytes;\n return stString;\n },\n makeStObject: function(obj, proxyClass) {\n if (obj === undefined || obj === null) return this.vm.nilObj;\n if (obj === true) return this.vm.trueObj;\n if (obj === false) return this.vm.falseObj;\n if (obj.sqClass) return obj;\n if (typeof obj === \"number\")\n if (obj === (obj|0)) return this.makeLargeIfNeeded(obj);\n else return this.makeFloat(obj);\n if (proxyClass) { // wrap in JS proxy instance \n var stObj = this.vm.instantiateClass(proxyClass, 0);\n stObj.jsObject = obj;\n return stObj;\n } \n if (typeof obj === \"string\" || obj.constructor === Uint8Array) return this.makeStString(obj);\n if (obj.constructor === Array) return this.makeStArray(obj);\n throw Error(\"cannot make smalltalk object\");\n },\n pointsTo: function(rcvr, arg) {\n if (!rcvr.pointers) return false;\n return rcvr.pointers.indexOf(arg) >= 0;\n },\n asUint8Array: function(buffer) {\n if (buffer.constructor === Uint8Array) return buffer;\n if (buffer.constructor === ArrayBuffer) return new Uint8Array(buffer);\n if (typeof buffer === \"string\") {\n var array = new Uint8Array(buffer.length);\n for (var i = 0; i < buffer.length; i++)\n array[i] = buffer.charCodeAt(i);\n return array;\n }\n throw Error(\"unknown buffer type\");\n },\n filenameToSqueak: function(unixpath) {\n var slash = unixpath[0] !== \"/\" ? \"/\" : \"\",\n filepath = \"/SqueakJS\" + slash + unixpath; // add SqueakJS\n if (this.emulateMac)\n filepath = (\"Macintosh HD\" + filepath) // add Mac volume\n .replace(/\\//g, \"€\").replace(/:/g, \"/\").replace(/€/g, \":\"); // substitute : for /\n return filepath;\n },\n filenameFromSqueak: function(filepath) {\n var unixpath = !this.emulateMac ? filepath :\n filepath.replace(/^[^:]*:/, \":\") // remove volume\n .replace(/\\//g, \"€\").replace(/:/g, \"/\").replace(/€/g, \":\"); // substitute : for /\n unixpath = unixpath.replace(/^\\/*SqueakJS\\/?/, \"/\"); // strip SqueakJS\n return unixpath;\n },\n},\n'indexing', {\n objectAt: function(cameFromBytecode, convertChars, includeInstVars) {\n //Returns result of at: or sets success false\n var array = this.stackNonInteger(1);\n var index = this.stackPos32BitInt(0); //note non-int returns zero\n if (!this.success) return array;\n var info;\n if (cameFromBytecode) {// fast entry checks cache\n info = this.atCache[array.hash & this.atCacheMask];\n if (info.array !== array) {this.success = false; return array;}\n } else {// slow entry installs in cache if appropriate\n if (array.isFloat) { // present float as word array\n var floatData = array.floatData();\n if (index==1) return this.pos32BitIntFor(floatData.getUint32(0, false));\n if (index==2) return this.pos32BitIntFor(floatData.getUint32(4, false));\n this.success = false; return array;\n }\n info = this.makeAtCacheInfo(this.atCache, this.vm.specialSelectors[32], array, convertChars, includeInstVars);\n }\n if (index < 1 || index > info.size) {this.success = false; return array;}\n if (includeInstVars) //pointers... instVarAt and objectAt\n return array.pointers[index-1];\n if (array.format<6) //pointers... normal at:\n return array.pointers[index-1+info.ivarOffset];\n if (array.format<8) // words...\n return this.pos32BitIntFor(array.words[index-1]);\n if (array.format<12) // bytes...\n if (info.convertChars) return this.charFromInt(array.bytes[index-1] & 0xFF);\n else return array.bytes[index-1] & 0xFF;\n // methods (format>=12) must simulate Squeak's method indexing\n var offset = array.pointersSize() * 4;\n if (index-1-offset < 0) {this.success = false; return array;} //reading lits as bytes\n return array.bytes[index-1-offset] & 0xFF;\n },\n objectAtPut: function(cameFromBytecode, convertChars, includeInstVars) {\n //Returns result of at:put: or sets success false\n var array = this.stackNonInteger(2);\n var index = this.stackPos32BitInt(1); //note non-int returns zero\n if (!this.success) return array;\n var info;\n if (cameFromBytecode) {// fast entry checks cache\n info = this.atPutCache[array.hash & this.atCacheMask];\n if (info.array !== array) {this.success = false; return array;}\n } else {// slow entry installs in cache if appropriate\n if (array.isFloat) { // present float as word array\n var wordToPut = this.stackPos32BitInt(0);\n if (this.success && (index == 1 || index == 2)) {\n var floatData = array.floatData();\n floatData.setUint32(index == 1 ? 0 : 4, wordToPut, false);\n array.float = floatData.getFloat64(0);\n } else this.success = false;\n return this.vm.stackValue(0);\n }\n info = this.makeAtCacheInfo(this.atPutCache, this.vm.specialSelectors[34], array, convertChars, includeInstVars);\n }\n if (index<1 || index>info.size) {this.success = false; return array;}\n var objToPut = this.vm.stackValue(0);\n if (includeInstVars) // pointers... instVarAtPut and objectAtPut\n return array.pointers[index-1] = objToPut; //eg, objectAt:\n if (array.format<6) // pointers... normal atPut\n return array.pointers[index-1+info.ivarOffset] = objToPut;\n var intToPut;\n if (array.format<8) { // words...\n intToPut = this.stackPos32BitInt(0);\n if (this.success) array.words[index-1] = intToPut;\n return objToPut;\n }\n // bytes...\n if (convertChars) {\n // put a character...\n if (objToPut.sqClass !== this.vm.specialObjects[Squeak.splOb_ClassCharacter])\n {this.success = false; return objToPut;}\n intToPut = objToPut.pointers[0];\n if (typeof intToPut !== \"number\") {this.success = false; return objToPut;}\n } else { // put a byte...\n if (typeof objToPut !== \"number\") {this.success = false; return objToPut;}\n intToPut = objToPut;\n }\n if (intToPut<0 || intToPut>255) {this.success = false; return objToPut;}\n if (array.format<8) // bytes...\n return array.bytes[index-1] = intToPut;\n // methods (format>=12) must simulate Squeak's method indexing\n var offset = array.pointersSize() * 4;\n if (index-1-offset < 0) {this.success = false; return array;} //writing lits as bytes\n array.bytes[index-1-offset] = intToPut;\n return objToPut;\n },\n objectSize: function(cameFromBytecode) {\n var rcvr = this.vm.stackValue(0),\n size = -1;\n if (cameFromBytecode) {\n // must only handle classes with size == basicSize, fail otherwise\n if (rcvr.sqClass === this.vm.specialObjects[Squeak.splOb_ClassArray]) {\n size = rcvr.pointersSize();\n } else if (rcvr.sqClass === this.vm.specialObjects[Squeak.splOb_ClassString]) {\n size = rcvr.bytesSize();\n }\n } else { // basicSize\n size = this.indexableSize(rcvr);\n }\n if (size === -1) {this.success = false; return -1}; //not indexable\n return this.pos32BitIntFor(size);\n },\n initAtCache: function() {\n // The purpose of the at-cache is to allow fast (bytecode) access to at/atput code\n // without having to check whether this object has overridden at, etc.\n this.atCacheSize = 32; // must be power of 2\n this.atCacheMask = this.atCacheSize - 1; //...so this is a mask\n this.atCache = [];\n this.atPutCache = [];\n this.nonCachedInfo = {};\n for (var i= 0; i < this.atCacheSize; i++) {\n this.atCache.push({});\n this.atPutCache.push({});\n }\n },\n clearAtCache: function() { //clear at-cache pointers (prior to GC)\n this.nonCachedInfo.array = null;\n for (var i= 0; i < this.atCacheSize; i++) {\n this.atCache[i].array = null;\n this.atPutCache[i].array = null;\n }\n },\n makeAtCacheInfo: function(atOrPutCache, atOrPutSelector, array, convertChars, includeInstVars) {\n //Make up an info object and store it in the atCache or the atPutCache.\n //If it's not cacheable (not a non-super send of at: or at:put:)\n //then return the info in nonCachedInfo.\n //Note that info for objectAt (includeInstVars) will have\n //a zero ivarOffset, and a size that includes the extra instVars\n var info;\n var cacheable =\n (this.vm.verifyAtSelector === atOrPutSelector) //is at or atPut\n && (this.vm.verifyAtClass === array.sqClass) //not a super send\n && !(array.format === 3 && this.vm.isContext(array)); //not a context (size can change)\n info = cacheable ? atOrPutCache[array.hash & this.atCacheMask] : this.nonCachedInfo;\n info.array = array;\n info.convertChars = convertChars;\n if (includeInstVars) {\n info.size = array.instSize() + Math.max(0, this.indexableSize(array));\n info.ivarOffset = 0;\n } else {\n info.size = this.indexableSize(array);\n info.ivarOffset = (array.format < 6) ? array.instSize() : 0;\n }\n return info;\n },\n},\n'basic',{\n instantiateClass: function(clsObj, indexableSize) {\n if (indexableSize * 4 > this.vm.image.bytesLeft()) {\n // we're not really out of memory, we have no idea how much memory is available\n // but we need to stop runaway allocations\n console.warn(\"squeak: out of memory\");\n this.success = false;\n return null;\n } else {\n return this.vm.instantiateClass(clsObj, indexableSize);\n }\n },\n someObject: function() {\n return this.vm.image.firstOldObject;\n },\n nextObject: function(obj) {\n return this.vm.image.objectAfter(obj) || 0;\n },\n someInstanceOf: function(clsObj) {\n var someInstance = this.vm.image.someInstanceOf(clsObj);\n if (someInstance) return someInstance;\n this.success = false;\n return 0;\n },\n nextInstanceAfter: function(obj) {\n var nextInstance = this.vm.image.nextInstanceAfter(obj);\n if (nextInstance) return nextInstance;\n this.success = false;\n return 0;\n },\n primitiveFullGC: function(argCount) {\n this.vm.image.fullGC(\"primitive\");\n var bytes = this.vm.image.bytesLeft();\n return this.popNandPushIfOK(1, this.makeLargeIfNeeded(bytes));\n },\n primitiveMakePoint: function(argCount, checkNumbers) {\n var x = this.vm.stackValue(1);\n var y = this.vm.stackValue(0);\n if (checkNumbers) {\n this.checkFloat(x);\n this.checkFloat(y);\n if (!this.success) return false;\n }\n this.vm.popNandPush(1+argCount, this.makePointWithXandY(x, y));\n return true;\n },\n primitiveStoreStackp: function(argCount) {\n var ctxt = this.stackNonInteger(1),\n newStackp = this.stackInteger(0);\n if (!this.success || newStackp < 0 || this.vm.decodeSqueakSP(newStackp) >= ctxt.pointers.length)\n return false;\n var stackp = ctxt.pointers[Squeak.Context_stackPointer];\n while (stackp < newStackp)\n ctxt.pointers[this.vm.decodeSqueakSP(++stackp)] = this.vm.nilObj;\n ctxt.pointers[Squeak.Context_stackPointer] = newStackp;\n this.vm.popN(argCount);\n return true;\n },\n primitiveChangeClass: function(argCount) {\n if (argCount !== 1) return false;\n var rcvr = this.stackNonInteger(1),\n arg = this.stackNonInteger(0);\n if (!this.success) return false;\n if (rcvr.format !== arg.format ||\n rcvr.sqClass.isCompact !== arg.sqClass.isCompact ||\n rcvr.sqClass.classInstSize() !== arg.sqClass.classInstSize())\n return false;\n rcvr.sqClass = arg.sqClass;\n return this.popNIfOK(1);\n },\n primitiveDoPrimitiveWithArgs: function(argCount) {\n var argumentArray = this.stackNonInteger(0),\n primIdx = this.stackInteger(1);\n if (!this.success) return false;\n var arraySize = argumentArray.pointersSize(),\n cntxSize = this.vm.activeContext.pointersSize();\n if (this.vm.sp + arraySize >= cntxSize) return false;\n // Pop primIndex and argArray, then push args in place...\n this.vm.popN(2);\n for (var i = 0; i < arraySize; i++)\n this.vm.push(argumentArray.pointers[i]);\n // Run the primitive\n if (this.vm.tryPrimitive(primIdx, arraySize))\n return true;\n // Primitive failed, restore state for failure code\n this.vm.popN(arraySize);\n this.vm.push(primIdx);\n this.vm.push(argumentArray);\n return false;\n },\n primitiveShortAtAndPut: function(argCount) {\n var rcvr = this.stackNonInteger(argCount),\n index = this.stackInteger(argCount-1) - 1, // make zero-based\n array = rcvr.wordsAsInt16Array();\n if (!this.success || !array || index < 0 || index >= array.length)\n return false;\n var value;\n if (argCount < 2) { // shortAt:\n value = array[index];\n } else { // shortAt:put:\n value = this.stackInteger(0);\n if (value < -32768 || value > 32767)\n return false;\n array[index] = value;\n }\n this.popNandPushIfOK(argCount+1, value);\n return true;\n },\n primitiveIntegerAtAndPut: function(argCount) {\n var rcvr = this.stackNonInteger(argCount),\n index = this.stackInteger(argCount-1) - 1, // make zero-based\n array = rcvr.wordsAsInt32Array();\n if (!this.success || !array || index < 0 || index >= array.length)\n return false;\n var value;\n if (argCount < 2) { // integerAt:\n value = this.signed32BitIntegerFor(array[index]);\n } else { // integerAt:put:\n value = this.stackSigned32BitInt(0);\n if (!this.success)\n return false;\n array[index] = value;\n }\n this.popNandPushIfOK(argCount+1, value);\n return true;\n },\n primitiveConstantFill: function(argCount) {\n var rcvr = this.stackNonInteger(1),\n value = this.stackPos32BitInt(0);\n if (!this.success || !rcvr.isWordsOrBytes())\n return false;\n var array = rcvr.words || rcvr.bytes;\n if (array) {\n if (array === rcvr.bytes && value > 255)\n return false;\n for (var i = 0; i < array.length; i++)\n array[i] = value;\n }\n this.vm.popN(argCount);\n return true;\n },\n primitiveNewMethod: function(argCount) {\n var header = this.stackInteger(0);\n var bytecodeCount = this.stackInteger(1);\n if (!this.success) return 0;\n var litCount = (header>>9) & 0xFF;\n var method = this.vm.instantiateClass(this.vm.stackValue(2), bytecodeCount);\n method.pointers = [header];\n for (var i = 0; i < litCount; i++)\n method.pointers.push(this.vm.nilObj);\n this.vm.popNandPush(1+argCount, method);\n if (this.vm.breakOnNewMethod) // break on doit\n this.vm.breakOnMethod = method;\n return true;\n },\n primitiveExecuteMethodArgsArray: function(argCount) {\n // receiver, argsArray, then method are on top of stack. Execute method with\n // receiver and args.\n var methodObj = this.stackNonInteger(0),\n argsArray = this.stackNonInteger(1),\n receiver = this.vm.stackValue(2);\n // Allow for up to two extra arguments (e.g. for mirror primitives).\n if (!this.success || !this.vm.isMethod(methodObj) || argCount > 4) return false;\n var numArgs = methodObj.methodNumArgs();\n if (numArgs !== argsArray.pointersSize()) return false;\n // drop all args, push receiver, and new arguments\n this.vm.popNandPush(argCount+1, receiver);\n for (var i = 0; i < numArgs; i++)\n this.vm.push(argsArray.pointers[i]);\n this.vm.executeNewMethod(receiver, methodObj, numArgs, methodObj.methodPrimitiveIndex(), null, null);\n return true;\n },\n primitiveArrayBecome: function(argCount, doBothWays) {\n var rcvr = this.stackNonInteger(argCount),\n arg = this.stackNonInteger(argCount-1),\n copyHash = argCount > 1 ? this.stackBoolean(argCount-2) : true;\n if (!this.success) return false;\n this.success = this.vm.image.bulkBecome(rcvr.pointers, arg.pointers, doBothWays, copyHash);\n return this.popNIfOK(argCount);\n },\n doStringReplace: function() {\n var dst = this.stackNonInteger(4);\n var dstPos = this.stackInteger(3) - 1;\n var count = this.stackInteger(2) - dstPos;\n var src = this.stackNonInteger(1);\n var srcPos = this.stackInteger(0) - 1;\n if (!this.success) return dst; //some integer not right\n var srcFmt = src.format;\n var dstFmt = dst.format;\n if (dstFmt < 8)\n if (dstFmt != srcFmt) {this.success = false; return dst;} //incompatible formats\n else\n if ((dstFmt&0xC) != (srcFmt&0xC)) {this.success = false; return dst;} //incompatible formats\n if (srcFmt<4) {//pointer type objects\n var totalLength = src.pointersSize();\n var srcInstSize = src.instSize();\n srcPos += srcInstSize;\n if ((srcPos < 0) || (srcPos + count) > totalLength)\n {this.success = false; return dst;} //would go out of bounds\n totalLength = dst.pointersSize();\n var dstInstSize= dst.instSize();\n dstPos += dstInstSize;\n if ((dstPos < 0) || (dstPos + count) > totalLength)\n {this.success= false; return dst;} //would go out of bounds\n for (var i = 0; i < count; i++)\n dst.pointers[dstPos + i] = src.pointers[srcPos + i];\n return dst;\n } else if (srcFmt < 8) { //words type objects\n var totalLength = src.wordsSize();\n if ((srcPos < 0) || (srcPos + count) > totalLength)\n {this.success = false; return dst;} //would go out of bounds\n totalLength = dst.wordsSize();\n if ((dstPos < 0) || (dstPos + count) > totalLength)\n {this.success = false; return dst;} //would go out of bounds\n for (var i = 0; i < count; i++)\n dst.words[dstPos + i] = src.words[srcPos + i];\n return dst;\n } else { //bytes type objects\n var totalLength = src.bytesSize();\n if ((srcPos < 0) || (srcPos + count) > totalLength)\n {this.success = false; return dst;} //would go out of bounds\n totalLength = dst.bytesSize();\n if ((dstPos < 0) || (dstPos + count) > totalLength)\n {this.success = false; return dst;} //would go out of bounds\n for (var i = 0; i < count; i++)\n dst.bytes[dstPos + i] = src.bytes[srcPos + i];\n return dst;\n }\n },\n primitiveCopyObject: function(argCount) {\n var rcvr = this.stackNonInteger(1),\n arg = this.stackNonInteger(0),\n length = rcvr.pointersSize();\n if (!this.success ||\n rcvr.isWordsOrBytes() ||\n rcvr.sqClass !== arg.sqClass ||\n length !== arg.pointersSize()) return false;\n for (var i = 0; i < length; i++)\n arg.pointers[i] = rcvr.pointers[i];\n this.vm.pop(argCount);\n return true;\n },\n primitiveLoadImageSegment: function(argCount) {\n var segmentWordArray = this.stackNonInteger(1),\n outPointerArray = this.stackNonInteger(0);\n if (!segmentWordArray.words || !outPointerArray.pointers) return false;\n var roots = this.vm.image.loadImageSegment(segmentWordArray, outPointerArray);\n if (!roots) return false;\n return this.popNandPushIfOK(argCount + 1, roots);\n },\n},\n'blocks/closures', {\n doBlockCopy: function() {\n var rcvr = this.vm.stackValue(1);\n var sqArgCount = this.stackInteger(0);\n var homeCtxt = rcvr;\n if(!this.vm.isContext(homeCtxt)) this.success = false;\n if(!this.success) return rcvr;\n if (typeof homeCtxt.pointers[Squeak.Context_method] === \"number\")\n // ctxt is itself a block; get the context for its enclosing method\n homeCtxt = homeCtxt.pointers[Squeak.BlockContext_home];\n var blockSize = homeCtxt.pointersSize() - homeCtxt.instSize(); // could use a const for instSize\n var newBlock = this.vm.instantiateClass(this.vm.specialObjects[Squeak.splOb_ClassBlockContext], blockSize);\n var initialPC = this.vm.encodeSqueakPC(this.vm.pc + 2, this.vm.method); //*** check this...\n newBlock.pointers[Squeak.BlockContext_initialIP] = initialPC;\n newBlock.pointers[Squeak.Context_instructionPointer] = initialPC; // claim not needed; value will set it\n newBlock.pointers[Squeak.Context_stackPointer] = 0;\n newBlock.pointers[Squeak.BlockContext_argumentCount] = sqArgCount;\n newBlock.pointers[Squeak.BlockContext_home] = homeCtxt;\n newBlock.pointers[Squeak.Context_sender] = this.vm.nilObj; // claim not needed; just initialized\n return newBlock;\n },\n primitiveBlockValue: function(argCount) {\n var rcvr = this.vm.stackValue(argCount);\n if (!this.isA(rcvr, Squeak.splOb_ClassBlockContext)) return false;\n var block = rcvr;\n var blockArgCount = block.pointers[Squeak.BlockContext_argumentCount];\n if (typeof blockArgCount !== \"number\") return false;\n if (blockArgCount != argCount) return false;\n if (!block.pointers[Squeak.BlockContext_caller].isNil) return false;\n this.vm.arrayCopy(this.vm.activeContext.pointers, this.vm.sp-argCount+1, block.pointers, Squeak.Context_tempFrameStart, argCount);\n var initialIP = block.pointers[Squeak.BlockContext_initialIP];\n block.pointers[Squeak.Context_instructionPointer] = initialIP;\n block.pointers[Squeak.Context_stackPointer] = argCount;\n block.pointers[Squeak.BlockContext_caller] = this.vm.activeContext;\n this.vm.popN(argCount+1);\n this.vm.newActiveContext(block);\n return true;\n },\n primitiveBlockValueWithArgs: function(argCount) {\n var block = this.vm.stackValue(1);\n var array = this.vm.stackValue(0);\n if (!this.isA(block, Squeak.splOb_ClassBlockContext)) return false;\n if (!this.isA(array, Squeak.splOb_ClassArray)) return false;\n var blockArgCount = block.pointers[Squeak.BlockContext_argumentCount];\n if (typeof blockArgCount !== \"number\") return false;\n if (blockArgCount != array.pointersSize()) return false;\n if (!block.pointers[Squeak.BlockContext_caller].isNil) return false;\n this.vm.arrayCopy(array.pointers, 0, block.pointers, Squeak.Context_tempFrameStart, blockArgCount);\n var initialIP = block.pointers[Squeak.BlockContext_initialIP];\n block.pointers[Squeak.Context_instructionPointer] = initialIP;\n block.pointers[Squeak.Context_stackPointer] = blockArgCount;\n block.pointers[Squeak.BlockContext_caller] = this.vm.activeContext;\n this.vm.popN(argCount+1);\n this.vm.newActiveContext(block);\n return true;\n },\n primitiveClosureCopyWithCopiedValues: function(argCount) {\n this.vm.breakNow(\"primitiveClosureCopyWithCopiedValues\");\n debugger;\n return false;\n },\n primitiveClosureValue: function(argCount) {\n var blockClosure = this.vm.stackValue(argCount),\n blockArgCount = blockClosure.pointers[Squeak.Closure_numArgs];\n if (argCount !== blockArgCount) return false;\n return this.activateNewClosureMethod(blockClosure, argCount);\n },\n primitiveClosureValueWithArgs: function(argCount) {\n var array = this.vm.top(),\n arraySize = array.pointersSize(),\n blockClosure = this.vm.stackValue(argCount),\n blockArgCount = blockClosure.pointers[Squeak.Closure_numArgs];\n if (arraySize !== blockArgCount) return false;\n this.vm.pop();\n for (var i = 0; i < arraySize; i++)\n this.vm.push(array.pointers[i]);\n return this.activateNewClosureMethod(blockClosure, arraySize);\n },\n primitiveClosureValueNoContextSwitch: function(argCount) {\n return this.primitiveClosureValue(argCount);\n },\n activateNewClosureMethod: function(blockClosure, argCount) {\n var outerContext = blockClosure.pointers[Squeak.Closure_outerContext],\n method = outerContext.pointers[Squeak.Context_method],\n newContext = this.vm.allocateOrRecycleContext(method.methodNeedsLargeFrame()),\n numCopied = blockClosure.pointers.length - Squeak.Closure_firstCopiedValue;\n newContext.pointers[Squeak.Context_sender] = this.vm.activeContext;\n newContext.pointers[Squeak.Context_instructionPointer] = blockClosure.pointers[Squeak.Closure_startpc];\n newContext.pointers[Squeak.Context_stackPointer] = argCount + numCopied;\n newContext.pointers[Squeak.Context_method] = outerContext.pointers[Squeak.Context_method];\n newContext.pointers[Squeak.Context_closure] = blockClosure;\n newContext.pointers[Squeak.Context_receiver] = outerContext.pointers[Squeak.Context_receiver];\n // Copy the arguments and copied values ...\n var where = Squeak.Context_tempFrameStart;\n for (var i = 0; i < argCount; i++)\n newContext.pointers[where++] = this.vm.stackValue(argCount - i - 1);\n for (var i = 0; i < numCopied; i++)\n newContext.pointers[where++] = blockClosure.pointers[Squeak.Closure_firstCopiedValue + i];\n // The initial instructions in the block nil-out remaining temps.\n this.vm.popN(argCount + 1);\n this.vm.newActiveContext(newContext);\n return true;\n },\n},\n'scheduling',\n{\n primitiveResume: function() {\n this.resume(this.vm.top());\n return true;\n },\n primitiveSuspend: function() {\n var activeProc = this.getScheduler().pointers[Squeak.ProcSched_activeProcess];\n if (this.vm.top() !== activeProc) return false;\n this.vm.popNandPush(1, this.vm.nilObj);\n this.transferTo(this.pickTopProcess());\n return true;\n },\n getScheduler: function() {\n var assn = this.vm.specialObjects[Squeak.splOb_SchedulerAssociation];\n return assn.pointers[Squeak.Assn_value];\n },\n resume: function(newProc) {\n var activeProc = this.getScheduler().pointers[Squeak.ProcSched_activeProcess];\n var activePriority = activeProc.pointers[Squeak.Proc_priority];\n var newPriority = newProc.pointers[Squeak.Proc_priority];\n if (newPriority > activePriority) {\n this.putToSleep(activeProc);\n this.transferTo(newProc);\n } else {\n this.putToSleep(newProc);\n }\n },\n putToSleep: function(aProcess) {\n //Save the given process on the scheduler process list for its priority.\n var priority = aProcess.pointers[Squeak.Proc_priority];\n var processLists = this.getScheduler().pointers[Squeak.ProcSched_processLists];\n var processList = processLists.pointers[priority - 1];\n this.linkProcessToList(aProcess, processList);\n },\n transferTo: function(newProc) {\n //Record a process to be awakened on the next interpreter cycle.\n var sched = this.getScheduler();\n var oldProc = sched.pointers[Squeak.ProcSched_activeProcess];\n sched.pointers[Squeak.ProcSched_activeProcess] = newProc;\n oldProc.pointers[Squeak.Proc_suspendedContext] = this.vm.activeContext;\n this.vm.newActiveContext(newProc.pointers[Squeak.Proc_suspendedContext]);\n newProc.pointers[Squeak.Proc_suspendedContext] = this.vm.nilObj;\n this.vm.reclaimableContextCount = 0;\n if (this.vm.breakOnContextChanged) {\n this.vm.breakOnContextChanged = false;\n this.vm.breakNow();\n }\n },\n pickTopProcess: function() { // aka wakeHighestPriority\n //Return the highest priority process that is ready to run.\n //Note: It is a fatal VM error if there is no runnable process.\n var schedLists = this.getScheduler().pointers[Squeak.ProcSched_processLists];\n var p = schedLists.pointersSize() - 1; // index of last indexable field\n var processList;\n do {\n if (p < 0) throw Error(\"scheduler could not find a runnable process\");\n processList = schedLists.pointers[p--];\n } while (this.isEmptyList(processList));\n return this.removeFirstLinkOfList(processList);\n },\n linkProcessToList: function(proc, aList) {\n // Add the given process to the given linked list and set the backpointer\n // of process to its new list.\n if (this.isEmptyList(aList))\n aList.pointers[Squeak.LinkedList_firstLink] = proc;\n else {\n var lastLink = aList.pointers[Squeak.LinkedList_lastLink];\n lastLink.pointers[Squeak.Link_nextLink] = proc;\n }\n aList.pointers[Squeak.LinkedList_lastLink] = proc;\n proc.pointers[Squeak.Proc_myList] = aList;\n },\n isEmptyList: function(aLinkedList) {\n return aLinkedList.pointers[Squeak.LinkedList_firstLink].isNil;\n },\n removeFirstLinkOfList: function(aList) {\n //Remove the first process from the given linked list.\n var first = aList.pointers[Squeak.LinkedList_firstLink];\n var last = aList.pointers[Squeak.LinkedList_lastLink];\n if (first === last) {\n aList.pointers[Squeak.LinkedList_firstLink] = this.vm.nilObj;\n aList.pointers[Squeak.LinkedList_lastLink] = this.vm.nilObj;\n } else {\n var next = first.pointers[Squeak.Link_nextLink];\n aList.pointers[Squeak.LinkedList_firstLink] = next;\n }\n first.pointers[Squeak.Link_nextLink] = this.vm.nilObj;\n return first;\n },\n registerSemaphore: function(specialObjIndex) {\n var sema = this.vm.top();\n if (this.isA(sema, Squeak.splOb_ClassSemaphore))\n this.vm.specialObjects[specialObjIndex] = sema;\n else\n this.vm.specialObjects[specialObjIndex] = this.vm.nilObj;\n return this.vm.stackValue(1);\n },\n primitiveWait: function() {\n var sema = this.vm.top();\n if (!this.isA(sema, Squeak.splOb_ClassSemaphore)) return false;\n var excessSignals = sema.pointers[Squeak.Semaphore_excessSignals];\n if (excessSignals > 0)\n sema.pointers[Squeak.Semaphore_excessSignals] = excessSignals - 1;\n else {\n var activeProc = this.getScheduler().pointers[Squeak.ProcSched_activeProcess];\n this.linkProcessToList(activeProc, sema);\n this.transferTo(this.pickTopProcess());\n }\n return true;\n },\n primitiveSignal: function() {\n var sema = this.vm.top();\n if (!this.isA(sema, Squeak.splOb_ClassSemaphore)) return false;\n this.synchronousSignal(sema);\n return true;\n },\n synchronousSignal: function(sema) {\n if (this.isEmptyList(sema)) {\n // no process is waiting on this semaphore\n sema.pointers[Squeak.Semaphore_excessSignals]++;\n } else\n this.resume(this.removeFirstLinkOfList(sema));\n return;\n },\n primitiveSignalAtMilliseconds: function(argCount) { //Delay signal:atMs:\n var msTime = this.stackInteger(0);\n var sema = this.stackNonInteger(1);\n var rcvr = this.stackNonInteger(2);\n if (!this.success) return false;\n if (this.isA(sema, Squeak.splOb_ClassSemaphore)) {\n this.vm.specialObjects[Squeak.splOb_TheTimerSemaphore] = sema;\n this.vm.nextWakeupTick = msTime;\n } else {\n this.vm.specialObjects[Squeak.splOb_TheTimerSemaphore] = this.vm.nilObj;\n this.vm.nextWakeupTick = 0;\n }\n this.vm.popN(argCount); // return self\n return true;\n },\n signalSemaphoreWithIndex: function(semaIndex) {\n // asynch signal: will actually be signaled in checkForInterrupts()\n this.semaphoresToSignal.push(semaIndex);\n },\n signalExternalSemaphores: function() {\n var semaphores = this.vm.specialObjects[Squeak.splOb_ExternalObjectsArray].pointers,\n semaClass = this.vm.specialObjects[Squeak.splOb_ClassSemaphore];\n while (this.semaphoresToSignal.length) {\n var semaIndex = this.semaphoresToSignal.shift(),\n sema = semaphores[semaIndex - 1];\n if (sema.sqClass == semaClass)\n this.synchronousSignal(sema);\n }\n },\n},\n'vm functions', {\n primitiveGetAttribute: function(argCount) {\n var attr = this.stackInteger(0);\n if (!this.success) return false;\n var value;\n switch (attr) {\n case 0: value = this.filenameToSqueak(Squeak.vmPath + Squeak.vmFile); break;\n case 1: value = this.display.documentName || null; break; // 1.x images want document here\n case 2: value = this.display.documentName || null; break; // later images want document here\n case 1001: value = Squeak.platformName; break;\n case 1002: value = Squeak.osVersion; break;\n case 1003: value = Squeak.platformSubtype; break;\n case 1004: value = Squeak.vmVersion; break;\n case 1005: value = Squeak.windowSystem; break;\n case 1006: value = Squeak.vmBuild; break;\n case 1007: value = Squeak.vmVersion; break; // Interpreter class\n // case 1008: Cogit class\n case 1009: value = Squeak.vmVersion; break; // Platform source version\n default: return false;\n }\n this.vm.popNandPush(argCount+1, this.makeStObject(value));\n return true;\n },\n setLowSpaceThreshold: function() {\n var nBytes = this.stackInteger(0);\n if (this.success) this.vm.lowSpaceThreshold = nBytes;\n return this.vm.stackValue(1);\n },\n primitiveVMParameter: function(argCount) {\n /* Behaviour depends on argument count:\n 0 args: return an Array of VM parameter values;\n 1 arg: return the indicated VM parameter;\n 2 args: set the VM indicated parameter. */\n var paramsArraySize = 41;\n switch (argCount) {\n case 0:\n var arrayObj = this.vm.instantiateClass(this.vm.specialObjects[Squeak.splOb_ClassArray], paramsArraySize);\n for (var i = 0; i < paramsArraySize; i++)\n arrayObj.pointers[i] = this.makeStObject(this.vmParameterAt(i+1));\n return this.popNandPushIfOK(1, arrayObj);\n case 1:\n var parm = this.stackInteger(0);\n return this.popNandPushIfOK(2, this.makeStObject(this.vmParameterAt(parm)));\n case 2:\n return this.popNandPushIfOK(3, 0);\n };\n return false;\n },\n vmParameterAt: function(index) {\n switch (index) {\n case 1: return this.vm.image.oldSpaceBytes; // end of old-space (0-based, read-only)\n case 2: return this.vm.image.oldSpaceBytes; // end of young-space (read-only)\n case 3: return this.vm.image.totalMemory; // end of memory (read-only)\n case 4: return this.vm.image.allocationCount + this.vm.image.newSpaceCount; // allocationCount (read-only; nil in Cog VMs)\n // 5 allocations between GCs (read-write; nil in Cog VMs)\n // 6 survivor count tenuring threshold (read-write)\n case 7: return this.vm.image.gcCount; // full GCs since startup (read-only)\n case 8: return this.vm.image.gcMilliseconds; // total milliseconds in full GCs since startup (read-only)\n case 9: return 1; /* image expects > 0 */ // incremental GCs since startup (read-only)\n case 10: return 0; // total milliseconds in incremental GCs since startup (read-only)\n case 11: return this.vm.image.gcTenured; // tenures of surving objects since startup (read-only)\n // 12-20 specific to the translating VM\n // 21 root table size (read-only)\n // 22 root table overflows since startup (read-only)\n // 23 bytes of extra memory to reserve for VM buffers, plugins, etc.\n // 24 memory threshold above which to shrink object memory (read-write)\n // 25 memory headroom when growing object memory (read-write)\n // 26 interruptChecksEveryNms - force an ioProcessEvents every N milliseconds (read-write)\n // 27 number of times mark loop iterated for current IGC/FGC (read-only) includes ALL marking\n // 28 number of times sweep loop iterated for current IGC/FGC (read-only)\n // 29 number of times make forward loop iterated for current IGC/FGC (read-only)\n // 30 number of times compact move loop iterated for current IGC/FGC (read-only)\n // 31 number of grow memory requests (read-only)\n // 32 number of shrink memory requests (read-only)\n // 33 number of root table entries used for current IGC/FGC (read-only)\n // 34 number of allocations done before current IGC/FGC (read-only)\n // 35 number of survivor objects after current IGC/FGC (read-only)\n // 36 millisecond clock when current IGC/FGC completed (read-only)\n // 37 number of marked objects for Roots of the world, not including Root Table entries for current IGC/FGC (read-only)\n // 38 milliseconds taken by current IGC (read-only)\n // 39 Number of finalization signals for Weak Objects pending when current IGC/FGC completed (read-only)\n case 40: return 4; // BytesPerWord for this image\n case 41: return this.vm.image.formatVersion();\n }\n return null;\n },\n primitiveImageName: function(argCount) {\n if (argCount == 0)\n return this.popNandPushIfOK(1, this.makeStString(this.filenameToSqueak(this.vm.image.name)));\n this.vm.image.name = this.filenameFromSqueak(this.vm.top().bytesAsString());\n window.localStorage['squeakImageName'] = this.vm.image.name;\n return true;\n },\n primitiveSnapshot: function(argCount) {\n this.vm.popNandPush(1, this.vm.trueObj); // put true on stack for saved snapshot\n this.vm.storeContextRegisters(); // store current state for snapshot\n var proc = this.getScheduler().pointers[Squeak.ProcSched_activeProcess];\n proc.pointers[Squeak.Proc_suspendedContext] = this.vm.activeContext; // store initial context\n this.vm.image.fullGC(\"snapshot\"); // before cleanup so traversal works\n var buffer = this.vm.image.writeToBuffer();\n Squeak.flushAllFiles(); // so there are no more writes pending\n Squeak.filePut(this.vm.image.name, buffer);\n this.vm.popNandPush(1, this.vm.falseObj); // put false on stack for continuing\n return true;\n },\n primitiveQuit: function(argCount) {\n Squeak.flushAllFiles();\n this.display.quitFlag = true;\n this.vm.breakNow(\"quit\");\n return true;\n },\n primitiveExitToDebugger: function(argCount) {\n this.vm.breakNow(\"debugger primitive\");\n debugger;\n return true;\n },\n primitiveSetGCBiasToGrow: function(argCount) {\n return this.fakePrimitive(\".primitiveSetGCBiasToGrow\", 0, argCount);\n },\n primitiveSetGCBiasToGrowGCLimit: function(argCount) {\n return this.fakePrimitive(\".primitiveSetGCBiasToGrowGCLimit\", 0, argCount);\n },\n},\n'display', {\n primitiveBeCursor: function(argCount) {\n if (this.display.cursorCanvas) {\n var cursorForm = this.loadForm(this.stackNonInteger(argCount), true),\n maskForm = argCount === 1 ? this.loadForm(this.stackNonInteger(0)) : null;\n if (!this.success || !cursorForm) return false;\n var cursorCanvas = this.display.cursorCanvas,\n context = cursorCanvas.getContext(\"2d\"),\n bounds = {left: 0, top: 0, right: cursorForm.width, bottom: cursorForm.height};\n cursorCanvas.width = cursorForm.width;\n cursorCanvas.height = cursorForm.height;\n if (cursorForm.depth === 1) {\n if (maskForm) {\n cursorForm = this.cursorMergeMask(cursorForm, maskForm);\n this.showForm(context, cursorForm, bounds, [0x00000000, 0xFF0000FF, 0xFFFFFFFF, 0xFF000000]);\n } else {\n this.showForm(context, cursorForm, bounds, [0x00000000, 0xFF000000]);\n }\n } else {\n this.showForm(context, cursorForm, bounds, true);\n }\n var canvas = this.display.context.canvas,\n scale = canvas.offsetWidth / canvas.width;\n cursorCanvas.style.width = (cursorCanvas.width * scale|0) + \"px\";\n cursorCanvas.style.height = (cursorCanvas.height * scale|0) + \"px\";\n this.display.cursorOffsetX = cursorForm.offsetX * scale|0;\n this.display.cursorOffsetY = cursorForm.offsetY * scale|0;\n }\n this.vm.popN(argCount);\n return true;\n },\n cursorMergeMask: function(cursor, mask) {\n // make 2-bit form from cursor and mask 1-bit forms\n var bits = new Uint32Array(16);\n for (var y = 0; y < 16; y++) {\n var c = cursor.bits[y],\n m = mask.bits[y],\n bit = 0x80000000,\n merged = 0;\n for (var x = 0; x < 16; x++) {\n merged = merged | ((m & bit) >> x) | ((c & bit) >> (x + 1));\n bit = bit >>> 1;\n }\n bits[y] = merged; \n }\n return {\n obj: cursor.obj, bits: bits,\n depth: 2, width: 16, height: 16,\n offsetX: cursor.offsetX, offsetY: cursor.offsetY,\n msb: true, pixPerWord: 16, pitch: 1,\n }\n },\n primitiveBeDisplay: function(argCount) {\n var displayObj = this.vm.stackValue(0);\n this.vm.specialObjects[Squeak.splOb_TheDisplay] = displayObj;\n this.vm.popN(argCount); // return self\n return true;\n },\n primitiveReverseDisplay: function(argCount) {\n this.reverseDisplay = !this.reverseDisplay;\n this.redrawDisplay();\n if (this.display.cursorCanvas) {\n var canvas = this.display.cursorCanvas,\n context = canvas.getContext(\"2d\"),\n image = context.getImageData(0, 0, canvas.width, canvas.height),\n data = new Uint32Array(image.data.buffer);\n for (var i = 0; i < data.length; i++)\n data[i] = data[i] ^ 0x00FFFFFF;\n context.putImageData(image, 0, 0);\n }\n return true;\n },\n primitiveShowDisplayRect: function(argCount) {\n // Force the given rectangular section of the Display to be copied to the screen.\n var rect = {\n left: this.stackInteger(3),\n top: this.stackInteger(1),\n right: this.stackInteger(2),\n bottom: this.stackInteger(0),\n };\n if (!this.success) return false;\n this.redrawDisplay(rect);\n this.vm.popN(argCount);\n return true;\n },\n redrawDisplay: function(rect) {\n var theDisplay = this.theDisplay(),\n bounds = {left: 0, top: 0, right: theDisplay.width, bottom: theDisplay.height};\n if (rect) {\n if (rect.left > bounds.left) bounds.left = rect.left;\n if (rect.right < bounds.right) bounds.right = rect.right;\n if (rect.top > bounds.top) bounds.top = rect.top;\n if (rect.bottom < bounds.bottom) bounds.bottom = rect.bottom;\n }\n if (bounds.left < bounds.right && bounds.top < bounds.bottom)\n this.displayUpdate(theDisplay, bounds);\n },\n showForm: function(ctx, form, rect, cursorColors) {\n if (!rect) return;\n var srcX = rect.left,\n srcY = rect.top,\n srcW = rect.right - srcX,\n srcH = rect.bottom - srcY,\n pixels = ctx.createImageData(srcW, srcH),\n pixelData = pixels.data;\n if (!pixelData.buffer) { // mobile IE uses a different data-structure\n pixelData = new Uint8Array(srcW * srcH * 4);\n }\n var dest = new Uint32Array(pixelData.buffer);\n switch (form.depth) {\n case 1:\n case 2:\n case 4:\n case 8:\n var colors = cursorColors || this.swappedColors;\n if (!colors) {\n colors = [];\n for (var i = 0; i < 256; i++) {\n var argb = this.indexedColors[i],\n abgr = (argb & 0xFF00FF00) // green and alpha\n + ((argb & 0x00FF0000) >> 16) // shift red down\n + ((argb & 0x000000FF) << 16); // shift blue up\n colors[i] = abgr;\n }\n this.swappedColors = colors;\n }\n if (this.reverseDisplay) {\n if (cursorColors) {\n colors = cursorColors.map(function(c){return c ^ 0x00FFFFFF});\n } else {\n if (!this.reversedColors)\n this.reversedColors = colors.map(function(c){return c ^ 0x00FFFFFF});\n colors = this.reversedColors;\n }\n }\n var mask = (1 << form.depth) - 1;\n var leftSrcShift = 32 - (srcX % form.pixPerWord + 1) * form.depth;\n for (var y = 0; y < srcH; y++) {\n var srcIndex = form.pitch * srcY + (srcX / form.pixPerWord | 0);\n var srcShift = leftSrcShift;\n var src = form.bits[srcIndex];\n var dstIndex = pixels.width * y;\n for (var x = 0; x < srcW; x++) {\n dest[dstIndex++] = colors[(src >>> srcShift) & mask];\n if ((srcShift -= form.depth) < 0) {\n srcShift = 32 - form.depth;\n src = form.bits[++srcIndex];\n }\n }\n srcY++;\n };\n break;\n case 16:\n var leftSrcShift = srcX % 2 ? 0 : 16;\n for (var y = 0; y < srcH; y++) {\n var srcIndex = form.pitch * srcY + (srcX / 2 | 0);\n var srcShift = leftSrcShift;\n var src = form.bits[srcIndex];\n var dstIndex = pixels.width * y;\n for (var x = 0; x < srcW; x++) {\n var rgb = src >>> srcShift;\n dest[dstIndex++] =\n ((rgb & 0x7C00) >> 7) // shift red down 2*5, up 0*8 + 3\n + ((rgb & 0x03E0) << 6) // shift green down 1*5, up 1*8 + 3\n + ((rgb & 0x001F) << 19) // shift blue down 0*5, up 2*8 + 3\n + 0xFF000000; // set alpha to opaque\n if ((srcShift -= 16) < 0) {\n srcShift = 16;\n src = form.bits[++srcIndex];\n }\n }\n srcY++;\n };\n break;\n case 32:\n var opaque = cursorColors ? 0 : 0xFF000000; // keep alpha for cursors\n for (var y = 0; y < srcH; y++) {\n var srcIndex = form.pitch * srcY + srcX;\n var dstIndex = pixels.width * y;\n for (var x = 0; x < srcW; x++) {\n var argb = form.bits[srcIndex++]; // convert ARGB -> ABGR\n var abgr = (argb & 0xFF00FF00) // green and alpha is okay\n | ((argb & 0x00FF0000) >> 16) // shift red down\n | ((argb & 0x000000FF) << 16) // shift blue up\n | opaque; // set alpha to opaque\n dest[dstIndex++] = abgr;\n }\n srcY++;\n };\n break;\n default: throw Error(\"depth not implemented\");\n };\n if (pixels.data !== pixelData) {\n pixels.data.set(pixelData);\n }\n ctx.putImageData(pixels, rect.left, rect.top);\n },\n primitiveDeferDisplayUpdates: function(argCount) {\n var flag = this.stackBoolean(0);\n if (!this.success) return false;\n this.deferDisplayUpdates = flag;\n this.vm.popN(argCount);\n return true;\n },\n primitiveForceDisplayUpdate: function(argCount) {\n this.vm.breakOut(); // show on screen\n this.vm.popN(argCount);\n return true;\n },\n primitiveScreenSize: function(argCount) {\n var display = this.display,\n w = display.width || display.context.canvas.width,\n h = display.height || display.context.canvas.height;\n return this.popNandPushIfOK(argCount+1, this.makePointWithXandY(w, h));\n },\n primitiveSetFullScreen: function(argCount) {\n var flag = this.stackBoolean(0);\n if (!this.success) return false;\n if (this.display.fullscreen != flag) {\n if (this.display.fullscreenRequest) {\n // freeze until we get the right display size\n var unfreeze = this.vm.freeze();\n this.display.fullscreenRequest(flag, function thenDo() {\n unfreeze();\n });\n } else {\n this.display.fullscreen = flag;\n this.vm.breakOut(); // let VM go into fullscreen mode\n }\n }\n this.vm.popN(argCount);\n return true;\n },\n primitiveTestDisplayDepth: function(argCount) {\n var supportedDepths = [1, 2, 4, 8, 16, 32]; // match showOnDisplay()\n return this.pop2andPushBoolIfOK(supportedDepths.indexOf(this.stackInteger(0)) >= 0);\n },\n loadForm: function(formObj, withOffset) {\n if (formObj.isNil) return null;\n var form = {\n obj: formObj,\n bits: formObj.pointers[Squeak.Form_bits].wordsOrBytes(),\n depth: formObj.pointers[Squeak.Form_depth],\n width: formObj.pointers[Squeak.Form_width],\n height: formObj.pointers[Squeak.Form_height],\n }\n if (withOffset) {\n var offset = formObj.pointers[Squeak.Form_offset];\n form.offsetX = offset.pointers ? offset.pointers[Squeak.Point_x] : 0;\n form.offsetY = offset.pointers ? offset.pointers[Squeak.Point_y] : 0;\n }\n if (form.width === 0 || form.height === 0) return form;\n if (!(form.width > 0 && form.height > 0)) return null;\n form.msb = form.depth > 0;\n if (!form.msb) form.depth = -form.depth;\n if (!(form.depth > 0)) return null; // happens if not int\n form.pixPerWord = 32 / form.depth;\n form.pitch = (form.width + (form.pixPerWord - 1)) / form.pixPerWord | 0;\n if (form.bits.length !== (form.pitch * form.height)) return null;\n return form;\n },\n theDisplay: function() {\n return this.loadForm(this.vm.specialObjects[Squeak.splOb_TheDisplay]);\n },\n displayDirty: function(form, rect) {\n if (!this.deferDisplayUpdates\n && form == this.vm.specialObjects[Squeak.splOb_TheDisplay])\n this.displayUpdate(this.theDisplay(), rect);\n },\n displayUpdate: function(form, rect) {\n this.showForm(this.display.context, form, rect);\n this.display.lastTick = this.vm.lastTick;\n this.display.idle = 0;\n },\n primitiveBeep: function(argCount) {\n var ctx = Squeak.startAudioOut();\n if (ctx) {\n var beep = ctx.createOscillator();\n beep.connect(ctx.destination);\n beep.frequency.value = 880;\n beep.noteOn(0);\n beep.noteOff(ctx.currentTime + 0.2);\n } else {\n this.vm.warnOnce(\"could not initialize audio\");\n }\n return this.popNIfOK(argCount);\n },\n},\n'input', {\n primitiveClipboardText: function(argCount) {\n if (argCount === 0) { // read from clipboard\n if (typeof(this.display.clipboardString) !== 'string') return false;\n this.vm.popNandPush(1, this.makeStString(this.display.clipboardString));\n } else if (argCount === 1) { // write to clipboard\n var stringObj = this.vm.top();\n if (stringObj.bytes) {\n this.display.clipboardString = stringObj.bytesAsString();\n this.display.clipboardStringChanged = true;\n }\n this.vm.pop();\n }\n return true;\n },\n primitiveKeyboardNext: function(argCount) {\n return this.popNandPushIfOK(argCount+1, this.ensureSmallInt(this.display.keys.shift()));\n },\n primitiveKeyboardPeek: function(argCount) {\n var length = this.display.keys.length;\n return this.popNandPushIfOK(argCount+1, length ? this.ensureSmallInt(this.display.keys[0] || 0) : this.vm.nilObj);\n },\n primitiveMouseButtons: function(argCount) {\n // only used in non-event based (old MVC) images\n this.popNandPushIfOK(argCount+1, this.ensureSmallInt(this.display.buttons));\n // if the image calls this primitive it means it's done displaying\n // we break out of the VM so the browser shows it quickly\n this.vm.breakOut();\n // if nothing was drawn but the image looks at the buttons rapidly,\n // it must be idle.\n if (this.display.idle++ > 20)\n this.vm.goIdle(); // might switch process, so must be after pop\n return true;\n },\n primitiveMousePoint: function(argCount) {\n var x = this.ensureSmallInt(this.display.mouseX),\n y = this.ensureSmallInt(this.display.mouseY);\n return this.popNandPushIfOK(argCount+1, this.makePointWithXandY(x, y));\n },\n primitiveInputSemaphore: function(argCount) {\n var semaIndex = this.stackInteger(0);\n if (!this.success) return false;\n this.inputEventSemaIndex = semaIndex;\n this.display.signalInputEvent = function() {\n this.signalSemaphoreWithIndex(this.inputEventSemaIndex);\n }.bind(this);\n return true;\n },\n primitiveInputWord: function(argCount) {\n // Return an integer indicating the reason for the most recent input interrupt\n return this.popNandPushIfOK(1, 0); // noop for now\n },\n primitiveGetNextEvent: function(argCount) {\n this.display.idle++;\n var evtBuf = this.stackNonInteger(0);\n if (!this.display.getNextEvent) return false;\n this.display.getNextEvent(evtBuf.pointers, this.vm.startupTime);\n return true;\n },\n},\n'time', {\n primitiveRelinquishProcessorForMicroseconds: function(argCount) {\n // we ignore the optional arg\n this.vm.pop(argCount);\n this.vm.goIdle(); // might switch process, so must be after pop\n return true;\n },\n millisecondClockValue: function() {\n //Return the value of the millisecond clock as an integer.\n //Note that the millisecond clock wraps around periodically.\n //The range is limited to SmallInteger maxVal / 2 to allow\n //delays of up to that length without overflowing a SmallInteger.\n return (Date.now() - this.vm.startupTime) & Squeak.MillisecondClockMask;\n },\n millisecondClockValueSet: function(clock) {\n // set millisecondClock to the (previously saved) clock value\n // to allow \"stopping\" the VM clock while debugging\n this.vm.startupTime = Date.now() - clock;\n },\n secondClock: function() {\n return this.pos32BitIntFor(Squeak.totalSeconds()); // will overflow 32 bits in 2037\n },\n microsecondClockUTC: function() {\n var millis = Date.now() - Squeak.EpochUTC;\n return this.pos64BitIntFor(millis * 1000);\n },\n microsecondClockLocal: function() {\n var millis = Date.now() - Squeak.Epoch;\n return this.pos64BitIntFor(millis * 1000);\n },\n},\n'FilePlugin', {\n primitiveDirectoryCreate: function(argCount) {\n var dirNameObj = this.stackNonInteger(0);\n if (!this.success) return false;\n var dirName = this.filenameFromSqueak(dirNameObj.bytesAsString());\n this.success = Squeak.dirCreate(dirName);\n if (!this.success) {\n var path = Squeak.splitFilePath(dirName);\n console.log(\"Directory not created: \" + path.fullname);\n }\n return this.popNIfOK(argCount);\n },\n primitiveDirectoryDelete: function(argCount) {\n var dirNameObj = this.stackNonInteger(0);\n if (!this.success) return false;\n var dirName = this.filenameFromSqueak(dirNameObj.bytesAsString());\n this.success = Squeak.dirDelete(dirName);\n return this.popNIfOK(argCount);\n },\n primitiveDirectoryDelimitor: function(argCount) {\n var delimitor = this.emulateMac ? ':' : '/';\n return this.popNandPushIfOK(1, this.charFromInt(delimitor.charCodeAt(0)));\n },\n primitiveDirectoryEntry: function(argCount) {\n this.vm.warnOnce(\"Not yet implemented: primitiveDirectoryEntry\");\n return false; // image falls back on primitiveDirectoryLookup\n },\n primitiveDirectoryLookup: function(argCount) {\n var index = this.stackInteger(0),\n dirNameObj = this.stackNonInteger(1);\n if (!this.success) return false;\n var sqDirName = dirNameObj.bytesAsString();\n var dirName = this.filenameFromSqueak(sqDirName);\n var entries = Squeak.dirList(dirName, true);\n if (!entries) {\n var path = Squeak.splitFilePath(dirName);\n console.log(\"Directory not found: \" + path.fullname);\n return false;\n }\n var keys = Object.keys(entries).sort(),\n entry = entries[keys[index - 1]];\n if (sqDirName === \"/\") { // fake top-level dir\n if (index === 1) {\n if (!entry) entry = [0, 0, 0, 0, 0];\n entry[0] = \"SqueakJS\";\n entry[3] = true;\n }\n else entry = null;\n }\n this.popNandPushIfOK(argCount+1, this.makeStObject(entry)); // entry or nil\n return true;\n },\n primitiveDirectorySetMacTypeAndCreator: function(argCount) {\n return this.popNIfOK(argCount);\n },\n primitiveFileAtEnd: function(argCount) {\n var handle = this.stackNonInteger(0);\n if (!this.success || !handle.file) return false;\n this.popNandPushIfOK(argCount+1, this.makeStObject(handle.filePos >= handle.file.size));\n return true;\n },\n primitiveFileClose: function(argCount) {\n var handle = this.stackNonInteger(0);\n if (!this.success || !handle.file) return false;\n this.fileClose(handle.file);\n this.vm.breakOut(); // return to JS asap so async file handler can run\n handle.file = null;\n return this.popNIfOK(argCount);\n },\n primitiveFileDelete: function(argCount) {\n var fileNameObj = this.stackNonInteger(0);\n if (!this.success) return false;\n var fileName = this.filenameFromSqueak(fileNameObj.bytesAsString());\n this.success = Squeak.fileDelete(fileName);\n return this.popNIfOK(argCount);\n },\n primitiveFileFlush: function(argCount) {\n var handle = this.stackNonInteger(0);\n if (!this.success || !handle.file) return false;\n Squeak.flushFile(handle.file);\n this.vm.breakOut(); // return to JS asap so async file handler can run\n return this.popNIfOK(argCount);\n },\n primitiveFileGetPosition: function(argCount) {\n var handle = this.stackNonInteger(0);\n if (!this.success || !handle.file) return false;\n this.popNandPushIfOK(argCount + 1, this.makeLargeIfNeeded(handle.filePos));\n return true;\n },\n primitiveFileOpen: function(argCount) {\n var writeFlag = this.stackBoolean(0),\n fileNameObj = this.stackNonInteger(1);\n if (!this.success) return false;\n var fileName = this.filenameFromSqueak(fileNameObj.bytesAsString()),\n file = this.fileOpen(fileName, writeFlag);\n if (!file) return false;\n var handle = this.makeStArray([file.name]); // array contents irrelevant\n handle.file = file; // shared between handles\n handle.fileWrite = writeFlag; // specific to this handle\n handle.filePos = 0; // specific to this handle\n this.popNandPushIfOK(argCount+1, handle);\n return true;\n },\n primitiveFileRead: function(argCount) {\n var count = this.stackInteger(0),\n startIndex = this.stackInteger(1) - 1, // make zero based\n arrayObj = this.stackNonInteger(2),\n handle = this.stackNonInteger(3);\n if (!this.success || !handle.file) return false;\n if (!count) return this.popNandPushIfOK(argCount+1, 0);\n if (!arrayObj.bytes) {\n console.log(\"File reading into non-bytes object not implemented yet\");\n return false;\n }\n if (startIndex < 0 || startIndex + count > arrayObj.bytes.length)\n return false;\n return this.fileContentsDo(handle.file, function(file) {\n if (!file.contents)\n return this.popNandPushIfOK(argCount+1, 0);\n var srcArray = file.contents,\n dstArray = arrayObj.bytes;\n count = Math.min(count, file.size - handle.filePos);\n for (var i = 0; i < count; i++)\n dstArray[startIndex + i] = srcArray[handle.filePos++];\n this.popNandPushIfOK(argCount+1, count);\n }.bind(this));\n },\n primitiveFileRename: function(argCount) {\n var oldNameObj = this.stackNonInteger(1),\n newNameObj = this.stackNonInteger(0);\n if (!this.success) return false;\n var oldName = this.filenameFromSqueak(oldNameObj.bytesAsString()),\n newName = this.filenameFromSqueak(newNameObj.bytesAsString());\n this.success = Squeak.fileRename(oldName, newName);\n this.vm.breakOut(); // return to JS asap so async file handler can run\n return this.popNIfOK(argCount);\n },\n primitiveFileSetPosition: function(argCount) {\n var pos = this.stackPos32BitInt(0),\n handle = this.stackNonInteger(1);\n if (!this.success || !handle.file) return false;\n handle.filePos = pos;\n return this.popNIfOK(argCount);\n },\n primitiveFileSize: function(argCount) {\n var handle = this.stackNonInteger(0);\n if (!this.success || !handle.file) return false;\n this.popNandPushIfOK(argCount+1, this.makeLargeIfNeeded(handle.file.size));\n return true;\n },\n primitiveFileStdioHandles: function(argCount) {\n this.vm.warnOnce(\"Not yet implemented: primitiveFileStdioHandles\");\n return false;\n },\n primitiveFileTruncate: function(argCount) {\n console.warn(\"Not yet implemented: primitiveFileTruncate\");\n return false;\n },\n primitiveDisableFileAccess: function(argCount) {\n return this.fakePrimitive(\"FilePlugin.primitiveDisableFileAccess\", 0, argCount);\n },\n primitiveFileWrite: function(argCount) {\n var count = this.stackInteger(0),\n startIndex = this.stackInteger(1) - 1, // make zero based\n arrayObj = this.stackNonInteger(2),\n handle = this.stackNonInteger(3);\n if (!this.success || !handle.file || !handle.fileWrite) return false;\n if (!count) return this.popNandPushIfOK(argCount+1, 0);\n var array = arrayObj.bytes || arrayObj.wordsAsUint8Array();\n if (!array) return false;\n if (startIndex < 0 || startIndex + count > array.length)\n return false;\n return this.fileContentsDo(handle.file, function(file) {\n var srcArray = array,\n dstArray = file.contents || [];\n if (handle.filePos + count > dstArray.length) {\n var newSize = dstArray.length === 0 ? handle.filePos + count :\n Math.max(handle.filePos + count, dstArray.length + 10000);\n file.contents = new Uint8Array(newSize);\n file.contents.set(dstArray);\n dstArray = file.contents;\n }\n for (var i = 0; i < count; i++)\n dstArray[handle.filePos++] = srcArray[startIndex + i];\n if (handle.filePos > file.size) file.size = handle.filePos;\n file.modified = true;\n this.popNandPushIfOK(argCount+1, count);\n }.bind(this));\n },\n fileOpen: function(filename, writeFlag) {\n // if a file is opened for read and write at the same time,\n // they must share the contents. That's why all open files\n // are held in the ref-counted global SqueakFiles\n if (typeof SqueakFiles == 'undefined')\n window.SqueakFiles = {};\n var path = Squeak.splitFilePath(filename);\n if (!path.basename) return null; // malformed filename\n // fetch or create directory entry\n var directory = Squeak.dirList(path.dirname, true);\n if (!directory) return null;\n var entry = directory[path.basename],\n contents = null;\n if (entry) {\n // if it is open already, return it\n var file = SqueakFiles[path.fullname];\n if (file) {\n ++file.refCount;\n return file;\n }\n } else {\n if (!writeFlag) {\n console.log(\"File not found: \" + path.fullname);\n return null;\n }\n contents = new Uint8Array();\n entry = Squeak.filePut(path.fullname, contents.buffer);\n if (!entry) {\n console.log(\"Cannot create file: \" + path.fullname);\n return null;\n }\n }\n // make the file object\n var file = {\n name: path.fullname,\n size: entry[4], // actual file size, may differ from contents.length\n contents: contents, // possibly null, fetched when needed\n modified: false,\n refCount: 1\n };\n SqueakFiles[file.name] = file;\n return file;\n },\n fileClose: function(file) {\n Squeak.flushFile(file);\n if (--file.refCount == 0)\n delete SqueakFiles[file.name];\n },\n fileContentsDo: function(file, func) {\n if (file.contents) {\n func(file);\n } else {\n if (file.contents === false) // failed to get contents before\n return false;\n this.vm.freeze(function(unfreeze) {\n Squeak.fileGet(file.name,\n function success(contents) {\n file.contents = this.asUint8Array(contents);\n unfreeze();\n func(file);\n }.bind(this),\n function error(msg) {\n console.log(\"File get failed: \" + msg);\n file.contents = false;\n unfreeze();\n func(file);\n }.bind(this));\n }.bind(this));\n }\n return true;\n },\n},\n'DropPlugin', {\n primitiveDropRequestFileHandle: function(argCount) {\n var index = this.stackInteger(0),\n fileNames = this.display.droppedFiles || [];\n if (index < 1 || index > fileNames.length) return false;\n // same code as primitiveFileOpen()\n var fileName = fileNames[index - 1],\n file = this.fileOpen(fileName, false);\n if (!file) return false;\n var handle = this.makeStArray([fileName]); // array contents irrelevant\n handle.file = file; // shared between handles\n handle.fileWrite = false; // specific to this handle\n handle.filePos = 0; // specific to this handle\n this.popNandPushIfOK(argCount+1, handle);\n return true;\n },\n primitiveDropRequestFileName: function(argCount) {\n var index = this.stackInteger(0),\n fileNames = this.display.droppedFiles || [];\n if (index < 1 || index > fileNames.length) return false;\n var result = this.makeStString(this.filenameToSqueak(fileNames[index - 1]));\n return this.popNandPushIfOK(argCount, result);\n },\n},\n'SoundPlugin', {\n snd_primitiveSoundStart: function(argCount) {\n return this.snd_primitiveSoundStartWithSemaphore(argCount);\n },\n snd_primitiveSoundStartWithSemaphore: function(argCount) {\n var bufFrames = this.stackInteger(argCount-1),\n samplesPerSec = this.stackInteger(argCount-2),\n stereoFlag = this.stackBoolean(argCount-3),\n semaIndex = argCount > 3 ? this.stackInteger(argCount-4) : 0;\n if (!this.success) return false;\n this.audioContext = Squeak.startAudioOut();\n if (!this.audioContext) {\n this.vm.warnOnce(\"could not initialize audio\");\n return false;\n }\n this.audioSema = semaIndex; // signal when ready to accept another buffer of samples\n this.audioNextTimeSlot = 0;\n this.audioBuffersReady = [];\n this.audioBuffersUnused = [\n this.audioContext.createBuffer(stereoFlag ? 2 : 1, bufFrames, samplesPerSec),\n this.audioContext.createBuffer(stereoFlag ? 2 : 1, bufFrames, samplesPerSec),\n ];\n console.log(\"sound: started\");\n return this.popNIfOK(argCount);\n },\n snd_playNextBuffer: function() {\n if (!this.audioContext || this.audioBuffersReady.length === 0)\n return;\n var source = this.audioContext.createBufferSource();\n source.buffer = this.audioBuffersReady.shift();\n source.connect(this.audioContext.destination);\n if (this.audioNextTimeSlot < this.audioContext.currentTime) {\n if (this.audioNextTimeSlot > 0)\n console.warn(\"sound \" + this.audioContext.currentTime.toFixed(3) +\n \": buffer underrun by \" + (this.audioContext.currentTime - this.audioNextTimeSlot).toFixed(3) + \" s\");\n this.audioNextTimeSlot = this.audioContext.currentTime;\n }\n source.start(this.audioNextTimeSlot);\n //console.log(\"sound \" + this.audioContext.currentTime.toFixed(3) +\n // \": scheduling from \" + this.audioNextTimeSlot.toFixed(3) +\n // \" to \" + (this.audioNextTimeSlot + source.buffer.duration).toFixed(3));\n this.audioNextTimeSlot += source.buffer.duration;\n // source.onended is unreliable, using a timeout instead\n window.setTimeout(function() {\n if (!this.audioContext) return;\n // console.log(\"sound \" + this.audioContext.currentTime.toFixed(3) +\n // \": done, next time slot \" + this.audioNextTimeSlot.toFixed(3));\n this.audioBuffersUnused.push(source.buffer);\n if (this.audioSema) this.signalSemaphoreWithIndex(this.audioSema);\n this.vm.forceInterruptCheck();\n }.bind(this), (this.audioNextTimeSlot - this.audioContext.currentTime) * 1000);\n this.snd_playNextBuffer();\n },\n snd_primitiveSoundAvailableSpace: function(argCount) {\n if (!this.audioContext) {\n console.log(\"sound: no audio context\");\n return false;\n }\n var available = 0;\n if (this.audioBuffersUnused.length > 0) {\n var buf = this.audioBuffersUnused[0];\n available = buf.length * buf.numberOfChannels * 2;\n }\n return this.popNandPushIfOK(argCount + 1, available);\n },\n snd_primitiveSoundPlaySamples: function(argCount) {\n if (!this.audioContext || this.audioBuffersUnused.length === 0) {\n console.log(\"sound: play but no free buffers\");\n return false;\n }\n var count = this.stackInteger(2),\n sqSamples = this.stackNonInteger(1).wordsAsInt16Array(),\n startIndex = this.stackInteger(0) - 1;\n if (!this.success || !sqSamples) return false;\n var buffer = this.audioBuffersUnused.shift(),\n channels = buffer.numberOfChannels;\n for (var channel = 0; channel < channels; channel++) {\n var jsSamples = buffer.getChannelData(channel),\n index = startIndex + channel;\n for (var i = 0; i < count; i++) {\n jsSamples[i] = sqSamples[index] / 32768; // int16 -> float32\n index += channels;\n }\n }\n this.audioBuffersReady.push(buffer);\n this.snd_playNextBuffer();\n return this.popNIfOK(argCount);\n },\n snd_primitiveSoundPlaySilence: function(argCount) {\n if (!this.audioContext || this.audioBuffersUnused.length === 0) {\n console.log(\"sound: play but no free buffers\");\n return false;\n }\n var buffer = this.audioBuffersUnused.shift(),\n channels = buffer.numberOfChannels,\n count = buffer.length;\n for (var channel = 0; channel < channels; channel++) {\n var jsSamples = buffer.getChannelData(channel);\n for (var i = 0; i < count; i++)\n jsSamples[i] = 0;\n }\n this.audioBuffersReady.push(buffer);\n this.snd_playNextBuffer();\n return this.popNandPushIfOK(argCount + 1, count);\n },\n snd_primitiveSoundStop: function(argCount) {\n if (this.audioContext) {\n this.audioContext = null;\n this.audioBuffersReady = null;\n this.audioBuffersUnused = null;\n this.audioNextTimeSlot = 0;\n this.audioSema = 0;\n console.log(\"sound: stopped\");\n }\n return this.popNIfOK(argCount);\n },\n snd_primitiveSoundStartRecording: function(argCount) {\n if (argCount !== 3) return false;\n var rcvr = this.stackNonInteger(3),\n samplesPerSec = this.stackInteger(2),\n stereoFlag = this.stackBoolean(1),\n semaIndex = this.stackInteger(0);\n if (!this.success) return false;\n var method = this.primMethod,\n unfreeze = this.vm.freeze(),\n self = this;\n Squeak.startAudioIn(\n function onSuccess(audioContext, source) {\n console.log(\"sound: recording started\")\n self.audioInContext = audioContext;\n self.audioInSource = source;\n self.audioInSema = semaIndex;\n self.audioInBuffers = [];\n self.audioInBufferIndex = 0;\n self.audioInOverSample = 1;\n // if sample rate is still too high, adjust oversampling\n while (samplesPerSec * self.audioInOverSample < self.audioInContext.sampleRate)\n self.audioInOverSample *= 2;\n // make a buffer of at least 100 ms\n var bufferSize = self.audioInOverSample * 1024;\n while (bufferSize / self.audioInContext.sampleRate < 0.1)\n bufferSize *= 2;\n self.audioInProcessor = audioContext.createScriptProcessor(bufferSize, stereoFlag ? 2 : 1, stereoFlag ? 2 : 1);\n self.audioInProcessor.onaudioprocess = function(event) {\n self.snd_recordNextBuffer(event.inputBuffer);\n };\n self.audioInSource.connect(self.audioInProcessor);\n self.audioInProcessor.connect(audioContext.destination);\n self.vm.popN(argCount);\n window.setTimeout(unfreeze, 0);\n },\n function onError(msg) {\n console.warn(msg);\n self.vm.sendAsPrimitiveFailure(rcvr, method, argCount);\n window.setTimeout(unfreeze, 0);\n });\n return true;\n },\n snd_recordNextBuffer: function(audioBuffer) {\n if (!this.audioInContext) return;\n // console.log(\"sound \" + this.audioInContext.currentTime.toFixed(3) +\n // \": recorded \" + audioBuffer.duration.toFixed(3) + \" s\");\n if (this.audioInBuffers.length > 5)\n this.audioInBuffers.shift();\n this.audioInBuffers.push(audioBuffer);\n if (this.audioInSema) this.signalSemaphoreWithIndex(this.audioInSema);\n this.vm.forceInterruptCheck();\n },\n snd_primitiveSoundGetRecordingSampleRate: function(argCount) {\n if (!this.audioInContext) return false;\n var actualRate = this.audioInContext.sampleRate / this.audioInOverSample | 0;\n console.log(\"sound: actual recording rate \" + actualRate + \"x\" + this.audioInOverSample);\n return this.popNandPushIfOK(argCount + 1, actualRate);\n },\n snd_primitiveSoundRecordSamples: function(argCount) {\n var sqSamples = this.stackNonInteger(1).wordsAsInt16Array(),\n sqStartIndex = this.stackInteger(0) - 1;\n if (!this.success) return false;\n var sampleCount = 0;\n while (sqStartIndex < sqSamples.length) {\n if (this.audioInBuffers.length === 0) break;\n var buffer = this.audioInBuffers[0],\n channels = buffer.numberOfChannels,\n sqStep = channels,\n jsStep = this.audioInOverSample,\n sqCount = (sqSamples.length - sqStartIndex) / sqStep,\n jsCount = (buffer.length - this.audioInBufferIndex) / jsStep,\n count = Math.min(jsCount, sqCount);\n for (var channel = 0; channel < channels; channel++) {\n var jsSamples = buffer.getChannelData(channel),\n jsIndex = this.audioInBufferIndex,\n sqIndex = sqStartIndex + channel;\n for (var i = 0; i < count; i++) {\n sqSamples[sqIndex] = jsSamples[jsIndex] * 32768 & 0xFFFF; // float32 -> int16\n sqIndex += sqStep;\n jsIndex += jsStep;\n }\n }\n sampleCount += count * channels;\n sqStartIndex += count * channels;\n if (jsIndex < buffer.length) {\n this.audioInBufferIndex = jsIndex;\n } else {\n this.audioInBufferIndex = 0;\n this.audioInBuffers.shift();\n }\n }\n return this.popNandPushIfOK(argCount + 1, sampleCount);\n },\n snd_primitiveSoundStopRecording: function(argCount) {\n if (this.audioInContext) {\n this.audioInSource.disconnect();\n this.audioInProcessor.disconnect();\n this.audioInContext = null;\n this.audioInSema = 0;\n this.audioInBuffers = null;\n this.audioInSource = null;\n this.audioInProcessor = null;\n console.log(\"sound recording stopped\")\n }\n return true;\n },\n snd_primitiveSoundSetRecordLevel: function(argCount) {\n return true;\n },\n},\n'JPEGReadWriter2Plugin', {\n jpeg2_primJPEGPluginIsPresent: function(argCount) {\n return this.popNandPushIfOK(argCount + 1, this.vm.trueObj);\n },\n jpeg2_primImageHeight: function(argCount) {\n var decompressStruct = this.stackNonInteger(0).wordsOrBytes();\n if (!decompressStruct) return false;\n var height = decompressStruct[1];\n return this.popNandPushIfOK(argCount + 1, height);\n },\n jpeg2_primImageWidth: function(argCount) {\n var decompressStruct = this.stackNonInteger(0).wordsOrBytes();\n if (!decompressStruct) return false;\n var width = decompressStruct[0];\n return this.popNandPushIfOK(argCount + 1, width);\n },\n jpeg2_primJPEGCompressStructSize: function(argCount) {\n // no struct needed\n return this.popNandPushIfOK(argCount + 1, 0);\n },\n jpeg2_primJPEGDecompressStructSize: function(argCount) {\n // width, height, 32 bits each\n return this.popNandPushIfOK(argCount + 1, 8);\n },\n jpeg2_primJPEGErrorMgr2StructSize: function(argCount) {\n // no struct needed\n return this.popNandPushIfOK(argCount + 1, 0);\n },\n jpeg2_primJPEGReadHeaderfromByteArrayerrorMgr: function(argCount) {\n var decompressStruct = this.stackNonInteger(2).wordsOrBytes(),\n source = this.stackNonInteger(1).bytes;\n if (!decompressStruct || !source) return false;\n var unfreeze = this.vm.freeze();\n this.jpeg2_readImageFromBytes(source,\n function success(image) {\n this.jpeg2state = {src: source, img: image};\n decompressStruct[0] = image.width;\n decompressStruct[1] = image.height;\n unfreeze();\n }.bind(this),\n function error() {\n decompressStruct[0] = 0;\n decompressStruct[1] = 0;\n unfreeze();\n }.bind(this));\n return this.popNIfOK(argCount);\n },\n jpeg2_primJPEGReadImagefromByteArrayonFormdoDitheringerrorMgr: function(argCount) {\n var source = this.stackNonInteger(3).bytes,\n form = this.stackNonInteger(2).pointers,\n ditherFlag = this.stackBoolean(1);\n if (!this.success || !source || !form) return false;\n var state = this.jpeg2state;\n if (!state || state.src !== source) {\n console.error(\"jpeg read did not match header info\");\n return false;\n }\n var depth = form[Squeak.Form_depth],\n image = this.jpeg2_getPixelsFromImage(state.img),\n formBits = form[Squeak.Form_bits].words;\n if (depth === 32) {\n this.jpeg2_copyPixelsToForm32(image, formBits);\n } else if (depth === 16) {\n if (ditherFlag) this.jpeg2_ditherPixelsToForm16(image, formBits);\n else this.jpeg2_copyPixelsToForm16(image, formBits);\n } else return false;\n return this.popNIfOK(argCount);\n },\n jpeg2_primJPEGWriteImageonByteArrayformqualityprogressiveJPEGerrorMgr: function(argCount) {\n this.vm.warnOnce(\"JPEGReadWritePlugin2: writing not implemented yet\");\n return false;\n },\n jpeg2_readImageFromBytes: function(bytes, thenDo, errorDo) {\n var blob = new Blob([bytes], {type: \"image/jpeg\"}),\n image = new Image();\n image.onload = function() {\n thenDo(image);\n };\n image.onerror = function() {\n console.warn(\"could not render JPEG\");\n errorDo();\n };\n image.src = (window.URL || window.webkitURL).createObjectURL(blob);\n },\n jpeg2_getPixelsFromImage: function(image) {\n var canvas = document.createElement(\"canvas\"),\n context = canvas.getContext(\"2d\");\n canvas.width = image.width;\n canvas.height = image.height;\n context.drawImage(image, 0, 0);\n return context.getImageData(0, 0, image.width, image.height);\n },\n jpeg2_copyPixelsToForm32: function(image, formBits) {\n var pixels = image.data;\n for (var i = 0; i < formBits.length; i++) {\n var r = pixels[i*4 + 0],\n g = pixels[i*4 + 1],\n b = pixels[i*4 + 2];\n formBits[i] = 0xFF000000 | (r << 16) | (g << 8) | b;\n }\n },\n jpeg2_copyPixelsToForm16: function(image, formBits) {\n var width = image.width,\n height = image.height,\n pixels = image.data;\n for (var y = 0; y < height; y++)\n for (var x = 0; x < width; x += 2) {\n var i = y * height + x,\n r1 = pixels[i*4 + 0] >> 3,\n g1 = pixels[i*4 + 1] >> 3,\n b1 = pixels[i*4 + 2] >> 3,\n r2 = pixels[i*4 + 4] >> 3,\n g2 = pixels[i*4 + 5] >> 3,\n b2 = pixels[i*4 + 6] >> 3,\n formPix = (r1 << 10) | (g1 << 5) | b1;\n if (formPix === 0) formPix = 1;\n formPix = (formPix << 16) | (r2 << 10) | (g2 << 5) | b2;\n if ((formPix & 65535) === 0) formPix = formPix | 1;\n formBits[i >> 1] = formPix;\n }\n },\n jpeg2_ditherPixelsToForm16: function(image, formBits) {\n var width = image.width >> 1, // 2 pix a time\n height = image.height,\n pixels = image.data,\n ditherMatrix1 = [2, 0, 14, 12, 1, 3, 13, 15],\n ditherMatrix2 = [10, 8, 6, 4, 9, 11, 5, 7];\n for (var y = 0; y < height; y++)\n for (var x = 0; x < width; x++) {\n var i = (y * height + 2 * x) << 2,\n r1 = pixels[i + 0],\n g1 = pixels[i + 1],\n b1 = pixels[i + 2],\n r2 = pixels[i + 4],\n g2 = pixels[i + 5],\n b2 = pixels[i + 6];\n /* Do 4x4 ordered dithering. Taken from Form>>orderedDither32To16 */\n var v = ((y & 3) << 1) | (x & 1),\n dmv1 = ditherMatrix1[v],\n dmv2 = ditherMatrix2[v],\n di, dmi, dmo;\n di = (r1 * 496) >> 8, dmi = di & 15, dmo = di >> 4;\n if (dmv1 < dmi) { r1 = dmo+1; } else { r1 = dmo; };\n di = (g1 * 496) >> 8; dmi = di & 15; dmo = di >> 4;\n if (dmv1 < dmi) { g1 = dmo+1; } else { g1 = dmo; };\n di = (b1 * 496) >> 8; dmi = di & 15; dmo = di >> 4;\n if (dmv1 < dmi) { b1 = dmo+1; } else { b1 = dmo; };\n\n di = (r2 * 496) >> 8; dmi = di & 15; dmo = di >> 4;\n if (dmv2 < dmi) { r2 = dmo+1; } else { r2 = dmo; };\n di = (g2 * 496) >> 8; dmi = di & 15; dmo = di >> 4;\n if (dmv2 < dmi) { g2 = dmo+1; } else { g2 = dmo; };\n di = (b2 * 496) >> 8; dmi = di & 15; dmo = di >> 4;\n if (dmv2 < dmi) { b2 = dmo+1; } else { b2 = dmo; };\n\n var formPix = (r1 << 10) | (g1 << 5) | b1;\n if (formPix === 0) formPix = 1;\n formPix = (formPix << 16) | (r2 << 10) | (g2 << 5) | b2;\n if ((formPix & 65535) === 0) formPix = formPix | 1;\n formBits[i >> 3] = formPix;\n }\n },\n},\n'ScratchPluginAdditions', {\n // methods not handled by generated ScratchPlugin\n scratch_primitiveOpenURL: function(argCount) {\n var url = this.stackNonInteger(0).bytesAsString();\n if (url == \"\") return false;\n if (/^\\/SqueakJS\\//.test(url)) {\n url = url.slice(10); // remove file root\n var path = Squeak.splitFilePath(url),\n template = localStorage[\"squeak-template:\" + path.dirname];\n if (template) url = JSON.parse(template).url + \"/\" + path.basename;\n }\n window.open(url, \"_blank\"); // likely blocked as pop-up, but what can we do?\n return this.popNIfOK(argCount);\n },\n scratch_primitiveGetFolderPath: function(argCount) {\n var index = this.stackInteger(0);\n if (!this.success) return false;\n var path;\n switch (index) {\n case 1: path = '/'; break; // home dir\n // case 2: path = '/desktop'; break; // desktop\n // case 3: path = '/documents'; break; // documents\n // case 4: path = '/pictures'; break; // my pictures\n // case 5: path = '/music'; break; // my music\n }\n if (!path) return false;\n this.vm.popNandPush(argCount + 1, this.makeStString(this.filenameToSqueak(path)));\n return true;\n },\n},\n'JavaScriptPlugin', {\n js_primitiveDoUnderstand: function(argCount) {\n // This is JS's doesNotUnderstand handler,\n // as well as JS class's doesNotUnderstand handler.\n // Property name is the selector up to first colon. \n // If it is 'new', create an instance;\n // otherwise if the property is a function, call it;\n // otherwise if the property exists, get/set it;\n // otherwise, fail.\n var rcvr = this.stackNonInteger(1),\n obj = this.js_objectOrGlobal(rcvr),\n message = this.stackNonInteger(0).pointers,\n selector = message[0].bytesAsString(),\n args = message[1].pointers || [],\n isGlobal = !('jsObject' in rcvr),\n jsResult = null;\n try {\n // prevent callbacks while running this primitive\n this.js_activeCallback = \"Callbacks must be asynchronous\";\n var propName = selector.match(/([^:]*)/)[0];\n if (!isGlobal && propName === \"new\") {\n if (args.length === 0) {\n // new this()\n jsResult = new obj();\n } else {\n // new this(arg0, arg1, ...)\n var newArgs = [null].concat(this.js_fromStArray(args));\n jsResult = new (Function.prototype.bind.apply(obj, newArgs));\n }\n } else {\n if (!(propName in obj))\n return this.js_setError(\"Property not found: \" + propName);\n var propValue = obj[propName];\n if (typeof propValue == \"function\" && (!isGlobal || args.length > 0)) {\n // do this[selector](arg0, arg1, ...)\n jsResult = propValue.apply(obj, this.js_fromStArray(args));\n } else {\n if (args.length == 0) {\n // do this[selector]\n jsResult = propValue;\n } else if (args.length == 1) {\n // do this[selector] = arg0\n obj[propName] = this.js_fromStObject(args[0]);\n } else {\n // cannot do this[selector] = arg0, arg1, ...\n return this.js_setError(\"Property \" + propName + \" is not a function\");\n }\n }\n }\n } catch(err) {\n return this.js_setError(err.message);\n } finally {\n // allow callbacks\n this.js_activeCallback = null;\n }\n var stResult = this.makeStObject(jsResult, rcvr.sqClass);\n return this.popNandPushIfOK(argCount + 1, stResult);\n },\n js_primitiveAsString: function(argCount) {\n var obj = this.js_objectOrGlobal(this.stackNonInteger(0));\n return this.popNandPushIfOK(argCount + 1, this.makeStString(String(obj)));\n },\n js_primitiveTypeof: function(argCount) {\n var obj = this.js_objectOrGlobal(this.stackNonInteger(0));\n return this.popNandPushIfOK(argCount + 1, this.makeStString(typeof obj));\n },\n js_primitiveAt: function(argCount) {\n var rcvr = this.stackNonInteger(1),\n propName = this.vm.stackValue(0),\n propValue;\n try {\n var jsRcvr = this.js_objectOrGlobal(rcvr),\n jsPropName = this.js_fromStObject(propName),\n jsPropValue = jsRcvr[jsPropName];\n propValue = this.makeStObject(jsPropValue, rcvr.sqClass);\n } catch(err) {\n return this.js_setError(err.message);\n }\n return this.popNandPushIfOK(argCount + 1, propValue);\n },\n js_primitiveAtPut: function(argCount) {\n var rcvr = this.stackNonInteger(2),\n propName = this.vm.stackValue(1),\n propValue = this.vm.stackValue(0);\n try {\n var jsRcvr = this.js_objectOrGlobal(rcvr),\n jsPropName = this.js_fromStObject(propName),\n jsPropValue = this.js_fromStObject(propValue);\n jsRcvr[jsPropName] = jsPropValue;\n } catch(err) {\n return this.js_setError(err.message);\n }\n return this.popNandPushIfOK(argCount + 1, propValue);\n },\n js_primitiveSqueakAsJSObject: function(argCount) {\n var rcvr = this.stackNonInteger(1),\n arg = this.vm.stackValue(0);\n if (this.success) rcvr.jsObject = arg;\n return this.popNIfOK(argCount);\n },\n js_primitiveInitCallbacks: function(argCount) {\n // set callback semaphore for js_fromStBlock()\n this.js_callbackSema = this.stackInteger(0);\n this.js_activeCallback = null;\n return this.popNIfOK(argCount);\n },\n js_primitiveGetActiveCallbackBlock: function(argCount) {\n // we're inside an active callback, get block\n var callback = this.js_activeCallback;\n if (!callback) return this.js_setError(\"No active callback\");\n return this.popNandPushIfOK(argCount, callback.block);\n },\n js_primitiveGetActiveCallbackArgs: function(argCount) {\n // we're inside an active callback, get args\n var proxyClass = this.stackNonInteger(argCount),\n callback = this.js_activeCallback;\n if (!callback) return this.js_setError(\"No active callback\");\n try {\n // make array with expected number of arguments for block\n var numArgs = callback.block.pointers[Squeak.BlockContext_argumentCount],\n args = [];\n if (typeof numArgs !== 'number')\n numArgs = callback.block.pointers[Squeak.Closure_numArgs];\n for (var i = 0; i < numArgs; i++)\n args.push(callback.args[i]);\n return this.popNandPushIfOK(argCount, this.makeStArray(args, proxyClass));\n } catch(err) {\n return this.js_setError(err.message);\n }\n },\n js_primitiveReturnFromCallback: function(argCount) {\n if (argCount !== 1) return false;\n if (!this.js_activeCallback)\n return this.js_setError(\"No active callback\");\n // set result so the interpret loop in js_fromStBlock() terminates\n this.js_activeCallback.result = this.vm.pop();\n this.vm.breakOut(); // stop interpreting ASAP\n return true;\n },\n js_primitiveGetError: function(argCount) {\n var error = this.makeStObject(this.js_error);\n this.js_error = null;\n return this.popNandPushIfOK(argCount + 1, error);\n },\n js_setError: function(err) {\n this.js_error = String(err);\n return false;\n },\n js_fromStObject: function(obj) {\n if (typeof obj === \"number\") return obj;\n if (obj.jsObject) return obj.jsObject;\n if (obj.isFloat) return obj.float;\n if (obj.isNil) return null;\n if (obj.isTrue) return true;\n if (obj.isFalse) return false;\n if (obj.bytes || obj.sqClass === this.vm.specialObjects[Squeak.splOb_ClassString])\n return obj.bytesAsString();\n if (obj.sqClass === this.vm.specialObjects[Squeak.splOb_ClassArray])\n return this.js_fromStArray(obj.pointers || [], true);\n if (obj.sqClass === this.vm.specialObjects[Squeak.splOb_ClassBlockContext] ||\n obj.sqClass === this.vm.specialObjects[Squeak.splOb_ClassBlockClosure])\n return this.js_fromStBlock(obj);\n throw Error(\"asJSArgument needed for \" + obj);\n },\n js_fromStArray: function(objs, maybeDict) {\n if (objs.length > 0 && maybeDict && this.isAssociation(objs[0]))\n return this.js_fromStDict(objs);\n var jsArray = [];\n for (var i = 0; i < objs.length; i++)\n jsArray.push(this.js_fromStObject(objs[i]));\n return jsArray;\n },\n js_fromStDict: function(objs) {\n var jsDict = {};\n for (var i = 0; i < objs.length; i++) {\n var assoc = objs[i].pointers;\n if (!assoc || assoc.length !== 2) throw Error(assoc + \" is not an Association\");\n var jsKey = this.js_fromStObject(assoc[0]),\n jsValue = this.js_fromStObject(assoc[1]);\n jsDict[jsKey] = jsValue;\n }\n return jsDict;\n },\n js_fromStBlock: function(block) {\n // create callback function from block or closure\n if (!this.js_callbackSema) // image recognizes error string and will try again\n throw Error(\"CallbackSemaphore not set\");\n // block holds onto thisContext\n this.vm.reclaimableContextCount = 0;\n var squeak = this;\n return function evalSqueakBlock(/* arguments */) {\n return squeak.js_executeCallback(block, arguments);\n }\n },\n js_executeCallback: function(block, args) {\n if (this.js_activeCallback)\n if (typeof this.js_activeCallback == \"string\")\n throw Error(this.js_activeCallback);\n else\n return console.error(\"Callback: already active\");\n // make block and args available to primitiveGetActiveCallback\n this.js_activeCallback = {\n block: block,\n args: args,\n result: null,\n };\n // switch to callback handler process ASAP\n this.signalSemaphoreWithIndex(this.js_callbackSema);\n this.vm.forceInterruptCheck();\n // interpret until primitiveReturnFromCallback sets result\n var timeout = Date.now() + 500;\n while (Date.now() < timeout && !this.js_activeCallback.result)\n this.vm.interpret();\n var result = this.js_activeCallback.result;\n this.js_activeCallback = null;\n if (result) {\n // return result to JS caller as JS object or string\n try { return this.js_fromStObject(result); }\n catch(err) { return result.toString(); }\n } else {\n console.error(\"Callback error: \" + (this.vm.frozen ? \"frozen\" : \"timeout\"));\n }\n },\n js_objectOrGlobal: function(sqObject) {\n return 'jsObject' in sqObject ? sqObject.jsObject : window;\n },\n},\n'Obsolete', {\n primitiveFloatArrayAt: function(argCount) {\n return this.namedPrimitive(\"FloatArrayPlugin\", \"primitiveAt\", argCount);\n },\n primitiveFloatArrayMulFloatArray: function(argCount) {\n return this.namedPrimitive(\"FloatArrayPlugin\", \"primitiveMulFloatArray\", argCount);\n },\n primitiveFloatArrayAddScalar: function(argCount) {\n return this.namedPrimitive(\"FloatArrayPlugin\", \"primitiveAddScalar\", argCount);\n },\n primitiveFloatArrayDivFloatArray: function(argCount) {\n return this.namedPrimitive(\"FloatArrayPlugin\", \"primitiveDivFloatArray\", argCount);\n },\n primitiveFloatArrayDivScalar: function(argCount) {\n return this.namedPrimitive(\"FloatArrayPlugin\", \"primitiveDivScalar\", argCount);\n },\n primitiveFloatArrayHash: function(argCount) {\n return this.namedPrimitive(\"FloatArrayPlugin\", \"primitiveHash\", argCount);\n },\n primitiveFloatArrayAtPut: function(argCount) {\n return this.namedPrimitive(\"FloatArrayPlugin\", \"primitiveAtPut\", argCount);\n },\n primitiveFloatArrayMulScalar: function(argCount) {\n return this.namedPrimitive(\"FloatArrayPlugin\", \"primitiveMulScalar\", argCount);\n },\n primitiveFloatArrayAddFloatArray: function(argCount) {\n return this.namedPrimitive(\"FloatArrayPlugin\", \"primitiveAddFloatArray\", argCount);\n },\n primitiveFloatArraySubScalar: function(argCount) {\n return this.namedPrimitive(\"FloatArrayPlugin\", \"primitiveSubScalar\", argCount);\n },\n primitiveFloatArraySubFloatArray: function(argCount) {\n return this.namedPrimitive(\"FloatArrayPlugin\", \"primitiveSubFloatArray\", argCount);\n },\n primitiveFloatArrayEqual: function(argCount) {\n return this.namedPrimitive(\"FloatArrayPlugin\", \"primitiveEqual\", argCount);\n },\n primitiveFloatArrayDotProduct: function(argCount) {\n return this.namedPrimitive(\"FloatArrayPlugin\", \"primitiveDotProduct\", argCount);\n },\n m23PrimitiveInvertRectInto: function(argCount) {\n return this.namedPrimitive(\"Matrix2x3Plugin\", \"primitiveInvertRectInto\", argCount);\n },\n m23PrimitiveTransformPoint: function(argCount) {\n return this.namedPrimitive(\"Matrix2x3Plugin\", \"primitiveTransformPoint\", argCount);\n },\n m23PrimitiveIsPureTranslation: function(argCount) {\n return this.namedPrimitive(\"Matrix2x3Plugin\", \"primitiveIsPureTranslation\", argCount);\n },\n m23PrimitiveComposeMatrix: function(argCount) {\n return this.namedPrimitive(\"Matrix2x3Plugin\", \"primitiveComposeMatrix\", argCount);\n },\n m23PrimitiveTransformRectInto: function(argCount) {\n return this.namedPrimitive(\"Matrix2x3Plugin\", \"primitiveTransformRectInto\", argCount);\n },\n m23PrimitiveIsIdentity: function(argCount) {\n return this.namedPrimitive(\"Matrix2x3Plugin\", \"primitiveIsIdentity\", argCount);\n },\n m23PrimitiveInvertPoint: function(argCount) {\n return this.namedPrimitive(\"Matrix2x3Plugin\", \"primitiveInvertPoint\", argCount);\n },\n primitiveDeflateBlock: function(argCount) {\n return this.namedPrimitive(\"ZipPlugin\", \"primitiveDeflateBlock\", argCount);\n },\n primitiveDeflateUpdateHashTable: function(argCount) {\n return this.namedPrimitive(\"ZipPlugin\", \"primitiveDeflateUpdateHashTable\", argCount);\n },\n primitiveUpdateGZipCrc32: function(argCount) {\n return this.namedPrimitive(\"ZipPlugin\", \"primitiveUpdateGZipCrc32\", argCount);\n },\n primitiveInflateDecompressBlock: function(argCount) {\n return this.namedPrimitive(\"ZipPlugin\", \"primitiveInflateDecompressBlock\", argCount);\n },\n primitiveZipSendBlock: function(argCount) {\n return this.namedPrimitive(\"ZipPlugin\", \"primitiveZipSendBlock\", argCount);\n },\n primitiveFFTTransformData: function(argCount) {\n return this.namedPrimitive(\"FFTPlugin\", \"primitiveFFTTransformData\", argCount);\n },\n primitiveFFTScaleData: function(argCount) {\n return this.namedPrimitive(\"FFTPlugin\", \"primitiveFFTScaleData\", argCount);\n },\n primitiveFFTPermuteData: function(argCount) {\n return this.namedPrimitive(\"FFTPlugin\", \"primitiveFFTPermuteData\", argCount);\n },\n\tgePrimitiveMergeFillFrom: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveMergeFillFrom\", argCount);\n\t},\n\tgePrimitiveCopyBuffer: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveCopyBuffer\", argCount);\n\t},\n\tgePrimitiveAddRect: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveAddRect\", argCount);\n\t},\n\tgePrimitiveAddGradientFill: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveAddGradientFill\", argCount);\n\t},\n\tgePrimitiveSetClipRect: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveSetClipRect\", argCount);\n\t},\n\tgePrimitiveSetBitBltPlugin: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveSetBitBltPlugin\", argCount);\n\t},\n\tgePrimitiveRegisterExternalEdge: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveRegisterExternalEdge\", argCount);\n\t},\n\tgePrimitiveGetClipRect: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveGetClipRect\", argCount);\n\t},\n\tgePrimitiveAddBezier: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveAddBezier\", argCount);\n\t},\n\tgePrimitiveInitializeProcessing: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveInitializeProcessing\", argCount);\n\t},\n\tgePrimitiveRenderImage: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveRenderImage\", argCount);\n\t},\n\tgePrimitiveGetOffset: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveGetOffset\", argCount);\n\t},\n\tgePrimitiveSetDepth: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveSetDepth\", argCount);\n\t},\n\tgePrimitiveAddBezierShape: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveAddBezierShape\", argCount);\n\t},\n\tgePrimitiveSetEdgeTransform: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveSetEdgeTransform\", argCount);\n\t},\n\tgePrimitiveGetTimes: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveGetTimes\", argCount);\n\t},\n\tgePrimitiveNextActiveEdgeEntry: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveNextActiveEdgeEntry\", argCount);\n\t},\n\tgePrimitiveAddBitmapFill: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveAddBitmapFill\", argCount);\n\t},\n\tgePrimitiveGetDepth: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveGetDepth\", argCount);\n\t},\n\tgePrimitiveAbortProcessing: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveAbortProcessing\", argCount);\n\t},\n\tgePrimitiveNextGlobalEdgeEntry: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveNextGlobalEdgeEntry\", argCount);\n\t},\n\tgePrimitiveGetFailureReason: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveGetFailureReason\", argCount);\n\t},\n\tgePrimitiveDisplaySpanBuffer: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveDisplaySpanBuffer\", argCount);\n\t},\n\tgePrimitiveGetCounts: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveGetCounts\", argCount);\n\t},\n\tgePrimitiveChangedActiveEdgeEntry: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveChangedActiveEdgeEntry\", argCount);\n\t},\n\tgePrimitiveRenderScanline: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveRenderScanline\", argCount);\n\t},\n\tgePrimitiveGetBezierStats: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveGetBezierStats\", argCount);\n\t},\n\tgePrimitiveFinishedProcessing: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveFinishedProcessing\", argCount);\n\t},\n\tgePrimitiveNeedsFlush: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveNeedsFlush\", argCount);\n\t},\n\tgePrimitiveAddLine: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveAddLine\", argCount);\n\t},\n\tgePrimitiveSetOffset: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveSetOffset\", argCount);\n\t},\n\tgePrimitiveNextFillEntry: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveNextFillEntry\", argCount);\n\t},\n\tgePrimitiveInitializeBuffer: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveInitializeBuffer\", argCount);\n\t},\n\tgePrimitiveDoProfileStats: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveDoProfileStats\", argCount);\n\t},\n\tgePrimitiveAddActiveEdgeEntry: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveAddActiveEdgeEntry\", argCount);\n\t},\n\tgePrimitiveSetAALevel: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveSetAALevel\", argCount);\n\t},\n\tgePrimitiveNeedsFlushPut: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveNeedsFlushPut\", argCount);\n\t},\n\tgePrimitiveAddCompressedShape: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveAddCompressedShape\", argCount);\n\t},\n\tgePrimitiveSetColorTransform: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveSetColorTransform\", argCount);\n\t},\n\tgePrimitiveAddOval: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveAddOval\", argCount);\n\t},\n\tgePrimitiveRegisterExternalFill: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveRegisterExternalFill\", argCount);\n\t},\n\tgePrimitiveAddPolygon: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveAddPolygon\", argCount);\n\t},\n\tgePrimitiveGetAALevel: function(argCount) {\n\t return this.namedPrimitive(\"B2DPlugin\", \"primitiveGetAALevel\", argCount);\n\t},\n});\n\nObject.subclass('Squeak.InterpreterProxy',\n// provides function names exactly like the C interpreter, for ease of porting\n// but maybe less efficiently because of the indirection\n// only used for plugins translated from Slang (see plugins/*.js)\n// built-in primitives use the interpreter directly\n'initialization', {\n VM_PROXY_MAJOR: 1,\n VM_PROXY_MINOR: 11,\n initialize: function(vm) {\n this.vm = vm;\n this.remappableOops = [];\n Object.defineProperty(this, 'successFlag', {\n get: function() { return vm.primHandler.success; },\n set: function(success) { vm.primHandler.success = success; },\n });\n },\n majorVersion: function() {\n return this.VM_PROXY_MAJOR;\n },\n minorVersion: function() {\n return this.VM_PROXY_MINOR;\n },\n},\n'success',\n{\n failed: function() {\n return !this.successFlag;\n },\n primitiveFail: function() {\n this.successFlag = false;\n },\n primitiveFailFor: function(reasonCode) {\n this.successFlag = false;\n },\n success: function(boolean) {\n if (!boolean) this.successFlag = false;\n },\n},\n'stack access',\n{\n pop: function(n) {\n this.vm.popN(n);\n },\n popthenPush: function(n, obj) {\n this.vm.popNandPush(n, obj);\n },\n push: function(obj) {\n this.vm.push(obj);\n },\n pushBool: function(bool) {\n this.vm.push(bool ? this.vm.trueObj : this.vm.falseObj);\n },\n pushInteger: function(int) {\n this.vm.push(int);\n },\n pushFloat: function(num) {\n this.vm.push(this.floatObjectOf(num));\n },\n stackValue: function(n) {\n return this.vm.stackValue(n);\n },\n stackIntegerValue: function(n) {\n var int = this.vm.stackValue(n);\n if (typeof int === \"number\") return int;\n this.successFlag = false;\n return 0;\n },\n stackFloatValue: function(n) {\n this.vm.success = true;\n var float = this.vm.stackIntOrFloat(n);\n if (this.vm.success) return float;\n this.successFlag = false;\n return 0;\n },\n stackObjectValue: function(n) {\n var obj = this.vm.stackValue(n);\n if (typeof obj !== \"number\") return obj;\n this.successFlag = false;\n return this.vm.nilObj;\n },\n stackBytes: function(n) {\n var oop = this.vm.stackValue(n);\n if (oop.bytes) return oop.bytes;\n if (typeof oop === \"number\" || !oop.isBytes()) this.successFlag = false;\n return [];\n },\n stackWords: function(n) {\n var oop = this.vm.stackValue(n);\n if (oop.words) return oop.words;\n if (typeof oop === \"number\" || !oop.isWords()) this.successFlag = false;\n return [];\n },\n stackInt32Array: function(n) {\n var oop = this.vm.stackValue(n);\n if (oop.words) return oop.wordsAsInt32Array();\n if (typeof oop === \"number\" || !oop.isWords()) this.successFlag = false;\n return [];\n },\n stackInt16Array: function(n) {\n var oop = this.vm.stackValue(n);\n if (oop.words) return oop.wordsAsInt16Array();\n if (typeof oop === \"number\" || !oop.isWords()) this.successFlag = false;\n return [];\n },\n stackUint16Array: function(n) {\n var oop = this.vm.stackValue(n);\n if (oop.words) return oop.wordsAsUint16Array();\n if (typeof oop === \"number\" || !oop.isWords()) this.successFlag = false;\n return [];\n },\n},\n'object access',\n{\n isBytes: function(obj) {\n return typeof obj !== \"number\" && obj.isBytes();\n },\n isWords: function(obj) {\n return typeof obj !== \"number\" && obj.isWords();\n },\n isWordsOrBytes: function(obj) {\n return typeof obj !== \"number\" && obj.isWordsOrBytes();\n },\n isPointers: function(obj) {\n return typeof obj !== \"number\" && obj.isPointers();\n },\n isIntegerValue: function(obj) {\n return typeof obj === \"number\" && obj >= -0x40000000 && obj <= 0x3FFFFFFF;\n },\n isArray: function(obj) {\n return obj.sqClass === this.vm.specialObjects[Squeak.splOb_ClassArray];\n },\n isMemberOf: function(obj, className) {\n var nameBytes = obj.sqClass.pointers[Squeak.Class_name].bytes;\n if (className.length !== nameBytes.length) return false;\n for (var i = 0; i < className.length; i++)\n if (className.charCodeAt(i) !== nameBytes[i]) return false;\n return true;\n },\n booleanValueOf: function(obj) {\n if (obj.isTrue) return true;\n if (obj.isFalse) return false;\n this.successFlag = false;\n return false;\n },\n positive32BitValueOf: function(obj) {\n return this.vm.primHandler.positive32BitValueOf(obj);\n },\n positive32BitIntegerFor: function(int) {\n return this.vm.primHandler.pos32BitIntFor(int);\n },\n floatValueOf: function(obj) {\n if (obj.isFloat) return obj.float;\n this.successFlag = false;\n return 0;\n },\n floatObjectOf: function(num) {\n return this.vm.primHandler.makeFloat(num);\n },\n fetchPointerofObject: function(n, obj) {\n return obj.pointers[n];\n },\n fetchBytesofObject: function(n, obj) {\n var oop = obj.pointers[n];\n if (oop.bytes) return oop.bytes;\n if (oop.words) return oop.wordsAsUint8Array();\n if (typeof oop === \"number\" || !oop.isWordsOrBytes()) this.successFlag = false;\n return [];\n },\n fetchWordsofObject: function(n, obj) {\n var oop = obj.pointers[n];\n if (oop.words) return oop.words;\n if (typeof oop === \"number\" || !oop.isWords()) this.successFlag = false;\n return [];\n },\n fetchInt32ArrayofObject: function(n, obj) {\n var oop = obj.pointers[n];\n if (oop.words) return oop.wordsAsInt32Array();\n if (typeof oop === \"number\" || !oop.isWords()) this.successFlag = false;\n return [];\n },\n fetchInt16ArrayofObject: function(n, obj) {\n var oop = obj.pointers[n];\n if (oop.words) return oop.wordsAsInt16Array();\n if (typeof oop === \"number\" || !oop.isWords()) this.successFlag = false;\n return [];\n },\n fetchUint16ArrayofObject: function(n, obj) {\n var oop = obj.pointers[n];\n if (oop.words) return oop.wordsAsUint16Array();\n if (typeof oop === \"number\" || !oop.isWords()) this.successFlag = false;\n return [];\n },\n fetchIntegerofObject: function(n, obj) {\n var int = obj.pointers[n];\n if (typeof int === \"number\") return int;\n this.successFlag = false;\n return 0;\n },\n fetchLong32ofObject: function(n, obj) {\n return obj.words[n];\n },\n fetchFloatofObject: function(n, obj) {\n return this.floatValueOf(obj.pointers[n]);\n },\n storeIntegerofObjectwithValue: function(n, obj, value) {\n if (typeof value === \"number\")\n obj.pointers[n] = value;\n else this.successFlag = false;\n },\n storePointerofObjectwithValue: function(n, obj, value) {\n obj.pointers[n] = value;\n },\n stObjectatput: function(array, index, obj) {\n if (array.sqClass !== this.classArray()) throw Error(\"Array expected\");\n if (index < 1 || index >= array.pointers.length) return this.successFlag = false;\n array.pointers[index] = obj;\n },\n},\n'constant access',\n{\n isKindOfInteger: function(obj) {\n return typeof obj === \"number\" ||\n obj.sqClass == this.classLargeNegativeInteger() ||\n obj.sqClass == this.classLargePositiveInteger();\n },\n classArray: function() {\n return this.vm.specialObjects[Squeak.splOb_ClassArray];\n },\n classBitmap: function() {\n return this.vm.specialObjects[Squeak.splOb_ClassBitmap];\n },\n classSmallInteger: function() {\n return this.vm.specialObjects[Squeak.splOb_ClassInteger];\n },\n classLargePositiveInteger: function() {\n return this.vm.specialObjects[Squeak.splOb_ClassLargePositiveInteger];\n },\n classLargeNegativeInteger: function() {\n return this.vm.specialObjects[Squeak.splOb_ClassLargeNegativeInteger];\n },\n classPoint: function() {\n return this.vm.specialObjects[Squeak.splOb_ClassPoint];\n },\n classString: function() {\n return this.vm.specialObjects[Squeak.splOb_ClassString];\n },\n nilObject: function() {\n return this.vm.nilObj;\n },\n falseObject: function() {\n return this.vm.falseObj;\n },\n trueObject: function() {\n return this.vm.trueObj;\n },\n},\n'vm functions',\n{\n instantiateClassindexableSize: function(aClass, indexableSize) {\n return this.vm.instantiateClass(aClass, indexableSize);\n },\n methodArgumentCount: function() {\n return this.argCount;\n },\n makePointwithxValueyValue: function(x, y) {\n return this.vm.primHandler.makePointWithXandY(x, y);\n },\n pushRemappableOop: function(obj) {\n this.remappableOops.push(obj);\n },\n popRemappableOop: function() {\n return this.remappableOops.pop();\n },\n showDisplayBitsLeftTopRightBottom: function(form, left, top, right, bottom) {\n if (left < right && top < bottom) {\n var rect = {left: left, top: top, right: right, bottom: bottom};\n this.vm.primHandler.displayDirty(form, rect);\n }\n },\n ioLoadFunctionFrom: function(funcName, pluginName) {\n return this.vm.primHandler.loadFunctionFrom(funcName, pluginName);\n },\n});\n\n\nObject.subclass('Squeak.InstructionPrinter',\n'initialization', {\n initialize: function(method, vm) {\n this.method = method;\n this.vm = vm;\n },\n},\n'printing', {\n printInstructions: function(indent, highlight, highlightPC) {\n // all args are optional\n this.indent = indent; // prepend to every line except if highlighted\n this.highlight = highlight; // prepend to highlighted line\n this.highlightPC = highlightPC; // PC of highlighted line\n this.innerIndents = {};\n this.result = '';\n this.scanner = new Squeak.InstructionStream(this.method, this.vm);\n this.oldPC = this.scanner.pc;\n this.endPC = 0; // adjusted while scanning\n this.done = false;\n while (!this.done)\n this.scanner.interpretNextInstructionFor(this);\n return this.result;\n },\n print: function(instruction) {\n if (this.oldPC === this.highlightPC) {\n if (this.highlight) this.result += this.highlight;\n } else {\n if (this.indent) this.result += this.indent;\n }\n this.result += this.oldPC;\n for (var i = 0; i < this.innerIndents[this.oldPC] || 0; i++)\n this.result += \" \";\n this.result += \" <\";\n for (var i = this.oldPC; i < this.scanner.pc; i++) {\n if (i > this.oldPC) this.result += \" \";\n this.result += (this.method.bytes[i]+0x100).toString(16).substr(-2).toUpperCase(); // padded hex\n }\n this.result += \"> \" + instruction + \"\\n\";\n this.oldPC = this.scanner.pc;\n }\n},\n'decoding', {\n blockReturnTop: function() {\n this.print('blockReturn');\n },\n doDup: function() {\n this.print('dup');\n },\n doPop: function() {\n this.print('pop');\n },\n jump: function(offset) {\n this.print('jumpTo: ' + (this.scanner.pc + offset));\n if (this.scanner.pc + offset > this.endPC) this.endPC = this.scanner.pc + offset;\n },\n jumpIf: function(condition, offset) {\n this.print((condition ? 'jumpIfTrue: ' : 'jumpIfFalse: ') + (this.scanner.pc + offset));\n if (this.scanner.pc + offset > this.endPC) this.endPC = this.scanner.pc + offset;\n },\n methodReturnReceiver: function() {\n this.print('return: receiver');\n this.done = this.scanner.pc > this.endPC;\n },\n methodReturnTop: function() {\n this.print('return: topOfStack');\n this.done = this.scanner.pc > this.endPC;\n },\n methodReturnConstant: function(obj) {\n this.print('returnConst: ' + obj.toString());\n this.done = this.scanner.pc > this.endPC;\n },\n popIntoLiteralVariable: function(anAssociation) {\n this.print('popIntoBinding: ' + anAssociation.assnKeyAsString());\n },\n popIntoReceiverVariable: function(offset) {\n this.print('popIntoInstVar: ' + offset);\n },\n popIntoTemporaryVariable: function(offset) {\n this.print('popIntoTemp: ' + offset);\n },\n pushActiveContext: function() {\n this.print('push: thisContext');\n },\n pushConstant: function(obj) {\n var value = obj.sqInstName ? obj.sqInstName() : obj.toString();\n this.print('pushConst: ' + value);\n },\n pushLiteralVariable: function(anAssociation) {\n this.print('pushBinding: ' + anAssociation.assnKeyAsString());\n },\n pushReceiver: function() {\n this.print('push: self');\n },\n pushReceiverVariable: function(offset) {\n this.print('pushInstVar: ' + offset);\n },\n pushTemporaryVariable: function(offset) {\n this.print('pushTemp: ' + offset);\n },\n send: function(selector, numberArguments, supered) {\n this.print( (supered ? 'superSend: #' : 'send: #') + (selector.bytesAsString ? selector.bytesAsString() : selector));\n },\n storeIntoLiteralVariable: function(anAssociation) {\n this.print('storeIntoBinding: ' + anAssociation.assnKeyAsString());\n },\n storeIntoReceiverVariable: function(offset) {\n this.print('storeIntoInstVar: ' + offset);\n },\n storeIntoTemporaryVariable: function(offset) {\n this.print('storeIntoTemp: ' + offset);\n },\n pushNewArray: function(size) {\n this.print('push: (Array new: ' + size + ')');\n },\n popIntoNewArray: function(numElements) {\n this.print('pop: ' + numElements + ' into: (Array new: ' + numElements + ')');\n },\n pushRemoteTemp: function(offset , arrayOffset) {\n this.print('push: ' + offset + ' ofTemp: ' + arrayOffset);\n },\n storeIntoRemoteTemp: function(offset , arrayOffset) {\n this.print('storeInto: ' + offset + ' ofTemp: ' + arrayOffset);\n },\n popIntoRemoteTemp: function(offset , arrayOffset) {\n this.print('popInto: ' + offset + ' ofTemp: ' + arrayOffset);\n },\n pushClosureCopy: function(numCopied, numArgs, blockSize) {\n var from = this.scanner.pc,\n to = from + blockSize;\n this.print('closure(' + from + '-' + (to-1) + '): ' + numCopied + ' copied, ' + numArgs + ' args');\n for (var i = from; i < to; i++)\n this.innerIndents[i] = (this.innerIndents[i] || 0) + 1;\n if (to > this.endPC) this.endPC = to;\n },\n});\n\nObject.subclass('Squeak.InstructionStream',\n'initialization', {\n initialize: function(method, vm) {\n this.vm = vm;\n this.method = method;\n this.pc = 0;\n this.specialConstants = [vm.trueObj, vm.falseObj, vm.nilObj, -1, 0, 1, 2];\n },\n},\n'decoding',\n{\n interpretNextInstructionFor: function(client) {\n // Send to the argument, client, a message that specifies the type of the next instruction.\n var method = this.method;\n var byte = method.bytes[this.pc++];\n var type = (byte / 16) | 0;\n var offset = byte % 16;\n if (type === 0) return client.pushReceiverVariable(offset);\n if (type === 1) return client.pushTemporaryVariable(offset);\n if (type === 2) return client.pushConstant(method.methodGetLiteral(offset));\n if (type === 3) return client.pushConstant(method.methodGetLiteral(offset + 16));\n if (type === 4) return client.pushLiteralVariable(method.methodGetLiteral(offset));\n if (type === 5) return client.pushLiteralVariable(method.methodGetLiteral(offset + 16));\n if (type === 6)\n if (offset<8) return client.popIntoReceiverVariable(offset)\n else return client.popIntoTemporaryVariable(offset-8);\n if (type === 7) {\n if (offset===0) return client.pushReceiver()\n if (offset < 8) return client.pushConstant(this.specialConstants[offset - 1])\n if (offset===8) return client.methodReturnReceiver();\n if (offset < 12) return client.methodReturnConstant(this.specialConstants[offset - 9]);\n if (offset===12) return client.methodReturnTop();\n if (offset===13) return client.blockReturnTop();\n if (offset > 13) throw Error(\"unusedBytecode\");\n }\n if (type === 8) return this.interpretExtension(offset, method, client);\n if (type === 9) // short jumps\n if (offset<8) return client.jump(offset+1);\n else return client.jumpIf(false, offset-8+1);\n if (type === 10) {// long jumps\n byte = this.method.bytes[this.pc++];\n if (offset<8) return client.jump((offset-4)*256 + byte);\n else return client.jumpIf(offset<12, (offset & 3)*256 + byte);\n }\n if (type === 11)\n return client.send(this.vm.specialSelectors[2 * offset],\n this.vm.specialSelectors[2 * offset + 1],\n false);\n if (type === 12)\n return client.send(this.vm.specialSelectors[2 * (offset + 16)],\n this.vm.specialSelectors[2 * (offset + 16) + 1],\n false);\n if (type > 12)\n return client.send(method.methodGetLiteral(offset), type-13, false);\n },\n interpretExtension: function(offset, method, client) {\n if (offset <= 6) { // Extended op codes 128-134\n var byte2 = this.method.bytes[this.pc++];\n if (offset <= 2) { // 128-130: extended pushes and pops\n var type = byte2 / 64 | 0;\n var offset2 = byte2 % 64;\n if (offset === 0) {\n if (type === 0) return client.pushReceiverVariable(offset2);\n if (type === 1) return client.pushTemporaryVariable(offset2);\n if (type === 2) return client.pushConstant(this.method.methodGetLiteral(offset2));\n if (type === 3) return client.pushLiteralVariable(this.method.methodGetLiteral(offset2));\n }\n if (offset === 1) {\n if (type === 0) return client.storeIntoReceiverVariable(offset2);\n if (type === 1) return client.storeIntoTemporaryVariable(offset2);\n if (type === 2) throw Error(\"illegalStore\");\n if (type === 3) return client.storeIntoLiteralVariable(this.method.methodGetLiteral(offset2));\n }\n if (offset === 2) {\n if (type === 0) return client.popIntoReceiverVariable(offset2);\n if (type === 1) return client.popIntoTemporaryVariable(offset2);\n if (type === 2) throw Error(\"illegalStore\");\n if (type === 3) return client.popIntoLiteralVariable(this.method.methodGetLiteral(offset2));\n }\n }\n // 131-134 (extended sends)\n if (offset === 3) // Single extended send\n return client.send(this.method.methodGetLiteral(byte2 % 32), byte2 / 32 | 0, false);\n if (offset === 4) { // Double extended do-anything\n var byte3 = this.method.bytes[this.pc++];\n var type = byte2 / 32 | 0;\n if (type === 0) return client.send(this.method.methodGetLiteral(byte3), byte2 % 32, false);\n if (type === 1) return client.send(this.method.methodGetLiteral(byte3), byte2 % 32, true);\n if (type === 2) return client.pushReceiverVariable(byte3);\n if (type === 3) return client.pushConstant(this.method.methodGetLiteral(byte3));\n if (type === 4) return client.pushLiteralVariable(this.method.methodGetLiteral(byte3));\n if (type === 5) return client.storeIntoReceiverVariable(byte3);\n if (type === 6) return client.popIntoReceiverVariable(byte3);\n if (type === 7) return client.storeIntoLiteralVariable(this.method.methodGetLiteral(byte3));\n }\n if (offset === 5) // Single extended send to super\n return client.send(this.method.methodGetLiteral(byte2 & 31), byte2 >> 5, true);\n if (offset === 6) // Second extended send\n return client.send(this.method.methodGetLiteral(byte2 & 63), byte2 >> 6, false);\n }\n if (offset === 7) return client.doPop();\n if (offset === 8) return client.doDup();\n if (offset === 9) return client.pushActiveContext();\n // closures\n var byte2 = this.method.bytes[this.pc++];\n if (offset === 10)\n return byte2 < 128 ? client.pushNewArray(byte2) : client.popIntoNewArray(byte2 - 128);\n if (offset === 11) throw Error(\"unusedBytecode\");\n var byte3 = this.method.bytes[this.pc++];\n if (offset === 12) return client.pushRemoteTemp(byte2, byte3);\n if (offset === 13) return client.storeIntoRemoteTemp(byte2, byte3);\n if (offset === 14) return client.popIntoRemoteTemp(byte2, byte3);\n // offset === 15\n var byte4 = this.method.bytes[this.pc++];\n return client.pushClosureCopy(byte2 >> 4, byte2 & 0xF, (byte3 * 256) + byte4);\n }\n});\n\n}) // end of module\n","module('users.bert.SqueakJS.jit').requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\"use strict\"; \n/*\n * Copyright (c) 2014-2016 Bert Freudenberg\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nObject.subclass('Squeak.Compiler',\n\n/****************************************************************************\n\nVM and Compiler\n===============\n\nThe VM has an interpreter, it will work fine (and much more memory-efficient)\nwithout loading a compiler. The compiler plugs into the VM by providing the\nSqueak.Compiler global. It can be easily replaced by just loading a different\nscript providing Squeak.Compiler.\n\nThe VM creates the compiler instance after an image has been loaded and the VM\nbeen initialized. Whenever a method is activated that was not compiled yet, the\ncompiler gets a chance to compile it. The compiler may decide to wait for a couple\nof activations before actually compiling it. This might prevent do-its from ever\ngetting compiled, because they are only activated once. Therefore, the compiler\nis also called when a long-running non-optimized loop calls checkForInterrupts.\nFinally, whenever the interpreter is about to execute a bytecode, it calls the\ncompiled method instead (which typically will execute many bytecodes):\n\n initialize:\n compiler = new Squeak.Compiler(vm);\n\n executeNewMethod, checkForInterrupts:\n if (!method.compiled && compiler)\n compiler.compile(method);\n\n interpret:\n if (method.compiled) method.compiled(vm);\n\nNote that a compiler could hook itself into a compiled method by dispatching\nto vm.compiler in the generated code. This would allow gathering statistics,\nrecompiling with optimized code etc.\n\n\nAbout This Compiler\n===================\n\nThe compiler in this file is meant to be simple, fast-compiling, and general.\nIt transcribes bytecodes 1-to-1 into equivalent JavaScript code using\ntemplates (and thus can even support single-stepping). It uses the\ninterpreter's stack pointer (SP) and program counter (PC), actual context\nobjects just like the interpreter, no register mapping, it does not optimize\nsends, etc.\n\nJumps are handled by wrapping the whole method in a loop and switch. This also\nenables continuing in the middle of a compiled method: whenever another context\nis activated, the method returns to the main loop, and is entered again later\nwith a different PC. Here is an example method, its bytecodes, and a simplified\nversion of the generated JavaScript code:\n\n method\n [value selector] whileFalse.\n ^ 42\n\n 0 <00> pushInstVar: 0\n 1 <D0> send: #selector\n 2 <A8 02> jumpIfTrue: 6\n 4 <A3 FA> jumpTo: 0\n 6 <21> pushConst: 42\n 7 <7C> return: topOfStack\n\n while (true) switch (vm.pc) {\n case 0:\n stack[++vm.sp] = inst[0];\n vm.pc = 2; vm.send(#selector);\n return 0;\n case 2:\n if (stack[vm.sp--] === vm.trueObj) {\n vm.pc = 6;\n continue; // jump to case 6\n }\n // otherwise fall through to next case\n case 4:\n vm.pc = 0;\n continue; // jump to case 0\n case 6:\n stack[++vm.sp] = 42;\n vm.pc = 7; vm.doReturn(stack[vm.sp]);\n return 0;\n }\n\nThe compiled method should return the number of bytecodes executed, but for\nstatistical purposes only. It's fine to return 0.\n\nDebugging support\n=================\n\nThis compiler supports generating single-stepping code and comments, which are\nrather helpful during debugging.\n\nNormally, only bytecodes that can be a jump target are given a label. Also,\nbytecodes following a send operation need a label, to enable returning to that\nspot after the context switch. All other bytecodes are executed continuously.\n\nWhen compiling for single-stepping, each bytecode gets a label, and after each\nbytecode a flag is checked and the method returns if needed. Because this is\na performance penalty, methods are first compiled without single-step support, \nand recompiled for single-stepping on demand.\n\nThis is optional, another compiler can answer false from enableSingleStepping().\nIn that case the VM will delete the compiled method and invoke the interpreter\nto single-step.\n\n*****************************************************************************/\n\n'initialization', {\n initialize: function(vm) {\n this.vm = vm;\n this.comments = !!Squeak.Compiler.comments, // generate comments\n // for debug-printing only\n this.specialSelectors = ['+', '-', '<', '>', '<=', '>=', '=', '~=', '*', '/', '\\\\', '@',\n 'bitShift:', '//', 'bitAnd:', 'bitOr:', 'at:', 'at:put:', 'size', 'next', 'nextPut:',\n 'atEnd', '==', 'class', 'blockCopy:', 'value', 'value:', 'do:', 'new', 'new:', 'x', 'y'];\n },\n},\n'accessing', {\n compile: function(method, optClass, optSel) {\n if (!method.isHot) {\n // 1st time\n method.isHot = true;\n } else {\n // 2nd time\n this.singleStep = false;\n this.debug = this.comments;\n var clsName = optClass && optClass.className(),\n sel = optSel && optSel.bytesAsString();\n method.compiled = this.generate(method, clsName, sel);\n }\n },\n enableSingleStepping: function(method, optClass, optSel) {\n // recompile method for single-stepping\n if (!method.compiled || !method.compiled.canSingleStep) {\n this.singleStep = true; // generate breakpoint support\n this.debug = true;\n var clsAndSel = this.vm.printMethod(method, optClass, optSel).split(\">>\"); // likely expensive\n method.compiled = this.generate(method, clsAndSel[0], clsAndSel[1]);\n method.compiled.canSingleStep = true;\n }\n // if a compiler does not support single-stepping, return false\n return true;\n },\n functionNameFor: function(cls, sel) {\n if (!cls || !sel) return \"Squeak_DOIT\";\n if (!/[^a-zA-Z0-9:_]/.test(sel))\n return (cls + \"_\" + sel).replace(/[: ]/g, \"_\");\n var op = sel.replace(/./g, function(char) {\n var repl = {'|': \"OR\", '~': \"NOT\", '<': \"LT\", '=': \"EQ\", '>': \"GT\",\n '&': \"AND\", '@': \"AT\", '*': \"TIMES\", '+': \"PLUS\", '\\\\': \"MOD\",\n '-': \"MINUS\", ',': \"COMMA\", '/': \"DIV\", '?': \"IF\"}[char];\n return repl || 'OPERATOR';\n });\n return cls.replace(/[ ]/, \"_\") + \"__\" + op + \"__\";\n },\n},\n'generating',\n{\n generate: function(method, optClass, optSel) {\n this.method = method;\n this.pc = 0; // next bytecode\n this.endPC = 0; // pc of furthest jump target\n this.prevPC = 0; // pc at start of current instruction\n this.source = []; // snippets will be joined in the end\n this.sourceLabels = {}; // source pos of generated labels \n this.needsLabel = {0: true}; // jump targets\n this.needsBreak = false; // insert break check for previous bytecode\n if (optClass && optSel)\n this.source.push(\"// \", optClass, \">>\", optSel, \"\\n\");\n this.source.push(\n \"var context = vm.activeContext,\\n\",\n \" stack = context.pointers,\\n\",\n \" rcvr = vm.receiver,\\n\",\n \" inst = rcvr.pointers,\\n\",\n \" temp = vm.homeContext.pointers,\\n\",\n \" lit = vm.method.pointers,\\n\",\n \" bytecodes = 0 - vm.pc;\\n\",\n \"while (true) switch (vm.pc) {\\n\"\n );\n this.done = false;\n while (!this.done) {\n var byte = method.bytes[this.pc++],\n byte2 = 0;\n switch (byte & 0xF8) {\n // load receiver variable\n case 0x00: case 0x08:\n this.generatePush(\"inst[\", byte & 0x0F, \"]\");\n break;\n // load temporary variable\n case 0x10: case 0x18:\n this.generatePush(\"temp[\", 6 + (byte & 0xF), \"]\");\n break;\n // loadLiteral\n case 0x20: case 0x28: case 0x30: case 0x38:\n this.generatePush(\"lit[\", 1 + (byte & 0x1F), \"]\");\n break;\n // loadLiteralIndirect\n case 0x40: case 0x48: case 0x50: case 0x58:\n this.generatePush(\"lit[\", 1 + (byte & 0x1F), \"].pointers[1]\");\n break;\n // storeAndPop rcvr\n case 0x60:\n this.generatePopInto(\"inst[\", byte & 0x07, \"]\"); \n break;\n // storeAndPop temp\n case 0x68:\n this.generatePopInto(\"temp[\", 6 + (byte & 0x07), \"]\");\n break;\n // Quick push\n case 0x70:\n switch (byte) {\n case 0x70: this.generatePush(\"rcvr\"); break;\n case 0x71: this.generatePush(\"vm.trueObj\"); break;\n case 0x72: this.generatePush(\"vm.falseObj\"); break;\n case 0x73: this.generatePush(\"vm.nilObj\"); break;\n case 0x74: this.generatePush(\"-1\"); break;\n case 0x75: this.generatePush(\"0\"); break;\n case 0x76: this.generatePush(\"1\"); break;\n case 0x77: this.generatePush(\"2\"); break;\n }\n break;\n // Quick return\n case 0x78:\n switch (byte) {\n case 0x78: this.generateReturn(\"rcvr\"); break;\n case 0x79: this.generateReturn(\"vm.trueObj\"); break;\n case 0x7A: this.generateReturn(\"vm.falseObj\"); break;\n case 0x7B: this.generateReturn(\"vm.nilObj\"); break;\n case 0x7C: this.generateReturn(\"stack[vm.sp]\"); break;\n case 0x7D: this.generateBlockReturn(); break;\n default: throw Error(\"unusedBytecode\");\n }\n break;\n // Extended bytecodes \n case 0x80: case 0x88:\n this.generateExtended(byte);\n break;\n // short jump\n case 0x90:\n this.generateJump((byte & 0x07) + 1);\n break;\n // short conditional jump\n case 0x98:\n this.generateJumpIf(false, (byte & 0x07) + 1);\n break;\n // long jump, forward and back\n case 0xA0:\n byte2 = method.bytes[this.pc++];\n this.generateJump(((byte&7)-4) * 256 + byte2);\n break;\n // long conditional jump\n case 0xA8:\n byte2 = method.bytes[this.pc++];\n this.generateJumpIf(byte < 0xAC, (byte & 3) * 256 + byte2);\n break;\n // SmallInteger ops: + - < > <= >= = ~= * / @ lshift: lxor: land: lor:\n case 0xB0: case 0xB8:\n this.generateNumericOp(byte);\n break;\n // quick primitives: // at:, at:put:, size, next, nextPut:, ...\n case 0xC0: case 0xC8:\n this.generateQuickPrim(byte);\n break;\n // send literal selector\n case 0xD0: case 0xD8:\n this.generateSend(\"lit[\", 1 + (byte & 0x0F), \"]\", 0, false);\n break;\n case 0xE0: case 0xE8:\n this.generateSend(\"lit[\", 1 + (byte & 0x0F), \"]\", 1, false);\n break;\n case 0xF0: case 0xF8:\n this.generateSend(\"lit[\", 1 + (byte & 0x0F), \"]\", 2, false);\n break;\n }\n }\n var funcName = this.functionNameFor(optClass, optSel);\n if (this.singleStep) {\n if (this.debug) this.source.push(\"// all valid PCs have a label;\\n\");\n this.source.push(\"default: throw Error('invalid PC'); }\"); // all PCs handled\n return new Function(\"return function \" + funcName + \"(vm, singleStep) {\\n\" + this.source.join(\"\") + \"\\n}\")();\n } else {\n if (this.debug) this.source.push(\"// fall back to single-stepping\\n\");\n this.source.push(\"default: bytecodes += vm.pc; vm.interpretOne(true); return bytecodes;}\");\n this.deleteUnneededLabels();\n return new Function(\"return function \" + funcName + \"(vm) {\\n\" + this.source.join(\"\") + \"\\n}\")();\n }\n },\n generateExtended: function(bytecode) {\n var byte2, byte3;\n switch (bytecode) {\n // extended push\n case 0x80:\n byte2 = this.method.bytes[this.pc++];\n switch (byte2 >> 6) {\n case 0: this.generatePush(\"inst[\", byte2 & 0x3F, \"]\"); return;\n case 1: this.generatePush(\"temp[\", 6 + (byte2 & 0x3F), \"]\"); return;\n case 2: this.generatePush(\"lit[\", 1 + (byte2 & 0x3F), \"]\"); return;\n case 3: this.generatePush(\"lit[\", 1 + (byte2 & 0x3F), \"].pointers[1]\"); return;\n }\n // extended store\n case 0x81:\n byte2 = this.method.bytes[this.pc++];\n switch (byte2 >> 6) {\n case 0: this.generateStoreInto(\"inst[\", byte2 & 0x3F, \"]\"); return;\n case 1: this.generateStoreInto(\"temp[\", 6 + (byte2 & 0x3F), \"]\"); return;\n case 2: throw Error(\"illegal store into literal\");\n case 3: this.generateStoreInto(\"lit[\", 1 + (byte2 & 0x3F), \"].pointers[1]\"); return;\n }\n return;\n // extended pop into\n case 0x82:\n byte2 = this.method.bytes[this.pc++];\n switch (byte2 >> 6) {\n case 0: this.generatePopInto(\"inst[\", byte2 & 0x3F, \"]\"); return;\n case 1: this.generatePopInto(\"temp[\", 6 + (byte2 & 0x3F), \"]\"); return;\n case 2: throw Error(\"illegal pop into literal\");\n case 3: this.generatePopInto(\"lit[\", 1 + (byte2 & 0x3F), \"].pointers[1]\"); return;\n }\n // Single extended send\n case 0x83:\n byte2 = this.method.bytes[this.pc++];\n this.generateSend(\"lit[\", 1 + (byte2 & 0x1F), \"]\", byte2 >> 5, false);\n return;\n // Double extended do-anything\n case 0x84:\n byte2 = this.method.bytes[this.pc++];\n byte3 = this.method.bytes[this.pc++];\n switch (byte2 >> 5) {\n case 0: this.generateSend(\"lit[\", 1 + byte3, \"]\", byte2 & 31, false); return;\n case 1: this.generateSend(\"lit[\", 1 + byte3, \"]\", byte2 & 31, true); return;\n case 2: this.generatePush(\"inst[\", byte3, \"]\"); return;\n case 3: this.generatePush(\"lit[\", 1 + byte3, \"]\"); return;\n case 4: this.generatePush(\"lit[\", 1 + byte3, \"].pointers[1]\"); return;\n case 5: this.generateStoreInto(\"inst[\", byte3, \"]\"); return;\n case 6: this.generatePopInto(\"inst[\", byte3, \"]\"); return;\n case 7: this.generateStoreInto(\"lit[\", 1 + byte3, \"].pointers[1]\"); return;\n }\n // Single extended send to super\n case 0x85:\n byte2 = this.method.bytes[this.pc++];\n this.generateSend(\"lit[\", 1 + (byte2 & 0x1F), \"]\", byte2 >> 5, true);\n return;\n // Second extended send\n case 0x86:\n byte2 = this.method.bytes[this.pc++];\n this.generateSend(\"lit[\", 1 + (byte2 & 0x3F), \"]\", byte2 >> 6, false);\n return;\n // pop\n case 0x87:\n this.generateInstruction(\"pop\", \"vm.sp--\");\n return;\n // dup\n case 0x88:\n this.generateInstruction(\"dup\", \"var dup = stack[vm.sp]; stack[++vm.sp] = dup\");\n return;\n // thisContext\n case 0x89:\n this.generateInstruction(\"thisContext\", \"stack[++vm.sp] = vm.exportThisContext()\");\n return;\n // closures\n case 0x8A:\n byte2 = this.method.bytes[this.pc++];\n var popValues = byte2 > 127,\n count = byte2 & 127;\n this.generateClosureTemps(count, popValues);\n return;\n case 0x8B:\n throw Error(\"unusedBytecode\");\n // remote push from temp vector\n case 0x8C:\n byte2 = this.method.bytes[this.pc++];\n byte3 = this.method.bytes[this.pc++];\n this.generatePush(\"temp[\", 6 + byte3, \"].pointers[\", byte2, \"]\");\n return;\n // remote store into temp vector\n case 0x8D:\n byte2 = this.method.bytes[this.pc++];\n byte3 = this.method.bytes[this.pc++];\n this.generateStoreInto(\"temp[\", 6 + byte3, \"].pointers[\", byte2, \"]\");\n return;\n // remote store and pop into temp vector\n case 0x8E:\n byte2 = this.method.bytes[this.pc++];\n byte3 = this.method.bytes[this.pc++];\n this.generatePopInto(\"temp[\", 6 + byte3, \"].pointers[\", byte2, \"]\");\n return;\n // pushClosureCopy\n case 0x8F:\n byte2 = this.method.bytes[this.pc++];\n byte3 = this.method.bytes[this.pc++];\n var byte4 = this.method.bytes[this.pc++];\n var numArgs = byte2 & 0xF,\n numCopied = byte2 >> 4,\n blockSize = byte3 << 8 | byte4;\n this.generateClosureCopy(numArgs, numCopied, blockSize);\n return;\n }\n },\n generatePush: function(value, arg1, suffix1, arg2, suffix2) {\n if (this.debug) this.generateDebugCode(\"push\");\n this.generateLabel();\n this.source.push(\"stack[++vm.sp] = \", value);\n if (arg1 !== undefined) {\n this.source.push(arg1, suffix1);\n if (arg2 !== undefined) {\n this.source.push(arg2, suffix2);\n }\n }\n this.source.push(\";\\n\");\n },\n generateStoreInto: function(value, arg1, suffix1, arg2, suffix2) {\n if (this.debug) this.generateDebugCode(\"store into\");\n this.generateLabel();\n this.source.push(value);\n if (arg1 !== undefined) {\n this.source.push(arg1, suffix1);\n if (arg2 !== undefined) {\n this.source.push(arg2, suffix2);\n }\n }\n this.source.push(\" = stack[vm.sp];\\n\");\n },\n generatePopInto: function(value, arg1, suffix1, arg2, suffix2) {\n if (this.debug) this.generateDebugCode(\"pop into\");\n this.generateLabel();\n this.source.push(value);\n if (arg1 !== undefined) {\n this.source.push(arg1, suffix1);\n if (arg2 !== undefined) {\n this.source.push(arg2, suffix2);\n }\n }\n this.source.push(\" = stack[vm.sp--];\\n\");\n },\n generateReturn: function(what) {\n if (this.debug) this.generateDebugCode(\"return\");\n this.generateLabel();\n this.source.push(\n \"vm.pc = \", this.pc, \"; vm.doReturn(\", what, \"); return bytecodes + \", this.pc, \";\\n\");\n this.needsBreak = false; // returning anyway\n this.done = this.pc > this.endPC;\n },\n generateBlockReturn: function() {\n if (this.debug) this.generateDebugCode(\"block return\");\n this.generateLabel();\n // actually stack === context.pointers but that would look weird\n this.source.push(\n \"vm.pc = \", this.pc, \"; vm.doReturn(stack[vm.sp--], context.pointers[0]); return bytecodes + \", this.pc, \";\\n\");\n this.needsBreak = false; // returning anyway\n },\n generateJump: function(distance) {\n var destination = this.pc + distance;\n if (this.debug) this.generateDebugCode(\"jump to \" + destination);\n this.generateLabel();\n this.source.push(\"vm.pc = \", destination, \"; \");\n if (distance < 0) this.source.push(\"bytecodes += \", -distance, \"; \");\n else this.source.push(\"bytecodes -= \", distance, \"; \");\n if (distance < 0) this.source.push(\n \"\\nif (vm.interruptCheckCounter-- <= 0) {\\n\",\n \" vm.checkForInterrupts();\\n\",\n \" if (context !== vm.activeContext || vm.breakOutOfInterpreter !== false) return bytecodes + \", destination, \";\\n\",\n \"}\\n\");\n if (this.singleStep) this.source.push(\"\\nif (vm.breakOutOfInterpreter) return bytecodes + \", destination, \";\\n\");\n this.source.push(\"continue;\\n\");\n this.needsBreak = false; // already checked\n this.needsLabel[destination] = true;\n if (destination > this.endPC) this.endPC = destination;\n },\n generateJumpIf: function(condition, distance) {\n var destination = this.pc + distance;\n if (this.debug) this.generateDebugCode(\"jump if \" + condition + \" to \" + destination);\n this.generateLabel();\n this.source.push(\n \"var cond = stack[vm.sp--]; if (cond === vm.\", condition, \"Obj) {vm.pc = \", destination, \"; bytecodes -= \", distance, \"; \");\n if (this.singleStep) this.source.push(\"if (vm.breakOutOfInterpreter) return bytecodes + \", destination,\"; else \");\n this.source.push(\"continue}\\n\",\n \"else if (cond !== vm.\", !condition, \"Obj) {vm.sp++; vm.pc = \", this.pc, \"; vm.send(vm.specialObjects[25], 0, false); return bytecodes + \", this.pc, \"}\\n\");\n this.needsLabel[this.pc] = true; // for coming back after #mustBeBoolean send\n this.needsLabel[destination] = true; // obviously\n if (destination > this.endPC) this.endPC = destination;\n },\n generateQuickPrim: function(byte) {\n if (this.debug) this.generateDebugCode(\"quick prim \" + this.specialSelectors[(byte & 0x0F) + 16]);\n this.generateLabel();\n switch (byte) {\n //case 0xC0: return this.popNandPushIfOK(2, this.objectAt(true,true,false)); // at:\n //case 0xC1: return this.popNandPushIfOK(3, this.objectAtPut(true,true,false)); // at:put:\n case 0xC2: // size\n this.source.push(\n \"if (stack[vm.sp].sqClass === vm.specialObjects[7]) stack[vm.sp] = stack[vm.sp].pointersSize();\\n\",\n \"else if (stack[vm.sp].sqClass === vm.specialObjects[6]) stack[vm.sp] = stack[vm.sp].bytesSize();\\n\",\n \"else { vm.pc = \", this.pc, \"; vm.sendSpecial(18); if (context !== vm.activeContext || vm.breakOutOfInterpreter !== false) return bytecodes + \", this.pc, \"; }\\n\"); \n this.needsLabel[this.pc] = true;\n return;\n //case 0xC3: return false; // next\n //case 0xC4: return false; // nextPut:\n //case 0xC5: return false; // atEnd\n case 0xC6: // ==\n this.source.push(\"var cond = stack[vm.sp-1] === stack[vm.sp];\\nstack[--vm.sp] = cond ? vm.trueObj : vm.falseObj;\\n\");\n return;\n case 0xC7: // class\n this.source.push(\"stack[vm.sp] = typeof stack[vm.sp] === 'number' ? vm.specialObjects[5] : stack[vm.sp].sqClass;\\n\");\n return;\n case 0xC8: // blockCopy:\n this.source.push(\n \"vm.pc = \", this.pc, \"; if (!vm.primHandler.quickSendOther(rcvr, \", (byte & 0x0F), \")) \",\n \"{vm.sendSpecial(\", ((byte & 0x0F) + 16), \"); return bytecodes + \", this.pc, \"}\\n\");\n this.needsLabel[this.pc] = true; // for send\n this.needsLabel[this.pc + 2] = true; // for start of block\n return;\n case 0xC9: // value\n case 0xCA: // value:\n case 0xCB: // do:\n this.source.push(\n \"vm.pc = \", this.pc, \"; if (!vm.primHandler.quickSendOther(rcvr, \", (byte & 0x0F), \")) vm.sendSpecial(\", ((byte & 0x0F) + 16), \"); return bytecodes + \", this.pc, \";\\n\");\n this.needsLabel[this.pc] = true;\n return;\n //case 0xCC: return false; // new\n //case 0xCD: return false; // new:\n //case 0xCE: return false; // x\n //case 0xCF: return false; // y\n }\n // generic version for the bytecodes not yet handled above\n this.source.push(\n \"vm.pc = \", this.pc, \"; if (!vm.primHandler.quickSendOther(rcvr, \", (byte & 0x0F), \"))\",\n \" vm.sendSpecial(\", ((byte & 0x0F) + 16), \");\\n\",\n \"if (context !== vm.activeContext || vm.breakOutOfInterpreter !== false) return bytecodes + \", this.pc, \";\\n\",\n \"if (vm.pc !== \", this.pc, \") throw Error('Huh?');\\n\");\n this.needsBreak = false; // already checked\n // if falling back to a full send we need a label for coming back\n this.needsLabel[this.pc] = true;\n },\n generateNumericOp: function(byte) {\n if (this.debug) this.generateDebugCode(\"numeric op \" + this.specialSelectors[byte & 0x0F]);\n this.generateLabel();\n // if the op cannot be executed here, do a full send and return to main loop\n // we need a label for coming back\n this.needsLabel[this.pc] = true;\n switch (byte) {\n case 0xB0: // PLUS +\n this.source.push(\"var a = stack[vm.sp - 1], b = stack[vm.sp];\\n\",\n \"if (typeof a === 'number' && typeof b === 'number') {\\n\",\n \" stack[--vm.sp] = vm.primHandler.signed32BitIntegerFor(a + b);\\n\",\n \"} else { vm.pc = \", this.pc, \"; vm.sendSpecial(0); if (context !== vm.activeContext || vm.breakOutOfInterpreter !== false) return bytecodes + \", this.pc, \"}\\n\");\n return;\n case 0xB1: // MINUS -\n this.source.push(\"var a = stack[vm.sp - 1], b = stack[vm.sp];\\n\",\n \"if (typeof a === 'number' && typeof b === 'number') {\\n\",\n \" stack[--vm.sp] = vm.primHandler.signed32BitIntegerFor(a - b);\\n\",\n \"} else { vm.pc = \", this.pc, \"; vm.sendSpecial(1); if (context !== vm.activeContext || vm.breakOutOfInterpreter !== false) return bytecodes + \", this.pc, \"}\\n\");\n return;\n case 0xB2: // LESS <\n this.source.push(\"var a = stack[vm.sp - 1], b = stack[vm.sp];\\n\",\n \"if (typeof a === 'number' && typeof b === 'number') {\\n\",\n \" stack[--vm.sp] = a < b ? vm.trueObj : vm.falseObj;\\n\",\n \"} else { vm.pc = \", this.pc, \"; vm.sendSpecial(2); if (context !== vm.activeContext || vm.breakOutOfInterpreter !== false) return bytecodes + \", this.pc, \"}\\n\");\n return;\n case 0xB3: // GRTR >\n this.source.push(\"var a = stack[vm.sp - 1], b = stack[vm.sp];\\n\",\n \"if (typeof a === 'number' && typeof b === 'number') {\\n\",\n \" stack[--vm.sp] = a > b ? vm.trueObj : vm.falseObj;\\n\",\n \"} else { vm.pc = \", this.pc, \"; vm.sendSpecial(3); if (context !== vm.activeContext || vm.breakOutOfInterpreter !== false) return bytecodes + \", this.pc, \"}\\n\");\n return;\n case 0xB4: // LEQ <=\n this.source.push(\"var a = stack[vm.sp - 1], b = stack[vm.sp];\\n\",\n \"if (typeof a === 'number' && typeof b === 'number') {\\n\",\n \" stack[--vm.sp] = a <= b ? vm.trueObj : vm.falseObj;\\n\",\n \"} else { vm.pc = \", this.pc, \"; vm.sendSpecial(4); if (context !== vm.activeContext || vm.breakOutOfInterpreter !== false) return bytecodes + \", this.pc, \"}\\n\");\n return;\n case 0xB5: // GEQ >=\n this.source.push(\"var a = stack[vm.sp - 1], b = stack[vm.sp];\\n\",\n \"if (typeof a === 'number' && typeof b === 'number') {\\n\",\n \" stack[--vm.sp] = a >= b ? vm.trueObj : vm.falseObj;\\n\",\n \"} else { vm.pc = \", this.pc, \"; vm.sendSpecial(5); if (context !== vm.activeContext || vm.breakOutOfInterpreter !== false) return bytecodes + \", this.pc, \"}\\n\");\n return;\n case 0xB6: // EQU =\n this.source.push(\"var a = stack[vm.sp - 1], b = stack[vm.sp];\\n\",\n \"if (typeof a === 'number' && typeof b === 'number') {\\n\",\n \" stack[--vm.sp] = a === b ? vm.trueObj : vm.falseObj;\\n\",\n \"} else if (a === b && a.float === a.float) {\\n\", // NaN check\n \" stack[--vm.sp] = vm.trueObj;\\n\",\n \"} else { vm.pc = \", this.pc, \"; vm.sendSpecial(6); if (context !== vm.activeContext || vm.breakOutOfInterpreter !== false) return bytecodes + \", this.pc, \"}\\n\");\n return;\n case 0xB7: // NEQ ~=\n this.source.push(\"var a = stack[vm.sp - 1], b = stack[vm.sp];\\n\",\n \"if (typeof a === 'number' && typeof b === 'number') {\\n\",\n \" stack[--vm.sp] = a !== b ? vm.trueObj : vm.falseObj;\\n\",\n \"} else if (a === b && a.float === a.float) {\\n\", // NaN check\n \" stack[--vm.sp] = vm.falseObj;\\n\",\n \"} else { vm.pc = \", this.pc, \"; vm.sendSpecial(7); if (context !== vm.activeContext || vm.breakOutOfInterpreter !== false) return bytecodes + \", this.pc, \"}\\n\");\n return;\n case 0xB8: // TIMES *\n this.source.push(\"vm.success = true; vm.resultIsFloat = false; if(!vm.pop2AndPushNumResult(vm.stackIntOrFloat(1) * vm.stackIntOrFloat(0))) { vm.pc = \", this.pc, \"; vm.sendSpecial(8); return bytecodes + \", this.pc, \"}\\n\");\n return;\n case 0xB9: // DIV /\n this.source.push(\"vm.success = true; if(!vm.pop2AndPushIntResult(vm.quickDivide(vm.stackInteger(1),vm.stackInteger(0)))) { vm.pc = \", this.pc, \"; vm.sendSpecial(9); return bytecodes + \", this.pc, \"}\\n\");\n return;\n case 0xBA: // MOD \\\n this.source.push(\"vm.success = true; if(!vm.pop2AndPushIntResult(vm.mod(vm.stackInteger(1),vm.stackInteger(0)))) { vm.pc = \", this.pc, \"; vm.sendSpecial(10); return bytecodes + \", this.pc, \"}\\n\");\n return;\n case 0xBB: // MakePt int@int\n this.source.push(\"vm.success = true; if(!vm.primHandler.primitiveMakePoint(1, true)) { vm.pc = \", this.pc, \"; vm.sendSpecial(11); return bytecodes + \", this.pc, \"}\\n\");\n return;\n case 0xBC: // bitShift:\n this.source.push(\"vm.success = true; if(!vm.pop2AndPushIntResult(vm.safeShift(vm.stackInteger(1),vm.stackInteger(0)))) { vm.pc = \", this.pc, \"; vm.sendSpecial(12); return bytecodes + \", this.pc, \"}\\n\");\n return;\n case 0xBD: // Divide //\n this.source.push(\"vm.success = true; if(!vm.pop2AndPushIntResult(vm.div(vm.stackInteger(1),vm.stackInteger(0)))) { vm.pc = \", this.pc, \"; vm.sendSpecial(13); return bytecodes + \", this.pc, \"}\\n\");\n return;\n case 0xBE: // bitAnd:\n this.source.push(\"vm.success = true; if(!vm.pop2AndPushIntResult(vm.stackInteger(1) & vm.stackInteger(0))) { vm.pc = \", this.pc, \"; vm.sendSpecial(14); return bytecodes + \", this.pc, \"}\\n\");\n return;\n case 0xBF: // bitOr:\n this.source.push(\"vm.success = true; if(!vm.pop2AndPushIntResult(vm.stackInteger(1) | vm.stackInteger(0))) { vm.pc = \", this.pc, \"; vm.sendSpecial(15); return bytecodes + \", this.pc, \"}\\n\");\n return;\n }\n },\n generateSend: function(prefix, num, suffix, numArgs, superSend) {\n if (this.debug) this.generateDebugCode(\"send \" + (prefix === \"lit[\" ? this.method.pointers[num].bytesAsString() : \"...\"));\n this.generateLabel();\n // set pc, activate new method, and return to main loop\n // unless the method was a successfull primitive call (no context change)\n this.source.push(\n \"vm.pc = \", this.pc, \"; vm.send(\", prefix, num, suffix, \", \", numArgs, \", \", superSend, \"); \",\n \"if (context !== vm.activeContext || vm.breakOutOfInterpreter !== false) return bytecodes + \", this.pc, \";\\n\");\n this.needsBreak = false; // already checked\n // need a label for coming back after send\n this.needsLabel[this.pc] = true;\n },\n generateClosureTemps: function(count, popValues) {\n if (this.debug) this.generateDebugCode(\"closure temps\");\n this.generateLabel();\n this.source.push(\"var array = vm.instantiateClass(vm.specialObjects[7], \", count, \");\\n\");\n if (popValues) {\n for (var i = 0; i < count; i++)\n this.source.push(\"array.pointers[\", i, \"] = stack[vm.sp - \", count - i - 1, \"];\\n\");\n this.source.push(\"stack[vm.sp -= \", count - 1, \"] = array;\\n\");\n } else {\n this.source.push(\"stack[++vm.sp] = array;\\n\");\n }\n },\n generateClosureCopy: function(numArgs, numCopied, blockSize) {\n var from = this.pc,\n to = from + blockSize;\n if (this.debug) this.generateDebugCode(\"push closure(\" + from + \"-\" + (to-1) + \"): \" + numCopied + \" copied, \" + numArgs + \" args\");\n this.generateLabel();\n this.source.push(\n \"var closure = vm.instantiateClass(vm.specialObjects[36], \", numCopied, \");\\n\",\n \"closure.pointers[0] = context; vm.reclaimableContextCount = 0;\\n\",\n \"closure.pointers[1] = \", from + this.method.pointers.length * 4 + 1, \";\\n\", // encodeSqueakPC\n \"closure.pointers[2] = \", numArgs, \";\\n\");\n if (numCopied > 0) {\n for (var i = 0; i < numCopied; i++)\n this.source.push(\"closure.pointers[\", i + 3, \"] = stack[vm.sp - \", numCopied - i - 1,\"];\\n\");\n this.source.push(\"stack[vm.sp -= \", numCopied - 1,\"] = closure;\\n\");\n } else {\n this.source.push(\"stack[++vm.sp] = closure;\\n\");\n }\n this.source.push(\"vm.pc = \", to, \";\\n\");\n this.source.push(\"bytecodes -= \", blockSize, \";\\n\"); \n if (this.singleStep) this.source.push(\"if (vm.breakOutOfInterpreter) return bytecodes + \", to,\";\\n\");\n this.source.push(\"continue;\\n\");\n this.needsBreak = false; // already checked\n this.needsLabel[from] = true; // initial pc when activated\n this.needsLabel[to] = true; // for jump over closure\n if (to > this.endPC) this.endPC = to;\n },\n generateLabel: function() {\n // remember label position for deleteUnneededLabels()\n this.sourceLabels[this.prevPC] = this.source.length;\n this.source.push(\"case \", this.prevPC, \":\\n\");\n this.prevPC = this.pc;\n },\n generateDebugCode: function(comment) {\n // single-step for previous instructiuon\n if (this.needsBreak) {\n this.source.push(\"if (vm.breakOutOfInterpreter) return bytecodes + (vm.pc = \", this.prevPC, \");\\n\");\n this.needsLabel[this.prevPC] = true;\n }\n // comment for this instructiuon\n var bytecodes = [];\n for (var i = this.prevPC; i < this.pc; i++)\n bytecodes.push((this.method.bytes[i] + 0x100).toString(16).slice(-2).toUpperCase());\n this.source.push(\"// \", this.prevPC, \" <\", bytecodes.join(\" \"), \"> \", comment, \"\\n\");\n // enable single-step for next instruction\n this.needsBreak = this.singleStep;\n },\n generateInstruction: function(comment, instr) {\n if (this.debug) this.generateDebugCode(comment); \n this.generateLabel();\n this.source.push(instr, \";\\n\");\n },\n deleteUnneededLabels: function() {\n // switch statement is more efficient with fewer labels\n for (var i in this.sourceLabels) \n if (!this.needsLabel[i])\n for (var j = 0; j < 3; j++) \n this.source[this.sourceLabels[i] + j] = \"\";\n },\n});\n\n}); // end of module\n","/* Smalltalk from Squeak4.5 with VMMaker 4.13.6 translated as JS source on 3 November 2014 1:52:20 pm */\n/* Automatically generated by\n\tJSPluginCodeGenerator VMMakerJS-bf.15 uuid: fd4e10f2-3773-4e80-8bb5-c4b471a014e5\n from\n\tADPCMCodecPlugin VMMaker-bf.353 uuid: 8ae25e7e-8d2c-451e-8277-598b30e9c002\n */\n\nmodule(\"users.bert.SqueakJS.plugins.ADPCMCodecPlugin\").requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\"use strict\"; \n\nvar VM_PROXY_MAJOR = 1;\nvar VM_PROXY_MINOR = 11;\n\n/*** Functions ***/\nfunction CLASSOF(obj) { return typeof obj === \"number\" ? interpreterProxy.classSmallInteger() : obj.sqClass }\nfunction SIZEOF(obj) { return obj.pointers ? obj.pointers.length : obj.words ? obj.words.length : obj.bytes ? obj.bytes.length : 0 }\nfunction BYTESIZEOF(obj) { return obj.bytes ? obj.bytes.length : obj.words ? obj.words.length * 4 : 0 }\nfunction DIV(a, b) { return Math.floor(a / b) | 0; } // integer division\nfunction MOD(a, b) { return a - DIV(a, b) * b | 0; } // signed modulus\nfunction SHL(a, b) { return b > 31 ? 0 : a << b; } // fix JS shift\nfunction SHR(a, b) { return b > 31 ? 0 : a >>> b; } // fix JS shift\nfunction SHIFT(a, b) { return b < 0 ? (b < -31 ? 0 : a >>> (0-b) ) : (b > 31 ? 0 : a << b); }\n\n/*** Variables ***/\nvar bitPosition = 0;\nvar byteIndex = 0;\nvar currentByte = 0;\nvar encodedBytes = null;\nvar interpreterProxy = null;\nvar moduleName = \"ADPCMCodecPlugin 3 November 2014 (e)\";\nvar stepSizeTable = null;\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nfunction getInterpreter() {\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nfunction getModuleName() {\n\treturn moduleName;\n}\n\nfunction halt() {\n\t;\n}\n\n\n/*\tAnswer the best index to use for the difference between the given samples. */\n/*\tDetails: Scan stepSizeTable for the first entry >= the absolute value of the difference between sample values. Since indexes are zero-based, the index used during decoding will be the one in the following stepSizeTable entry. Since the index field of a Flash frame header is only six bits, the maximum index value is 63. */\n/*\tNote: Since there does not appear to be any documentation of how Flash actually computes the indices used in its frame headers, this algorithm was guessed by reverse-engineering the Flash ADPCM decoder. */\n\nfunction indexForDeltaFromto(thisSample, nextSample) {\n\tvar bestIndex;\n\tvar diff;\n\tvar j;\n\n\tdiff = nextSample - thisSample;\n\tif (diff < 0) {\n\t\tdiff = 0 - diff;\n\t}\n\tbestIndex = 63;\n\tfor (j = 1; j <= 62; j++) {\n\t\tif (bestIndex === 63) {\n\t\t\tif (stepSizeTable[j - 1] >= diff) {\n\t\t\t\tbestIndex = j;\n\t\t\t}\n\t\t}\n\t}\n\treturn bestIndex;\n}\n\nfunction msg(s) {\n\tconsole.log(moduleName + \": \" + s);\n}\n\n\n/*\tAnswer the next n bits of my bit stream as an unsigned integer. */\n\nfunction nextBits(n) {\n\tvar remaining;\n\tvar result;\n\tvar shift;\n\n\tresult = 0;\n\tremaining = n;\n\twhile(true) {\n\t\tshift = remaining - bitPosition;\n\t\tif (shift > 0) {\n\n\t\t\t/* consumed currentByte buffer; fetch next byte */\n\n\t\t\tresult += SHL(currentByte, shift);\n\t\t\tremaining -= bitPosition;\n\t\t\tcurrentByte = encodedBytes[((++byteIndex)) - 1];\n\t\t\tbitPosition = 8;\n\t\t} else {\n\n\t\t\t/* still some bits left in currentByte buffer */\n\n\t\t\tresult += SHR(currentByte, (0 - shift));\n\n\t\t\t/* mask out the consumed bits: */\n\n\t\t\tbitPosition -= remaining;\n\t\t\tcurrentByte = currentByte & (SHR(255, (8 - bitPosition)));\n\t\t\treturn result;\n\t\t}\n\t}\n}\n\n\n/*\tWrite the next n bits to my bit stream. */\n\nfunction nextBitsput(n, anInteger) {\n\tvar bitsAvailable;\n\tvar buf;\n\tvar bufBits;\n\tvar shift;\n\n\tbuf = anInteger;\n\tbufBits = n;\n\twhile(true) {\n\t\tbitsAvailable = 8 - bitPosition;\n\n\t\t/* either left or right shift */\n\t\t/* append high bits of buf to end of currentByte: */\n\n\t\tshift = bitsAvailable - bufBits;\n\t\tif (shift < 0) {\n\n\t\t\t/* currentByte buffer filled; output it */\n\n\t\t\tcurrentByte += SHR(buf, (0 - shift));\n\t\t\tencodedBytes[((++byteIndex)) - 1] = currentByte;\n\t\t\tbitPosition = 0;\n\n\t\t\t/* clear saved high bits of buf: */\n\n\t\t\tcurrentByte = 0;\n\t\t\tbuf = buf & ((SHL(1, (0 - shift))) - 1);\n\t\t\tbufBits -= bitsAvailable;\n\t\t} else {\n\n\t\t\t/* still some bits available in currentByte buffer */\n\n\t\t\tcurrentByte += SHL(buf, shift);\n\t\t\tbitPosition += bufBits;\n\t\t\treturn self;\n\t\t}\n\t}\n}\n\nfunction primitiveDecodeMono() {\n\tvar rcvr;\n\tvar count;\n\tvar bit;\n\tvar delta;\n\tvar i;\n\tvar predictedDelta;\n\tvar step;\n\tvar bitsPerSample;\n\tvar deltaSignMask;\n\tvar deltaValueHighBit;\n\tvar deltaValueMask;\n\tvar frameSizeMask;\n\tvar index;\n\tvar indexTable;\n\tvar predicted;\n\tvar sampleIndex;\n\tvar samples;\n\n\trcvr = interpreterProxy.stackValue(1);\n\tcount = interpreterProxy.stackIntegerValue(0);\n\tpredicted = interpreterProxy.fetchIntegerofObject(0, rcvr);\n\tindex = interpreterProxy.fetchIntegerofObject(1, rcvr);\n\tdeltaSignMask = interpreterProxy.fetchIntegerofObject(2, rcvr);\n\tdeltaValueMask = interpreterProxy.fetchIntegerofObject(3, rcvr);\n\tdeltaValueHighBit = interpreterProxy.fetchIntegerofObject(4, rcvr);\n\tframeSizeMask = interpreterProxy.fetchIntegerofObject(5, rcvr);\n\tcurrentByte = interpreterProxy.fetchIntegerofObject(6, rcvr);\n\tbitPosition = interpreterProxy.fetchIntegerofObject(7, rcvr);\n\tbyteIndex = interpreterProxy.fetchIntegerofObject(8, rcvr);\n\tencodedBytes = interpreterProxy.fetchBytesofObject(9, rcvr);\n\tsamples = interpreterProxy.fetchInt16ArrayofObject(10, rcvr);\n\tsampleIndex = interpreterProxy.fetchIntegerofObject(12, rcvr);\n\tbitsPerSample = interpreterProxy.fetchIntegerofObject(13, rcvr);\n\tstepSizeTable = interpreterProxy.fetchInt16ArrayofObject(14, rcvr);\n\tindexTable = interpreterProxy.fetchInt16ArrayofObject(15, rcvr);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tfor (i = 1; i <= count; i++) {\n\t\tif ((i & frameSizeMask) === 1) {\n\n\t\t\t/* start of frame; read frame header */\n\n\t\t\tpredicted = nextBits(16);\n\t\t\tif (predicted > 32767) {\n\t\t\t\tpredicted -= 65536;\n\t\t\t}\n\t\t\tindex = nextBits(6);\n\t\t\tsamples[((++sampleIndex)) - 1] = predicted;\n\t\t} else {\n\t\t\tdelta = nextBits(bitsPerSample);\n\t\t\tstep = stepSizeTable[index];\n\t\t\tpredictedDelta = 0;\n\t\t\tbit = deltaValueHighBit;\n\t\t\twhile (bit > 0) {\n\t\t\t\tif ((delta & bit) > 0) {\n\t\t\t\t\tpredictedDelta += step;\n\t\t\t\t}\n\t\t\t\tstep = step >>> 1;\n\t\t\t\tbit = bit >>> 1;\n\t\t\t}\n\t\t\tpredictedDelta += step;\n\t\t\tif ((delta & deltaSignMask) > 0) {\n\t\t\t\tpredicted -= predictedDelta;\n\t\t\t} else {\n\t\t\t\tpredicted += predictedDelta;\n\t\t\t}\n\t\t\tif (predicted > 32767) {\n\t\t\t\tpredicted = 32767;\n\t\t\t} else {\n\t\t\t\tif (predicted < -32768) {\n\t\t\t\t\tpredicted = -32768;\n\t\t\t\t}\n\t\t\t}\n\t\t\tindex += indexTable[delta & deltaValueMask];\n\t\t\tif (index < 0) {\n\t\t\t\tindex = 0;\n\t\t\t} else {\n\t\t\t\tif (index > 88) {\n\t\t\t\t\tindex = 88;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsamples[((++sampleIndex)) - 1] = predicted;\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.storeIntegerofObjectwithValue(0, rcvr, predicted);\n\tinterpreterProxy.storeIntegerofObjectwithValue(1, rcvr, index);\n\tinterpreterProxy.storeIntegerofObjectwithValue(6, rcvr, currentByte);\n\tinterpreterProxy.storeIntegerofObjectwithValue(7, rcvr, bitPosition);\n\tinterpreterProxy.storeIntegerofObjectwithValue(8, rcvr, byteIndex);\n\tinterpreterProxy.storeIntegerofObjectwithValue(12, rcvr, sampleIndex);\n\tinterpreterProxy.pop(1);\n}\n\nfunction primitiveDecodeStereo() {\n\tvar rcvr;\n\tvar count;\n\tvar bit;\n\tvar deltaLeft;\n\tvar deltaRight;\n\tvar i;\n\tvar indexLeft;\n\tvar indexRight;\n\tvar predictedDeltaLeft;\n\tvar predictedDeltaRight;\n\tvar predictedLeft;\n\tvar predictedRight;\n\tvar stepLeft;\n\tvar stepRight;\n\tvar bitsPerSample;\n\tvar deltaSignMask;\n\tvar deltaValueHighBit;\n\tvar deltaValueMask;\n\tvar frameSizeMask;\n\tvar index;\n\tvar indexTable;\n\tvar predicted;\n\tvar rightSamples;\n\tvar sampleIndex;\n\tvar samples;\n\n\n\t/* make local copies of decoder state variables */\n\n\trcvr = interpreterProxy.stackValue(1);\n\tcount = interpreterProxy.stackIntegerValue(0);\n\tpredicted = interpreterProxy.fetchInt16ArrayofObject(0, rcvr);\n\tindex = interpreterProxy.fetchInt16ArrayofObject(1, rcvr);\n\tdeltaSignMask = interpreterProxy.fetchIntegerofObject(2, rcvr);\n\tdeltaValueMask = interpreterProxy.fetchIntegerofObject(3, rcvr);\n\tdeltaValueHighBit = interpreterProxy.fetchIntegerofObject(4, rcvr);\n\tframeSizeMask = interpreterProxy.fetchIntegerofObject(5, rcvr);\n\tcurrentByte = interpreterProxy.fetchIntegerofObject(6, rcvr);\n\tbitPosition = interpreterProxy.fetchIntegerofObject(7, rcvr);\n\tbyteIndex = interpreterProxy.fetchIntegerofObject(8, rcvr);\n\tencodedBytes = interpreterProxy.fetchBytesofObject(9, rcvr);\n\tsamples = interpreterProxy.fetchInt16ArrayofObject(10, rcvr);\n\trightSamples = interpreterProxy.fetchInt16ArrayofObject(11, rcvr);\n\tsampleIndex = interpreterProxy.fetchIntegerofObject(12, rcvr);\n\tbitsPerSample = interpreterProxy.fetchIntegerofObject(13, rcvr);\n\tstepSizeTable = interpreterProxy.fetchInt16ArrayofObject(14, rcvr);\n\tindexTable = interpreterProxy.fetchInt16ArrayofObject(15, rcvr);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tpredictedLeft = predicted[1 - 1];\n\tpredictedRight = predicted[2 - 1];\n\tindexLeft = index[1 - 1];\n\tindexRight = index[2 - 1];\n\tfor (i = 1; i <= count; i++) {\n\t\tif ((i & frameSizeMask) === 1) {\n\n\t\t\t/* start of frame; read frame header */\n\n\t\t\tpredictedLeft = nextBits(16);\n\t\t\tindexLeft = nextBits(6);\n\t\t\tpredictedRight = nextBits(16);\n\t\t\tindexRight = nextBits(6);\n\t\t\tif (predictedLeft > 32767) {\n\t\t\t\tpredictedLeft -= 65536;\n\t\t\t}\n\t\t\tif (predictedRight > 32767) {\n\t\t\t\tpredictedRight -= 65536;\n\t\t\t}\n\t\t\tsamples[((++sampleIndex)) - 1] = predictedLeft;\n\t\t\trightSamples[sampleIndex - 1] = predictedRight;\n\t\t} else {\n\t\t\tdeltaLeft = nextBits(bitsPerSample);\n\t\t\tdeltaRight = nextBits(bitsPerSample);\n\t\t\tstepLeft = stepSizeTable[indexLeft];\n\t\t\tstepRight = stepSizeTable[indexRight];\n\t\t\tpredictedDeltaLeft = (predictedDeltaRight = 0);\n\t\t\tbit = deltaValueHighBit;\n\t\t\twhile (bit > 0) {\n\t\t\t\tif ((deltaLeft & bit) > 0) {\n\t\t\t\t\tpredictedDeltaLeft += stepLeft;\n\t\t\t\t}\n\t\t\t\tif ((deltaRight & bit) > 0) {\n\t\t\t\t\tpredictedDeltaRight += stepRight;\n\t\t\t\t}\n\t\t\t\tstepLeft = stepLeft >>> 1;\n\t\t\t\tstepRight = stepRight >>> 1;\n\t\t\t\tbit = bit >>> 1;\n\t\t\t}\n\t\t\tpredictedDeltaLeft += stepLeft;\n\t\t\tpredictedDeltaRight += stepRight;\n\t\t\tif ((deltaLeft & deltaSignMask) > 0) {\n\t\t\t\tpredictedLeft -= predictedDeltaLeft;\n\t\t\t} else {\n\t\t\t\tpredictedLeft += predictedDeltaLeft;\n\t\t\t}\n\t\t\tif ((deltaRight & deltaSignMask) > 0) {\n\t\t\t\tpredictedRight -= predictedDeltaRight;\n\t\t\t} else {\n\t\t\t\tpredictedRight += predictedDeltaRight;\n\t\t\t}\n\t\t\tif (predictedLeft > 32767) {\n\t\t\t\tpredictedLeft = 32767;\n\t\t\t} else {\n\t\t\t\tif (predictedLeft < -32768) {\n\t\t\t\t\tpredictedLeft = -32768;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (predictedRight > 32767) {\n\t\t\t\tpredictedRight = 32767;\n\t\t\t} else {\n\t\t\t\tif (predictedRight < -32768) {\n\t\t\t\t\tpredictedRight = -32768;\n\t\t\t\t}\n\t\t\t}\n\t\t\tindexLeft += indexTable[deltaLeft & deltaValueMask];\n\t\t\tif (indexLeft < 0) {\n\t\t\t\tindexLeft = 0;\n\t\t\t} else {\n\t\t\t\tif (indexLeft > 88) {\n\t\t\t\t\tindexLeft = 88;\n\t\t\t\t}\n\t\t\t}\n\t\t\tindexRight += indexTable[deltaRight & deltaValueMask];\n\t\t\tif (indexRight < 0) {\n\t\t\t\tindexRight = 0;\n\t\t\t} else {\n\t\t\t\tif (indexRight > 88) {\n\t\t\t\t\tindexRight = 88;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsamples[((++sampleIndex)) - 1] = predictedLeft;\n\t\t\trightSamples[sampleIndex - 1] = predictedRight;\n\t\t}\n\t}\n\tpredicted[1 - 1] = predictedLeft;\n\tpredicted[2 - 1] = predictedRight;\n\tindex[1 - 1] = indexLeft;\n\tindex[2 - 1] = indexRight;\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.storeIntegerofObjectwithValue(6, rcvr, currentByte);\n\tinterpreterProxy.storeIntegerofObjectwithValue(7, rcvr, bitPosition);\n\tinterpreterProxy.storeIntegerofObjectwithValue(8, rcvr, byteIndex);\n\tinterpreterProxy.storeIntegerofObjectwithValue(12, rcvr, sampleIndex);\n\tinterpreterProxy.pop(1);\n}\n\nfunction primitiveEncodeMono() {\n\tvar rcvr;\n\tvar count;\n\tvar bit;\n\tvar delta;\n\tvar diff;\n\tvar i;\n\tvar p;\n\tvar predictedDelta;\n\tvar sign;\n\tvar step;\n\tvar bitsPerSample;\n\tvar deltaSignMask;\n\tvar deltaValueHighBit;\n\tvar frameSizeMask;\n\tvar index;\n\tvar indexTable;\n\tvar predicted;\n\tvar sampleIndex;\n\tvar samples;\n\n\trcvr = interpreterProxy.stackValue(1);\n\tcount = interpreterProxy.stackIntegerValue(0);\n\tpredicted = interpreterProxy.fetchIntegerofObject(0, rcvr);\n\tindex = interpreterProxy.fetchIntegerofObject(1, rcvr);\n\tdeltaSignMask = interpreterProxy.fetchIntegerofObject(2, rcvr);\n\tdeltaValueHighBit = interpreterProxy.fetchIntegerofObject(4, rcvr);\n\tframeSizeMask = interpreterProxy.fetchIntegerofObject(5, rcvr);\n\tcurrentByte = interpreterProxy.fetchIntegerofObject(6, rcvr);\n\tbitPosition = interpreterProxy.fetchIntegerofObject(7, rcvr);\n\tbyteIndex = interpreterProxy.fetchIntegerofObject(8, rcvr);\n\tencodedBytes = interpreterProxy.fetchBytesofObject(9, rcvr);\n\tsamples = interpreterProxy.fetchInt16ArrayofObject(10, rcvr);\n\tsampleIndex = interpreterProxy.fetchIntegerofObject(12, rcvr);\n\tbitsPerSample = interpreterProxy.fetchIntegerofObject(13, rcvr);\n\tstepSizeTable = interpreterProxy.fetchInt16ArrayofObject(14, rcvr);\n\tindexTable = interpreterProxy.fetchInt16ArrayofObject(15, rcvr);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tstep = stepSizeTable[1 - 1];\n\tfor (i = 1; i <= count; i++) {\n\t\tif ((i & frameSizeMask) === 1) {\n\t\t\tpredicted = samples[((++sampleIndex)) - 1];\n\t\t\tif (((p = predicted)) < 0) {\n\t\t\t\tp += 65536;\n\t\t\t}\n\t\t\tnextBitsput(16, p);\n\t\t\tif (i < count) {\n\t\t\t\tindex = indexForDeltaFromto(predicted, samples[sampleIndex]);\n\t\t\t}\n\t\t\tnextBitsput(6, index);\n\t\t} else {\n\n\t\t\t/* compute sign and magnitude of difference from the predicted sample */\n\n\t\t\tsign = 0;\n\t\t\tdiff = samples[((++sampleIndex)) - 1] - predicted;\n\t\t\tif (diff < 0) {\n\t\t\t\tsign = deltaSignMask;\n\t\t\t\tdiff = 0 - diff;\n\t\t\t}\n\t\t\tdelta = 0;\n\t\t\tpredictedDelta = 0;\n\t\t\tbit = deltaValueHighBit;\n\t\t\twhile (bit > 0) {\n\t\t\t\tif (diff >= step) {\n\t\t\t\t\tdelta += bit;\n\t\t\t\t\tpredictedDelta += step;\n\t\t\t\t\tdiff -= step;\n\t\t\t\t}\n\t\t\t\tstep = step >>> 1;\n\t\t\t\tbit = bit >>> 1;\n\t\t\t}\n\n\t\t\t/* compute and clamp new prediction */\n\n\t\t\tpredictedDelta += step;\n\t\t\tif (sign > 0) {\n\t\t\t\tpredicted -= predictedDelta;\n\t\t\t} else {\n\t\t\t\tpredicted += predictedDelta;\n\t\t\t}\n\t\t\tif (predicted > 32767) {\n\t\t\t\tpredicted = 32767;\n\t\t\t} else {\n\t\t\t\tif (predicted < -32768) {\n\t\t\t\t\tpredicted = -32768;\n\t\t\t\t}\n\t\t\t}\n\t\t\tindex += indexTable[delta];\n\t\t\tif (index < 0) {\n\t\t\t\tindex = 0;\n\t\t\t} else {\n\t\t\t\tif (index > 88) {\n\t\t\t\t\tindex = 88;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* output encoded, signed delta */\n\n\t\t\tstep = stepSizeTable[index];\n\t\t\tnextBitsput(bitsPerSample, sign | delta);\n\t\t}\n\t}\n\tif (bitPosition > 0) {\n\n\t\t/* flush the last output byte, if necessary */\n\n\t\tencodedBytes[((++byteIndex)) - 1] = currentByte;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.storeIntegerofObjectwithValue(0, rcvr, predicted);\n\tinterpreterProxy.storeIntegerofObjectwithValue(1, rcvr, index);\n\tinterpreterProxy.storeIntegerofObjectwithValue(6, rcvr, currentByte);\n\tinterpreterProxy.storeIntegerofObjectwithValue(7, rcvr, bitPosition);\n\tinterpreterProxy.storeIntegerofObjectwithValue(8, rcvr, byteIndex);\n\tinterpreterProxy.storeIntegerofObjectwithValue(12, rcvr, sampleIndex);\n\tinterpreterProxy.pop(1);\n}\n\n\n/*\tnot yet implemented */\n\nfunction primitiveEncodeStereo() {\n\tvar rcvr;\n\tvar count;\n\n\trcvr = interpreterProxy.stackValue(1);\n\tcount = interpreterProxy.stackIntegerValue(0);\n\tcurrentByte = interpreterProxy.fetchIntegerofObject(6, rcvr);\n\tbitPosition = interpreterProxy.fetchIntegerofObject(7, rcvr);\n\tbyteIndex = interpreterProxy.fetchIntegerofObject(8, rcvr);\n\tencodedBytes = interpreterProxy.fetchIntegerofObject(9, rcvr);\n\tstepSizeTable = interpreterProxy.fetchIntegerofObject(14, rcvr);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tsuccess(false);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.storeIntegerofObjectwithValue(6, rcvr, currentByte);\n\tinterpreterProxy.storeIntegerofObjectwithValue(7, rcvr, bitPosition);\n\tinterpreterProxy.storeIntegerofObjectwithValue(8, rcvr, byteIndex);\n\tinterpreterProxy.pop(1);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nfunction setInterpreter(anInterpreter) {\n\tvar ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy.majorVersion() == VM_PROXY_MAJOR;\n\tif (ok === false) {\n\t\treturn false;\n\t}\n\tok = interpreterProxy.minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\nSqueak.registerExternalModule(\"ADPCMCodecPlugin\", {\n\tprimitiveDecodeStereo: primitiveDecodeStereo,\n\tprimitiveEncodeStereo: primitiveEncodeStereo,\n\tsetInterpreter: setInterpreter,\n\tprimitiveEncodeMono: primitiveEncodeMono,\n\tprimitiveDecodeMono: primitiveDecodeMono,\n\tgetModuleName: getModuleName,\n});\n\n}); // end of module\n","/* Smalltalk from Squeak4.5 with VMMaker 4.13.6 translated as JS source on 14 November 2014 12:21:50 am */\n/* Automatically generated by\n\tJSPluginCodeGenerator VMMakerJS-bf.17 uuid: 399be48b-95d8-4722-bdcc-39a94a12c486\n from\n\tBalloonEnginePlugin VMMaker-bf.353 uuid: 8ae25e7e-8d2c-451e-8277-598b30e9c002\n */\n\nmodule(\"users.bert.SqueakJS.plugins.B2DPlugin\").requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\"use strict\"; \n\nvar VM_PROXY_MAJOR = 1;\nvar VM_PROXY_MINOR = 11;\n\n/*** Functions ***/\nfunction CLASSOF(obj) { return typeof obj === \"number\" ? interpreterProxy.classSmallInteger() : obj.sqClass }\nfunction SIZEOF(obj) { return obj.pointers ? obj.pointers.length : obj.words ? obj.words.length : obj.bytes ? obj.bytes.length : 0 }\nfunction BYTESIZEOF(obj) { return obj.bytes ? obj.bytes.length : obj.words ? obj.words.length * 4 : 0 }\nfunction DIV(a, b) { return Math.floor(a / b) | 0; } // integer division\nfunction MOD(a, b) { return a - DIV(a, b) * b | 0; } // signed modulus\nfunction SHL(a, b) { return b > 31 ? 0 : a << b; } // fix JS shift\nfunction SHR(a, b) { return b > 31 ? 0 : a >>> b; } // fix JS shift\nfunction SHIFT(a, b) { return b < 0 ? (b < -31 ? 0 : a >>> (0-b) ) : (b > 31 ? 0 : a << b); }\nfunction PTR_ADD(p, n) { return new Int32Array(p.buffer, p.byteOffset + n * 4); }\nfunction FPTR_ADD(p, n) { return new Float32Array(p.buffer, p.byteOffset + n * 4); }\n\n/*** Constants ***/\nvar BEBalloonEngineSize = 12;\nvar BEBitBltIndex = 2;\nvar BEFormsIndex = 3;\nvar BESpanIndex = 1;\nvar BEWorkBufferIndex = 0;\nvar ETBalloonEdgeDataSize = 6;\nvar ETIndexIndex = 0;\nvar ETLinesIndex = 4;\nvar ETXValueIndex = 1;\nvar ETYValueIndex = 2;\nvar ETZValueIndex = 3;\nvar FTBalloonFillDataSize = 6;\nvar FTIndexIndex = 0;\nvar FTMaxXIndex = 2;\nvar FTMinXIndex = 1;\nvar FTYValueIndex = 3;\nvar GBBaseSize = 16;\nvar GBBitmapDepth = 12;\nvar GBBitmapHeight = 11;\nvar GBBitmapRaster = 14;\nvar GBBitmapSize = 13;\nvar GBBitmapWidth = 10;\nvar GBColormapOffset = 18;\nvar GBColormapSize = 15;\nvar GBEndX = 14;\nvar GBEndY = 15;\nvar GBFinalX = 21;\nvar GBMBaseSize = 18;\nvar GBTileFlag = 16;\nvar GBUpdateDDX = 4;\nvar GBUpdateDDY = 5;\nvar GBUpdateDX = 2;\nvar GBUpdateDY = 3;\nvar GBUpdateData = 10;\nvar GBUpdateX = 0;\nvar GBUpdateY = 1;\nvar GBViaX = 12;\nvar GBViaY = 13;\nvar GBWideEntry = 18;\nvar GBWideExit = 19;\nvar GBWideExtent = 20;\nvar GBWideFill = 16;\nvar GBWideSize = 28;\nvar GBWideUpdateData = 22;\nvar GBWideWidth = 17;\nvar GEBaseEdgeSize = 10;\nvar GEBaseFillSize = 4;\nvar GEEdgeFillsInvalid = 65536;\nvar GEFAlreadyFailed = 100;\nvar GEFBadPoint = 121;\nvar GEFBitBltLoadFailed = 122;\nvar GEFClassMismatch = 114;\nvar GEFEdgeDataTooSmall = 112;\nvar GEFEngineIsInteger = 101;\nvar GEFEngineIsWords = 102;\nvar GEFEngineStopped = 104;\nvar GEFEngineTooSmall = 103;\nvar GEFEntityCheckFailed = 120;\nvar GEFEntityLoadFailed = 119;\nvar GEFFillDataTooSmall = 113;\nvar GEFFormLoadFailed = 123;\nvar GEFSizeMismatch = 115;\nvar GEFWorkBufferBadMagic = 108;\nvar GEFWorkBufferIsInteger = 105;\nvar GEFWorkBufferIsPointers = 106;\nvar GEFWorkBufferStartWrong = 110;\nvar GEFWorkBufferTooSmall = 107;\nvar GEFWorkBufferWrongSize = 109;\nvar GEFWorkTooBig = 111;\nvar GEFWrongEdge = 118;\nvar GEFWrongFill = 117;\nvar GEFWrongState = 116;\nvar GEFillIndexLeft = 8;\nvar GEFillIndexRight = 9;\nvar GENumLines = 7;\nvar GEObjectIndex = 2;\nvar GEObjectLength = 1;\nvar GEObjectType = 0;\nvar GEPrimitiveBezier = 6;\nvar GEPrimitiveClippedBitmapFill = 1024;\nvar GEPrimitiveEdge = 2;\nvar GEPrimitiveEdgeMask = 255;\nvar GEPrimitiveFill = 256;\nvar GEPrimitiveFillMask = 65280;\nvar GEPrimitiveLine = 4;\nvar GEPrimitiveLinearGradientFill = 512;\nvar GEPrimitiveRadialGradientFill = 768;\nvar GEPrimitiveTypeMask = 65535;\nvar GEPrimitiveWide = 1;\nvar GEPrimitiveWideBezier = 7;\nvar GEPrimitiveWideLine = 5;\nvar GEPrimitiveWideMask = 254;\nvar GEStateAddingFromGET = 1;\nvar GEStateBlitBuffer = 5;\nvar GEStateCompleted = 8;\nvar GEStateScanningAET = 3;\nvar GEStateUnlocked = 0;\nvar GEStateUpdateEdges = 6;\nvar GEStateWaitingChange = 7;\nvar GEStateWaitingForEdge = 2;\nvar GEStateWaitingForFill = 4;\nvar GEXValue = 4;\nvar GEYValue = 5;\nvar GEZValue = 6;\nvar GErrorAETEntry = 6;\nvar GErrorBadState = 2;\nvar GErrorFillEntry = 5;\nvar GErrorGETEntry = 4;\nvar GErrorNeedFlush = 3;\nvar GErrorNoMoreSpace = 1;\nvar GFDirectionX = 6;\nvar GFDirectionY = 7;\nvar GFNormalX = 8;\nvar GFNormalY = 9;\nvar GFOriginX = 4;\nvar GFOriginY = 5;\nvar GFRampLength = 10;\nvar GFRampOffset = 12;\nvar GGBaseSize = 12;\nvar GLBaseSize = 16;\nvar GLEndX = 14;\nvar GLEndY = 15;\nvar GLError = 13;\nvar GLErrorAdjDown = 15;\nvar GLErrorAdjUp = 14;\nvar GLWideEntry = 18;\nvar GLWideExit = 19;\nvar GLWideExtent = 20;\nvar GLWideFill = 16;\nvar GLWideSize = 21;\nvar GLWideWidth = 17;\nvar GLXDirection = 10;\nvar GLXIncrement = 12;\nvar GLYDirection = 11;\nvar GWAAColorMask = 51;\nvar GWAAColorShift = 50;\nvar GWAAHalfPixel = 53;\nvar GWAALevel = 48;\nvar GWAAScanMask = 52;\nvar GWAAShift = 49;\nvar GWAETStart = 13;\nvar GWAETUsed = 14;\nvar GWBezierHeightSubdivisions = 109;\nvar GWBezierLineConversions = 111;\nvar GWBezierMonotonSubdivisions = 108;\nvar GWBezierOverflowSubdivisions = 110;\nvar GWBufferTop = 10;\nvar GWClearSpanBuffer = 69;\nvar GWClipMaxX = 43;\nvar GWClipMaxY = 45;\nvar GWClipMinX = 42;\nvar GWClipMinY = 44;\nvar GWColorTransform = 24;\nvar GWCountAddAETEntry = 97;\nvar GWCountChangeAETEntry = 107;\nvar GWCountDisplaySpan = 103;\nvar GWCountFinishTest = 93;\nvar GWCountInitializing = 91;\nvar GWCountMergeFill = 101;\nvar GWCountNextAETEntry = 105;\nvar GWCountNextFillEntry = 99;\nvar GWCountNextGETEntry = 95;\nvar GWCurrentY = 88;\nvar GWCurrentZ = 113;\nvar GWDestOffsetX = 46;\nvar GWDestOffsetY = 47;\nvar GWEdgeTransform = 18;\nvar GWFillMaxX = 37;\nvar GWFillMaxY = 39;\nvar GWFillMinX = 36;\nvar GWFillMinY = 38;\nvar GWGETStart = 11;\nvar GWGETUsed = 12;\nvar GWHasColorTransform = 17;\nvar GWHasEdgeTransform = 16;\nvar GWHeaderSize = 128;\nvar GWLastExportedEdge = 65;\nvar GWLastExportedFill = 66;\nvar GWLastExportedLeftX = 67;\nvar GWLastExportedRightX = 68;\nvar GWMagicIndex = 0;\nvar GWMagicNumber = 1097753705;\nvar GWMinimalSize = 256;\nvar GWNeedsFlush = 63;\nvar GWObjStart = 8;\nvar GWObjUsed = 9;\nvar GWPoint1 = 80;\nvar GWPoint2 = 82;\nvar GWPoint3 = 84;\nvar GWPoint4 = 86;\nvar GWSize = 1;\nvar GWSpanEnd = 34;\nvar GWSpanEndAA = 35;\nvar GWSpanSize = 33;\nvar GWSpanStart = 32;\nvar GWState = 2;\nvar GWStopReason = 64;\nvar GWTimeAddAETEntry = 96;\nvar GWTimeChangeAETEntry = 106;\nvar GWTimeDisplaySpan = 102;\nvar GWTimeFinishTest = 92;\nvar GWTimeInitializing = 90;\nvar GWTimeMergeFill = 100;\nvar GWTimeNextAETEntry = 104;\nvar GWTimeNextFillEntry = 98;\nvar GWTimeNextGETEntry = 94;\nvar PrimErrBadArgument = 3;\nvar PrimErrBadNumArgs = 5;\n\n/*** Variables ***/\nvar aetBuffer = null;\nvar bbPluginName = \"BitBltPlugin\";\nvar copyBitsFn = null;\nvar dispatchReturnValue = 0;\nvar dispatchedValue = 0;\nvar doProfileStats = 0;\nvar engine = 0;\nvar engineStopped = 0;\nvar formArray = 0;\nvar geProfileTime = 0;\nvar getBuffer = null;\nvar interpreterProxy = null;\nvar loadBBFn = null;\nvar moduleName = \"B2DPlugin 14 November 2014 (e)\";\nvar objBuffer = null;\nvar objUsed = 0;\nvar spanBuffer = null;\nvar workBuffer = null;\n\n\nfunction aaColorMaskGet() {\n\treturn workBuffer[GWAAColorMask];\n}\n\nfunction aaColorMaskPut(value) {\n\treturn workBuffer[GWAAColorMask] = value;\n}\n\nfunction aaColorShiftGet() {\n\treturn workBuffer[GWAAColorShift];\n}\n\nfunction aaColorShiftPut(value) {\n\treturn workBuffer[GWAAColorShift] = value;\n}\n\n\n/*\tCommon function to compute the first full pixel for AA drawing */\n\nfunction aaFirstPixelFromto(leftX, rightX) {\n\tvar firstPixel;\n\n\tfirstPixel = ((leftX + aaLevelGet()) - 1) & ~(aaLevelGet() - 1);\n\tif (firstPixel > rightX) {\n\t\treturn rightX;\n\t} else {\n\t\treturn firstPixel;\n\t}\n}\n\nfunction aaHalfPixelPut(value) {\n\treturn workBuffer[GWAAHalfPixel] = value;\n}\n\n\n/*\tCommon function to compute the last full pixel for AA drawing */\n\nfunction aaLastPixelFromto(leftX, rightX) {\n\treturn (rightX - 1) & ~(aaLevelGet() - 1);\n}\n\nfunction aaLevelGet() {\n\treturn workBuffer[GWAALevel];\n}\n\nfunction aaLevelPut(value) {\n\treturn workBuffer[GWAALevel] = value;\n}\n\nfunction aaScanMaskGet() {\n\treturn workBuffer[GWAAScanMask];\n}\n\nfunction aaScanMaskPut(value) {\n\treturn workBuffer[GWAAScanMask] = value;\n}\n\nfunction aaShiftGet() {\n\treturn workBuffer[GWAAShift];\n}\n\nfunction aaShiftPut(value) {\n\treturn workBuffer[GWAAShift] = value;\n}\n\n\n/*\tCompute the squared value of a 8.24 number with 0.0 <= value < 1.0,\n\te.g., compute (value * value) bitShift: -24 */\n\nfunction absoluteSquared8Dot24(value) {\n\tvar word1;\n\tvar word2;\n\n\tword1 = value & 65535;\n\tword2 = (value >>> 16) & 255;\n\treturn ((((word1 * word1) >>> 16) + ((word1 * word2) * 2)) + ((word2 * word2) << 16)) >>> 8;\n}\n\n\n/*\tReturn the accurate length of the vector described by deltaX and deltaY */\n\nfunction accurateLengthOfwith(deltaX, deltaY) {\n\tvar length2;\n\n\tif (deltaX === 0) {\n\t\tif (deltaY < 0) {\n\t\t\treturn 0 - deltaY;\n\t\t} else {\n\t\t\treturn deltaY;\n\t\t}\n\t}\n\tif (deltaY === 0) {\n\t\tif (deltaX < 0) {\n\t\t\treturn 0 - deltaX;\n\t\t} else {\n\t\t\treturn deltaX;\n\t\t}\n\t}\n\tlength2 = (deltaX * deltaX) + (deltaY * deltaY);\n\treturn computeSqrt(length2);\n}\n\nfunction addEdgeToGET(edge) {\n\tif (!allocateGETEntry(1)) {\n\t\treturn 0;\n\t}\n\tgetBuffer[getUsedGet()] = edge;\n\tgetUsedPut(getUsedGet() + 1);\n}\n\n\n/*\tAdjust the wide bezier curve (dx < 0) to start/end at the right point */\n\nfunction adjustWideBezierLeftwidthoffsetendX(bezier, lineWidth, lineOffset, endX) {\n\tvar lastX;\n\tvar lastY;\n\n\tbezierUpdateDataOf(bezier)[GBUpdateX] = (bezierUpdateDataOf(bezier)[GBUpdateX] - (lineOffset * 256));\n\tlastX = wideBezierUpdateDataOf(bezier)[GBUpdateX];\n\twideBezierUpdateDataOf(bezier)[GBUpdateX] = (lastX + ((lineWidth - lineOffset) * 256));\n\tlastY = wideBezierUpdateDataOf(bezier)[GBUpdateY];\n\twideBezierUpdateDataOf(bezier)[GBUpdateY] = (lastY + (lineWidth * 256));\n\tbezierFinalXOfput(bezier, endX - lineOffset);\n}\n\n\n/*\tAdjust the wide bezier curve (dx >= 0) to start/end at the right point */\n\nfunction adjustWideBezierRightwidthoffsetendX(bezier, lineWidth, lineOffset, endX) {\n\tvar lastX;\n\tvar lastY;\n\n\tbezierUpdateDataOf(bezier)[GBUpdateX] = (bezierUpdateDataOf(bezier)[GBUpdateX] + (lineOffset * 256));\n\tlastX = wideBezierUpdateDataOf(bezier)[GBUpdateX];\n\twideBezierUpdateDataOf(bezier)[GBUpdateX] = (lastX - ((lineWidth - lineOffset) * 256));\n\n\t/* Set lineWidth pixels down */\n\n\tlastY = wideBezierUpdateDataOf(bezier)[GBUpdateY];\n\twideBezierUpdateDataOf(bezier)[GBUpdateY] = (lastY + (lineWidth * 256));\n\tbezierFinalXOfput(bezier, (endX - lineOffset) + lineWidth);\n}\n\n\n/*\tAdjust the wide line after it has been stepped from lastX to nextX.\n\tSpecial adjustments of line width and start position are made here\n\tto simulate a rectangular brush */\n\nfunction adjustWideLineafterSteppingFromto(line, lastX, nextX) {\n\tvar baseWidth;\n\tvar deltaX;\n\tvar lineOffset;\n\tvar lineWidth;\n\tvar xDir;\n\tvar yEntry;\n\tvar yExit;\n\n\n\t/* Don't inline this */\n\t/* Fetch the values the adjustment decisions are based on */\n\n\tyEntry = wideLineEntryOf(line);\n\tyExit = wideLineExitOf(line);\n\tbaseWidth = wideLineExtentOf(line);\n\tlineOffset = offsetFromWidth(baseWidth);\n\tlineWidth = wideLineWidthOf(line);\n\txDir = lineXDirectionOf(line);\n\n\t/* Adjust the start of the line to fill an entire rectangle */\n\n\tdeltaX = nextX - lastX;\n\tif (yEntry < baseWidth) {\n\t\tif (xDir < 0) {\n\n\t\t\t/* effectively adding */\n\n\t\t\tlineWidth -= deltaX;\n\t\t} else {\n\t\t\tlineWidth += deltaX;\n\t\t\tedgeXValueOfput(line, lastX);\n\t\t}\n\t}\n\tif ((yExit + lineOffset) === 0) {\n\t\tif (xDir > 0) {\n\t\t\tlineWidth -= lineXIncrementOf(line);\n\t\t} else {\n\n\t\t\t/* effectively subtracting */\n\n\t\t\tlineWidth += lineXIncrementOf(line);\n\t\t\tedgeXValueOfput(line, lastX);\n\t\t}\n\t}\n\tif ((yExit + lineOffset) > 0) {\n\t\tif (xDir < 0) {\n\n\t\t\t/* effectively subtracting */\n\n\t\t\tlineWidth += deltaX;\n\t\t\tedgeXValueOfput(line, lastX);\n\t\t} else {\n\t\t\tlineWidth -= deltaX;\n\t\t}\n\t}\n\twideLineWidthOfput(line, lineWidth);\n}\n\nfunction aetStartGet() {\n\treturn workBuffer[GWAETStart];\n}\n\nfunction aetStartPut(value) {\n\treturn workBuffer[GWAETStart] = value;\n}\n\nfunction aetUsedGet() {\n\treturn workBuffer[GWAETUsed];\n}\n\nfunction aetUsedPut(value) {\n\treturn workBuffer[GWAETUsed] = value;\n}\n\n\n/*\tAllocate n slots in the active edge table */\n\nfunction allocateAETEntry(nSlots) {\n\treturn needAvailableSpace(nSlots);\n}\n\nfunction allocateBezier() {\n\tvar bezier;\n\n\tif (!allocateObjEntry(GBBaseSize)) {\n\t\treturn 0;\n\t}\n\tbezier = objUsed;\n\tobjUsed = bezier + GBBaseSize;\n\tobjectTypeOfput(bezier, GEPrimitiveBezier);\n\tobjectIndexOfput(bezier, 0);\n\tobjectLengthOfput(bezier, GBBaseSize);\n\treturn bezier;\n}\n\nfunction allocateBezierStackEntry() {\n\twbStackPush(6);\n\treturn wbStackSize();\n}\n\nfunction allocateBitmapFillcolormap(cmSize, cmBits) {\n\tvar cm;\n\tvar fill;\n\tvar fillSize;\n\tvar i;\n\n\tfillSize = GBMBaseSize + cmSize;\n\tif (!allocateObjEntry(fillSize)) {\n\t\treturn 0;\n\t}\n\tfill = objUsed;\n\tobjUsed = fill + fillSize;\n\tobjectTypeOfput(fill, GEPrimitiveClippedBitmapFill);\n\tobjectIndexOfput(fill, 0);\n\tobjectLengthOfput(fill, fillSize);\n\tcm = colormapOf(fill);\n\tif (hasColorTransform()) {\n\t\tfor (i = 0; i <= (cmSize - 1); i++) {\n\t\t\tcm[i] = transformColor(cmBits[i]);\n\t\t}\n\t} else {\n\t\tfor (i = 0; i <= (cmSize - 1); i++) {\n\t\t\tcm[i] = cmBits[i];\n\t\t}\n\t}\n\tbitmapCmSizeOfput(fill, cmSize);\n\treturn fill;\n}\n\n\n/*\tAllocate n slots in the global edge table */\n\nfunction allocateGETEntry(nSlots) {\n\tvar dstIndex;\n\tvar i;\n\tvar srcIndex;\n\tvar iLimiT;\n\n\n\t/* First allocate nSlots in the AET */\n\n\tif (!allocateAETEntry(nSlots)) {\n\t\treturn false;\n\t}\n\tif (aetUsedGet() !== 0) {\n\n\t\t/* Then move the AET upwards */\n\n\t\tsrcIndex = aetUsedGet();\n\t\tdstIndex = aetUsedGet() + nSlots;\n\t\tfor (i = 1, iLimiT = aetUsedGet(); i <= iLimiT; i++) {\n\t\t\taetBuffer[(--dstIndex)] = aetBuffer[(--srcIndex)];\n\t\t}\n\t}\n\taetBuffer = PTR_ADD(aetBuffer, nSlots);\n\treturn true;\n}\n\nfunction allocateGradientFillrampWidthisRadial(ramp, rampWidth, isRadial) {\n\tvar fill;\n\tvar fillSize;\n\tvar i;\n\tvar rampPtr;\n\n\tfillSize = GGBaseSize + rampWidth;\n\tif (!allocateObjEntry(fillSize)) {\n\t\treturn 0;\n\t}\n\tfill = objUsed;\n\tobjUsed = fill + fillSize;\n\tif (isRadial) {\n\t\tobjectTypeOfput(fill, GEPrimitiveRadialGradientFill);\n\t} else {\n\t\tobjectTypeOfput(fill, GEPrimitiveLinearGradientFill);\n\t}\n\tobjectIndexOfput(fill, 0);\n\tobjectLengthOfput(fill, fillSize);\n\trampPtr = gradientRampOf(fill);\n\tif (hasColorTransform()) {\n\t\tfor (i = 0; i <= (rampWidth - 1); i++) {\n\t\t\trampPtr[i] = transformColor(ramp[i]);\n\t\t}\n\t} else {\n\t\tfor (i = 0; i <= (rampWidth - 1); i++) {\n\t\t\trampPtr[i] = ramp[i];\n\t\t}\n\t}\n\tgradientRampLengthOfput(fill, rampWidth);\n\treturn fill;\n}\n\nfunction allocateLine() {\n\tvar line;\n\n\tif (!allocateObjEntry(GLBaseSize)) {\n\t\treturn 0;\n\t}\n\tline = objUsed;\n\tobjUsed = line + GLBaseSize;\n\tobjectTypeOfput(line, GEPrimitiveLine);\n\tobjectIndexOfput(line, 0);\n\tobjectLengthOfput(line, GLBaseSize);\n\treturn line;\n}\n\n\n/*\tAllocate n slots in the object buffer */\n\nfunction allocateObjEntry(nSlots) {\n\tvar dstIndex;\n\tvar i;\n\tvar srcIndex;\n\tvar iLimiT;\n\n\n\t/* First allocate nSlots in the GET */\n\n\tif (!allocateGETEntry(nSlots)) {\n\t\treturn false;\n\t}\n\tif (getUsedGet() !== 0) {\n\n\t\t/* Then move the GET upwards */\n\n\t\tsrcIndex = getUsedGet();\n\t\tdstIndex = getUsedGet() + nSlots;\n\t\tfor (i = 1, iLimiT = getUsedGet(); i <= iLimiT; i++) {\n\t\t\tgetBuffer[(--dstIndex)] = getBuffer[(--srcIndex)];\n\t\t}\n\t}\n\tgetBuffer = PTR_ADD(getBuffer, nSlots);\n\treturn true;\n}\n\n\n/*\tAET and Stack allocation are symmetric */\n\nfunction allocateStackEntry(nSlots) {\n\treturn needAvailableSpace(nSlots);\n}\n\nfunction allocateStackFillEntry() {\n\treturn wbStackPush(stackFillEntryLength());\n}\n\nfunction allocateWideBezier() {\n\tvar bezier;\n\n\tif (!allocateObjEntry(GBWideSize)) {\n\t\treturn 0;\n\t}\n\tbezier = objUsed;\n\tobjUsed = bezier + GBWideSize;\n\tobjectTypeOfput(bezier, GEPrimitiveWideBezier);\n\tobjectIndexOfput(bezier, 0);\n\tobjectLengthOfput(bezier, GBWideSize);\n\treturn bezier;\n}\n\nfunction allocateWideLine() {\n\tvar line;\n\n\tif (!allocateObjEntry(GLWideSize)) {\n\t\treturn 0;\n\t}\n\tline = objUsed;\n\tobjUsed = line + GLWideSize;\n\tobjectTypeOfput(line, GEPrimitiveWideLine);\n\tobjectIndexOfput(line, 0);\n\tobjectLengthOfput(line, GLWideSize);\n\treturn line;\n}\n\nfunction areEdgeFillsValid(edge) {\n\treturn (objectHeaderOf(edge) & GEEdgeFillsInvalid) === 0;\n}\n\n\n/*\tMake sure that val1 is between val2 and val3. */\n\nfunction assureValuebetweenand(val1, val2, val3) {\n\tif (val2 > val3) {\n\t\tif (val1 > val2) {\n\t\t\treturn val2;\n\t\t}\n\t\tif (val1 < val3) {\n\t\t\treturn val3;\n\t\t}\n\t} else {\n\t\tif (val1 < val2) {\n\t\t\treturn val2;\n\t\t}\n\t\tif (val1 > val3) {\n\t\t\treturn val3;\n\t\t}\n\t}\n\treturn val1;\n}\n\nfunction bezierEndXOf(bezier) {\n\treturn objat(bezier, GBEndX);\n}\n\nfunction bezierEndXOfput(bezier, value) {\n\treturn objatput(bezier, GBEndX, value);\n}\n\nfunction bezierEndYOf(bezier) {\n\treturn objat(bezier, GBEndY);\n}\n\nfunction bezierEndYOfput(bezier, value) {\n\treturn objatput(bezier, GBEndY, value);\n}\n\nfunction bezierFinalXOf(bezier) {\n\treturn objat(bezier, GBFinalX);\n}\n\nfunction bezierFinalXOfput(bezier, value) {\n\treturn objatput(bezier, GBFinalX, value);\n}\n\nfunction bezierUpdateDataOf(bezier) {\n\treturn PTR_ADD(objBuffer, bezier + GBUpdateData);\n}\n\nfunction bezierViaXOf(bezier) {\n\treturn objat(bezier, GBViaX);\n}\n\nfunction bezierViaXOfput(bezier, value) {\n\treturn objatput(bezier, GBViaX, value);\n}\n\nfunction bezierViaYOf(bezier) {\n\treturn objat(bezier, GBViaY);\n}\n\nfunction bezierViaYOfput(bezier, value) {\n\treturn objatput(bezier, GBViaY, value);\n}\n\nfunction bitmapCmSizeOf(bmFill) {\n\treturn objat(bmFill, GBColormapSize);\n}\n\nfunction bitmapCmSizeOfput(bmFill, value) {\n\treturn objatput(bmFill, GBColormapSize, value);\n}\n\nfunction bitmapDepthOf(bmFill) {\n\treturn objat(bmFill, GBBitmapDepth);\n}\n\nfunction bitmapDepthOfput(bmFill, value) {\n\treturn objatput(bmFill, GBBitmapDepth, value);\n}\n\nfunction bitmapHeightOf(bmFill) {\n\treturn objat(bmFill, GBBitmapHeight);\n}\n\nfunction bitmapHeightOfput(bmFill, value) {\n\treturn objatput(bmFill, GBBitmapHeight, value);\n}\n\nfunction bitmapRasterOf(bmFill) {\n\treturn objat(bmFill, GBBitmapRaster);\n}\n\nfunction bitmapRasterOfput(bmFill, value) {\n\treturn objatput(bmFill, GBBitmapRaster, value);\n}\n\nfunction bitmapSizeOf(bmFill) {\n\treturn objat(bmFill, GBBitmapSize);\n}\n\nfunction bitmapSizeOfput(bmFill, value) {\n\treturn objatput(bmFill, GBBitmapSize, value);\n}\n\nfunction bitmapTileFlagOf(bmFill) {\n\treturn objat(bmFill, GBTileFlag);\n}\n\nfunction bitmapTileFlagOfput(bmFill, value) {\n\treturn objatput(bmFill, GBTileFlag, value);\n}\n\nfunction bitmapValuebitsatXy(bmFill, bits, xp, yp) {\n\tvar a;\n\tvar b;\n\tvar bmDepth;\n\tvar bmRaster;\n\tvar cMask;\n\tvar g;\n\tvar r;\n\tvar rShift;\n\tvar value;\n\n\tbmDepth = bitmapDepthOf(bmFill);\n\tbmRaster = bitmapRasterOf(bmFill);\n\tif (bmDepth === 32) {\n\t\tvalue = (bits[(bmRaster * yp) + xp]|0);\n\t\tif ((value !== 0) && ((value & 4278190080) === 0)) {\n\t\t\tvalue = value | 4278190080;\n\t\t}\n\t\treturn uncheckedTransformColor(value);\n\t}\n\trShift = rShiftTable()[bmDepth];\n\n\t/* cMask - mask out the pixel from the word */\n\n\tvalue = bits[(bmRaster * yp) + (SHR(xp, rShift))];\n\n\t/* rShift - shift value to move the pixel in the word to the lowest bit position */\n\n\tcMask = (SHL(1, bmDepth)) - 1;\n\trShift = (32 - bmDepth) - ((xp & ((SHL(1, rShift)) - 1)) * bmDepth);\n\tvalue = (SHR(value, rShift)) & cMask;\n\tif (bmDepth === 16) {\n\n\t\t/* Must convert by expanding bits */\n\n\t\tif (value !== 0) {\n\t\t\tb = (value & 31) << 3;\n\t\t\tb += b >>> 5;\n\t\t\tg = ((value >>> 5) & 31) << 3;\n\t\t\tg += g >>> 5;\n\t\t\tr = ((value >>> 10) & 31) << 3;\n\t\t\tr += r >>> 5;\n\t\t\ta = 255;\n\t\t\tvalue = ((b + (g << 8)) + (r << 16)) + (a << 24);\n\t\t}\n\t} else {\n\n\t\t/* Must convert by using color map */\n\n\t\tif (bitmapCmSizeOf(bmFill) === 0) {\n\t\t\tvalue = 0;\n\t\t} else {\n\t\t\tvalue = colormapOf(bmFill)[value];\n\t\t}\n\t}\n\treturn uncheckedTransformColor(value);\n}\n\nfunction bitmapWidthOf(bmFill) {\n\treturn objat(bmFill, GBBitmapWidth);\n}\n\nfunction bitmapWidthOfput(bmFill, value) {\n\treturn objatput(bmFill, GBBitmapWidth, value);\n}\n\nfunction bzEndX(index) {\n\treturn wbStackValue((wbStackSize() - index) + 4);\n}\n\nfunction bzEndXput(index, value) {\n\treturn wbStackValueput((wbStackSize() - index) + 4, value);\n}\n\nfunction bzEndY(index) {\n\treturn wbStackValue((wbStackSize() - index) + 5);\n}\n\nfunction bzEndYput(index, value) {\n\treturn wbStackValueput((wbStackSize() - index) + 5, value);\n}\n\nfunction bzStartX(index) {\n\treturn wbStackValue((wbStackSize() - index) + 0);\n}\n\nfunction bzStartXput(index, value) {\n\treturn wbStackValueput((wbStackSize() - index) + 0, value);\n}\n\nfunction bzStartY(index) {\n\treturn wbStackValue((wbStackSize() - index) + 1);\n}\n\nfunction bzStartYput(index, value) {\n\treturn wbStackValueput((wbStackSize() - index) + 1, value);\n}\n\nfunction bzViaX(index) {\n\treturn wbStackValue((wbStackSize() - index) + 2);\n}\n\nfunction bzViaXput(index, value) {\n\treturn wbStackValueput((wbStackSize() - index) + 2, value);\n}\n\nfunction bzViaY(index) {\n\treturn wbStackValue((wbStackSize() - index) + 3);\n}\n\nfunction bzViaYput(index, value) {\n\treturn wbStackValueput((wbStackSize() - index) + 3, value);\n}\n\n\n/*\tCheck the fill indexes in the run-length encoded fillList */\n\nfunction checkCompressedFillIndexListmaxsegments(fillList, maxIndex, nSegs) {\n\tvar fillPtr;\n\tvar i;\n\tvar length;\n\tvar nFills;\n\tvar runLength;\n\tvar runValue;\n\n\tlength = SIZEOF(fillList);\n\tfillPtr = fillList.wordsAsInt32Array();\n\tnFills = 0;\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\trunLength = shortRunLengthAtfrom(i, fillPtr);\n\t\trunValue = shortRunValueAtfrom(i, fillPtr);\n\t\tif (!((runValue >= 0) && (runValue <= maxIndex))) {\n\t\t\treturn false;\n\t\t}\n\t\tnFills += runLength;\n\t}\n\treturn nFills === nSegs;\n}\n\n\n/*\tCheck if the indexList (containing fill handles) is okay. */\n\nfunction checkCompressedFills(indexList) {\n\tvar fillIndex;\n\tvar fillPtr;\n\tvar i;\n\tvar length;\n\n\n\t/* First check if the oops have the right format */\n\n\tif (!interpreterProxy.isWords(indexList)) {\n\t\treturn false;\n\t}\n\tlength = SIZEOF(indexList);\n\tfillPtr = indexList.wordsAsInt32Array();\n\tfor (i = 0; i <= (length - 1); i++) {\n\n\t\t/* Make sure the fill is okay */\n\n\t\tfillIndex = fillPtr[i];\n\t\tif (!isFillOkay(fillIndex)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\n\n/*\tCheck the run-length encoded lineWidthList matches nSegments */\n\nfunction checkCompressedLineWidthssegments(lineWidthList, nSegments) {\n\tvar i;\n\tvar length;\n\tvar nItems;\n\tvar ptr;\n\tvar runLength;\n\n\tlength = SIZEOF(lineWidthList);\n\tptr = lineWidthList.wordsAsInt32Array();\n\tnItems = 0;\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\trunLength = shortRunLengthAtfrom(i, ptr);\n\t\tnItems += runLength;\n\t}\n\treturn nItems === nSegments;\n}\n\n\n/*\tCheck if the given point array can be handled by the engine. */\n\nfunction checkCompressedPointssegments(points, nSegments) {\n\tvar pSize;\n\n\tif (!interpreterProxy.isWords(points)) {\n\t\treturn false;\n\t}\n\n\t/* The points must be either in PointArray format or ShortPointArray format.\n\tAlso, we currently handle only quadratic segments (e.g., 3 points each) and thus either\n\t\tpSize = nSegments * 3,\t\tfor ShortPointArrays or,\n\t\tpSize = nSegments * 6,\t\tfor PointArrays */\n\n\tpSize = SIZEOF(points);\n\tif (!((pSize === (nSegments * 3)) || (pSize === (nSegments * 6)))) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\n\n/*\tCheck if the given shape can be handled by the engine. \n\tSince there are a number of requirements this is an extra method. */\n\nfunction checkCompressedShapesegmentsleftFillsrightFillslineWidthslineFillsfillIndexList(points, nSegments, leftFills, rightFills, lineWidths, lineFills, fillIndexList) {\n\tvar maxFillIndex;\n\n\tif (!checkCompressedPointssegments(points, nSegments)) {\n\t\treturn false;\n\t}\n\tif (!checkCompressedFills(fillIndexList)) {\n\t\treturn false;\n\t}\n\tmaxFillIndex = SIZEOF(fillIndexList);\n\tif (!checkCompressedFillIndexListmaxsegments(leftFills, maxFillIndex, nSegments)) {\n\t\treturn false;\n\t}\n\tif (!checkCompressedFillIndexListmaxsegments(rightFills, maxFillIndex, nSegments)) {\n\t\treturn false;\n\t}\n\tif (!checkCompressedFillIndexListmaxsegments(lineFills, maxFillIndex, nSegments)) {\n\t\treturn false;\n\t}\n\tif (!checkCompressedLineWidthssegments(lineWidths, nSegments)) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\n\n/*\tAdd the bezier to the global edge table if it intersects the clipping region */\n\nfunction checkedAddBezierToGET(bezier) {\n\tvar lineWidth;\n\n\tif (isWide(bezier)) {\n\t\tlineWidth = wideBezierExtentOf(bezier);\n\t} else {\n\t\tlineWidth = 0;\n\t}\n\tif ((bezierEndYOf(bezier) + lineWidth) < fillMinYGet()) {\n\t\treturn 0;\n\t}\n\tif (((edgeXValueOf(bezier) - lineWidth) >= fillMaxXGet()) && ((bezierEndXOf(bezier) - lineWidth) >= fillMaxXGet())) {\n\t\treturn 0;\n\t}\n\taddEdgeToGET(bezier);\n}\n\n\n/*\tAdd the edge to the global edge table.\n\tFor known edge types, check if the edge intersects the visible region */\n\nfunction checkedAddEdgeToGET(edge) {\n\tif (isLine(edge)) {\n\t\treturn checkedAddLineToGET(edge);\n\t}\n\tif (isBezier(edge)) {\n\t\treturn checkedAddBezierToGET(edge);\n\t}\n\taddEdgeToGET(edge);\n}\n\n\n/*\tAdd the line to the global edge table if it intersects the clipping region */\n\nfunction checkedAddLineToGET(line) {\n\tvar lineWidth;\n\n\tif (isWide(line)) {\n\t\tlineWidth = wideLineExtentOf(line);\n\t} else {\n\t\tlineWidth = 0;\n\t}\n\tif ((lineEndYOf(line) + lineWidth) < fillMinYGet()) {\n\t\treturn 0;\n\t}\n\tif (((edgeXValueOf(line) - lineWidth) >= fillMaxXGet()) && ((lineEndXOf(line) - lineWidth) >= fillMaxXGet())) {\n\t\treturn 0;\n\t}\n\taddEdgeToGET(line);\n}\n\nfunction circleCosTable() {\n\tvar theTable =\n\t\t[1.0, 0.98078528040323, 0.923879532511287, 0.831469612302545,\n\t\t0.7071067811865475, 0.555570233019602, 0.38268343236509, 0.1950903220161286,\n\t\t0.0, -0.1950903220161283, -0.3826834323650896, -0.555570233019602,\n\t\t-0.707106781186547, -0.831469612302545, -0.9238795325112865, -0.98078528040323,\n\t\t-1.0, -0.98078528040323, -0.923879532511287, -0.831469612302545,\n\t\t-0.707106781186548, -0.555570233019602, -0.3826834323650903, -0.1950903220161287,\n\t\t0.0, 0.1950903220161282, 0.38268343236509, 0.555570233019602,\n\t\t0.707106781186547, 0.831469612302545, 0.9238795325112865, 0.98078528040323,\n\t\t1.0 ];\n\n\treturn theTable;\n}\n\nfunction circleSinTable() {\n\tvar theTable =\n\t\t[0.0, 0.1950903220161282, 0.3826834323650897, 0.555570233019602,\n\t\t0.707106781186547, 0.831469612302545, 0.923879532511287, 0.98078528040323,\n\t\t1.0, 0.98078528040323, 0.923879532511287, 0.831469612302545,\n\t\t0.7071067811865475, 0.555570233019602, 0.38268343236509, 0.1950903220161286,\n\t\t0.0, -0.1950903220161283, -0.3826834323650896, -0.555570233019602,\n\t\t-0.707106781186547, -0.831469612302545, -0.9238795325112865, -0.98078528040323,\n\t\t-1.0, -0.98078528040323, -0.923879532511287, -0.831469612302545,\n\t\t-0.707106781186548, -0.555570233019602, -0.3826834323650903, -0.1950903220161287,\n\t\t 0.0 ];\n\n\treturn theTable;\n}\n\nfunction clampValuemax(value, maxValue) {\n\tif (value < 0) {\n\t\treturn 0;\n\t} else {\n\t\tif (value >= maxValue) {\n\t\t\treturn maxValue - 1;\n\t\t} else {\n\t\t\treturn value;\n\t\t}\n\t}\n}\n\n\n/*\tClear the current span buffer.\n\tThe span buffer is only cleared in the area that has been used by the previous scan line. */\n\nfunction clearSpanBuffer() {\n\tvar x0;\n\tvar x1;\n\n\tx0 = SHR(spanStartGet(), aaShiftGet());\n\tx1 = (SHR(spanEndGet(), aaShiftGet())) + 1;\n\tif (x0 < 0) {\n\t\tx0 = 0;\n\t}\n\tif (x1 > spanSizeGet()) {\n\t\tx1 = spanSizeGet();\n\t}\n\twhile (x0 < x1) {\n\t\tspanBuffer[x0] = 0;\n\t\t++x0;\n\t}\n\tspanStartPut(spanSizeGet());\n\tspanEndPut(0);\n}\n\nfunction clearSpanBufferGet() {\n\treturn workBuffer[GWClearSpanBuffer];\n}\n\nfunction clearSpanBufferPut(value) {\n\treturn workBuffer[GWClearSpanBuffer] = value;\n}\n\nfunction clipMaxXGet() {\n\treturn workBuffer[GWClipMaxX];\n}\n\nfunction clipMaxXPut(value) {\n\treturn workBuffer[GWClipMaxX] = value;\n}\n\nfunction clipMaxYGet() {\n\treturn workBuffer[GWClipMaxY];\n}\n\nfunction clipMaxYPut(value) {\n\treturn workBuffer[GWClipMaxY] = value;\n}\n\nfunction clipMinXGet() {\n\treturn workBuffer[GWClipMinX];\n}\n\nfunction clipMinXPut(value) {\n\treturn workBuffer[GWClipMinX] = value;\n}\n\nfunction clipMinYGet() {\n\treturn workBuffer[GWClipMinY];\n}\n\nfunction clipMinYPut(value) {\n\treturn workBuffer[GWClipMinY] = value;\n}\n\nfunction colorTransform() {\n\treturn FPTR_ADD(workBuffer, GWColorTransform);\n}\n\nfunction colormapOf(bmFill) {\n\treturn PTR_ADD(objBuffer, bmFill + GBColormapOffset);\n}\n\n\n/*\tSplit the bezier curve at the given parametric value.\n\tNote: Since this method is only invoked to make non-monoton\n\t\tbeziers monoton we must check for the resulting y values\n\t\tto be *really* between the start and end value. */\n\nfunction computeBeziersplitAt(index, param) {\n\tvar endX;\n\tvar endY;\n\tvar leftViaX;\n\tvar leftViaY;\n\tvar newIndex;\n\tvar rightViaX;\n\tvar rightViaY;\n\tvar sharedX;\n\tvar sharedY;\n\tvar startX;\n\tvar startY;\n\tvar viaX;\n\tvar viaY;\n\n\tleftViaX = (startX = bzStartX(index));\n\tleftViaY = (startY = bzStartY(index));\n\trightViaX = (viaX = bzViaX(index));\n\trightViaY = (viaY = bzViaY(index));\n\tendX = bzEndX(index);\n\n\t/* Compute intermediate points */\n\n\tendY = bzEndY(index);\n\tsharedX = (leftViaX += (((viaX - startX) * param)|0));\n\tsharedY = (leftViaY += (((viaY - startY) * param)|0));\n\trightViaX += (((endX - viaX) * param)|0);\n\n\t/* Compute new shared point */\n\n\trightViaY += (((endY - viaY) * param)|0);\n\tsharedX += (((rightViaX - leftViaX) * param)|0);\n\n\t/* Check the new via points */\n\n\tsharedY += (((rightViaY - leftViaY) * param)|0);\n\tleftViaY = assureValuebetweenand(leftViaY, startY, sharedY);\n\trightViaY = assureValuebetweenand(rightViaY, sharedY, endY);\n\tnewIndex = allocateBezierStackEntry();\n\tif (engineStopped) {\n\t\treturn 0;\n\t}\n\tbzViaXput(index, leftViaX);\n\tbzViaYput(index, leftViaY);\n\tbzEndXput(index, sharedX);\n\tbzEndYput(index, sharedY);\n\tbzStartXput(newIndex, sharedX);\n\tbzStartYput(newIndex, sharedY);\n\tbzViaXput(newIndex, rightViaX);\n\tbzViaYput(newIndex, rightViaY);\n\tbzEndXput(newIndex, endX);\n\tbzEndYput(newIndex, endY);\n\treturn newIndex;\n}\n\n\n/*\tSplit the bezier curve at 0.5. */\n\nfunction computeBezierSplitAtHalf(index) {\n\tvar endX;\n\tvar endY;\n\tvar leftViaX;\n\tvar leftViaY;\n\tvar newIndex;\n\tvar rightViaX;\n\tvar rightViaY;\n\tvar sharedX;\n\tvar sharedY;\n\tvar startX;\n\tvar startY;\n\tvar viaX;\n\tvar viaY;\n\n\tnewIndex = allocateBezierStackEntry();\n\tif (engineStopped) {\n\t\treturn 0;\n\t}\n\tleftViaX = (startX = bzStartX(index));\n\tleftViaY = (startY = bzStartY(index));\n\trightViaX = (viaX = bzViaX(index));\n\trightViaY = (viaY = bzViaY(index));\n\tendX = bzEndX(index);\n\n\t/* Compute intermediate points */\n\n\tendY = bzEndY(index);\n\tleftViaX += (viaX - startX) >> 1;\n\tleftViaY += (viaY - startY) >> 1;\n\tsharedX = (rightViaX += (endX - viaX) >> 1);\n\n\t/* Compute new shared point */\n\n\tsharedY = (rightViaY += (endY - viaY) >> 1);\n\tsharedX += (leftViaX - rightViaX) >> 1;\n\n\t/* Store the first part back */\n\n\tsharedY += (leftViaY - rightViaY) >> 1;\n\tbzViaXput(index, leftViaX);\n\tbzViaYput(index, leftViaY);\n\tbzEndXput(index, sharedX);\n\tbzEndYput(index, sharedY);\n\tbzStartXput(newIndex, sharedX);\n\tbzStartYput(newIndex, sharedY);\n\tbzViaXput(newIndex, rightViaX);\n\tbzViaYput(newIndex, rightViaY);\n\tbzEndXput(newIndex, endX);\n\tbzEndYput(newIndex, endY);\n\treturn newIndex;\n}\n\n\n/*\tGet both values from the two boundaries of the given bezier \n\tand compute the actual position/width of the line */\n\nfunction computeFinalWideBezierValueswidth(bezier, lineWidth) {\n\tvar leftX;\n\tvar rightX;\n\tvar temp;\n\n\tleftX = bezierUpdateDataOf(bezier)[GBUpdateX] >> 8;\n\trightX = wideBezierUpdateDataOf(bezier)[GBUpdateX] >> 8;\n\tif (leftX > rightX) {\n\t\ttemp = leftX;\n\t\tleftX = rightX;\n\t\trightX = temp;\n\t}\n\tedgeXValueOfput(bezier, leftX);\n\tif ((rightX - leftX) > lineWidth) {\n\t\twideBezierWidthOfput(bezier, rightX - leftX);\n\t} else {\n\t\twideBezierWidthOfput(bezier, lineWidth);\n\t}\n}\n\nfunction computeSqrt(length2) {\n\tif (length2 < 32) {\n\t\treturn smallSqrtTable()[length2];\n\t} else {\n\t\treturn ((Math.sqrt(length2) + 0.5)|0);\n\t}\n}\n\nfunction copyBitsFromtoat(x0, x1, yValue) {\n\tif (!copyBitsFn) {\n\n\t\t/* We need copyBits here so try to load it implicitly */\n\n\t\tif (!initialiseModule()) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn copyBitsFn(x0, x1, yValue);\n}\n\n\n/*\tCreate the global edge table */\n\nfunction createGlobalEdgeTable() {\n\tvar end;\n\tvar object;\n\n\tobject = 0;\n\tend = objUsed;\n\twhile (object < end) {\n\n\t\t/* Note: addEdgeToGET: may fail on insufficient space but that's not a problem here */\n\n\t\tif (isEdge(object)) {\n\n\t\t\t/* Check if the edge starts below fillMaxY. */\n\n\t\t\tif (!(edgeYValueOf(object) >= fillMaxYGet())) {\n\t\t\t\tcheckedAddEdgeToGET(object);\n\t\t\t}\n\t\t}\n\t\tobject += objectLengthOf(object);\n\t}\n}\n\nfunction currentYGet() {\n\treturn workBuffer[GWCurrentY];\n}\n\nfunction currentYPut(value) {\n\treturn workBuffer[GWCurrentY] = value;\n}\n\nfunction currentZGet() {\n\treturn workBuffer[GWCurrentZ];\n}\n\nfunction currentZPut(value) {\n\treturn workBuffer[GWCurrentZ] = value;\n}\n\nfunction destOffsetXGet() {\n\treturn workBuffer[GWDestOffsetX];\n}\n\nfunction destOffsetXPut(value) {\n\treturn workBuffer[GWDestOffsetX] = value;\n}\n\nfunction destOffsetYGet() {\n\treturn workBuffer[GWDestOffsetY];\n}\n\nfunction destOffsetYPut(value) {\n\treturn workBuffer[GWDestOffsetY] = value;\n}\n\n\n/*\tDisplay the span buffer at the current scan line. */\n\nfunction displaySpanBufferAt(y) {\n\tvar targetX0;\n\tvar targetX1;\n\tvar targetY;\n\n\n\t/* self aaLevelGet > 1 ifTrue:[self adjustAALevel]. */\n\n\ttargetX0 = SHR(spanStartGet(), aaShiftGet());\n\tif (targetX0 < clipMinXGet()) {\n\t\ttargetX0 = clipMinXGet();\n\t}\n\ttargetX1 = SHR(((spanEndGet() + aaLevelGet()) - 1), aaShiftGet());\n\tif (targetX1 > clipMaxXGet()) {\n\t\ttargetX1 = clipMaxXGet();\n\t}\n\ttargetY = SHR(y, aaShiftGet());\n\tif ((targetY < clipMinYGet()) || ((targetY >= clipMaxYGet()) || ((targetX1 < clipMinXGet()) || (targetX0 >= clipMaxXGet())))) {\n\t\treturn 0;\n\t}\n\tcopyBitsFromtoat(targetX0, targetX1, targetY);\n}\n\nfunction edgeFillsInvalidate(edge) {\n\treturn objectTypeOfput(edge, objectTypeOf(edge) | GEEdgeFillsInvalid);\n}\n\nfunction edgeFillsValidate(edge) {\n\treturn objectTypeOfput(edge, objectTypeOf(edge) & ~GEEdgeFillsInvalid);\n}\n\nfunction edgeLeftFillOf(edge) {\n\treturn objat(edge, GEFillIndexLeft);\n}\n\nfunction edgeLeftFillOfput(edge, value) {\n\treturn objatput(edge, GEFillIndexLeft, value);\n}\n\nfunction edgeNumLinesOf(edge) {\n\treturn objat(edge, GENumLines);\n}\n\nfunction edgeNumLinesOfput(edge, value) {\n\treturn objatput(edge, GENumLines, value);\n}\n\nfunction edgeRightFillOf(edge) {\n\treturn objat(edge, GEFillIndexRight);\n}\n\nfunction edgeRightFillOfput(edge, value) {\n\treturn objatput(edge, GEFillIndexRight, value);\n}\n\nfunction edgeTransform() {\n\treturn FPTR_ADD(workBuffer, GWEdgeTransform);\n}\n\n\n/*\tReturn the edge type (e.g., witout the wide edge flag) */\n\nfunction edgeTypeOf(edge) {\n\treturn objectTypeOf(edge) >>> 1;\n}\n\nfunction edgeXValueOf(edge) {\n\treturn objat(edge, GEXValue);\n}\n\nfunction edgeXValueOfput(edge, value) {\n\treturn objatput(edge, GEXValue, value);\n}\n\nfunction edgeYValueOf(edge) {\n\treturn objat(edge, GEYValue);\n}\n\nfunction edgeYValueOfput(edge, value) {\n\treturn objatput(edge, GEYValue, value);\n}\n\nfunction edgeZValueOf(edge) {\n\treturn objat(edge, GEZValue);\n}\n\nfunction edgeZValueOfput(edge, value) {\n\treturn objatput(edge, GEZValue, value);\n}\n\n\n/*\tIgnore dispatch errors when translating to C\n\t(since we have no entry point for #error in the VM proxy) */\n\nfunction errorWrongIndex() {\n\t;\n}\n\n\n/*\tFill the span buffer from leftX to rightX with the given fill. */\n\nfunction fillAllFromto(leftX, rightX) {\n\tvar fill;\n\tvar startX;\n\tvar stopX;\n\n\tfill = topFill();\n\tstartX = leftX;\n\tstopX = topRightX();\n\twhile (stopX < rightX) {\n\t\tfill = topFill();\n\t\tif (fill !== 0) {\n\t\t\tif (fillSpanfromto(fill, startX, stopX)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tquickRemoveInvalidFillsAt(stopX);\n\t\tstartX = stopX;\n\t\tstopX = topRightX();\n\t}\n\tfill = topFill();\n\tif (fill !== 0) {\n\t\treturn fillSpanfromto(fill, startX, rightX);\n\t}\n\treturn false;\n}\n\nfunction fillBitmapSpan() {\n\treturn fillBitmapSpanfromtoat(lastExportedFillGet(), lastExportedLeftXGet(), lastExportedRightXGet(), currentYGet());\n}\n\n\n/*\tFill the span buffer between leftEdge and rightEdge using the given bits.\n\tNote: We always start from zero - this avoids using huge bitmap buffers if the bitmap is to be displayed at the very far right hand side and also gives us a chance of using certain bitmaps (e.g., those with depth 32) directly. */\n\nfunction fillBitmapSpanfromto(bits, leftX, rightX) {\n\tvar baseShift;\n\tvar bitX;\n\tvar colorMask;\n\tvar colorShift;\n\tvar fillValue;\n\tvar x;\n\tvar x0;\n\tvar x1;\n\n\tx0 = leftX;\n\tx1 = rightX;\n\n\t/* Hack for pre-increment */\n\n\tbitX = -1;\n\tif (aaLevelGet() === 1) {\n\n\t\t/* Speedy version for no anti-aliasing */\n\n\t\twhile (x0 < x1) {\n\t\t\tfillValue = (bits[(++bitX)]|0);\n\t\t\tspanBuffer[x0] = fillValue;\n\t\t\t++x0;\n\t\t}\n\t} else {\n\n\t\t/* Generic version with anti-aliasing */\n\n\t\tcolorMask = aaColorMaskGet();\n\t\tcolorShift = aaColorShiftGet();\n\t\tbaseShift = aaShiftGet();\n\t\twhile (x0 < x1) {\n\t\t\tx = SHR(x0, baseShift);\n\t\t\tfillValue = (bits[(++bitX)]|0);\n\t\t\tfillValue = SHR((fillValue & colorMask), colorShift);\n\t\t\tspanBuffer[x] = (spanBuffer[x] + fillValue);\n\t\t\t++x0;\n\t\t}\n\t}\n\tif (x1 > spanEndGet()) {\n\t\tspanEndPut(x1);\n\t}\n\tif (x1 > spanEndAAGet()) {\n\t\tspanEndAAPut(x1);\n\t}\n}\n\nfunction fillBitmapSpanfromtoat(bmFill, leftX, rightX, yValue) {\n\tvar bits;\n\tvar bmHeight;\n\tvar bmWidth;\n\tvar deltaX;\n\tvar deltaY;\n\tvar ds;\n\tvar dsX;\n\tvar dt;\n\tvar dtX;\n\tvar fillValue;\n\tvar tileFlag;\n\tvar x;\n\tvar x1;\n\tvar xp;\n\tvar yp;\n\n\tif (aaLevelGet() !== 1) {\n\t\treturn fillBitmapSpanAAfromtoat(bmFill, leftX, rightX, yValue);\n\t}\n\tbits = loadBitsFrom(bmFill);\n\tif (!bits) {\n\t\treturn null;\n\t}\n\tbmWidth = bitmapWidthOf(bmFill);\n\tbmHeight = bitmapHeightOf(bmFill);\n\ttileFlag = bitmapTileFlagOf(bmFill) === 1;\n\tdeltaX = leftX - fillOriginXOf(bmFill);\n\tdeltaY = yValue - fillOriginYOf(bmFill);\n\tdsX = fillDirectionXOf(bmFill);\n\tdtX = fillNormalXOf(bmFill);\n\tds = (deltaX * dsX) + (deltaY * fillDirectionYOf(bmFill));\n\tdt = (deltaX * dtX) + (deltaY * fillNormalYOf(bmFill));\n\tx = leftX;\n\tx1 = rightX;\n\twhile (x < x1) {\n\t\tif (tileFlag) {\n\t\t\tds = repeatValuemax(ds, bmWidth << 16);\n\t\t\tdt = repeatValuemax(dt, bmHeight << 16);\n\t\t}\n\t\txp = ds >> 16;\n\t\typ = dt >> 16;\n\t\tif (!tileFlag) {\n\t\t\txp = clampValuemax(xp, bmWidth);\n\t\t\typ = clampValuemax(yp, bmHeight);\n\t\t}\n\t\tif ((xp >= 0) && ((yp >= 0) && ((xp < bmWidth) && (yp < bmHeight)))) {\n\t\t\tfillValue = bitmapValuebitsatXy(bmFill, bits, xp, yp);\n\t\t\tspanBuffer[x] = fillValue;\n\t\t}\n\t\tds += dsX;\n\t\tdt += dtX;\n\t\t++x;\n\t}\n}\n\nfunction fillBitmapSpanAAfromtoat(bmFill, leftX, rightX, yValue) {\n\tvar aaLevel;\n\tvar baseShift;\n\tvar bits;\n\tvar bmHeight;\n\tvar bmWidth;\n\tvar cMask;\n\tvar cShift;\n\tvar deltaX;\n\tvar deltaY;\n\tvar ds;\n\tvar dsX;\n\tvar dt;\n\tvar dtX;\n\tvar fillValue;\n\tvar firstPixel;\n\tvar idx;\n\tvar lastPixel;\n\tvar tileFlag;\n\tvar x;\n\tvar xp;\n\tvar yp;\n\n\tbits = loadBitsFrom(bmFill);\n\tif (!bits) {\n\t\treturn null;\n\t}\n\tbmWidth = bitmapWidthOf(bmFill);\n\tbmHeight = bitmapHeightOf(bmFill);\n\ttileFlag = bitmapTileFlagOf(bmFill) === 1;\n\tdeltaX = leftX - fillOriginXOf(bmFill);\n\tdeltaY = yValue - fillOriginYOf(bmFill);\n\tdsX = fillDirectionXOf(bmFill);\n\tdtX = fillNormalXOf(bmFill);\n\tds = (deltaX * dsX) + (deltaY * fillDirectionYOf(bmFill));\n\tdt = (deltaX * dtX) + (deltaY * fillNormalYOf(bmFill));\n\taaLevel = aaLevelGet();\n\tfirstPixel = aaFirstPixelFromto(leftX, rightX);\n\tlastPixel = aaLastPixelFromto(leftX, rightX);\n\tbaseShift = aaShiftGet();\n\tcMask = aaColorMaskGet();\n\tcShift = aaColorShiftGet();\n\tx = leftX;\n\twhile (x < firstPixel) {\n\t\tif (tileFlag) {\n\t\t\tds = repeatValuemax(ds, bmWidth << 16);\n\t\t\tdt = repeatValuemax(dt, bmHeight << 16);\n\t\t}\n\t\txp = ds >> 16;\n\t\typ = dt >> 16;\n\t\tif (!tileFlag) {\n\t\t\txp = clampValuemax(xp, bmWidth);\n\t\t\typ = clampValuemax(yp, bmHeight);\n\t\t}\n\t\tif ((xp >= 0) && ((yp >= 0) && ((xp < bmWidth) && (yp < bmHeight)))) {\n\t\t\tfillValue = bitmapValuebitsatXy(bmFill, bits, xp, yp);\n\t\t\tfillValue = SHR((fillValue & cMask), cShift);\n\t\t\tidx = SHR(x, baseShift);\n\t\t\tspanBuffer[idx] = (spanBuffer[idx] + fillValue);\n\t\t}\n\t\tds += dsX;\n\t\tdt += dtX;\n\t\t++x;\n\t}\n\tcMask = (SHR(aaColorMaskGet(), aaShiftGet())) | 4042322160;\n\tcShift = aaShiftGet();\n\twhile (x < lastPixel) {\n\t\tif (tileFlag) {\n\t\t\tds = repeatValuemax(ds, bmWidth << 16);\n\t\t\tdt = repeatValuemax(dt, bmHeight << 16);\n\t\t}\n\t\txp = ds >> 16;\n\t\typ = dt >> 16;\n\t\tif (!tileFlag) {\n\t\t\txp = clampValuemax(xp, bmWidth);\n\t\t\typ = clampValuemax(yp, bmHeight);\n\t\t}\n\t\tif ((xp >= 0) && ((yp >= 0) && ((xp < bmWidth) && (yp < bmHeight)))) {\n\t\t\tfillValue = bitmapValuebitsatXy(bmFill, bits, xp, yp);\n\t\t\tfillValue = SHR((fillValue & cMask), cShift);\n\t\t\tidx = SHR(x, baseShift);\n\t\t\tspanBuffer[idx] = (spanBuffer[idx] + fillValue);\n\t\t}\n\t\tds += SHL(dsX, cShift);\n\t\tdt += SHL(dtX, cShift);\n\t\tx += aaLevel;\n\t}\n\tcMask = aaColorMaskGet();\n\tcShift = aaColorShiftGet();\n\twhile (x < rightX) {\n\t\tif (tileFlag) {\n\t\t\tds = repeatValuemax(ds, bmWidth << 16);\n\t\t\tdt = repeatValuemax(dt, bmHeight << 16);\n\t\t}\n\t\txp = ds >> 16;\n\t\typ = dt >> 16;\n\t\tif (!tileFlag) {\n\t\t\txp = clampValuemax(xp, bmWidth);\n\t\t\typ = clampValuemax(yp, bmHeight);\n\t\t}\n\t\tif ((xp >= 0) && ((yp >= 0) && ((xp < bmWidth) && (yp < bmHeight)))) {\n\t\t\tfillValue = bitmapValuebitsatXy(bmFill, bits, xp, yp);\n\t\t\tfillValue = SHR((fillValue & cMask), cShift);\n\t\t\tidx = SHR(x, baseShift);\n\t\t\tspanBuffer[idx] = (spanBuffer[idx] + fillValue);\n\t\t}\n\t\tds += dsX;\n\t\tdt += dtX;\n\t\t++x;\n\t}\n}\n\n\n/*\tFill the span buffer between leftEdge and rightEdge with the given pixel value. */\n\nfunction fillColorSpanfromto(pixelValue32, leftX, rightX) {\n\tvar x0;\n\tvar x1;\n\n\n\t/* Use a unrolled version for anti-aliased fills... */\n\n\tif (aaLevelGet() !== 1) {\n\t\treturn fillColorSpanAAx0x1(pixelValue32, leftX, rightX);\n\t}\n\tx0 = leftX;\n\n\t/* Unroll the inner loop four times, since we're only storing data. */\n\n\tx1 = rightX;\n\twhile ((x0 + 4) < x1) {\n\t\tspanBuffer[x0] = pixelValue32;\n\t\tspanBuffer[x0 + 1] = pixelValue32;\n\t\tspanBuffer[x0 + 2] = pixelValue32;\n\t\tspanBuffer[x0 + 3] = pixelValue32;\n\t\tx0 += 4;\n\t}\n\twhile (x0 < x1) {\n\t\tspanBuffer[x0] = pixelValue32;\n\t\t++x0;\n\t}\n}\n\n\n/*\tThis is the inner loop for solid color fills with anti-aliasing.\n\tThis loop has been unrolled for speed and quality into three parts:\n\t\ta) copy all pixels that fall into the first full pixel.\n\t\tb) copy aaLevel pixels between the first and the last full pixel\n\t\tc) copy all pixels that fall in the last full pixel */\n\nfunction fillColorSpanAAx0x1(pixelValue32, leftX, rightX) {\n\tvar aaLevel;\n\tvar baseShift;\n\tvar colorMask;\n\tvar firstPixel;\n\tvar idx;\n\tvar lastPixel;\n\tvar pv32;\n\tvar x;\n\n\n\t/* Not now -- maybe later */\n\t/* Compute the pixel boundaries. */\n\n\tfirstPixel = aaFirstPixelFromto(leftX, rightX);\n\tlastPixel = aaLastPixelFromto(leftX, rightX);\n\taaLevel = aaLevelGet();\n\tbaseShift = aaShiftGet();\n\n\t/* Part a: Deal with the first n sub-pixels */\n\n\tx = leftX;\n\tif (x < firstPixel) {\n\t\tpv32 = SHR((pixelValue32 & aaColorMaskGet()), aaColorShiftGet());\n\t\twhile (x < firstPixel) {\n\t\t\tidx = SHR(x, baseShift);\n\t\t\tspanBuffer[idx] = (spanBuffer[idx] + pv32);\n\t\t\t++x;\n\t\t}\n\t}\n\tif (x < lastPixel) {\n\t\tcolorMask = (SHR(aaColorMaskGet(), aaShiftGet())) | 4042322160;\n\t\tpv32 = SHR((pixelValue32 & colorMask), aaShiftGet());\n\t\twhile (x < lastPixel) {\n\t\t\tidx = SHR(x, baseShift);\n\t\t\tspanBuffer[idx] = (spanBuffer[idx] + pv32);\n\t\t\tx += aaLevel;\n\t\t}\n\t}\n\tif (x < rightX) {\n\t\tpv32 = SHR((pixelValue32 & aaColorMaskGet()), aaColorShiftGet());\n\t\twhile (x < rightX) {\n\t\t\tidx = SHR(x, baseShift);\n\t\t\tspanBuffer[idx] = (spanBuffer[idx] + pv32);\n\t\t\t++x;\n\t\t}\n\t}\n}\n\nfunction fillDirectionXOf(fill) {\n\treturn objat(fill, GFDirectionX);\n}\n\nfunction fillDirectionXOfput(fill, value) {\n\treturn objatput(fill, GFDirectionX, value);\n}\n\nfunction fillDirectionYOf(fill) {\n\treturn objat(fill, GFDirectionY);\n}\n\nfunction fillDirectionYOfput(fill, value) {\n\treturn objatput(fill, GFDirectionY, value);\n}\n\nfunction fillLinearGradient() {\n\treturn fillLinearGradientfromtoat(lastExportedFillGet(), lastExportedLeftXGet(), lastExportedRightXGet(), currentYGet());\n}\n\n\n/*\tDraw a linear gradient fill. */\n\nfunction fillLinearGradientfromtoat(fill, leftX, rightX, yValue) {\n\tvar ds;\n\tvar dsX;\n\tvar ramp;\n\tvar rampIndex;\n\tvar rampSize;\n\tvar x;\n\tvar x0;\n\tvar x1;\n\n\tramp = gradientRampOf(fill);\n\trampSize = gradientRampLengthOf(fill);\n\tdsX = fillDirectionXOf(fill);\n\tds = ((leftX - fillOriginXOf(fill)) * dsX) + ((yValue - fillOriginYOf(fill)) * fillDirectionYOf(fill));\n\tx = (x0 = leftX);\n\n\t/* Note: The inner loop has been divided into three parts for speed */\n\t/* Part one: Fill everything outside the left boundary */\n\n\tx1 = rightX;\n\twhile (((((rampIndex = ds >> 16)) < 0) || (rampIndex >= rampSize)) && (x < x1)) {\n\t\t++x;\n\t\tds += dsX;\n\t}\n\tif (x > x0) {\n\t\tif (rampIndex < 0) {\n\t\t\trampIndex = 0;\n\t\t}\n\t\tif (rampIndex >= rampSize) {\n\t\t\trampIndex = rampSize - 1;\n\t\t}\n\t\tfillColorSpanfromto(ramp[rampIndex], x0, x);\n\t}\n\tif (aaLevelGet() === 1) {\n\n\t\t/* Fast version w/o anti-aliasing */\n\n\t\twhile (((((rampIndex = ds >> 16)) < rampSize) && (rampIndex >= 0)) && (x < x1)) {\n\t\t\tspanBuffer[x] = ramp[rampIndex];\n\t\t\t++x;\n\t\t\tds += dsX;\n\t\t}\n\t} else {\n\t\tx = fillLinearGradientAArampdsdsXfromto(fill, ramp, ds, dsX, x, rightX);\n\t}\n\tif (x < x1) {\n\t\tif (rampIndex < 0) {\n\t\t\trampIndex = 0;\n\t\t}\n\t\tif (rampIndex >= rampSize) {\n\t\t\trampIndex = rampSize - 1;\n\t\t}\n\t\tfillColorSpanfromto(ramp[rampIndex], x, x1);\n\t}\n}\n\n\n/*\tThis is the AA version of linear gradient filling. */\n\nfunction fillLinearGradientAArampdsdsXfromto(fill, ramp, deltaS, dsX, leftX, rightX) {\n\tvar aaLevel;\n\tvar baseShift;\n\tvar colorMask;\n\tvar colorShift;\n\tvar ds;\n\tvar firstPixel;\n\tvar idx;\n\tvar lastPixel;\n\tvar rampIndex;\n\tvar rampSize;\n\tvar rampValue;\n\tvar x;\n\n\taaLevel = aaLevelGet();\n\tbaseShift = aaShiftGet();\n\trampSize = gradientRampLengthOf(fill);\n\tds = deltaS;\n\tx = leftX;\n\trampIndex = ds >> 16;\n\tfirstPixel = aaFirstPixelFromto(leftX, rightX);\n\n\t/* Deal with the first n sub-pixels */\n\n\tlastPixel = aaLastPixelFromto(leftX, rightX);\n\tcolorMask = aaColorMaskGet();\n\tcolorShift = aaColorShiftGet();\n\twhile ((x < firstPixel) && ((rampIndex < rampSize) && (rampIndex >= 0))) {\n\t\trampValue = ramp[rampIndex];\n\n\t\t/* Copy as many pixels as possible */\n\n\t\trampValue = SHR((rampValue & colorMask), colorShift);\n\t\twhile ((x < firstPixel) && ((ds >> 16) === rampIndex)) {\n\t\t\tidx = SHR(x, baseShift);\n\t\t\tspanBuffer[idx] = (spanBuffer[idx] + rampValue);\n\t\t\t++x;\n\t\t\tds += dsX;\n\t\t}\n\t\trampIndex = ds >> 16;\n\t}\n\tcolorMask = (SHR(aaColorMaskGet(), aaShiftGet())) | 4042322160;\n\tcolorShift = aaShiftGet();\n\twhile ((x < lastPixel) && ((rampIndex < rampSize) && (rampIndex >= 0))) {\n\t\trampValue = ramp[rampIndex];\n\n\t\t/* Copy as many pixels as possible */\n\n\t\trampValue = SHR((rampValue & colorMask), colorShift);\n\t\twhile ((x < lastPixel) && ((ds >> 16) === rampIndex)) {\n\t\t\tidx = SHR(x, baseShift);\n\t\t\tspanBuffer[idx] = (spanBuffer[idx] + rampValue);\n\t\t\tx += aaLevel;\n\t\t\tds += SHL(dsX, colorShift);\n\t\t}\n\t\trampIndex = ds >> 16;\n\t}\n\tcolorMask = aaColorMaskGet();\n\tcolorShift = aaColorShiftGet();\n\twhile ((x < rightX) && ((rampIndex < rampSize) && (rampIndex >= 0))) {\n\t\trampValue = ramp[rampIndex];\n\n\t\t/* Copy as many pixels as possible */\n\n\t\trampValue = SHR((rampValue & colorMask), colorShift);\n\t\twhile ((x < rightX) && ((ds >> 16) === rampIndex)) {\n\t\t\tidx = SHR(x, baseShift);\n\t\t\tspanBuffer[idx] = (spanBuffer[idx] + rampValue);\n\t\t\t++x;\n\t\t\tds += dsX;\n\t\t}\n\t\trampIndex = ds >> 16;\n\t}\n\treturn x;\n}\n\nfunction fillMaxXGet() {\n\treturn workBuffer[GWFillMaxX];\n}\n\nfunction fillMaxXPut(value) {\n\treturn workBuffer[GWFillMaxX] = value;\n}\n\nfunction fillMaxYGet() {\n\treturn workBuffer[GWFillMaxY];\n}\n\nfunction fillMaxYPut(value) {\n\treturn workBuffer[GWFillMaxY] = value;\n}\n\nfunction fillMinXGet() {\n\treturn workBuffer[GWFillMinX];\n}\n\nfunction fillMinXPut(value) {\n\treturn workBuffer[GWFillMinX] = value;\n}\n\nfunction fillMinYGet() {\n\treturn workBuffer[GWFillMinY];\n}\n\nfunction fillMinYPut(value) {\n\treturn workBuffer[GWFillMinY] = value;\n}\n\nfunction fillNormalXOf(fill) {\n\treturn objat(fill, GFNormalX);\n}\n\nfunction fillNormalXOfput(fill, value) {\n\treturn objatput(fill, GFNormalX, value);\n}\n\nfunction fillNormalYOf(fill) {\n\treturn objat(fill, GFNormalY);\n}\n\nfunction fillNormalYOfput(fill, value) {\n\treturn objatput(fill, GFNormalY, value);\n}\n\nfunction fillOriginXOf(fill) {\n\treturn objat(fill, GFOriginX);\n}\n\nfunction fillOriginXOfput(fill, value) {\n\treturn objatput(fill, GFOriginX, value);\n}\n\nfunction fillOriginYOf(fill) {\n\treturn objat(fill, GFOriginY);\n}\n\nfunction fillOriginYOfput(fill, value) {\n\treturn objatput(fill, GFOriginY, value);\n}\n\n\n/*\tPart 2a) Compute the decreasing part of the ramp */\n\nfunction fillRadialDecreasingrampdeltaSTdsXdtXfromto(fill, ramp, deltaST, dsX, dtX, leftX, rightX) {\n\tvar ds;\n\tvar dt;\n\tvar length2;\n\tvar nextLength;\n\tvar rampIndex;\n\tvar rampValue;\n\tvar x;\n\tvar x1;\n\n\tds = (deltaST[0]|0);\n\tdt = (deltaST[1]|0);\n\trampIndex = accurateLengthOfwith(ds >> 16, dt >> 16);\n\trampValue = ramp[rampIndex];\n\tlength2 = (rampIndex - 1) * (rampIndex - 1);\n\tx = leftX;\n\tx1 = rightX;\n\tif (x1 > fillOriginXOf(fill)) {\n\t\tx1 = fillOriginXOf(fill);\n\t}\n\twhile (x < x1) {\n\n\t\t/* Try to copy the current value more than just once */\n\n\t\twhile ((x < x1) && (squaredLengthOfwith(ds >> 16, dt >> 16) >= length2)) {\n\t\t\tspanBuffer[x] = rampValue;\n\t\t\t++x;\n\t\t\tds += dsX;\n\t\t\tdt += dtX;\n\t\t}\n\t\tnextLength = squaredLengthOfwith(ds >> 16, dt >> 16);\n\t\twhile (nextLength < length2) {\n\t\t\t--rampIndex;\n\t\t\trampValue = ramp[rampIndex];\n\t\t\tlength2 = (rampIndex - 1) * (rampIndex - 1);\n\t\t}\n\t}\n\tdeltaST[0] = ds;\n\tdeltaST[1] = dt;\n\treturn x;\n}\n\n\n/*\tPart 2a) Compute the decreasing part of the ramp */\n\nfunction fillRadialDecreasingAArampdeltaSTdsXdtXfromto(fill, ramp, deltaST, dsX, dtX, leftX, rightX) {\n\tvar aaLevel;\n\tvar baseShift;\n\tvar colorMask;\n\tvar colorShift;\n\tvar ds;\n\tvar dt;\n\tvar firstPixel;\n\tvar index;\n\tvar lastPixel;\n\tvar length2;\n\tvar nextLength;\n\tvar rampIndex;\n\tvar rampValue;\n\tvar x;\n\tvar x1;\n\n\tds = (deltaST[0]|0);\n\tdt = (deltaST[1]|0);\n\taaLevel = aaLevelGet();\n\tbaseShift = aaShiftGet();\n\trampIndex = accurateLengthOfwith(ds >> 16, dt >> 16);\n\tlength2 = (rampIndex - 1) * (rampIndex - 1);\n\tx = leftX;\n\tx1 = fillOriginXOf(fill);\n\tif (x1 > rightX) {\n\t\tx1 = rightX;\n\t}\n\tfirstPixel = aaFirstPixelFromto(leftX, x1);\n\n\t/* Deal with the first n sub-pixels */\n\n\tlastPixel = aaLastPixelFromto(leftX, x1);\n\tif (x < firstPixel) {\n\t\tcolorMask = aaColorMaskGet();\n\t\tcolorShift = aaColorShiftGet();\n\t\trampValue = ramp[rampIndex];\n\t\trampValue = SHR((rampValue & colorMask), colorShift);\n\t\twhile (x < firstPixel) {\n\n\t\t\t/* Try to copy the current value more than just once */\n\n\t\t\twhile ((x < firstPixel) && (squaredLengthOfwith(ds >> 16, dt >> 16) >= length2)) {\n\t\t\t\tindex = SHR(x, baseShift);\n\t\t\t\tspanBuffer[index] = (spanBuffer[index] + rampValue);\n\t\t\t\t++x;\n\t\t\t\tds += dsX;\n\t\t\t\tdt += dtX;\n\t\t\t}\n\t\t\tnextLength = squaredLengthOfwith(ds >> 16, dt >> 16);\n\t\t\twhile (nextLength < length2) {\n\t\t\t\t--rampIndex;\n\t\t\t\trampValue = ramp[rampIndex];\n\t\t\t\trampValue = SHR((rampValue & colorMask), colorShift);\n\t\t\t\tlength2 = (rampIndex - 1) * (rampIndex - 1);\n\t\t\t}\n\t\t}\n\t}\n\tif (x < lastPixel) {\n\t\tcolorMask = (SHR(aaColorMaskGet(), aaShiftGet())) | 4042322160;\n\t\tcolorShift = aaShiftGet();\n\t\trampValue = ramp[rampIndex];\n\t\trampValue = SHR((rampValue & colorMask), colorShift);\n\t\twhile (x < lastPixel) {\n\n\t\t\t/* Try to copy the current value more than just once */\n\n\t\t\twhile ((x < lastPixel) && (squaredLengthOfwith(ds >> 16, dt >> 16) >= length2)) {\n\t\t\t\tindex = SHR(x, baseShift);\n\t\t\t\tspanBuffer[index] = (spanBuffer[index] + rampValue);\n\t\t\t\tx += aaLevel;\n\t\t\t\tds += SHL(dsX, colorShift);\n\t\t\t\tdt += SHL(dtX, colorShift);\n\t\t\t}\n\t\t\tnextLength = squaredLengthOfwith(ds >> 16, dt >> 16);\n\t\t\twhile (nextLength < length2) {\n\t\t\t\t--rampIndex;\n\t\t\t\trampValue = ramp[rampIndex];\n\t\t\t\trampValue = SHR((rampValue & colorMask), colorShift);\n\t\t\t\tlength2 = (rampIndex - 1) * (rampIndex - 1);\n\t\t\t}\n\t\t}\n\t}\n\tif (x < x1) {\n\t\tcolorMask = aaColorMaskGet();\n\t\tcolorShift = aaColorShiftGet();\n\t\trampValue = ramp[rampIndex];\n\t\trampValue = SHR((rampValue & colorMask), colorShift);\n\t\twhile (x < x1) {\n\n\t\t\t/* Try to copy the current value more than just once */\n\n\t\t\twhile ((x < x1) && (squaredLengthOfwith(ds >> 16, dt >> 16) >= length2)) {\n\t\t\t\tindex = SHR(x, baseShift);\n\t\t\t\tspanBuffer[index] = (spanBuffer[index] + rampValue);\n\t\t\t\t++x;\n\t\t\t\tds += dsX;\n\t\t\t\tdt += dtX;\n\t\t\t}\n\t\t\tnextLength = squaredLengthOfwith(ds >> 16, dt >> 16);\n\t\t\twhile (nextLength < length2) {\n\t\t\t\t--rampIndex;\n\t\t\t\trampValue = ramp[rampIndex];\n\t\t\t\trampValue = SHR((rampValue & colorMask), colorShift);\n\t\t\t\tlength2 = (rampIndex - 1) * (rampIndex - 1);\n\t\t\t}\n\t\t}\n\t}\n\tdeltaST[0] = ds;\n\tdeltaST[1] = dt;\n\treturn x;\n}\n\nfunction fillRadialGradient() {\n\treturn fillRadialGradientfromtoat(lastExportedFillGet(), lastExportedLeftXGet(), lastExportedRightXGet(), currentYGet());\n}\n\n\n/*\tDraw a radial gradient fill. */\n\nfunction fillRadialGradientfromtoat(fill, leftX, rightX, yValue) {\n\tvar deltaST;\n\tvar deltaX;\n\tvar deltaY;\n\tvar ds;\n\tvar dsX;\n\tvar dt;\n\tvar dtX;\n\tvar length2;\n\tvar ramp;\n\tvar rampSize;\n\tvar x;\n\tvar x1;\n\n\tramp = gradientRampOf(fill);\n\trampSize = gradientRampLengthOf(fill);\n\tdeltaX = leftX - fillOriginXOf(fill);\n\tdeltaY = yValue - fillOriginYOf(fill);\n\tdsX = fillDirectionXOf(fill);\n\tdtX = fillNormalXOf(fill);\n\tds = (deltaX * dsX) + (deltaY * fillDirectionYOf(fill));\n\tdt = (deltaX * dtX) + (deltaY * fillNormalYOf(fill));\n\tx = leftX;\n\n\t/* Note: The inner loop has been divided into three parts for speed */\n\t/* Part one: Fill everything outside the left boundary */\n\n\tx1 = rightX;\n\n\t/* This is the upper bound */\n\n\tlength2 = (rampSize - 1) * (rampSize - 1);\n\twhile ((squaredLengthOfwith(ds >> 16, dt >> 16) >= length2) && (x < x1)) {\n\t\t++x;\n\t\tds += dsX;\n\t\tdt += dtX;\n\t}\n\tif (x > leftX) {\n\t\tfillColorSpanfromto(ramp[rampSize - 1], leftX, x);\n\t}\n\tdeltaST = point1Get();\n\tdeltaST[0] = ds;\n\tdeltaST[1] = dt;\n\tif (x < fillOriginXOf(fill)) {\n\n\t\t/* Draw the decreasing part */\n\n\t\tif (aaLevelGet() === 1) {\n\t\t\tx = fillRadialDecreasingrampdeltaSTdsXdtXfromto(fill, ramp, deltaST, dsX, dtX, x, x1);\n\t\t} else {\n\t\t\tx = fillRadialDecreasingAArampdeltaSTdsXdtXfromto(fill, ramp, deltaST, dsX, dtX, x, x1);\n\t\t}\n\t}\n\tif (x < x1) {\n\n\t\t/* Draw the increasing part */\n\n\t\tif (aaLevelGet() === 1) {\n\t\t\tx = fillRadialIncreasingrampdeltaSTdsXdtXfromto(fill, ramp, deltaST, dsX, dtX, x, x1);\n\t\t} else {\n\t\t\tx = fillRadialIncreasingAArampdeltaSTdsXdtXfromto(fill, ramp, deltaST, dsX, dtX, x, x1);\n\t\t}\n\t}\n\tif (x < rightX) {\n\t\tfillColorSpanfromto(ramp[rampSize - 1], x, rightX);\n\t}\n}\n\n\n/*\tPart 2b) Compute the increasing part of the ramp */\n\nfunction fillRadialIncreasingrampdeltaSTdsXdtXfromto(fill, ramp, deltaST, dsX, dtX, leftX, rightX) {\n\tvar ds;\n\tvar dt;\n\tvar lastLength;\n\tvar length2;\n\tvar nextLength;\n\tvar rampIndex;\n\tvar rampSize;\n\tvar rampValue;\n\tvar x;\n\tvar x1;\n\n\tds = (deltaST[0]|0);\n\tdt = (deltaST[1]|0);\n\trampIndex = accurateLengthOfwith(ds >> 16, dt >> 16);\n\trampValue = ramp[rampIndex];\n\trampSize = gradientRampLengthOf(fill);\n\n\t/* This is the upper bound */\n\n\tlength2 = (rampSize - 1) * (rampSize - 1);\n\tnextLength = (rampIndex + 1) * (rampIndex + 1);\n\tlastLength = squaredLengthOfwith(ds >> 16, dt >> 16);\n\tx = leftX;\n\tx1 = rightX;\n\twhile ((x < x1) && (lastLength < length2)) {\n\n\t\t/* Try to copy the current value more than once */\n\n\t\twhile ((x < x1) && (squaredLengthOfwith(ds >> 16, dt >> 16) <= nextLength)) {\n\t\t\tspanBuffer[x] = rampValue;\n\t\t\t++x;\n\t\t\tds += dsX;\n\t\t\tdt += dtX;\n\t\t}\n\t\tlastLength = squaredLengthOfwith(ds >> 16, dt >> 16);\n\t\twhile (lastLength > nextLength) {\n\t\t\t++rampIndex;\n\t\t\trampValue = ramp[rampIndex];\n\t\t\tnextLength = (rampIndex + 1) * (rampIndex + 1);\n\t\t}\n\t}\n\tdeltaST[0] = ds;\n\tdeltaST[1] = dt;\n\treturn x;\n}\n\n\n/*\tPart 2b) Compute the increasing part of the ramp */\n\nfunction fillRadialIncreasingAArampdeltaSTdsXdtXfromto(fill, ramp, deltaST, dsX, dtX, leftX, rightX) {\n\tvar aaLevel;\n\tvar baseShift;\n\tvar colorMask;\n\tvar colorShift;\n\tvar ds;\n\tvar dt;\n\tvar firstPixel;\n\tvar index;\n\tvar lastLength;\n\tvar lastPixel;\n\tvar length2;\n\tvar nextLength;\n\tvar rampIndex;\n\tvar rampSize;\n\tvar rampValue;\n\tvar x;\n\n\tds = (deltaST[0]|0);\n\tdt = (deltaST[1]|0);\n\taaLevel = aaLevelGet();\n\tbaseShift = aaShiftGet();\n\trampIndex = accurateLengthOfwith(ds >> 16, dt >> 16);\n\trampSize = gradientRampLengthOf(fill);\n\n\t/* This is the upper bound */\n\n\tlength2 = (rampSize - 1) * (rampSize - 1);\n\tnextLength = (rampIndex + 1) * (rampIndex + 1);\n\tlastLength = squaredLengthOfwith(ds >> 16, dt >> 16);\n\tx = leftX;\n\tfirstPixel = aaFirstPixelFromto(leftX, rightX);\n\n\t/* Deal with the first n subPixels */\n\n\tlastPixel = aaLastPixelFromto(leftX, rightX);\n\tif ((x < firstPixel) && (lastLength < length2)) {\n\t\tcolorMask = aaColorMaskGet();\n\t\tcolorShift = aaColorShiftGet();\n\t\trampValue = ramp[rampIndex];\n\t\trampValue = SHR((rampValue & colorMask), colorShift);\n\t\twhile ((x < firstPixel) && (lastLength < length2)) {\n\n\t\t\t/* Try to copy the current value more than once */\n\n\t\t\twhile ((x < firstPixel) && (squaredLengthOfwith(ds >> 16, dt >> 16) <= nextLength)) {\n\t\t\t\tindex = SHR(x, baseShift);\n\t\t\t\tspanBuffer[index] = (spanBuffer[index] + rampValue);\n\t\t\t\t++x;\n\t\t\t\tds += dsX;\n\t\t\t\tdt += dtX;\n\t\t\t}\n\t\t\tlastLength = squaredLengthOfwith(ds >> 16, dt >> 16);\n\t\t\twhile (lastLength > nextLength) {\n\t\t\t\t++rampIndex;\n\t\t\t\trampValue = ramp[rampIndex];\n\t\t\t\trampValue = SHR((rampValue & colorMask), colorShift);\n\t\t\t\tnextLength = (rampIndex + 1) * (rampIndex + 1);\n\t\t\t}\n\t\t}\n\t}\n\tif ((x < lastPixel) && (lastLength < length2)) {\n\t\tcolorMask = (SHR(aaColorMaskGet(), aaShiftGet())) | 4042322160;\n\t\tcolorShift = aaShiftGet();\n\t\trampValue = ramp[rampIndex];\n\t\trampValue = SHR((rampValue & colorMask), colorShift);\n\t\twhile ((x < lastPixel) && (lastLength < length2)) {\n\n\t\t\t/* Try to copy the current value more than once */\n\n\t\t\twhile ((x < lastPixel) && (squaredLengthOfwith(ds >> 16, dt >> 16) <= nextLength)) {\n\t\t\t\tindex = SHR(x, baseShift);\n\t\t\t\tspanBuffer[index] = (spanBuffer[index] + rampValue);\n\t\t\t\tx += aaLevel;\n\t\t\t\tds += SHL(dsX, colorShift);\n\t\t\t\tdt += SHL(dtX, colorShift);\n\t\t\t}\n\t\t\tlastLength = squaredLengthOfwith(ds >> 16, dt >> 16);\n\t\t\twhile (lastLength > nextLength) {\n\t\t\t\t++rampIndex;\n\t\t\t\trampValue = ramp[rampIndex];\n\t\t\t\trampValue = SHR((rampValue & colorMask), colorShift);\n\t\t\t\tnextLength = (rampIndex + 1) * (rampIndex + 1);\n\t\t\t}\n\t\t}\n\t}\n\tif ((x < rightX) && (lastLength < length2)) {\n\t\tcolorMask = aaColorMaskGet();\n\t\tcolorShift = aaColorShiftGet();\n\t\trampValue = ramp[rampIndex];\n\t\trampValue = SHR((rampValue & colorMask), colorShift);\n\t\twhile ((x < rightX) && (lastLength < length2)) {\n\n\t\t\t/* Try to copy the current value more than once */\n\n\t\t\twhile ((x < rightX) && (squaredLengthOfwith(ds >> 16, dt >> 16) <= nextLength)) {\n\t\t\t\tindex = SHR(x, baseShift);\n\t\t\t\tspanBuffer[index] = (spanBuffer[index] + rampValue);\n\t\t\t\t++x;\n\t\t\t\tds += dsX;\n\t\t\t\tdt += dtX;\n\t\t\t}\n\t\t\tlastLength = squaredLengthOfwith(ds >> 16, dt >> 16);\n\t\t\twhile (lastLength > nextLength) {\n\t\t\t\t++rampIndex;\n\t\t\t\trampValue = ramp[rampIndex];\n\t\t\t\trampValue = SHR((rampValue & colorMask), colorShift);\n\t\t\t\tnextLength = (rampIndex + 1) * (rampIndex + 1);\n\t\t\t}\n\t\t}\n\t}\n\tdeltaST[0] = ds;\n\tdeltaST[1] = dt;\n\treturn x;\n}\n\n\n/*\tReturn true if fillEntry1 should be drawn before fillEntry2 */\n\nfunction fillSortsbefore(fillEntry1, fillEntry2) {\n\tvar diff;\n\n\n\t/* First check the depth value */\n\n\tdiff = stackFillDepth(fillEntry1) - stackFillDepth(fillEntry2);\n\tif (diff !== 0) {\n\t\treturn diff > 0;\n\t}\n\treturn (stackFillValue(fillEntry1)>>>0) < (stackFillValue(fillEntry2)>>>0);\n}\n\n\n/*\tFill the span buffer from leftX to rightX with the given fill.\n\tClip before performing any operations. Return true if the fill must\n\tbe handled by some Smalltalk code. */\n\nfunction fillSpanfromto(fill, leftX, rightX) {\n\tvar type;\n\tvar x0;\n\tvar x1;\n\n\tif (fill === 0) {\n\t\treturn false;\n\t}\n\tif (leftX < spanEndAAGet()) {\n\t\tx0 = spanEndAAGet();\n\t} else {\n\t\tx0 = leftX;\n\t}\n\tif (rightX > (SHL(spanSizeGet(), aaShiftGet()))) {\n\t\tx1 = SHL(spanSizeGet(), aaShiftGet());\n\t} else {\n\t\tx1 = rightX;\n\t}\n\tif (x0 < fillMinXGet()) {\n\t\tx0 = fillMinXGet();\n\t}\n\tif (x1 > fillMaxXGet()) {\n\t\tx1 = fillMaxXGet();\n\t}\n\tif (x0 < spanStartGet()) {\n\t\tspanStartPut(x0);\n\t}\n\tif (x1 > spanEndGet()) {\n\t\tspanEndPut(x1);\n\t}\n\tif (x1 > spanEndAAGet()) {\n\t\tspanEndAAPut(x1);\n\t}\n\tif (x0 >= x1) {\n\t\treturn false;\n\t}\n\tif (isFillColor(fill)) {\n\t\tfillColorSpanfromto(fill, x0, x1);\n\t} else {\n\n\t\t/* Store the values for the dispatch */\n\n\t\tlastExportedFillPut(fill);\n\t\tlastExportedLeftXPut(x0);\n\t\tlastExportedRightXPut(x1);\n\t\ttype = fillTypeOf(fill);\n\t\tif (type <= 1) {\n\t\t\treturn true;\n\t\t}\n\t\tswitch (type) {\n\t\tcase 0:\n\t\tcase 1:\n\t\t\terrorWrongIndex();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tfillLinearGradient();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tfillRadialGradient();\n\t\t\tbreak;\n\t\tcase 4:\n\t\tcase 5:\n\t\t\tfillBitmapSpan();\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction fillTypeOf(fill) {\n\treturn (objectTypeOf(fill) & GEPrimitiveFillMask) >>> 8;\n}\n\n\n/*\tCheck the global edge table for any entries that cannot be handled by the engine itself.\n\tIf there are any, return true. Otherwise, initialize the the edge and add it to the AET */\n\nfunction findNextExternalEntryFromGET() {\n\tvar edge;\n\tvar type;\n\tvar yValue;\n\n\n\t/* As long as we have entries in the GET */\n\n\tyValue = currentYGet();\n\twhile (getStartGet() < getUsedGet()) {\n\t\tedge = getBuffer[getStartGet()];\n\t\tif (edgeYValueOf(edge) > yValue) {\n\t\t\treturn false;\n\t\t}\n\t\ttype = objectTypeOf(edge);\n\t\tif ((type & GEPrimitiveWideMask) === GEPrimitiveEdge) {\n\t\t\treturn true;\n\t\t}\n\t\tif (!needAvailableSpace(1)) {\n\t\t\treturn false;\n\t\t}\n\t\tswitch (type) {\n\t\tcase 0:\n\t\tcase 1:\n\t\tcase 2:\n\t\tcase 3:\n\t\t\terrorWrongIndex();\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tstepToFirstLine();\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tstepToFirstWideLine();\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tstepToFirstBezier();\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tstepToFirstWideBezier();\n\t\t\tbreak;\n\t\t}\n\t\tinsertEdgeIntoAET(edge);\n\t\tgetStartPut(getStartGet() + 1);\n\t}\n\treturn false;\n}\n\n\n/*\tScan the active edge table. If there is any fill that cannot be handled by the engine itself, return true. Otherwise handle the fills and return false. */\n/*\tself currentYGet >= 680 ifTrue:[\nself printAET.\nself halt.\n]. */\n\nfunction findNextExternalFillFromAET() {\n\tvar leftEdge;\n\tvar leftX;\n\tvar rightEdge;\n\tvar rightX;\n\n\tleftX = (rightX = fillMaxXGet());\n\twhile (aetStartGet() < aetUsedGet()) {\n\n\t\t/* TODO: We should check if leftX from last operation \n\t\t\tis greater than leftX from next edge.\n\t\t\tCurrently, we rely here on spanEndAA\n\t\t\tfrom the span buffer fill. */\n\n\t\tleftEdge = (rightEdge = aetBuffer[aetStartGet()]);\n\t\tleftX = (rightX = edgeXValueOf(leftEdge));\n\t\tif (leftX >= fillMaxXGet()) {\n\t\t\treturn false;\n\t\t}\n\t\tquickRemoveInvalidFillsAt(leftX);\n\t\tif (isWide(leftEdge)) {\n\t\t\ttoggleWideFillOf(leftEdge);\n\t\t}\n\t\tif (areEdgeFillsValid(leftEdge)) {\n\t\t\ttoggleFillsOf(leftEdge);\n\t\t\tif (engineStopped) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\taetStartPut(aetStartGet() + 1);\n\t\tif (aetStartGet() < aetUsedGet()) {\n\t\t\trightEdge = aetBuffer[aetStartGet()];\n\t\t\trightX = edgeXValueOf(rightEdge);\n\t\t\tif (rightX >= fillMinXGet()) {\n\n\t\t\t\t/* This is the visible portion */\n\n\t\t\t\tfillAllFromto(leftX, rightX);\n\t\t\t}\n\t\t}\n\t}\n\tif (rightX < fillMaxXGet()) {\n\t\tfillAllFromto(rightX, fillMaxXGet());\n\t}\n\treturn false;\n}\n\n\n/*\tCheck the active edge table for any entries that cannot be handled by the engine itself.\n\tIf there are any, return true. Otherwise, step the the edge to the next y value. */\n\nfunction findNextExternalUpdateFromAET() {\n\tvar count;\n\tvar edge;\n\tvar type;\n\n\twhile (aetStartGet() < aetUsedGet()) {\n\t\tedge = aetBuffer[aetStartGet()];\n\t\tcount = edgeNumLinesOf(edge) - 1;\n\t\tif (count === 0) {\n\n\t\t\t/* Edge at end -- remove it */\n\n\t\t\tremoveFirstAETEntry();\n\t\t} else {\n\n\t\t\t/* Store remaining lines back */\n\n\t\t\tedgeNumLinesOfput(edge, count);\n\t\t\ttype = objectTypeOf(edge);\n\t\t\tif ((type & GEPrimitiveWideMask) === GEPrimitiveEdge) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tswitch (type) {\n\t\t\tcase 0:\n\t\t\tcase 1:\n\t\t\tcase 2:\n\t\t\tcase 3:\n\t\t\t\terrorWrongIndex();\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tstepToNextLine();\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tstepToNextWideLine();\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tstepToNextBezier();\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tstepToNextWideBezier();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tresortFirstAETEntry();\n\t\t\taetStartPut(aetStartGet() + 1);\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction findStackFilldepth(fillIndex, depth) {\n\tvar index;\n\n\tindex = 0;\n\twhile ((index < stackFillSize()) && ((stackFillValue(index) !== fillIndex) || (stackFillDepth(index) !== depth))) {\n\t\tindex += stackFillEntryLength();\n\t}\n\tif (index >= stackFillSize()) {\n\t\treturn -1;\n\t} else {\n\t\treturn index;\n\t}\n}\n\n\n/*\tReturn true if processing is finished */\n\nfunction finishedProcessing() {\n\treturn stateGet() === GEStateCompleted;\n}\n\nfunction freeStackFillEntry() {\n\twbStackPop(stackFillEntryLength());\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nfunction getModuleName() {\n\treturn moduleName;\n}\n\n\n/*\tReturn true if the edge at index i should sort before the edge at index j. */\n\nfunction getSortsbefore(edge1, edge2) {\n\tvar diff;\n\n\tif (edge1 === edge2) {\n\t\treturn true;\n\t}\n\tdiff = edgeYValueOf(edge1) - edgeYValueOf(edge2);\n\tif (diff !== 0) {\n\t\treturn diff < 0;\n\t}\n\tdiff = edgeXValueOf(edge1) - edgeXValueOf(edge2);\n\treturn diff < 0;\n}\n\nfunction getStartGet() {\n\treturn workBuffer[GWGETStart];\n}\n\nfunction getStartPut(value) {\n\treturn workBuffer[GWGETStart] = value;\n}\n\nfunction getUsedGet() {\n\treturn workBuffer[GWGETUsed];\n}\n\nfunction getUsedPut(value) {\n\treturn workBuffer[GWGETUsed] = value;\n}\n\nfunction gradientRampLengthOf(fill) {\n\treturn objat(fill, GFRampLength);\n}\n\nfunction gradientRampLengthOfput(fill, value) {\n\treturn objatput(fill, GFRampLength, value);\n}\n\nfunction gradientRampOf(fill) {\n\treturn PTR_ADD(objBuffer, fill + GFRampOffset);\n}\n\nfunction halt() {\n\t;\n}\n\nfunction hasColorTransform() {\n\treturn hasColorTransformGet() !== 0;\n}\n\nfunction hasColorTransformGet() {\n\treturn workBuffer[GWHasColorTransform];\n}\n\nfunction hasColorTransformPut(value) {\n\treturn workBuffer[GWHasColorTransform] = value;\n}\n\nfunction hasEdgeTransform() {\n\treturn hasEdgeTransformGet() !== 0;\n}\n\nfunction hasEdgeTransformGet() {\n\treturn workBuffer[GWHasEdgeTransform];\n}\n\nfunction hasEdgeTransformPut(value) {\n\treturn workBuffer[GWHasEdgeTransform] = value;\n}\n\n\n/*\tMake the fill style with the given index invisible */\n\nfunction hideFilldepth(fillIndex, depth) {\n\tvar index;\n\tvar newDepth;\n\tvar newRightX;\n\tvar newTop;\n\tvar newTopIndex;\n\n\tindex = findStackFilldepth(fillIndex, depth);\n\tif (index === -1) {\n\t\treturn false;\n\t}\n\tif (index === 0) {\n\t\tfreeStackFillEntry();\n\t\treturn true;\n\t}\n\tstackFillValueput(index, stackFillValue(0));\n\tstackFillDepthput(index, stackFillDepth(0));\n\tstackFillRightXput(index, stackFillRightX(0));\n\tfreeStackFillEntry();\n\tif (stackFillSize() <= stackFillEntryLength()) {\n\t\treturn true;\n\t}\n\tnewTopIndex = 0;\n\tindex = stackFillEntryLength();\n\twhile (index < stackFillSize()) {\n\t\tif (fillSortsbefore(index, newTopIndex)) {\n\t\t\tnewTopIndex = index;\n\t\t}\n\t\tindex += stackFillEntryLength();\n\t}\n\tif ((newTopIndex + stackFillEntryLength()) === stackFillSize()) {\n\t\treturn true;\n\t}\n\tnewTop = stackFillValue(newTopIndex);\n\tstackFillValueput(newTopIndex, topFillValue());\n\ttopFillValuePut(newTop);\n\tnewDepth = stackFillDepth(newTopIndex);\n\tstackFillDepthput(newTopIndex, topFillDepth());\n\ttopFillDepthPut(newDepth);\n\tnewRightX = stackFillRightX(newTopIndex);\n\tstackFillRightXput(newTopIndex, topFillRightX());\n\ttopFillRightXPut(newRightX);\n\treturn true;\n}\n\nfunction incrementStatby(statIndex, value) {\n\treturn workBuffer[statIndex] = (workBuffer[statIndex] + value);\n}\n\n\n/*\tFind insertion point for the given edge in the AET */\n\nfunction indexForInsertingIntoAET(edge) {\n\tvar index;\n\tvar initialX;\n\n\tinitialX = edgeXValueOf(edge);\n\tindex = 0;\n\twhile ((index < aetUsedGet()) && (edgeXValueOf(aetBuffer[index]) < initialX)) {\n\t\t++index;\n\t}\n\twhile ((index < aetUsedGet()) && ((edgeXValueOf(aetBuffer[index]) === initialX) && (getSortsbefore(aetBuffer[index], edge)))) {\n\t\t++index;\n\t}\n\treturn index;\n}\n\nfunction initColorTransform() {\n\tvar transform;\n\n\ttransform = colorTransform();\n\ttransform[0] = 1.0;\n\ttransform[1] = 0.0;\n\ttransform[2] = 1.0;\n\ttransform[3] = 0.0;\n\ttransform[4] = 1.0;\n\ttransform[5] = 0.0;\n\ttransform[6] = 1.0;\n\ttransform[7] = 0.0;\n\thasColorTransformPut(0);\n}\n\nfunction initEdgeTransform() {\n\tvar transform;\n\n\ttransform = edgeTransform();\n\ttransform[0] = 1.0;\n\ttransform[1] = 0.0;\n\ttransform[2] = 0.0;\n\ttransform[3] = 0.0;\n\ttransform[4] = 1.0;\n\ttransform[5] = 0.0;\n\thasEdgeTransformPut(0);\n}\n\nfunction initialiseModule() {\n\tloadBBFn = interpreterProxy.ioLoadFunctionFrom(\"loadBitBltFrom\", bbPluginName);\n\tcopyBitsFn = interpreterProxy.ioLoadFunctionFrom(\"copyBitsFromtoat\", bbPluginName);\n\treturn (!!loadBBFn) && (!!copyBitsFn);\n}\n\n\n/*\tInitialization stuff that needs to be done before any processing can take place. */\n/*\tMake sure aaLevel is initialized */\n\nfunction initializeGETProcessing() {\n\tsetAALevel(aaLevelGet());\n\tif (clipMinXGet() < 0) {\n\t\tclipMinXPut(0);\n\t}\n\tif (clipMaxXGet() > spanSizeGet()) {\n\t\tclipMaxXPut(spanSizeGet());\n\t}\n\tfillMinXPut(SHL(clipMinXGet(), aaShiftGet()));\n\tfillMinYPut(SHL(clipMinYGet(), aaShiftGet()));\n\tfillMaxXPut(SHL(clipMaxXGet(), aaShiftGet()));\n\tfillMaxYPut(SHL(clipMaxYGet(), aaShiftGet()));\n\tgetUsedPut(0);\n\taetUsedPut(0);\n\tgetBuffer = PTR_ADD(objBuffer, objUsed);\n\n\t/* Create the global edge table */\n\n\taetBuffer = PTR_ADD(objBuffer, objUsed);\n\tcreateGlobalEdgeTable();\n\tif (engineStopped) {\n\t\treturn null;\n\t}\n\tif (getUsedGet() === 0) {\n\n\t\t/* Nothing to do */\n\n\t\tcurrentYPut(fillMaxYGet());\n\t\treturn 0;\n\t}\n\tsortGlobalEdgeTable();\n\tcurrentYPut(edgeYValueOf(getBuffer[0]));\n\tif (currentYGet() < fillMinYGet()) {\n\t\tcurrentYPut(fillMinYGet());\n\t}\n\tspanStartPut(0);\n\tspanEndPut((SHL(spanSizeGet(), aaShiftGet())) - 1);\n\tclearSpanBuffer();\n}\n\n\n/*\tInsert the edge with the given index from the global edge table into the active edge table.\n\tThe edge has already been stepped to the initial yValue -- thus remainingLines and rasterX\n\tare both set. */\n\nfunction insertEdgeIntoAET(edge) {\n\tvar index;\n\n\n\t/* Check for the number of lines remaining */\n\n\tif (edgeNumLinesOf(edge) <= 0) {\n\t\treturn null;\n\t}\n\n\t/* And insert edge */\n\n\tindex = indexForInsertingIntoAET(edge);\n\tinsertToAETbeforeIndex(edge, index);\n}\n\n\n/*\tInsert the given edge into the AET. */\n\nfunction insertToAETbeforeIndex(edge, index) {\n\tvar i;\n\n\n\t/* Make sure we have space in the AET */\n\n\tif (!allocateAETEntry(1)) {\n\t\treturn null;\n\t}\n\ti = aetUsedGet() - 1;\n\twhile (!(i < index)) {\n\t\taetBuffer[i + 1] = aetBuffer[i];\n\t\t--i;\n\t}\n\taetBuffer[index] = edge;\n\taetUsedPut(aetUsedGet() + 1);\n}\n\nfunction isBezier(bezier) {\n\treturn (objectTypeOf(bezier) & GEPrimitiveWideMask) === GEPrimitiveBezier;\n}\n\nfunction isEdge(edge) {\n\tvar type;\n\n\ttype = objectTypeOf(edge);\n\tif (type > GEPrimitiveEdgeMask) {\n\t\treturn false;\n\t}\n\treturn (objectTypeOf(edge) & GEPrimitiveEdgeMask) !== 0;\n}\n\nfunction isFill(fill) {\n\treturn isFillColor(fill) || (isRealFill(fill));\n}\n\nfunction isFillColor(fill) {\n\treturn (fill & 4278190080) !== 0;\n}\n\nfunction isFillOkay(fill) {\n\treturn (fill === 0) || (isFillColor(fill) || (isObject(fill) && (isFill(fill))));\n}\n\nfunction isLine(line) {\n\treturn (objectTypeOf(line) & GEPrimitiveWideMask) === GEPrimitiveLine;\n}\n\nfunction isObject(obj) {\n\treturn (obj >= 0) && (obj < objUsed);\n}\n\nfunction isRealFill(fill) {\n\treturn (objectTypeOf(fill) & GEPrimitiveFillMask) !== 0;\n}\n\nfunction isWide(object) {\n\treturn (objectTypeOf(object) & GEPrimitiveWide) !== 0;\n}\n\nfunction lastExportedEdgeGet() {\n\treturn workBuffer[GWLastExportedEdge];\n}\n\nfunction lastExportedEdgePut(value) {\n\treturn workBuffer[GWLastExportedEdge] = value;\n}\n\nfunction lastExportedFillGet() {\n\treturn workBuffer[GWLastExportedFill];\n}\n\nfunction lastExportedFillPut(value) {\n\treturn workBuffer[GWLastExportedFill] = value;\n}\n\nfunction lastExportedLeftXGet() {\n\treturn workBuffer[GWLastExportedLeftX];\n}\n\nfunction lastExportedLeftXPut(value) {\n\treturn workBuffer[GWLastExportedLeftX] = value;\n}\n\nfunction lastExportedRightXGet() {\n\treturn workBuffer[GWLastExportedRightX];\n}\n\nfunction lastExportedRightXPut(value) {\n\treturn workBuffer[GWLastExportedRightX] = value;\n}\n\nfunction lineEndXOf(line) {\n\treturn objat(line, GLEndX);\n}\n\nfunction lineEndXOfput(line, value) {\n\treturn objatput(line, GLEndX, value);\n}\n\nfunction lineEndYOf(line) {\n\treturn objat(line, GLEndY);\n}\n\nfunction lineEndYOfput(line, value) {\n\treturn objatput(line, GLEndY, value);\n}\n\nfunction lineErrorAdjDownOf(line) {\n\treturn objat(line, GLErrorAdjDown);\n}\n\nfunction lineErrorAdjDownOfput(line, value) {\n\treturn objatput(line, GLErrorAdjDown, value);\n}\n\nfunction lineErrorAdjUpOf(line) {\n\treturn objat(line, GLErrorAdjUp);\n}\n\nfunction lineErrorAdjUpOfput(line, value) {\n\treturn objatput(line, GLErrorAdjUp, value);\n}\n\nfunction lineErrorOf(line) {\n\treturn objat(line, GLError);\n}\n\nfunction lineErrorOfput(line, value) {\n\treturn objatput(line, GLError, value);\n}\n\nfunction lineXDirectionOf(line) {\n\treturn objat(line, GLXDirection);\n}\n\nfunction lineXDirectionOfput(line, value) {\n\treturn objatput(line, GLXDirection, value);\n}\n\nfunction lineXIncrementOf(line) {\n\treturn objat(line, GLXIncrement);\n}\n\nfunction lineXIncrementOfput(line, value) {\n\treturn objatput(line, GLXIncrement, value);\n}\n\nfunction lineYDirectionOfput(line, value) {\n\treturn objatput(line, GLYDirection, value);\n}\n\n\n/*\tLoad and subdivide the bezier curve from point1/point2/point3.\n\tIf wideFlag is set then make sure the curve is monoton in X. */\n\nfunction loadAndSubdivideBezierFromviatoisWide(point1, point2, point3, wideFlag) {\n\tvar bz1;\n\tvar bz2;\n\tvar index;\n\tvar index1;\n\tvar index2;\n\n\tbz1 = allocateBezierStackEntry();\n\tif (engineStopped) {\n\t\treturn 0;\n\t}\n\tbzStartXput(bz1, point1[0]);\n\tbzStartYput(bz1, point1[1]);\n\tbzViaXput(bz1, point2[0]);\n\tbzViaYput(bz1, point2[1]);\n\tbzEndXput(bz1, point3[0]);\n\tbzEndYput(bz1, point3[1]);\n\tindex2 = (bz2 = subdivideToBeMonotoninX(bz1, wideFlag));\n\tfor (index = bz1; index <= bz2; index += 6) {\n\t\tindex1 = subdivideBezierFrom(index);\n\t\tif (index1 > index2) {\n\t\t\tindex2 = index1;\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn DIV(index2, 6);\n}\n\nfunction loadArrayPolygonnPointsfilllineWidthlineFill(points, nPoints, fillIndex, lineWidth, lineFill) {\n\tvar i;\n\tvar x0;\n\tvar x1;\n\tvar y0;\n\tvar y1;\n\n\tloadPointfrom(point1Get(), interpreterProxy.fetchPointerofObject(0, points));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tx0 = point1Get()[0];\n\ty0 = point1Get()[1];\n\tfor (i = 1; i <= (nPoints - 1); i++) {\n\t\tloadPointfrom(point1Get(), interpreterProxy.fetchPointerofObject(i, points));\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tx1 = point1Get()[0];\n\t\ty1 = point1Get()[1];\n\t\tpoint1Get()[0] = x0;\n\t\tpoint1Get()[1] = y0;\n\t\tpoint2Get()[0] = x1;\n\t\tpoint2Get()[1] = y1;\n\t\ttransformPoints(2);\n\t\tloadWideLinefromtolineFillleftFillrightFill(lineWidth, point1Get(), point2Get(), lineFill, fillIndex, 0);\n\t\tif (engineStopped) {\n\t\t\treturn null;\n\t\t}\n\t\tx0 = x1;\n\t\ty0 = y1;\n\t}\n}\n\nfunction loadArrayShapenSegmentsfilllineWidthlineFill(points, nSegments, fillIndex, lineWidth, lineFill) {\n\tvar i;\n\tvar pointOop;\n\tvar segs;\n\tvar x0;\n\tvar x1;\n\tvar x2;\n\tvar y0;\n\tvar y1;\n\tvar y2;\n\n\tfor (i = 0; i <= (nSegments - 1); i++) {\n\t\tpointOop = interpreterProxy.fetchPointerofObject(i * 3, points);\n\t\tloadPointfrom(point1Get(), pointOop);\n\t\tpointOop = interpreterProxy.fetchPointerofObject((i * 3) + 1, points);\n\t\tloadPointfrom(point2Get(), pointOop);\n\t\tpointOop = interpreterProxy.fetchPointerofObject((i * 3) + 2, points);\n\t\tloadPointfrom(point3Get(), pointOop);\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\ttransformPoints(3);\n\t\tx0 = point1Get()[0];\n\t\ty0 = point1Get()[1];\n\t\tx1 = point2Get()[0];\n\t\ty1 = point2Get()[1];\n\t\tx2 = point3Get()[0];\n\n\t\t/* Check if we can use a line */\n\n\t\ty2 = point3Get()[1];\n\t\tif (((x0 === y0) && (x1 === y1)) || ((x1 === x2) && (y1 === y2))) {\n\t\t\tloadWideLinefromtolineFillleftFillrightFill(lineWidth, point1Get(), point3Get(), lineFill, fillIndex, 0);\n\t\t} else {\n\n\t\t\t/* Need bezier */\n\n\t\t\tsegs = loadAndSubdivideBezierFromviatoisWide(point1Get(), point2Get(), point3Get(), (lineWidth !== 0) && (lineFill !== 0));\n\t\t\tif (engineStopped) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tloadWideBezierlineFillleftFillrightFilln(lineWidth, lineFill, fillIndex, 0, segs);\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn null;\n\t\t}\n\t}\n}\n\n\n/*\tLoad a transformation from the given array. */\n\nfunction loadArrayTransformFromintolength(transformOop, destPtr, n) {\n\tvar i;\n\tvar value;\n\n\tfor (i = 0; i <= (n - 1); i++) {\n\t\tvalue = interpreterProxy.fetchPointerofObject(i, transformOop);\n\t\tif (!(typeof value === \"number\" || (value.isFloat))) {\n\t\t\treturn interpreterProxy.primitiveFail();\n\t\t}\n\t\tif (typeof value === \"number\") {\n\t\t\tdestPtr[i] = value;\n\t\t} else {\n\t\t\tdestPtr[i] = interpreterProxy.floatValueOf(value);\n\t\t}\n\t}\n}\n\n\n/*\tInitialize the bezier segment stored on the stack */\n\nfunction loadBeziersegmentleftFillrightFilloffset(bezier, index, leftFillIndex, rightFillIndex, yOffset) {\n\tif (bzEndY(index) >= bzStartY(index)) {\n\n\t\t/* Top to bottom */\n\n\t\tedgeXValueOfput(bezier, bzStartX(index));\n\t\tedgeYValueOfput(bezier, bzStartY(index) - yOffset);\n\t\tbezierViaXOfput(bezier, bzViaX(index));\n\t\tbezierViaYOfput(bezier, bzViaY(index) - yOffset);\n\t\tbezierEndXOfput(bezier, bzEndX(index));\n\t\tbezierEndYOfput(bezier, bzEndY(index) - yOffset);\n\t} else {\n\t\tedgeXValueOfput(bezier, bzEndX(index));\n\t\tedgeYValueOfput(bezier, bzEndY(index) - yOffset);\n\t\tbezierViaXOfput(bezier, bzViaX(index));\n\t\tbezierViaYOfput(bezier, bzViaY(index) - yOffset);\n\t\tbezierEndXOfput(bezier, bzStartX(index));\n\t\tbezierEndYOfput(bezier, bzStartY(index) - yOffset);\n\t}\n\tedgeZValueOfput(bezier, currentZGet());\n\tedgeLeftFillOfput(bezier, leftFillIndex);\n\tedgeRightFillOfput(bezier, rightFillIndex);\n}\n\nfunction loadBitBltFrom(bbObj) {\n\tif (!loadBBFn) {\n\n\t\t/* We need copyBits here so try to load it implicitly */\n\n\t\tif (!initialiseModule()) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn loadBBFn(bbObj);\n}\n\n\n/*\tLoad the bitmap fill. */\n\nfunction loadBitmapFillcolormaptilefromalongnormalxIndex(formOop, cmOop, tileFlag, point1, point2, point3, xIndex) {\n\tvar bmBits;\n\tvar bmBitsSize;\n\tvar bmDepth;\n\tvar bmFill;\n\tvar bmHeight;\n\tvar bmRaster;\n\tvar bmWidth;\n\tvar cmBits;\n\tvar cmSize;\n\tvar ppw;\n\n\tif (cmOop.isNil) {\n\t\tcmSize = 0;\n\t\tcmBits = null;\n\t} else {\n\t\tif (CLASSOF(cmOop) !== interpreterProxy.classBitmap()) {\n\t\t\treturn interpreterProxy.primitiveFail();\n\t\t}\n\t\tcmSize = SIZEOF(cmOop);\n\t\tcmBits = cmOop.wordsAsInt32Array();\n\t}\n\tif (typeof formOop === \"number\") {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (!interpreterProxy.isPointers(formOop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (SIZEOF(formOop) < 5) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tbmBits = interpreterProxy.fetchPointerofObject(0, formOop);\n\tif (CLASSOF(bmBits) !== interpreterProxy.classBitmap()) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tbmBitsSize = SIZEOF(bmBits);\n\tbmWidth = interpreterProxy.fetchIntegerofObject(1, formOop);\n\tbmHeight = interpreterProxy.fetchIntegerofObject(2, formOop);\n\tbmDepth = interpreterProxy.fetchIntegerofObject(3, formOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!((bmWidth >= 0) && (bmHeight >= 0))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (!((((((bmDepth === 32) || (bmDepth === 8)) || (bmDepth === 16)) || (bmDepth === 1)) || (bmDepth === 2)) || (bmDepth === 4))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (!((cmSize === 0) || (cmSize === (SHL(1, bmDepth))))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tppw = DIV(32, bmDepth);\n\tbmRaster = DIV((bmWidth + (ppw - 1)), ppw);\n\tif (bmBitsSize !== (bmRaster * bmHeight)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tbmFill = allocateBitmapFillcolormap(cmSize, cmBits);\n\tif (engineStopped) {\n\t\treturn null;\n\t}\n\tbitmapWidthOfput(bmFill, bmWidth);\n\tbitmapHeightOfput(bmFill, bmHeight);\n\tbitmapDepthOfput(bmFill, bmDepth);\n\tbitmapRasterOfput(bmFill, bmRaster);\n\tbitmapSizeOfput(bmFill, bmBitsSize);\n\tbitmapTileFlagOfput(bmFill, tileFlag);\n\tobjectIndexOfput(bmFill, xIndex);\n\tloadFillOrientationfromalongnormalwidthheight(bmFill, point1, point2, point3, bmWidth, bmHeight);\n\treturn bmFill;\n}\n\n\n/*\tNote: Assumes that the contents of formArray has been checked before */\n\nfunction loadBitsFrom(bmFill) {\n\tvar bitsLen;\n\tvar bitsOop;\n\tvar formOop;\n\tvar xIndex;\n\n\txIndex = objectIndexOf(bmFill);\n\tif (xIndex > SIZEOF(formArray)) {\n\t\treturn null;\n\t}\n\tformOop = interpreterProxy.fetchPointerofObject(xIndex, formArray);\n\tbitsOop = interpreterProxy.fetchPointerofObject(0, formOop);\n\tbitsLen = SIZEOF(bitsOop);\n\tif (bitsLen !== bitmapSizeOf(bmFill)) {\n\t\treturn null;\n\t}\n\treturn bitsOop.wordsAsInt32Array();\n}\n\n\n/*\tLoad a 2x3 transformation matrix from the given oop.\n\tReturn true if the matrix is not nil, false otherwise */\n\nfunction loadColorTransformFrom(transformOop) {\n\tvar okay;\n\tvar transform;\n\n\ttransform = colorTransform();\n\thasColorTransformPut(0);\n\tokay = loadTransformFromintolength(transformOop, transform, 8);\n\tif (!okay) {\n\t\treturn false;\n\t}\n\thasColorTransformPut(1);\n\ttransform[1] = (transform[1] * 256.0);\n\ttransform[3] = (transform[3] * 256.0);\n\ttransform[5] = (transform[5] * 256.0);\n\ttransform[7] = (transform[7] * 256.0);\n\treturn okay;\n}\n\n\n/*\tLoad the compressed segment identified by segment index */\n\nfunction loadCompressedSegmentfromshortleftFillrightFilllineWidthlineColor(segmentIndex, points, pointsShort, leftFill, rightFill, lineWidth, lineFill) {\n\tvar index;\n\tvar segs;\n\tvar x0;\n\tvar x1;\n\tvar x2;\n\tvar y0;\n\tvar y1;\n\tvar y2;\n\n\n\t/* Check if have anything to do at all */\n\n\tif ((leftFill === rightFill) && ((lineWidth === 0) || (lineFill === 0))) {\n\t\treturn null;\n\t}\n\n\t/* 3 points with x/y each */\n\n\tindex = segmentIndex * 6;\n\tif (pointsShort) {\n\n\t\t/* Load short points */\n\n\t\tx0 = (points.int16Array || (points.int16Array = new Int16Array(points.buffer, points.byteOffset)))[index + 0];\n\t\ty0 = (points.int16Array || (points.int16Array = new Int16Array(points.buffer, points.byteOffset)))[index + 1];\n\t\tx1 = (points.int16Array || (points.int16Array = new Int16Array(points.buffer, points.byteOffset)))[index + 2];\n\t\ty1 = (points.int16Array || (points.int16Array = new Int16Array(points.buffer, points.byteOffset)))[index + 3];\n\t\tx2 = (points.int16Array || (points.int16Array = new Int16Array(points.buffer, points.byteOffset)))[index + 4];\n\t\ty2 = (points.int16Array || (points.int16Array = new Int16Array(points.buffer, points.byteOffset)))[index + 5];\n\t} else {\n\t\tx0 = (points[(index + 0)]|0);\n\t\ty0 = (points[(index + 1)]|0);\n\t\tx1 = (points[(index + 2)]|0);\n\t\ty1 = (points[(index + 3)]|0);\n\t\tx2 = (points[(index + 4)]|0);\n\t\ty2 = (points[(index + 5)]|0);\n\t}\n\tif (((x0 === x1) && (y0 === y1)) || ((x1 === x2) && (y1 === y2))) {\n\n\t\t/* We can use a line from x0/y0 to x2/y2 */\n\n\t\tif ((x0 === x2) && (y0 === y2)) {\n\t\t\treturn null;\n\t\t}\n\t\tpoint1Get()[0] = x0;\n\t\tpoint1Get()[1] = y0;\n\t\tpoint2Get()[0] = x2;\n\t\tpoint2Get()[1] = y2;\n\t\ttransformPoints(2);\n\t\treturn loadWideLinefromtolineFillleftFillrightFill(lineWidth, point1Get(), point2Get(), lineFill, leftFill, rightFill);\n\t}\n\tpoint1Get()[0] = x0;\n\tpoint1Get()[1] = y0;\n\tpoint2Get()[0] = x1;\n\tpoint2Get()[1] = y1;\n\tpoint3Get()[0] = x2;\n\tpoint3Get()[1] = y2;\n\ttransformPoints(3);\n\tsegs = loadAndSubdivideBezierFromviatoisWide(point1Get(), point2Get(), point3Get(), (lineWidth !== 0) && (lineFill !== 0));\n\tif (engineStopped) {\n\t\treturn null;\n\t}\n\tloadWideBezierlineFillleftFillrightFilln(lineWidth, lineFill, leftFill, rightFill, segs);\n}\n\n\n/*\tLoad a compressed shape into the engine.\n\t\tWARNING: THIS METHOD NEEDS THE FULL FRAME SIZE!!!!\n\t */\n\nfunction loadCompressedShapesegmentsleftFillsrightFillslineWidthslineFillsfillIndexListpointShort(points, nSegments, leftFills, rightFills, lineWidths, lineFills, fillIndexList, pointsShort) {\n\tvar i;\n\tvar leftLength;\n\tvar leftRun;\n\tvar leftValue;\n\tvar lineFillLength;\n\tvar lineFillRun;\n\tvar lineFillValue;\n\tvar rightLength;\n\tvar rightRun;\n\tvar rightValue;\n\tvar widthLength;\n\tvar widthRun;\n\tvar widthValue;\n\n\tif (nSegments === 0) {\n\t\treturn 0;\n\t}\n\tleftRun = (rightRun = (widthRun = (lineFillRun = -1)));\n\tleftLength = (rightLength = (widthLength = (lineFillLength = 1)));\n\tleftValue = (rightValue = (widthValue = (lineFillValue = 0)));\n\tfor (i = 1; i <= nSegments; i++) {\n\n\t\t/* Decrement current run length and load new stuff */\n\n\t\tif (((--leftLength)) <= 0) {\n\t\t\t++leftRun;\n\t\t\tleftLength = shortRunLengthAtfrom(leftRun, leftFills);\n\t\t\tleftValue = shortRunValueAtfrom(leftRun, leftFills);\n\t\t\tif (leftValue !== 0) {\n\t\t\t\tleftValue = fillIndexList[leftValue - 1];\n\t\t\t\tleftValue = transformColor(leftValue);\n\t\t\t\tif (engineStopped) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (((--rightLength)) <= 0) {\n\t\t\t++rightRun;\n\t\t\trightLength = shortRunLengthAtfrom(rightRun, rightFills);\n\t\t\trightValue = shortRunValueAtfrom(rightRun, rightFills);\n\t\t\tif (rightValue !== 0) {\n\t\t\t\trightValue = fillIndexList[rightValue - 1];\n\t\t\t\trightValue = transformColor(rightValue);\n\t\t\t}\n\t\t}\n\t\tif (((--widthLength)) <= 0) {\n\t\t\t++widthRun;\n\t\t\twidthLength = shortRunLengthAtfrom(widthRun, lineWidths);\n\t\t\twidthValue = shortRunValueAtfrom(widthRun, lineWidths);\n\t\t\tif (widthValue !== 0) {\n\t\t\t\twidthValue = transformWidth(widthValue);\n\t\t\t}\n\t\t}\n\t\tif (((--lineFillLength)) <= 0) {\n\t\t\t++lineFillRun;\n\t\t\tlineFillLength = shortRunLengthAtfrom(lineFillRun, lineFills);\n\t\t\tlineFillValue = shortRunValueAtfrom(lineFillRun, lineFills);\n\t\t\tif (lineFillValue !== 0) {\n\t\t\t\tlineFillValue = fillIndexList[lineFillValue - 1];\n\t\t\t}\n\t\t}\n\t\tloadCompressedSegmentfromshortleftFillrightFilllineWidthlineColor(i - 1, points, pointsShort, leftValue, rightValue, widthValue, lineFillValue);\n\t\tif (engineStopped) {\n\t\t\treturn null;\n\t\t}\n\t}\n}\n\nfunction loadEdgeStateFrom(edgeOop) {\n\tvar edge;\n\n\tedge = lastExportedEdgeGet();\n\tif (SIZEOF(edgeOop) < ETBalloonEdgeDataSize) {\n\t\treturn null;\n\t}\n\tedgeXValueOfput(edge, interpreterProxy.fetchIntegerofObject(ETXValueIndex, edgeOop));\n\tedgeYValueOfput(edge, interpreterProxy.fetchIntegerofObject(ETYValueIndex, edgeOop));\n\tedgeZValueOfput(edge, interpreterProxy.fetchIntegerofObject(ETZValueIndex, edgeOop));\n\tedgeNumLinesOfput(edge, interpreterProxy.fetchIntegerofObject(ETLinesIndex, edgeOop));\n\treturn edge;\n}\n\n\n/*\tLoad a 2x3 transformation matrix from the given oop.\n\tReturn true if the matrix is not nil, false otherwise */\n\nfunction loadEdgeTransformFrom(transformOop) {\n\tvar okay;\n\tvar transform;\n\n\thasEdgeTransformPut(0);\n\ttransform = edgeTransform();\n\tokay = loadTransformFromintolength(transformOop, transform, 6);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!okay) {\n\t\treturn false;\n\t}\n\thasEdgeTransformPut(1);\n\ttransform[2] = (transform[2] + destOffsetXGet());\n\ttransform[5] = (transform[5] + destOffsetYGet());\n\treturn true;\n}\n\n\n/*\tTransform the points */\n\nfunction loadFillOrientationfromalongnormalwidthheight(fill, point1, point2, point3, fillWidth, fillHeight) {\n\tvar dirX;\n\tvar dirY;\n\tvar dsLength2;\n\tvar dsX;\n\tvar dsY;\n\tvar dtLength2;\n\tvar dtX;\n\tvar dtY;\n\tvar nrmX;\n\tvar nrmY;\n\n\tpoint2[0] = (point2[0] + point1[0]);\n\tpoint2[1] = (point2[1] + point1[1]);\n\tpoint3[0] = (point3[0] + point1[0]);\n\tpoint3[1] = (point3[1] + point1[1]);\n\ttransformPoint(point1);\n\ttransformPoint(point2);\n\ttransformPoint(point3);\n\tdirX = point2[0] - point1[0];\n\tdirY = point2[1] - point1[1];\n\tnrmX = point3[0] - point1[0];\n\n\t/* Compute the scale from direction/normal into ramp size */\n\n\tnrmY = point3[1] - point1[1];\n\tdsLength2 = (dirX * dirX) + (dirY * dirY);\n\tif (dsLength2 > 0) {\n\t\tdsX = ((((dirX * fillWidth) * 65536.0) / dsLength2)|0);\n\t\tdsY = ((((dirY * fillWidth) * 65536.0) / dsLength2)|0);\n\t} else {\n\t\tdsX = 0;\n\t\tdsY = 0;\n\t}\n\tdtLength2 = (nrmX * nrmX) + (nrmY * nrmY);\n\tif (dtLength2 > 0) {\n\t\tdtX = ((((nrmX * fillHeight) * 65536.0) / dtLength2)|0);\n\t\tdtY = ((((nrmY * fillHeight) * 65536.0) / dtLength2)|0);\n\t} else {\n\t\tdtX = 0;\n\t\tdtY = 0;\n\t}\n\tfillOriginXOfput(fill, point1[0]);\n\tfillOriginYOfput(fill, point1[1]);\n\tfillDirectionXOfput(fill, dsX);\n\tfillDirectionYOfput(fill, dsY);\n\tfillNormalXOfput(fill, dtX);\n\tfillNormalYOfput(fill, dtY);\n}\n\n\n/*\tCheck all the forms from arrayOop. */\n\nfunction loadFormsFrom(arrayOop) {\n\tvar bmBits;\n\tvar bmBitsSize;\n\tvar bmDepth;\n\tvar bmHeight;\n\tvar bmRaster;\n\tvar bmWidth;\n\tvar formOop;\n\tvar i;\n\tvar ppw;\n\n\tif (!interpreterProxy.isArray(arrayOop)) {\n\t\treturn false;\n\t}\n\tformArray = arrayOop;\n\tfor (i = 0; i <= (SIZEOF(formArray) - 1); i++) {\n\t\tformOop = interpreterProxy.fetchPointerofObject(i, formArray);\n\t\tif (typeof formOop === \"number\") {\n\t\t\treturn false;\n\t\t}\n\t\tif (!interpreterProxy.isPointers(formOop)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (SIZEOF(formOop) < 5) {\n\t\t\treturn false;\n\t\t}\n\t\tbmBits = interpreterProxy.fetchPointerofObject(0, formOop);\n\t\tif (CLASSOF(bmBits) !== interpreterProxy.classBitmap()) {\n\t\t\treturn false;\n\t\t}\n\t\tbmBitsSize = SIZEOF(bmBits);\n\t\tbmWidth = interpreterProxy.fetchIntegerofObject(1, formOop);\n\t\tbmHeight = interpreterProxy.fetchIntegerofObject(2, formOop);\n\t\tbmDepth = interpreterProxy.fetchIntegerofObject(3, formOop);\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!((bmWidth >= 0) && (bmHeight >= 0))) {\n\t\t\treturn false;\n\t\t}\n\t\tppw = DIV(32, bmDepth);\n\t\tbmRaster = DIV((bmWidth + (ppw - 1)), ppw);\n\t\tif (bmBitsSize !== (bmRaster * bmHeight)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\n\n/*\tLoad the gradient fill as defined by the color ramp. */\n\nfunction loadGradientFillfromalongnormalisRadial(rampOop, point1, point2, point3, isRadial) {\n\tvar fill;\n\tvar rampWidth;\n\n\tif (CLASSOF(rampOop) !== interpreterProxy.classBitmap()) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\trampWidth = SIZEOF(rampOop);\n\tfill = allocateGradientFillrampWidthisRadial(rampOop.wordsAsInt32Array(), rampWidth, isRadial);\n\tif (engineStopped) {\n\t\treturn null;\n\t}\n\tloadFillOrientationfromalongnormalwidthheight(fill, point1, point2, point3, rampWidth, rampWidth);\n\treturn fill;\n}\n\n\n/*\tLoad the line defined by point1 and point2. */\n\nfunction loadLinefromtooffsetleftFillrightFill(line, point1, point2, yOffset, leftFill, rightFill) {\n\tvar p1;\n\tvar p2;\n\tvar yDir;\n\n\tif (point1[1] <= point2[1]) {\n\t\tp1 = point1;\n\t\tp2 = point2;\n\t\tyDir = 1;\n\t} else {\n\t\tp1 = point2;\n\t\tp2 = point1;\n\t\tyDir = -1;\n\t}\n\tedgeXValueOfput(line, p1[0]);\n\tedgeYValueOfput(line, p1[1] - yOffset);\n\tedgeZValueOfput(line, currentZGet());\n\tedgeLeftFillOfput(line, leftFill);\n\tedgeRightFillOfput(line, rightFill);\n\tlineEndXOfput(line, p2[0]);\n\tlineEndYOfput(line, p2[1] - yOffset);\n\tlineYDirectionOfput(line, yDir);\n}\n\n\n/*\tLoad a rectangular oval currently defined by point1/point2 */\n\nfunction loadOvallineFillleftFillrightFill(lineWidth, lineFill, leftFill, rightFill) {\n\tvar cx;\n\tvar cy;\n\tvar h;\n\tvar i;\n\tvar nSegments;\n\tvar w;\n\n\tw = (point2Get()[0] - point1Get()[0]) >> 1;\n\th = (point2Get()[1] - point1Get()[1]) >> 1;\n\tcx = (point2Get()[0] + point1Get()[0]) >> 1;\n\tcy = (point2Get()[1] + point1Get()[1]) >> 1;\n\tfor (i = 0; i <= 15; i++) {\n\t\tloadOvalSegmentwhcxcy(i, w, h, cx, cy);\n\t\ttransformPoints(3);\n\t\tnSegments = loadAndSubdivideBezierFromviatoisWide(point1Get(), point2Get(), point3Get(), (lineWidth !== 0) && (lineFill !== 0));\n\t\tif (engineStopped) {\n\t\t\treturn null;\n\t\t}\n\t\tloadWideBezierlineFillleftFillrightFilln(lineWidth, lineFill, leftFill, rightFill, nSegments);\n\t\tif (engineStopped) {\n\t\t\treturn null;\n\t\t}\n\t}\n}\n\nfunction loadOvalSegmentwhcxcy(seg, w, h, cx, cy) {\n\tvar x0;\n\tvar x1;\n\tvar x2;\n\tvar y0;\n\tvar y1;\n\tvar y2;\n\n\n\t/* Load start point of segment */\n\n\tx0 = (((circleCosTable()[(seg * 2) + 0] * w) + cx)|0);\n\ty0 = (((circleSinTable()[(seg * 2) + 0] * h) + cy)|0);\n\tpoint1Get()[0] = x0;\n\tpoint1Get()[1] = y0;\n\tx2 = (((circleCosTable()[(seg * 2) + 2] * w) + cx)|0);\n\ty2 = (((circleSinTable()[(seg * 2) + 2] * h) + cy)|0);\n\tpoint3Get()[0] = x2;\n\tpoint3Get()[1] = y2;\n\tx1 = (((circleCosTable()[(seg * 2) + 1] * w) + cx)|0);\n\n\t/* NOTE: The intermediate point is the point ON the curve\n\tand not yet the control point (which is OFF the curve) */\n\n\ty1 = (((circleSinTable()[(seg * 2) + 1] * h) + cy)|0);\n\tx1 = (x1 * 2) - ((x0 + x2) >> 1);\n\ty1 = (y1 * 2) - ((y0 + y2) >> 1);\n\tpoint2Get()[0] = x1;\n\tpoint2Get()[1] = y1;\n}\n\n\n/*\tLoad the contents of pointOop into pointArray */\n\nfunction loadPointfrom(pointArray, pointOop) {\n\tvar value;\n\n\tif (CLASSOF(pointOop) !== interpreterProxy.classPoint()) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tvalue = interpreterProxy.fetchPointerofObject(0, pointOop);\n\tif (!(typeof value === \"number\" || (value.isFloat))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (typeof value === \"number\") {\n\t\tpointArray[0] = value;\n\t} else {\n\t\tpointArray[0] = (interpreterProxy.floatValueOf(value)|0);\n\t}\n\tvalue = interpreterProxy.fetchPointerofObject(1, pointOop);\n\tif (!(typeof value === \"number\" || (value.isFloat))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (typeof value === \"number\") {\n\t\tpointArray[1] = value;\n\t} else {\n\t\tpointArray[1] = (interpreterProxy.floatValueOf(value)|0);\n\t}\n}\n\nfunction loadPolygonnPointsfilllineWidthlineFillpointsShort(points, nPoints, fillIndex, lineWidth, lineFill, isShort) {\n\tvar i;\n\tvar x0;\n\tvar x1;\n\tvar y0;\n\tvar y1;\n\n\tif (isShort) {\n\t\tx0 = (points.int16Array || (points.int16Array = new Int16Array(points.buffer, points.byteOffset)))[0];\n\t\ty0 = (points.int16Array || (points.int16Array = new Int16Array(points.buffer, points.byteOffset)))[1];\n\t} else {\n\t\tx0 = (points[0]|0);\n\t\ty0 = (points[1]|0);\n\t}\n\tfor (i = 1; i <= (nPoints - 1); i++) {\n\t\tif (isShort) {\n\t\t\tx1 = (points.int16Array || (points.int16Array = new Int16Array(points.buffer, points.byteOffset)))[i * 2];\n\t\t\ty1 = (points.int16Array || (points.int16Array = new Int16Array(points.buffer, points.byteOffset)))[(i * 2) + 1];\n\t\t} else {\n\t\t\tx1 = (points[(i * 2)]|0);\n\t\t\ty1 = (points[((i * 2) + 1)]|0);\n\t\t}\n\t\tpoint1Get()[0] = x0;\n\t\tpoint1Get()[1] = y0;\n\t\tpoint2Get()[0] = x1;\n\t\tpoint2Get()[1] = y1;\n\t\ttransformPoints(2);\n\t\tloadWideLinefromtolineFillleftFillrightFill(lineWidth, point1Get(), point2Get(), lineFill, fillIndex, 0);\n\t\tif (engineStopped) {\n\t\t\treturn null;\n\t\t}\n\t\tx0 = x1;\n\t\ty0 = y1;\n\t}\n}\n\n\n/*\tLoad a rectangle currently defined by point1-point4 */\n\nfunction loadRectanglelineFillleftFillrightFill(lineWidth, lineFill, leftFill, rightFill) {\n\tloadWideLinefromtolineFillleftFillrightFill(lineWidth, point1Get(), point2Get(), lineFill, leftFill, rightFill);\n\tloadWideLinefromtolineFillleftFillrightFill(lineWidth, point2Get(), point3Get(), lineFill, leftFill, rightFill);\n\tloadWideLinefromtolineFillleftFillrightFill(lineWidth, point3Get(), point4Get(), lineFill, leftFill, rightFill);\n\tloadWideLinefromtolineFillleftFillrightFill(lineWidth, point4Get(), point1Get(), lineFill, leftFill, rightFill);\n}\n\n\n/*\tLoad the entire state from the interpreter for the rendering primitives.\n\t Answer 0 on success or a non-zero failure code on failure. */\n\nfunction loadRenderingState() {\n\tvar edgeOop;\n\tvar failCode;\n\tvar fillOop;\n\tvar state;\n\n\tif (interpreterProxy.methodArgumentCount() !== 2) {\n\t\treturn PrimErrBadNumArgs;\n\t}\n\tif (((failCode = quickLoadEngineFrom(interpreterProxy.stackValue(2)))) !== 0) {\n\t\treturn failCode;\n\t}\n\tfillOop = interpreterProxy.stackObjectValue(0);\n\tedgeOop = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn PrimErrBadArgument;\n\t}\n\tif (((failCode = loadSpanBufferFrom(interpreterProxy.fetchPointerofObject(BESpanIndex, engine)))) !== 0) {\n\t\treturn failCode;\n\t}\n\tif (!loadBitBltFrom(interpreterProxy.fetchPointerofObject(BEBitBltIndex, engine))) {\n\t\treturn GEFBitBltLoadFailed;\n\t}\n\tif (!loadFormsFrom(interpreterProxy.fetchPointerofObject(BEFormsIndex, engine))) {\n\t\treturn GEFFormLoadFailed;\n\t}\n\tif (SIZEOF(edgeOop) < ETBalloonEdgeDataSize) {\n\t\treturn GEFEdgeDataTooSmall;\n\t}\n\tif (SIZEOF(fillOop) < FTBalloonFillDataSize) {\n\t\treturn GEFFillDataTooSmall;\n\t}\n\tstate = stateGet();\n\tif ((state === GEStateWaitingForEdge) || ((state === GEStateWaitingForFill) || (state === GEStateWaitingChange))) {\n\t\treturn GEFWrongState;\n\t}\n\treturn 0;\n}\n\nfunction loadShapenSegmentsfilllineWidthlineFillpointsShort(points, nSegments, fillIndex, lineWidth, lineFill, pointsShort) {\n\tvar i;\n\n\tfor (i = 1; i <= nSegments; i++) {\n\t\tloadCompressedSegmentfromshortleftFillrightFilllineWidthlineColor(i - 1, points, pointsShort, fillIndex, 0, lineWidth, lineFill);\n\t\tif (engineStopped) {\n\t\t\treturn null;\n\t\t}\n\t}\n}\n\n\n/*\tLoad the span buffer from the given oop.\n\t Answer 0 on success or a non-zero failure code on failure. */\n\nfunction loadSpanBufferFrom(spanOop) {\n\tif (CLASSOF(spanOop) !== interpreterProxy.classBitmap()) {\n\t\treturn GEFClassMismatch;\n\t}\n\n\t/* Leave last entry unused to avoid complications */\n\n\tspanBuffer = spanOop.words;\n\tspanSizePut(SIZEOF(spanOop) - 1);\n\treturn 0;\n}\n\n\n/*\tLoad a transformation from transformOop into the float array\n\tdefined by destPtr. The transformation is assumed to be either\n\tan array or a FloatArray of length n. */\n\nfunction loadTransformFromintolength(transformOop, destPtr, n) {\n\tif (transformOop.isNil) {\n\t\treturn false;\n\t}\n\tif (typeof transformOop === \"number\") {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (SIZEOF(transformOop) !== n) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (interpreterProxy.isWords(transformOop)) {\n\t\tloadWordTransformFromintolength(transformOop, destPtr, n);\n\t} else {\n\t\tloadArrayTransformFromintolength(transformOop, destPtr, n);\n\t}\n\treturn true;\n}\n\n\n/*\tLoad the (possibly wide) bezier from the segments currently on the bezier stack. */\n\nfunction loadWideBezierlineFillleftFillrightFilln(lineWidth, lineFill, leftFill, rightFill, nSegments) {\n\tvar bezier;\n\tvar index;\n\tvar offset;\n\tvar wide;\n\n\tif ((lineWidth === 0) || (lineFill === 0)) {\n\t\twide = false;\n\t\toffset = 0;\n\t} else {\n\t\twide = true;\n\t\toffset = offsetFromWidth(lineWidth);\n\t}\n\tindex = nSegments * 6;\n\twhile (index > 0) {\n\t\tif (wide) {\n\t\t\tbezier = allocateWideBezier();\n\t\t} else {\n\t\t\tbezier = allocateBezier();\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn 0;\n\t\t}\n\t\tloadBeziersegmentleftFillrightFilloffset(bezier, index, leftFill, rightFill, offset);\n\t\tif (wide) {\n\t\t\twideBezierFillOfput(bezier, lineFill);\n\t\t\twideBezierWidthOfput(bezier, lineWidth);\n\t\t\twideBezierExtentOfput(bezier, lineWidth);\n\t\t}\n\t\tindex -= 6;\n\t}\n\twbStackClear();\n}\n\n\n/*\tLoad a (possibly wide) line defined by the points p1 and p2 */\n\nfunction loadWideLinefromtolineFillleftFillrightFill(lineWidth, p1, p2, lineFill, leftFill, rightFill) {\n\tvar line;\n\tvar offset;\n\n\tif ((lineWidth === 0) || (lineFill === 0)) {\n\t\tline = allocateLine();\n\t\toffset = 0;\n\t} else {\n\t\tline = allocateWideLine();\n\t\toffset = offsetFromWidth(lineWidth);\n\t}\n\tif (engineStopped) {\n\t\treturn 0;\n\t}\n\tloadLinefromtooffsetleftFillrightFill(line, p1, p2, offset, leftFill, rightFill);\n\tif (isWide(line)) {\n\t\twideLineFillOfput(line, lineFill);\n\t\twideLineWidthOfput(line, lineWidth);\n\t\twideLineExtentOfput(line, lineWidth);\n\t}\n}\n\n\n/*\tLoad a float array transformation from the given oop */\n\nfunction loadWordTransformFromintolength(transformOop, destPtr, n) {\n\tvar i;\n\tvar srcPtr;\n\n\tsrcPtr = transformOop.wordsAsFloat32Array();\n\tfor (i = 0; i <= (n - 1); i++) {\n\t\tdestPtr[i] = srcPtr[i];\n\t}\n}\n\n\n/*\tLoad the working buffer from the given oop */\n\nfunction loadWorkBufferFrom(wbOop) {\n\tif (typeof wbOop === \"number\") {\n\t\treturn GEFWorkBufferIsInteger;\n\t}\n\tif (!interpreterProxy.isWords(wbOop)) {\n\t\treturn GEFWorkBufferIsPointers;\n\t}\n\tif (SIZEOF(wbOop) < GWMinimalSize) {\n\t\treturn GEFWorkBufferTooSmall;\n\t}\n\tworkBufferPut(wbOop);\n\tif (magicNumberGet() !== GWMagicNumber) {\n\t\treturn GEFWorkBufferBadMagic;\n\t}\n\tif (wbSizeGet() !== SIZEOF(wbOop)) {\n\t\treturn GEFWorkBufferWrongSize;\n\t}\n\tif (objStartGet() !== GWHeaderSize) {\n\t\treturn GEFWorkBufferStartWrong;\n\t}\n\tobjBuffer = PTR_ADD(workBuffer, objStartGet());\n\tgetBuffer = PTR_ADD(objBuffer, objUsedGet());\n\n\t/* Make sure we don't exceed the work buffer */\n\n\taetBuffer = PTR_ADD(getBuffer, getUsedGet());\n\tif ((((GWHeaderSize + objUsedGet()) + getUsedGet()) + aetUsedGet()) > wbSizeGet()) {\n\t\treturn GEFWorkTooBig;\n\t}\n\treturn 0;\n}\n\nfunction magicNumberGet() {\n\treturn workBuffer[GWMagicIndex];\n}\n\nfunction magicNumberPut(value) {\n\treturn workBuffer[GWMagicIndex] = value;\n}\n\n\n/*\tThe module with the given name was just unloaded.\n\tMake sure we have no dangling references. */\n\nfunction moduleUnloaded(aModuleName) {\n\tif (strcmp(aModuleName, bbPluginName) === 0) {\n\n\t\t/* BitBlt just shut down. How nasty. */\n\n\t\tloadBBFn = 0;\n\t\tcopyBitsFn = 0;\n\t}\n}\n\n\n/*\tThe entry at index is not in the right position of the AET. \n\tMove it to the left until the position is okay. */\n\nfunction moveAETEntryFromedgex(index, edge, xValue) {\n\tvar newIndex;\n\n\tnewIndex = index;\n\twhile ((newIndex > 0) && (edgeXValueOf(aetBuffer[newIndex - 1]) > xValue)) {\n\t\taetBuffer[newIndex] = aetBuffer[newIndex - 1];\n\t\t--newIndex;\n\t}\n\taetBuffer[newIndex] = edge;\n}\n\n\n/*\tCheck if we have n slots available */\n\nfunction needAvailableSpace(nSlots) {\n\tif (((((GWHeaderSize + objUsed) + getUsedGet()) + aetUsedGet()) + nSlots) > wbTopGet()) {\n\t\tstopBecauseOf(GErrorNoMoreSpace);\n\t\treturn false;\n\t}\n\treturn true;\n}\n\nfunction needsFlush() {\n\treturn needsFlushGet() !== 0;\n}\n\nfunction needsFlushGet() {\n\treturn workBuffer[GWNeedsFlush];\n}\n\nfunction needsFlushPut(value) {\n\treturn workBuffer[GWNeedsFlush] = value;\n}\n\nfunction objat(object, index) {\n\treturn objBuffer[object + index];\n}\n\nfunction objatput(object, index, value) {\n\treturn objBuffer[object + index] = value;\n}\n\nfunction objStartGet() {\n\treturn workBuffer[GWObjStart];\n}\n\nfunction objStartPut(value) {\n\treturn workBuffer[GWObjStart] = value;\n}\n\nfunction objUsedGet() {\n\treturn workBuffer[GWObjUsed];\n}\n\nfunction objUsedPut(value) {\n\treturn workBuffer[GWObjUsed] = value;\n}\n\nfunction objectHeaderOf(obj) {\n\treturn objat(obj, GEObjectType);\n}\n\nfunction objectIndexOf(obj) {\n\treturn objat(obj, GEObjectIndex);\n}\n\nfunction objectIndexOfput(obj, value) {\n\treturn objatput(obj, GEObjectIndex, value);\n}\n\nfunction objectLengthOf(obj) {\n\treturn objat(obj, GEObjectLength);\n}\n\nfunction objectLengthOfput(obj, value) {\n\treturn objatput(obj, GEObjectLength, value);\n}\n\nfunction objectTypeOf(obj) {\n\treturn objat(obj, GEObjectType) & GEPrimitiveTypeMask;\n}\n\nfunction objectTypeOfput(obj, value) {\n\treturn objatput(obj, GEObjectType, value);\n}\n\n\n/*\tCommon function so that we don't compute that wrong in any place\n\tand can easily find all the places where we deal with one-pixel offsets. */\n\nfunction offsetFromWidth(lineWidth) {\n\treturn lineWidth >> 1;\n}\n\nfunction point1Get() {\n\treturn PTR_ADD(workBuffer, GWPoint1);\n}\n\nfunction point2Get() {\n\treturn PTR_ADD(workBuffer, GWPoint2);\n}\n\nfunction point3Get() {\n\treturn PTR_ADD(workBuffer, GWPoint3);\n}\n\nfunction point4Get() {\n\treturn PTR_ADD(workBuffer, GWPoint4);\n}\n\n\n/*\tWe have just blitted a scan line to the screen.\n\tDo whatever seems to be a good idea here. */\n/*\tNote: In the future we may check the time needed for this scan line and interrupt processing to give the Smalltalk code a chance to run at a certain time. */\n/*\tCheck if there is any more work to do. */\n\nfunction postDisplayAction() {\n\tif ((getStartGet() >= getUsedGet()) && (aetUsedGet() === 0)) {\n\n\t\t/* No more entries to process */\n\n\t\tstatePut(GEStateCompleted);\n\t}\n\tif (currentYGet() >= fillMaxYGet()) {\n\n\t\t/* Out of clipping range */\n\n\t\tstatePut(GEStateCompleted);\n\t}\n}\n\nfunction primitiveAbortProcessing() {\n\tvar failureCode;\n\n\tif (interpreterProxy.methodArgumentCount() !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFrom(interpreterProxy.stackValue(0)))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tstatePut(GEStateCompleted);\n\tstoreEngineStateInto(engine);\n}\n\n\n/*\tNote: No need to load either bitBlt or spanBuffer */\n\nfunction primitiveAddActiveEdgeEntry() {\n\tvar edge;\n\tvar edgeOop;\n\tvar failureCode;\n\n\tif (doProfileStats) {\n\t\tgeProfileTime = interpreterProxy.ioMicroMSecs();\n\t}\n\tif (interpreterProxy.methodArgumentCount() !== 1) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(1), GEStateWaitingForEdge))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tedgeOop = interpreterProxy.stackObjectValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tedge = loadEdgeStateFrom(edgeOop);\n\tif (!edge) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEdgeDataTooSmall);\n\t}\n\tif (!needAvailableSpace(1)) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFWorkTooBig);\n\t}\n\tif (edgeNumLinesOf(edge) > 0) {\n\t\tinsertEdgeIntoAET(edge);\n\t}\n\tif (engineStopped) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineStopped);\n\t}\n\tstatePut(GEStateAddingFromGET);\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(1);\n\tif (doProfileStats) {\n\t\tincrementStatby(GWCountAddAETEntry, 1);\n\t\tincrementStatby(GWTimeAddAETEntry, interpreterProxy.ioMicroMSecs() - geProfileTime);\n\t}\n}\n\nfunction primitiveAddBezier() {\n\tvar endOop;\n\tvar failureCode;\n\tvar leftFill;\n\tvar nSegments;\n\tvar rightFill;\n\tvar startOop;\n\tvar viaOop;\n\n\n\t/* Fail if we have the wrong number of arguments */\n\n\tif (interpreterProxy.methodArgumentCount() !== 5) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\trightFill = interpreterProxy.positive32BitValueOf(interpreterProxy.stackValue(0));\n\tleftFill = interpreterProxy.positive32BitValueOf(interpreterProxy.stackValue(1));\n\tviaOop = interpreterProxy.stackObjectValue(2);\n\tendOop = interpreterProxy.stackObjectValue(3);\n\tstartOop = interpreterProxy.stackObjectValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(5), GEStateUnlocked))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tif (!(isFillOkay(leftFill) && (isFillOkay(rightFill)))) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFWrongFill);\n\t}\n\tif ((leftFill === rightFill) && false) {\n\t\treturn interpreterProxy.pop(6);\n\t}\n\tloadPointfrom(point1Get(), startOop);\n\tloadPointfrom(point2Get(), viaOop);\n\tloadPointfrom(point3Get(), endOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\ttransformPoints(3);\n\tnSegments = loadAndSubdivideBezierFromviatoisWide(point1Get(), point2Get(), point3Get(), false);\n\tneedAvailableSpace(nSegments * GBBaseSize);\n\tif (!engineStopped) {\n\t\tleftFill = transformColor(leftFill);\n\t\trightFill = transformColor(rightFill);\n\t}\n\tif (!engineStopped) {\n\t\tloadWideBezierlineFillleftFillrightFilln(0, 0, leftFill, rightFill, nSegments);\n\t}\n\tif (engineStopped) {\n\n\t\t/* Make sure the stack is okay */\n\n\t\twbStackClear();\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(5);\n}\n\nfunction primitiveAddBezierShape() {\n\tvar failureCode;\n\tvar fillIndex;\n\tvar length;\n\tvar lineFill;\n\tvar lineWidth;\n\tvar nSegments;\n\tvar points;\n\tvar pointsIsArray;\n\tvar segSize;\n\n\n\t/* Fail if we have the wrong number of arguments */\n\n\tif (interpreterProxy.methodArgumentCount() !== 5) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tlineFill = interpreterProxy.positive32BitValueOf(interpreterProxy.stackValue(0));\n\tlineWidth = interpreterProxy.stackIntegerValue(1);\n\tfillIndex = interpreterProxy.positive32BitValueOf(interpreterProxy.stackValue(2));\n\tnSegments = interpreterProxy.stackIntegerValue(3);\n\tpoints = interpreterProxy.stackObjectValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(5), GEStateUnlocked))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tlength = SIZEOF(points);\n\tif (interpreterProxy.isWords(points)) {\n\n\t\t/* Either PointArray or ShortPointArray */\n\n\t\tpointsIsArray = false;\n\t\tif (!((length === (nSegments * 3)) || (length === (nSegments * 6)))) {\n\t\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t\t}\n\t} else {\n\n\t\t/* Must be Array of points */\n\n\t\tif (!interpreterProxy.isArray(points)) {\n\t\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t\t}\n\t\tif (length !== (nSegments * 3)) {\n\t\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t\t}\n\t\tpointsIsArray = true;\n\t}\n\tif ((lineWidth === 0) || (lineFill === 0)) {\n\t\tsegSize = GLBaseSize;\n\t} else {\n\t\tsegSize = GLWideSize;\n\t}\n\tif (!needAvailableSpace(segSize * nSegments)) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFWorkTooBig);\n\t}\n\tif (!(isFillOkay(lineFill) && (isFillOkay(fillIndex)))) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFWrongFill);\n\t}\n\tlineFill = transformColor(lineFill);\n\tfillIndex = transformColor(fillIndex);\n\tif (engineStopped) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (((lineFill === 0) || (lineWidth === 0)) && (fillIndex === 0)) {\n\t\treturn interpreterProxy.pop(5);\n\t}\n\tif (lineWidth !== 0) {\n\t\tlineWidth = transformWidth(lineWidth);\n\t\tif (lineWidth < 1) {\n\t\t\tlineWidth = 1;\n\t\t}\n\t}\n\tif (pointsIsArray) {\n\t\tloadArrayShapenSegmentsfilllineWidthlineFill(points, nSegments, fillIndex, lineWidth, lineFill);\n\t} else {\n\t\tloadShapenSegmentsfilllineWidthlineFillpointsShort(points.wordsAsInt32Array(), nSegments, fillIndex, lineWidth, lineFill, (nSegments * 3) === length);\n\t}\n\tif (engineStopped) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\tneedsFlushPut(1);\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(5);\n}\n\nfunction primitiveAddBitmapFill() {\n\tvar cmOop;\n\tvar dirOop;\n\tvar failureCode;\n\tvar fill;\n\tvar formOop;\n\tvar nrmOop;\n\tvar originOop;\n\tvar tileFlag;\n\tvar xIndex;\n\n\n\t/* Fail if we have the wrong number of arguments */\n\n\tif (interpreterProxy.methodArgumentCount() !== 7) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\txIndex = interpreterProxy.stackIntegerValue(0);\n\tif (xIndex <= 0) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tnrmOop = interpreterProxy.stackObjectValue(1);\n\tdirOop = interpreterProxy.stackObjectValue(2);\n\toriginOop = interpreterProxy.stackObjectValue(3);\n\ttileFlag = interpreterProxy.booleanValueOf(interpreterProxy.stackValue(4));\n\tcmOop = interpreterProxy.stackObjectValue(5);\n\tformOop = interpreterProxy.stackObjectValue(6);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(7), GEStateUnlocked))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tloadPointfrom(point1Get(), originOop);\n\tloadPointfrom(point2Get(), dirOop);\n\tloadPointfrom(point3Get(), nrmOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFBadPoint);\n\t}\n\tfill = loadBitmapFillcolormaptilefromalongnormalxIndex(formOop, cmOop, (tileFlag\n\t\t? 1\n\t\t: 0), point1Get(), point2Get(), point3Get(), xIndex - 1);\n\tif (engineStopped) {\n\n\t\t/* Make sure the stack is okay */\n\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.popthenPush(8, interpreterProxy.positive32BitIntegerFor(fill));\n}\n\nfunction primitiveAddCompressedShape() {\n\tvar failureCode;\n\tvar fillIndexList;\n\tvar leftFills;\n\tvar lineFills;\n\tvar lineWidths;\n\tvar nSegments;\n\tvar points;\n\tvar pointsShort;\n\tvar rightFills;\n\n\n\t/* Fail if we have the wrong number of arguments */\n\n\tif (interpreterProxy.methodArgumentCount() !== 7) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tfillIndexList = interpreterProxy.stackObjectValue(0);\n\tlineFills = interpreterProxy.stackObjectValue(1);\n\tlineWidths = interpreterProxy.stackObjectValue(2);\n\trightFills = interpreterProxy.stackObjectValue(3);\n\tleftFills = interpreterProxy.stackObjectValue(4);\n\tnSegments = interpreterProxy.stackIntegerValue(5);\n\tpoints = interpreterProxy.stackObjectValue(6);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(7), GEStateUnlocked))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tif (!checkCompressedShapesegmentsleftFillsrightFillslineWidthslineFillsfillIndexList(points, nSegments, leftFills, rightFills, lineWidths, lineFills, fillIndexList)) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEntityCheckFailed);\n\t}\n\tif (!needAvailableSpace(Math.max(GBBaseSize, GLBaseSize) * nSegments)) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFWorkTooBig);\n\t}\n\n\t/* Then actually load the compressed shape */\n\n\tpointsShort = SIZEOF(points) === (nSegments * 3);\n\tloadCompressedShapesegmentsleftFillsrightFillslineWidthslineFillsfillIndexListpointShort(points.wordsAsInt32Array(), nSegments, leftFills.wordsAsInt32Array(), rightFills.wordsAsInt32Array(), lineWidths.wordsAsInt32Array(), lineFills.wordsAsInt32Array(), fillIndexList.wordsAsInt32Array(), pointsShort);\n\tif (engineStopped) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\tneedsFlushPut(1);\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(7);\n}\n\nfunction primitiveAddGradientFill() {\n\tvar dirOop;\n\tvar failureCode;\n\tvar fill;\n\tvar isRadial;\n\tvar nrmOop;\n\tvar originOop;\n\tvar rampOop;\n\n\n\t/* Fail if we have the wrong number of arguments */\n\n\tif (interpreterProxy.methodArgumentCount() !== 5) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tisRadial = interpreterProxy.booleanValueOf(interpreterProxy.stackValue(0));\n\tnrmOop = interpreterProxy.stackValue(1);\n\tdirOop = interpreterProxy.stackValue(2);\n\toriginOop = interpreterProxy.stackValue(3);\n\trampOop = interpreterProxy.stackValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(5), GEStateUnlocked))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tloadPointfrom(point1Get(), originOop);\n\tloadPointfrom(point2Get(), dirOop);\n\tloadPointfrom(point3Get(), nrmOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFBadPoint);\n\t}\n\tfill = loadGradientFillfromalongnormalisRadial(rampOop, point1Get(), point2Get(), point3Get(), isRadial);\n\tif (engineStopped) {\n\n\t\t/* Make sure the stack is okay */\n\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.popthenPush(6, interpreterProxy.positive32BitIntegerFor(fill));\n}\n\nfunction primitiveAddLine() {\n\tvar endOop;\n\tvar failureCode;\n\tvar leftFill;\n\tvar rightFill;\n\tvar startOop;\n\n\n\t/* Fail if we have the wrong number of arguments */\n\n\tif (interpreterProxy.methodArgumentCount() !== 4) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\trightFill = interpreterProxy.positive32BitValueOf(interpreterProxy.stackValue(0));\n\tleftFill = interpreterProxy.positive32BitValueOf(interpreterProxy.stackValue(1));\n\tendOop = interpreterProxy.stackObjectValue(2);\n\tstartOop = interpreterProxy.stackObjectValue(3);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(4), GEStateUnlocked))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tif (!(isFillOkay(leftFill) && (isFillOkay(rightFill)))) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFWrongFill);\n\t}\n\tloadPointfrom(point1Get(), startOop);\n\tloadPointfrom(point2Get(), endOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFBadPoint);\n\t}\n\ttransformPoints(2);\n\tleftFill = transformColor(leftFill);\n\trightFill = transformColor(rightFill);\n\tif (engineStopped) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineStopped);\n\t}\n\tloadWideLinefromtolineFillleftFillrightFill(0, point1Get(), point2Get(), 0, leftFill, rightFill);\n\tif (engineStopped) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(4);\n}\n\nfunction primitiveAddOval() {\n\tvar borderIndex;\n\tvar borderWidth;\n\tvar endOop;\n\tvar failureCode;\n\tvar fillIndex;\n\tvar startOop;\n\n\n\t/* Fail if we have the wrong number of arguments */\n\n\tif (interpreterProxy.methodArgumentCount() !== 5) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tborderIndex = interpreterProxy.positive32BitValueOf(interpreterProxy.stackValue(0));\n\tborderWidth = interpreterProxy.stackIntegerValue(1);\n\tfillIndex = interpreterProxy.positive32BitValueOf(interpreterProxy.stackValue(2));\n\tendOop = interpreterProxy.stackObjectValue(3);\n\tstartOop = interpreterProxy.stackObjectValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(5), GEStateUnlocked))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tif (!(isFillOkay(borderIndex) && (isFillOkay(fillIndex)))) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFWrongFill);\n\t}\n\tfillIndex = transformColor(fillIndex);\n\tborderIndex = transformColor(borderIndex);\n\tif (engineStopped) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineStopped);\n\t}\n\tif ((fillIndex === 0) && ((borderIndex === 0) || (borderWidth <= 0))) {\n\t\treturn interpreterProxy.pop(5);\n\t}\n\tif (!needAvailableSpace(16 * GBBaseSize)) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFWorkTooBig);\n\t}\n\tif ((borderWidth > 0) && (borderIndex !== 0)) {\n\t\tborderWidth = transformWidth(borderWidth);\n\t} else {\n\t\tborderWidth = 0;\n\t}\n\tloadPointfrom(point1Get(), startOop);\n\tloadPointfrom(point2Get(), endOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFBadPoint);\n\t}\n\tloadOvallineFillleftFillrightFill(borderWidth, borderIndex, 0, fillIndex);\n\tif (engineStopped) {\n\t\twbStackClear();\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\tneedsFlushPut(1);\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(5);\n}\n\nfunction primitiveAddPolygon() {\n\tvar failureCode;\n\tvar fillIndex;\n\tvar length;\n\tvar lineFill;\n\tvar lineWidth;\n\tvar nPoints;\n\tvar points;\n\tvar pointsIsArray;\n\tvar segSize;\n\n\n\t/* Fail if we have the wrong number of arguments */\n\n\tif (interpreterProxy.methodArgumentCount() !== 5) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tlineFill = interpreterProxy.positive32BitValueOf(interpreterProxy.stackValue(0));\n\tlineWidth = interpreterProxy.stackIntegerValue(1);\n\tfillIndex = interpreterProxy.positive32BitValueOf(interpreterProxy.stackValue(2));\n\tnPoints = interpreterProxy.stackIntegerValue(3);\n\tpoints = interpreterProxy.stackObjectValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(5), GEStateUnlocked))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tlength = SIZEOF(points);\n\tif (interpreterProxy.isWords(points)) {\n\n\t\t/* Either PointArray or ShortPointArray */\n\n\t\tpointsIsArray = false;\n\t\tif (!((length === nPoints) || ((nPoints * 2) === length))) {\n\t\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t\t}\n\t} else {\n\n\t\t/* Must be Array of points */\n\n\t\tif (!interpreterProxy.isArray(points)) {\n\t\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t\t}\n\t\tif (length !== nPoints) {\n\t\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t\t}\n\t\tpointsIsArray = true;\n\t}\n\tif ((lineWidth === 0) || (lineFill === 0)) {\n\t\tsegSize = GLBaseSize;\n\t} else {\n\t\tsegSize = GLWideSize;\n\t}\n\tif (!needAvailableSpace(segSize * nPoints)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (!(isFillOkay(lineFill) && (isFillOkay(fillIndex)))) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFWrongFill);\n\t}\n\tlineFill = transformColor(lineFill);\n\tfillIndex = transformColor(fillIndex);\n\tif (engineStopped) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (((lineFill === 0) || (lineWidth === 0)) && (fillIndex === 0)) {\n\t\treturn interpreterProxy.pop(5);\n\t}\n\tif (lineWidth !== 0) {\n\t\tlineWidth = transformWidth(lineWidth);\n\t}\n\tif (pointsIsArray) {\n\t\tloadArrayPolygonnPointsfilllineWidthlineFill(points, nPoints, fillIndex, lineWidth, lineFill);\n\t} else {\n\t\tloadPolygonnPointsfilllineWidthlineFillpointsShort(points.wordsAsInt32Array(), nPoints, fillIndex, lineWidth, lineFill, nPoints === length);\n\t}\n\tif (engineStopped) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\tneedsFlushPut(1);\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(5);\n}\n\nfunction primitiveAddRect() {\n\tvar borderIndex;\n\tvar borderWidth;\n\tvar endOop;\n\tvar failureCode;\n\tvar fillIndex;\n\tvar startOop;\n\n\n\t/* Fail if we have the wrong number of arguments */\n\n\tif (interpreterProxy.methodArgumentCount() !== 5) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tborderIndex = interpreterProxy.positive32BitValueOf(interpreterProxy.stackValue(0));\n\tborderWidth = interpreterProxy.stackIntegerValue(1);\n\tfillIndex = interpreterProxy.positive32BitValueOf(interpreterProxy.stackValue(2));\n\tendOop = interpreterProxy.stackObjectValue(3);\n\tstartOop = interpreterProxy.stackObjectValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(5), GEStateUnlocked))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tif (!(isFillOkay(borderIndex) && (isFillOkay(fillIndex)))) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFWrongFill);\n\t}\n\tborderIndex = transformColor(borderIndex);\n\tfillIndex = transformColor(fillIndex);\n\tif (engineStopped) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineStopped);\n\t}\n\tif ((fillIndex === 0) && ((borderIndex === 0) || (borderWidth === 0))) {\n\t\treturn interpreterProxy.pop(5);\n\t}\n\tif (!needAvailableSpace(4 * GLBaseSize)) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFWorkTooBig);\n\t}\n\tif ((borderWidth > 0) && (borderIndex !== 0)) {\n\t\tborderWidth = transformWidth(borderWidth);\n\t} else {\n\t\tborderWidth = 0;\n\t}\n\tloadPointfrom(point1Get(), startOop);\n\tloadPointfrom(point3Get(), endOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFBadPoint);\n\t}\n\tpoint2Get()[0] = point3Get()[0];\n\tpoint2Get()[1] = point1Get()[1];\n\tpoint4Get()[0] = point1Get()[0];\n\tpoint4Get()[1] = point3Get()[1];\n\ttransformPoints(4);\n\tloadRectanglelineFillleftFillrightFill(borderWidth, borderIndex, 0, fillIndex);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\tneedsFlushPut(1);\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(5);\n}\n\n\n/*\tNote: No need to load either bitBlt or spanBuffer */\n\nfunction primitiveChangedActiveEdgeEntry() {\n\tvar edge;\n\tvar edgeOop;\n\tvar failureCode;\n\n\tif (doProfileStats) {\n\t\tgeProfileTime = interpreterProxy.ioMicroMSecs();\n\t}\n\tif (interpreterProxy.methodArgumentCount() !== 1) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(1), GEStateWaitingChange))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tedgeOop = interpreterProxy.stackObjectValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tedge = loadEdgeStateFrom(edgeOop);\n\tif (!edge) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEdgeDataTooSmall);\n\t}\n\tif (edgeNumLinesOf(edge) === 0) {\n\t\tremoveFirstAETEntry();\n\t} else {\n\t\tresortFirstAETEntry();\n\t\taetStartPut(aetStartGet() + 1);\n\t}\n\tstatePut(GEStateUpdateEdges);\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(1);\n\tif (doProfileStats) {\n\t\tincrementStatby(GWCountChangeAETEntry, 1);\n\t\tincrementStatby(GWTimeChangeAETEntry, interpreterProxy.ioMicroMSecs() - geProfileTime);\n\t}\n}\n\nfunction primitiveCopyBuffer() {\n\tvar buf1;\n\tvar buf2;\n\tvar diff;\n\tvar dst;\n\tvar failCode;\n\tvar i;\n\tvar src;\n\tvar iLimiT;\n\n\tif (interpreterProxy.methodArgumentCount() !== 2) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tbuf2 = interpreterProxy.stackValue(0);\n\n\t/* Make sure the old buffer is properly initialized */\n\n\tbuf1 = interpreterProxy.stackValue(1);\n\tif (((failCode = loadWorkBufferFrom(buf1))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failCode);\n\t}\n\tif (CLASSOF(buf1) !== CLASSOF(buf2)) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFClassMismatch);\n\t}\n\tdiff = SIZEOF(buf2) - SIZEOF(buf1);\n\tif (diff < 0) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFSizeMismatch);\n\t}\n\tsrc = workBuffer;\n\tdst = buf2.wordsAsInt32Array();\n\tfor (i = 0, iLimiT = (wbTopGet() - 1); i <= iLimiT; i++) {\n\t\tdst[i] = src[i];\n\t}\n\tdst[GWBufferTop] = (wbTopGet() + diff);\n\tdst[GWSize] = (wbSizeGet() + diff);\n\tsrc = PTR_ADD(src, wbTopGet());\n\tdst = PTR_ADD(dst, wbTopGet() + diff);\n\tfor (i = 0, iLimiT = ((wbSizeGet() - wbTopGet()) - 1); i <= iLimiT; i++) {\n\t\tdst[i] = src[i];\n\t}\n\tif (((failCode = loadWorkBufferFrom(buf2))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failCode);\n\t}\n\tinterpreterProxy.pop(2);\n}\n\n\n/*\tNote: Must load bitBlt and spanBuffer */\n\nfunction primitiveDisplaySpanBuffer() {\n\tvar failureCode;\n\n\tif (doProfileStats) {\n\t\tgeProfileTime = interpreterProxy.ioMicroMSecs();\n\t}\n\tif (interpreterProxy.methodArgumentCount() !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(0), GEStateBlitBuffer))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tif (((failureCode = loadSpanBufferFrom(interpreterProxy.fetchPointerofObject(BESpanIndex, engine)))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tif (!loadBitBltFrom(interpreterProxy.fetchPointerofObject(BEBitBltIndex, engine))) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFBitBltLoadFailed);\n\t}\n\tif ((currentYGet() & aaScanMaskGet()) === aaScanMaskGet()) {\n\t\tdisplaySpanBufferAt(currentYGet());\n\t\tpostDisplayAction();\n\t}\n\tif (!finishedProcessing()) {\n\t\taetStartPut(0);\n\t\tcurrentYPut(currentYGet() + 1);\n\t\tstatePut(GEStateUpdateEdges);\n\t}\n\tstoreEngineStateInto(engine);\n\tif (doProfileStats) {\n\t\tincrementStatby(GWCountDisplaySpan, 1);\n\t\tincrementStatby(GWTimeDisplaySpan, interpreterProxy.ioMicroMSecs() - geProfileTime);\n\t}\n}\n\n\n/*\tTurn on/off profiling. Return the old value of the flag. */\n\nfunction primitiveDoProfileStats() {\n\tvar newValue;\n\tvar oldValue;\n\n\toldValue = doProfileStats;\n\tnewValue = interpreterProxy.stackObjectValue(0);\n\tnewValue = interpreterProxy.booleanValueOf(newValue);\n\tif (!interpreterProxy.failed()) {\n\t\tdoProfileStats = newValue;\n\t\tinterpreterProxy.pop(2);\n\t\tinterpreterProxy.pushBool(oldValue);\n\t}\n}\n\nfunction primitiveFinishedProcessing() {\n\tvar failureCode;\n\tvar finished;\n\n\tif (doProfileStats) {\n\t\tgeProfileTime = interpreterProxy.ioMicroMSecs();\n\t}\n\tif (interpreterProxy.methodArgumentCount() !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFrom(interpreterProxy.stackValue(0)))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tfinished = finishedProcessing();\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(1);\n\tinterpreterProxy.pushBool(finished);\n\tif (doProfileStats) {\n\t\tincrementStatby(GWCountFinishTest, 1);\n\t\tincrementStatby(GWTimeFinishTest, interpreterProxy.ioMicroMSecs() - geProfileTime);\n\t}\n}\n\nfunction primitiveGetAALevel() {\n\tvar failureCode;\n\n\tif (interpreterProxy.methodArgumentCount() !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFrom(interpreterProxy.stackValue(0)))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tinterpreterProxy.pop(1);\n\tinterpreterProxy.pushInteger(aaLevelGet());\n}\n\nfunction primitiveGetBezierStats() {\n\tvar failureCode;\n\tvar statOop;\n\tvar stats;\n\n\tif (interpreterProxy.methodArgumentCount() !== 1) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFrom(interpreterProxy.stackValue(1)))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tstatOop = interpreterProxy.stackObjectValue(0);\n\tif (!(!interpreterProxy.failed() && (interpreterProxy.isWords(statOop) && (SIZEOF(statOop) >= 4)))) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tstats = statOop.wordsAsInt32Array();\n\tstats[0] = (stats[0] + workBuffer[GWBezierMonotonSubdivisions]);\n\tstats[1] = (stats[1] + workBuffer[GWBezierHeightSubdivisions]);\n\tstats[2] = (stats[2] + workBuffer[GWBezierOverflowSubdivisions]);\n\tstats[3] = (stats[3] + workBuffer[GWBezierLineConversions]);\n\tinterpreterProxy.pop(1);\n}\n\nfunction primitiveGetClipRect() {\n\tvar failureCode;\n\tvar pointOop;\n\tvar rectOop;\n\n\tif (interpreterProxy.methodArgumentCount() !== 1) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFrom(interpreterProxy.stackValue(1)))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\trectOop = interpreterProxy.stackObjectValue(0);\n\tif (!(!interpreterProxy.failed() && (interpreterProxy.isPointers(rectOop) && (SIZEOF(rectOop) >= 2)))) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tinterpreterProxy.pushRemappableOop(rectOop);\n\tpointOop = interpreterProxy.makePointwithxValueyValue(clipMinXGet(), clipMinYGet());\n\tinterpreterProxy.storePointerofObjectwithValue(0, interpreterProxy.topRemappableOop(), pointOop);\n\tpointOop = interpreterProxy.makePointwithxValueyValue(clipMaxXGet(), clipMaxYGet());\n\trectOop = interpreterProxy.popRemappableOop();\n\tinterpreterProxy.storePointerofObjectwithValue(1, rectOop, pointOop);\n\tinterpreterProxy.popthenPush(2, rectOop);\n}\n\nfunction primitiveGetCounts() {\n\tvar failureCode;\n\tvar statOop;\n\tvar stats;\n\n\tif (interpreterProxy.methodArgumentCount() !== 1) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFrom(interpreterProxy.stackValue(1)))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tstatOop = interpreterProxy.stackObjectValue(0);\n\tif (!(!interpreterProxy.failed() && (interpreterProxy.isWords(statOop) && (SIZEOF(statOop) >= 9)))) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tstats = statOop.wordsAsInt32Array();\n\tstats[0] = (stats[0] + workBuffer[GWCountInitializing]);\n\tstats[1] = (stats[1] + workBuffer[GWCountFinishTest]);\n\tstats[2] = (stats[2] + workBuffer[GWCountNextGETEntry]);\n\tstats[3] = (stats[3] + workBuffer[GWCountAddAETEntry]);\n\tstats[4] = (stats[4] + workBuffer[GWCountNextFillEntry]);\n\tstats[5] = (stats[5] + workBuffer[GWCountMergeFill]);\n\tstats[6] = (stats[6] + workBuffer[GWCountDisplaySpan]);\n\tstats[7] = (stats[7] + workBuffer[GWCountNextAETEntry]);\n\tstats[8] = (stats[8] + workBuffer[GWCountChangeAETEntry]);\n\tinterpreterProxy.pop(1);\n}\n\nfunction primitiveGetDepth() {\n\tvar failureCode;\n\n\tif (interpreterProxy.methodArgumentCount() !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFrom(interpreterProxy.stackValue(0)))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tinterpreterProxy.pop(1);\n\tinterpreterProxy.pushInteger(currentZGet());\n}\n\n\n/*\tReturn the reason why the last operation failed. */\n\nfunction primitiveGetFailureReason() {\n\tvar failCode;\n\n\tif (interpreterProxy.methodArgumentCount() !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\n\t/* Note -- don't call loadEngineFrom here because this will override the stopReason with Zero */\n\n\tengine = interpreterProxy.stackValue(0);\n\tif (typeof engine === \"number\") {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineIsInteger);\n\t}\n\tif (!interpreterProxy.isPointers(engine)) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineIsWords);\n\t}\n\tif (SIZEOF(engine) < BEBalloonEngineSize) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineTooSmall);\n\t}\n\tif (((failCode = loadWorkBufferFrom(interpreterProxy.fetchPointerofObject(BEWorkBufferIndex, engine)))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failCode);\n\t}\n\tinterpreterProxy.pop(1);\n\tinterpreterProxy.pushInteger(stopReasonGet());\n}\n\nfunction primitiveGetOffset() {\n\tvar failureCode;\n\tvar pointOop;\n\n\tif (interpreterProxy.methodArgumentCount() !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFrom(interpreterProxy.stackValue(0)))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tpointOop = interpreterProxy.makePointwithxValueyValue(destOffsetXGet(), destOffsetYGet());\n\tinterpreterProxy.popthenPush(1, pointOop);\n}\n\nfunction primitiveGetTimes() {\n\tvar failureCode;\n\tvar statOop;\n\tvar stats;\n\n\tif (interpreterProxy.methodArgumentCount() !== 1) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFrom(interpreterProxy.stackValue(1)))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tstatOop = interpreterProxy.stackObjectValue(0);\n\tif (!(!interpreterProxy.failed() && (interpreterProxy.isWords(statOop) && (SIZEOF(statOop) >= 9)))) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tstats = statOop.wordsAsInt32Array();\n\tstats[0] = (stats[0] + workBuffer[GWTimeInitializing]);\n\tstats[1] = (stats[1] + workBuffer[GWTimeFinishTest]);\n\tstats[2] = (stats[2] + workBuffer[GWTimeNextGETEntry]);\n\tstats[3] = (stats[3] + workBuffer[GWTimeAddAETEntry]);\n\tstats[4] = (stats[4] + workBuffer[GWTimeNextFillEntry]);\n\tstats[5] = (stats[5] + workBuffer[GWTimeMergeFill]);\n\tstats[6] = (stats[6] + workBuffer[GWTimeDisplaySpan]);\n\tstats[7] = (stats[7] + workBuffer[GWTimeNextAETEntry]);\n\tstats[8] = (stats[8] + workBuffer[GWTimeChangeAETEntry]);\n\tinterpreterProxy.pop(1);\n}\n\nfunction primitiveInitializeBuffer() {\n\tvar size;\n\tvar wbOop;\n\n\tif (interpreterProxy.methodArgumentCount() !== 1) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\twbOop = interpreterProxy.stackObjectValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(wbOop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (((size = SIZEOF(wbOop))) < GWMinimalSize) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tworkBufferPut(wbOop);\n\tobjBuffer = PTR_ADD(workBuffer, GWHeaderSize);\n\tmagicNumberPut(GWMagicNumber);\n\twbSizePut(size);\n\twbTopPut(size);\n\tstatePut(GEStateUnlocked);\n\tobjStartPut(GWHeaderSize);\n\tobjUsedPut(4);\n\tobjectTypeOfput(0, GEPrimitiveFill);\n\tobjectLengthOfput(0, 4);\n\tobjectIndexOfput(0, 0);\n\tgetStartPut(0);\n\tgetUsedPut(0);\n\taetStartPut(0);\n\taetUsedPut(0);\n\tstopReasonPut(0);\n\tneedsFlushPut(0);\n\tclipMinXPut(0);\n\tclipMaxXPut(0);\n\tclipMinYPut(0);\n\tclipMaxYPut(0);\n\tcurrentZPut(0);\n\tresetGraphicsEngineStats();\n\tinitEdgeTransform();\n\tinitColorTransform();\n\tinterpreterProxy.pop(2);\n\tinterpreterProxy.push(wbOop);\n}\n\n\n/*\tNote: No need to load bitBlt but must load spanBuffer */\n\nfunction primitiveInitializeProcessing() {\n\tvar failureCode;\n\n\tif (doProfileStats) {\n\t\tgeProfileTime = interpreterProxy.ioMicroMSecs();\n\t}\n\tif (interpreterProxy.methodArgumentCount() !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(0), GEStateUnlocked))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tif (((failureCode = loadSpanBufferFrom(interpreterProxy.fetchPointerofObject(BESpanIndex, engine)))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tinitializeGETProcessing();\n\tif (engineStopped) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineStopped);\n\t}\n\tstatePut(GEStateAddingFromGET);\n\tif (!interpreterProxy.failed()) {\n\t\tstoreEngineStateInto(engine);\n\t}\n\tif (doProfileStats) {\n\t\tincrementStatby(GWCountInitializing, 1);\n\t\tincrementStatby(GWTimeInitializing, interpreterProxy.ioMicroMSecs() - geProfileTime);\n\t}\n}\n\n\n/*\tNote: No need to load bitBlt but must load spanBuffer */\n\nfunction primitiveMergeFillFrom() {\n\tvar bitsOop;\n\tvar failureCode;\n\tvar fillOop;\n\tvar value;\n\n\tif (doProfileStats) {\n\t\tgeProfileTime = interpreterProxy.ioMicroMSecs();\n\t}\n\tif (interpreterProxy.methodArgumentCount() !== 2) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(2), GEStateWaitingForFill))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tif (((failureCode = loadSpanBufferFrom(interpreterProxy.fetchPointerofObject(BESpanIndex, engine)))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tfillOop = interpreterProxy.stackObjectValue(0);\n\n\t/* Check bitmap */\n\n\tbitsOop = interpreterProxy.stackObjectValue(1);\n\tif (!(!interpreterProxy.failed() && (CLASSOF(bitsOop) === interpreterProxy.classBitmap()))) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (SIZEOF(fillOop) < FTBalloonFillDataSize) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFFillDataTooSmall);\n\t}\n\tvalue = interpreterProxy.fetchIntegerofObject(FTIndexIndex, fillOop);\n\tif (objectIndexOf(lastExportedFillGet()) !== value) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFWrongFill);\n\t}\n\tvalue = interpreterProxy.fetchIntegerofObject(FTMinXIndex, fillOop);\n\tif (lastExportedLeftXGet() !== value) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFWrongFill);\n\t}\n\tvalue = interpreterProxy.fetchIntegerofObject(FTMaxXIndex, fillOop);\n\tif (lastExportedRightXGet() !== value) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFWrongFill);\n\t}\n\tif (SIZEOF(bitsOop) < (lastExportedRightXGet() - lastExportedLeftXGet())) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tfillBitmapSpanfromto(bitsOop.wordsAsInt32Array(), lastExportedLeftXGet(), lastExportedRightXGet());\n\tstatePut(GEStateScanningAET);\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(2);\n\tif (doProfileStats) {\n\t\tincrementStatby(GWCountMergeFill, 1);\n\t\tincrementStatby(GWTimeMergeFill, interpreterProxy.ioMicroMSecs() - geProfileTime);\n\t}\n}\n\nfunction primitiveNeedsFlush() {\n\tvar failureCode;\n\tvar needFlush;\n\n\tif (interpreterProxy.methodArgumentCount() !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFrom(interpreterProxy.stackValue(0)))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tneedFlush = needsFlush();\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(1);\n\tinterpreterProxy.pushBool(needFlush);\n}\n\nfunction primitiveNeedsFlushPut() {\n\tvar failureCode;\n\tvar needFlush;\n\n\tif (interpreterProxy.methodArgumentCount() !== 1) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFrom(interpreterProxy.stackValue(1)))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tneedFlush = interpreterProxy.booleanValueOf(interpreterProxy.stackValue(0));\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (needFlush === true) {\n\t\tneedsFlushPut(1);\n\t} else {\n\t\tneedsFlushPut(0);\n\t}\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(1);\n}\n\n\n/*\tNote: No need to load either bitBlt or spanBuffer */\n\nfunction primitiveNextActiveEdgeEntry() {\n\tvar edge;\n\tvar edgeOop;\n\tvar failureCode;\n\tvar hasEdge;\n\n\tif (doProfileStats) {\n\t\tgeProfileTime = interpreterProxy.ioMicroMSecs();\n\t}\n\tif (interpreterProxy.methodArgumentCount() !== 1) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredStateor(interpreterProxy.stackValue(1), GEStateUpdateEdges, GEStateCompleted))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tedgeOop = interpreterProxy.stackObjectValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\thasEdge = false;\n\tif (stateGet() !== GEStateCompleted) {\n\t\thasEdge = findNextExternalUpdateFromAET();\n\t\tif (hasEdge) {\n\t\t\tedge = aetBuffer[aetStartGet()];\n\t\t\tstoreEdgeStateFrominto(edge, edgeOop);\n\t\t\tstatePut(GEStateWaitingChange);\n\t\t} else {\n\t\t\tstatePut(GEStateAddingFromGET);\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(2);\n\tinterpreterProxy.pushBool(!hasEdge);\n\tif (doProfileStats) {\n\t\tincrementStatby(GWCountNextAETEntry, 1);\n\t\tincrementStatby(GWTimeNextAETEntry, interpreterProxy.ioMicroMSecs() - geProfileTime);\n\t}\n}\n\n\n/*\tNote: No need to load bitBlt but must load spanBuffer */\n\nfunction primitiveNextFillEntry() {\n\tvar failureCode;\n\tvar fillOop;\n\tvar hasFill;\n\n\tif (doProfileStats) {\n\t\tgeProfileTime = interpreterProxy.ioMicroMSecs();\n\t}\n\tif (interpreterProxy.methodArgumentCount() !== 1) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(1), GEStateScanningAET))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tif (((failureCode = loadSpanBufferFrom(interpreterProxy.fetchPointerofObject(BESpanIndex, engine)))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tif (!loadFormsFrom(interpreterProxy.fetchPointerofObject(BEFormsIndex, engine))) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFFormLoadFailed);\n\t}\n\tif (clearSpanBufferGet() !== 0) {\n\t\tif ((currentYGet() & aaScanMaskGet()) === 0) {\n\t\t\tclearSpanBuffer();\n\t\t}\n\t\tclearSpanBufferPut(0);\n\t}\n\tfillOop = interpreterProxy.stackObjectValue(0);\n\thasFill = findNextExternalFillFromAET();\n\tif (engineStopped) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (hasFill) {\n\t\tstoreFillStateInto(fillOop);\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFWrongFill);\n\t}\n\tif (hasFill) {\n\t\tstatePut(GEStateWaitingForFill);\n\t} else {\n\t\twbStackClear();\n\t\tspanEndAAPut(0);\n\t\tstatePut(GEStateBlitBuffer);\n\t}\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(2);\n\tinterpreterProxy.pushBool(!hasFill);\n\tif (doProfileStats) {\n\t\tincrementStatby(GWCountNextFillEntry, 1);\n\t\tincrementStatby(GWTimeNextFillEntry, interpreterProxy.ioMicroMSecs() - geProfileTime);\n\t}\n}\n\n\n/*\tNote: No need to load either bitBlt or spanBuffer */\n\nfunction primitiveNextGlobalEdgeEntry() {\n\tvar edge;\n\tvar edgeOop;\n\tvar failureCode;\n\tvar hasEdge;\n\n\tif (doProfileStats) {\n\t\tgeProfileTime = interpreterProxy.ioMicroMSecs();\n\t}\n\tif (interpreterProxy.methodArgumentCount() !== 1) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(1), GEStateAddingFromGET))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tedgeOop = interpreterProxy.stackObjectValue(0);\n\thasEdge = findNextExternalEntryFromGET();\n\tif (hasEdge) {\n\t\tedge = getBuffer[getStartGet()];\n\t\tstoreEdgeStateFrominto(edge, edgeOop);\n\t\tgetStartPut(getStartGet() + 1);\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFWrongEdge);\n\t}\n\tif (hasEdge) {\n\t\tstatePut(GEStateWaitingForEdge);\n\t} else {\n\n\t\t/* Start scanning the AET */\n\n\t\tstatePut(GEStateScanningAET);\n\t\tclearSpanBufferPut(1);\n\t\taetStartPut(0);\n\t\twbStackClear();\n\t}\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(2);\n\tinterpreterProxy.pushBool(!hasEdge);\n\tif (doProfileStats) {\n\t\tincrementStatby(GWCountNextGETEntry, 1);\n\t\tincrementStatby(GWTimeNextGETEntry, interpreterProxy.ioMicroMSecs() - geProfileTime);\n\t}\n}\n\nfunction primitiveRegisterExternalEdge() {\n\tvar edge;\n\tvar failureCode;\n\tvar index;\n\tvar initialX;\n\tvar initialY;\n\tvar initialZ;\n\tvar leftFillIndex;\n\tvar rightFillIndex;\n\n\tif (interpreterProxy.methodArgumentCount() !== 6) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(6), GEStateUnlocked))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\trightFillIndex = interpreterProxy.positive32BitValueOf(interpreterProxy.stackValue(0));\n\tleftFillIndex = interpreterProxy.positive32BitValueOf(interpreterProxy.stackValue(1));\n\tinitialZ = interpreterProxy.stackIntegerValue(2);\n\tinitialY = interpreterProxy.stackIntegerValue(3);\n\tinitialX = interpreterProxy.stackIntegerValue(4);\n\tindex = interpreterProxy.stackIntegerValue(5);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tif (!allocateObjEntry(GEBaseEdgeSize)) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFWorkTooBig);\n\t}\n\tif (!(isFillOkay(leftFillIndex) && (isFillOkay(rightFillIndex)))) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFWrongFill);\n\t}\n\tedge = objUsed;\n\n\t/* Install type and length */\n\n\tobjUsed = edge + GEBaseEdgeSize;\n\tobjectTypeOfput(edge, GEPrimitiveEdge);\n\tobjectLengthOfput(edge, GEBaseEdgeSize);\n\tobjectIndexOfput(edge, index);\n\tedgeXValueOfput(edge, initialX);\n\tedgeYValueOfput(edge, initialY);\n\tedgeZValueOfput(edge, initialZ);\n\tedgeLeftFillOfput(edge, transformColor(leftFillIndex));\n\tedgeRightFillOfput(edge, transformColor(rightFillIndex));\n\tif (engineStopped) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEngineStopped);\n\t}\n\tif (!interpreterProxy.failed()) {\n\t\tstoreEngineStateInto(engine);\n\t\tinterpreterProxy.pop(6);\n\t}\n}\n\nfunction primitiveRegisterExternalFill() {\n\tvar failureCode;\n\tvar fill;\n\tvar index;\n\n\tif (interpreterProxy.methodArgumentCount() !== 1) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(1), GEStateUnlocked))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tindex = interpreterProxy.stackIntegerValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tfill = 0;\n\twhile (fill === 0) {\n\t\tif (!allocateObjEntry(GEBaseEdgeSize)) {\n\t\t\treturn interpreterProxy.primitiveFailFor(GEFWorkTooBig);\n\t\t}\n\t\tfill = objUsed;\n\n\t\t/* Install type and length */\n\n\t\tobjUsed = fill + GEBaseFillSize;\n\t\tobjectTypeOfput(fill, GEPrimitiveFill);\n\t\tobjectLengthOfput(fill, GEBaseFillSize);\n\t\tobjectIndexOfput(fill, index);\n\t}\n\tif (!interpreterProxy.failed()) {\n\t\tstoreEngineStateInto(engine);\n\t\tinterpreterProxy.pop(2);\n\t\tinterpreterProxy.pushInteger(fill);\n\t}\n}\n\n\n/*\tStart/Proceed rendering the entire image */\n\nfunction primitiveRenderImage() {\n\tvar failCode;\n\n\tif (((failCode = loadRenderingState())) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failCode);\n\t}\n\tproceedRenderingScanline();\n\tif (engineStopped) {\n\t\treturn storeRenderingState();\n\t}\n\tproceedRenderingImage();\n\tstoreRenderingState();\n}\n\n\n/*\tStart rendering the entire image */\n\nfunction primitiveRenderScanline() {\n\tvar failCode;\n\n\tif (((failCode = loadRenderingState())) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failCode);\n\t}\n\tproceedRenderingScanline();\n\tstoreRenderingState();\n}\n\nfunction primitiveSetAALevel() {\n\tvar failureCode;\n\tvar level;\n\n\tif (interpreterProxy.methodArgumentCount() !== 1) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(1), GEStateUnlocked))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tlevel = interpreterProxy.stackIntegerValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tsetAALevel(level);\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(1);\n}\n\n\n/*\tPrimitive. Set the BitBlt plugin to use. */\n\nfunction primitiveSetBitBltPlugin() {\n\tvar i;\n\tvar length;\n\tvar needReload;\n\tvar pluginName;\n\tvar ptr;\n\n\n\t/* Must be string to work */\n\n\tpluginName = interpreterProxy.stackValue(0);\n\tif (!interpreterProxy.isBytes(pluginName)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tlength = BYTESIZEOF(pluginName);\n\tif (length >= 256) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tptr = pluginName.bytes;\n\tneedReload = false;\n\n // JS hack: can't copy bytes as in the C version\n var newPluginName = pluginName.bytesAsString();\n if (newPluginName !== bbPluginName) {\n bbPluginName = newPluginName;\n needReload = true;\n }\n\n\tif (needReload) {\n\t\tif (!initialiseModule()) {\n\t\t\treturn interpreterProxy.primitiveFail();\n\t\t}\n\t}\n\tinterpreterProxy.pop(1);\n}\n\nfunction primitiveSetClipRect() {\n\tvar failureCode;\n\tvar rectOop;\n\n\tif (interpreterProxy.methodArgumentCount() !== 1) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(1), GEStateUnlocked))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\trectOop = interpreterProxy.stackObjectValue(0);\n\tif (!(!interpreterProxy.failed() && (interpreterProxy.isPointers(rectOop) && (SIZEOF(rectOop) >= 2)))) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tloadPointfrom(point1Get(), interpreterProxy.fetchPointerofObject(0, rectOop));\n\tloadPointfrom(point2Get(), interpreterProxy.fetchPointerofObject(1, rectOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tclipMinXPut(point1Get()[0]);\n\tclipMinYPut(point1Get()[1]);\n\tclipMaxXPut(point2Get()[0]);\n\tclipMaxYPut(point2Get()[1]);\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(1);\n}\n\nfunction primitiveSetColorTransform() {\n\tvar failureCode;\n\tvar transformOop;\n\n\tif (interpreterProxy.methodArgumentCount() !== 1) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(1), GEStateUnlocked))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\ttransformOop = interpreterProxy.stackObjectValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tloadColorTransformFrom(transformOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(GEFEntityLoadFailed);\n\t}\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(1);\n}\n\nfunction primitiveSetDepth() {\n\tvar depth;\n\tvar failureCode;\n\n\tif (interpreterProxy.methodArgumentCount() !== 1) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(1), GEStateUnlocked))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tdepth = interpreterProxy.stackIntegerValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tcurrentZPut(depth);\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(1);\n}\n\nfunction primitiveSetEdgeTransform() {\n\tvar failureCode;\n\tvar transformOop;\n\n\tif (interpreterProxy.methodArgumentCount() !== 1) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(1), GEStateUnlocked))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\ttransformOop = interpreterProxy.stackObjectValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tloadEdgeTransformFrom(transformOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(1);\n}\n\nfunction primitiveSetOffset() {\n\tvar failureCode;\n\tvar pointOop;\n\n\tif (interpreterProxy.methodArgumentCount() !== 1) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadNumArgs);\n\t}\n\tif (((failureCode = quickLoadEngineFromrequiredState(interpreterProxy.stackValue(1), GEStateUnlocked))) !== 0) {\n\t\treturn interpreterProxy.primitiveFailFor(failureCode);\n\t}\n\tpointOop = interpreterProxy.stackValue(0);\n\tif (CLASSOF(pointOop) !== interpreterProxy.classPoint()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tloadPointfrom(point1Get(), pointOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFailFor(PrimErrBadArgument);\n\t}\n\tdestOffsetXPut(point1Get()[0]);\n\tdestOffsetYPut(point1Get()[1]);\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(1);\n}\n\n\n/*\tThis is the main rendering entry */\n\nfunction proceedRenderingImage() {\n\tvar external;\n\n\twhile (!(finishedProcessing())) {\n\t\tif (doProfileStats) {\n\t\t\tgeProfileTime = interpreterProxy.ioMicroMSecs();\n\t\t}\n\t\texternal = findNextExternalEntryFromGET();\n\t\tif (doProfileStats) {\n\t\t\tincrementStatby(GWCountNextGETEntry, 1);\n\t\t\tincrementStatby(GWTimeNextGETEntry, interpreterProxy.ioMicroMSecs() - geProfileTime);\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn statePut(GEStateAddingFromGET);\n\t\t}\n\t\tif (external) {\n\t\t\tstatePut(GEStateWaitingForEdge);\n\t\t\treturn stopBecauseOf(GErrorGETEntry);\n\t\t}\n\t\taetStartPut(0);\n\t\twbStackClear();\n\t\tclearSpanBufferPut(1);\n\t\tif (doProfileStats) {\n\t\t\tgeProfileTime = interpreterProxy.ioMicroMSecs();\n\t\t}\n\t\tif ((clearSpanBufferGet() !== 0) && ((currentYGet() & aaScanMaskGet()) === 0)) {\n\t\t\tclearSpanBuffer();\n\t\t}\n\t\tclearSpanBufferPut(0);\n\t\texternal = findNextExternalFillFromAET();\n\t\tif (doProfileStats) {\n\t\t\tincrementStatby(GWCountNextFillEntry, 1);\n\t\t\tincrementStatby(GWTimeNextFillEntry, interpreterProxy.ioMicroMSecs() - geProfileTime);\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn statePut(GEStateScanningAET);\n\t\t}\n\t\tif (external) {\n\t\t\tstatePut(GEStateWaitingForFill);\n\t\t\treturn stopBecauseOf(GErrorFillEntry);\n\t\t}\n\t\twbStackClear();\n\t\tspanEndAAPut(0);\n\t\tif (doProfileStats) {\n\t\t\tgeProfileTime = interpreterProxy.ioMicroMSecs();\n\t\t}\n\t\tif ((currentYGet() & aaScanMaskGet()) === aaScanMaskGet()) {\n\t\t\tdisplaySpanBufferAt(currentYGet());\n\t\t\tpostDisplayAction();\n\t\t}\n\t\tif (doProfileStats) {\n\t\t\tincrementStatby(GWCountDisplaySpan, 1);\n\t\t\tincrementStatby(GWTimeDisplaySpan, interpreterProxy.ioMicroMSecs() - geProfileTime);\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn statePut(GEStateBlitBuffer);\n\t\t}\n\t\tif (finishedProcessing()) {\n\t\t\treturn 0;\n\t\t}\n\t\taetStartPut(0);\n\t\tcurrentYPut(currentYGet() + 1);\n\t\tif (doProfileStats) {\n\t\t\tgeProfileTime = interpreterProxy.ioMicroMSecs();\n\t\t}\n\t\texternal = findNextExternalUpdateFromAET();\n\t\tif (doProfileStats) {\n\t\t\tincrementStatby(GWCountNextAETEntry, 1);\n\t\t\tincrementStatby(GWTimeNextAETEntry, interpreterProxy.ioMicroMSecs() - geProfileTime);\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn statePut(GEStateUpdateEdges);\n\t\t}\n\t\tif (external) {\n\t\t\tstatePut(GEStateWaitingChange);\n\t\t\treturn stopBecauseOf(GErrorAETEntry);\n\t\t}\n\t}\n}\n\n\n/*\tProceed rendering the current scan line.\n\tThis method may be called after some Smalltalk code has been executed inbetween. */\n/*\tThis is the main rendering entry */\n\nfunction proceedRenderingScanline() {\n\tvar external;\n\tvar state;\n\n\tstate = stateGet();\n\tif (state === GEStateUnlocked) {\n\t\tinitializeGETProcessing();\n\t\tif (engineStopped) {\n\t\t\treturn 0;\n\t\t}\n\t\tstate = GEStateAddingFromGET;\n\t}\n\tif (state === GEStateAddingFromGET) {\n\t\tif (doProfileStats) {\n\t\t\tgeProfileTime = interpreterProxy.ioMicroMSecs();\n\t\t}\n\t\texternal = findNextExternalEntryFromGET();\n\t\tif (doProfileStats) {\n\t\t\tincrementStatby(GWCountNextGETEntry, 1);\n\t\t\tincrementStatby(GWTimeNextGETEntry, interpreterProxy.ioMicroMSecs() - geProfileTime);\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn statePut(GEStateAddingFromGET);\n\t\t}\n\t\tif (external) {\n\t\t\tstatePut(GEStateWaitingForEdge);\n\t\t\treturn stopBecauseOf(GErrorGETEntry);\n\t\t}\n\t\taetStartPut(0);\n\t\twbStackClear();\n\t\tclearSpanBufferPut(1);\n\t\tstate = GEStateScanningAET;\n\t}\n\tif (state === GEStateScanningAET) {\n\t\tif (doProfileStats) {\n\t\t\tgeProfileTime = interpreterProxy.ioMicroMSecs();\n\t\t}\n\t\tif ((clearSpanBufferGet() !== 0) && ((currentYGet() & aaScanMaskGet()) === 0)) {\n\t\t\tclearSpanBuffer();\n\t\t}\n\t\tclearSpanBufferPut(0);\n\t\texternal = findNextExternalFillFromAET();\n\t\tif (doProfileStats) {\n\t\t\tincrementStatby(GWCountNextFillEntry, 1);\n\t\t\tincrementStatby(GWTimeNextFillEntry, interpreterProxy.ioMicroMSecs() - geProfileTime);\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn statePut(GEStateScanningAET);\n\t\t}\n\t\tif (external) {\n\t\t\tstatePut(GEStateWaitingForFill);\n\t\t\treturn stopBecauseOf(GErrorFillEntry);\n\t\t}\n\t\tstate = GEStateBlitBuffer;\n\t\twbStackClear();\n\t\tspanEndAAPut(0);\n\t}\n\tif (state === GEStateBlitBuffer) {\n\t\tif (doProfileStats) {\n\t\t\tgeProfileTime = interpreterProxy.ioMicroMSecs();\n\t\t}\n\t\tif ((currentYGet() & aaScanMaskGet()) === aaScanMaskGet()) {\n\t\t\tdisplaySpanBufferAt(currentYGet());\n\t\t\tpostDisplayAction();\n\t\t}\n\t\tif (doProfileStats) {\n\t\t\tincrementStatby(GWCountDisplaySpan, 1);\n\t\t\tincrementStatby(GWTimeDisplaySpan, interpreterProxy.ioMicroMSecs() - geProfileTime);\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn statePut(GEStateBlitBuffer);\n\t\t}\n\t\tif (finishedProcessing()) {\n\t\t\treturn 0;\n\t\t}\n\t\tstate = GEStateUpdateEdges;\n\t\taetStartPut(0);\n\t\tcurrentYPut(currentYGet() + 1);\n\t}\n\tif (state === GEStateUpdateEdges) {\n\t\tif (doProfileStats) {\n\t\t\tgeProfileTime = interpreterProxy.ioMicroMSecs();\n\t\t}\n\t\texternal = findNextExternalUpdateFromAET();\n\t\tif (doProfileStats) {\n\t\t\tincrementStatby(GWCountNextAETEntry, 1);\n\t\t\tincrementStatby(GWTimeNextAETEntry, interpreterProxy.ioMicroMSecs() - geProfileTime);\n\t\t}\n\t\tif (engineStopped) {\n\t\t\treturn statePut(GEStateUpdateEdges);\n\t\t}\n\t\tif (external) {\n\t\t\tstatePut(GEStateWaitingChange);\n\t\t\treturn stopBecauseOf(GErrorAETEntry);\n\t\t}\n\t\tstatePut(GEStateAddingFromGET);\n\t}\n}\n\n\n/*\tLoad the minimal required state from the engineOop, e.g., just the work buffer.\n\t Answer 0 on success or non-zero a failure code on failure */\n\nfunction quickLoadEngineFrom(engineOop) {\n\tvar failCode;\n\n\tif (interpreterProxy.failed()) {\n\t\treturn GEFAlreadyFailed;\n\t}\n\tif (typeof engineOop === \"number\") {\n\t\treturn GEFEngineIsInteger;\n\t}\n\tif (!interpreterProxy.isPointers(engineOop)) {\n\t\treturn GEFEngineIsWords;\n\t}\n\tif (SIZEOF(engineOop) < BEBalloonEngineSize) {\n\t\treturn GEFEngineTooSmall;\n\t}\n\tengine = engineOop;\n\tif (((failCode = loadWorkBufferFrom(interpreterProxy.fetchPointerofObject(BEWorkBufferIndex, engineOop)))) !== 0) {\n\t\treturn failCode;\n\t}\n\tstopReasonPut(0);\n\tobjUsed = objUsedGet();\n\tengineStopped = false;\n\treturn 0;\n}\n\nfunction quickLoadEngineFromrequiredState(oop, requiredState) {\n\tvar failureCode;\n\n\tif (((failureCode = quickLoadEngineFrom(oop))) !== 0) {\n\t\treturn failureCode;\n\t}\n\tif (stateGet() === requiredState) {\n\t\treturn 0;\n\t}\n\tstopReasonPut(GErrorBadState);\n\treturn GEFWrongState;\n}\n\nfunction quickLoadEngineFromrequiredStateor(oop, requiredState, alternativeState) {\n\tvar failureCode;\n\n\tif (((failureCode = quickLoadEngineFrom(oop))) !== 0) {\n\t\treturn failureCode;\n\t}\n\tif (stateGet() === requiredState) {\n\t\treturn 0;\n\t}\n\tif (stateGet() === alternativeState) {\n\t\treturn 0;\n\t}\n\tstopReasonPut(GErrorBadState);\n\treturn GEFWrongState;\n}\n\n\n/*\tRemove any top fills if they have become invalid. */\n\nfunction quickRemoveInvalidFillsAt(leftX) {\n\tif (stackFillSize() === 0) {\n\t\treturn null;\n\t}\n\twhile (topRightX() <= leftX) {\n\t\thideFilldepth(topFill(), topDepth());\n\t\tif (stackFillSize() === 0) {\n\t\t\treturn null;\n\t\t}\n\t}\n}\n\n\n/*\tSort elements i through j of self to be nondescending according to\n\tsortBlock. */\n/*\tNote: The original loop has been heavily re-written for C translation */\n\nfunction quickSortGlobalEdgeTablefromto(array, i, j) {\n\tvar again;\n\tvar before;\n\tvar di;\n\tvar dij;\n\tvar dj;\n\tvar ij;\n\tvar k;\n\tvar l;\n\tvar n;\n\tvar tmp;\n\tvar tt;\n\n\n\t/* The prefix d means the data at that index. */\n\n\tif (((n = (j + 1) - i)) <= 1) {\n\t\treturn 0;\n\t}\n\tdi = array[i];\n\tdj = array[j];\n\n\t/* i.e., should di precede dj? */\n\n\tbefore = getSortsbefore(di, dj);\n\tif (!before) {\n\t\ttmp = array[i];\n\t\tarray[i] = array[j];\n\t\tarray[j] = tmp;\n\t\ttt = di;\n\t\tdi = dj;\n\t\tdj = tt;\n\t}\n\tif (n <= 2) {\n\t\treturn 0;\n\t}\n\n\t/* ij is the midpoint of i and j. */\n\n\tij = (i + j) >> 1;\n\n\t/* Sort di,dij,dj. Make dij be their median. */\n\n\tdij = array[ij];\n\n\t/* i.e. should di precede dij? */\n\n\tbefore = getSortsbefore(di, dij);\n\tif (before) {\n\n\t\t/* i.e., should dij precede dj? */\n\n\t\tbefore = getSortsbefore(dij, dj);\n\t\tif (!before) {\n\n\t\t\t/* i.e., should dij precede dj? */\n\n\t\t\ttmp = array[j];\n\t\t\tarray[j] = array[ij];\n\t\t\tarray[ij] = tmp;\n\t\t\tdij = dj;\n\t\t}\n\t} else {\n\n\t\t/* i.e. di should come after dij */\n\n\t\ttmp = array[i];\n\t\tarray[i] = array[ij];\n\t\tarray[ij] = tmp;\n\t\tdij = di;\n\t}\n\tif (n <= 3) {\n\t\treturn 0;\n\t}\n\tk = i;\n\tl = j;\n\tagain = true;\n\twhile (again) {\n\t\tbefore = true;\n\t\twhile (before) {\n\t\t\tif (k <= ((--l))) {\n\t\t\t\ttmp = array[l];\n\t\t\t\tbefore = getSortsbefore(dij, tmp);\n\t\t\t} else {\n\t\t\t\tbefore = false;\n\t\t\t}\n\t\t}\n\t\tbefore = true;\n\t\twhile (before) {\n\t\t\tif (((++k)) <= l) {\n\t\t\t\ttmp = array[k];\n\t\t\t\tbefore = getSortsbefore(tmp, dij);\n\t\t\t} else {\n\t\t\t\tbefore = false;\n\t\t\t}\n\t\t}\n\t\tagain = k <= l;\n\t\tif (again) {\n\t\t\ttmp = array[k];\n\t\t\tarray[k] = array[l];\n\t\t\tarray[l] = tmp;\n\t\t}\n\t}\n\tquickSortGlobalEdgeTablefromto(array, i, l);\n\tquickSortGlobalEdgeTablefromto(array, k, j);\n}\n\nfunction rShiftTable() {\n\tvar theTable =\n\t\t[0, 5, 4, 0, 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1];\n\n\treturn theTable;\n}\n\nfunction removeFirstAETEntry() {\n\tvar index;\n\n\tindex = aetStartGet();\n\taetUsedPut(aetUsedGet() - 1);\n\twhile (index < aetUsedGet()) {\n\t\taetBuffer[index] = aetBuffer[index + 1];\n\t\t++index;\n\t}\n}\n\nfunction repeatValuemax(delta, maxValue) {\n\tvar newDelta;\n\n\tnewDelta = delta;\n\twhile (newDelta < 0) {\n\t\tnewDelta += maxValue;\n\t}\n\twhile (newDelta >= maxValue) {\n\t\tnewDelta -= maxValue;\n\t}\n\treturn newDelta;\n}\n\nfunction resetGraphicsEngineStats() {\n\tworkBuffer[GWTimeInitializing] = 0;\n\tworkBuffer[GWTimeFinishTest] = 0;\n\tworkBuffer[GWTimeNextGETEntry] = 0;\n\tworkBuffer[GWTimeAddAETEntry] = 0;\n\tworkBuffer[GWTimeNextFillEntry] = 0;\n\tworkBuffer[GWTimeMergeFill] = 0;\n\tworkBuffer[GWTimeDisplaySpan] = 0;\n\tworkBuffer[GWTimeNextAETEntry] = 0;\n\tworkBuffer[GWTimeChangeAETEntry] = 0;\n\tworkBuffer[GWCountInitializing] = 0;\n\tworkBuffer[GWCountFinishTest] = 0;\n\tworkBuffer[GWCountNextGETEntry] = 0;\n\tworkBuffer[GWCountAddAETEntry] = 0;\n\tworkBuffer[GWCountNextFillEntry] = 0;\n\tworkBuffer[GWCountMergeFill] = 0;\n\tworkBuffer[GWCountDisplaySpan] = 0;\n\tworkBuffer[GWCountNextAETEntry] = 0;\n\tworkBuffer[GWCountChangeAETEntry] = 0;\n\tworkBuffer[GWBezierMonotonSubdivisions] = 0;\n\tworkBuffer[GWBezierHeightSubdivisions] = 0;\n\tworkBuffer[GWBezierOverflowSubdivisions] = 0;\n\tworkBuffer[GWBezierLineConversions] = 0;\n}\n\nfunction resortFirstAETEntry() {\n\tvar edge;\n\tvar leftEdge;\n\tvar xValue;\n\n\tif (aetStartGet() === 0) {\n\t\treturn null;\n\t}\n\tedge = aetBuffer[aetStartGet()];\n\txValue = edgeXValueOf(edge);\n\tleftEdge = aetBuffer[aetStartGet() - 1];\n\tif (edgeXValueOf(leftEdge) <= xValue) {\n\t\treturn null;\n\t}\n\tmoveAETEntryFromedgex(aetStartGet(), edge, xValue);\n}\n\nfunction returnWideBezierFill() {\n\treturn (dispatchReturnValue = wideBezierFillOf(dispatchedValue));\n}\n\nfunction returnWideBezierWidth() {\n\treturn (dispatchReturnValue = wideBezierWidthOf(dispatchedValue));\n}\n\n\n/*\tReturn the fill of the (wide) line - this method is called from a case. */\n\nfunction returnWideLineFill() {\n\treturn (dispatchReturnValue = wideLineFillOf(dispatchedValue));\n}\n\n\n/*\tReturn the width of the (wide) line - this method is called from a case. */\n\nfunction returnWideLineWidth() {\n\treturn (dispatchReturnValue = wideLineWidthOf(dispatchedValue));\n}\n\n\n/*\tSet the anti-aliasing level. Three levels are supported:\n\t\t1 - No antialiasing\n\t\t2 - 2x2 unweighted anti-aliasing\n\t\t4 - 4x4 unweighted anti-aliasing.\n\t */\n\nfunction setAALevel(level) {\n\tvar aaLevel;\n\n\tif (level >= 4) {\n\t\taaLevel = 4;\n\t}\n\tif ((level >= 2) && (level < 4)) {\n\t\taaLevel = 2;\n\t}\n\tif (level < 2) {\n\t\taaLevel = 1;\n\t}\n\taaLevelPut(aaLevel);\n\tif (aaLevel === 1) {\n\t\taaShiftPut(0);\n\t\taaColorMaskPut(4294967295);\n\t\taaScanMaskPut(0);\n\t}\n\tif (aaLevel === 2) {\n\t\taaShiftPut(1);\n\t\taaColorMaskPut(4244438268);\n\t\taaScanMaskPut(1);\n\t}\n\tif (aaLevel === 4) {\n\t\taaShiftPut(2);\n\t\taaColorMaskPut(4042322160);\n\t\taaScanMaskPut(3);\n\t}\n\taaColorShiftPut(aaShiftGet() * 2);\n\taaHalfPixelPut(aaShiftGet());\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nfunction setInterpreter(anInterpreter) {\n\tvar ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy.majorVersion() == VM_PROXY_MAJOR;\n\tif (ok === false) {\n\t\treturn false;\n\t}\n\tok = interpreterProxy.minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n/*\tReturn the run-length value from the given ShortRunArray. */\n\nfunction shortRunLengthAtfrom(i, runArray) {\n\treturn (runArray[i]|0) >>> 16;\n}\n\n\n/*\tReturn the run-length value from the given ShortRunArray.\n\tNote: We don't need any coercion to short/int here, since\n\twe deal basically only with unsigned values. */\n\nfunction shortRunValueAtfrom(i, runArray) {\n\treturn (runArray[i]|0) & 65535;\n}\n\nfunction showFilldepthrightX(fillIndex, depth, rightX) {\n\tif (!allocateStackFillEntry()) {\n\t\treturn null;\n\t}\n\tstackFillValueput(0, fillIndex);\n\tstackFillDepthput(0, depth);\n\tstackFillRightXput(0, rightX);\n\tif (stackFillSize() === stackFillEntryLength()) {\n\t\treturn null;\n\t}\n\tif (fillSortsbefore(0, stackFillSize() - stackFillEntryLength())) {\n\n\t\t/* New top fill */\n\n\t\tstackFillValueput(0, topFillValue());\n\t\tstackFillDepthput(0, topFillDepth());\n\t\tstackFillRightXput(0, topFillRightX());\n\t\ttopFillValuePut(fillIndex);\n\t\ttopFillDepthPut(depth);\n\t\ttopFillRightXPut(rightX);\n\t}\n}\n\nfunction smallSqrtTable() {\n\tvar theTable = \n\t[0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6];\n\n\treturn theTable;\n}\n\n\n/*\tSort the entire global edge table */\n\nfunction sortGlobalEdgeTable() {\n\tquickSortGlobalEdgeTablefromto(getBuffer, 0, getUsedGet() - 1);\n}\n\nfunction spanEndAAGet() {\n\treturn workBuffer[GWSpanEndAA];\n}\n\nfunction spanEndAAPut(value) {\n\treturn workBuffer[GWSpanEndAA] = value;\n}\n\nfunction spanEndGet() {\n\treturn workBuffer[GWSpanEnd];\n}\n\nfunction spanEndPut(value) {\n\treturn workBuffer[GWSpanEnd] = value;\n}\n\nfunction spanSizeGet() {\n\treturn workBuffer[GWSpanSize];\n}\n\nfunction spanSizePut(value) {\n\treturn workBuffer[GWSpanSize] = value;\n}\n\nfunction spanStartGet() {\n\treturn workBuffer[GWSpanStart];\n}\n\nfunction spanStartPut(value) {\n\treturn workBuffer[GWSpanStart] = value;\n}\n\nfunction squaredLengthOfwith(deltaX, deltaY) {\n\treturn (deltaX * deltaX) + (deltaY * deltaY);\n}\n\nfunction stackFillDepth(index) {\n\treturn wbStackValue(index + 1);\n}\n\nfunction stackFillDepthput(index, value) {\n\treturn wbStackValueput(index + 1, value);\n}\n\nfunction stackFillEntryLength() {\n\treturn 3;\n}\n\nfunction stackFillRightX(index) {\n\treturn wbStackValue(index + 2);\n}\n\nfunction stackFillRightXput(index, value) {\n\treturn wbStackValueput(index + 2, value);\n}\n\nfunction stackFillSize() {\n\treturn wbStackSize();\n}\n\nfunction stackFillValue(index) {\n\treturn wbStackValue(index);\n}\n\nfunction stackFillValueput(index, value) {\n\treturn wbStackValueput(index, value);\n}\n\nfunction stateGet() {\n\treturn workBuffer[GWState];\n}\n\nfunction statePut(value) {\n\treturn workBuffer[GWState] = value;\n}\n\n\n/*\tInitialize the current entry in the GET by stepping to the current scan line */\n\nfunction stepToFirstBezier() {\n\treturn stepToFirstBezierInat(getBuffer[getStartGet()], currentYGet());\n}\n\n\n/*\tInitialize the bezier at yValue.\n\tTODO: Check if reducing maxSteps from 2*deltaY to deltaY \n\t\tbrings a *significant* performance improvement.\n\t\tIn theory this should make for double step performance\n\t\tbut will cost in quality. Might be that the AA stuff will\n\t\tcompensate for this - but I'm not really sure. */\n\nfunction stepToFirstBezierInat(bezier, yValue) {\n\tvar deltaY;\n\tvar endX;\n\tvar endY;\n\tvar fwDDx;\n\tvar fwDDy;\n\tvar fwDx;\n\tvar fwDy;\n\tvar fwX1;\n\tvar fwX2;\n\tvar fwY1;\n\tvar fwY2;\n\tvar maxSteps;\n\tvar scaledStepSize;\n\tvar squaredStepSize;\n\tvar startX;\n\tvar startY;\n\tvar updateData;\n\tvar viaX;\n\tvar viaY;\n\n\n\t/* Do a quick check if there is anything at all to do */\n\n\tif (!isWide(bezier) && (yValue >= bezierEndYOf(bezier))) {\n\t\treturn edgeNumLinesOfput(bezier, 0);\n\t}\n\tstartX = edgeXValueOf(bezier);\n\tstartY = edgeYValueOf(bezier);\n\tviaX = bezierViaXOf(bezier);\n\tviaY = bezierViaYOf(bezier);\n\tendX = bezierEndXOf(bezier);\n\tendY = bezierEndYOf(bezier);\n\n\t/* Initialize integer forward differencing */\n\n\tdeltaY = endY - startY;\n\tfwX1 = (viaX - startX) * 2;\n\tfwX2 = (startX + endX) - (viaX * 2);\n\tfwY1 = (viaY - startY) * 2;\n\tfwY2 = (startY + endY) - (viaY * 2);\n\tmaxSteps = deltaY * 2;\n\tif (maxSteps < 2) {\n\t\tmaxSteps = 2;\n\t}\n\tscaledStepSize = DIV(16777216, maxSteps);\n\tsquaredStepSize = absoluteSquared8Dot24(scaledStepSize);\n\tfwDx = fwX1 * scaledStepSize;\n\tfwDDx = (fwX2 * squaredStepSize) * 2;\n\tfwDx += fwDDx >> 1;\n\tfwDy = fwY1 * scaledStepSize;\n\tfwDDy = (fwY2 * squaredStepSize) * 2;\n\n\t/* Store the values */\n\n\tfwDy += fwDDy >> 1;\n\tedgeNumLinesOfput(bezier, deltaY);\n\tupdateData = bezierUpdateDataOf(bezier);\n\tupdateData[GBUpdateX] = (startX * 256);\n\tupdateData[GBUpdateY] = (startY * 256);\n\tupdateData[GBUpdateDX] = fwDx;\n\tupdateData[GBUpdateDY] = fwDy;\n\tupdateData[GBUpdateDDX] = fwDDx;\n\tupdateData[GBUpdateDDY] = fwDDy;\n\tif (((startY = edgeYValueOf(bezier))) !== yValue) {\n\t\tstepToNextBezierInat(bezier, yValue);\n\t\tedgeNumLinesOfput(bezier, deltaY - (yValue - startY));\n\t}\n}\n\n\n/*\tInitialize the current entry in the GET by stepping to the current scan line */\n\nfunction stepToFirstLine() {\n\treturn stepToFirstLineInat(getBuffer[getStartGet()], currentYGet());\n}\n\n\n/*\tInitialize the line at yValue */\n\nfunction stepToFirstLineInat(line, yValue) {\n\tvar deltaX;\n\tvar deltaY;\n\tvar error;\n\tvar errorAdjUp;\n\tvar i;\n\tvar startY;\n\tvar widthX;\n\tvar xDir;\n\tvar xInc;\n\n\n\t/* Do a quick check if there is anything at all to do */\n\n\tif (!isWide(line) && (yValue >= lineEndYOf(line))) {\n\t\treturn edgeNumLinesOfput(line, 0);\n\t}\n\tdeltaX = lineEndXOf(line) - edgeXValueOf(line);\n\n\t/* Check if edge goes left to right */\n\n\tdeltaY = lineEndYOf(line) - edgeYValueOf(line);\n\tif (deltaX >= 0) {\n\t\txDir = 1;\n\t\twidthX = deltaX;\n\t\terror = 0;\n\t} else {\n\t\txDir = -1;\n\t\twidthX = 0 - deltaX;\n\t\terror = 1 - deltaY;\n\t}\n\tif (deltaY === 0) {\n\n\t\t/* No error for horizontal edges */\n\n\t\terror = 0;\n\n\t\t/* Encodes width and direction */\n\n\t\txInc = deltaX;\n\t\terrorAdjUp = 0;\n\t} else {\n\n\t\t/* Check if edge is y-major */\n\n\t\tif (deltaY > widthX) {\n\n\t\t\t/* Note: The '>' instead of '>=' could be important here... */\n\n\t\t\txInc = 0;\n\t\t\terrorAdjUp = widthX;\n\t\t} else {\n\t\t\txInc = (DIV(widthX, deltaY)) * xDir;\n\t\t\terrorAdjUp = MOD(widthX, deltaY);\n\t\t}\n\t}\n\tedgeNumLinesOfput(line, deltaY);\n\tlineXDirectionOfput(line, xDir);\n\tlineXIncrementOfput(line, xInc);\n\tlineErrorOfput(line, error);\n\tlineErrorAdjUpOfput(line, errorAdjUp);\n\tlineErrorAdjDownOfput(line, deltaY);\n\tif (((startY = edgeYValueOf(line))) !== yValue) {\n\t\tfor (i = startY; i <= (yValue - 1); i++) {\n\t\t\tstepToNextLineInat(line, i);\n\t\t}\n\t\tedgeNumLinesOfput(line, deltaY - (yValue - startY));\n\t}\n}\n\n\n/*\tInitialize the current entry in the GET by stepping to the current scan line */\n\nfunction stepToFirstWideBezier() {\n\treturn stepToFirstWideBezierInat(getBuffer[getStartGet()], currentYGet());\n}\n\n\n/*\tInitialize the bezier at yValue */\n\nfunction stepToFirstWideBezierInat(bezier, yValue) {\n\tvar endX;\n\tvar i;\n\tvar lineOffset;\n\tvar lineWidth;\n\tvar nLines;\n\tvar startY;\n\tvar xDir;\n\tvar yEntry;\n\tvar yExit;\n\n\n\t/* Get some values */\n\n\tlineWidth = wideBezierExtentOf(bezier);\n\n\t/* Compute the incremental values of the bezier */\n\n\tlineOffset = offsetFromWidth(lineWidth);\n\tendX = bezierEndXOf(bezier);\n\tstartY = edgeYValueOf(bezier);\n\tstepToFirstBezierInat(bezier, startY);\n\n\t/* Copy the incremental update data */\n\n\tnLines = edgeNumLinesOf(bezier);\n\tfor (i = 0; i <= 5; i++) {\n\t\twideBezierUpdateDataOf(bezier)[i] = bezierUpdateDataOf(bezier)[i];\n\t}\n\txDir = bezierUpdateDataOf(bezier)[GBUpdateDX];\n\tif (xDir === 0) {\n\t\tbezierUpdateDataOf(bezier)[GBUpdateDDX];\n\t}\n\tif (xDir >= 0) {\n\t\txDir = 1;\n\t} else {\n\t\txDir = -1;\n\t}\n\tif (xDir < 0) {\n\t\tadjustWideBezierLeftwidthoffsetendX(bezier, lineWidth, lineOffset, endX);\n\t} else {\n\t\tadjustWideBezierRightwidthoffsetendX(bezier, lineWidth, lineOffset, endX);\n\t}\n\tif (nLines === 0) {\n\t\tbezierUpdateDataOf(bezier)[GBUpdateX] = (bezierFinalXOf(bezier) * 256);\n\t}\n\tedgeNumLinesOfput(bezier, nLines + lineWidth);\n\n\t/* turned on at lineOffset */\n\n\tyEntry = 0;\n\n\t/* turned off at zero */\n\n\tyExit = (0 - nLines) - lineOffset;\n\twideBezierEntryOfput(bezier, yEntry);\n\twideBezierExitOfput(bezier, yExit);\n\tif ((yEntry >= lineOffset) && (yExit < 0)) {\n\t\tedgeFillsValidate(bezier);\n\t} else {\n\t\tedgeFillsInvalidate(bezier);\n\t}\n\tcomputeFinalWideBezierValueswidth(bezier, lineWidth);\n\tif (startY !== yValue) {\n\n\t\t/* Note: Must single step here so that entry/exit works */\n\n\t\tfor (i = startY; i <= (yValue - 1); i++) {\n\t\t\tstepToNextWideBezierInat(bezier, i);\n\t\t}\n\t\tedgeNumLinesOfput(bezier, edgeNumLinesOf(bezier) - (yValue - startY));\n\t}\n}\n\n\n/*\tInitialize the current entry in the GET by stepping to the current scan line */\n\nfunction stepToFirstWideLine() {\n\treturn stepToFirstWideLineInat(getBuffer[getStartGet()], currentYGet());\n}\n\n\n/*\tInitialize the wide line at yValue. */\n\nfunction stepToFirstWideLineInat(line, yValue) {\n\tvar i;\n\tvar lineOffset;\n\tvar lineWidth;\n\tvar nLines;\n\tvar startX;\n\tvar startY;\n\tvar xDir;\n\tvar yEntry;\n\tvar yExit;\n\n\n\t/* Get some values */\n\n\tlineWidth = wideLineExtentOf(line);\n\n\t/* Compute the incremental values of the line */\n\n\tlineOffset = offsetFromWidth(lineWidth);\n\tstartX = edgeXValueOf(line);\n\tstartY = edgeYValueOf(line);\n\tstepToFirstLineInat(line, startY);\n\tnLines = edgeNumLinesOf(line);\n\n\t/* Adjust the line to start at the correct X position */\n\n\txDir = lineXDirectionOf(line);\n\tedgeXValueOfput(line, startX - lineOffset);\n\tedgeNumLinesOfput(line, nLines + lineWidth);\n\tif (xDir > 0) {\n\t\twideLineWidthOfput(line, lineXIncrementOf(line) + lineWidth);\n\t} else {\n\t\twideLineWidthOfput(line, lineWidth - lineXIncrementOf(line));\n\t\tedgeXValueOfput(line, edgeXValueOf(line) + lineXIncrementOf(line));\n\t}\n\n\t/* turned on at lineOffset */\n\n\tyEntry = 0;\n\n\t/* turned off at zero */\n\n\tyExit = (0 - nLines) - lineOffset;\n\twideLineEntryOfput(line, yEntry);\n\twideLineExitOfput(line, yExit);\n\tif ((yEntry >= lineOffset) && (yExit < 0)) {\n\t\tedgeFillsValidate(line);\n\t} else {\n\t\tedgeFillsInvalidate(line);\n\t}\n\tif (startY !== yValue) {\n\t\tfor (i = startY; i <= (yValue - 1); i++) {\n\t\t\tstepToNextWideLineInat(line, i);\n\t\t}\n\t\tedgeNumLinesOfput(line, edgeNumLinesOf(line) - (yValue - startY));\n\t}\n}\n\n\n/*\tProcess the current entry in the AET by stepping to the next scan line */\n\nfunction stepToNextBezier() {\n\treturn stepToNextBezierInat(aetBuffer[aetStartGet()], currentYGet());\n}\n\n\n/*\tIncrementally step to the next scan line in the given bezier update data. */\n\nfunction stepToNextBezierForwardat(updateData, yValue) {\n\tvar fwDx;\n\tvar fwDy;\n\tvar lastX;\n\tvar lastY;\n\tvar minY;\n\n\tlastX = updateData[GBUpdateX];\n\tlastY = updateData[GBUpdateY];\n\tfwDx = updateData[GBUpdateDX];\n\tfwDy = updateData[GBUpdateDY];\n\n\t/* Step as long as we haven't yet reached minY and also\n\tas long as fwDy is greater than zero thus stepping down.\n\tNote: The test for fwDy should not be necessary in theory\n\t\tbut is a good insurance in practice. */\n\n\tminY = yValue * 256;\n\twhile ((minY > lastY) && (fwDy >= 0)) {\n\t\tlastX += (fwDx + 32768) >> 16;\n\t\tlastY += (fwDy + 32768) >> 16;\n\t\tfwDx += updateData[GBUpdateDDX];\n\t\tfwDy += updateData[GBUpdateDDY];\n\t}\n\tupdateData[GBUpdateX] = lastX;\n\tupdateData[GBUpdateY] = lastY;\n\tupdateData[GBUpdateDX] = fwDx;\n\tupdateData[GBUpdateDY] = fwDy;\n\treturn lastX >> 8;\n}\n\n\n/*\tIncrementally step to the next scan line in the given bezier */\n\nfunction stepToNextBezierInat(bezier, yValue) {\n\tvar xValue;\n\n\txValue = stepToNextBezierForwardat(bezierUpdateDataOf(bezier), yValue);\n\tedgeXValueOfput(bezier, xValue);\n}\n\n\n/*\tProcess the current entry in the AET by stepping to the next scan line */\n\nfunction stepToNextLine() {\n\treturn stepToNextLineInat(aetBuffer[aetStartGet()], currentYGet());\n}\n\n\n/*\tIncrementally step to the next scan line in the given line */\n\nfunction stepToNextLineInat(line, yValue) {\n\tvar err;\n\tvar x;\n\n\tx = edgeXValueOf(line) + lineXIncrementOf(line);\n\terr = lineErrorOf(line) + lineErrorAdjUpOf(line);\n\tif (err > 0) {\n\t\tx += lineXDirectionOf(line);\n\t\terr -= lineErrorAdjDownOf(line);\n\t}\n\tlineErrorOfput(line, err);\n\tedgeXValueOfput(line, x);\n}\n\n\n/*\tInitialize the current entry in the GET by stepping to the current scan line */\n\nfunction stepToNextWideBezier() {\n\tstepToNextWideBezierInat(aetBuffer[aetStartGet()], currentYGet());\n}\n\n\n/*\tIncrementally step to the next scan line in the given wide bezier */\n\nfunction stepToNextWideBezierInat(bezier, yValue) {\n\tvar lineOffset;\n\tvar lineWidth;\n\tvar yEntry;\n\tvar yExit;\n\n\n\t/* Don't inline this */\n\n\tlineWidth = wideBezierExtentOf(bezier);\n\tlineOffset = offsetFromWidth(lineWidth);\n\tyEntry = wideBezierEntryOf(bezier) + 1;\n\tyExit = wideBezierExitOf(bezier) + 1;\n\twideBezierEntryOfput(bezier, yEntry);\n\twideBezierExitOfput(bezier, yExit);\n\tif (yEntry >= lineOffset) {\n\t\tedgeFillsValidate(bezier);\n\t}\n\tif (yExit >= 0) {\n\t\tedgeFillsInvalidate(bezier);\n\t}\n\tif ((yExit + lineOffset) < 0) {\n\t\tstepToNextBezierForwardat(bezierUpdateDataOf(bezier), yValue);\n\t} else {\n\n\t\t/* Adjust the last x value to the final x recorded previously */\n\n\t\tbezierUpdateDataOf(bezier)[GBUpdateX] = (bezierFinalXOf(bezier) * 256);\n\t}\n\tstepToNextBezierForwardat(wideBezierUpdateDataOf(bezier), yValue);\n\tcomputeFinalWideBezierValueswidth(bezier, lineWidth);\n}\n\n\n/*\tProcess the current entry in the AET by stepping to the next scan line */\n\nfunction stepToNextWideLine() {\n\treturn stepToNextWideLineInat(aetBuffer[aetStartGet()], currentYGet());\n}\n\n\n/*\tIncrementally step to the next scan line in the given wide line */\n\nfunction stepToNextWideLineInat(line, yValue) {\n\tvar lastX;\n\tvar lineOffset;\n\tvar lineWidth;\n\tvar nextX;\n\tvar yEntry;\n\tvar yExit;\n\n\n\t/* Adjust entry/exit values */\n\n\tyEntry = wideLineEntryOf(line) + 1;\n\tyExit = wideLineExitOf(line) + 1;\n\twideLineEntryOfput(line, yEntry);\n\twideLineExitOfput(line, yExit);\n\tlineWidth = wideLineExtentOf(line);\n\tlineOffset = offsetFromWidth(lineWidth);\n\tif (yEntry >= lineOffset) {\n\t\tedgeFillsValidate(line);\n\t}\n\tif (yExit >= 0) {\n\t\tedgeFillsInvalidate(line);\n\t}\n\tlastX = edgeXValueOf(line);\n\tstepToNextLineInat(line, yValue);\n\n\t/* Check for special start/end adjustments */\n\n\tnextX = edgeXValueOf(line);\n\tif ((yEntry <= lineWidth) || ((yExit + lineOffset) >= 0)) {\n\n\t\t/* Yes, need an update */\n\n\t\tadjustWideLineafterSteppingFromto(line, lastX, nextX);\n\t}\n}\n\nfunction stopBecauseOf(stopReason) {\n\tstopReasonPut(stopReason);\n\tengineStopped = true;\n}\n\nfunction stopReasonGet() {\n\treturn workBuffer[GWStopReason];\n}\n\nfunction stopReasonPut(value) {\n\treturn workBuffer[GWStopReason] = value;\n}\n\nfunction storeEdgeStateFrominto(edge, edgeOop) {\n\tif (SIZEOF(edgeOop) < ETBalloonEdgeDataSize) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tinterpreterProxy.storeIntegerofObjectwithValue(ETIndexIndex, edgeOop, objectIndexOf(edge));\n\tinterpreterProxy.storeIntegerofObjectwithValue(ETXValueIndex, edgeOop, edgeXValueOf(edge));\n\tinterpreterProxy.storeIntegerofObjectwithValue(ETYValueIndex, edgeOop, currentYGet());\n\tinterpreterProxy.storeIntegerofObjectwithValue(ETZValueIndex, edgeOop, edgeZValueOf(edge));\n\tinterpreterProxy.storeIntegerofObjectwithValue(ETLinesIndex, edgeOop, edgeNumLinesOf(edge));\n\tlastExportedEdgePut(edge);\n}\n\nfunction storeEngineStateInto(oop) {\n\tobjUsedPut(objUsed);\n}\n\nfunction storeFillStateInto(fillOop) {\n\tvar fillIndex;\n\tvar leftX;\n\tvar rightX;\n\n\tfillIndex = lastExportedFillGet();\n\tleftX = lastExportedLeftXGet();\n\trightX = lastExportedRightXGet();\n\tif (SIZEOF(fillOop) < FTBalloonFillDataSize) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tinterpreterProxy.storeIntegerofObjectwithValue(FTIndexIndex, fillOop, objectIndexOf(fillIndex));\n\tinterpreterProxy.storeIntegerofObjectwithValue(FTMinXIndex, fillOop, leftX);\n\tinterpreterProxy.storeIntegerofObjectwithValue(FTMaxXIndex, fillOop, rightX);\n\tinterpreterProxy.storeIntegerofObjectwithValue(FTYValueIndex, fillOop, currentYGet());\n}\n\nfunction storeRenderingState() {\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (engineStopped) {\n\n\t\t/* Check the stop reason and store the required information */\n\n\t\tstoreStopStateIntoEdgefill(interpreterProxy.stackObjectValue(1), interpreterProxy.stackObjectValue(0));\n\t}\n\tstoreEngineStateInto(engine);\n\tinterpreterProxy.pop(3);\n\tinterpreterProxy.pushInteger(stopReasonGet());\n}\n\nfunction storeStopStateIntoEdgefill(edgeOop, fillOop) {\n\tvar edge;\n\tvar reason;\n\n\treason = stopReasonGet();\n\tif (reason === GErrorGETEntry) {\n\t\tedge = getBuffer[getStartGet()];\n\t\tstoreEdgeStateFrominto(edge, edgeOop);\n\t\tgetStartPut(getStartGet() + 1);\n\t}\n\tif (reason === GErrorFillEntry) {\n\t\tstoreFillStateInto(fillOop);\n\t}\n\tif (reason === GErrorAETEntry) {\n\t\tedge = aetBuffer[aetStartGet()];\n\t\tstoreEdgeStateFrominto(edge, edgeOop);\n\t}\n}\n\n\n/*\tSubdivide the given bezier curve if necessary */\n\nfunction subdivideBezier(index) {\n\tvar deltaX;\n\tvar deltaY;\n\tvar endX;\n\tvar endY;\n\tvar startX;\n\tvar startY;\n\n\tstartY = bzStartY(index);\n\n\t/* If the receiver is horizontal, don't do anything */\n\n\tendY = bzEndY(index);\n\tif (endY === startY) {\n\t\treturn index;\n\t}\n\tdeltaY = endY - startY;\n\tif (deltaY < 0) {\n\t\tdeltaY = 0 - deltaY;\n\t}\n\tif (deltaY > 255) {\n\t\tincrementStatby(GWBezierHeightSubdivisions, 1);\n\t\treturn computeBezierSplitAtHalf(index);\n\t}\n\tstartX = bzStartX(index);\n\tendX = bzEndX(index);\n\tdeltaX = endX - startX;\n\tif (deltaX < 0) {\n\t\tdeltaX = 0 - deltaX;\n\t}\n\tif ((deltaY * 32) < deltaX) {\n\t\tincrementStatby(GWBezierOverflowSubdivisions, 1);\n\t\treturn computeBezierSplitAtHalf(index);\n\t}\n\treturn index;\n}\n\n\n/*\tRecursively subdivide the curve on the bezier stack. */\n\nfunction subdivideBezierFrom(index) {\n\tvar index1;\n\tvar index2;\n\tvar otherIndex;\n\n\totherIndex = subdivideBezier(index);\n\tif (otherIndex !== index) {\n\t\tindex1 = subdivideBezierFrom(index);\n\t\tif (engineStopped) {\n\t\t\treturn 0;\n\t\t}\n\t\tindex2 = subdivideBezierFrom(otherIndex);\n\t\tif (engineStopped) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (index1 >= index2) {\n\t\t\treturn index1;\n\t\t} else {\n\t\t\treturn index2;\n\t\t}\n\t}\n\treturn index;\n}\n\n\n/*\tCheck if the given bezier curve is monoton in Y, and, if desired in X. \n\tIf not, subdivide it */\n\nfunction subdivideToBeMonotoninX(base, doTestX) {\n\tvar base2;\n\tvar index1;\n\tvar index2;\n\n\tbase2 = (index1 = (index2 = subdivideToBeMonotonInY(base)));\n\tif (doTestX) {\n\t\tindex1 = subdivideToBeMonotonInX(base);\n\t}\n\tif (index1 > index2) {\n\t\tindex2 = index1;\n\t}\n\tif ((base !== base2) && (doTestX)) {\n\t\tindex1 = subdivideToBeMonotonInX(base2);\n\t}\n\tif (index1 > index2) {\n\t\tindex2 = index1;\n\t}\n\treturn index2;\n}\n\n\n/*\tCheck if the given bezier curve is monoton in X. If not, subdivide it */\n\nfunction subdivideToBeMonotonInX(index) {\n\tvar denom;\n\tvar dx1;\n\tvar dx2;\n\tvar endX;\n\tvar num;\n\tvar startX;\n\tvar viaX;\n\n\tstartX = bzStartX(index);\n\tviaX = bzViaX(index);\n\tendX = bzEndX(index);\n\tdx1 = viaX - startX;\n\tdx2 = endX - viaX;\n\tif ((dx1 * dx2) >= 0) {\n\t\treturn index;\n\t}\n\tincrementStatby(GWBezierMonotonSubdivisions, 1);\n\tdenom = dx2 - dx1;\n\tnum = dx1;\n\tif (num < 0) {\n\t\tnum = 0 - num;\n\t}\n\tif (denom < 0) {\n\t\tdenom = 0 - denom;\n\t}\n\treturn computeBeziersplitAt(index, num / denom);\n}\n\n\n/*\tCheck if the given bezier curve is monoton in Y. If not, subdivide it */\n\nfunction subdivideToBeMonotonInY(index) {\n\tvar denom;\n\tvar dy1;\n\tvar dy2;\n\tvar endY;\n\tvar num;\n\tvar startY;\n\tvar viaY;\n\n\tstartY = bzStartY(index);\n\tviaY = bzViaY(index);\n\tendY = bzEndY(index);\n\tdy1 = viaY - startY;\n\tdy2 = endY - viaY;\n\tif ((dy1 * dy2) >= 0) {\n\t\treturn index;\n\t}\n\tincrementStatby(GWBezierMonotonSubdivisions, 1);\n\tdenom = dy2 - dy1;\n\tnum = dy1;\n\tif (num < 0) {\n\t\tnum = 0 - num;\n\t}\n\tif (denom < 0) {\n\t\tdenom = 0 - denom;\n\t}\n\treturn computeBeziersplitAt(index, num / denom);\n}\n\n\n/*\tMake the fill style with the given index either visible or invisible */\n\nfunction toggleFilldepthrightX(fillIndex, depth, rightX) {\n\tvar hidden;\n\n\tif (stackFillSize() === 0) {\n\t\tif (allocateStackFillEntry()) {\n\t\t\ttopFillValuePut(fillIndex);\n\t\t\ttopFillDepthPut(depth);\n\t\t\ttopFillRightXPut(rightX);\n\t\t}\n\t} else {\n\t\thidden = hideFilldepth(fillIndex, depth);\n\t\tif (!hidden) {\n\t\t\tshowFilldepthrightX(fillIndex, depth, rightX);\n\t\t}\n\t}\n}\n\nfunction toggleFillsOf(edge) {\n\tvar depth;\n\tvar fillIndex;\n\n\tif (!needAvailableSpace(stackFillEntryLength() * 2)) {\n\t\treturn null;\n\t}\n\tdepth = edgeZValueOf(edge) << 1;\n\tfillIndex = edgeLeftFillOf(edge);\n\tif (fillIndex !== 0) {\n\t\ttoggleFilldepthrightX(fillIndex, depth, 999999999);\n\t}\n\tfillIndex = edgeRightFillOf(edge);\n\tif (fillIndex !== 0) {\n\t\ttoggleFilldepthrightX(fillIndex, depth, 999999999);\n\t}\n\tquickRemoveInvalidFillsAt(edgeXValueOf(edge));\n}\n\nfunction toggleWideFillOf(edge) {\n\tvar depth;\n\tvar fill;\n\tvar index;\n\tvar lineWidth;\n\tvar rightX;\n\tvar type;\n\n\ttype = edgeTypeOf(edge);\n\tdispatchedValue = edge;\n\tswitch (type) {\n\tcase 0:\n\tcase 1:\n\t\terrorWrongIndex();\n\t\tbreak;\n\tcase 2:\n\t\treturnWideLineWidth();\n\t\tbreak;\n\tcase 3:\n\t\treturnWideBezierWidth();\n\t\tbreak;\n\t}\n\tlineWidth = dispatchReturnValue;\n\tswitch (type) {\n\tcase 0:\n\tcase 1:\n\t\terrorWrongIndex();\n\t\tbreak;\n\tcase 2:\n\t\treturnWideLineFill();\n\t\tbreak;\n\tcase 3:\n\t\treturnWideBezierFill();\n\t\tbreak;\n\t}\n\tfill = dispatchReturnValue;\n\tif (fill === 0) {\n\t\treturn null;\n\t}\n\tif (!needAvailableSpace(stackFillEntryLength())) {\n\t\treturn null;\n\t}\n\n\t/* So lines sort before interior fills */\n\n\tdepth = (edgeZValueOf(edge) << 1) + 1;\n\trightX = edgeXValueOf(edge) + lineWidth;\n\tindex = findStackFilldepth(fill, depth);\n\tif (index === -1) {\n\t\tshowFilldepthrightX(fill, depth, rightX);\n\t} else {\n\t\tif (stackFillRightX(index) < rightX) {\n\t\t\tstackFillRightXput(index, rightX);\n\t\t}\n\t}\n\tquickRemoveInvalidFillsAt(edgeXValueOf(edge));\n}\n\nfunction topDepth() {\n\tif (stackFillSize() === 0) {\n\t\treturn -1;\n\t} else {\n\t\treturn topFillDepth();\n\t}\n}\n\nfunction topFill() {\n\tif (stackFillSize() === 0) {\n\t\treturn 0;\n\t} else {\n\t\treturn topFillValue();\n\t}\n}\n\nfunction topFillDepth() {\n\treturn stackFillDepth(stackFillSize() - stackFillEntryLength());\n}\n\nfunction topFillDepthPut(value) {\n\treturn stackFillDepthput(stackFillSize() - stackFillEntryLength(), value);\n}\n\nfunction topFillRightX() {\n\treturn stackFillRightX(stackFillSize() - stackFillEntryLength());\n}\n\nfunction topFillRightXPut(value) {\n\treturn stackFillRightXput(stackFillSize() - stackFillEntryLength(), value);\n}\n\nfunction topFillValue() {\n\treturn stackFillValue(stackFillSize() - stackFillEntryLength());\n}\n\nfunction topFillValuePut(value) {\n\treturn stackFillValueput(stackFillSize() - stackFillEntryLength(), value);\n}\n\nfunction topRightX() {\n\tif (stackFillSize() === 0) {\n\t\treturn 999999999;\n\t} else {\n\t\treturn topFillRightX();\n\t}\n}\n\nfunction transformColor(fillIndex) {\n\tvar a;\n\tvar alphaScale;\n\tvar b;\n\tvar g;\n\tvar r;\n\tvar transform;\n\n\tif (!((fillIndex === 0) || (isFillColor(fillIndex)))) {\n\t\treturn fillIndex;\n\t}\n\tb = fillIndex & 255;\n\tg = (fillIndex >>> 8) & 255;\n\tr = (fillIndex >>> 16) & 255;\n\ta = (fillIndex >>> 24) & 255;\n\tif (hasColorTransform()) {\n\t\ttransform = colorTransform();\n\t\talphaScale = ((a * transform[6]) + transform[7]) / a;\n\t\tr = ((((r * transform[0]) + transform[1]) * alphaScale)|0);\n\t\tg = ((((g * transform[2]) + transform[3]) * alphaScale)|0);\n\t\tb = ((((b * transform[4]) + transform[5]) * alphaScale)|0);\n\t\ta = a * alphaScale|0;\n\t\tr = Math.max(r, 0);\n\t\tr = Math.min(r, 255);\n\t\tg = Math.max(g, 0);\n\t\tg = Math.min(g, 255);\n\t\tb = Math.max(b, 0);\n\t\tb = Math.min(b, 255);\n\t\ta = Math.max(a, 0);\n\t\ta = Math.min(a, 255);\n\t}\n\tif (a < 1) {\n\t\treturn 0;\n\t}\n\tif ((a < 255) && (needsFlush())) {\n\t\tstopBecauseOf(GErrorNeedFlush);\n\t}\n\treturn ((b + (g << 8)) + (r << 16)) + (a << 24);\n}\n\n\n/*\tTransform the given point. If haveMatrix is true then use the current transformation. */\n\nfunction transformPoint(point) {\n\tif (hasEdgeTransform()) {\n\n\t\t/* Note: AA adjustment is done in #transformPoint: for higher accuracy */\n\n\t\ttransformPointinto(point, point);\n\t} else {\n\n\t\t/* Multiply each component by aaLevel and add a half pixel */\n\n\t\tpoint[0] = ((point[0] + destOffsetXGet()) * aaLevelGet());\n\t\tpoint[1] = ((point[1] + destOffsetYGet()) * aaLevelGet());\n\t}\n}\n\n\n/*\tTransform srcPoint into dstPoint by using the currently loaded matrix */\n/*\tNote: This method has been rewritten so that inlining works (e.g., removing\n\tthe declarations and adding argument coercions at the appropriate points) */\n\nfunction transformPointinto(srcPoint, dstPoint) {\n\ttransformPointXyinto((srcPoint[0]|0), (srcPoint[1]|0), dstPoint);\n}\n\n\n/*\tTransform srcPoint into dstPoint by using the currently loaded matrix */\n/*\tNote: This should be rewritten so that inlining works (e.g., removing\n\tthe declarations and adding argument coercions at the appropriate points) */\n\nfunction transformPointXyinto(xValue, yValue, dstPoint) {\n\tvar transform;\n\tvar x;\n\tvar y;\n\n\ttransform = edgeTransform();\n\tx = (((((transform[0] * xValue) + (transform[1] * yValue)) + transform[2]) * aaLevelGet())|0);\n\ty = (((((transform[3] * xValue) + (transform[4] * yValue)) + transform[5]) * aaLevelGet())|0);\n\tdstPoint[0] = x;\n\tdstPoint[1] = y;\n}\n\n\n/*\tTransform n (n=1,2,3) points.\n\tIf haveMatrix is true then the matrix contains the actual transformation. */\n\nfunction transformPoints(n) {\n\tif (n > 0) {\n\t\ttransformPoint(point1Get());\n\t}\n\tif (n > 1) {\n\t\ttransformPoint(point2Get());\n\t}\n\tif (n > 2) {\n\t\ttransformPoint(point3Get());\n\t}\n\tif (n > 3) {\n\t\ttransformPoint(point4Get());\n\t}\n}\n\n\n/*\tTransform the given width */\n\nfunction transformWidth(w) {\n\tvar deltaX;\n\tvar deltaY;\n\tvar dstWidth;\n\tvar dstWidth2;\n\n\tif (w === 0) {\n\t\treturn 0;\n\t}\n\tpoint1Get()[0] = 0;\n\tpoint1Get()[1] = 0;\n\tpoint2Get()[0] = (w * 256);\n\tpoint2Get()[1] = 0;\n\tpoint3Get()[0] = 0;\n\tpoint3Get()[1] = (w * 256);\n\ttransformPoints(3);\n\tdeltaX = (point2Get()[0] - point1Get()[0]);\n\tdeltaY = (point2Get()[1] - point1Get()[1]);\n\tdstWidth = ((Math.sqrt((deltaX * deltaX) + (deltaY * deltaY))|0) + 128) >> 8;\n\tdeltaX = (point3Get()[0] - point1Get()[0]);\n\tdeltaY = (point3Get()[1] - point1Get()[1]);\n\tdstWidth2 = ((Math.sqrt((deltaX * deltaX) + (deltaY * deltaY))|0) + 128) >> 8;\n\tif (dstWidth2 < dstWidth) {\n\t\tdstWidth = dstWidth2;\n\t}\n\tif (dstWidth === 0) {\n\t\treturn 1;\n\t} else {\n\t\treturn dstWidth;\n\t}\n}\n\nfunction uncheckedTransformColor(fillIndex) {\n\tvar a;\n\tvar b;\n\tvar g;\n\tvar r;\n\tvar transform;\n\n\tif (!hasColorTransform()) {\n\t\treturn fillIndex;\n\t}\n\tb = fillIndex & 255;\n\tg = (fillIndex >>> 8) & 255;\n\tr = (fillIndex >>> 16) & 255;\n\ta = (fillIndex >>> 24) & 255;\n\ttransform = colorTransform();\n\tr = (((r * transform[0]) + transform[1])|0);\n\tg = (((g * transform[2]) + transform[3])|0);\n\tb = (((b * transform[4]) + transform[5])|0);\n\ta = (((a * transform[6]) + transform[7])|0);\n\tr = Math.max(r, 0);\n\tr = Math.min(r, 255);\n\tg = Math.max(g, 0);\n\tg = Math.min(g, 255);\n\tb = Math.max(b, 0);\n\tb = Math.min(b, 255);\n\ta = Math.max(a, 0);\n\ta = Math.min(a, 255);\n\tif (a < 16) {\n\t\treturn 0;\n\t}\n\treturn ((b + (g << 8)) + (r << 16)) + (a << 24);\n}\n\nfunction wbSizeGet() {\n\treturn workBuffer[GWSize];\n}\n\nfunction wbSizePut(value) {\n\treturn workBuffer[GWSize] = value;\n}\n\nfunction wbStackClear() {\n\twbTopPut(wbSizeGet());\n}\n\nfunction wbStackPop(nItems) {\n\twbTopPut(wbTopGet() + nItems);\n}\n\nfunction wbStackPush(nItems) {\n\tif (!allocateStackEntry(nItems)) {\n\t\treturn false;\n\t}\n\twbTopPut(wbTopGet() - nItems);\n\treturn true;\n}\n\nfunction wbStackSize() {\n\treturn wbSizeGet() - wbTopGet();\n}\n\nfunction wbStackValue(index) {\n\treturn workBuffer[wbTopGet() + index];\n}\n\nfunction wbStackValueput(index, value) {\n\treturn workBuffer[wbTopGet() + index] = value;\n}\n\nfunction wbTopGet() {\n\treturn workBuffer[GWBufferTop];\n}\n\nfunction wbTopPut(value) {\n\treturn workBuffer[GWBufferTop] = value;\n}\n\nfunction wideBezierEntryOf(line) {\n\treturn objat(line, GBWideEntry);\n}\n\nfunction wideBezierEntryOfput(line, value) {\n\treturn objatput(line, GBWideEntry, value);\n}\n\nfunction wideBezierExitOf(line) {\n\treturn objat(line, GBWideExit);\n}\n\nfunction wideBezierExitOfput(line, value) {\n\treturn objatput(line, GBWideExit, value);\n}\n\nfunction wideBezierExtentOf(bezier) {\n\treturn objat(bezier, GBWideExtent);\n}\n\nfunction wideBezierExtentOfput(bezier, value) {\n\treturn objatput(bezier, GBWideExtent, value);\n}\n\nfunction wideBezierFillOf(bezier) {\n\treturn objat(bezier, GBWideFill);\n}\n\nfunction wideBezierFillOfput(bezier, value) {\n\treturn objatput(bezier, GBWideFill, value);\n}\n\nfunction wideBezierUpdateDataOf(bezier) {\n\treturn PTR_ADD(objBuffer, bezier + GBWideUpdateData);\n}\n\nfunction wideBezierWidthOf(line) {\n\treturn objat(line, GBWideWidth);\n}\n\nfunction wideBezierWidthOfput(line, value) {\n\treturn objatput(line, GBWideWidth, value);\n}\n\nfunction wideLineEntryOf(line) {\n\treturn objat(line, GLWideEntry);\n}\n\nfunction wideLineEntryOfput(line, value) {\n\treturn objatput(line, GLWideEntry, value);\n}\n\nfunction wideLineExitOf(line) {\n\treturn objat(line, GLWideExit);\n}\n\nfunction wideLineExitOfput(line, value) {\n\treturn objatput(line, GLWideExit, value);\n}\n\nfunction wideLineExtentOf(line) {\n\treturn objat(line, GLWideExtent);\n}\n\nfunction wideLineExtentOfput(line, value) {\n\treturn objatput(line, GLWideExtent, value);\n}\n\nfunction wideLineFillOf(line) {\n\treturn objat(line, GLWideFill);\n}\n\nfunction wideLineFillOfput(line, value) {\n\treturn objatput(line, GLWideFill, value);\n}\n\nfunction wideLineWidthOf(line) {\n\treturn objat(line, GLWideWidth);\n}\n\nfunction wideLineWidthOfput(line, value) {\n\treturn objatput(line, GLWideWidth, value);\n}\n\nfunction workBufferPut(wbOop) {\n\tworkBuffer = wbOop.wordsAsInt32Array();\n}\n\n\nSqueak.registerExternalModule(\"B2DPlugin\", {\n\tprimitiveMergeFillFrom: primitiveMergeFillFrom,\n\tprimitiveCopyBuffer: primitiveCopyBuffer,\n\tprimitiveAddRect: primitiveAddRect,\n\tprimitiveAddGradientFill: primitiveAddGradientFill,\n\tprimitiveSetClipRect: primitiveSetClipRect,\n\tinitialiseModule: initialiseModule,\n\tprimitiveSetBitBltPlugin: primitiveSetBitBltPlugin,\n\tprimitiveRegisterExternalEdge: primitiveRegisterExternalEdge,\n\tprimitiveGetClipRect: primitiveGetClipRect,\n\tprimitiveAddBezier: primitiveAddBezier,\n\tprimitiveInitializeProcessing: primitiveInitializeProcessing,\n\tprimitiveRenderImage: primitiveRenderImage,\n\tprimitiveGetOffset: primitiveGetOffset,\n\tprimitiveSetDepth: primitiveSetDepth,\n\tprimitiveAddBezierShape: primitiveAddBezierShape,\n\tprimitiveSetEdgeTransform: primitiveSetEdgeTransform,\n\tgetModuleName: getModuleName,\n\tprimitiveGetTimes: primitiveGetTimes,\n\tprimitiveNextActiveEdgeEntry: primitiveNextActiveEdgeEntry,\n\tprimitiveAddBitmapFill: primitiveAddBitmapFill,\n\tprimitiveGetDepth: primitiveGetDepth,\n\tprimitiveAbortProcessing: primitiveAbortProcessing,\n\tprimitiveNextGlobalEdgeEntry: primitiveNextGlobalEdgeEntry,\n\tprimitiveGetFailureReason: primitiveGetFailureReason,\n\tprimitiveDisplaySpanBuffer: primitiveDisplaySpanBuffer,\n\tmoduleUnloaded: moduleUnloaded,\n\tprimitiveGetCounts: primitiveGetCounts,\n\tprimitiveChangedActiveEdgeEntry: primitiveChangedActiveEdgeEntry,\n\tprimitiveRenderScanline: primitiveRenderScanline,\n\tprimitiveGetBezierStats: primitiveGetBezierStats,\n\tprimitiveFinishedProcessing: primitiveFinishedProcessing,\n\tsetInterpreter: setInterpreter,\n\tprimitiveNeedsFlush: primitiveNeedsFlush,\n\tprimitiveAddLine: primitiveAddLine,\n\tprimitiveSetOffset: primitiveSetOffset,\n\tprimitiveNextFillEntry: primitiveNextFillEntry,\n\tprimitiveInitializeBuffer: primitiveInitializeBuffer,\n\tprimitiveDoProfileStats: primitiveDoProfileStats,\n\tprimitiveAddActiveEdgeEntry: primitiveAddActiveEdgeEntry,\n\tprimitiveSetAALevel: primitiveSetAALevel,\n\tprimitiveNeedsFlushPut: primitiveNeedsFlushPut,\n\tprimitiveAddCompressedShape: primitiveAddCompressedShape,\n\tprimitiveSetColorTransform: primitiveSetColorTransform,\n\tprimitiveAddOval: primitiveAddOval,\n\tprimitiveRegisterExternalFill: primitiveRegisterExternalFill,\n\tprimitiveAddPolygon: primitiveAddPolygon,\n\tprimitiveGetAALevel: primitiveGetAALevel,\n});\n\n}); // end of module\n","/* Smalltalk from Squeak4.5 with VMMaker 4.13.6 translated as JS source on 3 November 2014 1:52:20 pm */\n/* Automatically generated by\n\tJSSmartSyntaxPluginCodeGenerator VMMakerJS-bf.15 uuid: fd4e10f2-3773-4e80-8bb5-c4b471a014e5\n from\n\tBitBltSimulation VMMaker-bf.353 uuid: 8ae25e7e-8d2c-451e-8277-598b30e9c002\n */\n\nmodule(\"users.bert.SqueakJS.plugins.BitBltPlugin\").requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\"use strict\";\n\nvar VM_PROXY_MAJOR = 1;\nvar VM_PROXY_MINOR = 11;\n\n/*** Functions ***/\nfunction CLASSOF(obj) { return typeof obj === \"number\" ? interpreterProxy.classSmallInteger() : obj.sqClass }\nfunction SIZEOF(obj) { return obj.pointers ? obj.pointers.length : obj.words ? obj.words.length : obj.bytes ? obj.bytes.length : 0 }\nfunction BYTESIZEOF(obj) { return obj.bytes ? obj.bytes.length : obj.words ? obj.words.length * 4 : 0 }\nfunction DIV(a, b) { return Math.floor(a / b) | 0; } // integer division\nfunction MOD(a, b) { return a - DIV(a, b) * b | 0; } // signed modulus\nfunction SHL(a, b) { return b > 31 ? 0 : a << b; } // fix JS shift\nfunction SHR(a, b) { return b > 31 ? 0 : a >>> b; } // fix JS shift\nfunction SHIFT(a, b) { return b < 0 ? (b < -31 ? 0 : a >>> (0-b) ) : (b > 31 ? 0 : a << b); }\n\n/*** Constants ***/\nvar AllOnes = 4294967295;\nvar AlphaIndex = 3;\nvar BBClipHeightIndex = 13;\nvar BBClipWidthIndex = 12;\nvar BBClipXIndex = 10;\nvar BBClipYIndex = 11;\nvar BBColorMapIndex = 14;\nvar BBDestFormIndex = 0;\nvar BBDestXIndex = 4;\nvar BBDestYIndex = 5;\nvar BBHalftoneFormIndex = 2;\nvar BBHeightIndex = 7;\nvar BBRuleIndex = 3;\nvar BBSourceFormIndex = 1;\nvar BBSourceXIndex = 8;\nvar BBSourceYIndex = 9;\nvar BBWarpBase = 15;\nvar BBWidthIndex = 6;\nvar BinaryPoint = 14;\nvar BlueIndex = 2;\nvar ColorMapFixedPart = 2;\nvar ColorMapIndexedPart = 4;\nvar ColorMapNewStyle = 8;\nvar ColorMapPresent = 1;\nvar FixedPt1 = 16384;\nvar FormBitsIndex = 0;\nvar FormDepthIndex = 3;\nvar FormHeightIndex = 2;\nvar FormWidthIndex = 1;\nvar GreenIndex = 1;\nvar OpTableSize = 43;\nvar RedIndex = 0;\n\n/*** Variables ***/\nvar affectedB = 0;\nvar affectedL = 0;\nvar affectedR = 0;\nvar affectedT = 0;\nvar bbH = 0;\nvar bbW = 0;\nvar bitBltOop = 0;\nvar bitCount = 0;\nvar clipHeight = 0;\nvar clipWidth = 0;\nvar clipX = 0;\nvar clipY = 0;\nvar cmBitsPerColor = 0;\nvar cmFlags = 0;\nvar cmLookupTable = null;\nvar cmMask = 0;\nvar cmMaskTable = null;\nvar cmShiftTable = null;\nvar combinationRule = 0;\nvar componentAlphaModeAlpha = 0;\nvar componentAlphaModeColor = 0;\nvar destBits = 0;\nvar destDelta = 0;\nvar destDepth = 0;\nvar destForm = 0;\nvar destHeight = 0;\nvar destIndex = 0;\nvar destMSB = 0;\nvar destMask = 0;\nvar destPPW = 0;\nvar destPitch = 0;\nvar destWidth = 0;\nvar destX = 0;\nvar destY = 0;\nvar dither8Lookup = new Array(4096);\nvar ditherMatrix4x4 = [\n0,\t8,\t2,\t10,\n12,\t4,\t14,\t6,\n3,\t11,\t1,\t9,\n15,\t7,\t13,\t5\n];\nvar ditherThresholds16 = [ 0, 2, 4, 6, 8, 12, 14, 16 ];\nvar ditherValues16 = [\n0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,\n15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30\n];\nvar dstBitShift = 0;\nvar dx = 0;\nvar dy = 0;\nvar gammaLookupTable = null;\nvar hDir = 0;\nvar halftoneBase = 0;\nvar halftoneForm = 0;\nvar halftoneHeight = 0;\nvar hasSurfaceLock = 0;\nvar height = 0;\nvar interpreterProxy = null;\nvar isWarping = 0;\nvar lockSurfaceFn = null;\nvar mask1 = 0;\nvar mask2 = 0;\nvar maskTable = [\n0, 1, 3, 0, 15, 31, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 65535,\n0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1\n];\nvar moduleName = \"BitBltPlugin 3 November 2014 (e)\";\nvar nWords = 0;\nvar noHalftone = 0;\nvar noSource = 0;\nvar opTable = new Array(43);\nvar preload = 0;\nvar querySurfaceFn = null;\nvar skew = 0;\nvar sourceAlpha = 0;\nvar sourceBits = 0;\nvar sourceDelta = 0;\nvar sourceDepth = 0;\nvar sourceForm = 0;\nvar sourceHeight = 0;\nvar sourceIndex = 0;\nvar sourceMSB = 0;\nvar sourcePPW = 0;\nvar sourcePitch = 0;\nvar sourceWidth = 0;\nvar sourceX = 0;\nvar sourceY = 0;\nvar srcBitShift = 0;\nvar sx = 0;\nvar sy = 0;\nvar ungammaLookupTable = null;\nvar unlockSurfaceFn = null;\nvar vDir = 0;\nvar warpAlignMask = 0;\nvar warpAlignShift = 0;\nvar warpBitShiftTable = new Array(32);\nvar warpSrcMask = 0;\nvar warpSrcShift = 0;\nvar width = 0;\n\n\n\n/*\tSubract the pixels in the source and destination, color by color,\n\tand return the sum of the absolute value of all the differences.\n\tFor non-rgb, XOR the two and return the number of differing pixels.\n\tNote that the region is not clipped to bit boundaries, but only to the\n\tnearest (enclosing) word. This is because copyLoop does not do\n\tpre-merge masking. For accurate results, you must subtract the\n\tvalues obtained from the left and right fringes. */\n\nfunction OLDrgbDiffwith(sourceWord, destinationWord) {\n\tvar diff;\n\tvar pixMask;\n\n\tif (destDepth < 16) {\n\n\t\t/* Just xor and count differing bits if not RGB */\n\n\t\tdiff = sourceWord ^ destinationWord;\n\t\tpixMask = maskTable[destDepth];\n\t\twhile (!(diff === 0)) {\n\t\t\tif ((diff & pixMask) !== 0) {\n\t\t\t\t++bitCount;\n\t\t\t}\n\t\t\tdiff = SHR(diff, destDepth);\n\t\t}\n\t\treturn destinationWord;\n\t}\n\tif (destDepth === 16) {\n\t\tdiff = partitionedSubfromnBitsnPartitions(sourceWord, destinationWord, 5, 3);\n\t\tbitCount = ((bitCount + (diff & 31)) + ((diff >>> 5) & 31)) + ((diff >>> 10) & 31);\n\t\tdiff = partitionedSubfromnBitsnPartitions(sourceWord >>> 16, destinationWord >>> 16, 5, 3);\n\t\tbitCount = ((bitCount + (diff & 31)) + ((diff >>> 5) & 31)) + ((diff >>> 10) & 31);\n\t} else {\n\t\tdiff = partitionedSubfromnBitsnPartitions(sourceWord, destinationWord, 8, 3);\n\t\tbitCount = ((bitCount + (diff & 255)) + ((diff >>> 8) & 255)) + ((diff >>> 16) & 255);\n\t}\n\treturn destinationWord;\n}\n\n\n/*\tTally pixels into the color map. Note that the source should be \n\tspecified = destination, in order for the proper color map checks \n\tto be performed at setup.\n\tNote that the region is not clipped to bit boundaries, but only to the\n\tnearest (enclosing) word. This is because copyLoop does not do\n\tpre-merge masking. For accurate results, you must subtract the\n\tvalues obtained from the left and right fringes. */\n\nfunction OLDtallyIntoMapwith(sourceWord, destinationWord) {\n\tvar pixMask;\n\tvar mapIndex;\n\tvar i;\n\tvar shiftWord;\n\n\tif ((cmFlags & (ColorMapPresent | ColorMapIndexedPart)) !== (ColorMapPresent | ColorMapIndexedPart)) {\n\t\treturn destinationWord;\n\t}\n\tif (destDepth < 16) {\n\n\t\t/* loop through all packed pixels. */\n\n\t\tpixMask = maskTable[destDepth] & cmMask;\n\t\tshiftWord = destinationWord;\n\t\tfor (i = 1; i <= destPPW; i++) {\n\t\t\tmapIndex = shiftWord & pixMask;\n\t\t\ttallyMapAtput(mapIndex, tallyMapAt(mapIndex) + 1);\n\t\t\tshiftWord = SHR(shiftWord, destDepth);\n\t\t}\n\t\treturn destinationWord;\n\t}\n\tif (destDepth === 16) {\n\n\t\t/* Two pixels Tally the right half... */\n\n\t\tmapIndex = rgbMapfromto(destinationWord & 65535, 5, cmBitsPerColor);\n\t\ttallyMapAtput(mapIndex, tallyMapAt(mapIndex) + 1);\n\t\tmapIndex = rgbMapfromto(destinationWord >>> 16, 5, cmBitsPerColor);\n\t\ttallyMapAtput(mapIndex, tallyMapAt(mapIndex) + 1);\n\t} else {\n\n\t\t/* Just one pixel. */\n\n\t\tmapIndex = rgbMapfromto(destinationWord, 8, cmBitsPerColor);\n\t\ttallyMapAtput(mapIndex, tallyMapAt(mapIndex) + 1);\n\t}\n\treturn destinationWord;\n}\n\nfunction addWordwith(sourceWord, destinationWord) {\n\treturn sourceWord + destinationWord;\n}\n\n\n/*\tBlend sourceWord with destinationWord, assuming both are 32-bit pixels.\n\tThe source is assumed to have 255*alpha in the high 8 bits of each pixel,\n\twhile the high 8 bits of the destinationWord will be ignored.\n\tThe blend produced is alpha*source + (1-alpha)*dest, with\n\tthe computation being performed independently on each color\n\tcomponent. The high byte of the result will be 0. */\n\nfunction alphaBlendwith(sourceWord, destinationWord) {\n\tvar unAlpha;\n\tvar blendRB;\n\tvar blendAG;\n\tvar result;\n\tvar alpha;\n\n\n\t/* High 8 bits of source pixel */\n\n\talpha = sourceWord >>> 24;\n\tif (alpha === 0) {\n\t\treturn destinationWord;\n\t}\n\tif (alpha === 255) {\n\t\treturn sourceWord;\n\t}\n\tunAlpha = 255 - alpha;\n\n\t/* blend red and blue */\n\n\tblendRB = (((sourceWord & 16711935) * alpha) + ((destinationWord & 16711935) * unAlpha)) + 16711935;\n\n\t/* blend alpha and green */\n\n\tblendAG = (((((sourceWord >>> 8) | 16711680) & 16711935) * alpha) + (((destinationWord >>> 8) & 16711935) * unAlpha)) + 16711935;\n\n\t/* divide by 255 */\n\n\tblendRB = ((blendRB + (((blendRB - 65537) >>> 8) & 16711935)) >>> 8) & 16711935;\n\tblendAG = ((blendAG + (((blendAG - 65537) >>> 8) & 16711935)) >>> 8) & 16711935;\n\tresult = blendRB | (blendAG << 8);\n\treturn result;\n}\n\nfunction alphaBlendConstwith(sourceWord, destinationWord) {\n\treturn alphaBlendConstwithpaintMode(sourceWord, destinationWord, false);\n}\n\n\n/*\tBlend sourceWord with destinationWord using a constant alpha.\n\tAlpha is encoded as 0 meaning 0.0, and 255 meaning 1.0.\n\tThe blend produced is alpha*source + (1.0-alpha)*dest, with the\n\tcomputation being performed independently on each color component.\n\tThis function could eventually blend into any depth destination,\n\tusing the same color averaging and mapping as warpBlt.\n\tpaintMode = true means do nothing if the source pixel value is zero. */\n/*\tThis first implementation works with dest depths of 16 and 32 bits only.\n\tNormal color mapping will allow sources of lower depths in this case,\n\tand results can be mapped directly by truncation, so no extra color maps are needed.\n\tTo allow storing into any depth will require subsequent addition of two other\n\tcolormaps, as is the case with WarpBlt. */\n\nfunction alphaBlendConstwithpaintMode(sourceWord, destinationWord, paintMode) {\n\tvar rgbMask;\n\tvar pixMask;\n\tvar pixBlend;\n\tvar j;\n\tvar sourceShifted;\n\tvar result;\n\tvar shift;\n\tvar sourcePixVal;\n\tvar i;\n\tvar unAlpha;\n\tvar destPixVal;\n\tvar blendRB;\n\tvar blendAG;\n\tvar bitsPerColor;\n\tvar blend;\n\tvar destShifted;\n\tvar maskShifted;\n\n\tif (destDepth < 16) {\n\t\treturn destinationWord;\n\t}\n\tunAlpha = 255 - sourceAlpha;\n\tresult = destinationWord;\n\tif (destPPW === 1) {\n\n\t\t/* 32bpp blends include alpha */\n\n\t\tif (!(paintMode && (sourceWord === 0))) {\n\n\t\t\t/* painting a transparent pixel */\n\n\n\t\t\t/* blendRB red and blue */\n\n\t\t\tblendRB = (((sourceWord & 16711935) * sourceAlpha) + ((destinationWord & 16711935) * unAlpha)) + 16711935;\n\n\t\t\t/* blendRB alpha and green */\n\n\t\t\tblendAG = ((((sourceWord >>> 8) & 16711935) * sourceAlpha) + (((destinationWord >>> 8) & 16711935) * unAlpha)) + 16711935;\n\n\t\t\t/* divide by 255 */\n\n\t\t\tblendRB = ((blendRB + (((blendRB - 65537) >>> 8) & 16711935)) >>> 8) & 16711935;\n\t\t\tblendAG = ((blendAG + (((blendAG - 65537) >>> 8) & 16711935)) >>> 8) & 16711935;\n\t\t\tresult = blendRB | (blendAG << 8);\n\t\t}\n\t} else {\n\t\tpixMask = maskTable[destDepth];\n\t\tbitsPerColor = 5;\n\t\trgbMask = 31;\n\t\tmaskShifted = destMask;\n\t\tdestShifted = destinationWord;\n\t\tsourceShifted = sourceWord;\n\t\tfor (j = 1; j <= destPPW; j++) {\n\t\t\tsourcePixVal = sourceShifted & pixMask;\n\t\t\tif (!(((maskShifted & pixMask) === 0) || (paintMode && (sourcePixVal === 0)))) {\n\t\t\t\tdestPixVal = destShifted & pixMask;\n\t\t\t\tpixBlend = 0;\n\t\t\t\tfor (i = 1; i <= 3; i++) {\n\t\t\t\t\tshift = (i - 1) * bitsPerColor;\n\t\t\t\t\tblend = (DIV((((((SHR(sourcePixVal, shift)) & rgbMask) * sourceAlpha) + (((SHR(destPixVal, shift)) & rgbMask) * unAlpha)) + 254), 255)) & rgbMask;\n\t\t\t\t\tpixBlend = pixBlend | (SHL(blend, shift));\n\t\t\t\t}\n\t\t\t\tresult = (result & ~(SHL(pixMask, ((j - 1) * 16)))) | (SHL(pixBlend, ((j - 1) * 16)));\n\t\t\t}\n\t\t\tmaskShifted = SHR(maskShifted, destDepth);\n\t\t\tsourceShifted = SHR(sourceShifted, destDepth);\n\t\t\tdestShifted = SHR(destShifted, destDepth);\n\t\t}\n\t}\n\treturn result;\n}\n\n\n/*\tBlend sourceWord with destinationWord using the alpha value from sourceWord.\n\tAlpha is encoded as 0 meaning 0.0, and 255 meaning 1.0.\n\tIn contrast to alphaBlend:with: the color produced is\n\n\t\tsrcColor + (1-srcAlpha) * dstColor\n\n\te.g., it is assumed that the source color is already scaled. */\n\nfunction alphaBlendScaledwith(sourceWord, destinationWord) {\n\tvar unAlpha;\n\tvar rb;\n\tvar ag;\n\n\n\t/* Do NOT inline this into optimized loops */\n\n\n\t/* High 8 bits of source pixel is source opacity (ARGB format) */\n\n\tunAlpha = 255 - (sourceWord >>> 24);\n\n\t/* blend red and blue components */\n\n\trb = ((((destinationWord & 16711935) * unAlpha) >>> 8) & 16711935) + (sourceWord & 16711935);\n\n\t/* blend alpha and green components */\n\n\tag = (((((destinationWord >>> 8) & 16711935) * unAlpha) >>> 8) & 16711935) + ((sourceWord >>> 8) & 16711935);\n\n\t/* saturate red and blue components if there is a carry */\n\n\trb = (rb & 16711935) | (((rb & 16777472) * 255) >>> 8);\n\n\t/* saturate alpha and green components if there is a carry */\n\n\tag = ((ag & 16711935) << 8) | ((ag & 16777472) * 255);\n\treturn ag | rb;\n}\n\nfunction alphaPaintConstwith(sourceWord, destinationWord) {\n\tif (sourceWord === 0) {\n\t\treturn destinationWord;\n\t}\n\treturn alphaBlendConstwithpaintMode(sourceWord, destinationWord, true);\n}\n\n\n/*\tThis version assumes \n\t\tcombinationRule = 34\n\t\tsourcePixSize = 32\n\t\tdestPixSize = 16\n\t\tsourceForm ~= destForm.\n\t */\n\nfunction alphaSourceBlendBits16() {\n\tvar ditherBase;\n\tvar ditherThreshold;\n\tvar srcShift;\n\tvar sourceWord;\n\tvar srcIndex;\n\tvar deltaX;\n\tvar dstIndex;\n\tvar srcAlpha;\n\tvar dstMask;\n\tvar deltaY;\n\tvar srcY;\n\tvar destWord;\n\tvar dstY;\n\tvar ditherIndex;\n\n\n\t/* This particular method should be optimized in itself */\n\n\n\t/* So we can pre-decrement */\n\n\tdeltaY = bbH + 1;\n\tsrcY = sy;\n\tdstY = dy;\n\tsrcShift = (dx & 1) * 16;\n\tif (destMSB) {\n\t\tsrcShift = 16 - srcShift;\n\t}\n\n\t/* This is the outer loop */\n\n\tmask1 = SHL(65535, (16 - srcShift));\n\twhile (((--deltaY)) !== 0) {\n\t\tsrcIndex = ((srcY * sourcePitch)) + (sx * 4);\n\t\tdstIndex = ((dstY * destPitch)) + ((dx >> 1) * 4);\n\t\tditherBase = (dstY & 3) * 4;\n\n\t\t/* For pre-increment */\n\n\t\tditherIndex = (sx & 3) - 1;\n\n\t\t/* So we can pre-decrement */\n\n\t\tdeltaX = bbW + 1;\n\t\tdstMask = mask1;\n\t\tif (dstMask === 65535) {\n\t\t\tsrcShift = 16;\n\t\t} else {\n\t\t\tsrcShift = 0;\n\t\t}\n\t\twhile (((--deltaX)) !== 0) {\n\t\t\tditherThreshold = ditherMatrix4x4[ditherBase + ((ditherIndex = (ditherIndex + 1) & 3))];\n\t\t\tsourceWord = sourceBits[srcIndex >>> 2];\n\t\t\tsrcAlpha = sourceWord >>> 24;\n\t\t\tif (srcAlpha === 255) {\n\n\t\t\t\t/* Dither from 32 to 16 bit */\n\n\t\t\t\tsourceWord = dither32To16threshold(sourceWord, ditherThreshold);\n\t\t\t\tif (sourceWord === 0) {\n\t\t\t\t\tsourceWord = SHL(1, srcShift);\n\t\t\t\t} else {\n\t\t\t\t\tsourceWord = SHL(sourceWord, srcShift);\n\t\t\t\t}\n\t\t\t\tdstLongAtputmask(dstIndex, sourceWord, dstMask);\n\t\t\t} else {\n\n\t\t\t\t/* srcAlpha ~= 255 */\n\n\t\t\t\tif (srcAlpha !== 0) {\n\n\t\t\t\t\t/* 0 < srcAlpha < 255 */\n\t\t\t\t\t/* If we have to mix colors then just copy a single word */\n\n\t\t\t\t\tdestWord = destBits[dstIndex >>> 2];\n\t\t\t\t\tdestWord = destWord & ~dstMask;\n\n\t\t\t\t\t/* Expand from 16 to 32 bit by adding zero bits */\n\n\t\t\t\t\tdestWord = SHR(destWord, srcShift);\n\n\t\t\t\t\t/* Mix colors */\n\n\t\t\t\t\tdestWord = (((destWord & 31744) << 9) | ((destWord & 992) << 6)) | (((destWord & 31) << 3) | 4278190080);\n\n\t\t\t\t\t/* And dither */\n\n\t\t\t\t\tsourceWord = alphaBlendScaledwith(sourceWord, destWord);\n\t\t\t\t\tsourceWord = dither32To16threshold(sourceWord, ditherThreshold);\n\t\t\t\t\tif (sourceWord === 0) {\n\t\t\t\t\t\tsourceWord = SHL(1, srcShift);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsourceWord = SHL(sourceWord, srcShift);\n\t\t\t\t\t}\n\t\t\t\t\tdstLongAtputmask(dstIndex, sourceWord, dstMask);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsrcIndex += 4;\n\t\t\tif (destMSB) {\n\t\t\t\tif (srcShift === 0) {\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (srcShift !== 0) {\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Toggle between 0 and 16 */\n\n\t\t\tsrcShift = srcShift ^ 16;\n\t\t\tdstMask = ~dstMask;\n\t\t}\n\t\t++srcY;\n\t\t++dstY;\n\t}\n}\n\n\n/*\tThis version assumes \n\t\tcombinationRule = 34\n\t\tsourcePixSize = destPixSize = 32\n\t\tsourceForm ~= destForm.\n\tNote: The inner loop has been optimized for dealing\n\t\twith the special cases of srcAlpha = 0.0 and srcAlpha = 1.0 \n\t */\n\nfunction alphaSourceBlendBits32() {\n\tvar sourceWord;\n\tvar srcIndex;\n\tvar deltaX;\n\tvar dstIndex;\n\tvar srcAlpha;\n\tvar deltaY;\n\tvar srcY;\n\tvar destWord;\n\tvar dstY;\n\n\n\t/* This particular method should be optimized in itself */\n\t/* Give the compile a couple of hints */\n\t/* The following should be declared as pointers so the compiler will\n\tnotice that they're used for accessing memory locations \n\t(good to know on an Intel architecture) but then the increments\n\twould be different between ST code and C code so must hope the\n\tcompiler notices what happens (MS Visual C does) */\n\n\n\t/* So we can pre-decrement */\n\n\tdeltaY = bbH + 1;\n\tsrcY = sy;\n\n\t/* This is the outer loop */\n\n\tdstY = dy;\n\twhile (((--deltaY)) !== 0) {\n\t\tsrcIndex = ((srcY * sourcePitch)) + (sx * 4);\n\t\tdstIndex = ((dstY * destPitch)) + (dx * 4);\n\n\t\t/* So we can pre-decrement */\n\t\t/* This is the inner loop */\n\n\t\tdeltaX = bbW + 1;\n\t\twhile (((--deltaX)) !== 0) {\n\t\t\tsourceWord = sourceBits[srcIndex >>> 2];\n\t\t\tsrcAlpha = sourceWord >>> 24;\n\t\t\tif (srcAlpha === 255) {\n\t\t\t\tdestBits[dstIndex >>> 2] = sourceWord;\n\t\t\t\tsrcIndex += 4;\n\n\t\t\t\t/* Now copy as many words as possible with alpha = 255 */\n\n\t\t\t\tdstIndex += 4;\n\t\t\t\twhile ((((--deltaX)) !== 0) && ((((sourceWord = sourceBits[srcIndex >>> 2])) >>> 24) === 255)) {\n\t\t\t\t\tdestBits[dstIndex >>> 2] = sourceWord;\n\t\t\t\t\tsrcIndex += 4;\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t}\n\t\t\t\t++deltaX;\n\t\t\t} else {\n\n\t\t\t\t/* srcAlpha ~= 255 */\n\n\t\t\t\tif (srcAlpha === 0) {\n\t\t\t\t\tsrcIndex += 4;\n\n\t\t\t\t\t/* Now skip as many words as possible, */\n\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t\twhile ((((--deltaX)) !== 0) && ((((sourceWord = sourceBits[srcIndex >>> 2])) >>> 24) === 0)) {\n\t\t\t\t\t\tsrcIndex += 4;\n\t\t\t\t\t\tdstIndex += 4;\n\t\t\t\t\t}\n\t\t\t\t\t++deltaX;\n\t\t\t\t} else {\n\n\t\t\t\t\t/* 0 < srcAlpha < 255 */\n\t\t\t\t\t/* If we have to mix colors then just copy a single word */\n\n\t\t\t\t\tdestWord = destBits[dstIndex >>> 2];\n\t\t\t\t\tdestWord = alphaBlendScaledwith(sourceWord, destWord);\n\t\t\t\t\tdestBits[dstIndex >>> 2] = destWord;\n\t\t\t\t\tsrcIndex += 4;\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t++srcY;\n\t\t++dstY;\n\t}\n}\n\n\n/*\tThis version assumes \n\t\tcombinationRule = 34\n\t\tsourcePixSize = 32\n\t\tdestPixSize = 8\n\t\tsourceForm ~= destForm.\n\tNote: This is not real blending since we don't have the source colors available.\n\t */\n\nfunction alphaSourceBlendBits8() {\n\tvar srcShift;\n\tvar sourceWord;\n\tvar srcIndex;\n\tvar deltaX;\n\tvar mappingTable;\n\tvar dstIndex;\n\tvar adjust;\n\tvar mapperFlags;\n\tvar srcAlpha;\n\tvar dstMask;\n\tvar deltaY;\n\tvar srcY;\n\tvar destWord;\n\tvar dstY;\n\n\tmappingTable = default8To32Table();\n\tmapperFlags = cmFlags & ~ColorMapNewStyle;\n\n\t/* So we can pre-decrement */\n\n\tdeltaY = bbH + 1;\n\tsrcY = sy;\n\tdstY = dy;\n\tmask1 = (dx & 3) * 8;\n\tif (destMSB) {\n\t\tmask1 = 24 - mask1;\n\t}\n\tmask2 = AllOnes ^ (SHL(255, mask1));\n\tif ((dx & 1) === 0) {\n\t\tadjust = 0;\n\t} else {\n\t\tadjust = 522133279;\n\t}\n\tif ((dy & 1) === 0) {\n\t\tadjust = adjust ^ 522133279;\n\t}\n\twhile (((--deltaY)) !== 0) {\n\t\tadjust = adjust ^ 522133279;\n\t\tsrcIndex = ((srcY * sourcePitch)) + (sx * 4);\n\t\tdstIndex = ((dstY * destPitch)) + ((dx >> 2) * 4);\n\n\t\t/* So we can pre-decrement */\n\n\t\tdeltaX = bbW + 1;\n\t\tsrcShift = mask1;\n\n\t\t/* This is the inner loop */\n\n\t\tdstMask = mask2;\n\t\twhile (((--deltaX)) !== 0) {\n\t\t\tsourceWord = (sourceBits[srcIndex >>> 2] & ~adjust) + adjust;\n\t\t\tsrcAlpha = sourceWord >>> 24;\n\t\t\tif (srcAlpha > 31) {\n\n\t\t\t\t/* Everything below 31 is transparent */\n\n\t\t\t\tif (srcAlpha < 224) {\n\n\t\t\t\t\t/* Everything above 224 is opaque */\n\n\t\t\t\t\tdestWord = destBits[dstIndex >>> 2];\n\t\t\t\t\tdestWord = destWord & ~dstMask;\n\t\t\t\t\tdestWord = SHR(destWord, srcShift);\n\t\t\t\t\tdestWord = mappingTable[destWord];\n\t\t\t\t\tsourceWord = alphaBlendScaledwith(sourceWord, destWord);\n\t\t\t\t}\n\t\t\t\tsourceWord = mapPixelflags(sourceWord, mapperFlags);\n\n\t\t\t\t/* Store back */\n\n\t\t\t\tsourceWord = SHL(sourceWord, srcShift);\n\t\t\t\tdstLongAtputmask(dstIndex, sourceWord, dstMask);\n\t\t\t}\n\t\t\tsrcIndex += 4;\n\t\t\tif (destMSB) {\n\t\t\t\tif (srcShift === 0) {\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t\tsrcShift = 24;\n\t\t\t\t\tdstMask = 16777215;\n\t\t\t\t} else {\n\t\t\t\t\tsrcShift -= 8;\n\t\t\t\t\tdstMask = (dstMask >>> 8) | 4278190080;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (srcShift === 24) {\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t\tsrcShift = 0;\n\t\t\t\t\tdstMask = 4294967040;\n\t\t\t\t} else {\n\t\t\t\t\tsrcShift += 8;\n\t\t\t\t\tdstMask = (dstMask << 8) | 255;\n\t\t\t\t}\n\t\t\t}\n\t\t\tadjust = adjust ^ 522133279;\n\t\t}\n\t\t++srcY;\n\t\t++dstY;\n\t}\n}\n\nfunction bitAndwith(sourceWord, destinationWord) {\n\treturn sourceWord & destinationWord;\n}\n\nfunction bitAndInvertwith(sourceWord, destinationWord) {\n\treturn sourceWord & ~destinationWord;\n}\n\nfunction bitInvertAndwith(sourceWord, destinationWord) {\n\treturn ~sourceWord & destinationWord;\n}\n\nfunction bitInvertAndInvertwith(sourceWord, destinationWord) {\n\treturn ~sourceWord & ~destinationWord;\n}\n\nfunction bitInvertDestinationwith(sourceWord, destinationWord) {\n\treturn ~destinationWord;\n}\n\nfunction bitInvertOrwith(sourceWord, destinationWord) {\n\treturn ~sourceWord | destinationWord;\n}\n\nfunction bitInvertOrInvertwith(sourceWord, destinationWord) {\n\treturn ~sourceWord | ~destinationWord;\n}\n\nfunction bitInvertSourcewith(sourceWord, destinationWord) {\n\treturn ~sourceWord;\n}\n\nfunction bitInvertXorwith(sourceWord, destinationWord) {\n\treturn ~sourceWord ^ destinationWord;\n}\n\nfunction bitOrwith(sourceWord, destinationWord) {\n\treturn sourceWord | destinationWord;\n}\n\nfunction bitOrInvertwith(sourceWord, destinationWord) {\n\treturn sourceWord | ~destinationWord;\n}\n\nfunction bitXorwith(sourceWord, destinationWord) {\n\treturn sourceWord ^ destinationWord;\n}\n\n\n/*\tcheck for possible overlap of source and destination */\n/*\tar 10/19/1999: This method requires surfaces to be locked. */\n\nfunction checkSourceOverlap() {\n\tvar t;\n\n\tif ((sourceForm === destForm) && (dy >= sy)) {\n\t\tif (dy > sy) {\n\n\t\t\t/* have to start at bottom */\n\n\t\t\tvDir = -1;\n\t\t\tsy = (sy + bbH) - 1;\n\t\t\tdy = (dy + bbH) - 1;\n\t\t} else {\n\t\t\tif ((dy === sy) && (dx > sx)) {\n\n\t\t\t\t/* y's are equal, but x's are backward */\n\n\t\t\t\thDir = -1;\n\n\t\t\t\t/* start at right */\n\n\t\t\t\tsx = (sx + bbW) - 1;\n\n\t\t\t\t/* and fix up masks */\n\n\t\t\t\tdx = (dx + bbW) - 1;\n\t\t\t\tif (nWords > 1) {\n\t\t\t\t\tt = mask1;\n\t\t\t\t\tmask1 = mask2;\n\t\t\t\t\tmask2 = t;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdestIndex = ((dy * destPitch)) + ((DIV(dx, destPPW)) * 4);\n\t\tdestDelta = (destPitch * vDir) - (4 * (nWords * hDir));\n\t}\n}\n\nfunction clearWordwith(source, destination) {\n\treturn 0;\n}\n\n\n/*\tclip and adjust source origin and extent appropriately */\n/*\tfirst in x */\n\nfunction clipRange() {\n\tif (destX >= clipX) {\n\t\tsx = sourceX;\n\t\tdx = destX;\n\t\tbbW = width;\n\t} else {\n\t\tsx = sourceX + (clipX - destX);\n\t\tbbW = width - (clipX - destX);\n\t\tdx = clipX;\n\t}\n\tif ((dx + bbW) > (clipX + clipWidth)) {\n\t\tbbW -= (dx + bbW) - (clipX + clipWidth);\n\t}\n\tif (destY >= clipY) {\n\t\tsy = sourceY;\n\t\tdy = destY;\n\t\tbbH = height;\n\t} else {\n\t\tsy = (sourceY + clipY) - destY;\n\t\tbbH = height - (clipY - destY);\n\t\tdy = clipY;\n\t}\n\tif ((dy + bbH) > (clipY + clipHeight)) {\n\t\tbbH -= (dy + bbH) - (clipY + clipHeight);\n\t}\n\tif (noSource) {\n\t\treturn null;\n\t}\n\tif (sx < 0) {\n\t\tdx -= sx;\n\t\tbbW += sx;\n\t\tsx = 0;\n\t}\n\tif ((sx + bbW) > sourceWidth) {\n\t\tbbW -= (sx + bbW) - sourceWidth;\n\t}\n\tif (sy < 0) {\n\t\tdy -= sy;\n\t\tbbH += sy;\n\t\tsy = 0;\n\t}\n\tif ((sy + bbH) > sourceHeight) {\n\t\tbbH -= (sy + bbH) - sourceHeight;\n\t}\n}\n\n\n/*\tThis function is exported for the Balloon engine */\n\nfunction copyBits() {\n\tclipRange();\n\tif ((bbW <= 0) || (bbH <= 0)) {\n\n\t\t/* zero width or height; noop */\n\n\t\taffectedL = (affectedR = (affectedT = (affectedB = 0)));\n\t\treturn null;\n\t}\n\tif (!lockSurfaces()) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\t// skipping ifdef ENABLE_FAST_BLT\n\tcopyBitsLockedAndClipped();\n\n\tunlockSurfaces();\n}\n\n\n/*\tRecover from the fast path specialised code saying Help-I-cant-cope */\n\nfunction copyBitsFallback(op, flags) {\n\tvar done;\n\n\t// skipping ifdef ENABLE_FAST_BLT\n}\n\n\n/*\tPerform the actual copyBits operation using the fast path specialised code; fail some cases by falling back to normal code.\n\tAssume: Surfaces have been locked and clipping was performed. */\n\nfunction copyBitsFastPathSpecialised() {\n\t// skipping ifdef ENABLE_FAST_BLT\n}\n\n\n/*\tSupport for the balloon engine. */\n\nfunction copyBitsFromtoat(startX, stopX, yValue) {\n\tdestX = startX;\n\tdestY = yValue;\n\tsourceX = startX;\n\twidth = stopX - startX;\n\tcopyBits();\n\tshowDisplayBits();\n}\n\n\n/*\tPerform the actual copyBits operation.\n\tAssume: Surfaces have been locked and clipping was performed. */\n\nfunction copyBitsLockedAndClipped() {\n\tvar done;\n\n\tcopyBitsRule41Test();\n\tif (interpreterProxy.failed()) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tdone = tryCopyingBitsQuickly();\n\tif (done) {\n\t\treturn null;\n\t}\n\tif ((combinationRule === 30) || (combinationRule === 31)) {\n\n\t\t/* Check and fetch source alpha parameter for alpha blend */\n\n\t\tif (interpreterProxy.methodArgumentCount() === 1) {\n\t\t\tsourceAlpha = interpreterProxy.stackIntegerValue(0);\n\t\t\tif (!(!interpreterProxy.failed() && ((sourceAlpha >= 0) && (sourceAlpha <= 255)))) {\n\t\t\t\treturn interpreterProxy.primitiveFail();\n\t\t\t}\n\t\t} else {\n\t\t\treturn interpreterProxy.primitiveFail();\n\t\t}\n\t}\n\n\t/* Choose and perform the actual copy loop. */\n\n\tbitCount = 0;\n\tperformCopyLoop();\n\tif ((combinationRule === 22) || (combinationRule === 32)) {\n\n\t\t/* zero width and height; return the count */\n\n\t\taffectedL = (affectedR = (affectedT = (affectedB = 0)));\n\t}\n\tif (hDir > 0) {\n\t\taffectedL = dx;\n\t\taffectedR = dx + bbW;\n\t} else {\n\t\taffectedL = (dx - bbW) + 1;\n\t\taffectedR = dx + 1;\n\t}\n\tif (vDir > 0) {\n\t\taffectedT = dy;\n\t\taffectedB = dy + bbH;\n\t} else {\n\t\taffectedT = (dy - bbH) + 1;\n\t\taffectedB = dy + 1;\n\t}\n}\n\n\n/*\tTest possible use of rule 41, rgbComponentAlpha:with: Nothing to return, just set up some variables */\n\nfunction copyBitsRule41Test() {\n\tvar ungammaLookupTableOop;\n\tvar gammaLookupTableOop;\n\n\tif (combinationRule === 41) {\n\n\t\t/* fetch the forecolor into componentAlphaModeColor. */\n\n\t\tcomponentAlphaModeAlpha = 255;\n\t\tcomponentAlphaModeColor = 16777215;\n\t\tgammaLookupTable = null;\n\t\tungammaLookupTable = null;\n\t\tif (interpreterProxy.methodArgumentCount() >= 2) {\n\t\t\tcomponentAlphaModeAlpha = interpreterProxy.stackIntegerValue(interpreterProxy.methodArgumentCount() - 2);\n\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\treturn interpreterProxy.primitiveFail();\n\t\t\t}\n\t\t\tcomponentAlphaModeColor = interpreterProxy.stackIntegerValue(interpreterProxy.methodArgumentCount() - 1);\n\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\treturn interpreterProxy.primitiveFail();\n\t\t\t}\n\t\t\tif (interpreterProxy.methodArgumentCount() === 4) {\n\t\t\t\tgammaLookupTableOop = interpreterProxy.stackObjectValue(1);\n\t\t\t\tif (interpreterProxy.isBytes(gammaLookupTableOop)) {\n\t\t\t\t\tgammaLookupTable = gammaLookupTableOop.bytes;\n\t\t\t\t}\n\t\t\t\tungammaLookupTableOop = interpreterProxy.stackObjectValue(0);\n\t\t\t\tif (interpreterProxy.isBytes(ungammaLookupTableOop)) {\n\t\t\t\t\tungammaLookupTable = ungammaLookupTableOop.bytes;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (interpreterProxy.methodArgumentCount() === 1) {\n\t\t\t\tcomponentAlphaModeColor = interpreterProxy.stackIntegerValue(0);\n\t\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\t\treturn interpreterProxy.primitiveFail();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn interpreterProxy.primitiveFail();\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n/*\tThis version of the inner loop assumes noSource = false. */\n\nfunction copyLoop() {\n\tvar mergeWord;\n\tvar skewWord;\n\tvar skewMask;\n\tvar halftoneWord;\n\tvar unskew;\n\tvar mergeFnwith;\n\tvar hInc;\n\tvar destWord;\n\tvar word;\n\tvar prevWord;\n\tvar y;\n\tvar i;\n\tvar thisWord;\n\tvar notSkewMask;\n\n\tmergeFnwith = opTable[combinationRule + 1];\n\tmergeFnwith;\n\n\t/* Byte delta */\n\t/* degenerate skew fixed for Sparc. 10/20/96 ikp */\n\n\thInc = hDir * 4;\n\tif (skew === -32) {\n\t\tskew = (unskew = (skewMask = 0));\n\t} else {\n\t\tif (skew < 0) {\n\t\t\tunskew = skew + 32;\n\t\t\tskewMask = SHL(AllOnes, (0 - skew));\n\t\t} else {\n\t\t\tif (skew === 0) {\n\t\t\t\tunskew = 0;\n\t\t\t\tskewMask = AllOnes;\n\t\t\t} else {\n\t\t\t\tunskew = skew - 32;\n\t\t\t\tskewMask = SHR(AllOnes, skew);\n\t\t\t}\n\t\t}\n\t}\n\tnotSkewMask = ~skewMask;\n\tif (noHalftone) {\n\t\thalftoneWord = AllOnes;\n\t\thalftoneHeight = 0;\n\t} else {\n\t\thalftoneWord = halftoneAt(0);\n\t}\n\ty = dy;\n\tfor (i = 1; i <= bbH; i++) {\n\n\t\t/* here is the vertical loop */\n\n\t\tif (halftoneHeight > 1) {\n\n\t\t\t/* Otherwise, its always the same */\n\n\t\t\thalftoneWord = halftoneAt(y);\n\t\t\ty += vDir;\n\t\t}\n\t\tif (preload) {\n\n\t\t\t/* load the 64-bit shifter */\n\n\t\t\tprevWord = sourceBits[sourceIndex >>> 2];\n\t\t\tsourceIndex += hInc;\n\t\t} else {\n\t\t\tprevWord = 0;\n\t\t}\n\t\tdestMask = mask1;\n\n\t\t/* pick up next word */\n\n\t\tthisWord = sourceBits[sourceIndex >>> 2];\n\t\tsourceIndex += hInc;\n\n\t\t/* 32-bit rotate */\n\n\t\tskewWord = (SHIFT((prevWord & notSkewMask), unskew)) | (SHIFT((thisWord & skewMask), skew));\n\t\tprevWord = thisWord;\n\t\tdestWord = destBits[destIndex >>> 2];\n\t\tmergeWord = mergeFnwith(skewWord & halftoneWord, destWord);\n\t\tdestWord = (destMask & mergeWord) | (destWord & ~destMask);\n\t\tdestBits[destIndex >>> 2] = destWord;\n\n\t\t/* This central horizontal loop requires no store masking */\n\n\t\tdestIndex += hInc;\n\t\tdestMask = AllOnes;\n\t\tif (combinationRule === 3) {\n\t\t\tif ((skew === 0) && (halftoneWord === AllOnes)) {\n\n\t\t\t\t/* Very special inner loop for STORE mode with no skew -- just move words */\n\n\t\t\t\tif (hDir === -1) {\n\n\t\t\t\t\t/* Woeful patch: revert to older code for hDir = -1 */\n\n\t\t\t\t\tfor (word = 2; word <= (nWords - 1); word++) {\n\t\t\t\t\t\tthisWord = sourceBits[sourceIndex >>> 2];\n\t\t\t\t\t\tsourceIndex += hInc;\n\t\t\t\t\t\tdestBits[destIndex >>> 2] = thisWord;\n\t\t\t\t\t\tdestIndex += hInc;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (word = 2; word <= (nWords - 1); word++) {\n\n\t\t\t\t\t\t/* Note loop starts with prevWord loaded (due to preload) */\n\n\t\t\t\t\t\tdestBits[destIndex >>> 2] = prevWord;\n\t\t\t\t\t\tdestIndex += hInc;\n\t\t\t\t\t\tprevWord = sourceBits[sourceIndex >>> 2];\n\t\t\t\t\t\tsourceIndex += hInc;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t/* Special inner loop for STORE mode -- no need to call merge */\n\n\t\t\t\tfor (word = 2; word <= (nWords - 1); word++) {\n\t\t\t\t\tthisWord = sourceBits[sourceIndex >>> 2];\n\t\t\t\t\tsourceIndex += hInc;\n\n\t\t\t\t\t/* 32-bit rotate */\n\n\t\t\t\t\tskewWord = (SHIFT((prevWord & notSkewMask), unskew)) | (SHIFT((thisWord & skewMask), skew));\n\t\t\t\t\tprevWord = thisWord;\n\t\t\t\t\tdestBits[destIndex >>> 2] = skewWord & halftoneWord;\n\t\t\t\t\tdestIndex += hInc;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (word = 2; word <= (nWords - 1); word++) {\n\n\t\t\t\t/* Normal inner loop does merge: */\n\n\n\t\t\t\t/* pick up next word */\n\n\t\t\t\tthisWord = sourceBits[sourceIndex >>> 2];\n\t\t\t\tsourceIndex += hInc;\n\n\t\t\t\t/* 32-bit rotate */\n\n\t\t\t\tskewWord = (SHIFT((prevWord & notSkewMask), unskew)) | (SHIFT((thisWord & skewMask), skew));\n\t\t\t\tprevWord = thisWord;\n\t\t\t\tmergeWord = mergeFnwith(skewWord & halftoneWord, destBits[destIndex >>> 2]);\n\t\t\t\tdestBits[destIndex >>> 2] = mergeWord;\n\t\t\t\tdestIndex += hInc;\n\t\t\t}\n\t\t}\n\t\tif (nWords > 1) {\n\t\t\tdestMask = mask2;\n\n\t\t\t/* pick up next word */\n\n\t\t\tthisWord = sourceBits[sourceIndex >>> 2];\n\t\t\tsourceIndex += hInc;\n\n\t\t\t/* 32-bit rotate */\n\n\t\t\tskewWord = (SHIFT((prevWord & notSkewMask), unskew)) | (SHIFT((thisWord & skewMask), skew));\n\t\t\tdestWord = destBits[destIndex >>> 2];\n\t\t\tmergeWord = mergeFnwith(skewWord & halftoneWord, destWord);\n\t\t\tdestWord = (destMask & mergeWord) | (destWord & ~destMask);\n\t\t\tdestBits[destIndex >>> 2] = destWord;\n\t\t\tdestIndex += hInc;\n\t\t}\n\t\tsourceIndex += sourceDelta;\n\t\tdestIndex += destDelta;\n\t}\n}\n\n\n/*\tFaster copyLoop when source not used. hDir and vDir are both\n\tpositive, and perload and skew are unused */\n\nfunction copyLoopNoSource() {\n\tvar mergeWord;\n\tvar halftoneWord;\n\tvar mergeFnwith;\n\tvar destWord;\n\tvar word;\n\tvar i;\n\n\tmergeFnwith = opTable[combinationRule + 1];\n\tmergeFnwith;\n\tfor (i = 1; i <= bbH; i++) {\n\n\t\t/* here is the vertical loop */\n\n\t\tif (noHalftone) {\n\t\t\thalftoneWord = AllOnes;\n\t\t} else {\n\t\t\thalftoneWord = halftoneAt((dy + i) - 1);\n\t\t}\n\t\tdestMask = mask1;\n\t\tdestWord = destBits[destIndex >>> 2];\n\t\tmergeWord = mergeFnwith(halftoneWord, destWord);\n\t\tdestWord = (destMask & mergeWord) | (destWord & ~destMask);\n\t\tdestBits[destIndex >>> 2] = destWord;\n\n\t\t/* This central horizontal loop requires no store masking */\n\n\t\tdestIndex += 4;\n\t\tdestMask = AllOnes;\n\t\tif (combinationRule === 3) {\n\n\t\t\t/* Special inner loop for STORE */\n\n\t\t\tdestWord = halftoneWord;\n\t\t\tfor (word = 2; word <= (nWords - 1); word++) {\n\t\t\t\tdestBits[destIndex >>> 2] = destWord;\n\t\t\t\tdestIndex += 4;\n\t\t\t}\n\t\t} else {\n\n\t\t\t/* Normal inner loop does merge */\n\n\t\t\tfor (word = 2; word <= (nWords - 1); word++) {\n\n\t\t\t\t/* Normal inner loop does merge */\n\n\t\t\t\tdestWord = destBits[destIndex >>> 2];\n\t\t\t\tmergeWord = mergeFnwith(halftoneWord, destWord);\n\t\t\t\tdestBits[destIndex >>> 2] = mergeWord;\n\t\t\t\tdestIndex += 4;\n\t\t\t}\n\t\t}\n\t\tif (nWords > 1) {\n\t\t\tdestMask = mask2;\n\t\t\tdestWord = destBits[destIndex >>> 2];\n\t\t\tmergeWord = mergeFnwith(halftoneWord, destWord);\n\t\t\tdestWord = (destMask & mergeWord) | (destWord & ~destMask);\n\t\t\tdestBits[destIndex >>> 2] = destWord;\n\t\t\tdestIndex += 4;\n\t\t}\n\t\tdestIndex += destDelta;\n\t}\n}\n\n\n/*\tThis version of the inner loop maps source pixels\n\tto a destination form with different depth. Because it is already\n\tunweildy, the loop is not unrolled as in the other versions.\n\tPreload, skew and skewMask are all overlooked, since pickSourcePixels\n\tdelivers its destination word already properly aligned.\n\tNote that pickSourcePixels could be copied in-line at the top of\n\tthe horizontal loop, and some of its inits moved out of the loop. */\n/*\tar 12/7/1999:\n\tThe loop has been rewritten to use only one pickSourcePixels call.\n\tThe idea is that the call itself could be inlined. If we decide not\n\tto inline pickSourcePixels we could optimize the loop instead. */\n\nfunction copyLoopPixMap() {\n\tvar mapperFlags;\n\tvar srcShiftInc;\n\tvar dstShiftLeft;\n\tvar sourcePixMask;\n\tvar nSourceIncs;\n\tvar skewWord;\n\tvar words;\n\tvar destWord;\n\tvar startBits;\n\tvar mergeFnwith;\n\tvar dstShift;\n\tvar i;\n\tvar halftoneWord;\n\tvar mergeWord;\n\tvar destPixMask;\n\tvar dstShiftInc;\n\tvar srcShift;\n\tvar endBits;\n\tvar nPix;\n\tvar scrStartBits;\n\n\tmergeFnwith = opTable[combinationRule + 1];\n\tmergeFnwith;\n\tsourcePPW = DIV(32, sourceDepth);\n\tsourcePixMask = maskTable[sourceDepth];\n\tdestPixMask = maskTable[destDepth];\n\tmapperFlags = cmFlags & ~ColorMapNewStyle;\n\tsourceIndex = ((sy * sourcePitch)) + ((DIV(sx, sourcePPW)) * 4);\n\tscrStartBits = sourcePPW - (sx & (sourcePPW - 1));\n\tif (bbW < scrStartBits) {\n\t\tnSourceIncs = 0;\n\t} else {\n\t\tnSourceIncs = (DIV((bbW - scrStartBits), sourcePPW)) + 1;\n\t}\n\n\t/* Note following two items were already calculated in destmask setup! */\n\n\tsourceDelta = sourcePitch - (nSourceIncs * 4);\n\tstartBits = destPPW - (dx & (destPPW - 1));\n\tendBits = (((dx + bbW) - 1) & (destPPW - 1)) + 1;\n\tif (bbW < startBits) {\n\t\tstartBits = bbW;\n\t}\n\tsrcShift = (sx & (sourcePPW - 1)) * sourceDepth;\n\tdstShift = (dx & (destPPW - 1)) * destDepth;\n\tsrcShiftInc = sourceDepth;\n\tdstShiftInc = destDepth;\n\tdstShiftLeft = 0;\n\tif (sourceMSB) {\n\t\tsrcShift = (32 - sourceDepth) - srcShift;\n\t\tsrcShiftInc = 0 - srcShiftInc;\n\t}\n\tif (destMSB) {\n\t\tdstShift = (32 - destDepth) - dstShift;\n\t\tdstShiftInc = 0 - dstShiftInc;\n\t\tdstShiftLeft = 32 - destDepth;\n\t}\n\tfor (i = 1; i <= bbH; i++) {\n\n\t\t/* here is the vertical loop */\n\t\t/* *** is it possible at all that noHalftone == false? *** */\n\n\t\tif (noHalftone) {\n\t\t\thalftoneWord = AllOnes;\n\t\t} else {\n\t\t\thalftoneWord = halftoneAt((dy + i) - 1);\n\t\t}\n\t\tsrcBitShift = srcShift;\n\t\tdstBitShift = dstShift;\n\t\tdestMask = mask1;\n\n\t\t/* Here is the horizontal loop... */\n\n\t\tnPix = startBits;\n\t\twords = nWords;\n\t\tdo {\n\n\t\t\t/* pick up the word */\n\n\n\t\t\t/* align next word to leftmost pixel */\n\n\t\t\tskewWord = pickSourcePixelsflagssrcMaskdestMasksrcShiftIncdstShiftInc(nPix, mapperFlags, sourcePixMask, destPixMask, srcShiftInc, dstShiftInc);\n\t\t\tdstBitShift = dstShiftLeft;\n\t\t\tif (destMask === AllOnes) {\n\n\t\t\t\t/* avoid read-modify-write */\n\n\t\t\t\tmergeWord = mergeFnwith(skewWord & halftoneWord, destBits[destIndex >>> 2]);\n\t\t\t\tdestBits[destIndex >>> 2] = destMask & mergeWord;\n\t\t\t} else {\n\n\t\t\t\t/* General version using dest masking */\n\n\t\t\t\tdestWord = destBits[destIndex >>> 2];\n\t\t\t\tmergeWord = mergeFnwith(skewWord & halftoneWord, destWord & destMask);\n\t\t\t\tdestWord = (destMask & mergeWord) | (destWord & ~destMask);\n\t\t\t\tdestBits[destIndex >>> 2] = destWord;\n\t\t\t}\n\t\t\tdestIndex += 4;\n\t\t\tif (words === 2) {\n\n\t\t\t\t/* e.g., is the next word the last word? */\n\t\t\t\t/* set mask for last word in this row */\n\n\t\t\t\tdestMask = mask2;\n\t\t\t\tnPix = endBits;\n\t\t\t} else {\n\n\t\t\t\t/* use fullword mask for inner loop */\n\n\t\t\t\tdestMask = AllOnes;\n\t\t\t\tnPix = destPPW;\n\t\t\t}\n\t\t} while(!(((--words)) === 0));\n\t\tsourceIndex += sourceDelta;\n\t\tdestIndex += destDelta;\n\t}\n}\n\n\n/*\tReturn the default translation table from 1..8 bit indexed colors to 32bit */\n/*\tThe table has been generated by the following statements */\n/*\t| pvs hex |\n\tString streamContents:[:s|\n\t\ts nextPutAll:'static unsigned int theTable[256] = { '.\n\t\tpvs := (Color colorMapIfNeededFrom: 8 to: 32) asArray.\n\t\t1 to: pvs size do:[:i|\n\t\t\ti > 1 ifTrue:[s nextPutAll:', '].\n\t\t\t(i-1 \\\\ 8) = 0 ifTrue:[s cr].\n\t\t\ts nextPutAll:'0x'.\n\t\t\thex := (pvs at: i) printStringBase: 16.\n\t\t\ts nextPutAll: (hex copyFrom: 4 to: hex size).\n\t\t].\n\t\ts nextPutAll:'};'.\n\t]. */\n\nfunction default8To32Table() {\n\tvar theTable = [ \n0x0, 0xFF000001, 0xFFFFFFFF, 0xFF808080, 0xFFFF0000, 0xFF00FF00, 0xFF0000FF, 0xFF00FFFF, \n0xFFFFFF00, 0xFFFF00FF, 0xFF202020, 0xFF404040, 0xFF606060, 0xFF9F9F9F, 0xFFBFBFBF, 0xFFDFDFDF, \n0xFF080808, 0xFF101010, 0xFF181818, 0xFF282828, 0xFF303030, 0xFF383838, 0xFF484848, 0xFF505050, \n0xFF585858, 0xFF686868, 0xFF707070, 0xFF787878, 0xFF878787, 0xFF8F8F8F, 0xFF979797, 0xFFA7A7A7, \n0xFFAFAFAF, 0xFFB7B7B7, 0xFFC7C7C7, 0xFFCFCFCF, 0xFFD7D7D7, 0xFFE7E7E7, 0xFFEFEFEF, 0xFFF7F7F7, \n0xFF000001, 0xFF003300, 0xFF006600, 0xFF009900, 0xFF00CC00, 0xFF00FF00, 0xFF000033, 0xFF003333, \n0xFF006633, 0xFF009933, 0xFF00CC33, 0xFF00FF33, 0xFF000066, 0xFF003366, 0xFF006666, 0xFF009966, \n0xFF00CC66, 0xFF00FF66, 0xFF000099, 0xFF003399, 0xFF006699, 0xFF009999, 0xFF00CC99, 0xFF00FF99, \n0xFF0000CC, 0xFF0033CC, 0xFF0066CC, 0xFF0099CC, 0xFF00CCCC, 0xFF00FFCC, 0xFF0000FF, 0xFF0033FF, \n0xFF0066FF, 0xFF0099FF, 0xFF00CCFF, 0xFF00FFFF, 0xFF330000, 0xFF333300, 0xFF336600, 0xFF339900, \n0xFF33CC00, 0xFF33FF00, 0xFF330033, 0xFF333333, 0xFF336633, 0xFF339933, 0xFF33CC33, 0xFF33FF33, \n0xFF330066, 0xFF333366, 0xFF336666, 0xFF339966, 0xFF33CC66, 0xFF33FF66, 0xFF330099, 0xFF333399, \n0xFF336699, 0xFF339999, 0xFF33CC99, 0xFF33FF99, 0xFF3300CC, 0xFF3333CC, 0xFF3366CC, 0xFF3399CC, \n0xFF33CCCC, 0xFF33FFCC, 0xFF3300FF, 0xFF3333FF, 0xFF3366FF, 0xFF3399FF, 0xFF33CCFF, 0xFF33FFFF, \n0xFF660000, 0xFF663300, 0xFF666600, 0xFF669900, 0xFF66CC00, 0xFF66FF00, 0xFF660033, 0xFF663333, \n0xFF666633, 0xFF669933, 0xFF66CC33, 0xFF66FF33, 0xFF660066, 0xFF663366, 0xFF666666, 0xFF669966, \n0xFF66CC66, 0xFF66FF66, 0xFF660099, 0xFF663399, 0xFF666699, 0xFF669999, 0xFF66CC99, 0xFF66FF99, \n0xFF6600CC, 0xFF6633CC, 0xFF6666CC, 0xFF6699CC, 0xFF66CCCC, 0xFF66FFCC, 0xFF6600FF, 0xFF6633FF, \n0xFF6666FF, 0xFF6699FF, 0xFF66CCFF, 0xFF66FFFF, 0xFF990000, 0xFF993300, 0xFF996600, 0xFF999900, \n0xFF99CC00, 0xFF99FF00, 0xFF990033, 0xFF993333, 0xFF996633, 0xFF999933, 0xFF99CC33, 0xFF99FF33, \n0xFF990066, 0xFF993366, 0xFF996666, 0xFF999966, 0xFF99CC66, 0xFF99FF66, 0xFF990099, 0xFF993399, \n0xFF996699, 0xFF999999, 0xFF99CC99, 0xFF99FF99, 0xFF9900CC, 0xFF9933CC, 0xFF9966CC, 0xFF9999CC, \n0xFF99CCCC, 0xFF99FFCC, 0xFF9900FF, 0xFF9933FF, 0xFF9966FF, 0xFF9999FF, 0xFF99CCFF, 0xFF99FFFF, \n0xFFCC0000, 0xFFCC3300, 0xFFCC6600, 0xFFCC9900, 0xFFCCCC00, 0xFFCCFF00, 0xFFCC0033, 0xFFCC3333, \n0xFFCC6633, 0xFFCC9933, 0xFFCCCC33, 0xFFCCFF33, 0xFFCC0066, 0xFFCC3366, 0xFFCC6666, 0xFFCC9966, \n0xFFCCCC66, 0xFFCCFF66, 0xFFCC0099, 0xFFCC3399, 0xFFCC6699, 0xFFCC9999, 0xFFCCCC99, 0xFFCCFF99, \n0xFFCC00CC, 0xFFCC33CC, 0xFFCC66CC, 0xFFCC99CC, 0xFFCCCCCC, 0xFFCCFFCC, 0xFFCC00FF, 0xFFCC33FF, \n0xFFCC66FF, 0xFFCC99FF, 0xFFCCCCFF, 0xFFCCFFFF, 0xFFFF0000, 0xFFFF3300, 0xFFFF6600, 0xFFFF9900, \n0xFFFFCC00, 0xFFFFFF00, 0xFFFF0033, 0xFFFF3333, 0xFFFF6633, 0xFFFF9933, 0xFFFFCC33, 0xFFFFFF33, \n0xFFFF0066, 0xFFFF3366, 0xFFFF6666, 0xFFFF9966, 0xFFFFCC66, 0xFFFFFF66, 0xFFFF0099, 0xFFFF3399, \n0xFFFF6699, 0xFFFF9999, 0xFFFFCC99, 0xFFFFFF99, 0xFFFF00CC, 0xFFFF33CC, 0xFFFF66CC, 0xFFFF99CC, \n0xFFFFCCCC, 0xFFFFFFCC, 0xFFFF00FF, 0xFFFF33FF, 0xFFFF66FF, 0xFFFF99FF, 0xFFFFCCFF, 0xFFFFFFFF];;\n\n\treturn theTable;\n}\n\n\n/*\tUtility routine for computing Warp increments. */\n\nfunction deltaFromtonSteps(x1, x2, n) {\n\tif (x2 > x1) {\n\t\treturn (DIV(((x2 - x1) + FixedPt1), (n + 1))) + 1;\n\t} else {\n\t\tif (x2 === x1) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn 0 - ((DIV(((x1 - x2) + FixedPt1), (n + 1))) + 1);\n\t}\n}\n\n\n/*\tCompute masks for left and right destination words */\n\nfunction destMaskAndPointerInit() {\n\tvar endBits;\n\tvar startBits;\n\tvar pixPerM1;\n\n\n\t/* A mask, assuming power of two */\n\t/* how many pixels in first word */\n\n\tpixPerM1 = destPPW - 1;\n\tstartBits = destPPW - (dx & pixPerM1);\n\tif (destMSB) {\n\t\tmask1 = SHR(AllOnes, (32 - (startBits * destDepth)));\n\t} else {\n\t\tmask1 = SHL(AllOnes, (32 - (startBits * destDepth)));\n\t}\n\tendBits = (((dx + bbW) - 1) & pixPerM1) + 1;\n\tif (destMSB) {\n\t\tmask2 = SHL(AllOnes, (32 - (endBits * destDepth)));\n\t} else {\n\t\tmask2 = SHR(AllOnes, (32 - (endBits * destDepth)));\n\t}\n\tif (bbW < startBits) {\n\t\tmask1 = mask1 & mask2;\n\t\tmask2 = 0;\n\t\tnWords = 1;\n\t} else {\n\t\tnWords = (DIV(((bbW - startBits) + pixPerM1), destPPW)) + 1;\n\t}\n\n\t/* defaults for no overlap with source */\n\t/* calculate byte addr and delta, based on first word of data */\n\t/* Note pitch is bytes and nWords is longs, not bytes */\n\n\thDir = (vDir = 1);\n\tdestIndex = ((dy * destPitch)) + ((DIV(dx, destPPW)) * 4);\n\tdestDelta = (destPitch * vDir) - (4 * (nWords * hDir));\n}\n\nfunction destinationWordwith(sourceWord, destinationWord) {\n\treturn destinationWord;\n}\n\n\n/*\tDither the given 32bit word to 16 bit. Ignore alpha. */\n\nfunction dither32To16threshold(srcWord, ditherValue) {\n\tvar addThreshold;\n\n\n\t/* You bet */\n\n\taddThreshold = ditherValue << 8;\n\treturn ((dither8Lookup[addThreshold + ((srcWord >>> 16) & 255)] << 10) + (dither8Lookup[addThreshold + ((srcWord >>> 8) & 255)] << 5)) + dither8Lookup[addThreshold + (srcWord & 255)];\n}\n\n\n/*\tThis is the primitive implementation of the line-drawing loop.\n\tSee the comments in BitBlt>>drawLoopX:Y: */\n\nfunction drawLoopXY(xDelta, yDelta) {\n\tvar P;\n\tvar affT;\n\tvar dx1;\n\tvar px;\n\tvar affR;\n\tvar affL;\n\tvar py;\n\tvar i;\n\tvar affB;\n\tvar dy1;\n\n\tif (xDelta > 0) {\n\t\tdx1 = 1;\n\t} else {\n\t\tif (xDelta === 0) {\n\t\t\tdx1 = 0;\n\t\t} else {\n\t\t\tdx1 = -1;\n\t\t}\n\t}\n\tif (yDelta > 0) {\n\t\tdy1 = 1;\n\t} else {\n\t\tif (yDelta === 0) {\n\t\t\tdy1 = 0;\n\t\t} else {\n\t\t\tdy1 = -1;\n\t\t}\n\t}\n\tpx = Math.abs(yDelta);\n\tpy = Math.abs(xDelta);\n\n\t/* init null rectangle */\n\n\taffL = (affT = 9999);\n\taffR = (affB = -9999);\n\tif (py > px) {\n\n\t\t/* more horizontal */\n\n\t\tP = py >> 1;\n\t\tfor (i = 1; i <= py; i++) {\n\t\t\tdestX += dx1;\n\t\t\tif (((P -= px)) < 0) {\n\t\t\t\tdestY += dy1;\n\t\t\t\tP += py;\n\t\t\t}\n\t\t\tif (i < py) {\n\t\t\t\tcopyBits();\n\t\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tif ((affectedL < affectedR) && (affectedT < affectedB)) {\n\n\t\t\t\t\t/* Affected rectangle grows along the line */\n\n\t\t\t\t\taffL = Math.min(affL, affectedL);\n\t\t\t\t\taffR = Math.max(affR, affectedR);\n\t\t\t\t\taffT = Math.min(affT, affectedT);\n\t\t\t\t\taffB = Math.max(affB, affectedB);\n\t\t\t\t\tif (((affR - affL) * (affB - affT)) > 4000) {\n\n\t\t\t\t\t\t/* If affected rectangle gets large, update it in chunks */\n\n\t\t\t\t\t\taffectedL = affL;\n\t\t\t\t\t\taffectedR = affR;\n\t\t\t\t\t\taffectedT = affT;\n\t\t\t\t\t\taffectedB = affB;\n\t\t\t\t\t\tshowDisplayBits();\n\n\t\t\t\t\t\t/* init null rectangle */\n\n\t\t\t\t\t\taffL = (affT = 9999);\n\t\t\t\t\t\taffR = (affB = -9999);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\n\t\t/* more vertical */\n\n\t\tP = px >> 1;\n\t\tfor (i = 1; i <= px; i++) {\n\t\t\tdestY += dy1;\n\t\t\tif (((P -= py)) < 0) {\n\t\t\t\tdestX += dx1;\n\t\t\t\tP += px;\n\t\t\t}\n\t\t\tif (i < px) {\n\t\t\t\tcopyBits();\n\t\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tif ((affectedL < affectedR) && (affectedT < affectedB)) {\n\n\t\t\t\t\t/* Affected rectangle grows along the line */\n\n\t\t\t\t\taffL = Math.min(affL, affectedL);\n\t\t\t\t\taffR = Math.max(affR, affectedR);\n\t\t\t\t\taffT = Math.min(affT, affectedT);\n\t\t\t\t\taffB = Math.max(affB, affectedB);\n\t\t\t\t\tif (((affR - affL) * (affB - affT)) > 4000) {\n\n\t\t\t\t\t\t/* If affected rectangle gets large, update it in chunks */\n\n\t\t\t\t\t\taffectedL = affL;\n\t\t\t\t\t\taffectedR = affR;\n\t\t\t\t\t\taffectedT = affT;\n\t\t\t\t\t\taffectedB = affB;\n\t\t\t\t\t\tshowDisplayBits();\n\n\t\t\t\t\t\t/* init null rectangle */\n\n\t\t\t\t\t\taffL = (affT = 9999);\n\t\t\t\t\t\taffR = (affB = -9999);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\taffectedL = affL;\n\taffectedR = affR;\n\taffectedT = affT;\n\n\t/* store destX, Y back */\n\n\taffectedB = affB;\n\tinterpreterProxy.storeIntegerofObjectwithValue(BBDestXIndex, bitBltOop, destX);\n\tinterpreterProxy.storeIntegerofObjectwithValue(BBDestYIndex, bitBltOop, destY);\n}\n\n\n/*\tStore the given value back into destination form, using dstMask\n\tto mask out the bits to be modified. This is an essiantial\n\tread-modify-write operation on the destination form. */\n\nfunction dstLongAtputmask(idx, srcValue, dstMask) {\n\tvar dstValue;\n\n\tdstValue = destBits[idx >>> 2];\n\tdstValue = dstValue & dstMask;\n\tdstValue = dstValue | srcValue;\n\tdestBits[idx >>> 2] = dstValue;\n}\n\n\n/*\tDither the given 32bit word to 16 bit. Ignore alpha. */\n\nfunction expensiveDither32To16threshold(srcWord, ditherValue) {\n\tvar pv;\n\tvar threshold;\n\tvar value;\n\tvar out;\n\n\n\t/* You bet */\n\n\tpv = srcWord & 255;\n\tthreshold = ditherThresholds16[pv & 7];\n\tvalue = ditherValues16[pv >>> 3];\n\tif (ditherValue < threshold) {\n\t\tout = value + 1;\n\t} else {\n\t\tout = value;\n\t}\n\tpv = (srcWord >>> 8) & 255;\n\tthreshold = ditherThresholds16[pv & 7];\n\tvalue = ditherValues16[pv >>> 3];\n\tif (ditherValue < threshold) {\n\t\tout = out | ((value + 1) << 5);\n\t} else {\n\t\tout = out | (value << 5);\n\t}\n\tpv = (srcWord >>> 16) & 255;\n\tthreshold = ditherThresholds16[pv & 7];\n\tvalue = ditherValues16[pv >>> 3];\n\tif (ditherValue < threshold) {\n\t\tout = out | ((value + 1) << 10);\n\t} else {\n\t\tout = out | (value << 10);\n\t}\n\treturn out;\n}\n\n\n/*\tReturn the integer value of the given field of the given object. If the field contains a Float, truncate it and return its integral part. Fail if the given field does not contain a small integer or Float, or if the truncated Float is out of the range of small integers. */\n\nfunction fetchIntOrFloatofObject(fieldIndex, objectPointer) {\n\tvar floatValue;\n\tvar fieldOop;\n\n\tfieldOop = interpreterProxy.fetchPointerofObject(fieldIndex, objectPointer);\n\tif (typeof fieldOop === \"number\") {\n\t\treturn fieldOop;\n\t}\n\tfloatValue = interpreterProxy.floatValueOf(fieldOop);\n\tif (!((-2.147483648e9 <= floatValue) && (floatValue <= 2.147483647e9))) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn 0;\n\t}\n\treturn (floatValue|0);\n}\n\n\n/*\tReturn the integer value of the given field of the given object. If the field contains a Float, truncate it and return its integral part. Fail if the given field does not contain a small integer or Float, or if the truncated Float is out of the range of small integers. */\n\nfunction fetchIntOrFloatofObjectifNil(fieldIndex, objectPointer, defaultValue) {\n\tvar floatValue;\n\tvar fieldOop;\n\n\tfieldOop = interpreterProxy.fetchPointerofObject(fieldIndex, objectPointer);\n\tif (typeof fieldOop === \"number\") {\n\t\treturn fieldOop;\n\t}\n\tif (fieldOop.isNil) {\n\t\treturn defaultValue;\n\t}\n\tfloatValue = interpreterProxy.floatValueOf(fieldOop);\n\tif (!((-2.147483648e9 <= floatValue) && (floatValue <= 2.147483647e9))) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn 0;\n\t}\n\treturn (floatValue|0);\n}\n\n\n/*\tFor any non-zero pixel value in destinationWord with zero alpha channel take the alpha from sourceWord and fill it in. Intended for fixing alpha channels left at zero during 16->32 bpp conversions. */\n\nfunction fixAlphawith(sourceWord, destinationWord) {\n\tif (destDepth !== 32) {\n\t\treturn destinationWord;\n\t}\n\tif (destinationWord === 0) {\n\t\treturn 0;\n\t}\n\tif ((destinationWord & 4278190080) !== 0) {\n\t\treturn destinationWord;\n\t}\n\treturn destinationWord | (sourceWord & 4278190080);\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nfunction getModuleName() {\n\treturn moduleName;\n}\n\n\n/*\tReturn a value from the halftone pattern. */\n\nfunction halftoneAt(idx) {\n\treturn halftoneBase[MOD(idx, halftoneHeight)];\n}\n\nfunction halt() {\n\t;\n}\n\nfunction ignoreSourceOrHalftone(formPointer) {\n\tif (formPointer.isNil) {\n\t\treturn true;\n\t}\n\tif (combinationRule === 0) {\n\t\treturn true;\n\t}\n\tif (combinationRule === 5) {\n\t\treturn true;\n\t}\n\tif (combinationRule === 10) {\n\t\treturn true;\n\t}\n\tif (combinationRule === 15) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nfunction initBBOpTable() {\n\topTable[0+1] = clearWordwith;\n\topTable[1+1] = bitAndwith;\n\topTable[2+1] = bitAndInvertwith;\n\topTable[3+1] = sourceWordwith;\n\topTable[4+1] = bitInvertAndwith;\n\topTable[5+1] = destinationWordwith;\n\topTable[6+1] = bitXorwith;\n\topTable[7+1] = bitOrwith;\n\topTable[8+1] = bitInvertAndInvertwith;\n\topTable[9+1] = bitInvertXorwith;\n\topTable[10+1] = bitInvertDestinationwith;\n\topTable[11+1] = bitOrInvertwith;\n\topTable[12+1] = bitInvertSourcewith;\n\topTable[13+1] = bitInvertOrwith;\n\topTable[14+1] = bitInvertOrInvertwith;\n\topTable[15+1] = destinationWordwith;\n\topTable[16+1] = destinationWordwith;\n\topTable[17+1] = destinationWordwith;\n\topTable[18+1] = addWordwith;\n\topTable[19+1] = subWordwith;\n\topTable[20+1] = rgbAddwith;\n\topTable[21+1] = rgbSubwith;\n\topTable[22+1] = OLDrgbDiffwith;\n\topTable[23+1] = OLDtallyIntoMapwith;\n\topTable[24+1] = alphaBlendwith;\n\topTable[25+1] = pixPaintwith;\n\topTable[26+1] = pixMaskwith;\n\topTable[27+1] = rgbMaxwith;\n\topTable[28+1] = rgbMinwith;\n\topTable[29+1] = rgbMinInvertwith;\n\topTable[30+1] = alphaBlendConstwith;\n\topTable[31+1] = alphaPaintConstwith;\n\topTable[32+1] = rgbDiffwith;\n\topTable[33+1] = tallyIntoMapwith;\n\topTable[34+1] = alphaBlendScaledwith;\n\topTable[35+1] = alphaBlendScaledwith;\n\topTable[36+1] = alphaBlendScaledwith;\n\topTable[37+1] = rgbMulwith;\n\topTable[38+1] = pixSwapwith;\n\topTable[39+1] = pixClearwith;\n\topTable[40+1] = fixAlphawith;\n\topTable[41+1] = rgbComponentAlphawith;\n}\n\nfunction initDither8Lookup() {\n\tvar t;\n\tvar b;\n\tvar value;\n\n\tfor (b = 0; b <= 255; b++) {\n\t\tfor (t = 0; t <= 15; t++) {\n\t\t\tvalue = expensiveDither32To16threshold(b, t);\n\t\t\tdither8Lookup[(t << 8) + b] = value;\n\t\t}\n\t}\n}\n\nfunction initialiseModule() {\n\tinitBBOpTable();\n\tinitDither8Lookup();\n\t// skipping ifdef ENABLE_FAST_BLT\n\treturn true;\n}\n\n\n/*\tReturn true if shiftTable/maskTable define an identity mapping. */\n\nfunction isIdentityMapwith(shifts, masks) {\n\tif ((!shifts) || (!masks)) {\n\t\treturn true;\n\t}\n\tif ((shifts[RedIndex] === 0) && ((shifts[GreenIndex] === 0) && ((shifts[BlueIndex] === 0) && ((shifts[AlphaIndex] === 0) && ((masks[RedIndex] === 16711680) && ((masks[GreenIndex] === 65280) && ((masks[BlueIndex] === 255) && (masks[AlphaIndex] === 4278190080)))))))) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n/*\tLoad the dest form for BitBlt. Return false if anything is wrong, true otherwise. */\n\nfunction loadBitBltDestForm() {\n\tvar destBitsSize;\n\n\tdestBits = interpreterProxy.fetchPointerofObject(FormBitsIndex, destForm);\n\tdestWidth = interpreterProxy.fetchIntegerofObject(FormWidthIndex, destForm);\n\tdestHeight = interpreterProxy.fetchIntegerofObject(FormHeightIndex, destForm);\n\tif (!((destWidth >= 0) && (destHeight >= 0))) {\n\t\treturn false;\n\t}\n\tdestDepth = interpreterProxy.fetchIntegerofObject(FormDepthIndex, destForm);\n\tdestMSB = destDepth > 0;\n\tif (destDepth < 0) {\n\t\tdestDepth = 0 - destDepth;\n\t}\n\tif (typeof destBits === \"number\") {\n\n\t\t/* Query for actual surface dimensions */\n\n\t\tif (!queryDestSurface(destBits)) {\n\t\t\treturn false;\n\t\t}\n\t\tdestPPW = DIV(32, destDepth);\n\t\tdestBits = (destPitch = 0);\n\t} else {\n\t\tdestPPW = DIV(32, destDepth);\n\t\tdestPitch = (DIV((destWidth + (destPPW - 1)), destPPW)) * 4;\n\t\tdestBitsSize = BYTESIZEOF(destBits);\n\t\tif (!(interpreterProxy.isWordsOrBytes(destBits) && (destBitsSize === (destPitch * destHeight)))) {\n\t\t\treturn false;\n\t\t}\n\t\tdestBits = destBits.wordsOrBytes();\n\t}\n\treturn true;\n}\n\n\n/*\tLoad BitBlt from the oop.\n\tThis function is exported for the Balloon engine. */\n\nfunction loadBitBltFrom(bbObj) {\n\treturn loadBitBltFromwarping(bbObj, false);\n}\n\n\n/*\tLoad context from BitBlt instance. Return false if anything is amiss */\n/*\tNOTE this should all be changed to minX/maxX coordinates for simpler clipping\n\t\t-- once it works! */\n\nfunction loadBitBltFromwarping(bbObj, aBool) {\n\tvar ok;\n\n\tbitBltOop = bbObj;\n\tisWarping = aBool;\n\tcombinationRule = interpreterProxy.fetchIntegerofObject(BBRuleIndex, bitBltOop);\n\tif (interpreterProxy.failed() || ((combinationRule < 0) || (combinationRule > (OpTableSize - 2)))) {\n\t\treturn false;\n\t}\n\tif ((combinationRule >= 16) && (combinationRule <= 17)) {\n\t\treturn false;\n\t}\n\tsourceForm = interpreterProxy.fetchPointerofObject(BBSourceFormIndex, bitBltOop);\n\tnoSource = ignoreSourceOrHalftone(sourceForm);\n\thalftoneForm = interpreterProxy.fetchPointerofObject(BBHalftoneFormIndex, bitBltOop);\n\tnoHalftone = ignoreSourceOrHalftone(halftoneForm);\n\tdestForm = interpreterProxy.fetchPointerofObject(BBDestFormIndex, bbObj);\n\tif (!(interpreterProxy.isPointers(destForm) && (SIZEOF(destForm) >= 4))) {\n\t\treturn false;\n\t}\n\tok = loadBitBltDestForm();\n\tif (!ok) {\n\t\treturn false;\n\t}\n\tdestX = fetchIntOrFloatofObjectifNil(BBDestXIndex, bitBltOop, 0);\n\tdestY = fetchIntOrFloatofObjectifNil(BBDestYIndex, bitBltOop, 0);\n\twidth = fetchIntOrFloatofObjectifNil(BBWidthIndex, bitBltOop, destWidth);\n\theight = fetchIntOrFloatofObjectifNil(BBHeightIndex, bitBltOop, destHeight);\n\tif (interpreterProxy.failed()) {\n\t\treturn false;\n\t}\n\tif (noSource) {\n\t\tsourceX = (sourceY = 0);\n\t} else {\n\t\tif (!(interpreterProxy.isPointers(sourceForm) && (SIZEOF(sourceForm) >= 4))) {\n\t\t\treturn false;\n\t\t}\n\t\tok = loadBitBltSourceForm();\n\t\tif (!ok) {\n\t\t\treturn false;\n\t\t}\n\t\tok = loadColorMap();\n\t\tif (!ok) {\n\t\t\treturn false;\n\t\t}\n\t\tif ((cmFlags & ColorMapNewStyle) === 0) {\n\t\t\tsetupColorMasks();\n\t\t}\n\t\tsourceX = fetchIntOrFloatofObjectifNil(BBSourceXIndex, bitBltOop, 0);\n\t\tsourceY = fetchIntOrFloatofObjectifNil(BBSourceYIndex, bitBltOop, 0);\n\t}\n\tok = loadHalftoneForm();\n\tif (!ok) {\n\t\treturn false;\n\t}\n\tclipX = fetchIntOrFloatofObjectifNil(BBClipXIndex, bitBltOop, 0);\n\tclipY = fetchIntOrFloatofObjectifNil(BBClipYIndex, bitBltOop, 0);\n\tclipWidth = fetchIntOrFloatofObjectifNil(BBClipWidthIndex, bitBltOop, destWidth);\n\tclipHeight = fetchIntOrFloatofObjectifNil(BBClipHeightIndex, bitBltOop, destHeight);\n\tif (interpreterProxy.failed()) {\n\t\treturn false;\n\t}\n\tif (clipX < 0) {\n\t\tclipWidth += clipX;\n\t\tclipX = 0;\n\t}\n\tif (clipY < 0) {\n\t\tclipHeight += clipY;\n\t\tclipY = 0;\n\t}\n\tif ((clipX + clipWidth) > destWidth) {\n\t\tclipWidth = destWidth - clipX;\n\t}\n\tif ((clipY + clipHeight) > destHeight) {\n\t\tclipHeight = destHeight - clipY;\n\t}\n\treturn true;\n}\n\n\n/*\tLoad the source form for BitBlt. Return false if anything is wrong, true otherwise. */\n\nfunction loadBitBltSourceForm() {\n\tvar sourceBitsSize;\n\n\tsourceBits = interpreterProxy.fetchPointerofObject(FormBitsIndex, sourceForm);\n\tsourceWidth = fetchIntOrFloatofObject(FormWidthIndex, sourceForm);\n\tsourceHeight = fetchIntOrFloatofObject(FormHeightIndex, sourceForm);\n\tif (!((sourceWidth >= 0) && (sourceHeight >= 0))) {\n\t\treturn false;\n\t}\n\tsourceDepth = interpreterProxy.fetchIntegerofObject(FormDepthIndex, sourceForm);\n\tsourceMSB = sourceDepth > 0;\n\tif (sourceDepth < 0) {\n\t\tsourceDepth = 0 - sourceDepth;\n\t}\n\tif (typeof sourceBits === \"number\") {\n\n\t\t/* Query for actual surface dimensions */\n\n\t\tif (!querySourceSurface(sourceBits)) {\n\t\t\treturn false;\n\t\t}\n\t\tsourcePPW = DIV(32, sourceDepth);\n\t\tsourceBits = (sourcePitch = 0);\n\t} else {\n\t\tsourcePPW = DIV(32, sourceDepth);\n\t\tsourcePitch = (DIV((sourceWidth + (sourcePPW - 1)), sourcePPW)) * 4;\n\t\tsourceBitsSize = BYTESIZEOF(sourceBits);\n\t\tif (!(interpreterProxy.isWordsOrBytes(sourceBits) && (sourceBitsSize === (sourcePitch * sourceHeight)))) {\n\t\t\treturn false;\n\t\t}\n\t\tsourceBits = sourceBits.wordsOrBytes();\n\t}\n\treturn true;\n}\n\n\n/*\tColorMap, if not nil, must be longWords, and \n\t2^N long, where N = sourceDepth for 1, 2, 4, 8 bits, \n\tor N = 9, 12, or 15 (3, 4, 5 bits per color) for 16 or 32 bits. */\n\nfunction loadColorMap() {\n\tvar oop;\n\tvar cmOop;\n\tvar cmSize;\n\tvar oldStyle;\n\n\tcmFlags = (cmMask = (cmBitsPerColor = 0));\n\tcmShiftTable = null;\n\tcmMaskTable = null;\n\tcmLookupTable = null;\n\tcmOop = interpreterProxy.fetchPointerofObject(BBColorMapIndex, bitBltOop);\n\tif (cmOop.isNil) {\n\t\treturn true;\n\t}\n\n\t/* even if identity or somesuch - may be cleared later */\n\n\tcmFlags = ColorMapPresent;\n\toldStyle = false;\n\tif (interpreterProxy.isWords(cmOop)) {\n\n\t\t/* This is an old-style color map (indexed only, with implicit RGBA conversion) */\n\n\t\tcmSize = SIZEOF(cmOop);\n\t\tcmLookupTable = cmOop.words;\n\t\toldStyle = true;\n\t\t;\n\t} else {\n\n\t\t/* A new-style color map (fully qualified) */\n\n\t\tif (!(interpreterProxy.isPointers(cmOop) && (SIZEOF(cmOop) >= 3))) {\n\t\t\treturn false;\n\t\t}\n\t\tcmShiftTable = loadColorMapShiftOrMaskFrom(interpreterProxy.fetchPointerofObject(0, cmOop));\n\t\tcmMaskTable = loadColorMapShiftOrMaskFrom(interpreterProxy.fetchPointerofObject(1, cmOop));\n\t\toop = interpreterProxy.fetchPointerofObject(2, cmOop);\n\t\tif (oop.isNil) {\n\t\t\tcmSize = 0;\n\t\t} else {\n\t\t\tif (!interpreterProxy.isWords(oop)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tcmSize = SIZEOF(oop);\n\t\t\tcmLookupTable = oop.words;\n\t\t}\n\t\tcmFlags = cmFlags | ColorMapNewStyle;\n\t\t;\n\t}\n\tif ((cmSize & (cmSize - 1)) !== 0) {\n\t\treturn false;\n\t}\n\tcmMask = cmSize - 1;\n\tcmBitsPerColor = 0;\n\tif (cmSize === 512) {\n\t\tcmBitsPerColor = 3;\n\t}\n\tif (cmSize === 4096) {\n\t\tcmBitsPerColor = 4;\n\t}\n\tif (cmSize === 32768) {\n\t\tcmBitsPerColor = 5;\n\t}\n\tif (cmSize === 0) {\n\t\tcmLookupTable = null;\n\t\tcmMask = 0;\n\t} else {\n\t\tcmFlags = cmFlags | ColorMapIndexedPart;\n\t}\n\tif (oldStyle) {\n\n\t\t/* needs implicit conversion */\n\n\t\tsetupColorMasks();\n\t}\n\tif (isIdentityMapwith(cmShiftTable, cmMaskTable)) {\n\t\tcmMaskTable = null;\n\t\tcmShiftTable = null;\n\t} else {\n\t\tcmFlags = cmFlags | ColorMapFixedPart;\n\t}\n\treturn true;\n}\n\nfunction loadColorMapShiftOrMaskFrom(mapOop) {\n\tif (mapOop.isNil) {\n\t\treturn null;\n\t}\n\tif (typeof mapOop === \"number\") {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy.isWords(mapOop) && (SIZEOF(mapOop) === 4))) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\treturn mapOop.words;\n}\n\n\n/*\tLoad the halftone form */\n\nfunction loadHalftoneForm() {\n\tvar halftoneBits;\n\n\tif (noHalftone) {\n\t\thalftoneBase = null;\n\t\treturn true;\n\t}\n\tif (interpreterProxy.isPointers(halftoneForm) && (SIZEOF(halftoneForm) >= 4)) {\n\n\t\t/* Old-style 32xN monochrome halftone Forms */\n\n\t\thalftoneBits = interpreterProxy.fetchPointerofObject(FormBitsIndex, halftoneForm);\n\t\thalftoneHeight = interpreterProxy.fetchIntegerofObject(FormHeightIndex, halftoneForm);\n\t\tif (!interpreterProxy.isWords(halftoneBits)) {\n\t\t\tnoHalftone = true;\n\t\t}\n\t} else {\n\n\t\t/* New spec accepts, basically, a word array */\n\n\t\tif (!(!interpreterProxy.isPointers(halftoneForm) && (interpreterProxy.isWords(halftoneForm)))) {\n\t\t\treturn false;\n\t\t}\n\t\thalftoneBits = halftoneForm;\n\t\thalftoneHeight = SIZEOF(halftoneBits);\n\t}\n\thalftoneBase = halftoneBits.wordsOrBytes();\n\treturn true;\n}\n\n\n/*\tLoad the surface support plugin */\n\nfunction loadSurfacePlugin() {\n\tquerySurfaceFn = interpreterProxy.ioLoadFunctionFrom(\"ioGetSurfaceFormat\", \"SurfacePlugin\");\n\tlockSurfaceFn = interpreterProxy.ioLoadFunctionFrom(\"ioLockSurface\", \"SurfacePlugin\");\n\tunlockSurfaceFn = interpreterProxy.ioLoadFunctionFrom(\"ioUnlockSurface\", \"SurfacePlugin\");\n\treturn (!!querySurfaceFn) && ((!!lockSurfaceFn) && (!!unlockSurfaceFn));\n}\n\nfunction loadWarpBltFrom(bbObj) {\n\treturn loadBitBltFromwarping(bbObj, true);\n}\n\n\n/*\tGet a pointer to the bits of any OS surfaces. */\n/*\tNotes: \n\t* For equal source/dest handles only one locking operation is performed.\n\tThis is to prevent locking of overlapping areas which does not work with\n\tcertain APIs (as an example, DirectDraw prevents locking of overlapping areas). \n\tA special case for non-overlapping but equal source/dest handle would \n\tbe possible but we would have to transfer this information over to \n\tunlockSurfaces somehow (currently, only one unlock operation is \n\tperformed for equal source and dest handles). Also, this would require\n\ta change in the notion of ioLockSurface() which is right now interpreted\n\tas a hint and not as a requirement to lock only the specific portion of\n\tthe surface.\n\n\t* The arguments in ioLockSurface() provide the implementation with\n\tan explicit hint what area is affected. It can be very useful to\n\tknow the max. affected area beforehand if getting the bits requires expensive\n\tcopy operations (e.g., like a roundtrip to the X server or a glReadPixel op).\n\tHowever, the returned pointer *MUST* point to the virtual origin of the surface\n\tand not to the beginning of the rectangle. The promise made by BitBlt\n\tis to never access data outside the given rectangle (aligned to 4byte boundaries!)\n\tso it is okay to return a pointer to the virtual origin that is actually outside\n\tthe valid memory area.\n\n\t* The area provided in ioLockSurface() is already clipped (e.g., it will always\n\tbe inside the source and dest boundingBox) but it is not aligned to word boundaries\n\tyet. It is up to the support code to compute accurate alignment if necessary.\n\n\t* Warping always requires the entire source surface to be locked because\n\tthere is no beforehand knowledge about what area will actually be traversed.\n\n\t */\n\nfunction lockSurfaces() {\n\tvar destHandle;\n\tvar sourceHandle;\n\tvar t;\n\tvar fn;\n\tvar r;\n\tvar b;\n\tvar l;\n\n\thasSurfaceLock = false;\n\tif (destBits === 0) {\n\n\t\t/* Blitting *to* OS surface */\n\n\t\tif (!lockSurfaceFn) {\n\t\t\tif (!loadSurfacePlugin()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\tfn = lockSurfaceFn;\n\t\tdestHandle = interpreterProxy.fetchIntegerofObject(FormBitsIndex, destForm);\n\t\tif ((sourceBits === 0) && (!noSource)) {\n\n\t\t\t/* Handle the special case of equal source and dest handles */\n\n\t\t\tsourceHandle = interpreterProxy.fetchIntegerofObject(FormBitsIndex, sourceForm);\n\t\t\tif (sourceHandle === destHandle) {\n\n\t\t\t\t/* If we have overlapping source/dest we lock the entire area\n\t\t\t\tso that there is only one area transmitted */\n\n\t\t\t\tif (isWarping) {\n\n\t\t\t\t\t/* Otherwise use overlapping area */\n\n\t\t\t\t\tl = Math.min(sx, dx);\n\t\t\t\t\tr = Math.max(sx, dx) + bbW;\n\t\t\t\t\tt = Math.min(sy, dy);\n\t\t\t\t\tb = Math.max(sy, dy) + bbH;\n\t\t\t\t\tsourceBits = fn(sourceHandle, function(p){sourcePitch = p}, l, t, r-l, b-t);\n\t\t\t\t} else {\n\n\t\t\t\t\t/* When warping we always need the entire surface for the source */\n\n\t\t\t\t\tsourceBits = fn(sourceHandle, function(p){sourcePitch = p}, 0,0, sourceWidth, sourceHeight);\n\t\t\t\t}\n\t\t\t\tdestBits = sourceBits;\n\t\t\t\tdestPitch = sourcePitch;\n\t\t\t\thasSurfaceLock = true;\n\t\t\t\treturn destBits !== 0;\n\t\t\t}\n\t\t}\n\t\tdestBits = fn(destHandle, function(p){destPitch = p}, dx, dy, bbW, bbH);\n\t\thasSurfaceLock = true;\n\t}\n\tif ((sourceBits === 0) && (!noSource)) {\n\n\t\t/* Blitting *from* OS surface */\n\n\t\tsourceHandle = interpreterProxy.fetchIntegerofObject(FormBitsIndex, sourceForm);\n\t\tif (!lockSurfaceFn) {\n\t\t\tif (!loadSurfacePlugin()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\t/* Warping requiring the entire surface */\n\n\t\tfn = lockSurfaceFn;\n\t\tif (isWarping) {\n\t\t\tsourceBits = fn(sourceHandle, function(p){sourcePitch = p}, 0, 0, sourceWidth, sourceHeight);\n\t\t} else {\n\t\t\tsourceBits = fn(sourceHandle, function(p){sourcePitch = p}, sx, sy, bbW, bbH);\n\t\t}\n\t\thasSurfaceLock = true;\n\t}\n\treturn (destBits !== 0) && ((sourceBits !== 0) || (noSource));\n}\n\n\n/*\tColor map the given source pixel. */\n\nfunction mapPixelflags(sourcePixel, mapperFlags) {\n\tvar pv;\n\n\tpv = sourcePixel;\n\tif ((mapperFlags & ColorMapPresent) !== 0) {\n\t\tif ((mapperFlags & ColorMapFixedPart) !== 0) {\n\n\t\t\t/* avoid introducing transparency by color reduction */\n\n\t\t\tpv = rgbMapPixelflags(sourcePixel, mapperFlags);\n\t\t\tif ((pv === 0) && (sourcePixel !== 0)) {\n\t\t\t\tpv = 1;\n\t\t\t}\n\t\t}\n\t\tif ((mapperFlags & ColorMapIndexedPart) !== 0) {\n\t\t\tpv = cmLookupTable[pv & cmMask];\n\t\t}\n\t}\n\treturn pv;\n}\n\n\n/*\tThe module with the given name was just unloaded.\n\tMake sure we have no dangling references. */\n\nfunction moduleUnloaded(aModuleName) {\n\tif (strcmp(aModuleName, \"SurfacePlugin\") === 0) {\n\n\t\t/* The surface plugin just shut down. How nasty. */\n\n\t\tquerySurfaceFn = (lockSurfaceFn = (unlockSurfaceFn = 0));\n\t}\n}\n\n\n/*\tAND word1 to word2 as nParts partitions of nBits each.\n\tAny field of word1 not all-ones is treated as all-zeroes.\n\tUsed for erasing, eg, brush shapes prior to ORing in a color */\n\nfunction partitionedANDtonBitsnPartitions(word1, word2, nBits, nParts) {\n\tvar result;\n\tvar i;\n\tvar mask;\n\n\n\t/* partition mask starts at the right */\n\n\tmask = maskTable[nBits];\n\tresult = 0;\n\tfor (i = 1; i <= nParts; i++) {\n\t\tif ((word1 & mask) === mask) {\n\t\t\tresult = result | (word2 & mask);\n\t\t}\n\n\t\t/* slide left to next partition */\n\n\t\tmask = SHL(mask, nBits);\n\t}\n\treturn result;\n}\n\n\n/*\tAdd word1 to word2 as nParts partitions of nBits each.\n\tThis is useful for packed pixels, or packed colors */\n/*\tUse unsigned int everywhere because it has a well known arithmetic model without undefined behavior w.r.t. overflow and shifts */\n\nfunction partitionedAddtonBitscomponentMaskcarryOverflowMask(word1, word2, nBits, componentMask, carryOverflowMask) {\n\tvar w2;\n\tvar carryOverflow;\n\tvar sum;\n\tvar w1;\n\n\n\t/* mask to remove high bit of each component */\n\n\tw1 = word1 & carryOverflowMask;\n\tw2 = word2 & carryOverflowMask;\n\n\t/* sum without high bit to avoid overflowing over next component */\n\n\tsum = (word1 ^ w1) + (word2 ^ w2);\n\n\t/* detect overflow condition for saturating */\n\n\tcarryOverflow = (w1 & w2) | ((w1 | w2) & sum);\n\treturn ((sum ^ w1) ^ w2) | ((SHR(carryOverflow, (nBits - 1))) * componentMask);\n}\n\n\n/*\tMax word1 to word2 as nParts partitions of nBits each */\n/*\tIn C, most arithmetic operations answer the same bit pattern regardless of the operands being signed or unsigned ints\n\t(this is due to the way 2's complement numbers work). However, comparisions might fail. Add the proper declaration of\n\twords as unsigned int in those cases where comparisions are done (jmv) */\n\nfunction partitionedMaxwithnBitsnPartitions(word1, word2, nBits, nParts) {\n\tvar result;\n\tvar i;\n\tvar mask;\n\n\n\t/* partition mask starts at the right */\n\n\tmask = maskTable[nBits];\n\tresult = 0;\n\tfor (i = 1; i <= nParts; i++) {\n\t\tresult = result | Math.max((word2 & mask), (word1 & mask));\n\n\t\t/* slide left to next partition */\n\n\t\tmask = SHL(mask, nBits);\n\t}\n\treturn result;\n}\n\n\n/*\tMin word1 to word2 as nParts partitions of nBits each */\n/*\tIn C, most arithmetic operations answer the same bit pattern regardless of the operands being signed or unsigned ints\n\t(this is due to the way 2's complement numbers work). However, comparisions might fail. Add the proper declaration of\n\twords as unsigned int in those cases where comparisions are done (jmv) */\n\nfunction partitionedMinwithnBitsnPartitions(word1, word2, nBits, nParts) {\n\tvar result;\n\tvar i;\n\tvar mask;\n\n\n\t/* partition mask starts at the right */\n\n\tmask = maskTable[nBits];\n\tresult = 0;\n\tfor (i = 1; i <= nParts; i++) {\n\t\tresult = result | Math.min((word2 & mask), (word1 & mask));\n\n\t\t/* slide left to next partition */\n\n\t\tmask = SHL(mask, nBits);\n\t}\n\treturn result;\n}\n\n\n/*\tMultiply word1 with word2 as nParts partitions of nBits each.\n\tThis is useful for packed pixels, or packed colors.\n\tBug in loop version when non-white background */\n/*\tIn C, integer multiplication might answer a wrong value if the unsigned values are declared as signed.\n\tThis problem does not affect this method, because the most significant bit (i.e. the sign bit) will\n\talways be zero (jmv) */\n\nfunction partitionedMulwithnBitsnPartitions(word1, word2, nBits, nParts) {\n\tvar dMask;\n\tvar result;\n\tvar product;\n\tvar sMask;\n\n\n\t/* partition mask starts at the right */\n\n\tsMask = maskTable[nBits];\n\tdMask = SHL(sMask, nBits);\n\n\t/* optimized first step */\n\n\tresult = SHR((((((word1 & sMask) + 1) * ((word2 & sMask) + 1)) - 1) & dMask), nBits);\n\tif (nParts === 1) {\n\t\treturn result;\n\t}\n\tproduct = (((((SHR(word1, nBits)) & sMask) + 1) * (((SHR(word2, nBits)) & sMask) + 1)) - 1) & dMask;\n\tresult = result | product;\n\tif (nParts === 2) {\n\t\treturn result;\n\t}\n\tproduct = (((((SHR(word1, (2 * nBits))) & sMask) + 1) * (((SHR(word2, (2 * nBits))) & sMask) + 1)) - 1) & dMask;\n\tresult = result | (SHL(product, nBits));\n\tif (nParts === 3) {\n\t\treturn result;\n\t}\n\tproduct = (((((SHR(word1, (3 * nBits))) & sMask) + 1) * (((SHR(word2, (3 * nBits))) & sMask) + 1)) - 1) & dMask;\n\tresult = result | (SHL(product, (2 * nBits)));\n\treturn result;\n}\n\nfunction partitionedRgbComponentAlphadestnBitsnPartitions(sourceWord, destWord, nBits, nParts) {\n\tvar p2;\n\tvar result;\n\tvar p1;\n\tvar i;\n\tvar v;\n\tvar mask;\n\n\n\t/* partition mask starts at the right */\n\n\tmask = maskTable[nBits];\n\tresult = 0;\n\tfor (i = 1; i <= nParts; i++) {\n\t\tp1 = SHR((sourceWord & mask), ((i - 1) * nBits));\n\t\tp2 = SHR((destWord & mask), ((i - 1) * nBits));\n\t\tif (nBits !== 32) {\n\t\t\tif (nBits === 16) {\n\t\t\t\tp1 = rgbMap16To32(p1) | 4278190080;\n\t\t\t\tp2 = rgbMap16To32(p2) | 4278190080;\n\t\t\t} else {\n\t\t\t\tp1 = rgbMapfromto(p1, nBits, 32) | 4278190080;\n\t\t\t\tp2 = rgbMapfromto(p2, nBits, 32) | 4278190080;\n\t\t\t}\n\t\t}\n\t\tv = rgbComponentAlpha32with(p1, p2);\n\t\tif (nBits !== 32) {\n\t\t\tv = rgbMapfromto(v, 32, nBits);\n\t\t}\n\t\tresult = result | (SHL(v, ((i - 1) * nBits)));\n\n\t\t/* slide left to next partition */\n\n\t\tmask = SHL(mask, nBits);\n\t}\n\treturn result;\n}\n\n\n/*\tSubtract word1 from word2 as nParts partitions of nBits each.\n\tThis is useful for packed pixels, or packed colors */\n/*\tIn C, most arithmetic operations answer the same bit pattern regardless of the operands being signed or unsigned ints\n\t(this is due to the way 2's complement numbers work). However, comparisions might fail. Add the proper declaration of\n\twords as unsigned int in those cases where comparisions are done (jmv) */\n\nfunction partitionedSubfromnBitsnPartitions(word1, word2, nBits, nParts) {\n\tvar p2;\n\tvar result;\n\tvar p1;\n\tvar i;\n\tvar mask;\n\n\n\t/* partition mask starts at the right */\n\n\tmask = maskTable[nBits];\n\tresult = 0;\n\tfor (i = 1; i <= nParts; i++) {\n\t\tp1 = word1 & mask;\n\t\tp2 = word2 & mask;\n\t\tif (p1 < p2) {\n\n\t\t\t/* result is really abs value of thedifference */\n\n\t\t\tresult = result | (p2 - p1);\n\t\t} else {\n\t\t\tresult = result | (p1 - p2);\n\t\t}\n\n\t\t/* slide left to next partition */\n\n\t\tmask = SHL(mask, nBits);\n\t}\n\treturn result;\n}\n\n\n/*\tBased on the values provided during setup choose and\n\tperform the appropriate inner loop function. */\n/*\tShould be inlined into caller for speed */\n\nfunction performCopyLoop() {\n\tdestMaskAndPointerInit();\n\tif (noSource) {\n\n\t\t/* Simple fill loop */\n\n\t\tcopyLoopNoSource();\n\t} else {\n\n\t\t/* Loop using source and dest */\n\n\t\tcheckSourceOverlap();\n\t\tif ((sourceDepth !== destDepth) || ((cmFlags !== 0) || (sourceMSB !== destMSB))) {\n\n\t\t\t/* If we must convert between pixel depths or use\n\t\t\tcolor lookups or swap pixels use the general version */\n\n\t\t\tcopyLoopPixMap();\n\t\t} else {\n\n\t\t\t/* Otherwise we simple copy pixels and can use a faster version */\n\n\t\t\tsourceSkewAndPointerInit();\n\t\t\tcopyLoop();\n\t\t}\n\t}\n}\n\n\n/*\tPick nPix pixels starting at srcBitIndex from the source, map by the\n\tcolor map, and justify them according to dstBitIndex in the resulting destWord. */\n\nfunction pickSourcePixelsflagssrcMaskdestMasksrcShiftIncdstShiftInc(nPixels, mapperFlags, srcMask, dstMask, srcShiftInc, dstShiftInc) {\n\tvar sourcePix;\n\tvar srcShift;\n\tvar sourceWord;\n\tvar dstShift;\n\tvar destPix;\n\tvar nPix;\n\tvar destWord;\n\n\n\t/* oh please */\n\n\tsourceWord = sourceBits[sourceIndex >>> 2];\n\tdestWord = 0;\n\n\t/* Hint: Keep in register */\n\n\tsrcShift = srcBitShift;\n\n\t/* Hint: Keep in register */\n\n\tdstShift = dstBitShift;\n\n\t/* always > 0 so we can use do { } while(--nPix); */\n\n\tnPix = nPixels;\n\tif (mapperFlags === (ColorMapPresent | ColorMapIndexedPart)) {\n\n\t\t/* a little optimization for (pretty crucial) blits using indexed lookups only */\n\t\t/* grab, colormap and mix in pixel */\n\n\t\tdo {\n\t\t\tsourcePix = (SHR(sourceWord, srcShift)) & srcMask;\n\t\t\tdestPix = cmLookupTable[sourcePix & cmMask];\n\n\t\t\t/* adjust dest pix index */\n\n\t\t\tdestWord = destWord | (SHL((destPix & dstMask), dstShift));\n\n\t\t\t/* adjust source pix index */\n\n\t\t\tdstShift += dstShiftInc;\n\t\t\tif ((((srcShift += srcShiftInc)) & 4294967264) !== 0) {\n\t\t\t\tif (sourceMSB) {\n\t\t\t\t\tsrcShift += 32;\n\t\t\t\t} else {\n\t\t\t\t\tsrcShift -= 32;\n\t\t\t\t}\n\t\t\t\tsourceWord = sourceBits[(sourceIndex += 4) >>> 2];\n\t\t\t}\n\t\t} while(!(((--nPix)) === 0));\n\t} else {\n\n\t\t/* grab, colormap and mix in pixel */\n\n\t\tdo {\n\t\t\tsourcePix = (SHR(sourceWord, srcShift)) & srcMask;\n\t\t\tdestPix = mapPixelflags(sourcePix, mapperFlags);\n\n\t\t\t/* adjust dest pix index */\n\n\t\t\tdestWord = destWord | (SHL((destPix & dstMask), dstShift));\n\n\t\t\t/* adjust source pix index */\n\n\t\t\tdstShift += dstShiftInc;\n\t\t\tif ((((srcShift += srcShiftInc)) & 4294967264) !== 0) {\n\t\t\t\tif (sourceMSB) {\n\t\t\t\t\tsrcShift += 32;\n\t\t\t\t} else {\n\t\t\t\t\tsrcShift -= 32;\n\t\t\t\t}\n\t\t\t\tsourceWord = sourceBits[(sourceIndex += 4) >>> 2];\n\t\t\t}\n\t\t} while(!(((--nPix)) === 0));\n\t}\n\n\t/* Store back */\n\n\tsrcBitShift = srcShift;\n\treturn destWord;\n}\n\n\n/*\tPick a single pixel from the source for WarpBlt.\n\tNote: This method is crucial for WarpBlt speed w/o smoothing\n\tand still relatively important when smoothing is used. */\n\nfunction pickWarpPixelAtXy(xx, yy) {\n\tvar sourcePix;\n\tvar sourceWord;\n\tvar srcIndex;\n\tvar x;\n\tvar y;\n\n\n\t/* *please* */\n\t/* note: it would be much faster if we could just\n\tavoid these stupid tests for being inside sourceForm. */\n\n\tif ((xx < 0) || ((yy < 0) || ((((x = xx >>> 14)) >= sourceWidth) || (((y = yy >>> 14)) >= sourceHeight)))) {\n\t\treturn 0;\n\t}\n\tsrcIndex = ((y * sourcePitch)) + ((SHR(x, warpAlignShift)) * 4);\n\n\t/* Extract pixel from word */\n\n\tsourceWord = sourceBits[srcIndex >>> 2];\n\tsrcBitShift = warpBitShiftTable[x & warpAlignMask];\n\tsourcePix = (SHR(sourceWord, srcBitShift)) & warpSrcMask;\n\treturn sourcePix;\n}\n\n\n/*\tClear all pixels in destinationWord for which the pixels of sourceWord have the same values. Used to clear areas of some constant color to zero. */\n\nfunction pixClearwith(sourceWord, destinationWord) {\n\tvar pv;\n\tvar nBits;\n\tvar result;\n\tvar i;\n\tvar mask;\n\n\tif (destDepth === 32) {\n\t\tif (sourceWord === destinationWord) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn destinationWord;\n\t\t}\n\t}\n\tnBits = destDepth;\n\n\t/* partition mask starts at the right */\n\n\tmask = maskTable[nBits];\n\tresult = 0;\n\tfor (i = 1; i <= destPPW; i++) {\n\t\tpv = destinationWord & mask;\n\t\tif ((sourceWord & mask) === pv) {\n\t\t\tpv = 0;\n\t\t}\n\t\tresult = result | pv;\n\n\t\t/* slide left to next partition */\n\n\t\tmask = SHL(mask, nBits);\n\t}\n\treturn result;\n}\n\nfunction pixMaskwith(sourceWord, destinationWord) {\n\treturn partitionedANDtonBitsnPartitions(~sourceWord, destinationWord, destDepth, destPPW);\n}\n\nfunction pixPaintwith(sourceWord, destinationWord) {\n\tif (sourceWord === 0) {\n\t\treturn destinationWord;\n\t}\n\treturn sourceWord | partitionedANDtonBitsnPartitions(~sourceWord, destinationWord, destDepth, destPPW);\n}\n\n\n/*\tSwap the pixels in destWord */\n\nfunction pixSwapwith(sourceWord, destWord) {\n\tvar result;\n\tvar shift;\n\tvar lowMask;\n\tvar highMask;\n\tvar i;\n\n\tif (destPPW === 1) {\n\t\treturn destWord;\n\t}\n\tresult = 0;\n\n\t/* mask low pixel */\n\n\tlowMask = (SHL(1, destDepth)) - 1;\n\n\t/* mask high pixel */\n\n\thighMask = SHL(lowMask, ((destPPW - 1) * destDepth));\n\tshift = 32 - destDepth;\n\tresult = result | ((SHL((destWord & lowMask), shift)) | (SHR((destWord & highMask), shift)));\n\tif (destPPW <= 2) {\n\t\treturn result;\n\t}\n\tfor (i = 2; i <= (destPPW >> 1); i++) {\n\t\tlowMask = SHL(lowMask, destDepth);\n\t\thighMask = SHR(highMask, destDepth);\n\t\tshift -= destDepth * 2;\n\t\tresult = result | ((SHL((destWord & lowMask), shift)) | (SHR((destWord & highMask), shift)));\n\t}\n\treturn result;\n}\n\n\n/*\tInvoke the copyBits primitive. If the destination is the display, then copy it to the screen. */\n\nfunction primitiveCopyBits() {\n\tvar rcvr;\n\n\trcvr = interpreterProxy.stackValue(interpreterProxy.methodArgumentCount());\n\tif (!loadBitBltFrom(rcvr)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tcopyBits();\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tshowDisplayBits();\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(interpreterProxy.methodArgumentCount());\n\tif ((combinationRule === 22) || (combinationRule === 32)) {\n\t\tinterpreterProxy.pop(1);\n\t\treturn interpreterProxy.pushInteger(bitCount);\n\t}\n}\n\nfunction primitiveDisplayString() {\n\tvar charIndex;\n\tvar sourcePtr;\n\tvar stopIndex;\n\tvar bbObj;\n\tvar xTable;\n\tvar maxGlyph;\n\tvar quickBlt;\n\tvar glyphIndex;\n\tvar glyphMap;\n\tvar left;\n\tvar kernDelta;\n\tvar startIndex;\n\tvar ascii;\n\tvar sourceString;\n\n\tif (interpreterProxy.methodArgumentCount() !== 6) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tkernDelta = interpreterProxy.stackIntegerValue(0);\n\txTable = interpreterProxy.stackObjectValue(1);\n\tglyphMap = interpreterProxy.stackObjectValue(2);\n\tif (!((CLASSOF(xTable) === interpreterProxy.classArray()) && (CLASSOF(glyphMap) === interpreterProxy.classArray()))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (SIZEOF(glyphMap) !== 256) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tmaxGlyph = SIZEOF(xTable) - 2;\n\tstopIndex = interpreterProxy.stackIntegerValue(3);\n\tstartIndex = interpreterProxy.stackIntegerValue(4);\n\tsourceString = interpreterProxy.stackObjectValue(5);\n\tif (!interpreterProxy.isBytes(sourceString)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (!((startIndex > 0) && ((stopIndex > 0) && (stopIndex <= BYTESIZEOF(sourceString))))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tbbObj = interpreterProxy.stackObjectValue(6);\n\tif (!loadBitBltFrom(bbObj)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif ((combinationRule === 30) || (combinationRule === 31)) {\n\n\t\t/* needs extra source alpha */\n\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tquickBlt = (destBits !== 0) && ((sourceBits !== 0) && ((noSource === false) && ((sourceForm !== destForm) && ((cmFlags !== 0) || ((sourceMSB !== destMSB) || (sourceDepth !== destDepth))))));\n\tleft = destX;\n\tsourcePtr = sourceString.bytes;\n\tfor (charIndex = startIndex; charIndex <= stopIndex; charIndex++) {\n\t\tascii = sourcePtr[charIndex - 1];\n\t\tglyphIndex = interpreterProxy.fetchIntegerofObject(ascii, glyphMap);\n\t\tif ((glyphIndex < 0) || (glyphIndex > maxGlyph)) {\n\t\t\treturn interpreterProxy.primitiveFail();\n\t\t}\n\t\tsourceX = interpreterProxy.fetchIntegerofObject(glyphIndex, xTable);\n\t\twidth = interpreterProxy.fetchIntegerofObject(glyphIndex + 1, xTable) - sourceX;\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tclipRange();\n\t\tif ((bbW > 0) && (bbH > 0)) {\n\t\t\tif (quickBlt) {\n\t\t\t\tdestMaskAndPointerInit();\n\t\t\t\tcopyLoopPixMap();\n\t\t\t\taffectedL = dx;\n\t\t\t\taffectedR = dx + bbW;\n\t\t\t\taffectedT = dy;\n\t\t\t\taffectedB = dy + bbH;\n\t\t\t} else {\n\t\t\t\tcopyBits();\n\t\t\t}\n\t\t}\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tdestX = (destX + width) + kernDelta;\n\t}\n\taffectedL = left;\n\tshowDisplayBits();\n\tinterpreterProxy.storeIntegerofObjectwithValue(BBDestXIndex, bbObj, destX);\n\tinterpreterProxy.pop(6);\n}\n\n\n/*\tInvoke the line drawing primitive. */\n\nfunction primitiveDrawLoop() {\n\tvar yDelta;\n\tvar rcvr;\n\tvar xDelta;\n\n\trcvr = interpreterProxy.stackValue(2);\n\txDelta = interpreterProxy.stackIntegerValue(1);\n\tyDelta = interpreterProxy.stackIntegerValue(0);\n\tif (!loadBitBltFrom(rcvr)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (!interpreterProxy.failed()) {\n\t\tdrawLoopXY(xDelta, yDelta);\n\t\tshowDisplayBits();\n\t}\n\tif (!interpreterProxy.failed()) {\n\t\tinterpreterProxy.pop(2);\n\t}\n}\n\n\n/*\treturns the single pixel at x@y.\n\tIt does not handle LSB bitmaps right now.\n\tIf x or y are < 0, return 0 to indicate transparent (cf BitBlt>bitPeekerFromForm: usage).\n\tLikewise if x>width or y>depth.\n\tFail if the rcvr doesn't seem to be a Form, or x|y seem wrong */\n\nfunction primitivePixelValueAt() {\n\tvar pixel;\n\tvar rcvr;\n\tvar shift;\n\tvar depth;\n\tvar bitmap;\n\tvar ppW;\n\tvar word;\n\tvar stride;\n\tvar bitsSize;\n\tvar mask;\n\tvar xVal;\n\tvar yVal;\n\tvar _return_value;\n\n\txVal = interpreterProxy.stackIntegerValue(1);\n\tyVal = interpreterProxy.stackIntegerValue(0);\n\trcvr = interpreterProxy.stackValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif ((xVal < 0) || (yVal < 0)) {\n\t\t_return_value = 0;\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy.popthenPush(3, _return_value);\n\t\treturn null;\n\t}\n\trcvr = interpreterProxy.stackValue(interpreterProxy.methodArgumentCount());\n\tif (!(interpreterProxy.isPointers(rcvr) && (SIZEOF(rcvr) >= 4))) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tbitmap = interpreterProxy.fetchPointerofObject(FormBitsIndex, rcvr);\n\tif (!interpreterProxy.isWordsOrBytes(bitmap)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\twidth = interpreterProxy.fetchIntegerofObject(FormWidthIndex, rcvr);\n\theight = interpreterProxy.fetchIntegerofObject(FormHeightIndex, rcvr);\n\n\t/* if width/height/depth are not integer, fail */\n\n\tdepth = interpreterProxy.fetchIntegerofObject(FormDepthIndex, rcvr);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif ((xVal >= width) || (yVal >= height)) {\n\t\t_return_value = 0;\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy.popthenPush(3, _return_value);\n\t\treturn null;\n\t}\n\tif (depth < 0) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\n\t/* pixels in each word */\n\n\tppW = DIV(32, depth);\n\n\t/* how many words per row of pixels */\n\n\tstride = DIV((width + (ppW - 1)), ppW);\n\tbitsSize = BYTESIZEOF(bitmap);\n\tif (bitsSize !== ((stride * height) * 4)) {\n\n\t\t/* bytes per word */\n\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\n\t/* load the word that contains our target */\n\n\tword = interpreterProxy.fetchLong32ofObject((yVal * stride) + (DIV(xVal, ppW)), bitmap);\n\n\t/* make a mask to isolate the pixel within that word */\n\n\tmask = SHR(4294967295, (32 - depth));\n\n\t/* this is the tricky MSB part - we mask the xVal to find how far into the word we need, then add 1 for the pixel we're looking for, then * depth to get the bit shift */\n\n\tshift = 32 - (((xVal & (ppW - 1)) + 1) * depth);\n\n\t/* shift, mask and dim the lights */\n\n\tpixel = (SHR(word, shift)) & mask;\n\t_return_value = interpreterProxy.positive32BitIntegerFor(pixel);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tInvoke the warpBits primitive. If the destination is the display, then copy it to the screen. */\n\nfunction primitiveWarpBits() {\n\tvar rcvr;\n\n\trcvr = interpreterProxy.stackValue(interpreterProxy.methodArgumentCount());\n\tif (!loadWarpBltFrom(rcvr)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\twarpBits();\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tshowDisplayBits();\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(interpreterProxy.methodArgumentCount());\n}\n\n\n/*\tQuery the dimension of an OS surface.\n\tThis method is provided so that in case the inst vars of the\n\tsource form are broken, *actual* values of the OS surface\n\tcan be obtained. This might, for instance, happen if the user\n\tresizes the main window.\n\tNote: Moved to a separate function for better inlining of the caller. */\n\nfunction queryDestSurface(handle) {\n\tif (!querySurfaceFn) {\n\t\tif (!loadSurfacePlugin()) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn querySurfaceFn(handle, function(w, h, d, m){destWidth = w; destHeight = h; destDepth = d; destMSB = m; });\n}\n\n\n/*\tQuery the dimension of an OS surface.\n\tThis method is provided so that in case the inst vars of the\n\tsource form are broken, *actual* values of the OS surface\n\tcan be obtained. This might, for instance, happen if the user\n\tresizes the main window.\n\tNote: Moved to a separate function for better inlining of the caller. */\n\nfunction querySourceSurface(handle) {\n\tif (!querySurfaceFn) {\n\t\tif (!loadSurfacePlugin()) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn querySurfaceFn(handle, function(w, h, d, m){sourceWidth = w; sourceHeight = h; sourceDepth = d; sourceMSB = m; });\n}\n\nfunction rgbAddwith(sourceWord, destinationWord) {\n\tvar carryOverflowMask;\n\tvar componentMask;\n\n\tif (destDepth < 16) {\n\n\t\t/* Add each pixel separately */\n\n\t\tcomponentMask = (SHL(1, destDepth)) - 1;\n\t\tcarryOverflowMask = SHL((DIV(4294967295, componentMask)), (destDepth - 1));\n\t\treturn partitionedAddtonBitscomponentMaskcarryOverflowMask(sourceWord, destinationWord, destDepth, componentMask, carryOverflowMask);\n\t}\n\tif (destDepth === 16) {\n\n\t\t/* Add RGB components of each pixel separately */\n\n\t\tcomponentMask = 31;\n\t\tcarryOverflowMask = 1108361744;\n\t\treturn partitionedAddtonBitscomponentMaskcarryOverflowMask(sourceWord & 2147450879, destinationWord & 2147450879, 5, componentMask, carryOverflowMask);\n\t} else {\n\n\t\t/* Add RGBA components of the pixel separately */\n\n\t\tcomponentMask = 255;\n\t\tcarryOverflowMask = 2155905152;\n\t\treturn partitionedAddtonBitscomponentMaskcarryOverflowMask(sourceWord, destinationWord, 8, componentMask, carryOverflowMask);\n\t}\n}\n\n\n/*\tThis version assumes \n\t\tcombinationRule = 41\n\t\tsourcePixSize = 32\n\t\tdestPixSize = 16\n\t\tsourceForm ~= destForm.\n\t */\n/*\tThis particular method should be optimized in itself */\n\nfunction rgbComponentAlpha16() {\n\tvar ditherBase;\n\tvar ditherThreshold;\n\tvar srcShift;\n\tvar sourceWord;\n\tvar srcIndex;\n\tvar deltaX;\n\tvar dstIndex;\n\tvar srcAlpha;\n\tvar dstMask;\n\tvar deltaY;\n\tvar srcY;\n\tvar destWord;\n\tvar dstY;\n\tvar ditherIndex;\n\n\n\t/* So we can pre-decrement */\n\n\tdeltaY = bbH + 1;\n\tsrcY = sy;\n\tdstY = dy;\n\tsrcShift = (dx & 1) * 16;\n\tif (destMSB) {\n\t\tsrcShift = 16 - srcShift;\n\t}\n\n\t/* This is the outer loop */\n\n\tmask1 = SHL(65535, (16 - srcShift));\n\twhile (((--deltaY)) !== 0) {\n\t\tsrcIndex = ((srcY * sourcePitch)) + (sx * 4);\n\t\tdstIndex = ((dstY * destPitch)) + ((dx >> 1) * 4);\n\t\tditherBase = (dstY & 3) * 4;\n\n\t\t/* For pre-increment */\n\n\t\tditherIndex = (sx & 3) - 1;\n\n\t\t/* So we can pre-decrement */\n\n\t\tdeltaX = bbW + 1;\n\t\tdstMask = mask1;\n\t\tif (dstMask === 65535) {\n\t\t\tsrcShift = 16;\n\t\t} else {\n\t\t\tsrcShift = 0;\n\t\t}\n\t\twhile (((--deltaX)) !== 0) {\n\t\t\tditherThreshold = ditherMatrix4x4[ditherBase + ((ditherIndex = (ditherIndex + 1) & 3))];\n\t\t\tsourceWord = sourceBits[srcIndex >>> 2];\n\t\t\tsrcAlpha = sourceWord & 16777215;\n\t\t\tif (srcAlpha !== 0) {\n\n\t\t\t\t/* 0 < srcAlpha */\n\t\t\t\t/* If we have to mix colors then just copy a single word */\n\n\t\t\t\tdestWord = destBits[dstIndex >>> 2];\n\t\t\t\tdestWord = destWord & ~dstMask;\n\n\t\t\t\t/* Expand from 16 to 32 bit by adding zero bits */\n\n\t\t\t\tdestWord = SHR(destWord, srcShift);\n\n\t\t\t\t/* Mix colors */\n\n\t\t\t\tdestWord = (((destWord & 31744) << 9) | ((destWord & 992) << 6)) | (((destWord & 31) << 3) | 4278190080);\n\n\t\t\t\t/* And dither */\n\n\t\t\t\tsourceWord = rgbComponentAlpha32with(sourceWord, destWord);\n\t\t\t\tsourceWord = dither32To16threshold(sourceWord, ditherThreshold);\n\t\t\t\tif (sourceWord === 0) {\n\t\t\t\t\tsourceWord = SHL(1, srcShift);\n\t\t\t\t} else {\n\t\t\t\t\tsourceWord = SHL(sourceWord, srcShift);\n\t\t\t\t}\n\t\t\t\tdstLongAtputmask(dstIndex, sourceWord, dstMask);\n\t\t\t}\n\t\t\tsrcIndex += 4;\n\t\t\tif (destMSB) {\n\t\t\t\tif (srcShift === 0) {\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (srcShift !== 0) {\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Toggle between 0 and 16 */\n\n\t\t\tsrcShift = srcShift ^ 16;\n\t\t\tdstMask = ~dstMask;\n\t\t}\n\t\t++srcY;\n\t\t++dstY;\n\t}\n}\n\n\n/*\tThis version assumes \n\t\tcombinationRule = 41\n\t\tsourcePixSize = destPixSize = 32\n\t\tsourceForm ~= destForm.\n\tNote: The inner loop has been optimized for dealing\n\t\twith the special case of aR = aG = aB = 0 \n\t */\n\nfunction rgbComponentAlpha32() {\n\tvar sourceWord;\n\tvar srcIndex;\n\tvar deltaX;\n\tvar dstIndex;\n\tvar srcAlpha;\n\tvar deltaY;\n\tvar srcY;\n\tvar destWord;\n\tvar dstY;\n\n\n\t/* This particular method should be optimized in itself */\n\t/* Give the compile a couple of hints */\n\t/* The following should be declared as pointers so the compiler will\n\tnotice that they're used for accessing memory locations \n\t(good to know on an Intel architecture) but then the increments\n\twould be different between ST code and C code so must hope the\n\tcompiler notices what happens (MS Visual C does) */\n\n\n\t/* So we can pre-decrement */\n\n\tdeltaY = bbH + 1;\n\tsrcY = sy;\n\n\t/* This is the outer loop */\n\n\tdstY = dy;\n\twhile (((--deltaY)) !== 0) {\n\t\tsrcIndex = ((srcY * sourcePitch)) + (sx * 4);\n\t\tdstIndex = ((dstY * destPitch)) + (dx * 4);\n\n\t\t/* So we can pre-decrement */\n\t\t/* This is the inner loop */\n\n\t\tdeltaX = bbW + 1;\n\t\twhile (((--deltaX)) !== 0) {\n\t\t\tsourceWord = sourceBits[srcIndex >>> 2];\n\t\t\tsrcAlpha = sourceWord & 16777215;\n\t\t\tif (srcAlpha === 0) {\n\t\t\t\tsrcIndex += 4;\n\n\t\t\t\t/* Now skip as many words as possible, */\n\n\t\t\t\tdstIndex += 4;\n\t\t\t\twhile ((((--deltaX)) !== 0) && ((((sourceWord = sourceBits[srcIndex >>> 2])) & 16777215) === 0)) {\n\t\t\t\t\tsrcIndex += 4;\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t}\n\t\t\t\t++deltaX;\n\t\t\t} else {\n\n\t\t\t\t/* 0 < srcAlpha */\n\t\t\t\t/* If we have to mix colors then just copy a single word */\n\n\t\t\t\tdestWord = destBits[dstIndex >>> 2];\n\t\t\t\tdestWord = rgbComponentAlpha32with(sourceWord, destWord);\n\t\t\t\tdestBits[dstIndex >>> 2] = destWord;\n\t\t\t\tsrcIndex += 4;\n\t\t\t\tdstIndex += 4;\n\t\t\t}\n\t\t}\n\t\t++srcY;\n\t\t++dstY;\n\t}\n}\n\n\n/*\t\n\tcomponentAlphaModeColor is the color,\n\tsourceWord contains an alpha value for each component of RGB\n\teach of which is encoded as0 meaning 0.0 and 255 meaning 1.0 .\n\tthe rule is...\n\t\n\tcolor = componentAlphaModeColor.\n\tcolorAlpha = componentAlphaModeAlpha.\n\tmask = sourceWord.\n\tdst.A = colorAlpha + (1 - colorAlpha) * dst.A\n dst.R = color.R * mask.R * colorAlpha + (1 - (mask.R * colorAlpha)) * dst.R\n dst.G = color.G * mask.G * colorAlpha + (1 - (mask.G* colorAlpha)) * dst.G\n dst.B = color.B * mask.B * colorAlpha + (1 - (mask.B* colorAlpha)) * dst.B\n\t */\n/*\tDo NOT inline this into optimized loops */\n\nfunction rgbComponentAlpha32with(sourceWord, destinationWord) {\n\tvar g;\n\tvar srcColor;\n\tvar aG;\n\tvar d;\n\tvar a;\n\tvar aA;\n\tvar aR;\n\tvar dstMask;\n\tvar srcAlpha;\n\tvar r;\n\tvar b;\n\tvar aB;\n\tvar alpha;\n\tvar answer;\n\tvar s;\n\n\talpha = sourceWord;\n\tif (alpha === 0) {\n\t\treturn destinationWord;\n\t}\n\tsrcColor = componentAlphaModeColor;\n\tsrcAlpha = componentAlphaModeAlpha & 255;\n\taB = alpha & 255;\n\talpha = alpha >>> 8;\n\taG = alpha & 255;\n\talpha = alpha >>> 8;\n\taR = alpha & 255;\n\talpha = alpha >>> 8;\n\taA = alpha & 255;\n\tif (srcAlpha !== 255) {\n\t\taA = (aA * srcAlpha) >>> 8;\n\t\taR = (aR * srcAlpha) >>> 8;\n\t\taG = (aG * srcAlpha) >>> 8;\n\t\taB = (aB * srcAlpha) >>> 8;\n\t}\n\tdstMask = destinationWord;\n\td = dstMask & 255;\n\ts = srcColor & 255;\n\tif (!!ungammaLookupTable) {\n\t\td = ungammaLookupTable[d];\n\t\ts = ungammaLookupTable[s];\n\t}\n\tb = ((d * (255 - aB)) >>> 8) + ((s * aB) >>> 8);\n\tif (b > 255) {\n\t\tb = 255;\n\t}\n\tif (!!gammaLookupTable) {\n\t\tb = gammaLookupTable[b];\n\t}\n\tdstMask = dstMask >>> 8;\n\tsrcColor = srcColor >>> 8;\n\td = dstMask & 255;\n\ts = srcColor & 255;\n\tif (!!ungammaLookupTable) {\n\t\td = ungammaLookupTable[d];\n\t\ts = ungammaLookupTable[s];\n\t}\n\tg = ((d * (255 - aG)) >>> 8) + ((s * aG) >>> 8);\n\tif (g > 255) {\n\t\tg = 255;\n\t}\n\tif (!!gammaLookupTable) {\n\t\tg = gammaLookupTable[g];\n\t}\n\tdstMask = dstMask >>> 8;\n\tsrcColor = srcColor >>> 8;\n\td = dstMask & 255;\n\ts = srcColor & 255;\n\tif (!!ungammaLookupTable) {\n\t\td = ungammaLookupTable[d];\n\t\ts = ungammaLookupTable[s];\n\t}\n\tr = ((d * (255 - aR)) >>> 8) + ((s * aR) >>> 8);\n\tif (r > 255) {\n\t\tr = 255;\n\t}\n\tif (!!gammaLookupTable) {\n\t\tr = gammaLookupTable[r];\n\t}\n\tdstMask = dstMask >>> 8;\n\tsrcColor = srcColor >>> 8;\n\n\t/* no need to gamma correct alpha value ? */\n\n\ta = (((dstMask & 255) * (255 - aA)) >>> 8) + aA;\n\tif (a > 255) {\n\t\ta = 255;\n\t}\n\tanswer = (((((a << 8) + r) << 8) + g) << 8) + b;\n\treturn answer;\n}\n\n\n/*\tThis version assumes \n\t\tcombinationRule = 41\n\t\tsourcePixSize = 32\n\t\tdestPixSize = 8\n\t\tsourceForm ~= destForm.\n\tNote: This is not real blending since we don't have the source colors available.\n\t */\n\nfunction rgbComponentAlpha8() {\n\tvar srcShift;\n\tvar sourceWord;\n\tvar srcIndex;\n\tvar deltaX;\n\tvar mappingTable;\n\tvar dstIndex;\n\tvar adjust;\n\tvar mapperFlags;\n\tvar srcAlpha;\n\tvar dstMask;\n\tvar deltaY;\n\tvar srcY;\n\tvar destWord;\n\tvar dstY;\n\n\n\t/* This particular method should be optimized in itself */\n\n\tmappingTable = default8To32Table();\n\tmapperFlags = cmFlags & ~ColorMapNewStyle;\n\n\t/* So we can pre-decrement */\n\n\tdeltaY = bbH + 1;\n\tsrcY = sy;\n\tdstY = dy;\n\tmask1 = (dx & 3) * 8;\n\tif (destMSB) {\n\t\tmask1 = 24 - mask1;\n\t}\n\tmask2 = AllOnes ^ (SHL(255, mask1));\n\tif ((dx & 1) === 0) {\n\t\tadjust = 0;\n\t} else {\n\t\tadjust = 522133279;\n\t}\n\tif ((dy & 1) === 0) {\n\t\tadjust = adjust ^ 522133279;\n\t}\n\twhile (((--deltaY)) !== 0) {\n\t\tadjust = adjust ^ 522133279;\n\t\tsrcIndex = ((srcY * sourcePitch)) + (sx * 4);\n\t\tdstIndex = ((dstY * destPitch)) + ((dx >> 2) * 4);\n\n\t\t/* So we can pre-decrement */\n\n\t\tdeltaX = bbW + 1;\n\t\tsrcShift = mask1;\n\n\t\t/* This is the inner loop */\n\n\t\tdstMask = mask2;\n\t\twhile (((--deltaX)) !== 0) {\n\t\t\tsourceWord = (sourceBits[srcIndex >>> 2] & ~adjust) + adjust;\n\n\t\t\t/* set srcAlpha to the average of the 3 separate aR,Ag,AB values */\n\n\t\t\tsrcAlpha = sourceWord & 16777215;\n\t\t\tsrcAlpha = DIV((((srcAlpha >>> 16) + ((srcAlpha >>> 8) & 255)) + (srcAlpha & 255)), 3);\n\t\t\tif (srcAlpha > 31) {\n\n\t\t\t\t/* Everything below 31 is transparent */\n\n\t\t\t\tif (srcAlpha > 224) {\n\n\t\t\t\t\t/* treat everything above 224 as opaque */\n\n\t\t\t\t\tsourceWord = 4294967295;\n\t\t\t\t}\n\t\t\t\tdestWord = destBits[dstIndex >>> 2];\n\t\t\t\tdestWord = destWord & ~dstMask;\n\t\t\t\tdestWord = SHR(destWord, srcShift);\n\t\t\t\tdestWord = mappingTable[destWord];\n\t\t\t\tsourceWord = rgbComponentAlpha32with(sourceWord, destWord);\n\t\t\t\tsourceWord = mapPixelflags(sourceWord, mapperFlags);\n\n\t\t\t\t/* Store back */\n\n\t\t\t\tsourceWord = SHL(sourceWord, srcShift);\n\t\t\t\tdstLongAtputmask(dstIndex, sourceWord, dstMask);\n\t\t\t}\n\t\t\tsrcIndex += 4;\n\t\t\tif (destMSB) {\n\t\t\t\tif (srcShift === 0) {\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t\tsrcShift = 24;\n\t\t\t\t\tdstMask = 16777215;\n\t\t\t\t} else {\n\t\t\t\t\tsrcShift -= 8;\n\t\t\t\t\tdstMask = (dstMask >>> 8) | 4278190080;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (srcShift === 32) {\n\t\t\t\t\tdstIndex += 4;\n\t\t\t\t\tsrcShift = 0;\n\t\t\t\t\tdstMask = 4294967040;\n\t\t\t\t} else {\n\t\t\t\t\tsrcShift += 8;\n\t\t\t\t\tdstMask = (dstMask << 8) | 255;\n\t\t\t\t}\n\t\t\t}\n\t\t\tadjust = adjust ^ 522133279;\n\t\t}\n\t\t++srcY;\n\t\t++dstY;\n\t}\n}\n\n\n/*\t\n\tcomponentAlphaModeColor is the color,\n\tsourceWord contains an alpha value for each component of RGB\n\teach of which is encoded as0 meaning 0.0 and 255 meaning 1.0 .\n\tthe rule is...\n\t\n\tcolor = componentAlphaModeColor.\n\tcolorAlpha = componentAlphaModeAlpha.\n\tmask = sourceWord.\n\tdst.A = colorAlpha + (1 - colorAlpha) * dst.A\n dst.R = color.R * mask.R * colorAlpha + (1 - (mask.R * colorAlpha)) * dst.R\n dst.G = color.G * mask.G * colorAlpha + (1 - (mask.G* colorAlpha)) * dst.G\n dst.B = color.B * mask.B * colorAlpha + (1 - (mask.B* colorAlpha)) * dst.B\n\t */\n/*\tDo NOT inline this into optimized loops */\n\nfunction rgbComponentAlphawith(sourceWord, destinationWord) {\n\tvar alpha;\n\n\talpha = sourceWord;\n\tif (alpha === 0) {\n\t\treturn destinationWord;\n\t}\n\treturn partitionedRgbComponentAlphadestnBitsnPartitions(sourceWord, destinationWord, destDepth, destPPW);\n}\n\n\n/*\tSubract the pixels in the source and destination, color by color,\n\tand return the sum of the absolute value of all the differences.\n\tFor non-rgb, return the number of differing pixels. */\n\nfunction rgbDiffwith(sourceWord, destinationWord) {\n\tvar sourcePixVal;\n\tvar bitsPerColor;\n\tvar diff;\n\tvar sourceShifted;\n\tvar pixMask;\n\tvar rgbMask;\n\tvar destShifted;\n\tvar i;\n\tvar maskShifted;\n\tvar destPixVal;\n\n\tpixMask = maskTable[destDepth];\n\tif (destDepth === 16) {\n\t\tbitsPerColor = 5;\n\t\trgbMask = 31;\n\t} else {\n\t\tbitsPerColor = 8;\n\t\trgbMask = 255;\n\t}\n\tmaskShifted = destMask;\n\tdestShifted = destinationWord;\n\tsourceShifted = sourceWord;\n\tfor (i = 1; i <= destPPW; i++) {\n\t\tif ((maskShifted & pixMask) > 0) {\n\n\t\t\t/* Only tally pixels within the destination rectangle */\n\n\t\t\tdestPixVal = destShifted & pixMask;\n\t\t\tsourcePixVal = sourceShifted & pixMask;\n\t\t\tif (destDepth < 16) {\n\t\t\t\tif (sourcePixVal === destPixVal) {\n\t\t\t\t\tdiff = 0;\n\t\t\t\t} else {\n\t\t\t\t\tdiff = 1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdiff = partitionedSubfromnBitsnPartitions(sourcePixVal, destPixVal, bitsPerColor, 3);\n\t\t\t\tdiff = ((diff & rgbMask) + ((SHR(diff, bitsPerColor)) & rgbMask)) + ((SHR((SHR(diff, bitsPerColor)), bitsPerColor)) & rgbMask);\n\t\t\t}\n\t\t\tbitCount += diff;\n\t\t}\n\t\tmaskShifted = SHR(maskShifted, destDepth);\n\t\tsourceShifted = SHR(sourceShifted, destDepth);\n\t\tdestShifted = SHR(destShifted, destDepth);\n\t}\n\treturn destinationWord;\n}\n\n\n/*\tConvert the given 16bit pixel value to a 32bit RGBA value.\n \tNote: This method is intended to deal with different source formats. */\n\nfunction rgbMap16To32(sourcePixel) {\n\treturn (((sourcePixel & 31) << 3) | ((sourcePixel & 992) << 6)) | ((sourcePixel & 31744) << 9);\n}\n\n\n/*\tConvert the given 32bit pixel value to a 32bit RGBA value.\n \tNote: This method is intended to deal with different source formats. */\n\nfunction rgbMap32To32(sourcePixel) {\n\treturn sourcePixel;\n}\n\n\n/*\tConvert the given pixel value with nBitsIn bits for each color component to a pixel value with nBitsOut bits for each color component. Typical values for nBitsIn/nBitsOut are 3, 5, or 8. */\n\nfunction rgbMapfromto(sourcePixel, nBitsIn, nBitsOut) {\n\tvar d;\n\tvar destPix;\n\tvar srcPix;\n\tvar mask;\n\n\tif (((d = nBitsOut - nBitsIn)) > 0) {\n\n\t\t/* Expand to more bits by zero-fill */\n\n\n\t\t/* Transfer mask */\n\n\t\tmask = (SHL(1, nBitsIn)) - 1;\n\t\tsrcPix = SHL(sourcePixel, d);\n\t\tmask = SHL(mask, d);\n\t\tdestPix = srcPix & mask;\n\t\tmask = SHL(mask, nBitsOut);\n\t\tsrcPix = SHL(srcPix, d);\n\t\treturn (destPix + (srcPix & mask)) + ((SHL(srcPix, d)) & (SHL(mask, nBitsOut)));\n\t} else {\n\n\t\t/* Compress to fewer bits by truncation */\n\n\t\tif (d === 0) {\n\t\t\tif (nBitsIn === 5) {\n\n\t\t\t\t/* Sometimes called with 16 bits, though pixel is 15,\n\t\t\t\t\tbut we must never return more than 15. */\n\n\t\t\t\treturn sourcePixel & 32767;\n\t\t\t}\n\t\t\tif (nBitsIn === 8) {\n\n\t\t\t\t/* Sometimes called with 32 bits, though pixel is 24,\n\t\t\t\t\tbut we must never return more than 24. */\n\n\t\t\t\treturn sourcePixel & 16777215;\n\t\t\t}\n\t\t\treturn sourcePixel;\n\t\t}\n\t\tif (sourcePixel === 0) {\n\t\t\treturn sourcePixel;\n\t\t}\n\t\td = nBitsIn - nBitsOut;\n\n\t\t/* Transfer mask */\n\n\t\tmask = (SHL(1, nBitsOut)) - 1;\n\t\tsrcPix = SHR(sourcePixel, d);\n\t\tdestPix = srcPix & mask;\n\t\tmask = SHL(mask, nBitsOut);\n\t\tsrcPix = SHR(srcPix, d);\n\t\tdestPix = (destPix + (srcPix & mask)) + ((SHR(srcPix, d)) & (SHL(mask, nBitsOut)));\n\t\tif (destPix === 0) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn destPix;\n\t}\n}\n\n\n/*\tPerform the RGBA conversion for the given source pixel */\n\nfunction rgbMapPixelflags(sourcePixel, mapperFlags) {\n\tvar val;\n\n\tval = SHIFT((sourcePixel & cmMaskTable[0]), cmShiftTable[0]);\n\tval = val | (SHIFT((sourcePixel & cmMaskTable[1]), cmShiftTable[1]));\n\tval = val | (SHIFT((sourcePixel & cmMaskTable[2]), cmShiftTable[2]));\n\treturn val | (SHIFT((sourcePixel & cmMaskTable[3]), cmShiftTable[3]));\n}\n\nfunction rgbMaxwith(sourceWord, destinationWord) {\n\tif (destDepth < 16) {\n\n\t\t/* Max each pixel separately */\n\n\t\treturn partitionedMaxwithnBitsnPartitions(sourceWord, destinationWord, destDepth, destPPW);\n\t}\n\tif (destDepth === 16) {\n\n\t\t/* Max RGB components of each pixel separately */\n\n\t\treturn partitionedMaxwithnBitsnPartitions(sourceWord, destinationWord, 5, 3) + (partitionedMaxwithnBitsnPartitions(sourceWord >>> 16, destinationWord >>> 16, 5, 3) << 16);\n\t} else {\n\n\t\t/* Max RGBA components of the pixel separately */\n\n\t\treturn partitionedMaxwithnBitsnPartitions(sourceWord, destinationWord, 8, 4);\n\t}\n}\n\nfunction rgbMinwith(sourceWord, destinationWord) {\n\tif (destDepth < 16) {\n\n\t\t/* Min each pixel separately */\n\n\t\treturn partitionedMinwithnBitsnPartitions(sourceWord, destinationWord, destDepth, destPPW);\n\t}\n\tif (destDepth === 16) {\n\n\t\t/* Min RGB components of each pixel separately */\n\n\t\treturn partitionedMinwithnBitsnPartitions(sourceWord, destinationWord, 5, 3) + (partitionedMinwithnBitsnPartitions(sourceWord >>> 16, destinationWord >>> 16, 5, 3) << 16);\n\t} else {\n\n\t\t/* Min RGBA components of the pixel separately */\n\n\t\treturn partitionedMinwithnBitsnPartitions(sourceWord, destinationWord, 8, 4);\n\t}\n}\n\nfunction rgbMinInvertwith(wordToInvert, destinationWord) {\n\tvar sourceWord;\n\n\tsourceWord = ~wordToInvert;\n\tif (destDepth < 16) {\n\n\t\t/* Min each pixel separately */\n\n\t\treturn partitionedMinwithnBitsnPartitions(sourceWord, destinationWord, destDepth, destPPW);\n\t}\n\tif (destDepth === 16) {\n\n\t\t/* Min RGB components of each pixel separately */\n\n\t\treturn partitionedMinwithnBitsnPartitions(sourceWord, destinationWord, 5, 3) + (partitionedMinwithnBitsnPartitions(sourceWord >>> 16, destinationWord >>> 16, 5, 3) << 16);\n\t} else {\n\n\t\t/* Min RGBA components of the pixel separately */\n\n\t\treturn partitionedMinwithnBitsnPartitions(sourceWord, destinationWord, 8, 4);\n\t}\n}\n\nfunction rgbMulwith(sourceWord, destinationWord) {\n\tif (destDepth < 16) {\n\n\t\t/* Mul each pixel separately */\n\n\t\treturn partitionedMulwithnBitsnPartitions(sourceWord, destinationWord, destDepth, destPPW);\n\t}\n\tif (destDepth === 16) {\n\n\t\t/* Mul RGB components of each pixel separately */\n\n\t\treturn partitionedMulwithnBitsnPartitions(sourceWord, destinationWord, 5, 3) + (partitionedMulwithnBitsnPartitions(sourceWord >>> 16, destinationWord >>> 16, 5, 3) << 16);\n\t} else {\n\n\t\t/* Mul RGBA components of the pixel separately */\n\n\t\treturn partitionedMulwithnBitsnPartitions(sourceWord, destinationWord, 8, 4);\n\t}\n}\n\nfunction rgbSubwith(sourceWord, destinationWord) {\n\tif (destDepth < 16) {\n\n\t\t/* Sub each pixel separately */\n\n\t\treturn partitionedSubfromnBitsnPartitions(sourceWord, destinationWord, destDepth, destPPW);\n\t}\n\tif (destDepth === 16) {\n\n\t\t/* Sub RGB components of each pixel separately */\n\n\t\treturn partitionedSubfromnBitsnPartitions(sourceWord, destinationWord, 5, 3) + (partitionedSubfromnBitsnPartitions(sourceWord >>> 16, destinationWord >>> 16, 5, 3) << 16);\n\t} else {\n\n\t\t/* Sub RGBA components of the pixel separately */\n\n\t\treturn partitionedSubfromnBitsnPartitions(sourceWord, destinationWord, 8, 4);\n\t}\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nfunction setInterpreter(anInterpreter) {\n\tvar ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy.majorVersion() == VM_PROXY_MAJOR;\n\tif (ok === false) {\n\t\treturn false;\n\t}\n\tok = interpreterProxy.minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n/*\tWARNING: For WarpBlt w/ smoothing the source depth is wrong here! */\n\nfunction setupColorMasks() {\n\tvar bits;\n\tvar targetBits;\n\n\tbits = (targetBits = 0);\n\tif (sourceDepth <= 8) {\n\t\treturn null;\n\t}\n\tif (sourceDepth === 16) {\n\t\tbits = 5;\n\t}\n\tif (sourceDepth === 32) {\n\t\tbits = 8;\n\t}\n\tif (cmBitsPerColor === 0) {\n\n\t\t/* Convert to destDepth */\n\n\t\tif (destDepth <= 8) {\n\t\t\treturn null;\n\t\t}\n\t\tif (destDepth === 16) {\n\t\t\ttargetBits = 5;\n\t\t}\n\t\tif (destDepth === 32) {\n\t\t\ttargetBits = 8;\n\t\t}\n\t} else {\n\t\ttargetBits = cmBitsPerColor;\n\t}\n\tsetupColorMasksFromto(bits, targetBits);\n}\n\n\n/*\tSetup color masks for converting an incoming RGB pixel value from srcBits to targetBits. */\n\nfunction setupColorMasksFromto(srcBits, targetBits) {\n\tvar shifts = [0, 0, 0, 0];\n\tvar masks = [0, 0, 0, 0];\n\tvar deltaBits;\n\tvar mask;\n\n\t;\n\tdeltaBits = targetBits - srcBits;\n\tif (deltaBits === 0) {\n\t\treturn 0;\n\t}\n\tif (deltaBits <= 0) {\n\n\t\t/* Mask for extracting a color part of the source */\n\n\t\tmask = (SHL(1, targetBits)) - 1;\n\t\tmasks[RedIndex] = (SHL(mask, ((srcBits * 2) - deltaBits)));\n\t\tmasks[GreenIndex] = (SHL(mask, (srcBits - deltaBits)));\n\t\tmasks[BlueIndex] = (SHL(mask, (0 - deltaBits)));\n\t\tmasks[AlphaIndex] = 0;\n\t} else {\n\n\t\t/* Mask for extracting a color part of the source */\n\n\t\tmask = (SHL(1, srcBits)) - 1;\n\t\tmasks[RedIndex] = (SHL(mask, (srcBits * 2)));\n\t\tmasks[GreenIndex] = (SHL(mask, srcBits));\n\t\tmasks[BlueIndex] = mask;\n\t}\n\tshifts[RedIndex] = (deltaBits * 3);\n\tshifts[GreenIndex] = (deltaBits * 2);\n\tshifts[BlueIndex] = deltaBits;\n\tshifts[AlphaIndex] = 0;\n\tcmShiftTable = shifts;\n\tcmMaskTable = masks;\n\tcmFlags = cmFlags | (ColorMapPresent | ColorMapFixedPart);\n}\n\nfunction showDisplayBits() {\n\tinterpreterProxy.showDisplayBitsLeftTopRightBottom(destForm, affectedL, affectedT, affectedR, affectedB);\n}\n\n\n/*\tThis is only used when source and dest are same depth,\n\tie, when the barrel-shift copy loop is used. */\n\nfunction sourceSkewAndPointerInit() {\n\tvar dxLowBits;\n\tvar sxLowBits;\n\tvar dWid;\n\tvar pixPerM1;\n\n\n\t/* A mask, assuming power of two */\n\n\tpixPerM1 = destPPW - 1;\n\tsxLowBits = sx & pixPerM1;\n\n\t/* check if need to preload buffer\n\t(i.e., two words of source needed for first word of destination) */\n\n\tdxLowBits = dx & pixPerM1;\n\tif (hDir > 0) {\n\n\t\t/* n Bits stored in 1st word of dest */\n\n\t\tdWid = Math.min(bbW, (destPPW - dxLowBits));\n\t\tpreload = (sxLowBits + dWid) > pixPerM1;\n\t} else {\n\t\tdWid = Math.min(bbW, (dxLowBits + 1));\n\t\tpreload = ((sxLowBits - dWid) + 1) < 0;\n\t}\n\tif (sourceMSB) {\n\t\tskew = (sxLowBits - dxLowBits) * destDepth;\n\t} else {\n\t\tskew = (dxLowBits - sxLowBits) * destDepth;\n\t}\n\tif (preload) {\n\t\tif (skew < 0) {\n\t\t\tskew += 32;\n\t\t} else {\n\t\t\tskew -= 32;\n\t\t}\n\t}\n\n\t/* calculate increments from end of 1 line to start of next */\n\n\tsourceIndex = ((sy * sourcePitch)) + ((DIV(sx, (DIV(32, sourceDepth)))) * 4);\n\tsourceDelta = (sourcePitch * vDir) - (4 * (nWords * hDir));\n\tif (preload) {\n\n\t\t/* Compensate for extra source word fetched */\n\n\t\tsourceDelta -= 4 * hDir;\n\t}\n}\n\nfunction sourceWordwith(sourceWord, destinationWord) {\n\treturn sourceWord;\n}\n\nfunction subWordwith(sourceWord, destinationWord) {\n\treturn sourceWord - destinationWord;\n}\n\n\n/*\tTally pixels into the color map. Those tallied are exactly those\n\tin the destination rectangle. Note that the source should be \n\tspecified == destination, in order for the proper color map checks \n\tto be performed at setup. */\n\nfunction tallyIntoMapwith(sourceWord, destinationWord) {\n\tvar pixMask;\n\tvar mapIndex;\n\tvar destShifted;\n\tvar i;\n\tvar maskShifted;\n\tvar pixVal;\n\n\tif ((cmFlags & (ColorMapPresent | ColorMapIndexedPart)) !== (ColorMapPresent | ColorMapIndexedPart)) {\n\t\treturn destinationWord;\n\t}\n\tpixMask = maskTable[destDepth];\n\tdestShifted = destinationWord;\n\tmaskShifted = destMask;\n\tfor (i = 1; i <= destPPW; i++) {\n\t\tif ((maskShifted & pixMask) !== 0) {\n\n\t\t\t/* Only tally pixels within the destination rectangle */\n\n\t\t\tpixVal = destShifted & pixMask;\n\t\t\tif (destDepth < 16) {\n\t\t\t\tmapIndex = pixVal;\n\t\t\t} else {\n\t\t\t\tif (destDepth === 16) {\n\t\t\t\t\tmapIndex = rgbMapfromto(pixVal, 5, cmBitsPerColor);\n\t\t\t\t} else {\n\t\t\t\t\tmapIndex = rgbMapfromto(pixVal, 8, cmBitsPerColor);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttallyMapAtput(mapIndex, tallyMapAt(mapIndex) + 1);\n\t\t}\n\t\tmaskShifted = SHR(maskShifted, destDepth);\n\t\tdestShifted = SHR(destShifted, destDepth);\n\t}\n\treturn destinationWord;\n}\n\n\n/*\tReturn the word at position idx from the colorMap */\n\nfunction tallyMapAt(idx) {\n\treturn cmLookupTable[idx & cmMask];\n}\n\n\n/*\tStore the word at position idx in the colorMap */\n\nfunction tallyMapAtput(idx, value) {\n\treturn cmLookupTable[idx & cmMask] = value;\n}\n\n\n/*\tShortcut for stuff that's being run from the balloon engine.\n\tSince we do this at each scan line we should avoid the expensive \n\tsetup for source and destination. */\n/*\tWe need a source. */\n\nfunction tryCopyingBitsQuickly() {\n\tif (noSource) {\n\t\treturn false;\n\t}\n\tif (!((combinationRule === 34) || (combinationRule === 41))) {\n\t\treturn false;\n\t}\n\tif (sourceDepth !== 32) {\n\t\treturn false;\n\t}\n\tif (sourceForm === destForm) {\n\t\treturn false;\n\t}\n\tif (combinationRule === 41) {\n\t\tif (destDepth === 32) {\n\t\t\trgbComponentAlpha32();\n\t\t\taffectedL = dx;\n\t\t\taffectedR = dx + bbW;\n\t\t\taffectedT = dy;\n\t\t\taffectedB = dy + bbH;\n\t\t\treturn true;\n\t\t}\n\t\tif (destDepth === 16) {\n\t\t\trgbComponentAlpha16();\n\t\t\taffectedL = dx;\n\t\t\taffectedR = dx + bbW;\n\t\t\taffectedT = dy;\n\t\t\taffectedB = dy + bbH;\n\t\t\treturn true;\n\t\t}\n\t\tif (destDepth === 8) {\n\t\t\trgbComponentAlpha8();\n\t\t\taffectedL = dx;\n\t\t\taffectedR = dx + bbW;\n\t\t\taffectedT = dy;\n\t\t\taffectedB = dy + bbH;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\tif (destDepth < 8) {\n\t\treturn false;\n\t}\n\tif ((destDepth === 8) && ((cmFlags & ColorMapPresent) === 0)) {\n\t\treturn false;\n\t}\n\tif (destDepth === 32) {\n\t\talphaSourceBlendBits32();\n\t}\n\tif (destDepth === 16) {\n\t\talphaSourceBlendBits16();\n\t}\n\tif (destDepth === 8) {\n\t\talphaSourceBlendBits8();\n\t}\n\taffectedL = dx;\n\taffectedR = dx + bbW;\n\taffectedT = dy;\n\taffectedB = dy + bbH;\n\treturn true;\n}\n\n\n/*\tUnlock the bits of any OS surfaces. */\n/*\tSee the comment in lockSurfaces. Similar rules apply. That is, the area provided in ioUnlockSurface can be used to determine the dirty region after drawing. If a source is unlocked, then the area will be (0,0,0,0) to indicate that no portion is dirty. */\n\nfunction unlockSurfaces() {\n\tvar destHandle;\n\tvar sourceHandle;\n\tvar fn;\n\tvar destLocked;\n\n\tif (hasSurfaceLock) {\n\t\tif (!unlockSurfaceFn) {\n\t\t\tif (!loadSurfacePlugin()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\tfn = unlockSurfaceFn;\n\t\tdestLocked = false;\n\t\tdestHandle = interpreterProxy.fetchPointerofObject(FormBitsIndex, destForm);\n\t\tif (typeof destHandle === \"number\") {\n\n\t\t\t/* The destBits are always assumed to be dirty */\n\n\t\t\tdestHandle = destHandle;\n\t\t\tfn(destHandle, affectedL, affectedT, affectedR-affectedL, affectedB-affectedT);\n\t\t\tdestBits = (destPitch = 0);\n\t\t\tdestLocked = true;\n\t\t}\n\t\tif (!noSource) {\n\t\t\tsourceHandle = interpreterProxy.fetchPointerofObject(FormBitsIndex, sourceForm);\n\t\t\tif (typeof sourceHandle === \"number\") {\n\n\t\t\t\t/* Only unlock sourceHandle if different from destHandle */\n\n\t\t\t\tsourceHandle = sourceHandle;\n\t\t\t\tif (!(destLocked && (sourceHandle === destHandle))) {\n\t\t\t\t\tfn(sourceHandle, 0, 0, 0, 0);\n\t\t\t\t}\n\t\t\t\tsourceBits = (sourcePitch = 0);\n\t\t\t}\n\t\t}\n\t\thasSurfaceLock = false;\n\t}\n}\n\nfunction warpBits() {\n\tvar ns;\n\n\tns = noSource;\n\tnoSource = true;\n\tclipRange();\n\tnoSource = ns;\n\tif (noSource || ((bbW <= 0) || (bbH <= 0))) {\n\n\t\t/* zero width or height; noop */\n\n\t\taffectedL = (affectedR = (affectedT = (affectedB = 0)));\n\t\treturn null;\n\t}\n\tif (!lockSurfaces()) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tdestMaskAndPointerInit();\n\twarpLoop();\n\tif (hDir > 0) {\n\t\taffectedL = dx;\n\t\taffectedR = dx + bbW;\n\t} else {\n\t\taffectedL = (dx - bbW) + 1;\n\t\taffectedR = dx + 1;\n\t}\n\tif (vDir > 0) {\n\t\taffectedT = dy;\n\t\taffectedB = dy + bbH;\n\t} else {\n\t\taffectedT = (dy - bbH) + 1;\n\t\taffectedB = dy + 1;\n\t}\n\tunlockSurfaces();\n}\n\n\n/*\tThis version of the inner loop traverses an arbirary quadrilateral\n\tsource, thus producing a general affine transformation. */\n\nfunction warpLoop() {\n\tvar mapperFlags;\n\tvar dstShiftLeft;\n\tvar words;\n\tvar skewWord;\n\tvar nSteps;\n\tvar deltaP43y;\n\tvar destWord;\n\tvar startBits;\n\tvar mergeFnwith;\n\tvar deltaP43x;\n\tvar pBy;\n\tvar i;\n\tvar yDelta;\n\tvar halftoneWord;\n\tvar mergeWord;\n\tvar pAy;\n\tvar dstShiftInc;\n\tvar pBx;\n\tvar sourceMapOop;\n\tvar xDelta;\n\tvar pAx;\n\tvar deltaP12y;\n\tvar endBits;\n\tvar nPix;\n\tvar deltaP12x;\n\tvar smoothingCount;\n\n\tmergeFnwith = opTable[combinationRule + 1];\n\tmergeFnwith;\n\tif (!(SIZEOF(bitBltOop) >= (BBWarpBase + 12))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tnSteps = height - 1;\n\tif (nSteps <= 0) {\n\t\tnSteps = 1;\n\t}\n\tpAx = fetchIntOrFloatofObject(BBWarpBase, bitBltOop);\n\twords = fetchIntOrFloatofObject(BBWarpBase + 3, bitBltOop);\n\tdeltaP12x = deltaFromtonSteps(pAx, words, nSteps);\n\tif (deltaP12x < 0) {\n\t\tpAx = words - (nSteps * deltaP12x);\n\t}\n\tpAy = fetchIntOrFloatofObject(BBWarpBase + 1, bitBltOop);\n\twords = fetchIntOrFloatofObject(BBWarpBase + 4, bitBltOop);\n\tdeltaP12y = deltaFromtonSteps(pAy, words, nSteps);\n\tif (deltaP12y < 0) {\n\t\tpAy = words - (nSteps * deltaP12y);\n\t}\n\tpBx = fetchIntOrFloatofObject(BBWarpBase + 9, bitBltOop);\n\twords = fetchIntOrFloatofObject(BBWarpBase + 6, bitBltOop);\n\tdeltaP43x = deltaFromtonSteps(pBx, words, nSteps);\n\tif (deltaP43x < 0) {\n\t\tpBx = words - (nSteps * deltaP43x);\n\t}\n\tpBy = fetchIntOrFloatofObject(BBWarpBase + 10, bitBltOop);\n\twords = fetchIntOrFloatofObject(BBWarpBase + 7, bitBltOop);\n\tdeltaP43y = deltaFromtonSteps(pBy, words, nSteps);\n\tif (deltaP43y < 0) {\n\t\tpBy = words - (nSteps * deltaP43y);\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn false;\n\t}\n\tif (interpreterProxy.methodArgumentCount() === 2) {\n\t\tsmoothingCount = interpreterProxy.stackIntegerValue(1);\n\t\tsourceMapOop = interpreterProxy.stackValue(0);\n\t\tif (sourceMapOop.isNil) {\n\t\t\tif (sourceDepth < 16) {\n\n\t\t\t\t/* color map is required to smooth non-RGB dest */\n\n\t\t\t\treturn interpreterProxy.primitiveFail();\n\t\t\t}\n\t\t} else {\n\t\t\tif (SIZEOF(sourceMapOop) < (SHL(1, sourceDepth))) {\n\n\t\t\t\t/* sourceMap must be long enough for sourceDepth */\n\n\t\t\t\treturn interpreterProxy.primitiveFail();\n\t\t\t}\n\t\t\tsourceMapOop = sourceMapOop.wordsOrBytes();\n\t\t}\n\t} else {\n\t\tsmoothingCount = 1;\n\t\tsourceMapOop = interpreterProxy.nilObject();\n\t}\n\tnSteps = width - 1;\n\tif (nSteps <= 0) {\n\t\tnSteps = 1;\n\t}\n\tstartBits = destPPW - (dx & (destPPW - 1));\n\tendBits = (((dx + bbW) - 1) & (destPPW - 1)) + 1;\n\tif (bbW < startBits) {\n\t\tstartBits = bbW;\n\t}\n\tif (destY < clipY) {\n\n\t\t/* Advance increments if there was clipping in y */\n\n\t\tpAx += (clipY - destY) * deltaP12x;\n\t\tpAy += (clipY - destY) * deltaP12y;\n\t\tpBx += (clipY - destY) * deltaP43x;\n\t\tpBy += (clipY - destY) * deltaP43y;\n\t}\n\twarpLoopSetup();\n\tif ((smoothingCount > 1) && ((cmFlags & ColorMapNewStyle) === 0)) {\n\t\tif (!cmLookupTable) {\n\t\t\tif (destDepth === 16) {\n\t\t\t\tsetupColorMasksFromto(8, 5);\n\t\t\t}\n\t\t} else {\n\t\t\tsetupColorMasksFromto(8, cmBitsPerColor);\n\t\t}\n\t}\n\tmapperFlags = cmFlags & ~ColorMapNewStyle;\n\tif (destMSB) {\n\t\tdstShiftInc = 0 - destDepth;\n\t\tdstShiftLeft = 32 - destDepth;\n\t} else {\n\t\tdstShiftInc = destDepth;\n\t\tdstShiftLeft = 0;\n\t}\n\tfor (i = 1; i <= bbH; i++) {\n\n\t\t/* here is the vertical loop... */\n\n\t\txDelta = deltaFromtonSteps(pAx, pBx, nSteps);\n\t\tif (xDelta >= 0) {\n\t\t\tsx = pAx;\n\t\t} else {\n\t\t\tsx = pBx - (nSteps * xDelta);\n\t\t}\n\t\tyDelta = deltaFromtonSteps(pAy, pBy, nSteps);\n\t\tif (yDelta >= 0) {\n\t\t\tsy = pAy;\n\t\t} else {\n\t\t\tsy = pBy - (nSteps * yDelta);\n\t\t}\n\t\tif (destMSB) {\n\t\t\tdstBitShift = 32 - (((dx & (destPPW - 1)) + 1) * destDepth);\n\t\t} else {\n\t\t\tdstBitShift = (dx & (destPPW - 1)) * destDepth;\n\t\t}\n\t\tif (destX < clipX) {\n\n\t\t\t/* Advance increments if there was clipping in x */\n\n\t\t\tsx += (clipX - destX) * xDelta;\n\t\t\tsy += (clipX - destX) * yDelta;\n\t\t}\n\t\tif (noHalftone) {\n\t\t\thalftoneWord = AllOnes;\n\t\t} else {\n\t\t\thalftoneWord = halftoneAt((dy + i) - 1);\n\t\t}\n\t\tdestMask = mask1;\n\n\t\t/* Here is the inner loop... */\n\n\t\tnPix = startBits;\n\t\twords = nWords;\n\t\tdo {\n\n\t\t\t/* pick up word */\n\n\t\t\tif (smoothingCount === 1) {\n\n\t\t\t\t/* Faster if not smoothing */\n\n\t\t\t\tskewWord = warpPickSourcePixelsxDeltahyDeltahxDeltavyDeltavdstShiftIncflags(nPix, xDelta, yDelta, deltaP12x, deltaP12y, dstShiftInc, mapperFlags);\n\t\t\t} else {\n\n\t\t\t\t/* more difficult with smoothing */\n\n\t\t\t\tskewWord = warpPickSmoothPixelsxDeltahyDeltahxDeltavyDeltavsourceMapsmoothingdstShiftInc(nPix, xDelta, yDelta, deltaP12x, deltaP12y, sourceMapOop, smoothingCount, dstShiftInc);\n\t\t\t}\n\t\t\tdstBitShift = dstShiftLeft;\n\t\t\tif (destMask === AllOnes) {\n\n\t\t\t\t/* avoid read-modify-write */\n\n\t\t\t\tmergeWord = mergeFnwith(skewWord & halftoneWord, destBits[destIndex >>> 2]);\n\t\t\t\tdestBits[destIndex >>> 2] = destMask & mergeWord;\n\t\t\t} else {\n\n\t\t\t\t/* General version using dest masking */\n\n\t\t\t\tdestWord = destBits[destIndex >>> 2];\n\t\t\t\tmergeWord = mergeFnwith(skewWord & halftoneWord, destWord & destMask);\n\t\t\t\tdestWord = (destMask & mergeWord) | (destWord & ~destMask);\n\t\t\t\tdestBits[destIndex >>> 2] = destWord;\n\t\t\t}\n\t\t\tdestIndex += 4;\n\t\t\tif (words === 2) {\n\n\t\t\t\t/* e.g., is the next word the last word? */\n\t\t\t\t/* set mask for last word in this row */\n\n\t\t\t\tdestMask = mask2;\n\t\t\t\tnPix = endBits;\n\t\t\t} else {\n\n\t\t\t\t/* use fullword mask for inner loop */\n\n\t\t\t\tdestMask = AllOnes;\n\t\t\t\tnPix = destPPW;\n\t\t\t}\n\t\t} while(!(((--words)) === 0));\n\t\tpAx += deltaP12x;\n\t\tpAy += deltaP12y;\n\t\tpBx += deltaP43x;\n\t\tpBy += deltaP43y;\n\t\tdestIndex += destDelta;\n\t}\n}\n\n\n/*\tSetup values for faster pixel fetching. */\n\nfunction warpLoopSetup() {\n\tvar i;\n\tvar words;\n\n\n\t/* warpSrcShift = log2(sourceDepth) */\n\n\twarpSrcShift = 0;\n\n\t/* recycle temp */\n\n\twords = sourceDepth;\n\twhile (!(words === 1)) {\n\t\t++warpSrcShift;\n\t\twords = words >>> 1;\n\t}\n\n\t/* warpAlignShift: Shift for aligning x position to word boundary */\n\n\twarpSrcMask = maskTable[sourceDepth];\n\n\t/* warpAlignMask: Mask for extracting the pixel position from an x position */\n\n\twarpAlignShift = 5 - warpSrcShift;\n\n\t/* Setup the lookup table for source bit shifts */\n\t/* warpBitShiftTable: given an sub-word x value what's the bit shift? */\n\n\twarpAlignMask = (SHL(1, warpAlignShift)) - 1;\n\tfor (i = 0; i <= warpAlignMask; i++) {\n\t\tif (sourceMSB) {\n\t\t\twarpBitShiftTable[i] = (32 - (SHL((i + 1), warpSrcShift)));\n\t\t} else {\n\t\t\twarpBitShiftTable[i] = (SHL(i, warpSrcShift));\n\t\t}\n\t}\n}\n\n\n/*\tPick n (sub-) pixels from the source form, mapped by sourceMap,\n\taverage the RGB values, map by colorMap and return the new word.\n\tThis version is only called from WarpBlt with smoothingCount > 1 */\n\nfunction warpPickSmoothPixelsxDeltahyDeltahxDeltavyDeltavsourceMapsmoothingdstShiftInc(nPixels, xDeltah, yDeltah, xDeltav, yDeltav, sourceMap, n, dstShiftInc) {\n\tvar k;\n\tvar destWord;\n\tvar xdh;\n\tvar j;\n\tvar ydh;\n\tvar i;\n\tvar xdv;\n\tvar dstMask;\n\tvar ydv;\n\tvar rgb;\n\tvar y;\n\tvar b;\n\tvar yy;\n\tvar g;\n\tvar x;\n\tvar a;\n\tvar r;\n\tvar nPix;\n\tvar xx;\n\n\n\t/* nope - too much stuff in here */\n\n\tdstMask = maskTable[destDepth];\n\tdestWord = 0;\n\tif (n === 2) {\n\n\t\t/* Try avoiding divides for most common n (divide by 2 is generated as shift) */\n\n\t\txdh = xDeltah >> 1;\n\t\tydh = yDeltah >> 1;\n\t\txdv = xDeltav >> 1;\n\t\tydv = yDeltav >> 1;\n\t} else {\n\t\txdh = DIV(xDeltah, n);\n\t\tydh = DIV(yDeltah, n);\n\t\txdv = DIV(xDeltav, n);\n\t\tydv = DIV(yDeltav, n);\n\t}\n\ti = nPixels;\n\tdo {\n\t\tx = sx;\n\t\ty = sy;\n\n\t\t/* Pick and average n*n subpixels */\n\n\t\ta = (r = (g = (b = 0)));\n\n\t\t/* actual number of pixels (not clipped and not transparent) */\n\n\t\tnPix = 0;\n\t\tj = n;\n\t\tdo {\n\t\t\txx = x;\n\t\t\tyy = y;\n\t\t\tk = n;\n\t\t\tdo {\n\n\t\t\t\t/* get a single subpixel */\n\n\t\t\t\trgb = pickWarpPixelAtXy(xx, yy);\n\t\t\t\tif (!((combinationRule === 25) && (rgb === 0))) {\n\n\t\t\t\t\t/* If not clipped and not transparent, then tally rgb values */\n\n\t\t\t\t\t++nPix;\n\t\t\t\t\tif (sourceDepth < 16) {\n\n\t\t\t\t\t\t/* Get RGBA values from sourcemap table */\n\n\t\t\t\t\t\trgb = sourceMap[rgb];\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t/* Already in RGB format */\n\n\t\t\t\t\t\tif (sourceDepth === 16) {\n\t\t\t\t\t\t\trgb = rgbMap16To32(rgb);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trgb = rgbMap32To32(rgb);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tb += rgb & 255;\n\t\t\t\t\tg += (rgb >>> 8) & 255;\n\t\t\t\t\tr += (rgb >>> 16) & 255;\n\t\t\t\t\ta += rgb >>> 24;\n\t\t\t\t}\n\t\t\t\txx += xdh;\n\t\t\t\tyy += ydh;\n\t\t\t} while(!(((--k)) === 0));\n\t\t\tx += xdv;\n\t\t\ty += ydv;\n\t\t} while(!(((--j)) === 0));\n\t\tif ((nPix === 0) || ((combinationRule === 25) && (nPix < ((n * n) >> 1)))) {\n\n\t\t\t/* All pixels were 0, or most were transparent */\n\n\t\t\trgb = 0;\n\t\t} else {\n\n\t\t\t/* normalize rgba sums */\n\n\t\t\tif (nPix === 4) {\n\n\t\t\t\t/* Try to avoid divides for most common n */\n\n\t\t\t\tr = r >>> 2;\n\t\t\t\tg = g >>> 2;\n\t\t\t\tb = b >>> 2;\n\t\t\t\ta = a >>> 2;\n\t\t\t} else {\n\t\t\t\tr = DIV(r, nPix);\n\t\t\t\tg = DIV(g, nPix);\n\t\t\t\tb = DIV(b, nPix);\n\t\t\t\ta = DIV(a, nPix);\n\t\t\t}\n\n\t\t\t/* map the pixel */\n\n\t\t\trgb = (((a << 24) + (r << 16)) + (g << 8)) + b;\n\t\t\tif (rgb === 0) {\n\n\t\t\t\t/* only generate zero if pixel is really transparent */\n\n\t\t\t\tif ((((r + g) + b) + a) > 0) {\n\t\t\t\t\trgb = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\trgb = mapPixelflags(rgb, cmFlags);\n\t\t}\n\t\tdestWord = destWord | (SHL((rgb & dstMask), dstBitShift));\n\t\tdstBitShift += dstShiftInc;\n\t\tsx += xDeltah;\n\t\tsy += yDeltah;\n\t} while(!(((--i)) === 0));\n\treturn destWord;\n}\n\n\n/*\tPick n pixels from the source form,\n\tmap by colorMap and return aligned by dstBitShift.\n\tThis version is only called from WarpBlt with smoothingCount = 1 */\n\nfunction warpPickSourcePixelsxDeltahyDeltahxDeltavyDeltavdstShiftIncflags(nPixels, xDeltah, yDeltah, xDeltav, yDeltav, dstShiftInc, mapperFlags) {\n\tvar sourcePix;\n\tvar nPix;\n\tvar destPix;\n\tvar dstMask;\n\tvar destWord;\n\n\n\t/* Yepp - this should go into warpLoop */\n\n\tdstMask = maskTable[destDepth];\n\tdestWord = 0;\n\tnPix = nPixels;\n\tif (mapperFlags === (ColorMapPresent | ColorMapIndexedPart)) {\n\n\t\t/* a little optimization for (pretty crucial) blits using indexed lookups only */\n\t\t/* grab, colormap and mix in pixel */\n\n\t\tdo {\n\t\t\tsourcePix = pickWarpPixelAtXy(sx, sy);\n\t\t\tdestPix = cmLookupTable[sourcePix & cmMask];\n\t\t\tdestWord = destWord | (SHL((destPix & dstMask), dstBitShift));\n\t\t\tdstBitShift += dstShiftInc;\n\t\t\tsx += xDeltah;\n\t\t\tsy += yDeltah;\n\t\t} while(!(((--nPix)) === 0));\n\t} else {\n\n\t\t/* grab, colormap and mix in pixel */\n\n\t\tdo {\n\t\t\tsourcePix = pickWarpPixelAtXy(sx, sy);\n\t\t\tdestPix = mapPixelflags(sourcePix, mapperFlags);\n\t\t\tdestWord = destWord | (SHL((destPix & dstMask), dstBitShift));\n\t\t\tdstBitShift += dstShiftInc;\n\t\t\tsx += xDeltah;\n\t\t\tsy += yDeltah;\n\t\t} while(!(((--nPix)) === 0));\n\t}\n\treturn destWord;\n}\n\n\nSqueak.registerExternalModule(\"BitBltPlugin\", {\n\tprimitiveCopyBits: primitiveCopyBits,\n\tcopyBits: copyBits,\n\tmoduleUnloaded: moduleUnloaded,\n\tprimitiveDrawLoop: primitiveDrawLoop,\n\tprimitiveDisplayString: primitiveDisplayString,\n\tinitialiseModule: initialiseModule,\n\tloadBitBltFrom: loadBitBltFrom,\n\tsetInterpreter: setInterpreter,\n\tprimitiveWarpBits: primitiveWarpBits,\n\tgetModuleName: getModuleName,\n\tprimitivePixelValueAt: primitivePixelValueAt,\n\tcopyBitsFromtoat: copyBitsFromtoat,\n});\n\n}); // end of module\n","/* Smalltalk from Squeak4.5 with VMMaker 4.13.6 translated as JS source on 3 November 2014 1:52:20 pm */\n/* Automatically generated by\n\tJSPluginCodeGenerator VMMakerJS-bf.15 uuid: fd4e10f2-3773-4e80-8bb5-c4b471a014e5\n from\n\tFFTPlugin VMMaker-bf.353 uuid: 8ae25e7e-8d2c-451e-8277-598b30e9c002\n */\n\nmodule(\"users.bert.SqueakJS.plugins.FFTPlugin\").requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\"use strict\";\n\nvar VM_PROXY_MAJOR = 1;\nvar VM_PROXY_MINOR = 11;\n\n/*** Functions ***/\nfunction CLASSOF(obj) { return typeof obj === \"number\" ? interpreterProxy.classSmallInteger() : obj.sqClass }\nfunction SIZEOF(obj) { return obj.pointers ? obj.pointers.length : obj.words ? obj.words.length : obj.bytes ? obj.bytes.length : 0 }\nfunction BYTESIZEOF(obj) { return obj.bytes ? obj.bytes.length : obj.words ? obj.words.length * 4 : 0 }\nfunction DIV(a, b) { return Math.floor(a / b) | 0; } // integer division\nfunction MOD(a, b) { return a - DIV(a, b) * b | 0; } // signed modulus\nfunction SHL(a, b) { return b > 31 ? 0 : a << b; } // fix JS shift\nfunction SHR(a, b) { return b > 31 ? 0 : a >>> b; } // fix JS shift\nfunction SHIFT(a, b) { return b < 0 ? (b < -31 ? 0 : a >>> (0-b) ) : (b > 31 ? 0 : a << b); }\n\n/*** Variables ***/\nvar fftSize = 0;\nvar imagData = null;\nvar imagDataSize = 0;\nvar interpreterProxy = null;\nvar moduleName = \"FFTPlugin 3 November 2014 (e)\";\nvar nu = 0;\nvar permTable = null;\nvar permTableSize = 0;\nvar realData = null;\nvar realDataSize = 0;\nvar sinTable = null;\nvar sinTableSize = 0;\n\n\n\n/*\tReturn the first indexable word of oop which is assumed to be variableWordSubclass */\n\nfunction checkedFloatPtrOf(oop) {\n\tinterpreterProxy.success(interpreterProxy.isWords(oop));\n\tif (interpreterProxy.failed()) {\n\t\treturn 0;\n\t}\n\treturn oop.wordsAsFloat32Array();\n}\n\n\n/*\tReturn the first indexable word of oop which is assumed to be variableWordSubclass */\n\nfunction checkedWordPtrOf(oop) {\n\tinterpreterProxy.success(interpreterProxy.isWords(oop));\n\treturn oop.words;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nfunction getModuleName() {\n\treturn moduleName;\n}\n\nfunction halt() {\n\t;\n}\n\nfunction loadFFTFrom(fftOop) {\n\tvar oop;\n\n\tinterpreterProxy.success(SIZEOF(fftOop) >= 6);\n\tif (interpreterProxy.failed()) {\n\t\treturn false;\n\t}\n\tnu = interpreterProxy.fetchIntegerofObject(0, fftOop);\n\tfftSize = interpreterProxy.fetchIntegerofObject(1, fftOop);\n\toop = interpreterProxy.fetchPointerofObject(2, fftOop);\n\tsinTableSize = SIZEOF(oop);\n\tsinTable = checkedFloatPtrOf(oop);\n\toop = interpreterProxy.fetchPointerofObject(3, fftOop);\n\tpermTableSize = SIZEOF(oop);\n\tpermTable = checkedWordPtrOf(oop);\n\toop = interpreterProxy.fetchPointerofObject(4, fftOop);\n\trealDataSize = SIZEOF(oop);\n\trealData = checkedFloatPtrOf(oop);\n\toop = interpreterProxy.fetchPointerofObject(5, fftOop);\n\timagDataSize = SIZEOF(oop);\n\n\t/* Check assumptions about sizes */\n\n\timagData = checkedFloatPtrOf(oop);\n\tinterpreterProxy.success((((((SHL(1, nu)) === fftSize) && (((fftSize >> 2) + 1) === sinTableSize)) && (fftSize === realDataSize)) && (fftSize === imagDataSize)) && (realDataSize === imagDataSize));\n\treturn interpreterProxy.failed() === false;\n}\n\nfunction permuteData() {\n\tvar a;\n\tvar b;\n\tvar end;\n\tvar i;\n\tvar tmp;\n\n\ti = 0;\n\tend = permTableSize;\n\twhile (i < end) {\n\t\ta = permTable[i] - 1;\n\t\tb = permTable[i + 1] - 1;\n\t\tif (!((a < realDataSize) && (b < realDataSize))) {\n\t\t\treturn interpreterProxy.success(false);\n\t\t}\n\t\ttmp = realData[a];\n\t\trealData[a] = realData[b];\n\t\trealData[b] = tmp;\n\t\ttmp = imagData[a];\n\t\timagData[a] = imagData[b];\n\t\timagData[b] = tmp;\n\t\ti += 2;\n\t}\n}\n\nfunction primitiveFFTPermuteData() {\n\tvar rcvr;\n\n\trcvr = interpreterProxy.stackObjectValue(0);\n\tif (!loadFFTFrom(rcvr)) {\n\t\treturn null;\n\t}\n\tpermuteData();\n\tif (interpreterProxy.failed()) {\n\n\t\t/* permuteData went wrong. Do the permutation again -- this will restore the original order */\n\n\t\tpermuteData();\n\t}\n}\n\nfunction primitiveFFTScaleData() {\n\tvar rcvr;\n\n\trcvr = interpreterProxy.stackObjectValue(0);\n\tif (!loadFFTFrom(rcvr)) {\n\t\treturn null;\n\t}\n\tscaleData();\n}\n\nfunction primitiveFFTTransformData() {\n\tvar forward;\n\tvar rcvr;\n\n\tforward = interpreterProxy.booleanValueOf(interpreterProxy.stackValue(0));\n\trcvr = interpreterProxy.stackObjectValue(1);\n\tif (!loadFFTFrom(rcvr)) {\n\t\treturn null;\n\t}\n\ttransformData(forward);\n\tif (!interpreterProxy.failed()) {\n\t\tinterpreterProxy.pop(1);\n\t}\n}\n\n\n/*\tScale all elements by 1/n when doing inverse */\n\nfunction scaleData() {\n\tvar i;\n\tvar realN;\n\n\tif (fftSize <= 1) {\n\t\treturn null;\n\t}\n\trealN = (1.0 / fftSize);\n\tfor (i = 0; i <= (fftSize - 1); i++) {\n\t\trealData[i] = (realData[i] * realN);\n\t\timagData[i] = (imagData[i] * realN);\n\t}\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nfunction setInterpreter(anInterpreter) {\n\tvar ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy.majorVersion() == VM_PROXY_MAJOR;\n\tif (ok === false) {\n\t\treturn false;\n\t}\n\tok = interpreterProxy.minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nfunction transformData(forward) {\n\tpermuteData();\n\tif (interpreterProxy.failed()) {\n\n\t\t/* permuteData went wrong. Do the permutation again -- this will restore the original order */\n\n\t\tpermuteData();\n\t\treturn null;\n\t}\n\ttransformForward(forward);\n\tif (!forward) {\n\t\tscaleData();\n\t}\n}\n\nfunction transformForward(forward) {\n\tvar fftScale;\n\tvar fftSize2;\n\tvar fftSize4;\n\tvar i;\n\tvar ii;\n\tvar imagT;\n\tvar imagU;\n\tvar ip;\n\tvar j;\n\tvar lev;\n\tvar lev1;\n\tvar level;\n\tvar realT;\n\tvar realU;\n\tvar theta;\n\n\tfftSize2 = fftSize >> 1;\n\tfftSize4 = fftSize >> 2;\n\tfor (level = 1; level <= nu; level++) {\n\t\tlev = SHL(1, level);\n\t\tlev1 = lev >> 1;\n\t\tfftScale = DIV(fftSize, lev);\n\t\tfor (j = 1; j <= lev1; j++) {\n\n\t\t\t/* pi * (j-1) / lev1 mapped onto 0..n/2 */\n\n\t\t\ttheta = (j - 1) * fftScale;\n\t\t\tif (theta < fftSize4) {\n\n\t\t\t\t/* Compute U, the complex multiplier for each level */\n\n\t\t\t\trealU = sinTable[(sinTableSize - theta) - 1];\n\t\t\t\timagU = sinTable[theta];\n\t\t\t} else {\n\t\t\t\trealU = 0.0 - sinTable[theta - fftSize4];\n\t\t\t\timagU = sinTable[fftSize2 - theta];\n\t\t\t}\n\t\t\tif (!forward) {\n\t\t\t\timagU = 0.0 - imagU;\n\t\t\t}\n\t\t\ti = j;\n\t\t\twhile (i <= fftSize) {\n\t\t\t\tip = (i + lev1) - 1;\n\t\t\t\tii = i - 1;\n\t\t\t\trealT = (realData[ip] * realU) - (imagData[ip] * imagU);\n\t\t\t\timagT = (realData[ip] * imagU) + (imagData[ip] * realU);\n\t\t\t\trealData[ip] = (realData[ii] - realT);\n\t\t\t\timagData[ip] = (imagData[ii] - imagT);\n\t\t\t\trealData[ii] = (realData[ii] + realT);\n\t\t\t\timagData[ii] = (imagData[ii] + imagT);\n\t\t\t\ti += lev;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nSqueak.registerExternalModule(\"FFTPlugin\", {\n\tprimitiveFFTTransformData: primitiveFFTTransformData,\n\tsetInterpreter: setInterpreter,\n\tprimitiveFFTPermuteData: primitiveFFTPermuteData,\n\tprimitiveFFTScaleData: primitiveFFTScaleData,\n\tgetModuleName: getModuleName,\n});\n\n}); // end of module\n","/* Smalltalk from Squeak4.5 with VMMaker 4.13.6 translated as JS source on 3 November 2014 1:52:20 pm */\n/* Automatically generated by\n\tJSPluginCodeGenerator VMMakerJS-bf.15 uuid: fd4e10f2-3773-4e80-8bb5-c4b471a014e5\n from\n\tFloatArrayPlugin VMMaker-bf.353 uuid: 8ae25e7e-8d2c-451e-8277-598b30e9c002\n */\n\nmodule(\"users.bert.SqueakJS.plugins.FloatArrayPlugin\").requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\"use strict\";\n\nvar VM_PROXY_MAJOR = 1;\nvar VM_PROXY_MINOR = 11;\n\n/*** Functions ***/\nfunction CLASSOF(obj) { return typeof obj === \"number\" ? interpreterProxy.classSmallInteger() : obj.sqClass }\nfunction SIZEOF(obj) { return obj.pointers ? obj.pointers.length : obj.words ? obj.words.length : obj.bytes ? obj.bytes.length : 0 }\nfunction BYTESIZEOF(obj) { return obj.bytes ? obj.bytes.length : obj.words ? obj.words.length * 4 : 0 }\nfunction DIV(a, b) { return Math.floor(a / b) | 0; } // integer division\nfunction MOD(a, b) { return a - DIV(a, b) * b | 0; } // signed modulus\nfunction SHL(a, b) { return b > 31 ? 0 : a << b; } // fix JS shift\nfunction SHR(a, b) { return b > 31 ? 0 : a >>> b; } // fix JS shift\nfunction SHIFT(a, b) { return b < 0 ? (b < -31 ? 0 : a >>> (0-b) ) : (b > 31 ? 0 : a << b); }\n\n/*** Variables ***/\nvar interpreterProxy = null;\nvar moduleName = \"FloatArrayPlugin 3 November 2014 (e)\";\n\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nfunction getModuleName() {\n\treturn moduleName;\n}\n\nfunction halt() {\n\t;\n}\n\n\n/*\tPrimitive. Add the receiver and the argument, both FloatArrays and store the result into the receiver. */\n\nfunction primitiveAddFloatArray() {\n\tvar arg;\n\tvar argPtr;\n\tvar i;\n\tvar length;\n\tvar rcvr;\n\tvar rcvrPtr;\n\n\targ = interpreterProxy.stackObjectValue(0);\n\trcvr = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(arg));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(arg);\n\tinterpreterProxy.success(length === SIZEOF(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\trcvrPtr = rcvr.wordsAsFloat32Array();\n\targPtr = arg.wordsAsFloat32Array();\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\trcvrPtr[i] = (rcvrPtr[i] + argPtr[i]);\n\t}\n\tinterpreterProxy.pop(1);\n}\n\n\n/*\tPrimitive. Add the argument, a scalar value to the receiver, a FloatArray */\n\nfunction primitiveAddScalar() {\n\tvar i;\n\tvar length;\n\tvar rcvr;\n\tvar rcvrPtr;\n\tvar value;\n\n\tvalue = interpreterProxy.stackFloatValue(0);\n\trcvr = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvr);\n\trcvrPtr = rcvr.wordsAsFloat32Array();\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\trcvrPtr[i] = (rcvrPtr[i] + value);\n\t}\n\tinterpreterProxy.pop(1);\n}\n\nfunction primitiveAt() {\n\tvar floatPtr;\n\tvar floatValue;\n\tvar index;\n\tvar rcvr;\n\n\tindex = interpreterProxy.stackIntegerValue(0);\n\trcvr = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvr));\n\tinterpreterProxy.success((index > 0) && (index <= SIZEOF(rcvr)));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tfloatPtr = rcvr.wordsAsFloat32Array();\n\tfloatValue = floatPtr[index - 1];\n\tinterpreterProxy.pop(2);\n\tinterpreterProxy.pushFloat(floatValue);\n}\n\nfunction primitiveAtPut() {\n\tvar floatPtr;\n\tvar floatValue;\n\tvar index;\n\tvar rcvr;\n\tvar value;\n\n\tvalue = interpreterProxy.stackValue(0);\n\tif (typeof value === \"number\") {\n\t\tfloatValue = value;\n\t} else {\n\t\tfloatValue = interpreterProxy.floatValueOf(value);\n\t}\n\tindex = interpreterProxy.stackIntegerValue(1);\n\trcvr = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvr));\n\tinterpreterProxy.success((index > 0) && (index <= SIZEOF(rcvr)));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tfloatPtr = rcvr.wordsAsFloat32Array();\n\tfloatPtr[index - 1] = floatValue;\n\tif (!interpreterProxy.failed()) {\n\t\tinterpreterProxy.popthenPush(3, value);\n\t}\n}\n\n\n/*\tPrimitive. Add the receiver and the argument, both FloatArrays and store the result into the receiver. */\n\nfunction primitiveDivFloatArray() {\n\tvar arg;\n\tvar argPtr;\n\tvar i;\n\tvar length;\n\tvar rcvr;\n\tvar rcvrPtr;\n\n\targ = interpreterProxy.stackObjectValue(0);\n\trcvr = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(arg));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(arg);\n\tinterpreterProxy.success(length === SIZEOF(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\trcvrPtr = rcvr.wordsAsFloat32Array();\n\n\t/* Check if any of the argument's values is zero */\n\n\targPtr = arg.wordsAsFloat32Array();\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\tif (argPtr[i] === 0) {\n\t\t\treturn interpreterProxy.primitiveFail();\n\t\t}\n\t}\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\trcvrPtr[i] = (rcvrPtr[i] / argPtr[i]);\n\t}\n\tinterpreterProxy.pop(1);\n}\n\n\n/*\tPrimitive. Add the argument, a scalar value to the receiver, a FloatArray */\n\nfunction primitiveDivScalar() {\n\tvar i;\n\tvar inverse;\n\tvar length;\n\tvar rcvr;\n\tvar rcvrPtr;\n\tvar value;\n\n\tvalue = interpreterProxy.stackFloatValue(0);\n\trcvr = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (value === 0.0) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvr);\n\trcvrPtr = rcvr.wordsAsFloat32Array();\n\tinverse = 1.0 / value;\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\trcvrPtr[i] = (rcvrPtr[i] * inverse);\n\t}\n\tinterpreterProxy.pop(1);\n}\n\n\n/*\tPrimitive. Compute the dot product of the receiver and the argument.\n\tThe dot product is defined as the sum of the products of the individual elements. */\n\nfunction primitiveDotProduct() {\n\tvar arg;\n\tvar argPtr;\n\tvar i;\n\tvar length;\n\tvar rcvr;\n\tvar rcvrPtr;\n\tvar result;\n\n\targ = interpreterProxy.stackObjectValue(0);\n\trcvr = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(arg));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(arg);\n\tinterpreterProxy.success(length === SIZEOF(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\trcvrPtr = rcvr.wordsAsFloat32Array();\n\targPtr = arg.wordsAsFloat32Array();\n\tresult = 0.0;\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\tresult += rcvrPtr[i] * argPtr[i];\n\t}\n\tinterpreterProxy.pop(2);\n\tinterpreterProxy.pushFloat(result);\n}\n\nfunction primitiveEqual() {\n\tvar arg;\n\tvar argPtr;\n\tvar i;\n\tvar length;\n\tvar rcvr;\n\tvar rcvrPtr;\n\n\targ = interpreterProxy.stackObjectValue(0);\n\trcvr = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(arg));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(2);\n\tlength = SIZEOF(arg);\n\tif (length !== SIZEOF(rcvr)) {\n\t\treturn interpreterProxy.pushBool(false);\n\t}\n\trcvrPtr = rcvr.wordsAsFloat32Array();\n\targPtr = arg.wordsAsFloat32Array();\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\tif (rcvrPtr[i] !== argPtr[i]) {\n\t\t\treturn interpreterProxy.pushBool(false);\n\t\t}\n\t}\n\treturn interpreterProxy.pushBool(true);\n}\n\nfunction primitiveHashArray() {\n\tvar i;\n\tvar length;\n\tvar rcvr;\n\tvar rcvrPtr;\n\tvar result;\n\n\trcvr = interpreterProxy.stackObjectValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvr);\n\trcvrPtr = rcvr.wordsAsInt32Array();\n\tresult = 0;\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\tresult += rcvrPtr[i];\n\t}\n\tinterpreterProxy.pop(1);\n\treturn interpreterProxy.pushInteger(result & 536870911);\n}\n\n\n/*\tPrimitive. Compute the length of the argument (sqrt of sum of component squares). */\n\nfunction primitiveLength() {\n\tvar i;\n\tvar length;\n\tvar rcvr;\n\tvar rcvrPtr;\n\tvar result;\n\n\trcvr = interpreterProxy.stackObjectValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvr);\n\tinterpreterProxy.success(true);\n\trcvrPtr = rcvr.wordsAsFloat32Array();\n\tresult = 0.0;\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\tresult += rcvrPtr[i] * rcvrPtr[i];\n\t}\n\tresult = Math.sqrt(result);\n\tinterpreterProxy.popthenPush(1, interpreterProxy.floatObjectOf(result));\n}\n\n\n/*\tPrimitive. Add the receiver and the argument, both FloatArrays and store the result into the receiver. */\n\nfunction primitiveMulFloatArray() {\n\tvar arg;\n\tvar argPtr;\n\tvar i;\n\tvar length;\n\tvar rcvr;\n\tvar rcvrPtr;\n\n\targ = interpreterProxy.stackObjectValue(0);\n\trcvr = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(arg));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(arg);\n\tinterpreterProxy.success(length === SIZEOF(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\trcvrPtr = rcvr.wordsAsFloat32Array();\n\targPtr = arg.wordsAsFloat32Array();\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\trcvrPtr[i] = (rcvrPtr[i] * argPtr[i]);\n\t}\n\tinterpreterProxy.pop(1);\n}\n\n\n/*\tPrimitive. Add the argument, a scalar value to the receiver, a FloatArray */\n\nfunction primitiveMulScalar() {\n\tvar i;\n\tvar length;\n\tvar rcvr;\n\tvar rcvrPtr;\n\tvar value;\n\n\tvalue = interpreterProxy.stackFloatValue(0);\n\trcvr = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvr);\n\trcvrPtr = rcvr.wordsAsFloat32Array();\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\trcvrPtr[i] = (rcvrPtr[i] * value);\n\t}\n\tinterpreterProxy.pop(1);\n}\n\n\n/*\tPrimitive. Normalize the argument (A FloatArray) in place. */\n\nfunction primitiveNormalize() {\n\tvar i;\n\tvar len;\n\tvar length;\n\tvar rcvr;\n\tvar rcvrPtr;\n\n\trcvr = interpreterProxy.stackObjectValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvr);\n\tinterpreterProxy.success(true);\n\trcvrPtr = rcvr.wordsAsFloat32Array();\n\tlen = 0.0;\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\tlen += rcvrPtr[i] * rcvrPtr[i];\n\t}\n\tinterpreterProxy.success(len > 0.0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlen = Math.sqrt(len);\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\trcvrPtr[i] = (rcvrPtr[i] / len);\n\t}\n}\n\n\n/*\tPrimitive. Add the receiver and the argument, both FloatArrays and store the result into the receiver. */\n\nfunction primitiveSubFloatArray() {\n\tvar arg;\n\tvar argPtr;\n\tvar i;\n\tvar length;\n\tvar rcvr;\n\tvar rcvrPtr;\n\n\targ = interpreterProxy.stackObjectValue(0);\n\trcvr = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(arg));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(arg);\n\tinterpreterProxy.success(length === SIZEOF(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\trcvrPtr = rcvr.wordsAsFloat32Array();\n\targPtr = arg.wordsAsFloat32Array();\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\trcvrPtr[i] = (rcvrPtr[i] - argPtr[i]);\n\t}\n\tinterpreterProxy.pop(1);\n}\n\n\n/*\tPrimitive. Add the argument, a scalar value to the receiver, a FloatArray */\n\nfunction primitiveSubScalar() {\n\tvar i;\n\tvar length;\n\tvar rcvr;\n\tvar rcvrPtr;\n\tvar value;\n\n\tvalue = interpreterProxy.stackFloatValue(0);\n\trcvr = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvr);\n\trcvrPtr = rcvr.wordsAsFloat32Array();\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\trcvrPtr[i] = (rcvrPtr[i] - value);\n\t}\n\tinterpreterProxy.pop(1);\n}\n\n\n/*\tPrimitive. Find the sum of each float in the receiver, a FloatArray, and stash the result into the argument Float. */\n\nfunction primitiveSum() {\n\tvar i;\n\tvar length;\n\tvar rcvr;\n\tvar rcvrPtr;\n\tvar sum;\n\n\trcvr = interpreterProxy.stackObjectValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvr));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvr);\n\trcvrPtr = rcvr.wordsAsFloat32Array();\n\tsum = 0.0;\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\tsum += rcvrPtr[i];\n\t}\n\tinterpreterProxy.popthenPush(1, interpreterProxy.floatObjectOf(sum));\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nfunction setInterpreter(anInterpreter) {\n\tvar ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy.majorVersion() == VM_PROXY_MAJOR;\n\tif (ok === false) {\n\t\treturn false;\n\t}\n\tok = interpreterProxy.minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\nSqueak.registerExternalModule(\"FloatArrayPlugin\", {\n\tprimitiveMulFloatArray: primitiveMulFloatArray,\n\tprimitiveEqual: primitiveEqual,\n\tprimitiveAtPut: primitiveAtPut,\n\tprimitiveAt: primitiveAt,\n\tprimitiveNormalize: primitiveNormalize,\n\tprimitiveSubFloatArray: primitiveSubFloatArray,\n\tprimitiveDivFloatArray: primitiveDivFloatArray,\n\tprimitiveAddScalar: primitiveAddScalar,\n\tprimitiveDotProduct: primitiveDotProduct,\n\tprimitiveSubScalar: primitiveSubScalar,\n\tsetInterpreter: setInterpreter,\n\tprimitiveSum: primitiveSum,\n\tgetModuleName: getModuleName,\n\tprimitiveHashArray: primitiveHashArray,\n\tprimitiveMulScalar: primitiveMulScalar,\n\tprimitiveLength: primitiveLength,\n\tprimitiveAddFloatArray: primitiveAddFloatArray,\n\tprimitiveDivScalar: primitiveDivScalar,\n});\n\n}); // end of module\n","/* Smalltalk from Squeak4.5 with VMMaker 4.13.6 translated as JS source on 14 November 2014 12:21:50 am */\n/* Automatically generated by\n\tJSSmartSyntaxPluginCodeGenerator VMMakerJS-bf.17 uuid: 399be48b-95d8-4722-bdcc-39a94a12c486\n from\n\tGeniePlugin VMMaker-bf.353 uuid: 8ae25e7e-8d2c-451e-8277-598b30e9c002\n */\n\nmodule(\"users.bert.SqueakJS.plugins.GeniePlugin\").requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\"use strict\";\n\nvar VM_PROXY_MAJOR = 1;\nvar VM_PROXY_MINOR = 11;\n\n/*** Functions ***/\nfunction CLASSOF(obj) { return typeof obj === \"number\" ? interpreterProxy.classSmallInteger() : obj.sqClass }\nfunction SIZEOF(obj) { return obj.pointers ? obj.pointers.length : obj.words ? obj.words.length : obj.bytes ? obj.bytes.length : 0 }\nfunction BYTESIZEOF(obj) { return obj.bytes ? obj.bytes.length : obj.words ? obj.words.length * 4 : 0 }\nfunction DIV(a, b) { return Math.floor(a / b) | 0; } // integer division\nfunction MOD(a, b) { return a - DIV(a, b) * b | 0; } // signed modulus\nfunction SHL(a, b) { return b > 31 ? 0 : a << b; } // fix JS shift\nfunction SHR(a, b) { return b > 31 ? 0 : a >>> b; } // fix JS shift\nfunction SHIFT(a, b) { return b < 0 ? (b < -31 ? 0 : a >>> (0-b) ) : (b > 31 ? 0 : a << b); }\nfunction PTR_ADD(p, n) { return new Int32Array(p.buffer, p.byteOffset + n * 4); }\nfunction FPTR_ADD(p, n) { return new Float32Array(p.buffer, p.byteOffset + n * 4); }\n\n/*** Variables ***/\nvar interpreterProxy = null;\nvar moduleName = \"GeniePlugin v2.0 14 November 2014 (e)\";\n\n\n\n/*\targuments are pointer to ints paired as x,y coordinates of points */\n\nfunction cSquaredDistanceFromto(aPoint, bPoint) {\n\tvar aPointX;\n\tvar bPointX;\n\tvar xDiff;\n\tvar aPointY;\n\tvar bPointY;\n\tvar yDiff;\n\n\taPointX = aPoint[0];\n\taPointY = aPoint[1];\n\tbPointX = bPoint[0];\n\tbPointY = bPoint[1];\n\txDiff = bPointX - aPointX;\n\tyDiff = bPointY - aPointY;\n\treturn (xDiff * xDiff) + (yDiff * yDiff);\n}\n\nfunction cSubstAngleFactorFromto(startDegreeNumber, endDegreeNumber) {\n\tvar absDiff;\n\n\tabsDiff = Math.abs(endDegreeNumber - startDegreeNumber);\n\tif (absDiff > 180) {\n\t\tabsDiff = 360 - absDiff;\n\t}\n\treturn (absDiff * absDiff) >>> 6;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nfunction getModuleName() {\n\treturn moduleName;\n}\n\nfunction halt() {\n\t;\n}\n\nfunction majorNO() {\n\treturn 2;\n}\n\nfunction minorNO() {\n\treturn 0;\n}\n\nfunction msg(s) {\n\tconsole.log(moduleName + \": \" + s);\n}\n\nfunction primSameClassAbsoluteStrokeDistanceMyPoints_otherPoints_myVectors_otherVectors_mySquaredLengths_otherSquaredLengths_myAngles_otherAngles_maxSizeAndReferenceFlag_rowBase_rowInsertRemove_rowInsertRemoveCount() {\n\tvar otherAngles;\n\tvar otherSquaredLengthsSize;\n\tvar forReference;\n\tvar jM1;\n\tvar iM1;\n\tvar jM1T2;\n\tvar base;\n\tvar insert;\n\tvar otherVectors;\n\tvar otherVectorsSize;\n\tvar otherSquaredLengths;\n\tvar rowBaseSize;\n\tvar myPoints;\n\tvar jLimiT;\n\tvar mySquaredLengths;\n\tvar additionalMultiInsertRemoveCost;\n\tvar remove;\n\tvar otherPoints;\n\tvar otherPointsSize;\n\tvar myVectors;\n\tvar rowInsertRemoveCount;\n\tvar rowBase;\n\tvar maxDist;\n\tvar iM1T2;\n\tvar j;\n\tvar insertRemove;\n\tvar i;\n\tvar myVectorsSize;\n\tvar subst;\n\tvar maxSize;\n\tvar removeBase;\n\tvar substBase;\n\tvar myAngles;\n\tvar insertRemoveCount;\n\tvar rowInsertRemove;\n\tvar insertBase;\n\tvar myPointsOop;\n\tvar otherPointsOop;\n\tvar myVectorsOop;\n\tvar otherVectorsOop;\n\tvar mySquaredLengthsOop;\n\tvar otherSquaredLengthsOop;\n\tvar myAnglesOop;\n\tvar otherAnglesOop;\n\tvar maxSizeAndRefFlag;\n\tvar rowBaseOop;\n\tvar rowInsertRemoveOop;\n\tvar rowInsertRemoveCountOop;\n\tvar _return_value;\n\n\tmyPointsOop = interpreterProxy.stackValue(11);\n\totherPointsOop = interpreterProxy.stackValue(10);\n\tmyVectorsOop = interpreterProxy.stackValue(9);\n\totherVectorsOop = interpreterProxy.stackValue(8);\n\tmySquaredLengthsOop = interpreterProxy.stackValue(7);\n\totherSquaredLengthsOop = interpreterProxy.stackValue(6);\n\tmyAnglesOop = interpreterProxy.stackValue(5);\n\totherAnglesOop = interpreterProxy.stackValue(4);\n\tmaxSizeAndRefFlag = interpreterProxy.stackIntegerValue(3);\n\trowBaseOop = interpreterProxy.stackValue(2);\n\trowInsertRemoveOop = interpreterProxy.stackValue(1);\n\trowInsertRemoveCountOop = interpreterProxy.stackValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\tmsg(\"failed 1\");\n\t\treturn null;\n\t}\n\tinterpreterProxy.success((((((((((interpreterProxy.isWords(myPointsOop) && interpreterProxy.isWords(otherPointsOop)) && interpreterProxy.isWords(myVectorsOop)) && interpreterProxy.isWords(otherVectorsOop)) && interpreterProxy.isWords(mySquaredLengthsOop)) && interpreterProxy.isWords(otherSquaredLengthsOop)) && interpreterProxy.isWords(myAnglesOop)) && interpreterProxy.isWords(otherAnglesOop)) && interpreterProxy.isWords(rowBaseOop)) && interpreterProxy.isWords(rowInsertRemoveOop)) && interpreterProxy.isWords(rowInsertRemoveCountOop));\n\tif (interpreterProxy.failed()) {\n\t\tmsg(\"failed 2\");\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isMemberOf(myPointsOop, \"PointArray\") && interpreterProxy.isMemberOf(otherPointsOop, \"PointArray\"));\n\tif (interpreterProxy.failed()) {\n\t\tmsg(\"failed 3\");\n\t\treturn null;\n\t}\n\tmyPoints = myPointsOop.wordsAsInt32Array();\n\totherPoints = otherPointsOop.wordsAsInt32Array();\n\tmyVectors = myVectorsOop.wordsAsInt32Array();\n\totherVectors = otherVectorsOop.wordsAsInt32Array();\n\tmySquaredLengths = mySquaredLengthsOop.wordsAsInt32Array();\n\totherSquaredLengths = otherSquaredLengthsOop.wordsAsInt32Array();\n\tmyAngles = myAnglesOop.wordsAsInt32Array();\n\totherAngles = otherAnglesOop.wordsAsInt32Array();\n\trowBase = rowBaseOop.wordsAsInt32Array();\n\trowInsertRemove = rowInsertRemoveOop.wordsAsInt32Array();\n\n\t/* Note: myPointsSize and mySquaredLengthsSize variables eliminated to reduce\n\tmethod temporary variable count for closure-enabled images */\n\t/* PointArrays */\n\t/* myPointsSize := (interpreterProxy stSizeOf: myPointsOop) bitShift: -1. */\n\n\trowInsertRemoveCount = rowInsertRemoveCountOop.wordsAsInt32Array();\n\totherPointsSize = SIZEOF(otherPointsOop) >>> 1;\n\tmyVectorsSize = SIZEOF(myVectorsOop) >>> 1;\n\n\t/* IntegerArrays */\n\t/* mySquaredLengthsSize := interpreterProxy stSizeOf: mySquaredLengthsOop. */\n\n\totherVectorsSize = SIZEOF(otherVectorsOop) >>> 1;\n\totherSquaredLengthsSize = SIZEOF(otherSquaredLengthsOop);\n\trowBaseSize = SIZEOF(rowBaseOop);\n\tinterpreterProxy.success(((rowBaseSize === SIZEOF(rowInsertRemoveOop)) && (rowBaseSize === SIZEOF(rowInsertRemoveCountOop))) && (rowBaseSize > otherVectorsSize));\n\tif (interpreterProxy.failed()) {\n\t\tmsg(\"failed 4\");\n\t\treturn null;\n\t}\n\tinterpreterProxy.success((((((SIZEOF(mySquaredLengthsOop) >= (myVectorsSize - 1)) && ((SIZEOF(myPointsOop) >>> 1) >= myVectorsSize)) && (otherSquaredLengthsSize >= (otherVectorsSize - 1))) && (otherPointsSize >= otherVectorsSize)) && (SIZEOF(myAnglesOop) >= (myVectorsSize - 1))) && (SIZEOF(otherAnglesOop) >= (otherVectorsSize - 1)));\n\tif (interpreterProxy.failed()) {\n\t\tmsg(\"failed 5\");\n\t\treturn null;\n\t}\n\tforReference = maxSizeAndRefFlag & 1;\n\tmaxSize = maxSizeAndRefFlag >>> 1;\n\tmaxDist = 1 << 29;\n\tif (forReference) {\n\t\tadditionalMultiInsertRemoveCost = 0;\n\t} else {\n\t\tadditionalMultiInsertRemoveCost = (maxSize * maxSize) >>> 10;\n\t}\n\trowBase[0] = 0;\n\trowInsertRemove[0] = 0;\n\trowInsertRemoveCount[0] = 2;\n\tinsertRemove = 0 - additionalMultiInsertRemoveCost;\n\tjLimiT = otherVectorsSize;\n\tif (!((otherPointsSize >= (jLimiT - 1)) && (otherSquaredLengthsSize >= (jLimiT - 1)))) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tfor (j = 1; j <= jLimiT; j++) {\n\t\tjM1 = j - 1;\n\t\tinsertRemove = (insertRemove + ((otherSquaredLengths[jM1] + cSquaredDistanceFromto(PTR_ADD(otherPoints, (jM1 << 1)), myPoints)) >>> 7)) + additionalMultiInsertRemoveCost;\n\t\trowInsertRemove[j] = insertRemove;\n\t\trowBase[j] = (insertRemove * j);\n\t\trowInsertRemoveCount[j] = (j + 1);\n\t}\n\tinsertRemove = rowInsertRemove[0] - additionalMultiInsertRemoveCost;\n\tfor (i = 1; i <= myVectorsSize; i++) {\n\t\tiM1 = i - 1;\n\t\tiM1T2 = iM1 << 1;\n\t\tsubstBase = rowBase[0];\n\t\tinsertRemove = (insertRemove + ((mySquaredLengths[iM1] + cSquaredDistanceFromto(PTR_ADD(myPoints, iM1T2), otherPoints)) >>> 7)) + additionalMultiInsertRemoveCost;\n\t\trowInsertRemove[0] = insertRemove;\n\t\trowBase[0] = (insertRemove * i);\n\t\trowInsertRemoveCount[0] = (i + 1);\n\t\tjLimiT = otherVectorsSize;\n\t\tfor (j = 1; j <= jLimiT; j++) {\n\t\t\tjM1 = j - 1;\n\t\t\tjM1T2 = jM1 << 1;\n\t\t\tremoveBase = rowBase[j];\n\t\t\tinsertBase = rowBase[jM1];\n\t\t\tremove = (mySquaredLengths[iM1] + cSquaredDistanceFromto(PTR_ADD(myPoints, iM1T2), PTR_ADD(otherPoints, (j << 1)))) >>> 7;\n\t\t\tif (((insertRemove = rowInsertRemove[j])) === 0) {\n\t\t\t\tremoveBase += remove;\n\t\t\t} else {\n\t\t\t\tremoveBase = (removeBase + insertRemove) + (remove * rowInsertRemoveCount[j]);\n\t\t\t\tremove += insertRemove;\n\t\t\t}\n\t\t\tinsert = (otherSquaredLengths[jM1] + cSquaredDistanceFromto(PTR_ADD(otherPoints, jM1T2), PTR_ADD(myPoints, (i << 1)))) >>> 7;\n\t\t\tif (((insertRemove = rowInsertRemove[jM1])) === 0) {\n\t\t\t\tinsertBase += insert;\n\t\t\t} else {\n\t\t\t\tinsertBase = (insertBase + insertRemove) + (insert * rowInsertRemoveCount[jM1]);\n\t\t\t\tinsert += insertRemove;\n\t\t\t}\n\t\t\tif (forReference) {\n\t\t\t\tsubstBase = maxDist;\n\t\t\t} else {\n\t\t\t\tsubst = ((cSquaredDistanceFromto(PTR_ADD(otherVectors, jM1T2), PTR_ADD(myVectors, iM1T2)) + cSquaredDistanceFromto(PTR_ADD(otherPoints, jM1T2), PTR_ADD(myPoints, iM1T2))) * (16 + cSubstAngleFactorFromto(otherAngles[jM1], myAngles[iM1]))) >>> 11;\n\t\t\t\tsubstBase += subst;\n\t\t\t}\n\t\t\tif ((substBase <= removeBase) && (substBase <= insertBase)) {\n\t\t\t\tbase = substBase;\n\t\t\t\tinsertRemove = 0;\n\t\t\t\tinsertRemoveCount = 1;\n\t\t\t} else {\n\t\t\t\tif (removeBase <= insertBase) {\n\t\t\t\t\tbase = removeBase;\n\t\t\t\t\tinsertRemove = remove + additionalMultiInsertRemoveCost;\n\t\t\t\t\tinsertRemoveCount = rowInsertRemoveCount[j] + 1;\n\t\t\t\t} else {\n\t\t\t\t\tbase = insertBase;\n\t\t\t\t\tinsertRemove = insert + additionalMultiInsertRemoveCost;\n\t\t\t\t\tinsertRemoveCount = rowInsertRemoveCount[jM1] + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsubstBase = rowBase[j];\n\t\t\trowBase[j] = Math.min(base, maxDist);\n\t\t\trowInsertRemove[j] = Math.min(insertRemove, maxDist);\n\t\t\trowInsertRemoveCount[j] = insertRemoveCount;\n\t\t}\n\t\tinsertRemove = rowInsertRemove[0];\n\t}\n\t_return_value = base;\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(13, _return_value);\n\treturn null;\n}\n\n\n/*\tmajorNO * 1000 + minorNO */\n\nfunction primVersionNO() {\n\tvar _return_value;\n\n\t_return_value = ((majorNO() * 1000) + minorNO());\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nfunction setInterpreter(anInterpreter) {\n\tvar ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy.majorVersion() == VM_PROXY_MAJOR;\n\tif (ok === false) {\n\t\treturn false;\n\t}\n\tok = interpreterProxy.minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\nSqueak.registerExternalModule(\"GeniePlugin\", {\n\tprimVersionNO: primVersionNO,\n\tsetInterpreter: setInterpreter,\n\tprimSameClassAbsoluteStrokeDistanceMyPoints_otherPoints_myVectors_otherVectors_mySquaredLengths_otherSquaredLengths_myAngles_otherAngles_maxSizeAndReferenceFlag_rowBase_rowInsertRemove_rowInsertRemoveCount: primSameClassAbsoluteStrokeDistanceMyPoints_otherPoints_myVectors_otherVectors_mySquaredLengths_otherSquaredLengths_myAngles_otherAngles_maxSizeAndReferenceFlag_rowBase_rowInsertRemove_rowInsertRemoveCount,\n\tgetModuleName: getModuleName,\n});\n\n}); // end of module\n","/* Smalltalk from Squeak4.5 with VMMaker 4.13.6 translated as JS source on 3 November 2014 1:52:20 pm */\n/* Automatically generated by\n\tJSPluginCodeGenerator VMMakerJS-bf.15 uuid: fd4e10f2-3773-4e80-8bb5-c4b471a014e5\n from\n\tJPEGReaderPlugin VMMaker-bf.353 uuid: 8ae25e7e-8d2c-451e-8277-598b30e9c002\n */\n\nmodule(\"users.bert.SqueakJS.plugins.JPEGReaderPlugin\").requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\"use strict\";\n\nvar VM_PROXY_MAJOR = 1;\nvar VM_PROXY_MINOR = 11;\n\n/*** Functions ***/\nfunction CLASSOF(obj) { return typeof obj === \"number\" ? interpreterProxy.classSmallInteger() : obj.sqClass }\nfunction SIZEOF(obj) { return obj.pointers ? obj.pointers.length : obj.words ? obj.words.length : obj.bytes ? obj.bytes.length : 0 }\nfunction BYTESIZEOF(obj) { return obj.bytes ? obj.bytes.length : obj.words ? obj.words.length * 4 : 0 }\nfunction DIV(a, b) { return Math.floor(a / b) | 0; } // integer division\nfunction MOD(a, b) { return a - DIV(a, b) * b | 0; } // signed modulus\nfunction SHL(a, b) { return b > 31 ? 0 : a << b; } // fix JS shift\nfunction SHR(a, b) { return b > 31 ? 0 : a >>> b; } // fix JS shift\nfunction SHIFT(a, b) { return b < 0 ? (b < -31 ? 0 : a >>> (0-b) ) : (b > 31 ? 0 : a << b); }\n\n/*** Constants ***/\nvar BlockWidthIndex = 5;\nvar BlueIndex = 2;\nvar ConstBits = 13;\nvar CurrentXIndex = 0;\nvar CurrentYIndex = 1;\nvar DCTSize = 8;\nvar DCTSize2 = 64;\nvar FIXn0n298631336 = 2446;\nvar FIXn0n34414 = 22554;\nvar FIXn0n390180644 = 3196;\nvar FIXn0n541196100 = 4433;\nvar FIXn0n71414 = 46802;\nvar FIXn0n765366865 = 6270;\nvar FIXn0n899976223 = 7373;\nvar FIXn1n175875602 = 9633;\nvar FIXn1n40200 = 91881;\nvar FIXn1n501321110 = 12299;\nvar FIXn1n77200 = 116130;\nvar FIXn1n847759065 = 15137;\nvar FIXn1n961570560 = 16069;\nvar FIXn2n053119869 = 16819;\nvar FIXn2n562915447 = 20995;\nvar FIXn3n072711026 = 25172;\nvar GreenIndex = 1;\nvar HScaleIndex = 2;\nvar MCUBlockIndex = 4;\nvar MCUWidthIndex = 8;\nvar MaxBits = 16;\nvar MaxMCUBlocks = 128;\nvar MaxSample = 255;\nvar MinComponentSize = 11;\nvar Pass1Bits = 2;\nvar Pass1Div = 2048;\nvar Pass2Div = 262144;\nvar PriorDCValueIndex = 10;\nvar RedIndex = 0;\nvar SampleOffset = 127;\nvar VScaleIndex = 3;\n\n/*** Variables ***/\nvar acTable = null;\nvar acTableSize = 0;\nvar cbBlocks = new Array(128);\nvar cbComponent = new Array(11);\nvar cbSampleStream = 0;\nvar crBlocks = new Array(128);\nvar crComponent = new Array(11);\nvar crSampleStream = 0;\nvar dcTable = null;\nvar dcTableSize = 0;\nvar ditherMask = 0;\nvar interpreterProxy = null;\nvar jpegBits = null;\nvar jpegBitsSize = 0;\nvar jpegNaturalOrder = [\n\t0, 1, 8, 16, 9, 2, 3, 10, \n\t17, 24, 32, 25, 18, 11, 4, 5, \n\t12, 19, 26, 33, 40, 48, 41, 34, \n\t27, 20, 13, 6, 7, 14, 21, 28, \n\t35, 42, 49, 56, 57, 50, 43, 36, \n\t29, 22, 15, 23, 30, 37, 44, 51, \n\t58, 59, 52, 45, 38, 31, 39, 46, \n\t53, 60, 61, 54, 47, 55, 62, 63\n];\nvar jsBitBuffer = 0;\nvar jsBitCount = 0;\nvar jsCollection = null;\nvar jsPosition = 0;\nvar jsReadLimit = 0;\nvar moduleName = \"JPEGReaderPlugin 3 November 2014 (e)\";\nvar residuals = null;\nvar yBlocks = new Array(128);\nvar yComponent = new Array(11);\nvar ySampleStream = 0;\n\n\nfunction cbColorComponentFrom(oop) {\n\treturn colorComponentfrom(cbComponent, oop) && (colorComponentBlocksfrom(cbBlocks, oop));\n}\n\nfunction colorComponentfrom(aColorComponent, oop) {\n\tif (typeof oop === \"number\") {\n\t\treturn false;\n\t}\n\tif (!interpreterProxy.isPointers(oop)) {\n\t\treturn false;\n\t}\n\tif (SIZEOF(oop) < MinComponentSize) {\n\t\treturn false;\n\t}\n\taColorComponent[CurrentXIndex] = interpreterProxy.fetchIntegerofObject(CurrentXIndex, oop);\n\taColorComponent[CurrentYIndex] = interpreterProxy.fetchIntegerofObject(CurrentYIndex, oop);\n\taColorComponent[HScaleIndex] = interpreterProxy.fetchIntegerofObject(HScaleIndex, oop);\n\taColorComponent[VScaleIndex] = interpreterProxy.fetchIntegerofObject(VScaleIndex, oop);\n\taColorComponent[BlockWidthIndex] = interpreterProxy.fetchIntegerofObject(BlockWidthIndex, oop);\n\taColorComponent[MCUWidthIndex] = interpreterProxy.fetchIntegerofObject(MCUWidthIndex, oop);\n\taColorComponent[PriorDCValueIndex] = interpreterProxy.fetchIntegerofObject(PriorDCValueIndex, oop);\n\treturn !interpreterProxy.failed();\n}\n\nfunction colorComponentBlocksfrom(blocks, oop) {\n\tvar arrayOop;\n\tvar blockOop;\n\tvar i;\n\tvar max;\n\n\tif (typeof oop === \"number\") {\n\t\treturn false;\n\t}\n\tif (!interpreterProxy.isPointers(oop)) {\n\t\treturn false;\n\t}\n\tif (SIZEOF(oop) < MinComponentSize) {\n\t\treturn false;\n\t}\n\tarrayOop = interpreterProxy.fetchPointerofObject(MCUBlockIndex, oop);\n\tif (typeof arrayOop === \"number\") {\n\t\treturn false;\n\t}\n\tif (!interpreterProxy.isPointers(arrayOop)) {\n\t\treturn false;\n\t}\n\tmax = SIZEOF(arrayOop);\n\tif (max > MaxMCUBlocks) {\n\t\treturn false;\n\t}\n\tfor (i = 0; i <= (max - 1); i++) {\n\t\tblockOop = interpreterProxy.fetchPointerofObject(i, arrayOop);\n\t\tif (typeof blockOop === \"number\") {\n\t\t\treturn false;\n\t\t}\n\t\tif (!interpreterProxy.isWords(blockOop)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (SIZEOF(blockOop) !== DCTSize2) {\n\t\t\treturn false;\n\t\t}\n\t\tblocks[i] = blockOop.wordsAsInt32Array();\n\t}\n\treturn !interpreterProxy.failed();\n}\n\nfunction colorConvertGrayscaleMCU() {\n\tvar i;\n\tvar y;\n\n\tyComponent[CurrentXIndex] = 0;\n\tyComponent[CurrentYIndex] = 0;\n\tfor (i = 0; i <= (jpegBitsSize - 1); i++) {\n\t\ty = nextSampleY();\n\t\ty += residuals[GreenIndex];\n\t\ty = Math.min(y, MaxSample);\n\t\tresiduals[GreenIndex] = (y & ditherMask);\n\t\ty = y & (MaxSample - ditherMask);\n\t\ty = Math.max(y, 1);\n\t\tjpegBits[i] = (((4278190080 + (y << 16)) + (y << 8)) + y);\n\t}\n}\n\nfunction colorConvertMCU() {\n\tvar blue;\n\tvar cb;\n\tvar cr;\n\tvar green;\n\tvar i;\n\tvar red;\n\tvar y;\n\n\tyComponent[CurrentXIndex] = 0;\n\tyComponent[CurrentYIndex] = 0;\n\tcbComponent[CurrentXIndex] = 0;\n\tcbComponent[CurrentYIndex] = 0;\n\tcrComponent[CurrentXIndex] = 0;\n\tcrComponent[CurrentYIndex] = 0;\n\tfor (i = 0; i <= (jpegBitsSize - 1); i++) {\n\t\ty = nextSampleY();\n\t\tcb = nextSampleCb();\n\t\tcb -= SampleOffset;\n\t\tcr = nextSampleCr();\n\t\tcr -= SampleOffset;\n\t\tred = (y + ((FIXn1n40200 * cr) >> 16)) + residuals[RedIndex];\n\t\tred = Math.min(red, MaxSample);\n\t\tred = Math.max(red, 0);\n\t\tresiduals[RedIndex] = (red & ditherMask);\n\t\tred = red & (MaxSample - ditherMask);\n\t\tred = Math.max(red, 1);\n\t\tgreen = ((y - ((FIXn0n34414 * cb) >> 16)) - ((FIXn0n71414 * cr) >> 16)) + residuals[GreenIndex];\n\t\tgreen = Math.min(green, MaxSample);\n\t\tgreen = Math.max(green, 0);\n\t\tresiduals[GreenIndex] = (green & ditherMask);\n\t\tgreen = green & (MaxSample - ditherMask);\n\t\tgreen = Math.max(green, 1);\n\t\tblue = (y + ((FIXn1n77200 * cb) >> 16)) + residuals[BlueIndex];\n\t\tblue = Math.min(blue, MaxSample);\n\t\tblue = Math.max(blue, 0);\n\t\tresiduals[BlueIndex] = (blue & ditherMask);\n\t\tblue = blue & (MaxSample - ditherMask);\n\t\tblue = Math.max(blue, 1);\n\t\tjpegBits[i] = (((4278190080 + (red << 16)) + (green << 8)) + blue);\n\t}\n}\n\nfunction crColorComponentFrom(oop) {\n\treturn colorComponentfrom(crComponent, oop) && (colorComponentBlocksfrom(crBlocks, oop));\n}\n\nfunction decodeBlockIntocomponent(anArray, aColorComponent) {\n\tvar bits;\n\tvar byte;\n\tvar i;\n\tvar index;\n\tvar zeroCount;\n\n\tbyte = jpegDecodeValueFromsize(dcTable, dcTableSize);\n\tif (byte < 0) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (byte !== 0) {\n\t\tbits = getBits(byte);\n\t\tbyte = scaleAndSignExtendinFieldWidth(bits, byte);\n\t}\n\tbyte = aColorComponent[PriorDCValueIndex] = (aColorComponent[PriorDCValueIndex] + byte);\n\tanArray[0] = byte;\n\tfor (i = 1; i <= (DCTSize2 - 1); i++) {\n\t\tanArray[i] = 0;\n\t}\n\tindex = 1;\n\twhile (index < DCTSize2) {\n\t\tbyte = jpegDecodeValueFromsize(acTable, acTableSize);\n\t\tif (byte < 0) {\n\t\t\treturn interpreterProxy.primitiveFail();\n\t\t}\n\t\tzeroCount = byte >>> 4;\n\t\tbyte = byte & 15;\n\t\tif (byte !== 0) {\n\t\t\tindex += zeroCount;\n\t\t\tbits = getBits(byte);\n\t\t\tbyte = scaleAndSignExtendinFieldWidth(bits, byte);\n\t\t\tif ((index < 0) || (index >= DCTSize2)) {\n\t\t\t\treturn interpreterProxy.primitiveFail();\n\t\t\t}\n\t\t\tanArray[jpegNaturalOrder[index]] = byte;\n\t\t} else {\n\t\t\tif (zeroCount === 15) {\n\t\t\t\tindex += zeroCount;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\t++index;\n\t}\n}\n\nfunction fillBuffer() {\n\tvar byte;\n\n\twhile (jsBitCount <= 16) {\n\t\tif (!(jsPosition < jsReadLimit)) {\n\t\t\treturn jsBitCount;\n\t\t}\n\t\tbyte = jsCollection[jsPosition];\n\t\t++jsPosition;\n\t\tif (byte === 255) {\n\n\t\t\t/* peek for 00 */\n\n\t\t\tif (!((jsPosition < jsReadLimit) && (jsCollection[jsPosition] === 0))) {\n\t\t\t\t--jsPosition;\n\t\t\t\treturn jsBitCount;\n\t\t\t}\n\t\t\t++jsPosition;\n\t\t}\n\t\tjsBitBuffer = (jsBitBuffer << 8) | byte;\n\t\tjsBitCount += 8;\n\t}\n\treturn jsBitCount;\n}\n\nfunction getBits(requestedBits) {\n\tvar value;\n\n\tif (requestedBits > jsBitCount) {\n\t\tfillBuffer();\n\t\tif (requestedBits > jsBitCount) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\tjsBitCount -= requestedBits;\n\tvalue = SHR(jsBitBuffer, jsBitCount);\n\tjsBitBuffer = jsBitBuffer & ((SHL(1, jsBitCount)) - 1);\n\treturn value;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nfunction getModuleName() {\n\treturn moduleName;\n}\n\nfunction halt() {\n\t;\n}\n\nfunction idctBlockIntqt(anArray, qt) {\n\tvar anACTerm;\n\tvar dcval;\n\tvar i;\n\tvar j;\n\tvar row;\n\tvar t0;\n\tvar t1;\n\tvar t10;\n\tvar t11;\n\tvar t12;\n\tvar t13;\n\tvar t2;\n\tvar t3;\n\tvar v;\n\tvar ws = new Array(64);\n\tvar z1;\n\tvar z2;\n\tvar z3;\n\tvar z4;\n\tvar z5;\n\n\t;\n\tfor (i = 0; i <= (DCTSize - 1); i++) {\n\t\tanACTerm = -1;\n\t\tfor (row = 1; row <= (DCTSize - 1); row++) {\n\t\t\tif (anACTerm === -1) {\n\t\t\t\tif (anArray[(row * DCTSize) + i] !== 0) {\n\t\t\t\t\tanACTerm = row;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (anACTerm === -1) {\n\t\t\tdcval = (anArray[i] * qt[0]) << 2;\n\t\t\tfor (j = 0; j <= (DCTSize - 1); j++) {\n\t\t\t\tws[(j * DCTSize) + i] = dcval;\n\t\t\t}\n\t\t} else {\n\t\t\tz2 = anArray[(DCTSize * 2) + i] * qt[(DCTSize * 2) + i];\n\t\t\tz3 = anArray[(DCTSize * 6) + i] * qt[(DCTSize * 6) + i];\n\t\t\tz1 = (z2 + z3) * FIXn0n541196100;\n\t\t\tt2 = z1 + (z3 * (0 - FIXn1n847759065));\n\t\t\tt3 = z1 + (z2 * FIXn0n765366865);\n\t\t\tz2 = anArray[i] * qt[i];\n\t\t\tz3 = anArray[(DCTSize * 4) + i] * qt[(DCTSize * 4) + i];\n\t\t\tt0 = (z2 + z3) << 13;\n\t\t\tt1 = (z2 - z3) << 13;\n\t\t\tt10 = t0 + t3;\n\t\t\tt13 = t0 - t3;\n\t\t\tt11 = t1 + t2;\n\t\t\tt12 = t1 - t2;\n\t\t\tt0 = anArray[(DCTSize * 7) + i] * qt[(DCTSize * 7) + i];\n\t\t\tt1 = anArray[(DCTSize * 5) + i] * qt[(DCTSize * 5) + i];\n\t\t\tt2 = anArray[(DCTSize * 3) + i] * qt[(DCTSize * 3) + i];\n\t\t\tt3 = anArray[DCTSize + i] * qt[DCTSize + i];\n\t\t\tz1 = t0 + t3;\n\t\t\tz2 = t1 + t2;\n\t\t\tz3 = t0 + t2;\n\t\t\tz4 = t1 + t3;\n\t\t\tz5 = (z3 + z4) * FIXn1n175875602;\n\t\t\tt0 = t0 * FIXn0n298631336;\n\t\t\tt1 = t1 * FIXn2n053119869;\n\t\t\tt2 = t2 * FIXn3n072711026;\n\t\t\tt3 = t3 * FIXn1n501321110;\n\t\t\tz1 = z1 * (0 - FIXn0n899976223);\n\t\t\tz2 = z2 * (0 - FIXn2n562915447);\n\t\t\tz3 = z3 * (0 - FIXn1n961570560);\n\t\t\tz4 = z4 * (0 - FIXn0n390180644);\n\t\t\tz3 += z5;\n\t\t\tz4 += z5;\n\t\t\tt0 = (t0 + z1) + z3;\n\t\t\tt1 = (t1 + z2) + z4;\n\t\t\tt2 = (t2 + z2) + z3;\n\t\t\tt3 = (t3 + z1) + z4;\n\t\t\tws[i] = ((t10 + t3) >> 11);\n\t\t\tws[(DCTSize * 7) + i] = ((t10 - t3) >> 11);\n\t\t\tws[(DCTSize * 1) + i] = ((t11 + t2) >> 11);\n\t\t\tws[(DCTSize * 6) + i] = ((t11 - t2) >> 11);\n\t\t\tws[(DCTSize * 2) + i] = ((t12 + t1) >> 11);\n\t\t\tws[(DCTSize * 5) + i] = ((t12 - t1) >> 11);\n\t\t\tws[(DCTSize * 3) + i] = ((t13 + t0) >> 11);\n\t\t\tws[(DCTSize * 4) + i] = ((t13 - t0) >> 11);\n\t\t}\n\t}\n\tfor (i = 0; i <= (DCTSize2 - DCTSize); i += DCTSize) {\n\t\tz2 = ws[i + 2];\n\t\tz3 = ws[i + 6];\n\t\tz1 = (z2 + z3) * FIXn0n541196100;\n\t\tt2 = z1 + (z3 * (0 - FIXn1n847759065));\n\t\tt3 = z1 + (z2 * FIXn0n765366865);\n\t\tt0 = (ws[i] + ws[i + 4]) << 13;\n\t\tt1 = (ws[i] - ws[i + 4]) << 13;\n\t\tt10 = t0 + t3;\n\t\tt13 = t0 - t3;\n\t\tt11 = t1 + t2;\n\t\tt12 = t1 - t2;\n\t\tt0 = ws[i + 7];\n\t\tt1 = ws[i + 5];\n\t\tt2 = ws[i + 3];\n\t\tt3 = ws[i + 1];\n\t\tz1 = t0 + t3;\n\t\tz2 = t1 + t2;\n\t\tz3 = t0 + t2;\n\t\tz4 = t1 + t3;\n\t\tz5 = (z3 + z4) * FIXn1n175875602;\n\t\tt0 = t0 * FIXn0n298631336;\n\t\tt1 = t1 * FIXn2n053119869;\n\t\tt2 = t2 * FIXn3n072711026;\n\t\tt3 = t3 * FIXn1n501321110;\n\t\tz1 = z1 * (0 - FIXn0n899976223);\n\t\tz2 = z2 * (0 - FIXn2n562915447);\n\t\tz3 = z3 * (0 - FIXn1n961570560);\n\t\tz4 = z4 * (0 - FIXn0n390180644);\n\t\tz3 += z5;\n\t\tz4 += z5;\n\t\tt0 = (t0 + z1) + z3;\n\t\tt1 = (t1 + z2) + z4;\n\t\tt2 = (t2 + z2) + z3;\n\t\tt3 = (t3 + z1) + z4;\n\t\tv = ((t10 + t3) >> 18) + SampleOffset;\n\t\tv = Math.min(v, MaxSample);\n\t\tv = Math.max(v, 0);\n\t\tanArray[i] = v;\n\t\tv = ((t10 - t3) >> 18) + SampleOffset;\n\t\tv = Math.min(v, MaxSample);\n\t\tv = Math.max(v, 0);\n\t\tanArray[i + 7] = v;\n\t\tv = ((t11 + t2) >> 18) + SampleOffset;\n\t\tv = Math.min(v, MaxSample);\n\t\tv = Math.max(v, 0);\n\t\tanArray[i + 1] = v;\n\t\tv = ((t11 - t2) >> 18) + SampleOffset;\n\t\tv = Math.min(v, MaxSample);\n\t\tv = Math.max(v, 0);\n\t\tanArray[i + 6] = v;\n\t\tv = ((t12 + t1) >> 18) + SampleOffset;\n\t\tv = Math.min(v, MaxSample);\n\t\tv = Math.max(v, 0);\n\t\tanArray[i + 2] = v;\n\t\tv = ((t12 - t1) >> 18) + SampleOffset;\n\t\tv = Math.min(v, MaxSample);\n\t\tv = Math.max(v, 0);\n\t\tanArray[i + 5] = v;\n\t\tv = ((t13 + t0) >> 18) + SampleOffset;\n\t\tv = Math.min(v, MaxSample);\n\t\tv = Math.max(v, 0);\n\t\tanArray[i + 3] = v;\n\t\tv = ((t13 - t0) >> 18) + SampleOffset;\n\t\tv = Math.min(v, MaxSample);\n\t\tv = Math.max(v, 0);\n\t\tanArray[i + 4] = v;\n\t}\n}\n\n\n/*\tDecode the next value in the receiver using the given huffman table. */\n\nfunction jpegDecodeValueFromsize(table, tableSize) {\n\tvar bits;\n\tvar bitsNeeded;\n\tvar index;\n\tvar tableIndex;\n\tvar value;\n\n\n\t/* Initial bits needed */\n\n\tbitsNeeded = table[0] >>> 24;\n\tif (bitsNeeded > MaxBits) {\n\t\treturn -1;\n\t}\n\n\t/* First real table */\n\n\ttableIndex = 2;\n\twhile (true) {\n\n\t\t/* Get bits */\n\n\t\tbits = getBits(bitsNeeded);\n\t\tif (bits < 0) {\n\t\t\treturn -1;\n\t\t}\n\t\tindex = (tableIndex + bits) - 1;\n\t\tif (index >= tableSize) {\n\t\t\treturn -1;\n\t\t}\n\n\t\t/* Lookup entry in table */\n\n\t\tvalue = table[index];\n\t\tif ((value & 1056964608) === 0) {\n\t\t\treturn value;\n\t\t}\n\n\t\t/* Table offset in low 16 bit */\n\n\t\ttableIndex = value & 65535;\n\n\t\t/* Additional bits in high 8 bit */\n\n\t\tbitsNeeded = (value >>> 24) & 255;\n\t\tif (bitsNeeded > MaxBits) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\treturn -1;\n}\n\nfunction loadJPEGStreamFrom(streamOop) {\n\tvar oop;\n\tvar sz;\n\n\tif (SIZEOF(streamOop) < 5) {\n\t\treturn false;\n\t}\n\tif (!interpreterProxy.isPointers(streamOop)) {\n\t\treturn false;\n\t}\n\toop = interpreterProxy.fetchPointerofObject(0, streamOop);\n\tif (typeof oop === \"number\") {\n\t\treturn false;\n\t}\n\tif (!interpreterProxy.isBytes(oop)) {\n\t\treturn false;\n\t}\n\tjsCollection = oop.bytes;\n\tsz = BYTESIZEOF(oop);\n\tjsPosition = interpreterProxy.fetchIntegerofObject(1, streamOop);\n\tjsReadLimit = interpreterProxy.fetchIntegerofObject(2, streamOop);\n\tjsBitBuffer = interpreterProxy.fetchIntegerofObject(3, streamOop);\n\tjsBitCount = interpreterProxy.fetchIntegerofObject(4, streamOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn false;\n\t}\n\tif (sz < jsReadLimit) {\n\t\treturn false;\n\t}\n\tif ((jsPosition < 0) || (jsPosition >= jsReadLimit)) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\nfunction nextSampleCb() {\n\tvar blockIndex;\n\tvar curX;\n\tvar dx;\n\tvar dy;\n\tvar sample;\n\tvar sampleIndex;\n\tvar sx;\n\tvar sy;\n\n\tdx = (curX = cbComponent[CurrentXIndex]);\n\tdy = cbComponent[CurrentYIndex];\n\tsx = cbComponent[HScaleIndex];\n\tsy = cbComponent[VScaleIndex];\n\tif ((sx !== 0) && (sy !== 0)) {\n\t\tdx = DIV(dx, sx);\n\t\tdy = DIV(dy, sy);\n\t}\n\tblockIndex = ((dy >>> 3) * cbComponent[BlockWidthIndex]) + (dx >>> 3);\n\tsampleIndex = ((dy & 7) << 3) + (dx & 7);\n\tsample = cbBlocks[blockIndex][sampleIndex];\n\t++curX;\n\tif (curX < (cbComponent[MCUWidthIndex] * 8)) {\n\t\tcbComponent[CurrentXIndex] = curX;\n\t} else {\n\t\tcbComponent[CurrentXIndex] = 0;\n\t\tcbComponent[CurrentYIndex]++;\n\t}\n\treturn sample;\n}\n\nfunction nextSampleCr() {\n\tvar blockIndex;\n\tvar curX;\n\tvar dx;\n\tvar dy;\n\tvar sample;\n\tvar sampleIndex;\n\tvar sx;\n\tvar sy;\n\n\tdx = (curX = crComponent[CurrentXIndex]);\n\tdy = crComponent[CurrentYIndex];\n\tsx = crComponent[HScaleIndex];\n\tsy = crComponent[VScaleIndex];\n\tif ((sx !== 0) && (sy !== 0)) {\n\t\tdx = DIV(dx, sx);\n\t\tdy = DIV(dy, sy);\n\t}\n\tblockIndex = ((dy >>> 3) * crComponent[BlockWidthIndex]) + (dx >>> 3);\n\tsampleIndex = ((dy & 7) << 3) + (dx & 7);\n\tsample = crBlocks[blockIndex][sampleIndex];\n\t++curX;\n\tif (curX < (crComponent[MCUWidthIndex] * 8)) {\n\t\tcrComponent[CurrentXIndex] = curX;\n\t} else {\n\t\tcrComponent[CurrentXIndex] = 0;\n\t\tcrComponent[CurrentYIndex]++;\n\t}\n\treturn sample;\n}\n\nfunction nextSampleY() {\n\tvar blockIndex;\n\tvar curX;\n\tvar dx;\n\tvar dy;\n\tvar sample;\n\tvar sampleIndex;\n\tvar sx;\n\tvar sy;\n\n\tdx = (curX = yComponent[CurrentXIndex]);\n\tdy = yComponent[CurrentYIndex];\n\tsx = yComponent[HScaleIndex];\n\tsy = yComponent[VScaleIndex];\n\tif ((sx !== 0) && (sy !== 0)) {\n\t\tdx = DIV(dx, sx);\n\t\tdy = DIV(dy, sy);\n\t}\n\tblockIndex = ((dy >>> 3) * yComponent[BlockWidthIndex]) + (dx >>> 3);\n\tsampleIndex = ((dy & 7) << 3) + (dx & 7);\n\tsample = yBlocks[blockIndex][sampleIndex];\n\t++curX;\n\tif (curX < (yComponent[MCUWidthIndex] * 8)) {\n\t\tyComponent[CurrentXIndex] = curX;\n\t} else {\n\t\tyComponent[CurrentXIndex] = 0;\n\t\tyComponent[CurrentYIndex]++;\n\t}\n\treturn sample;\n}\n\n\n/*\tRequires:\n\t\tJPEGColorComponent\n\t\tbits\n\t\tWordArray with: 3*Integer (residuals)\n\t\tditherMask\n\t */\n\nfunction primitiveColorConvertGrayscaleMCU() {\n\tvar arrayOop;\n\n\tstInit();\n\tif (interpreterProxy.methodArgumentCount() !== 4) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tditherMask = interpreterProxy.stackIntegerValue(0);\n\tarrayOop = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy.isWords(arrayOop) && (SIZEOF(arrayOop) === 3))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tresiduals = arrayOop.wordsAsInt32Array();\n\tarrayOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(arrayOop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tjpegBitsSize = SIZEOF(arrayOop);\n\tjpegBits = arrayOop.wordsAsInt32Array();\n\tarrayOop = interpreterProxy.stackObjectValue(3);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!yColorComponentFrom(arrayOop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tcolorConvertGrayscaleMCU();\n\tinterpreterProxy.pop(4);\n}\n\n\n/*\tRequires:\n\t\tArray with: 3*JPEGColorComponent\n\t\tbits\n\t\tWordArray with: 3*Integer (residuals)\n\t\tditherMask\n\t */\n\nfunction primitiveColorConvertMCU() {\n\tvar arrayOop;\n\n\tstInit();\n\tif (interpreterProxy.methodArgumentCount() !== 4) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tditherMask = interpreterProxy.stackIntegerValue(0);\n\tarrayOop = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy.isWords(arrayOop) && (SIZEOF(arrayOop) === 3))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tresiduals = arrayOop.wordsAsInt32Array();\n\tarrayOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(arrayOop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tjpegBitsSize = SIZEOF(arrayOop);\n\tjpegBits = arrayOop.wordsAsInt32Array();\n\tarrayOop = interpreterProxy.stackObjectValue(3);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy.isPointers(arrayOop) && (SIZEOF(arrayOop) === 3))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (!yColorComponentFrom(interpreterProxy.fetchPointerofObject(0, arrayOop))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (!cbColorComponentFrom(interpreterProxy.fetchPointerofObject(1, arrayOop))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (!crColorComponentFrom(interpreterProxy.fetchPointerofObject(2, arrayOop))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tcolorConvertMCU();\n\tinterpreterProxy.pop(4);\n}\n\n\n/*\tIn:\n\t\tanArray \t\tWordArray of: DCTSize2\n\t\taColorComponent JPEGColorComponent\n\t\tdcTable\t\t\tWordArray\n\t\tacTable\t\t\tWordArray\n\t\tstream\t\t\tJPEGStream\n\t */\n\nfunction primitiveDecodeMCU() {\n\tvar anArray;\n\tvar arrayOop;\n\tvar oop;\n\n\t;\n\tif (interpreterProxy.methodArgumentCount() !== 5) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\toop = interpreterProxy.stackObjectValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!loadJPEGStreamFrom(oop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tarrayOop = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(arrayOop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tacTableSize = SIZEOF(arrayOop);\n\tacTable = arrayOop.wordsAsInt32Array();\n\tarrayOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(arrayOop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tdcTableSize = SIZEOF(arrayOop);\n\tdcTable = arrayOop.wordsAsInt32Array();\n\toop = interpreterProxy.stackObjectValue(3);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!colorComponentfrom(yComponent, oop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tarrayOop = interpreterProxy.stackObjectValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(arrayOop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (SIZEOF(arrayOop) !== DCTSize2) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tanArray = arrayOop.wordsAsInt32Array();\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tdecodeBlockIntocomponent(anArray, yComponent);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tstoreJPEGStreamOn(interpreterProxy.stackValue(0));\n\tinterpreterProxy.storeIntegerofObjectwithValue(PriorDCValueIndex, interpreterProxy.stackValue(3), yComponent[PriorDCValueIndex]);\n\tinterpreterProxy.pop(5);\n}\n\n\n/*\tIn:\n\t\tanArray: IntegerArray new: DCTSize2\n\t\tqt: IntegerArray new: DCTSize2.\n\t */\n\nfunction primitiveIdctInt() {\n\tvar anArray;\n\tvar arrayOop;\n\tvar qt;\n\n\t;\n\tif (interpreterProxy.methodArgumentCount() !== 2) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tarrayOop = interpreterProxy.stackObjectValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy.isWords(arrayOop) && (SIZEOF(arrayOop) === DCTSize2))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tqt = arrayOop.wordsAsInt32Array();\n\tarrayOop = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy.isWords(arrayOop) && (SIZEOF(arrayOop) === DCTSize2))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tanArray = arrayOop.wordsAsInt32Array();\n\tidctBlockIntqt(anArray, qt);\n\tinterpreterProxy.pop(2);\n}\n\nfunction scaleAndSignExtendinFieldWidth(aNumber, w) {\n\tif (aNumber < (SHL(1, (w - 1)))) {\n\t\treturn (aNumber - (SHL(1, w))) + 1;\n\t} else {\n\t\treturn aNumber;\n\t}\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nfunction setInterpreter(anInterpreter) {\n\tvar ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy.majorVersion() == VM_PROXY_MAJOR;\n\tif (ok === false) {\n\t\treturn false;\n\t}\n\tok = interpreterProxy.minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nfunction stInit() {\n\t;\n}\n\nfunction storeJPEGStreamOn(streamOop) {\n\tinterpreterProxy.storeIntegerofObjectwithValue(1, streamOop, jsPosition);\n\tinterpreterProxy.storeIntegerofObjectwithValue(3, streamOop, jsBitBuffer);\n\tinterpreterProxy.storeIntegerofObjectwithValue(4, streamOop, jsBitCount);\n}\n\nfunction yColorComponentFrom(oop) {\n\treturn colorComponentfrom(yComponent, oop) && (colorComponentBlocksfrom(yBlocks, oop));\n}\n\n\nSqueak.registerExternalModule(\"JPEGReaderPlugin\", {\n\tsetInterpreter: setInterpreter,\n\tprimitiveIdctInt: primitiveIdctInt,\n\tprimitiveColorConvertMCU: primitiveColorConvertMCU,\n\tprimitiveColorConvertGrayscaleMCU: primitiveColorConvertGrayscaleMCU,\n\tprimitiveDecodeMCU: primitiveDecodeMCU,\n\tgetModuleName: getModuleName,\n});\n\n}); // end of module\n","/* Smalltalk from Squeak4.5 with VMMaker 4.13.6 translated as JS source on 3 November 2014 1:52:21 pm */\n/* Automatically generated by\n\tJSPluginCodeGenerator VMMakerJS-bf.15 uuid: fd4e10f2-3773-4e80-8bb5-c4b471a014e5\n from\n\tKedamaPlugin Kedama-Plugins-yo.1 uuid: 3fc7d691-0149-ba4d-a339-5d27cd44a2f8\n */\n\nmodule(\"users.bert.SqueakJS.plugins.KedamaPlugin\").requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\"use strict\";\n\nvar VM_PROXY_MAJOR = 1;\nvar VM_PROXY_MINOR = 11;\n\n/*** Functions ***/\nfunction CLASSOF(obj) { return typeof obj === \"number\" ? interpreterProxy.classSmallInteger() : obj.sqClass }\nfunction SIZEOF(obj) { return obj.pointers ? obj.pointers.length : obj.words ? obj.words.length : obj.bytes ? obj.bytes.length : 0 }\nfunction BYTESIZEOF(obj) { return obj.bytes ? obj.bytes.length : obj.words ? obj.words.length * 4 : 0 }\nfunction DIV(a, b) { return Math.floor(a / b) | 0; } // integer division\nfunction MOD(a, b) { return a - DIV(a, b) * b | 0; } // signed modulus\nfunction SHL(a, b) { return b > 31 ? 0 : a << b; } // fix JS shift\nfunction SHR(a, b) { return b > 31 ? 0 : a >>> b; } // fix JS shift\nfunction SHIFT(a, b) { return b < 0 ? (b < -31 ? 0 : a >>> (0-b) ) : (b > 31 ? 0 : a << b); }\n\n/*** Variables ***/\nvar interpreterProxy = null;\nvar kedamaRandomSeed = 0;\nvar moduleName = \"KedamaPlugin 3 November 2014 (e)\";\nvar randA = 0;\nvar randM = 0;\nvar randQ = 0;\nvar randR = 0;\n\n\nfunction degreesFromXy(x, y) {\n\tvar tanVal;\n\tvar theta;\n\n\t/* inline: true */;\n\tif (x === 0.0) {\n\t\tif (y >= 0.0) {\n\t\t\treturn 90.0;\n\t\t} else {\n\t\t\treturn 270.0;\n\t\t}\n\t} else {\n\t\ttanVal = y / x;\n\t\ttheta = Math.atan(tanVal);\n\t\tif (x >= 0.0) {\n\t\t\tif (y >= 0.0) {\n\t\t\t\treturn theta / 0.0174532925199433;\n\t\t\t} else {\n\t\t\t\treturn 360.0 + (theta / 0.0174532925199433);\n\t\t\t}\n\t\t} else {\n\t\t\treturn 180.0 + (theta / 0.0174532925199433);\n\t\t}\n\t}\n\treturn 0.0;\n}\n\nfunction degreesToRadians(degrees) {\n\tvar deg;\n\tvar headingRadians;\n\tvar q;\n\n\t/* inline: true */;\n\tdeg = 90.0 - degrees;\n\tq = deg / 360.0|0;\n\tif (deg < 0.0) {\n\t\t--q;\n\t}\n\theadingRadians = (deg - (q * 360.0)) * 0.0174532925199433;\n\treturn headingRadians;\n}\n\nfunction drawTurtlesInArray() {\n\tvar bitsIndex;\n\tvar colorArray;\n\tvar colorOop;\n\tvar destBits;\n\tvar destHeight;\n\tvar destOop;\n\tvar destWidth;\n\tvar i;\n\tvar size;\n\tvar visible;\n\tvar visibleArray;\n\tvar visibleOop;\n\tvar x;\n\tvar xArray;\n\tvar xOop;\n\tvar y;\n\tvar yArray;\n\tvar yOop;\n\n\t/* inline: true */;\n\tvisibleOop = interpreterProxy.stackValue(0);\n\tcolorOop = interpreterProxy.stackValue(1);\n\tyOop = interpreterProxy.stackValue(2);\n\txOop = interpreterProxy.stackValue(3);\n\tdestHeight = interpreterProxy.stackIntegerValue(4);\n\tdestWidth = interpreterProxy.stackIntegerValue(5);\n\tdestOop = interpreterProxy.stackValue(6);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(destOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(yOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(colorOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isBytes(visibleOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif ((destHeight * destWidth) !== SIZEOF(destOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(xOop);\n\tif (SIZEOF(yOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(colorOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(visibleOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\txArray = xOop.wordsAsFloat32Array();\n\tyArray = yOop.wordsAsFloat32Array();\n\tcolorArray = colorOop.words;\n\tvisibleArray = visibleOop.bytes;\n\tdestBits = destOop.words;\n\tfor (i = 0; i <= (size - 1); i++) {\n\t\tx = (xArray[i]|0);\n\t\t;\n\t\ty = (yArray[i]|0);\n\t\t;\n\t\tvisible = visibleArray[i];\n\t\tif ((visible !== 0) && (((x >= 0) && (y >= 0)) && ((x < destWidth) && (y < destHeight)))) {\n\t\t\tbitsIndex = (y * destWidth) + x;\n\t\t\tdestBits[bitsIndex] = colorArray[i];\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(7);\n}\n\nfunction getHeadingArrayInto() {\n\tvar heading;\n\tvar headingArray;\n\tvar headingOop;\n\tvar i;\n\tvar resultArray;\n\tvar resultOop;\n\tvar size;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackValue(0);\n\theadingOop = interpreterProxy.stackValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(resultOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(headingOop);\n\tif (SIZEOF(resultOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\theadingArray = headingOop.wordsAsFloat32Array();\n\tresultArray = resultOop.wordsAsFloat32Array();\n\tfor (i = 0; i <= (size - 1); i++) {\n\t\theading = headingArray[i];\n\t\theading = heading / 0.0174532925199433;\n\t\theading = 90.0 - heading;\n\t\tif (!(heading > 0.0)) {\n\t\t\theading += 360.0;\n\t\t}\n\t\tresultArray[i] = heading;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(2);\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nfunction getModuleName() {\n\treturn moduleName;\n}\n\nfunction getScalarHeading() {\n\tvar heading;\n\tvar headingArray;\n\tvar headingOop;\n\tvar index;\n\n\t/* inline: true */;\n\theadingOop = interpreterProxy.stackValue(0);\n\tindex = interpreterProxy.stackIntegerValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(headingOop) < index) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\theadingArray = headingOop.wordsAsFloat32Array();\n\theading = headingArray[index - 1];\n\theading = radiansToDegrees(heading);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(3);\n\tinterpreterProxy.pushFloat(heading);\n}\n\nfunction halt() {\n\t;\n}\n\nfunction initialiseModule() {\n\tkedamaRandomSeed = 17;\n\n\t/* magic constant = 16807 */\n\n\trandA = 16807;\n\n\t/* magic constant = 2147483647 */\n\n\trandM = 2147483647;\n\trandQ = DIV(randM, randA);\n\trandR = MOD(randM, randA);\n}\n\nfunction kedamaRandom2(range) {\n\tvar hi;\n\tvar lo;\n\tvar r;\n\tvar v;\n\tvar val;\n\n\t/* inline: true */;\n\tif (range < 0) {\n\t\tr = 0 - range;\n\t} else {\n\t\tr = range;\n\t}\n\thi = DIV(kedamaRandomSeed, randQ);\n\tlo = MOD(kedamaRandomSeed, randQ);\n\tkedamaRandomSeed = (randA * lo) - (randR * hi);\n\tv = kedamaRandomSeed & 65535;\n\tval = (v * (r + 1)) >>> 16;\n\tif (range < 0) {\n\t\treturn 0 - val;\n\t} else {\n\t\treturn val;\n\t}\n}\n\nfunction kedamaSetRandomSeed() {\n\tvar seed;\n\n\t/* inline: true */;\n\tseed = interpreterProxy.stackIntegerValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tkedamaRandomSeed = seed & 65536;\n\tinterpreterProxy.pop(1);\n}\n\nfunction makeMask() {\n\tvar alpha;\n\tvar dOrigin;\n\tvar data;\n\tvar dataBits;\n\tvar dataSize;\n\tvar highMask;\n\tvar i;\n\tvar mOrigin;\n\tvar maskBits;\n\tvar maskSize;\n\tvar pixel;\n\tvar shiftAmount;\n\n\t/* inline: true */;\n\tshiftAmount = interpreterProxy.stackIntegerValue(0);\n\tpixel = interpreterProxy.stackIntegerValue(1);\n\tmaskBits = interpreterProxy.stackValue(2);\n\tdataBits = interpreterProxy.stackValue(3);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tdataSize = SIZEOF(dataBits);\n\tmaskSize = SIZEOF(maskBits);\n\tif (dataSize !== maskSize) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (shiftAmount < -32) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (shiftAmount > 8) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tdOrigin = dataBits.words;\n\tmOrigin = maskBits.words;\n\thighMask = 4278190080;\n\tfor (i = 0; i <= (dataSize - 1); i++) {\n\t\tdata = dOrigin[i];\n\t\talpha = SHIFT(data, shiftAmount);\n\t\tif (alpha > 255) {\n\t\t\talpha = 255;\n\t\t}\n\t\tif (alpha < 0) {\n\t\t\talpha = 0;\n\t\t}\n\t\tmOrigin[i] = (((alpha << 24) & highMask) | pixel);\n\t}\n\tinterpreterProxy.pop(4);\n}\n\nfunction makeMaskLog() {\n\tvar alpha;\n\tvar dOrigin;\n\tvar data;\n\tvar dataBits;\n\tvar dataSize;\n\tvar highMask;\n\tvar i;\n\tvar mOrigin;\n\tvar maskBits;\n\tvar maskSize;\n\tvar max;\n\tvar maxFirst;\n\tvar maxLog;\n\tvar maxOop;\n\tvar pixel;\n\n\t/* inline: true */;\n\tmaxOop = interpreterProxy.stackValue(0);\n\tpixel = interpreterProxy.stackIntegerValue(1);\n\tmaskBits = interpreterProxy.stackValue(2);\n\tdataBits = interpreterProxy.stackValue(3);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tmaxFirst = maxOop.words;\n\tmax = maxFirst[0];\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tmaxLog = Math.log(max);\n\tdataSize = SIZEOF(dataBits);\n\tmaskSize = SIZEOF(maskBits);\n\tif (dataSize !== maskSize) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tdOrigin = dataBits.words;\n\tmOrigin = maskBits.words;\n\thighMask = 4278190080;\n\tfor (i = 0; i <= (dataSize - 1); i++) {\n\t\tdata = dOrigin[i];\n\t\tif (data === 0) {\n\t\t\talpha = 0;\n\t\t} else {\n\t\t\talpha = (((255.0 / maxLog) * Math.log(data))|0);\n\t\t}\n\t\tif (alpha > 255) {\n\t\t\talpha = 255;\n\t\t}\n\t\tmOrigin[i] = (((alpha << 24) & highMask) | pixel);\n\t}\n\tinterpreterProxy.pop(4);\n}\n\nfunction makeTurtlesMap() {\n\tvar height;\n\tvar index;\n\tvar map;\n\tvar mapIndex;\n\tvar mapOop;\n\tvar size;\n\tvar whoArray;\n\tvar whoOop;\n\tvar width;\n\tvar x;\n\tvar xArray;\n\tvar xOop;\n\tvar y;\n\tvar yArray;\n\tvar yOop;\n\n\t/* inline: true */;\n\theight = interpreterProxy.stackIntegerValue(0);\n\twidth = interpreterProxy.stackIntegerValue(1);\n\tyOop = interpreterProxy.stackValue(2);\n\txOop = interpreterProxy.stackValue(3);\n\twhoOop = interpreterProxy.stackValue(4);\n\tmapOop = interpreterProxy.stackValue(5);\n\tif (!interpreterProxy.isWords(yOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(whoOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(mapOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(whoOop);\n\tif (SIZEOF(xOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(yOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(mapOop) !== (height * width)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\txArray = xOop.wordsAsFloat32Array();\n\tyArray = yOop.wordsAsFloat32Array();\n\twhoArray = whoOop.words;\n\tmap = mapOop.words;\n\tfor (index = 0; index <= ((height * width) - 1); index++) {\n\t\tmap[index] = 0;\n\t}\n\tfor (index = 0; index <= (size - 1); index++) {\n\t\tx = xArray[index];\n\t\ty = yArray[index];\n\t\tmapIndex = (width * y) + x;\n\t\tif ((mapIndex >= 0) && (mapIndex < (height * width))) {\n\t\t\tmap[mapIndex] = whoArray[index];\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(6);\n}\n\nfunction primPixelAtXY() {\n\tvar bits;\n\tvar bitsOop;\n\tvar height;\n\tvar index;\n\tvar ret;\n\tvar width;\n\tvar x;\n\tvar xPos;\n\tvar y;\n\tvar yPos;\n\n\t/* inline: true */;\n\theight = interpreterProxy.stackIntegerValue(0);\n\twidth = interpreterProxy.stackIntegerValue(1);\n\tyPos = interpreterProxy.stackFloatValue(2);\n\txPos = interpreterProxy.stackFloatValue(3);\n\tbitsOop = interpreterProxy.stackValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(bitsOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(bitsOop) !== (height * width)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tx = xPos|0;\n\ty = yPos|0;\n\tbits = bitsOop.words;\n\tif ((((x >= 0) && (x < width)) && (y >= 0)) && (y < height)) {\n\t\tindex = (y * width) + x;\n\t\tret = bits[index];\n\t} else {\n\t\tret = 0;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(6);\n\tinterpreterProxy.pushInteger(ret);\n}\n\nfunction primPixelAtXYPut() {\n\tvar bits;\n\tvar bitsOop;\n\tvar height;\n\tvar index;\n\tvar v;\n\tvar value;\n\tvar width;\n\tvar x;\n\tvar xPos;\n\tvar y;\n\tvar yPos;\n\n\t/* inline: true */;\n\theight = interpreterProxy.stackIntegerValue(0);\n\twidth = interpreterProxy.stackIntegerValue(1);\n\tvalue = interpreterProxy.stackIntegerValue(2);\n\tyPos = interpreterProxy.stackFloatValue(3);\n\txPos = interpreterProxy.stackFloatValue(4);\n\tbitsOop = interpreterProxy.stackValue(5);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(bitsOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(bitsOop) !== (height * width)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tx = xPos|0;\n\ty = yPos|0;\n\tv = value;\n\tif (v > 1073741823) {\n\t\tv = 1073741823;\n\t}\n\tif (v < 0) {\n\t\tv = 0;\n\t}\n\tbits = bitsOop.words;\n\tif ((((x >= 0) && (x < width)) && (y >= 0)) && (y < height)) {\n\t\tindex = (y * width) + x;\n\t\tbits[index] = v;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(6);\n}\n\nfunction primPixelsAtXY() {\n\tvar bits;\n\tvar bitsHeight;\n\tvar bitsIndex;\n\tvar bitsOop;\n\tvar bitsWidth;\n\tvar destWords;\n\tvar destWordsOop;\n\tvar i;\n\tvar size;\n\tvar x;\n\tvar xArray;\n\tvar xArrayOop;\n\tvar y;\n\tvar yArray;\n\tvar yArrayOop;\n\n\t/* inline: true */;\n\tdestWordsOop = interpreterProxy.stackValue(0);\n\tbitsHeight = interpreterProxy.stackIntegerValue(1);\n\tbitsWidth = interpreterProxy.stackIntegerValue(2);\n\tbitsOop = interpreterProxy.stackValue(3);\n\tyArrayOop = interpreterProxy.stackValue(4);\n\txArrayOop = interpreterProxy.stackValue(5);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(destWordsOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(yArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(bitsOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif ((bitsHeight * bitsWidth) !== SIZEOF(bitsOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(xArrayOop);\n\tif (SIZEOF(yArrayOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(destWordsOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\txArray = xArrayOop.wordsAsFloat32Array();\n\tyArray = yArrayOop.wordsAsFloat32Array();\n\tdestWords = destWordsOop.words;\n\tbits = bitsOop.words;\n\tfor (i = 0; i <= (size - 1); i++) {\n\t\tx = (xArray[i]|0);\n\t\t;\n\t\ty = (yArray[i]|0);\n\t\t;\n\t\tif (((x >= 0) && (y >= 0)) && ((x < bitsWidth) && (y < bitsHeight))) {\n\t\t\tbitsIndex = (y * bitsWidth) + x;\n\t\t\tdestWords[i] = bits[bitsIndex];\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(6);\n}\n\nfunction primScalarForward() {\n\tvar bottomEdgeMode;\n\tvar destHeight;\n\tvar destWidth;\n\tvar dist;\n\tvar headingArray;\n\tvar headingOop;\n\tvar i;\n\tvar index;\n\tvar leftEdgeMode;\n\tvar newX;\n\tvar newY;\n\tvar rightEdgeMode;\n\tvar size;\n\tvar topEdgeMode;\n\tvar val;\n\tvar xArray;\n\tvar xOop;\n\tvar yArray;\n\tvar yOop;\n\n\t/* inline: true */;\n\tbottomEdgeMode = interpreterProxy.stackIntegerValue(0);\n\ttopEdgeMode = interpreterProxy.stackIntegerValue(1);\n\trightEdgeMode = interpreterProxy.stackIntegerValue(2);\n\tleftEdgeMode = interpreterProxy.stackIntegerValue(3);\n\tdestHeight = interpreterProxy.stackFloatValue(4);\n\tdestWidth = interpreterProxy.stackFloatValue(5);\n\tval = interpreterProxy.stackFloatValue(6);\n\theadingOop = interpreterProxy.stackValue(7);\n\tyOop = interpreterProxy.stackValue(8);\n\txOop = interpreterProxy.stackValue(9);\n\tindex = interpreterProxy.stackIntegerValue(10);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(yOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(xOop);\n\tif (SIZEOF(yOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(headingOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\txArray = xOop.wordsAsFloat32Array();\n\tyArray = yOop.wordsAsFloat32Array();\n\theadingArray = headingOop.wordsAsFloat32Array();\n\tdist = val;\n\ti = index - 1;\n\tnewX = xArray[i] + (dist * Math.cos(headingArray[i]));\n\tnewY = yArray[i] - (dist * Math.sin(headingArray[i]));\n\tscalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(i, xArray, headingArray, newX, destWidth, leftEdgeMode, rightEdgeMode);\n\tscalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(i, yArray, headingArray, newY, destHeight, topEdgeMode, bottomEdgeMode);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(11);\n}\n\nfunction primSetPixelsAtXY() {\n\tvar bits;\n\tvar bitsHeight;\n\tvar bitsIndex;\n\tvar bitsOop;\n\tvar bitsWidth;\n\tvar i;\n\tvar intValue;\n\tvar isValueInt;\n\tvar size;\n\tvar value;\n\tvar valueOop;\n\tvar wordsValue;\n\tvar x;\n\tvar xArray;\n\tvar xArrayOop;\n\tvar y;\n\tvar yArray;\n\tvar yArrayOop;\n\n\t/* inline: true */;\n\tvalueOop = interpreterProxy.stackValue(0);\n\tbitsHeight = interpreterProxy.stackIntegerValue(1);\n\tbitsWidth = interpreterProxy.stackIntegerValue(2);\n\tbitsOop = interpreterProxy.stackValue(3);\n\tyArrayOop = interpreterProxy.stackValue(4);\n\txArrayOop = interpreterProxy.stackValue(5);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(yArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(bitsOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif ((bitsHeight * bitsWidth) !== SIZEOF(bitsOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(xArrayOop);\n\tif (SIZEOF(yArrayOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tisValueInt = typeof valueOop === \"number\";\n\tif (isValueInt) {\n\t\tintValue = valueOop;\n\t}\n\tif (!isValueInt) {\n\t\tif (!interpreterProxy.isMemberOf(valueOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t\tif (SIZEOF(valueOop) !== size) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\txArray = xArrayOop.wordsAsFloat32Array();\n\tyArray = yArrayOop.wordsAsFloat32Array();\n\tif (!isValueInt) {\n\t\twordsValue = valueOop.words;\n\t}\n\tbits = bitsOop.words;\n\tif (isValueInt) {\n\t\tvalue = intValue;\n\t}\n\tfor (i = 0; i <= (size - 1); i++) {\n\t\tx = (xArray[i]|0);\n\t\t;\n\t\ty = (yArray[i]|0);\n\t\t;\n\t\tif (((x >= 0) && (y >= 0)) && ((x < bitsWidth) && (y < bitsHeight))) {\n\t\t\tbitsIndex = (y * bitsWidth) + x;\n\t\t\tif (!isValueInt) {\n\t\t\t\tvalue = wordsValue[i];\n\t\t\t}\n\t\t\tbits[bitsIndex] = value;\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(6);\n}\n\nfunction primTurtlesForward() {\n\tvar bottomEdgeMode;\n\tvar destHeight;\n\tvar destWidth;\n\tvar dist;\n\tvar headingArray;\n\tvar headingOop;\n\tvar i;\n\tvar isValVector;\n\tvar leftEdgeMode;\n\tvar newX;\n\tvar newY;\n\tvar rightEdgeMode;\n\tvar size;\n\tvar topEdgeMode;\n\tvar val;\n\tvar valArray;\n\tvar valOop;\n\tvar xArray;\n\tvar xOop;\n\tvar yArray;\n\tvar yOop;\n\n\t/* inline: true */;\n\tbottomEdgeMode = interpreterProxy.stackIntegerValue(0);\n\ttopEdgeMode = interpreterProxy.stackIntegerValue(1);\n\trightEdgeMode = interpreterProxy.stackIntegerValue(2);\n\tleftEdgeMode = interpreterProxy.stackIntegerValue(3);\n\tdestHeight = interpreterProxy.stackFloatValue(4);\n\tdestWidth = interpreterProxy.stackFloatValue(5);\n\tvalOop = interpreterProxy.stackValue(6);\n\theadingOop = interpreterProxy.stackValue(7);\n\tyOop = interpreterProxy.stackValue(8);\n\txOop = interpreterProxy.stackValue(9);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(yOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (valOop.isFloat) {\n\t\tisValVector = false;\n\t} else {\n\t\tif (interpreterProxy.isWords(valOop)) {\n\t\t\tisValVector = true;\n\t\t} else {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tsize = SIZEOF(xOop);\n\tif (SIZEOF(yOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(headingOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (isValVector) {\n\t\tif (SIZEOF(valOop) !== size) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\txArray = xOop.wordsAsFloat32Array();\n\tyArray = yOop.wordsAsFloat32Array();\n\theadingArray = headingOop.wordsAsFloat32Array();\n\tif (isValVector) {\n\t\tvalArray = valOop.wordsAsFloat32Array();\n\t} else {\n\t\tval = interpreterProxy.floatValueOf(valOop);\n\t}\n\tfor (i = 0; i <= (size - 1); i++) {\n\t\tif (isValVector) {\n\t\t\tdist = valArray[i];\n\t\t} else {\n\t\t\tdist = val;\n\t\t}\n\t\tnewX = xArray[i] + (dist * Math.cos(headingArray[i]));\n\t\tnewY = yArray[i] - (dist * Math.sin(headingArray[i]));\n\t\tscalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(i, xArray, headingArray, newX, destWidth, leftEdgeMode, rightEdgeMode);\n\t\tscalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(i, yArray, headingArray, newY, destHeight, topEdgeMode, bottomEdgeMode);\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(10);\n}\n\nfunction primUpHill() {\n\tvar bits;\n\tvar bitsOop;\n\tvar endX;\n\tvar endY;\n\tvar height;\n\tvar maxVal;\n\tvar maxValX;\n\tvar maxValY;\n\tvar ret;\n\tvar rowOffset;\n\tvar sniffRange;\n\tvar startX;\n\tvar startY;\n\tvar tH;\n\tvar tX;\n\tvar tY;\n\tvar thisVal;\n\tvar turtleX;\n\tvar turtleY;\n\tvar width;\n\tvar x;\n\tvar y;\n\n\t/* inline: true */;\n\tsniffRange = interpreterProxy.stackIntegerValue(0);\n\theight = interpreterProxy.stackIntegerValue(1);\n\twidth = interpreterProxy.stackIntegerValue(2);\n\tbitsOop = interpreterProxy.stackValue(3);\n\ttH = interpreterProxy.stackFloatValue(4);\n\ttY = interpreterProxy.stackFloatValue(5);\n\ttX = interpreterProxy.stackFloatValue(6);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(bitsOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(bitsOop) !== (height * width)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tbits = bitsOop.words;\n\tturtleX = tX;\n\tturtleY = tY;\n\tturtleX = Math.max(turtleX, 0);\n\tturtleY = Math.max(turtleY, 0);\n\tturtleX = Math.min(turtleX, (width - 1));\n\tturtleY = Math.min(turtleY, (height - 1));\n\tstartX = Math.max((turtleX - sniffRange), 0);\n\tendX = Math.min((turtleX + sniffRange), (width - 1));\n\tstartY = Math.max((turtleY - sniffRange), 0);\n\tendY = Math.min((turtleY + sniffRange), (height - 1));\n\tmaxVal = bits[(turtleY * width) + turtleX];\n\tmaxValX = -1;\n\tfor (y = startY; y <= endY; y++) {\n\t\trowOffset = y * width;\n\t\tfor (x = startX; x <= endX; x++) {\n\t\t\tthisVal = bits[rowOffset + x];\n\t\t\tif (thisVal > maxVal) {\n\t\t\t\tmaxValX = x;\n\t\t\t\tmaxValY = y;\n\t\t\t\tmaxVal = thisVal;\n\t\t\t}\n\t\t}\n\t}\n\tif (-1 === maxValX) {\n\t\tret = radiansToDegrees(tH);\n\t} else {\n\t\tret = degreesFromXy((maxValX - turtleX), (maxValY - turtleY)) + 90.0|0;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(8);\n\tinterpreterProxy.pushFloat(ret);\n}\n\nfunction primitiveAddArrays() {\n\tvar argOop;\n\tvar floatsArg;\n\tvar floatsRcvr;\n\tvar floatsResult;\n\tvar i;\n\tvar isArgWords;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsArg;\n\tvar wordsRcvr;\n\tvar wordsResult;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackObjectValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(argOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(argOop);\n\tinterpreterProxy.success(length === SIZEOF(rcvrOop));\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgWords = interpreterProxy.isMemberOf(argOop, \"WordArray\");\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isArgWords && isRcvrWords) {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"KedamaFloatArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (isRcvrWords) {\n\t\tif (isArgWords) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\twordsArg = argOop.words;\n\t\t\twordsResult = resultOop.words;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordsResult[i] = (wordsRcvr[i] + wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (wordsRcvr[i] + floatsArg[i]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgWords) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\twordsArg = argOop.words;\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] + wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] + floatsArg[i]);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveAddScalar() {\n\tvar argOop;\n\tvar floatArg;\n\tvar floatsRcvr;\n\tvar floatsResult;\n\tvar i;\n\tvar intArg;\n\tvar isArgInt;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsRcvr;\n\tvar wordsResult;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvrOop);\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgInt = typeof argOop === \"number\";\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isArgInt && isRcvrWords) {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"KedamaFloatArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (isRcvrWords) {\n\t\tif (isArgInt) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tintArg = argOop;\n\t\t\twordsResult = resultOop.words;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordsResult[i] = (wordsRcvr[i] + intArg);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (wordsRcvr[i] + floatArg);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgInt) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tintArg = argOop;\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] + intArg);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] + floatArg);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveDivArrays() {\n\tvar argOop;\n\tvar floatsArg;\n\tvar floatsRcvr;\n\tvar floatsResult;\n\tvar i;\n\tvar isArgWords;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsArg;\n\tvar wordsRcvr;\n\tvar wordsResult;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackObjectValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(argOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(argOop);\n\tinterpreterProxy.success(length === SIZEOF(rcvrOop));\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgWords = interpreterProxy.isMemberOf(argOop, \"WordArray\");\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isArgWords && isRcvrWords) {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"KedamaFloatArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (isRcvrWords) {\n\t\tif (isArgWords) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\twordsArg = argOop.words;\n\t\t\twordsResult = resultOop.words;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordsResult[i] = (wordsRcvr[i] / wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (wordsRcvr[i] / floatsArg[i]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgWords) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\twordsArg = argOop.words;\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] / wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] / floatsArg[i]);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveDivScalar() {\n\tvar argOop;\n\tvar floatArg;\n\tvar floatsRcvr;\n\tvar floatsResult;\n\tvar i;\n\tvar intArg;\n\tvar isArgInt;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsRcvr;\n\tvar wordsResult;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvrOop);\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgInt = typeof argOop === \"number\";\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isArgInt && isRcvrWords) {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"KedamaFloatArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (isRcvrWords) {\n\t\tif (isArgInt) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tintArg = argOop;\n\t\t\twordsResult = resultOop.words;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordsResult[i] = (DIV(wordsRcvr[i], intArg));\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (wordsRcvr[i] / floatArg);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgInt) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tintArg = argOop;\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] / intArg);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] / floatArg);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveMulArrays() {\n\tvar argOop;\n\tvar floatsArg;\n\tvar floatsRcvr;\n\tvar floatsResult;\n\tvar i;\n\tvar isArgWords;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsArg;\n\tvar wordsRcvr;\n\tvar wordsResult;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackObjectValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(argOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(argOop);\n\tinterpreterProxy.success(length === SIZEOF(rcvrOop));\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgWords = interpreterProxy.isMemberOf(argOop, \"WordArray\");\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isArgWords && isRcvrWords) {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"KedamaFloatArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (isRcvrWords) {\n\t\tif (isArgWords) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\twordsArg = argOop.words;\n\t\t\twordsResult = resultOop.words;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordsResult[i] = (wordsRcvr[i] * wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (wordsRcvr[i] * floatsArg[i]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgWords) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\twordsArg = argOop.words;\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] * wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] * floatsArg[i]);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveMulScalar() {\n\tvar argOop;\n\tvar floatArg;\n\tvar floatsRcvr;\n\tvar floatsResult;\n\tvar i;\n\tvar intArg;\n\tvar isArgInt;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsRcvr;\n\tvar wordsResult;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvrOop);\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgInt = typeof argOop === \"number\";\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isArgInt && isRcvrWords) {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"KedamaFloatArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (isRcvrWords) {\n\t\tif (isArgInt) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tintArg = argOop;\n\t\t\twordsResult = resultOop.words;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordsResult[i] = (wordsRcvr[i] * intArg);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (wordsRcvr[i] * floatArg);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgInt) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tintArg = argOop;\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] * intArg);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] * floatArg);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveSubArrays() {\n\tvar argOop;\n\tvar floatsArg;\n\tvar floatsRcvr;\n\tvar floatsResult;\n\tvar i;\n\tvar isArgWords;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsArg;\n\tvar wordsRcvr;\n\tvar wordsResult;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackObjectValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(argOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(argOop);\n\tinterpreterProxy.success(length === SIZEOF(rcvrOop));\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgWords = interpreterProxy.isMemberOf(argOop, \"WordArray\");\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isArgWords && isRcvrWords) {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"KedamaFloatArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (isRcvrWords) {\n\t\tif (isArgWords) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\twordsArg = argOop.words;\n\t\t\twordsResult = resultOop.words;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordsResult[i] = (wordsRcvr[i] - wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (wordsRcvr[i] - floatsArg[i]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgWords) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\twordsArg = argOop.words;\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] - wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] - floatsArg[i]);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveSubScalar() {\n\tvar argOop;\n\tvar floatArg;\n\tvar floatsRcvr;\n\tvar floatsResult;\n\tvar i;\n\tvar intArg;\n\tvar isArgInt;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsRcvr;\n\tvar wordsResult;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvrOop);\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgInt = typeof argOop === \"number\";\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isArgInt && isRcvrWords) {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"KedamaFloatArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (isRcvrWords) {\n\t\tif (isArgInt) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tintArg = argOop;\n\t\t\twordsResult = resultOop.words;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordsResult[i] = (wordsRcvr[i] - intArg);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (wordsRcvr[i] - floatArg);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgInt) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tintArg = argOop;\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] - intArg);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] - floatArg);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction radiansToDegrees(radians) {\n\tvar deg;\n\tvar degrees;\n\n\t/* inline: true */;\n\tdegrees = radians / 0.0174532925199433;\n\tdeg = 90.0 - degrees;\n\tif (!(deg > 0.0)) {\n\t\tdeg += 360.0;\n\t}\n\treturn deg;\n}\n\nfunction randomIntoFloatArray() {\n\tvar factor;\n\tvar floatArray;\n\tvar floatArrayOop;\n\tvar from;\n\tvar index;\n\tvar range;\n\tvar size;\n\tvar to;\n\n\t/* inline: true */;\n\tfactor = interpreterProxy.stackFloatValue(0);\n\tfloatArrayOop = interpreterProxy.stackValue(1);\n\tto = interpreterProxy.stackIntegerValue(2);\n\tfrom = interpreterProxy.stackIntegerValue(3);\n\trange = interpreterProxy.stackIntegerValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(floatArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(floatArrayOop);\n\tif (!((size >= to) && ((from >= 1) && (to >= from)))) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tfloatArray = floatArrayOop.wordsAsFloat32Array();\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tfor (index = from; index <= to; index++) {\n\t\tfloatArray[index - 1] = (kedamaRandom2(range) * factor);\n\t}\n\tinterpreterProxy.pop(5);\n}\n\nfunction randomIntoIntegerArray() {\n\tvar factor;\n\tvar from;\n\tvar index;\n\tvar integerArray;\n\tvar integerArrayOop;\n\tvar range;\n\tvar size;\n\tvar to;\n\n\t/* inline: true */;\n\tfactor = interpreterProxy.stackFloatValue(0);\n\tintegerArrayOop = interpreterProxy.stackValue(1);\n\tto = interpreterProxy.stackIntegerValue(2);\n\tfrom = interpreterProxy.stackIntegerValue(3);\n\trange = interpreterProxy.stackIntegerValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(integerArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(integerArrayOop);\n\tif (!((size >= to) && ((from >= 1) && (to >= from)))) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tintegerArray = integerArrayOop.words;\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tfor (index = from; index <= to; index++) {\n\t\tintegerArray[index - 1] = ((kedamaRandom2(range) * factor)|0);\n\t}\n\tinterpreterProxy.pop(5);\n}\n\nfunction randomRange() {\n\tvar range;\n\tvar ret;\n\n\t/* inline: true */;\n\trange = interpreterProxy.stackIntegerValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tret = kedamaRandom2(range);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(2);\n\tinterpreterProxy.pushInteger(ret);\n}\n\nfunction scalarGetAngleTo() {\n\tvar fromX;\n\tvar fromY;\n\tvar r;\n\tvar toX;\n\tvar toY;\n\tvar x;\n\tvar y;\n\n\t/* inline: true */;\n\tfromY = interpreterProxy.stackFloatValue(0);\n\tfromX = interpreterProxy.stackFloatValue(1);\n\ttoY = interpreterProxy.stackFloatValue(2);\n\ttoX = interpreterProxy.stackFloatValue(3);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tx = toX - fromX;\n\ty = toY - fromY;\n\tr = degreesFromXy(x, y);\n\tr += 90.0;\n\tif (r > 360.0) {\n\t\tr -= 360.0;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(5);\n\tinterpreterProxy.pushFloat(r);\n}\n\nfunction scalarGetDistanceTo() {\n\tvar fromX;\n\tvar fromY;\n\tvar r;\n\tvar toX;\n\tvar toY;\n\tvar x;\n\tvar y;\n\n\t/* inline: true */;\n\tfromY = interpreterProxy.stackFloatValue(0);\n\tfromX = interpreterProxy.stackFloatValue(1);\n\ttoY = interpreterProxy.stackFloatValue(2);\n\ttoX = interpreterProxy.stackFloatValue(3);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tx = fromX - toX;\n\ty = fromY - toY;\n\tr = Math.sqrt((x * x) + (y * y));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(5);\n\tinterpreterProxy.pushFloat(r);\n}\n\nfunction scalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(index, xArray, headingArray, val, destWidth, leftEdgeMode, rightEdgeMode) {\n\tvar headingRadians;\n\tvar newX;\n\n\t/* inline: true */;\n\tnewX = val;\n\tif (newX < 0.0) {\n\t\tif (leftEdgeMode === 1) {\n\n\t\t\t/* wrap */\n\n\t\t\tnewX += destWidth;\n\t\t}\n\t\tif (leftEdgeMode === 2) {\n\n\t\t\t/* stick */\n\n\t\t\tnewX = 0.0;\n\t\t}\n\t\tif (leftEdgeMode === 3) {\n\n\t\t\t/* bounce */\n\n\t\t\tnewX = 0.0 - newX;\n\t\t\theadingRadians = headingArray[index];\n\t\t\tif (headingRadians < 3.141592653589793) {\n\t\t\t\theadingArray[index] = (3.141592653589793 - headingRadians);\n\t\t\t} else {\n\t\t\t\theadingArray[index] = (9.42477796076938 - headingRadians);\n\t\t\t}\n\t\t}\n\t}\n\tif (newX >= destWidth) {\n\t\tif (rightEdgeMode === 1) {\n\t\t\tnewX -= destWidth;\n\t\t}\n\t\tif (rightEdgeMode === 2) {\n\t\t\tnewX = destWidth - 1.0e-6;\n\t\t}\n\t\tif (rightEdgeMode === 3) {\n\t\t\tnewX = (destWidth - 1.0e-6) - (newX - destWidth);\n\t\t\theadingRadians = headingArray[index];\n\t\t\tif (headingRadians < 3.141592653589793) {\n\t\t\t\theadingArray[index] = (3.141592653589793 - headingRadians);\n\t\t\t} else {\n\t\t\t\theadingArray[index] = (9.42477796076938 - headingRadians);\n\t\t\t}\n\t\t}\n\t}\n\txArray[index] = newX;\n}\n\nfunction scalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(index, yArray, headingArray, val, destHeight, topEdgeMode, bottomEdgeMode) {\n\tvar newY;\n\n\t/* inline: true */;\n\tnewY = val;\n\tif (newY < 0.0) {\n\t\tif (topEdgeMode === 1) {\n\n\t\t\t/* wrap */\n\n\t\t\tnewY += destHeight;\n\t\t}\n\t\tif (topEdgeMode === 2) {\n\n\t\t\t/* stick */\n\n\t\t\tnewY = 0.0;\n\t\t}\n\t\tif (topEdgeMode === 3) {\n\n\t\t\t/* bounce */\n\n\t\t\tnewY = 0.0 - newY;\n\t\t\theadingArray[index] = (6.283185307179586 - headingArray[index]);\n\t\t}\n\t}\n\tif (newY >= destHeight) {\n\t\tif (bottomEdgeMode === 1) {\n\t\t\tnewY -= destHeight;\n\t\t}\n\t\tif (bottomEdgeMode === 2) {\n\t\t\tnewY = destHeight - 1.0e-6;\n\t\t}\n\t\tif (bottomEdgeMode === 3) {\n\t\t\tnewY = (destHeight - 1.0e-6) - (newY - destHeight);\n\t\t\theadingArray[index] = (6.283185307179586 - headingArray[index]);\n\t\t}\n\t}\n\tyArray[index] = newY;\n}\n\nfunction setHeadingArrayFrom() {\n\tvar heading;\n\tvar headingArray;\n\tvar headingOop;\n\tvar i;\n\tvar isValVector;\n\tvar resultArray;\n\tvar resultOop;\n\tvar size;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackValue(0);\n\theadingOop = interpreterProxy.stackValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(headingOop);\n\tif (resultOop.isFloat) {\n\t\tisValVector = false;\n\t} else {\n\t\tif (interpreterProxy.isWords(resultOop)) {\n\t\t\tif (SIZEOF(resultOop) !== size) {\n\t\t\t\tinterpreterProxy.primitiveFail();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tisValVector = true;\n\t\t} else {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\theadingArray = headingOop.wordsAsFloat32Array();\n\tif (isValVector) {\n\t\tresultArray = resultOop.wordsAsFloat32Array();\n\t} else {\n\t\theading = interpreterProxy.floatValueOf(resultOop);\n\t\theading = degreesToRadians(heading);\n\t}\n\tfor (i = 0; i <= (size - 1); i++) {\n\t\tif (isValVector) {\n\t\t\theading = resultArray[i];\n\t\t\theading = degreesToRadians(heading);\n\t\t}\n\t\theadingArray[i] = heading;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(2);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nfunction setInterpreter(anInterpreter) {\n\tvar ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy.majorVersion() == VM_PROXY_MAJOR;\n\tif (ok === false) {\n\t\treturn false;\n\t}\n\tok = interpreterProxy.minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nfunction setScalarHeading() {\n\tvar heading;\n\tvar headingArray;\n\tvar headingOop;\n\tvar index;\n\n\t/* inline: true */;\n\theading = interpreterProxy.stackFloatValue(0);\n\theadingOop = interpreterProxy.stackValue(1);\n\tindex = interpreterProxy.stackIntegerValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(headingOop) < index) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\theadingArray = headingOop.wordsAsFloat32Array();\n\theadingArray[index - 1] = degreesToRadians(heading);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(3);\n}\n\nfunction shutdownModule() {\n\treturn true;\n}\n\nfunction turtleScalarSetX() {\n\tvar destWidth;\n\tvar headingArray;\n\tvar headingOop;\n\tvar leftEdgeMode;\n\tvar rightEdgeMode;\n\tvar size;\n\tvar val;\n\tvar xArray;\n\tvar xIndex;\n\tvar xOop;\n\n\t/* inline: true */;\n\trightEdgeMode = interpreterProxy.stackIntegerValue(0);\n\tleftEdgeMode = interpreterProxy.stackIntegerValue(1);\n\tdestWidth = interpreterProxy.stackFloatValue(2);\n\tval = interpreterProxy.stackFloatValue(3);\n\theadingOop = interpreterProxy.stackValue(4);\n\txIndex = interpreterProxy.stackIntegerValue(5);\n\txOop = interpreterProxy.stackValue(6);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(xOop);\n\tif (SIZEOF(headingOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\txArray = xOop.wordsAsFloat32Array();\n\theadingArray = headingOop.wordsAsFloat32Array();\n\tscalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(xIndex - 1, xArray, headingArray, val, destWidth, leftEdgeMode, rightEdgeMode);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(7);\n}\n\nfunction turtleScalarSetY() {\n\tvar bottomEdgeMode;\n\tvar destHeight;\n\tvar headingArray;\n\tvar headingOop;\n\tvar size;\n\tvar topEdgeMode;\n\tvar val;\n\tvar yArray;\n\tvar yIndex;\n\tvar yOop;\n\n\t/* inline: true */;\n\tbottomEdgeMode = interpreterProxy.stackIntegerValue(0);\n\ttopEdgeMode = interpreterProxy.stackIntegerValue(1);\n\tdestHeight = interpreterProxy.stackFloatValue(2);\n\tval = interpreterProxy.stackFloatValue(3);\n\theadingOop = interpreterProxy.stackValue(4);\n\tyIndex = interpreterProxy.stackIntegerValue(5);\n\tyOop = interpreterProxy.stackValue(6);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(yOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(yOop);\n\tif (SIZEOF(headingOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tyArray = yOop.wordsAsFloat32Array();\n\theadingArray = headingOop.wordsAsFloat32Array();\n\tscalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(yIndex - 1, yArray, headingArray, val, destHeight, topEdgeMode, bottomEdgeMode);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(7);\n}\n\nfunction turtlesSetX() {\n\tvar destWidth;\n\tvar headingArray;\n\tvar headingOop;\n\tvar i;\n\tvar isValVector;\n\tvar leftEdgeMode;\n\tvar newX;\n\tvar rightEdgeMode;\n\tvar size;\n\tvar val;\n\tvar valArray;\n\tvar valOop;\n\tvar xArray;\n\tvar xOop;\n\n\t/* inline: true */;\n\trightEdgeMode = interpreterProxy.stackIntegerValue(0);\n\tleftEdgeMode = interpreterProxy.stackIntegerValue(1);\n\tdestWidth = interpreterProxy.stackFloatValue(2);\n\tvalOop = interpreterProxy.stackValue(3);\n\theadingOop = interpreterProxy.stackValue(4);\n\txOop = interpreterProxy.stackValue(5);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (valOop.isFloat) {\n\t\tisValVector = false;\n\t} else {\n\t\tif (interpreterProxy.isWords(valOop)) {\n\t\t\tisValVector = true;\n\t\t} else {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tsize = SIZEOF(xOop);\n\tif (SIZEOF(headingOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (isValVector) {\n\t\tif (SIZEOF(valOop) !== size) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\txArray = xOop.wordsAsFloat32Array();\n\theadingArray = headingOop.wordsAsFloat32Array();\n\tif (isValVector) {\n\t\tvalArray = valOop.wordsAsFloat32Array();\n\t} else {\n\t\tval = interpreterProxy.floatValueOf(valOop);\n\t}\n\tfor (i = 0; i <= (size - 1); i++) {\n\t\tif (isValVector) {\n\t\t\tnewX = valArray[i];\n\t\t} else {\n\t\t\tnewX = val;\n\t\t}\n\t\tscalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(i, xArray, headingArray, newX, destWidth, leftEdgeMode, rightEdgeMode);\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(6);\n}\n\nfunction turtlesSetY() {\n\tvar bottomEdgeMode;\n\tvar destHeight;\n\tvar headingArray;\n\tvar headingOop;\n\tvar i;\n\tvar isValVector;\n\tvar newY;\n\tvar size;\n\tvar topEdgeMode;\n\tvar val;\n\tvar valArray;\n\tvar valOop;\n\tvar yArray;\n\tvar yOop;\n\n\t/* inline: true */;\n\tbottomEdgeMode = interpreterProxy.stackIntegerValue(0);\n\ttopEdgeMode = interpreterProxy.stackIntegerValue(1);\n\tdestHeight = interpreterProxy.stackFloatValue(2);\n\tvalOop = interpreterProxy.stackValue(3);\n\theadingOop = interpreterProxy.stackValue(4);\n\tyOop = interpreterProxy.stackValue(5);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(yOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (valOop.isFloat) {\n\t\tisValVector = false;\n\t} else {\n\t\tif (interpreterProxy.isWords(valOop)) {\n\t\t\tisValVector = true;\n\t\t} else {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tsize = SIZEOF(yOop);\n\tif (SIZEOF(headingOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (isValVector) {\n\t\tif (SIZEOF(valOop) !== size) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tyArray = yOop.wordsAsFloat32Array();\n\theadingArray = headingOop.wordsAsFloat32Array();\n\tif (isValVector) {\n\t\tvalArray = valOop.wordsAsFloat32Array();\n\t} else {\n\t\tval = interpreterProxy.floatValueOf(valOop);\n\t}\n\tfor (i = 0; i <= (size - 1); i++) {\n\t\tif (isValVector) {\n\t\t\tnewY = valArray[i];\n\t\t} else {\n\t\t\tnewY = val;\n\t\t}\n\t\tscalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(i, yArray, headingArray, newY, destHeight, topEdgeMode, bottomEdgeMode);\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(6);\n}\n\nfunction vectorGetAngleTo() {\n\tvar index;\n\tvar isVector;\n\tvar pX;\n\tvar pXOop;\n\tvar pY;\n\tvar pYOop;\n\tvar ppx;\n\tvar ppy;\n\tvar r;\n\tvar result;\n\tvar resultOop;\n\tvar size;\n\tvar x;\n\tvar xArray;\n\tvar xArrayOop;\n\tvar y;\n\tvar yArray;\n\tvar yArrayOop;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackValue(0);\n\tyArrayOop = interpreterProxy.stackValue(1);\n\txArrayOop = interpreterProxy.stackValue(2);\n\tpYOop = interpreterProxy.stackValue(3);\n\tpXOop = interpreterProxy.stackValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(resultOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(yArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(resultOop);\n\tif (size < 0) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(xArrayOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(yArrayOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (pXOop.isFloat) {\n\t\tif (pYOop.isFloat) {\n\t\t\tisVector = false;\n\t\t} else {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (pYOop.isFloat) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t} else {\n\t\t\tisVector = true;\n\t\t}\n\t}\n\tif (isVector) {\n\t\tif (SIZEOF(pXOop) !== size) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t\tif (SIZEOF(pYOop) !== size) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tresult = resultOop.wordsAsFloat32Array();\n\txArray = xArrayOop.wordsAsFloat32Array();\n\tyArray = yArrayOop.wordsAsFloat32Array();\n\tif (isVector) {\n\t\tpX = pXOop.wordsAsFloat32Array();\n\t\tpY = pYOop.wordsAsFloat32Array();\n\t}\n\tif (!isVector) {\n\t\tppx = interpreterProxy.floatValueOf(pXOop);\n\t\tppy = interpreterProxy.floatValueOf(pYOop);\n\t}\n\tfor (index = 0; index <= (size - 1); index++) {\n\t\tif (isVector) {\n\t\t\tppx = pX[index];\n\t\t\tppy = pY[index];\n\t\t}\n\t\tx = ppx - xArray[index];\n\t\ty = ppy - yArray[index];\n\t\tr = degreesFromXy(x, y);\n\t\tr += 90.0;\n\t\tif (r > 360.0) {\n\t\t\tr -= 360.0;\n\t\t}\n\t\tresult[index] = r;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(6);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction vectorGetDistanceTo() {\n\tvar index;\n\tvar isVector;\n\tvar pX;\n\tvar pXOop;\n\tvar pY;\n\tvar pYOop;\n\tvar ppx;\n\tvar ppy;\n\tvar result;\n\tvar resultOop;\n\tvar size;\n\tvar x;\n\tvar xArray;\n\tvar xArrayOop;\n\tvar y;\n\tvar yArray;\n\tvar yArrayOop;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackValue(0);\n\tyArrayOop = interpreterProxy.stackValue(1);\n\txArrayOop = interpreterProxy.stackValue(2);\n\tpYOop = interpreterProxy.stackValue(3);\n\tpXOop = interpreterProxy.stackValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(resultOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(yArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(resultOop);\n\tif (size < 0) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(xArrayOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(yArrayOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (pXOop.isFloat) {\n\t\tif (pYOop.isFloat) {\n\t\t\tisVector = false;\n\t\t} else {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (pYOop.isFloat) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t} else {\n\t\t\tisVector = true;\n\t\t}\n\t}\n\tif (isVector) {\n\t\tif (SIZEOF(pXOop) !== size) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t\tif (SIZEOF(pYOop) !== size) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tresult = resultOop.wordsAsFloat32Array();\n\txArray = xArrayOop.wordsAsFloat32Array();\n\tyArray = yArrayOop.wordsAsFloat32Array();\n\tif (isVector) {\n\t\tpX = pXOop.wordsAsFloat32Array();\n\t\tpY = pYOop.wordsAsFloat32Array();\n\t}\n\tif (!isVector) {\n\t\tppx = interpreterProxy.floatValueOf(pXOop);\n\t\tppy = interpreterProxy.floatValueOf(pYOop);\n\t}\n\tfor (index = 0; index <= (size - 1); index++) {\n\t\tif (isVector) {\n\t\t\tppx = pX[index];\n\t\t\tppy = pY[index];\n\t\t}\n\t\tx = ppx - xArray[index];\n\t\ty = ppy - yArray[index];\n\t\tresult[index] = Math.sqrt((x * x) + (y * y));\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(6);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction zoomBitmap() {\n\tvar bit;\n\tvar dOrigin;\n\tvar dst;\n\tvar dstIndex;\n\tvar dstSize;\n\tvar dummy;\n\tvar sHeight;\n\tvar sOrigin;\n\tvar sWidth;\n\tvar src;\n\tvar srcIndex;\n\tvar srcOrigin;\n\tvar srcSize;\n\tvar sx;\n\tvar sy;\n\tvar xFactor;\n\tvar y;\n\tvar yFactor;\n\n\t/* inline: true */;\n\tyFactor = interpreterProxy.stackIntegerValue(0);\n\txFactor = interpreterProxy.stackIntegerValue(1);\n\tsHeight = interpreterProxy.stackIntegerValue(2);\n\tsWidth = interpreterProxy.stackIntegerValue(3);\n\tdst = interpreterProxy.stackValue(4);\n\tsrc = interpreterProxy.stackValue(5);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tsrcSize = SIZEOF(src);\n\tdstSize = SIZEOF(dst);\n\tif ((sWidth * sHeight) !== srcSize) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (((srcSize * xFactor) * yFactor) !== dstSize) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsOrigin = src.words;\n\tdOrigin = dst.words;\n\tsrcIndex = 0;\n\tsrcOrigin = 0;\n\tdstIndex = 0;\n\tfor (sy = 0; sy <= (sHeight - 1); sy++) {\n\t\tfor (y = 0; y <= (yFactor - 1); y++) {\n\t\t\tfor (sx = 0; sx <= (sWidth - 1); sx++) {\n\t\t\t\tbit = sOrigin[srcIndex];\n\t\t\t\t++srcIndex;\n\t\t\t\tfor (dummy = 0; dummy <= (xFactor - 1); dummy++) {\n\t\t\t\t\tdOrigin[dstIndex] = bit;\n\t\t\t\t\t++dstIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsrcIndex = srcOrigin;\n\t\t}\n\t\tsrcOrigin += sWidth;\n\t\tsrcIndex = srcOrigin;\n\t}\n\tinterpreterProxy.pop(6);\n}\n\n\nSqueak.registerExternalModule(\"KedamaPlugin\", {\n\tmakeMaskLog: makeMaskLog,\n\tvectorGetDistanceTo: vectorGetDistanceTo,\n\tgetScalarHeading: getScalarHeading,\n\tshutdownModule: shutdownModule,\n\tprimitiveAddScalar: primitiveAddScalar,\n\tprimSetPixelsAtXY: primSetPixelsAtXY,\n\tturtleScalarSetX: turtleScalarSetX,\n\tprimPixelAtXY: primPixelAtXY,\n\tprimUpHill: primUpHill,\n\tprimScalarForward: primScalarForward,\n\tprimitiveDivArrays: primitiveDivArrays,\n\tgetModuleName: getModuleName,\n\tprimitiveSubArrays: primitiveSubArrays,\n\tscalarGetAngleTo: scalarGetAngleTo,\n\trandomRange: randomRange,\n\tsetInterpreter: setInterpreter,\n\tkedamaSetRandomSeed: kedamaSetRandomSeed,\n\tdrawTurtlesInArray: drawTurtlesInArray,\n\tturtleScalarSetY: turtleScalarSetY,\n\trandomIntoIntegerArray: randomIntoIntegerArray,\n\tgetHeadingArrayInto: getHeadingArrayInto,\n\tmakeTurtlesMap: makeTurtlesMap,\n\tsetHeadingArrayFrom: setHeadingArrayFrom,\n\tturtlesSetX: turtlesSetX,\n\tsetScalarHeading: setScalarHeading,\n\tmakeMask: makeMask,\n\tprimitiveDivScalar: primitiveDivScalar,\n\tprimitiveSubScalar: primitiveSubScalar,\n\tprimPixelsAtXY: primPixelsAtXY,\n\tvectorGetAngleTo: vectorGetAngleTo,\n\tprimitiveMulArrays: primitiveMulArrays,\n\tprimPixelAtXYPut: primPixelAtXYPut,\n\tzoomBitmap: zoomBitmap,\n\tinitialiseModule: initialiseModule,\n\tprimitiveAddArrays: primitiveAddArrays,\n\tscalarGetDistanceTo: scalarGetDistanceTo,\n\tturtlesSetY: turtlesSetY,\n\trandomIntoFloatArray: randomIntoFloatArray,\n\tprimTurtlesForward: primTurtlesForward,\n\tprimitiveMulScalar: primitiveMulScalar,\n});\n\n}); // end of module\n","/* Smalltalk from Squeak4.5 with VMMaker 4.13.6 translated as JS source on 13 November 2014 7:11:01 pm */\n/* Automatically generated by\n\tJSPluginCodeGenerator VMMakerJS-bf.16 uuid: aa9fd3da-7901-4c62-ae34-c166f1492d3b\n from\n\tKedamaPlugin2 Kedama-Plugins-yo.1 uuid: 3fc7d691-0149-ba4d-a339-5d27cd44a2f8\n */\n\nmodule(\"users.bert.SqueakJS.plugins.KedamaPlugin2\").requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\"use strict\";\n\nvar VM_PROXY_MAJOR = 1;\nvar VM_PROXY_MINOR = 11;\n\n/*** Functions ***/\nfunction CLASSOF(obj) { return typeof obj === \"number\" ? interpreterProxy.classSmallInteger() : obj.sqClass }\nfunction SIZEOF(obj) { return obj.pointers ? obj.pointers.length : obj.words ? obj.words.length : obj.bytes ? obj.bytes.length : 0 }\nfunction BYTESIZEOF(obj) { return obj.bytes ? obj.bytes.length : obj.words ? obj.words.length * 4 : 0 }\nfunction DIV(a, b) { return Math.floor(a / b) | 0; } // integer division\nfunction MOD(a, b) { return a - DIV(a, b) * b | 0; } // signed modulus\nfunction SHL(a, b) { return b > 31 ? 0 : a << b; } // fix JS shift\nfunction SHR(a, b) { return b > 31 ? 0 : a >>> b; } // fix JS shift\nfunction SHIFT(a, b) { return b < 0 ? (b < -31 ? 0 : a >>> (0-b) ) : (b > 31 ? 0 : a << b); }\n\n/*** Variables ***/\nvar interpreterProxy = null;\nvar kedamaRandomSeed = 0;\nvar moduleName = \"KedamaPlugin2 13 November 2014 (e)\";\nvar randA = 0;\nvar randM = 0;\nvar randQ = 0;\nvar randR = 0;\n\n\nfunction degreesFromXy(x, y) {\n\tvar tanVal;\n\tvar theta;\n\n\t/* inline: true */;\n\tif (x === 0.0) {\n\t\tif (y >= 0.0) {\n\t\t\treturn 90.0;\n\t\t} else {\n\t\t\treturn 270.0;\n\t\t}\n\t} else {\n\t\ttanVal = y / x;\n\t\ttheta = Math.atan(tanVal);\n\t\tif (x >= 0.0) {\n\t\t\tif (y >= 0.0) {\n\t\t\t\treturn theta / 0.0174532925199433;\n\t\t\t} else {\n\t\t\t\treturn 360.0 + (theta / 0.0174532925199433);\n\t\t\t}\n\t\t} else {\n\t\t\treturn 180.0 + (theta / 0.0174532925199433);\n\t\t}\n\t}\n\treturn 0.0;\n}\n\nfunction degreesToRadians(degrees) {\n\tvar deg;\n\tvar headingRadians;\n\tvar q;\n\n\t/* inline: true */;\n\tdeg = 90.0 - degrees;\n\tq = deg / 360.0|0;\n\tif (deg < 0.0) {\n\t\t--q;\n\t}\n\theadingRadians = (deg - (q * 360.0)) * 0.0174532925199433;\n\treturn headingRadians;\n}\n\nfunction drawTurtlesInArray() {\n\tvar bitsIndex;\n\tvar colorArray;\n\tvar colorOop;\n\tvar destBits;\n\tvar destHeight;\n\tvar destOop;\n\tvar destWidth;\n\tvar i;\n\tvar size;\n\tvar visible;\n\tvar visibleArray;\n\tvar visibleOop;\n\tvar x;\n\tvar xArray;\n\tvar xOop;\n\tvar y;\n\tvar yArray;\n\tvar yOop;\n\n\t/* inline: true */;\n\tvisibleOop = interpreterProxy.stackValue(0);\n\tcolorOop = interpreterProxy.stackValue(1);\n\tyOop = interpreterProxy.stackValue(2);\n\txOop = interpreterProxy.stackValue(3);\n\tdestHeight = interpreterProxy.stackIntegerValue(4);\n\tdestWidth = interpreterProxy.stackIntegerValue(5);\n\tdestOop = interpreterProxy.stackValue(6);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(destOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(yOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(colorOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isBytes(visibleOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif ((destHeight * destWidth) !== SIZEOF(destOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(xOop);\n\tif (SIZEOF(yOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(colorOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(visibleOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\txArray = xOop.wordsAsFloat32Array();\n\tyArray = yOop.wordsAsFloat32Array();\n\tcolorArray = colorOop.words;\n\tvisibleArray = visibleOop.bytes;\n\tdestBits = destOop.words;\n\tfor (i = 0; i <= (size - 1); i++) {\n\t\tx = (xArray[i]|0);\n\t\t;\n\t\ty = (yArray[i]|0);\n\t\t;\n\t\tvisible = visibleArray[i];\n\t\tif ((visible !== 0) && (((x >= 0) && (y >= 0)) && ((x < destWidth) && (y < destHeight)))) {\n\t\t\tbitsIndex = (y * destWidth) + x;\n\t\t\tdestBits[bitsIndex] = colorArray[i];\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(7);\n}\n\nfunction getHeadingArrayInto() {\n\tvar heading;\n\tvar headingArray;\n\tvar headingOop;\n\tvar i;\n\tvar resultArray;\n\tvar resultOop;\n\tvar size;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackValue(0);\n\theadingOop = interpreterProxy.stackValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(resultOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(headingOop);\n\tif (SIZEOF(resultOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\theadingArray = headingOop.wordsAsFloat32Array();\n\tresultArray = resultOop.wordsAsFloat32Array();\n\tfor (i = 0; i <= (size - 1); i++) {\n\t\theading = headingArray[i];\n\t\theading = heading / 0.0174532925199433;\n\t\theading = 90.0 - heading;\n\t\tif (!(heading > 0.0)) {\n\t\t\theading += 360.0;\n\t\t}\n\t\tresultArray[i] = heading;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(2);\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nfunction getModuleName() {\n\treturn moduleName;\n}\n\nfunction getScalarHeading() {\n\tvar heading;\n\tvar headingArray;\n\tvar headingOop;\n\tvar index;\n\n\t/* inline: true */;\n\theadingOop = interpreterProxy.stackValue(0);\n\tindex = interpreterProxy.stackIntegerValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(headingOop) < index) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\theadingArray = headingOop.wordsAsFloat32Array();\n\theading = headingArray[index - 1];\n\theading = radiansToDegrees(heading);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(3);\n\tinterpreterProxy.pushFloat(heading);\n}\n\nfunction halt() {\n\t;\n}\n\nfunction initialiseModule() {\n\tkedamaRandomSeed = 17;\n\n\t/* magic constant = 16807 */\n\n\trandA = 16807;\n\n\t/* magic constant = 2147483647 */\n\n\trandM = 2147483647;\n\trandQ = DIV(randM, randA);\n\trandR = MOD(randM, randA);\n}\n\nfunction kedamaRandom2(range) {\n\tvar hi;\n\tvar lo;\n\tvar r;\n\tvar v;\n\tvar val;\n\n\t/* inline: true */;\n\tif (range < 0) {\n\t\tr = 0 - range;\n\t} else {\n\t\tr = range;\n\t}\n\thi = DIV(kedamaRandomSeed, randQ);\n\tlo = MOD(kedamaRandomSeed, randQ);\n\tkedamaRandomSeed = (randA * lo) - (randR * hi);\n\tv = kedamaRandomSeed & 65535;\n\tval = (v * (r + 1)) >>> 16;\n\tif (range < 0) {\n\t\treturn 0 - val;\n\t} else {\n\t\treturn val;\n\t}\n}\n\nfunction kedamaSetRandomSeed() {\n\tvar seed;\n\n\t/* inline: true */;\n\tseed = interpreterProxy.stackIntegerValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tkedamaRandomSeed = seed & 65536;\n\tinterpreterProxy.pop(1);\n}\n\nfunction makeMask() {\n\tvar alpha;\n\tvar dOrigin;\n\tvar data;\n\tvar dataBits;\n\tvar dataSize;\n\tvar highMask;\n\tvar i;\n\tvar mOrigin;\n\tvar maskBits;\n\tvar maskSize;\n\tvar pixel;\n\tvar shiftAmount;\n\n\t/* inline: true */;\n\tshiftAmount = interpreterProxy.stackIntegerValue(0);\n\tpixel = interpreterProxy.stackIntegerValue(1);\n\tmaskBits = interpreterProxy.stackValue(2);\n\tdataBits = interpreterProxy.stackValue(3);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tdataSize = SIZEOF(dataBits);\n\tmaskSize = SIZEOF(maskBits);\n\tif (dataSize !== maskSize) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (shiftAmount < -32) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (shiftAmount > 8) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tdOrigin = dataBits.words;\n\tmOrigin = maskBits.words;\n\thighMask = 4278190080;\n\tfor (i = 0; i <= (dataSize - 1); i++) {\n\t\tdata = dOrigin[i];\n\t\talpha = SHIFT(data, shiftAmount);\n\t\tif (alpha > 255) {\n\t\t\talpha = 255;\n\t\t}\n\t\tif (alpha < 0) {\n\t\t\talpha = 0;\n\t\t}\n\t\tmOrigin[i] = (((alpha << 24) & highMask) | pixel);\n\t}\n\tinterpreterProxy.pop(4);\n}\n\nfunction makeMaskLog() {\n\tvar alpha;\n\tvar dOrigin;\n\tvar data;\n\tvar dataBits;\n\tvar dataSize;\n\tvar highMask;\n\tvar i;\n\tvar mOrigin;\n\tvar maskBits;\n\tvar maskSize;\n\tvar max;\n\tvar maxFirst;\n\tvar maxLog;\n\tvar maxOop;\n\tvar pixel;\n\n\t/* inline: true */;\n\tmaxOop = interpreterProxy.stackValue(0);\n\tpixel = interpreterProxy.stackIntegerValue(1);\n\tmaskBits = interpreterProxy.stackValue(2);\n\tdataBits = interpreterProxy.stackValue(3);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tmaxFirst = maxOop.words;\n\tmax = maxFirst[0];\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tmaxLog = Math.log(max);\n\tdataSize = SIZEOF(dataBits);\n\tmaskSize = SIZEOF(maskBits);\n\tif (dataSize !== maskSize) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tdOrigin = dataBits.words;\n\tmOrigin = maskBits.words;\n\thighMask = 4278190080;\n\tfor (i = 0; i <= (dataSize - 1); i++) {\n\t\tdata = dOrigin[i];\n\t\tif (data === 0) {\n\t\t\talpha = 0;\n\t\t} else {\n\t\t\talpha = (((255.0 / maxLog) * Math.log(data))|0);\n\t\t}\n\t\tif (alpha > 255) {\n\t\t\talpha = 255;\n\t\t}\n\t\tmOrigin[i] = (((alpha << 24) & highMask) | pixel);\n\t}\n\tinterpreterProxy.pop(4);\n}\n\nfunction makeTurtlesMap() {\n\tvar height;\n\tvar index;\n\tvar map;\n\tvar mapIndex;\n\tvar mapOop;\n\tvar size;\n\tvar whoArray;\n\tvar whoOop;\n\tvar width;\n\tvar x;\n\tvar xArray;\n\tvar xOop;\n\tvar y;\n\tvar yArray;\n\tvar yOop;\n\n\t/* inline: true */;\n\theight = interpreterProxy.stackIntegerValue(0);\n\twidth = interpreterProxy.stackIntegerValue(1);\n\tyOop = interpreterProxy.stackValue(2);\n\txOop = interpreterProxy.stackValue(3);\n\twhoOop = interpreterProxy.stackValue(4);\n\tmapOop = interpreterProxy.stackValue(5);\n\tif (!interpreterProxy.isWords(yOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(whoOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(mapOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(whoOop);\n\tif (SIZEOF(xOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(yOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(mapOop) !== (height * width)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\txArray = xOop.wordsAsFloat32Array();\n\tyArray = yOop.wordsAsFloat32Array();\n\twhoArray = whoOop.words;\n\tmap = mapOop.words;\n\tfor (index = 0; index <= ((height * width) - 1); index++) {\n\t\tmap[index] = 0;\n\t}\n\tfor (index = 0; index <= (size - 1); index++) {\n\t\tx = xArray[index];\n\t\ty = yArray[index];\n\t\tmapIndex = (width * y) + x;\n\t\tif ((mapIndex >= 0) && (mapIndex < (height * width))) {\n\t\t\tmap[mapIndex] = whoArray[index];\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(6);\n}\n\nfunction primPixelAtXY() {\n\tvar bits;\n\tvar bitsOop;\n\tvar height;\n\tvar index;\n\tvar ret;\n\tvar width;\n\tvar x;\n\tvar xPos;\n\tvar y;\n\tvar yPos;\n\n\t/* inline: true */;\n\theight = interpreterProxy.stackIntegerValue(0);\n\twidth = interpreterProxy.stackIntegerValue(1);\n\tyPos = interpreterProxy.stackFloatValue(2);\n\txPos = interpreterProxy.stackFloatValue(3);\n\tbitsOop = interpreterProxy.stackValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(bitsOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(bitsOop) !== (height * width)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tx = xPos|0;\n\ty = yPos|0;\n\tbits = bitsOop.words;\n\tif ((((x >= 0) && (x < width)) && (y >= 0)) && (y < height)) {\n\t\tindex = (y * width) + x;\n\t\tret = bits[index];\n\t} else {\n\t\tret = 0;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(6);\n\tinterpreterProxy.pushInteger(ret);\n}\n\nfunction primPixelAtXYPut() {\n\tvar bits;\n\tvar bitsOop;\n\tvar height;\n\tvar index;\n\tvar v;\n\tvar value;\n\tvar width;\n\tvar x;\n\tvar xPos;\n\tvar y;\n\tvar yPos;\n\n\t/* inline: true */;\n\theight = interpreterProxy.stackIntegerValue(0);\n\twidth = interpreterProxy.stackIntegerValue(1);\n\tvalue = interpreterProxy.stackIntegerValue(2);\n\tyPos = interpreterProxy.stackFloatValue(3);\n\txPos = interpreterProxy.stackFloatValue(4);\n\tbitsOop = interpreterProxy.stackValue(5);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(bitsOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(bitsOop) !== (height * width)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tx = xPos|0;\n\ty = yPos|0;\n\tv = value;\n\tif (v > 1073741823) {\n\t\tv = 1073741823;\n\t}\n\tif (v < 0) {\n\t\tv = 0;\n\t}\n\tbits = bitsOop.words;\n\tif ((((x >= 0) && (x < width)) && (y >= 0)) && (y < height)) {\n\t\tindex = (y * width) + x;\n\t\tbits[index] = v;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(6);\n}\n\nfunction primPixelsAtXY() {\n\tvar bits;\n\tvar bitsHeight;\n\tvar bitsIndex;\n\tvar bitsOop;\n\tvar bitsWidth;\n\tvar destWords;\n\tvar destWordsOop;\n\tvar i;\n\tvar size;\n\tvar x;\n\tvar xArray;\n\tvar xArrayOop;\n\tvar y;\n\tvar yArray;\n\tvar yArrayOop;\n\n\t/* inline: true */;\n\tdestWordsOop = interpreterProxy.stackValue(0);\n\tbitsHeight = interpreterProxy.stackIntegerValue(1);\n\tbitsWidth = interpreterProxy.stackIntegerValue(2);\n\tbitsOop = interpreterProxy.stackValue(3);\n\tyArrayOop = interpreterProxy.stackValue(4);\n\txArrayOop = interpreterProxy.stackValue(5);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(destWordsOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(yArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(bitsOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif ((bitsHeight * bitsWidth) !== SIZEOF(bitsOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(xArrayOop);\n\tif (SIZEOF(yArrayOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(destWordsOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\txArray = xArrayOop.wordsAsFloat32Array();\n\tyArray = yArrayOop.wordsAsFloat32Array();\n\tdestWords = destWordsOop.words;\n\tbits = bitsOop.words;\n\tfor (i = 0; i <= (size - 1); i++) {\n\t\tx = (xArray[i]|0);\n\t\t;\n\t\ty = (yArray[i]|0);\n\t\t;\n\t\tif (((x >= 0) && (y >= 0)) && ((x < bitsWidth) && (y < bitsHeight))) {\n\t\t\tbitsIndex = (y * bitsWidth) + x;\n\t\t\tdestWords[i] = bits[bitsIndex];\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(6);\n}\n\nfunction primScalarForward() {\n\tvar bottomEdgeMode;\n\tvar destHeight;\n\tvar destWidth;\n\tvar dist;\n\tvar headingArray;\n\tvar headingOop;\n\tvar i;\n\tvar index;\n\tvar leftEdgeMode;\n\tvar newX;\n\tvar newY;\n\tvar rightEdgeMode;\n\tvar size;\n\tvar topEdgeMode;\n\tvar val;\n\tvar xArray;\n\tvar xOop;\n\tvar yArray;\n\tvar yOop;\n\n\t/* inline: true */;\n\tbottomEdgeMode = interpreterProxy.stackIntegerValue(0);\n\ttopEdgeMode = interpreterProxy.stackIntegerValue(1);\n\trightEdgeMode = interpreterProxy.stackIntegerValue(2);\n\tleftEdgeMode = interpreterProxy.stackIntegerValue(3);\n\tdestHeight = interpreterProxy.stackFloatValue(4);\n\tdestWidth = interpreterProxy.stackFloatValue(5);\n\tval = interpreterProxy.stackFloatValue(6);\n\theadingOop = interpreterProxy.stackValue(7);\n\tyOop = interpreterProxy.stackValue(8);\n\txOop = interpreterProxy.stackValue(9);\n\tindex = interpreterProxy.stackIntegerValue(10);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(yOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(xOop);\n\tif (SIZEOF(yOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(headingOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\txArray = xOop.wordsAsFloat32Array();\n\tyArray = yOop.wordsAsFloat32Array();\n\theadingArray = headingOop.wordsAsFloat32Array();\n\tdist = val;\n\ti = index - 1;\n\tnewX = xArray[i] + (dist * Math.cos(headingArray[i]));\n\tnewY = yArray[i] - (dist * Math.sin(headingArray[i]));\n\tscalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(i, xArray, headingArray, newX, destWidth, leftEdgeMode, rightEdgeMode);\n\tscalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(i, yArray, headingArray, newY, destHeight, topEdgeMode, bottomEdgeMode);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(11);\n}\n\nfunction primSetPixelsAtXY() {\n\tvar bits;\n\tvar bitsHeight;\n\tvar bitsIndex;\n\tvar bitsOop;\n\tvar bitsWidth;\n\tvar floatsValue;\n\tvar fv;\n\tvar i;\n\tvar intValue;\n\tvar isValueInt;\n\tvar isValueWordArray;\n\tvar pArray;\n\tvar pArrayOop;\n\tvar size;\n\tvar value;\n\tvar valueOop;\n\tvar wordsValue;\n\tvar x;\n\tvar xArray;\n\tvar xArrayOop;\n\tvar y;\n\tvar yArray;\n\tvar yArrayOop;\n\n\t/* inline: true */;\n\tvalueOop = interpreterProxy.stackValue(0);\n\tbitsHeight = interpreterProxy.stackIntegerValue(1);\n\tbitsWidth = interpreterProxy.stackIntegerValue(2);\n\tbitsOop = interpreterProxy.stackValue(3);\n\tyArrayOop = interpreterProxy.stackValue(4);\n\txArrayOop = interpreterProxy.stackValue(5);\n\tpArrayOop = interpreterProxy.stackValue(6);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isBytes(pArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(yArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(bitsOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif ((bitsHeight * bitsWidth) !== SIZEOF(bitsOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(xArrayOop);\n\tif (SIZEOF(pArrayOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(yArrayOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tpArray = pArrayOop.bytes;\n\txArray = xArrayOop.wordsAsFloat32Array();\n\tyArray = yArrayOop.wordsAsFloat32Array();\n\tisValueInt = typeof valueOop === \"number\";\n\tif (isValueInt) {\n\t\tintValue = valueOop;\n\t\tvalue = intValue;\n\t} else {\n\t\tif (SIZEOF(valueOop) !== size) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t\tisValueWordArray = interpreterProxy.isMemberOf(valueOop, \"WordArray\");\n\t\tif (isValueWordArray) {\n\t\t\twordsValue = valueOop.words;\n\t\t} else {\n\t\t\tfloatsValue = valueOop.wordsAsFloat32Array();\n\t\t}\n\t}\n\tbits = bitsOop.words;\n\tfor (i = 0; i <= (size - 1); i++) {\n\t\tif (pArray[i] === 1) {\n\t\t\tx = (xArray[i]|0);\n\t\t\t;\n\t\t\ty = (yArray[i]|0);\n\t\t\t;\n\t\t\tif (((x >= 0) && (y >= 0)) && ((x < bitsWidth) && (y < bitsHeight))) {\n\t\t\t\tbitsIndex = (y * bitsWidth) + x;\n\t\t\t\tif (isValueInt) {\n\t\t\t\t\tbits[bitsIndex] = value;\n\t\t\t\t} else {\n\t\t\t\t\tif (isValueWordArray) {\n\t\t\t\t\t\tbits[bitsIndex] = wordsValue[i];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfv = floatsValue[i];\n\t\t\t\t\t\t;\n\t\t\t\t\t\tbits[bitsIndex] = fv;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(7);\n}\n\nfunction primTurtlesForward() {\n\tvar bottomEdgeMode;\n\tvar destHeight;\n\tvar destWidth;\n\tvar dist;\n\tvar headingArray;\n\tvar headingOop;\n\tvar i;\n\tvar isValVector;\n\tvar leftEdgeMode;\n\tvar newX;\n\tvar newY;\n\tvar pArray;\n\tvar pOop;\n\tvar rightEdgeMode;\n\tvar size;\n\tvar topEdgeMode;\n\tvar val;\n\tvar valArray;\n\tvar valOop;\n\tvar xArray;\n\tvar xOop;\n\tvar yArray;\n\tvar yOop;\n\n\t/* inline: true */;\n\tbottomEdgeMode = interpreterProxy.stackIntegerValue(0);\n\ttopEdgeMode = interpreterProxy.stackIntegerValue(1);\n\trightEdgeMode = interpreterProxy.stackIntegerValue(2);\n\tleftEdgeMode = interpreterProxy.stackIntegerValue(3);\n\tdestHeight = interpreterProxy.stackFloatValue(4);\n\tdestWidth = interpreterProxy.stackFloatValue(5);\n\tvalOop = interpreterProxy.stackValue(6);\n\theadingOop = interpreterProxy.stackValue(7);\n\tyOop = interpreterProxy.stackValue(8);\n\txOop = interpreterProxy.stackValue(9);\n\tpOop = interpreterProxy.stackValue(10);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isBytes(pOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(yOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (valOop.isFloat) {\n\t\tisValVector = false;\n\t} else {\n\t\tif (interpreterProxy.isWords(valOop)) {\n\t\t\tisValVector = true;\n\t\t} else {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tsize = SIZEOF(xOop);\n\tif (SIZEOF(yOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(headingOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(pOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (isValVector) {\n\t\tif (SIZEOF(valOop) !== size) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tpArray = pOop.bytes;\n\txArray = xOop.wordsAsFloat32Array();\n\tyArray = yOop.wordsAsFloat32Array();\n\theadingArray = headingOop.wordsAsFloat32Array();\n\tif (isValVector) {\n\t\tvalArray = valOop.wordsAsFloat32Array();\n\t} else {\n\t\tval = interpreterProxy.floatValueOf(valOop);\n\t}\n\tfor (i = 0; i <= (size - 1); i++) {\n\t\tif (pArray[i] === 1) {\n\t\t\tif (isValVector) {\n\t\t\t\tdist = valArray[i];\n\t\t\t} else {\n\t\t\t\tdist = val;\n\t\t\t}\n\t\t\tnewX = xArray[i] + (dist * Math.cos(headingArray[i]));\n\t\t\tnewY = yArray[i] - (dist * Math.sin(headingArray[i]));\n\t\t\tscalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(i, xArray, headingArray, newX, destWidth, leftEdgeMode, rightEdgeMode);\n\t\t\tscalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(i, yArray, headingArray, newY, destHeight, topEdgeMode, bottomEdgeMode);\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(11);\n}\n\nfunction primUpHill() {\n\tvar bits;\n\tvar bitsOop;\n\tvar endX;\n\tvar endY;\n\tvar height;\n\tvar maxVal;\n\tvar maxValX;\n\tvar maxValY;\n\tvar ret;\n\tvar rowOffset;\n\tvar sniffRange;\n\tvar startX;\n\tvar startY;\n\tvar tH;\n\tvar tX;\n\tvar tY;\n\tvar thisVal;\n\tvar turtleX;\n\tvar turtleY;\n\tvar width;\n\tvar x;\n\tvar y;\n\n\t/* inline: true */;\n\tsniffRange = interpreterProxy.stackIntegerValue(0);\n\theight = interpreterProxy.stackIntegerValue(1);\n\twidth = interpreterProxy.stackIntegerValue(2);\n\tbitsOop = interpreterProxy.stackValue(3);\n\ttH = interpreterProxy.stackFloatValue(4);\n\ttY = interpreterProxy.stackFloatValue(5);\n\ttX = interpreterProxy.stackFloatValue(6);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(bitsOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(bitsOop) !== (height * width)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tbits = bitsOop.words;\n\tturtleX = tX;\n\tturtleY = tY;\n\tturtleX = Math.max(turtleX, 0);\n\tturtleY = Math.max(turtleY, 0);\n\tturtleX = Math.min(turtleX, (width - 1));\n\tturtleY = Math.min(turtleY, (height - 1));\n\tstartX = Math.max((turtleX - sniffRange), 0);\n\tendX = Math.min((turtleX + sniffRange), (width - 1));\n\tstartY = Math.max((turtleY - sniffRange), 0);\n\tendY = Math.min((turtleY + sniffRange), (height - 1));\n\tmaxVal = bits[(turtleY * width) + turtleX];\n\tmaxValX = -1;\n\tfor (y = startY; y <= endY; y++) {\n\t\trowOffset = y * width;\n\t\tfor (x = startX; x <= endX; x++) {\n\t\t\tthisVal = bits[rowOffset + x];\n\t\t\tif (thisVal > maxVal) {\n\t\t\t\tmaxValX = x;\n\t\t\t\tmaxValY = y;\n\t\t\t\tmaxVal = thisVal;\n\t\t\t}\n\t\t}\n\t}\n\tif (-1 === maxValX) {\n\t\tret = radiansToDegrees(tH);\n\t} else {\n\t\tret = degreesFromXy((maxValX - turtleX), (maxValY - turtleY)) + 90.0|0;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(8);\n\tinterpreterProxy.pushFloat(ret);\n}\n\nfunction primitiveAddArrays() {\n\tvar argOop;\n\tvar floatsArg;\n\tvar floatsRcvr;\n\tvar floatsResult;\n\tvar i;\n\tvar isArgWords;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsArg;\n\tvar wordsRcvr;\n\tvar wordsResult;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackObjectValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(argOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(argOop);\n\tinterpreterProxy.success(length === SIZEOF(rcvrOop));\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgWords = interpreterProxy.isMemberOf(argOop, \"WordArray\");\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isArgWords && isRcvrWords) {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"KedamaFloatArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (isRcvrWords) {\n\t\tif (isArgWords) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\twordsArg = argOop.words;\n\t\t\twordsResult = resultOop.words;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordsResult[i] = (wordsRcvr[i] + wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (wordsRcvr[i] + floatsArg[i]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgWords) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\twordsArg = argOop.words;\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] + wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] + floatsArg[i]);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveAddScalar() {\n\tvar argOop;\n\tvar floatArg;\n\tvar floatsRcvr;\n\tvar floatsResult;\n\tvar i;\n\tvar intArg;\n\tvar isArgInt;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsRcvr;\n\tvar wordsResult;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvrOop);\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgInt = typeof argOop === \"number\";\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isArgInt && isRcvrWords) {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"KedamaFloatArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (isRcvrWords) {\n\t\tif (isArgInt) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tintArg = argOop;\n\t\t\twordsResult = resultOop.words;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordsResult[i] = (wordsRcvr[i] + intArg);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (wordsRcvr[i] + floatArg);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgInt) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tintArg = argOop;\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] + intArg);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] + floatArg);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveAndByteArray() {\n\tvar i;\n\tvar length;\n\tvar length1;\n\tvar length2;\n\tvar otherArray;\n\tvar otherOop;\n\tvar rcvrArray;\n\tvar rcvrOop;\n\n\t/* inline: true */;\n\totherOop = interpreterProxy.stackObjectValue(0);\n\trcvrOop = interpreterProxy.stackValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isBytes(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isBytes(otherOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength1 = SIZEOF(rcvrOop);\n\tlength2 = SIZEOF(otherOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = length1;\n\tif (length1 > length2) {\n\t\tlength = length2;\n\t}\n\totherArray = otherOop.bytes;\n\trcvrArray = rcvrOop.bytes;\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\trcvrArray[i] = ((rcvrArray[i] + otherArray[i]) === 2);\n\t}\n\tinterpreterProxy.pop(1);\n}\n\nfunction primitiveDivArrays() {\n\tvar argOop;\n\tvar floatsArg;\n\tvar floatsRcvr;\n\tvar floatsResult;\n\tvar i;\n\tvar isArgWords;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsArg;\n\tvar wordsRcvr;\n\tvar wordsResult;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackObjectValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(argOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(argOop);\n\tinterpreterProxy.success(length === SIZEOF(rcvrOop));\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgWords = interpreterProxy.isMemberOf(argOop, \"WordArray\");\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isArgWords && isRcvrWords) {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"KedamaFloatArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (isRcvrWords) {\n\t\tif (isArgWords) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\twordsArg = argOop.words;\n\t\t\twordsResult = resultOop.words;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordsResult[i] = (wordsRcvr[i] / wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (wordsRcvr[i] / floatsArg[i]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgWords) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\twordsArg = argOop.words;\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] / wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] / floatsArg[i]);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveDivScalar() {\n\tvar argOop;\n\tvar floatArg;\n\tvar floatsRcvr;\n\tvar floatsResult;\n\tvar i;\n\tvar intArg;\n\tvar isArgInt;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsRcvr;\n\tvar wordsResult;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvrOop);\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgInt = typeof argOop === \"number\";\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isArgInt && isRcvrWords) {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"KedamaFloatArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (isRcvrWords) {\n\t\tif (isArgInt) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tintArg = argOop;\n\t\t\twordsResult = resultOop.words;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordsResult[i] = (DIV(wordsRcvr[i], intArg));\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (wordsRcvr[i] / floatArg);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgInt) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tintArg = argOop;\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] / intArg);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] / floatArg);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveEQArrays() {\n\tvar argOop;\n\tvar bytesResult;\n\tvar floatsArg;\n\tvar floatsRcvr;\n\tvar i;\n\tvar isArgWords;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsArg;\n\tvar wordsRcvr;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackObjectValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(argOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isBytes(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(argOop);\n\tinterpreterProxy.success(length === SIZEOF(rcvrOop));\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgWords = interpreterProxy.isMemberOf(argOop, \"WordArray\");\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isRcvrWords) {\n\t\tif (isArgWords) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\twordsArg = argOop.words;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] === wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] === floatsArg[i]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgWords) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\twordsArg = argOop.words;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] === wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] === floatsArg[i]);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveEQScalar() {\n\tvar argOop;\n\tvar bytesResult;\n\tvar floatArg;\n\tvar floatsRcvr;\n\tvar i;\n\tvar intArg;\n\tvar isArgInt;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsRcvr;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isBytes(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvrOop);\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgInt = typeof argOop === \"number\";\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isRcvrWords) {\n\t\tif (isArgInt) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tintArg = argOop;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] === intArg);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] === floatArg);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgInt) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tintArg = argOop;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] === intArg);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] === floatArg);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveGEArrays() {\n\tvar argOop;\n\tvar bytesResult;\n\tvar floatsArg;\n\tvar floatsRcvr;\n\tvar i;\n\tvar isArgWords;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsArg;\n\tvar wordsRcvr;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackObjectValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(argOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isBytes(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(argOop);\n\tinterpreterProxy.success(length === SIZEOF(rcvrOop));\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgWords = interpreterProxy.isMemberOf(argOop, \"WordArray\");\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isRcvrWords) {\n\t\tif (isArgWords) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\twordsArg = argOop.words;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] >= wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] >= floatsArg[i]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgWords) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\twordsArg = argOop.words;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] >= wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] >= floatsArg[i]);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveGEScalar() {\n\tvar argOop;\n\tvar bytesResult;\n\tvar floatArg;\n\tvar floatsRcvr;\n\tvar i;\n\tvar intArg;\n\tvar isArgInt;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsRcvr;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isBytes(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvrOop);\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgInt = typeof argOop === \"number\";\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isRcvrWords) {\n\t\tif (isArgInt) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tintArg = argOop;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] >= intArg);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] >= floatArg);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgInt) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tintArg = argOop;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] >= intArg);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] >= floatArg);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveGTArrays() {\n\tvar argOop;\n\tvar bytesResult;\n\tvar floatsArg;\n\tvar floatsRcvr;\n\tvar i;\n\tvar isArgWords;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsArg;\n\tvar wordsRcvr;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackObjectValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(argOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isBytes(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(argOop);\n\tinterpreterProxy.success(length === SIZEOF(rcvrOop));\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgWords = interpreterProxy.isMemberOf(argOop, \"WordArray\");\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isRcvrWords) {\n\t\tif (isArgWords) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\twordsArg = argOop.words;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] > wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] > floatsArg[i]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgWords) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\twordsArg = argOop.words;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] > wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] > floatsArg[i]);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveGTScalar() {\n\tvar argOop;\n\tvar bytesResult;\n\tvar floatArg;\n\tvar floatsRcvr;\n\tvar i;\n\tvar intArg;\n\tvar isArgInt;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsRcvr;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isBytes(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvrOop);\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgInt = typeof argOop === \"number\";\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isRcvrWords) {\n\t\tif (isArgInt) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tintArg = argOop;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] > intArg);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] > floatArg);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgInt) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tintArg = argOop;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] > intArg);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] > floatArg);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveLEArrays() {\n\tvar argOop;\n\tvar bytesResult;\n\tvar floatsArg;\n\tvar floatsRcvr;\n\tvar i;\n\tvar isArgWords;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsArg;\n\tvar wordsRcvr;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackObjectValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(argOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isBytes(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(argOop);\n\tinterpreterProxy.success(length === SIZEOF(rcvrOop));\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgWords = interpreterProxy.isMemberOf(argOop, \"WordArray\");\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isRcvrWords) {\n\t\tif (isArgWords) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\twordsArg = argOop.words;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] <= wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] <= floatsArg[i]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgWords) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\twordsArg = argOop.words;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] <= wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] <= floatsArg[i]);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveLEScalar() {\n\tvar argOop;\n\tvar bytesResult;\n\tvar floatArg;\n\tvar floatsRcvr;\n\tvar i;\n\tvar intArg;\n\tvar isArgInt;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsRcvr;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isBytes(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvrOop);\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgInt = typeof argOop === \"number\";\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isRcvrWords) {\n\t\tif (isArgInt) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tintArg = argOop;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] <= intArg);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] <= floatArg);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgInt) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tintArg = argOop;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] <= intArg);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] <= floatArg);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveLTArrays() {\n\tvar argOop;\n\tvar bytesResult;\n\tvar floatsArg;\n\tvar floatsRcvr;\n\tvar i;\n\tvar isArgWords;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsArg;\n\tvar wordsRcvr;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackObjectValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(argOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isBytes(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(argOop);\n\tinterpreterProxy.success(length === SIZEOF(rcvrOop));\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgWords = interpreterProxy.isMemberOf(argOop, \"WordArray\");\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isRcvrWords) {\n\t\tif (isArgWords) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\twordsArg = argOop.words;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] < wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] < floatsArg[i]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgWords) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\twordsArg = argOop.words;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] < wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] < floatsArg[i]);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveLTScalar() {\n\tvar argOop;\n\tvar bytesResult;\n\tvar floatArg;\n\tvar floatsRcvr;\n\tvar i;\n\tvar intArg;\n\tvar isArgInt;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsRcvr;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isBytes(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvrOop);\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgInt = typeof argOop === \"number\";\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isRcvrWords) {\n\t\tif (isArgInt) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tintArg = argOop;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] < intArg);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] < floatArg);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgInt) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tintArg = argOop;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] < intArg);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] < floatArg);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveMulArrays() {\n\tvar argOop;\n\tvar floatsArg;\n\tvar floatsRcvr;\n\tvar floatsResult;\n\tvar i;\n\tvar isArgWords;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsArg;\n\tvar wordsRcvr;\n\tvar wordsResult;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackObjectValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(argOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(argOop);\n\tinterpreterProxy.success(length === SIZEOF(rcvrOop));\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgWords = interpreterProxy.isMemberOf(argOop, \"WordArray\");\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isArgWords && isRcvrWords) {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"KedamaFloatArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (isRcvrWords) {\n\t\tif (isArgWords) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\twordsArg = argOop.words;\n\t\t\twordsResult = resultOop.words;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordsResult[i] = (wordsRcvr[i] * wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (wordsRcvr[i] * floatsArg[i]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgWords) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\twordsArg = argOop.words;\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] * wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] * floatsArg[i]);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveMulScalar() {\n\tvar argOop;\n\tvar floatArg;\n\tvar floatsRcvr;\n\tvar floatsResult;\n\tvar i;\n\tvar intArg;\n\tvar isArgInt;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsRcvr;\n\tvar wordsResult;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvrOop);\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgInt = typeof argOop === \"number\";\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isArgInt && isRcvrWords) {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"KedamaFloatArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (isRcvrWords) {\n\t\tif (isArgInt) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tintArg = argOop;\n\t\t\twordsResult = resultOop.words;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordsResult[i] = (wordsRcvr[i] * intArg);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (wordsRcvr[i] * floatArg);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgInt) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tintArg = argOop;\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] * intArg);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] * floatArg);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveNEArrays() {\n\tvar argOop;\n\tvar bytesResult;\n\tvar floatsArg;\n\tvar floatsRcvr;\n\tvar i;\n\tvar isArgWords;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsArg;\n\tvar wordsRcvr;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackObjectValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(argOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isBytes(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(argOop);\n\tinterpreterProxy.success(length === SIZEOF(rcvrOop));\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgWords = interpreterProxy.isMemberOf(argOop, \"WordArray\");\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isRcvrWords) {\n\t\tif (isArgWords) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\twordsArg = argOop.words;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] !== wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] !== floatsArg[i]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgWords) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\twordsArg = argOop.words;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] !== wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] !== floatsArg[i]);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveNEScalar() {\n\tvar argOop;\n\tvar bytesResult;\n\tvar floatArg;\n\tvar floatsRcvr;\n\tvar i;\n\tvar intArg;\n\tvar isArgInt;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsRcvr;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isBytes(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvrOop);\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgInt = typeof argOop === \"number\";\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isRcvrWords) {\n\t\tif (isArgInt) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tintArg = argOop;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] !== intArg);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (wordsRcvr[i] !== floatArg);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgInt) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tintArg = argOop;\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] !== intArg);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tbytesResult = resultOop.bytes;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tbytesResult[i] = (floatsRcvr[i] !== floatArg);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveNotByteArray() {\n\tvar i;\n\tvar length;\n\tvar rcvrArray;\n\tvar rcvrOop;\n\n\t/* inline: true */;\n\trcvrOop = interpreterProxy.stackValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isBytes(rcvrOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvrOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\trcvrArray = rcvrOop.bytes;\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\tif (rcvrArray[i] === 0) {\n\t\t\trcvrArray[i] = 1;\n\t\t} else {\n\t\t\trcvrArray[i] = 0;\n\t\t}\n\t}\n}\n\nfunction primitiveOrByteArray() {\n\tvar i;\n\tvar length;\n\tvar length1;\n\tvar length2;\n\tvar otherArray;\n\tvar otherOop;\n\tvar rcvrArray;\n\tvar rcvrOop;\n\n\t/* inline: true */;\n\totherOop = interpreterProxy.stackObjectValue(0);\n\trcvrOop = interpreterProxy.stackValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isBytes(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isBytes(otherOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength1 = SIZEOF(rcvrOop);\n\tlength2 = SIZEOF(otherOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = length1;\n\tif (length1 > length2) {\n\t\tlength = length2;\n\t}\n\totherArray = otherOop.bytes;\n\trcvrArray = rcvrOop.bytes;\n\tfor (i = 0; i <= (length - 1); i++) {\n\t\trcvrArray[i] = ((rcvrArray[i] + otherArray[i]) > 0);\n\t}\n\tinterpreterProxy.pop(1);\n}\n\nfunction primitivePredicateAtAllPutBoolean() {\n\tvar i;\n\tvar predicates;\n\tvar predicatesOop;\n\tvar rcvrOop;\n\tvar val;\n\tvar valOop;\n\tvar values;\n\tvar valuesOop;\n\n\t/* inline: true */;\n\tvalOop = interpreterProxy.stackValue(0);\n\trcvrOop = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (interpreterProxy.isIntegerValue(valOop)) {\n\t\tval = valOop;\n\t} else {\n\t\tval = interpreterProxy.booleanValueOf(valOop);\n\t}\n\tvaluesOop = interpreterProxy.fetchPointerofObject(1, rcvrOop);\n\tpredicatesOop = interpreterProxy.fetchPointerofObject(0, rcvrOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isBytes(predicatesOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isBytes(valuesOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tvalues = valuesOop.bytes;\n\tpredicates = predicatesOop.bytes;\n\tfor (i = 0; i <= (SIZEOF(valuesOop) - 1); i++) {\n\t\tif (predicates[i] === 1) {\n\t\t\tvalues[i] = val;\n\t\t}\n\t}\n\tinterpreterProxy.pop(1);\n}\n\nfunction primitivePredicateAtAllPutColor() {\n\tvar i;\n\tvar predicates;\n\tvar predicatesOop;\n\tvar rcvrOop;\n\tvar val;\n\tvar values;\n\tvar valuesOop;\n\n\t/* inline: true */;\n\tval = interpreterProxy.stackIntegerValue(0);\n\trcvrOop = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tval = val | 4278190080;\n\tvaluesOop = interpreterProxy.fetchPointerofObject(1, rcvrOop);\n\tpredicatesOop = interpreterProxy.fetchPointerofObject(0, rcvrOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isBytes(predicatesOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(valuesOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tvalues = valuesOop.words;\n\tpredicates = predicatesOop.bytes;\n\tfor (i = 0; i <= (SIZEOF(valuesOop) - 1); i++) {\n\t\tif (predicates[i] === 1) {\n\t\t\tvalues[i] = val;\n\t\t}\n\t}\n\tinterpreterProxy.pop(1);\n}\n\nfunction primitivePredicateAtAllPutNumber() {\n\tvar i;\n\tvar predicates;\n\tvar predicatesOop;\n\tvar rcvrOop;\n\tvar val;\n\tvar values;\n\tvar valuesOop;\n\n\t/* inline: true */;\n\tval = interpreterProxy.stackFloatValue(0);\n\trcvrOop = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tvaluesOop = interpreterProxy.fetchPointerofObject(1, rcvrOop);\n\tpredicatesOop = interpreterProxy.fetchPointerofObject(0, rcvrOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isBytes(predicatesOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(valuesOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tvalues = valuesOop.wordsAsFloat32Array();\n\tpredicates = predicatesOop.bytes;\n\tfor (i = 0; i <= (SIZEOF(valuesOop) - 1); i++) {\n\t\tif (predicates[i] === 1) {\n\t\t\tvalues[i] = val;\n\t\t}\n\t}\n\tinterpreterProxy.pop(1);\n}\n\nfunction primitivePredicateAtAllPutObject() {\n\tvar i;\n\tvar predicates;\n\tvar predicatesOop;\n\tvar rcvrOop;\n\tvar valOop;\n\tvar values;\n\tvar valuesOop;\n\n\t/* inline: true */;\n\tvalOop = interpreterProxy.stackValue(0);\n\trcvrOop = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tvaluesOop = interpreterProxy.fetchPointerofObject(1, rcvrOop);\n\tpredicatesOop = interpreterProxy.fetchPointerofObject(0, rcvrOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isBytes(predicatesOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isPointers(valuesOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tvalues = valuesOop.wordsAsInt32Array();\n\tpredicates = predicatesOop.bytes;\n\tfor (i = 0; i <= (SIZEOF(valuesOop) - 1); i++) {\n\t\tif (predicates[i] === 1) {\n\t\t\tvalues[i] = valOop;\n\t\t}\n\t}\n\tinterpreterProxy.pop(1);\n}\n\nfunction primitivePredicateReplaceBytes() {\n\tvar i;\n\tvar predicates;\n\tvar predicatesOop;\n\tvar predicatesSize;\n\tvar rcvrOop;\n\tvar repOop;\n\tvar repStart;\n\tvar replacement;\n\tvar replacementSize;\n\tvar start;\n\tvar stop;\n\tvar values;\n\tvar valuesOop;\n\tvar valuesSize;\n\n\t/* inline: true */;\n\trepStart = interpreterProxy.stackIntegerValue(0);\n\trepOop = interpreterProxy.stackObjectValue(1);\n\tstop = interpreterProxy.stackIntegerValue(2);\n\tstart = interpreterProxy.stackIntegerValue(3);\n\trcvrOop = interpreterProxy.stackObjectValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tvaluesOop = interpreterProxy.fetchPointerofObject(1, rcvrOop);\n\tpredicatesOop = interpreterProxy.fetchPointerofObject(0, rcvrOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isBytes(predicatesOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy.isBytes(valuesOop) && (interpreterProxy.isBytes(repOop)))) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tvalues = valuesOop.bytes;\n\tpredicates = predicatesOop.bytes;\n\treplacement = repOop.bytes;\n\tvaluesSize = SIZEOF(valuesOop);\n\tpredicatesSize = SIZEOF(predicatesOop);\n\treplacementSize = SIZEOF(repOop);\n\tif (start > stop) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (start < 1) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (start > valuesSize) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (start > predicatesSize) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (stop > valuesSize) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (stop > predicatesSize) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (repStart < 1) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (repStart > replacementSize) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (((replacementSize - repStart) + 1) < ((stop - start) + 1)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tfor (i = (start - 1); i <= (stop - 1); i++) {\n\t\tif (predicates[i] === 1) {\n\t\t\tvalues[i] = replacement[(repStart + i) - start];\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n}\n\nfunction primitivePredicateReplaceWords() {\n\tvar floatReplacement;\n\tvar floatValues;\n\tvar fv;\n\tvar i;\n\tvar predicates;\n\tvar predicatesOop;\n\tvar predicatesSize;\n\tvar rIsFloat;\n\tvar rcvrOop;\n\tvar repOop;\n\tvar repStart;\n\tvar replacement;\n\tvar replacementSize;\n\tvar start;\n\tvar stop;\n\tvar vIsFloat;\n\tvar values;\n\tvar valuesOop;\n\tvar valuesSize;\n\n\t/* inline: true */;\n\trepStart = interpreterProxy.stackIntegerValue(0);\n\trepOop = interpreterProxy.stackObjectValue(1);\n\tstop = interpreterProxy.stackIntegerValue(2);\n\tstart = interpreterProxy.stackIntegerValue(3);\n\trcvrOop = interpreterProxy.stackObjectValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tvaluesOop = interpreterProxy.fetchPointerofObject(1, rcvrOop);\n\tpredicatesOop = interpreterProxy.fetchPointerofObject(0, rcvrOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isBytes(predicatesOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!((interpreterProxy.isWords(valuesOop) && (interpreterProxy.isWords(repOop))) || (interpreterProxy.isPointers(valuesOop) && (interpreterProxy.isPointers(repOop))))) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tpredicates = predicatesOop.bytes;\n\tvaluesSize = SIZEOF(valuesOop);\n\tpredicatesSize = SIZEOF(predicatesOop);\n\treplacementSize = SIZEOF(repOop);\n\tif (start > stop) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (start < 1) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (start > valuesSize) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (start > predicatesSize) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (stop > valuesSize) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (stop > predicatesSize) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (repStart < 1) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (repStart > replacementSize) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (((replacementSize - repStart) + 1) < ((stop - start) + 1)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tvIsFloat = interpreterProxy.isMemberOf(valuesOop, \"KedamaFloatArray\");\n\trIsFloat = interpreterProxy.isMemberOf(repOop, \"KedamaFloatArray\");\n\tif (vIsFloat && (rIsFloat)) {\n\t\tfloatValues = valuesOop.wordsAsFloat32Array();\n\t\tfloatReplacement = repOop.wordsAsFloat32Array();\n\t\tfor (i = (start - 1); i <= (stop - 1); i++) {\n\t\t\tif (predicates[i] === 1) {\n\t\t\t\tfloatValues[i] = floatReplacement[(repStart + i) - start];\n\t\t\t}\n\t\t}\n\t}\n\tif (vIsFloat && (!rIsFloat)) {\n\t\tfloatValues = valuesOop.wordsAsFloat32Array();\n\t\treplacement = repOop.words;\n\t\tfor (i = (start - 1); i <= (stop - 1); i++) {\n\t\t\tif (predicates[i] === 1) {\n\t\t\t\tfloatValues[i] = replacement[(repStart + i) - start];\n\t\t\t}\n\t\t}\n\t}\n\tif (!vIsFloat && (rIsFloat)) {\n\t\tvalues = valuesOop.words;\n\t\tfloatReplacement = repOop.wordsAsFloat32Array();\n\t\tfor (i = (start - 1); i <= (stop - 1); i++) {\n\t\t\tif (predicates[i] === 1) {\n\t\t\t\tfv = (floatReplacement[(repStart + i) - start]>>>0);\n\t\t\t\t;\n\t\t\t\tvalues[i] = fv;\n\t\t\t}\n\t\t}\n\t}\n\tif (!vIsFloat && (!rIsFloat)) {\n\t\tvalues = valuesOop.words;\n\t\treplacement = repOop.words;\n\t\tfor (i = (start - 1); i <= (stop - 1); i++) {\n\t\t\tif (predicates[i] === 1) {\n\t\t\t\tvalues[i] = replacement[(repStart + i) - start];\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n}\n\nfunction primitiveRemArrays() {\n\tvar argOop;\n\tvar floatArg;\n\tvar floatRcvr;\n\tvar floatResult;\n\tvar floatsArg;\n\tvar floatsRcvr;\n\tvar floatsResult;\n\tvar i;\n\tvar isArgWords;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordArg;\n\tvar wordRcvr;\n\tvar wordResult;\n\tvar wordsArg;\n\tvar wordsRcvr;\n\tvar wordsResult;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackObjectValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(argOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(argOop);\n\tinterpreterProxy.success(length === SIZEOF(rcvrOop));\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgWords = interpreterProxy.isMemberOf(argOop, \"WordArray\");\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isArgWords && isRcvrWords) {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"KedamaFloatArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (isRcvrWords) {\n\t\tif (isArgWords) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\twordsArg = argOop.words;\n\t\t\twordsResult = resultOop.words;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordRcvr = wordsRcvr[i];\n\t\t\t\twordArg = wordsArg[i];\n\n\t\t\t\t/* In this primitive, words are supposed to be unsigned. */\n\n\t\t\t\twordResult = MOD(wordRcvr, wordArg);\n\t\t\t\twordsResult[i] = wordResult;\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordRcvr = wordsRcvr[i];\n\t\t\t\tfloatArg = floatsArg[i];\n\t\t\t\tfloatResult = wordRcvr / floatArg;\n\t\t\t\tfloatResult = Math.floor(floatResult);\n\t\t\t\tfloatsResult[i] = (wordRcvr - (floatResult * floatArg));\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgWords) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\twordsArg = argOop.words;\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatRcvr = floatsRcvr[i];\n\t\t\t\twordArg = wordsArg[i];\n\t\t\t\tfloatResult = floatRcvr / wordArg;\n\t\t\t\tfloatResult = Math.floor(floatResult);\n\t\t\t\tfloatsResult[i] = (floatRcvr - (floatResult * wordArg));\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatRcvr = floatsRcvr[i];\n\t\t\t\tfloatArg = floatsArg[i];\n\t\t\t\tfloatResult = floatRcvr / floatArg;\n\t\t\t\tfloatResult = Math.floor(floatResult);\n\t\t\t\tfloatsResult[i] = (floatRcvr - (floatResult * floatArg));\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveRemScalar() {\n\tvar argOop;\n\tvar floatArg;\n\tvar floatRcvr;\n\tvar floatResult;\n\tvar floatsRcvr;\n\tvar floatsResult;\n\tvar i;\n\tvar intArg;\n\tvar isArgInt;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordRcvr;\n\tvar wordsRcvr;\n\tvar wordsResult;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvrOop);\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgInt = typeof argOop === \"number\";\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isArgInt && isRcvrWords) {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"KedamaFloatArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (isRcvrWords) {\n\t\tif (isArgInt) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tintArg = argOop;\n\t\t\twordsResult = resultOop.words;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordsResult[i] = (MOD(wordsRcvr[i], intArg));\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordRcvr = wordsRcvr[i];\n\t\t\t\tfloatResult = wordRcvr / floatArg;\n\t\t\t\tfloatResult = Math.floor(floatResult);\n\t\t\t\tfloatsResult[i] = (wordRcvr - (floatResult * floatArg));\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgInt) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tintArg = argOop;\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatRcvr = floatsRcvr[i];\n\t\t\t\tfloatResult = floatRcvr / intArg;\n\t\t\t\tfloatResult = Math.floor(floatResult);\n\t\t\t\tfloatsResult[i] = (floatRcvr - (floatResult * intArg));\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatRcvr = floatsRcvr[i];\n\t\t\t\tfloatResult = floatRcvr / floatArg;\n\t\t\t\tfloatResult = Math.floor(floatResult);\n\t\t\t\tfloatsResult[i] = (floatRcvr - (floatResult * floatArg));\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveSubArrays() {\n\tvar argOop;\n\tvar floatsArg;\n\tvar floatsRcvr;\n\tvar floatsResult;\n\tvar i;\n\tvar isArgWords;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsArg;\n\tvar wordsRcvr;\n\tvar wordsResult;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackObjectValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(argOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(argOop);\n\tinterpreterProxy.success(length === SIZEOF(rcvrOop));\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgWords = interpreterProxy.isMemberOf(argOop, \"WordArray\");\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isArgWords && isRcvrWords) {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"KedamaFloatArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (isRcvrWords) {\n\t\tif (isArgWords) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\twordsArg = argOop.words;\n\t\t\twordsResult = resultOop.words;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordsResult[i] = (wordsRcvr[i] - wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (wordsRcvr[i] - floatsArg[i]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgWords) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\twordsArg = argOop.words;\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] - wordsArg[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatsArg = argOop.wordsAsFloat32Array();\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] - floatsArg[i]);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction primitiveSubScalar() {\n\tvar argOop;\n\tvar floatArg;\n\tvar floatsRcvr;\n\tvar floatsResult;\n\tvar i;\n\tvar intArg;\n\tvar isArgInt;\n\tvar isRcvrWords;\n\tvar length;\n\tvar rcvrOop;\n\tvar resultOop;\n\tvar wordsRcvr;\n\tvar wordsResult;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackObjectValue(0);\n\targOop = interpreterProxy.stackValue(1);\n\trcvrOop = interpreterProxy.stackObjectValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success(interpreterProxy.isWords(rcvrOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlength = SIZEOF(rcvrOop);\n\tinterpreterProxy.success(length === SIZEOF(resultOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisArgInt = typeof argOop === \"number\";\n\tisRcvrWords = interpreterProxy.isMemberOf(rcvrOop, \"WordArray\");\n\tif (isArgInt && isRcvrWords) {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"WordArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (!interpreterProxy.isMemberOf(resultOop, \"KedamaFloatArray\")) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (isRcvrWords) {\n\t\tif (isArgInt) {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tintArg = argOop;\n\t\t\twordsResult = resultOop.words;\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\twordsResult[i] = (wordsRcvr[i] - intArg);\n\t\t\t}\n\t\t} else {\n\t\t\twordsRcvr = rcvrOop.words;\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (wordsRcvr[i] - floatArg);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (isArgInt) {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tintArg = argOop;\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] - intArg);\n\t\t\t}\n\t\t} else {\n\t\t\tfloatsRcvr = rcvrOop.wordsAsFloat32Array();\n\t\t\tfloatArg = interpreterProxy.floatValueOf(argOop);\n\t\t\tfloatsResult = resultOop.wordsAsFloat32Array();\n\t\t\tfor (i = 0; i <= (length - 1); i++) {\n\t\t\t\tfloatsResult[i] = (floatsRcvr[i] - floatArg);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction radiansToDegrees(radians) {\n\tvar deg;\n\tvar degrees;\n\n\t/* inline: true */;\n\tdegrees = radians / 0.0174532925199433;\n\tdeg = 90.0 - degrees;\n\tif (!(deg > 0.0)) {\n\t\tdeg += 360.0;\n\t}\n\treturn deg;\n}\n\nfunction randomIntoFloatArray() {\n\tvar factor;\n\tvar floatArray;\n\tvar floatArrayOop;\n\tvar from;\n\tvar index;\n\tvar range;\n\tvar size;\n\tvar to;\n\n\t/* inline: true */;\n\tfactor = interpreterProxy.stackFloatValue(0);\n\tfloatArrayOop = interpreterProxy.stackValue(1);\n\tto = interpreterProxy.stackIntegerValue(2);\n\tfrom = interpreterProxy.stackIntegerValue(3);\n\trange = interpreterProxy.stackIntegerValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(floatArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(floatArrayOop);\n\tif (!((size >= to) && ((from >= 1) && (to >= from)))) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tfloatArray = floatArrayOop.wordsAsFloat32Array();\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tfor (index = from; index <= to; index++) {\n\t\tfloatArray[index - 1] = (kedamaRandom2(range) * factor);\n\t}\n\tinterpreterProxy.pop(5);\n}\n\nfunction randomIntoIntegerArray() {\n\tvar factor;\n\tvar from;\n\tvar index;\n\tvar integerArray;\n\tvar integerArrayOop;\n\tvar range;\n\tvar size;\n\tvar to;\n\n\t/* inline: true */;\n\tfactor = interpreterProxy.stackFloatValue(0);\n\tintegerArrayOop = interpreterProxy.stackValue(1);\n\tto = interpreterProxy.stackIntegerValue(2);\n\tfrom = interpreterProxy.stackIntegerValue(3);\n\trange = interpreterProxy.stackIntegerValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(integerArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(integerArrayOop);\n\tif (!((size >= to) && ((from >= 1) && (to >= from)))) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tintegerArray = integerArrayOop.words;\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tfor (index = from; index <= to; index++) {\n\t\tintegerArray[index - 1] = ((kedamaRandom2(range) * factor)|0);\n\t}\n\tinterpreterProxy.pop(5);\n}\n\nfunction randomRange() {\n\tvar range;\n\tvar ret;\n\n\t/* inline: true */;\n\trange = interpreterProxy.stackIntegerValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tret = kedamaRandom2(range);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(2);\n\tinterpreterProxy.pushInteger(ret);\n}\n\nfunction scalarGetAngleTo() {\n\tvar fromX;\n\tvar fromY;\n\tvar r;\n\tvar toX;\n\tvar toY;\n\tvar x;\n\tvar y;\n\n\t/* inline: true */;\n\tfromY = interpreterProxy.stackFloatValue(0);\n\tfromX = interpreterProxy.stackFloatValue(1);\n\ttoY = interpreterProxy.stackFloatValue(2);\n\ttoX = interpreterProxy.stackFloatValue(3);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tx = toX - fromX;\n\ty = toY - fromY;\n\tr = degreesFromXy(x, y);\n\tr += 90.0;\n\tif (r > 360.0) {\n\t\tr -= 360.0;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(5);\n\tinterpreterProxy.pushFloat(r);\n}\n\nfunction scalarGetDistanceTo() {\n\tvar fromX;\n\tvar fromY;\n\tvar r;\n\tvar toX;\n\tvar toY;\n\tvar x;\n\tvar y;\n\n\t/* inline: true */;\n\tfromY = interpreterProxy.stackFloatValue(0);\n\tfromX = interpreterProxy.stackFloatValue(1);\n\ttoY = interpreterProxy.stackFloatValue(2);\n\ttoX = interpreterProxy.stackFloatValue(3);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tx = fromX - toX;\n\ty = fromY - toY;\n\tr = Math.sqrt((x * x) + (y * y));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(5);\n\tinterpreterProxy.pushFloat(r);\n}\n\nfunction scalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(index, xArray, headingArray, val, destWidth, leftEdgeMode, rightEdgeMode) {\n\tvar headingRadians;\n\tvar newX;\n\n\t/* inline: true */;\n\tnewX = val;\n\tif (newX < 0.0) {\n\t\tif (leftEdgeMode === 1) {\n\n\t\t\t/* wrap */\n\n\t\t\tnewX += destWidth;\n\t\t}\n\t\tif (leftEdgeMode === 2) {\n\n\t\t\t/* stick */\n\n\t\t\tnewX = 0.0;\n\t\t}\n\t\tif (leftEdgeMode === 3) {\n\n\t\t\t/* bounce */\n\n\t\t\tnewX = 0.0 - newX;\n\t\t\theadingRadians = headingArray[index];\n\t\t\tif (headingRadians < 3.141592653589793) {\n\t\t\t\theadingArray[index] = (3.141592653589793 - headingRadians);\n\t\t\t} else {\n\t\t\t\theadingArray[index] = (9.42477796076938 - headingRadians);\n\t\t\t}\n\t\t}\n\t}\n\tif (newX >= destWidth) {\n\t\tif (rightEdgeMode === 1) {\n\t\t\tnewX -= destWidth;\n\t\t}\n\t\tif (rightEdgeMode === 2) {\n\t\t\tnewX = destWidth - 1.0e-6;\n\t\t}\n\t\tif (rightEdgeMode === 3) {\n\t\t\tnewX = (destWidth - 1.0e-6) - (newX - destWidth);\n\t\t\theadingRadians = headingArray[index];\n\t\t\tif (headingRadians < 3.141592653589793) {\n\t\t\t\theadingArray[index] = (3.141592653589793 - headingRadians);\n\t\t\t} else {\n\t\t\t\theadingArray[index] = (9.42477796076938 - headingRadians);\n\t\t\t}\n\t\t}\n\t}\n\txArray[index] = newX;\n}\n\nfunction scalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(index, yArray, headingArray, val, destHeight, topEdgeMode, bottomEdgeMode) {\n\tvar newY;\n\n\t/* inline: true */;\n\tnewY = val;\n\tif (newY < 0.0) {\n\t\tif (topEdgeMode === 1) {\n\n\t\t\t/* wrap */\n\n\t\t\tnewY += destHeight;\n\t\t}\n\t\tif (topEdgeMode === 2) {\n\n\t\t\t/* stick */\n\n\t\t\tnewY = 0.0;\n\t\t}\n\t\tif (topEdgeMode === 3) {\n\n\t\t\t/* bounce */\n\n\t\t\tnewY = 0.0 - newY;\n\t\t\theadingArray[index] = (6.283185307179586 - headingArray[index]);\n\t\t}\n\t}\n\tif (newY >= destHeight) {\n\t\tif (bottomEdgeMode === 1) {\n\t\t\tnewY -= destHeight;\n\t\t}\n\t\tif (bottomEdgeMode === 2) {\n\t\t\tnewY = destHeight - 1.0e-6;\n\t\t}\n\t\tif (bottomEdgeMode === 3) {\n\t\t\tnewY = (destHeight - 1.0e-6) - (newY - destHeight);\n\t\t\theadingArray[index] = (6.283185307179586 - headingArray[index]);\n\t\t}\n\t}\n\tyArray[index] = newY;\n}\n\nfunction setHeadingArrayFrom() {\n\tvar heading;\n\tvar headingArray;\n\tvar headingOop;\n\tvar i;\n\tvar isValVector;\n\tvar pArray;\n\tvar pOop;\n\tvar resultArray;\n\tvar resultOop;\n\tvar size;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackValue(0);\n\theadingOop = interpreterProxy.stackValue(1);\n\tpOop = interpreterProxy.stackValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isBytes(pOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(headingOop);\n\tif (resultOop.isFloat) {\n\t\tisValVector = false;\n\t} else {\n\t\tif (interpreterProxy.isWords(resultOop)) {\n\t\t\tif (SIZEOF(resultOop) !== size) {\n\t\t\t\tinterpreterProxy.primitiveFail();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tisValVector = true;\n\t\t} else {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tpArray = pOop.bytes;\n\theadingArray = headingOop.wordsAsFloat32Array();\n\tif (isValVector) {\n\t\tresultArray = resultOop.wordsAsFloat32Array();\n\t} else {\n\t\theading = interpreterProxy.floatValueOf(resultOop);\n\t\theading = degreesToRadians(heading);\n\t}\n\tfor (i = 0; i <= (size - 1); i++) {\n\t\tif (pArray[i] === 1) {\n\t\t\tif (isValVector) {\n\t\t\t\theading = resultArray[i];\n\t\t\t\theading = degreesToRadians(heading);\n\t\t\t}\n\t\t\theadingArray[i] = heading;\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(3);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nfunction setInterpreter(anInterpreter) {\n\tvar ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy.majorVersion() == VM_PROXY_MAJOR;\n\tif (ok === false) {\n\t\treturn false;\n\t}\n\tok = interpreterProxy.minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nfunction setScalarHeading() {\n\tvar heading;\n\tvar headingArray;\n\tvar headingOop;\n\tvar index;\n\n\t/* inline: true */;\n\theading = interpreterProxy.stackFloatValue(0);\n\theadingOop = interpreterProxy.stackValue(1);\n\tindex = interpreterProxy.stackIntegerValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(headingOop) < index) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\theadingArray = headingOop.wordsAsFloat32Array();\n\theadingArray[index - 1] = degreesToRadians(heading);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(3);\n}\n\nfunction shutdownModule() {\n\treturn true;\n}\n\nfunction turtleScalarSetX() {\n\tvar destWidth;\n\tvar headingArray;\n\tvar headingOop;\n\tvar leftEdgeMode;\n\tvar rightEdgeMode;\n\tvar size;\n\tvar val;\n\tvar xArray;\n\tvar xIndex;\n\tvar xOop;\n\n\t/* inline: true */;\n\trightEdgeMode = interpreterProxy.stackIntegerValue(0);\n\tleftEdgeMode = interpreterProxy.stackIntegerValue(1);\n\tdestWidth = interpreterProxy.stackFloatValue(2);\n\tval = interpreterProxy.stackFloatValue(3);\n\theadingOop = interpreterProxy.stackValue(4);\n\txIndex = interpreterProxy.stackIntegerValue(5);\n\txOop = interpreterProxy.stackValue(6);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(xOop);\n\tif (SIZEOF(headingOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\txArray = xOop.wordsAsFloat32Array();\n\theadingArray = headingOop.wordsAsFloat32Array();\n\tscalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(xIndex - 1, xArray, headingArray, val, destWidth, leftEdgeMode, rightEdgeMode);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(7);\n}\n\nfunction turtleScalarSetY() {\n\tvar bottomEdgeMode;\n\tvar destHeight;\n\tvar headingArray;\n\tvar headingOop;\n\tvar size;\n\tvar topEdgeMode;\n\tvar val;\n\tvar yArray;\n\tvar yIndex;\n\tvar yOop;\n\n\t/* inline: true */;\n\tbottomEdgeMode = interpreterProxy.stackIntegerValue(0);\n\ttopEdgeMode = interpreterProxy.stackIntegerValue(1);\n\tdestHeight = interpreterProxy.stackFloatValue(2);\n\tval = interpreterProxy.stackFloatValue(3);\n\theadingOop = interpreterProxy.stackValue(4);\n\tyIndex = interpreterProxy.stackIntegerValue(5);\n\tyOop = interpreterProxy.stackValue(6);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(yOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(yOop);\n\tif (SIZEOF(headingOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tyArray = yOop.wordsAsFloat32Array();\n\theadingArray = headingOop.wordsAsFloat32Array();\n\tscalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(yIndex - 1, yArray, headingArray, val, destHeight, topEdgeMode, bottomEdgeMode);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(7);\n}\n\nfunction turtlesSetX() {\n\tvar destWidth;\n\tvar headingArray;\n\tvar headingOop;\n\tvar i;\n\tvar isValVector;\n\tvar isWordVector;\n\tvar leftEdgeMode;\n\tvar newX;\n\tvar pArray;\n\tvar pOop;\n\tvar rightEdgeMode;\n\tvar size;\n\tvar val;\n\tvar valArray;\n\tvar valOop;\n\tvar wordValArray;\n\tvar xArray;\n\tvar xOop;\n\n\t/* inline: true */;\n\trightEdgeMode = interpreterProxy.stackIntegerValue(0);\n\tleftEdgeMode = interpreterProxy.stackIntegerValue(1);\n\tdestWidth = interpreterProxy.stackFloatValue(2);\n\tvalOop = interpreterProxy.stackValue(3);\n\theadingOop = interpreterProxy.stackValue(4);\n\txOop = interpreterProxy.stackValue(5);\n\tpOop = interpreterProxy.stackValue(6);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isBytes(pOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (valOop.isFloat) {\n\t\tisValVector = false;\n\t} else {\n\t\tif (interpreterProxy.isWords(valOop)) {\n\t\t\tisValVector = true;\n\t\t\tisWordVector = interpreterProxy.isMemberOf(valOop, \"WordArray\");\n\t\t} else {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tsize = SIZEOF(xOop);\n\tif (SIZEOF(pOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(headingOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (isValVector) {\n\t\tif (SIZEOF(valOop) !== size) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tpArray = pOop.bytes;\n\txArray = xOop.wordsAsFloat32Array();\n\theadingArray = headingOop.wordsAsFloat32Array();\n\tif (isValVector) {\n\t\tif (isWordVector) {\n\t\t\twordValArray = valOop.words;\n\t\t} else {\n\t\t\tvalArray = valOop.wordsAsFloat32Array();\n\t\t}\n\t} else {\n\t\tval = interpreterProxy.floatValueOf(valOop);\n\t}\n\tfor (i = 0; i <= (size - 1); i++) {\n\t\tif (pArray[i] === 1) {\n\t\t\tif (isValVector) {\n\t\t\t\tif (isWordVector) {\n\t\t\t\t\tnewX = wordValArray[i];\n\t\t\t\t\t;\n\t\t\t\t} else {\n\t\t\t\t\tnewX = valArray[i];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewX = val;\n\t\t\t}\n\t\t\tscalarXAtxArrayheadingArrayvaluedestWidthleftEdgeModerightEdgeMode(i, xArray, headingArray, newX, destWidth, leftEdgeMode, rightEdgeMode);\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(7);\n}\n\nfunction turtlesSetY() {\n\tvar bottomEdgeMode;\n\tvar destHeight;\n\tvar headingArray;\n\tvar headingOop;\n\tvar i;\n\tvar isValVector;\n\tvar isWordVector;\n\tvar newY;\n\tvar pArray;\n\tvar pOop;\n\tvar size;\n\tvar topEdgeMode;\n\tvar val;\n\tvar valArray;\n\tvar valOop;\n\tvar wordValArray;\n\tvar yArray;\n\tvar yOop;\n\n\t/* inline: true */;\n\tbottomEdgeMode = interpreterProxy.stackIntegerValue(0);\n\ttopEdgeMode = interpreterProxy.stackIntegerValue(1);\n\tdestHeight = interpreterProxy.stackFloatValue(2);\n\tvalOop = interpreterProxy.stackValue(3);\n\theadingOop = interpreterProxy.stackValue(4);\n\tyOop = interpreterProxy.stackValue(5);\n\tpOop = interpreterProxy.stackValue(6);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isBytes(pOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(yOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(headingOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (valOop.isFloat) {\n\t\tisValVector = false;\n\t} else {\n\t\tif (interpreterProxy.isWords(valOop)) {\n\t\t\tisValVector = true;\n\t\t\tisWordVector = interpreterProxy.isMemberOf(valOop, \"WordArray\");\n\t\t} else {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tsize = SIZEOF(yOop);\n\tif (SIZEOF(pOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(headingOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (isValVector) {\n\t\tif (SIZEOF(valOop) !== size) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tpArray = pOop.bytes;\n\tyArray = yOop.wordsAsFloat32Array();\n\theadingArray = headingOop.wordsAsFloat32Array();\n\tif (isValVector) {\n\t\tif (isWordVector) {\n\t\t\twordValArray = valOop.words;\n\t\t} else {\n\t\t\tvalArray = valOop.wordsAsFloat32Array();\n\t\t}\n\t} else {\n\t\tval = interpreterProxy.floatValueOf(valOop);\n\t}\n\tfor (i = 0; i <= (size - 1); i++) {\n\t\tif (pArray[i] === 1) {\n\t\t\tif (isValVector) {\n\t\t\t\tif (isWordVector) {\n\t\t\t\t\tnewY = wordValArray[i];\n\t\t\t\t\t;\n\t\t\t\t} else {\n\t\t\t\t\tnewY = valArray[i];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewY = val;\n\t\t\t}\n\t\t\tscalarYAtyArrayheadingArrayvaluedestHeighttopEdgeModebottomEdgeMode(i, yArray, headingArray, newY, destHeight, topEdgeMode, bottomEdgeMode);\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(7);\n}\n\nfunction vectorGetAngleTo() {\n\tvar index;\n\tvar isVector;\n\tvar pX;\n\tvar pXOop;\n\tvar pY;\n\tvar pYOop;\n\tvar ppx;\n\tvar ppy;\n\tvar r;\n\tvar result;\n\tvar resultOop;\n\tvar size;\n\tvar x;\n\tvar xArray;\n\tvar xArrayOop;\n\tvar y;\n\tvar yArray;\n\tvar yArrayOop;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackValue(0);\n\tyArrayOop = interpreterProxy.stackValue(1);\n\txArrayOop = interpreterProxy.stackValue(2);\n\tpYOop = interpreterProxy.stackValue(3);\n\tpXOop = interpreterProxy.stackValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(resultOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(yArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(resultOop);\n\tif (size < 0) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(xArrayOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(yArrayOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (pXOop.isFloat) {\n\t\tif (pYOop.isFloat) {\n\t\t\tisVector = false;\n\t\t} else {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (pYOop.isFloat) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t} else {\n\t\t\tisVector = true;\n\t\t}\n\t}\n\tif (isVector) {\n\t\tif (SIZEOF(pXOop) !== size) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t\tif (SIZEOF(pYOop) !== size) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tresult = resultOop.wordsAsFloat32Array();\n\txArray = xArrayOop.wordsAsFloat32Array();\n\tyArray = yArrayOop.wordsAsFloat32Array();\n\tif (isVector) {\n\t\tpX = pXOop.wordsAsFloat32Array();\n\t\tpY = pYOop.wordsAsFloat32Array();\n\t}\n\tif (!isVector) {\n\t\tppx = interpreterProxy.floatValueOf(pXOop);\n\t\tppy = interpreterProxy.floatValueOf(pYOop);\n\t}\n\tfor (index = 0; index <= (size - 1); index++) {\n\t\tif (isVector) {\n\t\t\tppx = pX[index];\n\t\t\tppy = pY[index];\n\t\t}\n\t\tx = ppx - xArray[index];\n\t\ty = ppy - yArray[index];\n\t\tr = degreesFromXy(x, y);\n\t\tr += 90.0;\n\t\tif (r > 360.0) {\n\t\t\tr -= 360.0;\n\t\t}\n\t\tresult[index] = r;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(6);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction vectorGetDistanceTo() {\n\tvar index;\n\tvar isVector;\n\tvar pX;\n\tvar pXOop;\n\tvar pY;\n\tvar pYOop;\n\tvar ppx;\n\tvar ppy;\n\tvar result;\n\tvar resultOop;\n\tvar size;\n\tvar x;\n\tvar xArray;\n\tvar xArrayOop;\n\tvar y;\n\tvar yArray;\n\tvar yArrayOop;\n\n\t/* inline: true */;\n\tresultOop = interpreterProxy.stackValue(0);\n\tyArrayOop = interpreterProxy.stackValue(1);\n\txArrayOop = interpreterProxy.stackValue(2);\n\tpYOop = interpreterProxy.stackValue(3);\n\tpXOop = interpreterProxy.stackValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(resultOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(xArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(yArrayOop)) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsize = SIZEOF(resultOop);\n\tif (size < 0) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(xArrayOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (SIZEOF(yArrayOop) !== size) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (pXOop.isFloat) {\n\t\tif (pYOop.isFloat) {\n\t\t\tisVector = false;\n\t\t} else {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tif (pYOop.isFloat) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t} else {\n\t\t\tisVector = true;\n\t\t}\n\t}\n\tif (isVector) {\n\t\tif (SIZEOF(pXOop) !== size) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t\tif (SIZEOF(pYOop) !== size) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t}\n\tresult = resultOop.wordsAsFloat32Array();\n\txArray = xArrayOop.wordsAsFloat32Array();\n\tyArray = yArrayOop.wordsAsFloat32Array();\n\tif (isVector) {\n\t\tpX = pXOop.wordsAsFloat32Array();\n\t\tpY = pYOop.wordsAsFloat32Array();\n\t}\n\tif (!isVector) {\n\t\tppx = interpreterProxy.floatValueOf(pXOop);\n\t\tppy = interpreterProxy.floatValueOf(pYOop);\n\t}\n\tfor (index = 0; index <= (size - 1); index++) {\n\t\tif (isVector) {\n\t\t\tppx = pX[index];\n\t\t\tppy = pY[index];\n\t\t}\n\t\tx = ppx - xArray[index];\n\t\ty = ppy - yArray[index];\n\t\tresult[index] = Math.sqrt((x * x) + (y * y));\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(6);\n\tinterpreterProxy.push(resultOop);\n}\n\nfunction zoomBitmap() {\n\tvar bit;\n\tvar dOrigin;\n\tvar dst;\n\tvar dstIndex;\n\tvar dstSize;\n\tvar dummy;\n\tvar sHeight;\n\tvar sOrigin;\n\tvar sWidth;\n\tvar src;\n\tvar srcIndex;\n\tvar srcOrigin;\n\tvar srcSize;\n\tvar sx;\n\tvar sy;\n\tvar xFactor;\n\tvar y;\n\tvar yFactor;\n\n\t/* inline: true */;\n\tyFactor = interpreterProxy.stackIntegerValue(0);\n\txFactor = interpreterProxy.stackIntegerValue(1);\n\tsHeight = interpreterProxy.stackIntegerValue(2);\n\tsWidth = interpreterProxy.stackIntegerValue(3);\n\tdst = interpreterProxy.stackValue(4);\n\tsrc = interpreterProxy.stackValue(5);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tsrcSize = SIZEOF(src);\n\tdstSize = SIZEOF(dst);\n\tif ((sWidth * sHeight) !== srcSize) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (((srcSize * xFactor) * yFactor) !== dstSize) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tsOrigin = src.words;\n\tdOrigin = dst.words;\n\tsrcIndex = 0;\n\tsrcOrigin = 0;\n\tdstIndex = 0;\n\tfor (sy = 0; sy <= (sHeight - 1); sy++) {\n\t\tfor (y = 0; y <= (yFactor - 1); y++) {\n\t\t\tfor (sx = 0; sx <= (sWidth - 1); sx++) {\n\t\t\t\tbit = sOrigin[srcIndex];\n\t\t\t\t++srcIndex;\n\t\t\t\tfor (dummy = 0; dummy <= (xFactor - 1); dummy++) {\n\t\t\t\t\tdOrigin[dstIndex] = bit;\n\t\t\t\t\t++dstIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsrcIndex = srcOrigin;\n\t\t}\n\t\tsrcOrigin += sWidth;\n\t\tsrcIndex = srcOrigin;\n\t}\n\tinterpreterProxy.pop(6);\n}\n\n\nSqueak.registerExternalModule(\"KedamaPlugin2\", {\n\tprimitiveAddArrays: primitiveAddArrays,\n\tgetModuleName: getModuleName,\n\tprimitiveMulArrays: primitiveMulArrays,\n\tdrawTurtlesInArray: drawTurtlesInArray,\n\tprimitiveGTScalar: primitiveGTScalar,\n\tsetScalarHeading: setScalarHeading,\n\tprimitiveSubScalar: primitiveSubScalar,\n\tturtleScalarSetY: turtleScalarSetY,\n\tvectorGetAngleTo: vectorGetAngleTo,\n\tprimitiveRemArrays: primitiveRemArrays,\n\tprimitiveLTArrays: primitiveLTArrays,\n\tprimitiveAddScalar: primitiveAddScalar,\n\tprimPixelsAtXY: primPixelsAtXY,\n\tprimitiveMulScalar: primitiveMulScalar,\n\tprimSetPixelsAtXY: primSetPixelsAtXY,\n\tsetHeadingArrayFrom: setHeadingArrayFrom,\n\tprimPixelAtXYPut: primPixelAtXYPut,\n\tmakeMaskLog: makeMaskLog,\n\tprimitiveLTScalar: primitiveLTScalar,\n\tscalarGetAngleTo: scalarGetAngleTo,\n\tprimitiveOrByteArray: primitiveOrByteArray,\n\tprimitiveLEArrays: primitiveLEArrays,\n\tprimitiveRemScalar: primitiveRemScalar,\n\tgetHeadingArrayInto: getHeadingArrayInto,\n\tturtlesSetX: turtlesSetX,\n\tprimitivePredicateReplaceBytes: primitivePredicateReplaceBytes,\n\tprimitiveDivArrays: primitiveDivArrays,\n\tmakeMask: makeMask,\n\tprimitiveLEScalar: primitiveLEScalar,\n\tkedamaSetRandomSeed: kedamaSetRandomSeed,\n\trandomIntoIntegerArray: randomIntoIntegerArray,\n\tsetInterpreter: setInterpreter,\n\tprimitivePredicateAtAllPutColor: primitivePredicateAtAllPutColor,\n\tmakeTurtlesMap: makeTurtlesMap,\n\trandomIntoFloatArray: randomIntoFloatArray,\n\tprimUpHill: primUpHill,\n\tshutdownModule: shutdownModule,\n\tprimitiveDivScalar: primitiveDivScalar,\n\tprimitiveGEArrays: primitiveGEArrays,\n\tprimitiveNotByteArray: primitiveNotByteArray,\n\trandomRange: randomRange,\n\tinitialiseModule: initialiseModule,\n\tgetScalarHeading: getScalarHeading,\n\tprimPixelAtXY: primPixelAtXY,\n\tprimitivePredicateAtAllPutNumber: primitivePredicateAtAllPutNumber,\n\tprimitiveEQArrays: primitiveEQArrays,\n\tprimitiveNEArrays: primitiveNEArrays,\n\tprimScalarForward: primScalarForward,\n\tvectorGetDistanceTo: vectorGetDistanceTo,\n\tturtlesSetY: turtlesSetY,\n\tturtleScalarSetX: turtleScalarSetX,\n\tprimTurtlesForward: primTurtlesForward,\n\tprimitiveGEScalar: primitiveGEScalar,\n\tprimitiveAndByteArray: primitiveAndByteArray,\n\tprimitivePredicateReplaceWords: primitivePredicateReplaceWords,\n\tprimitiveGTArrays: primitiveGTArrays,\n\tprimitivePredicateAtAllPutObject: primitivePredicateAtAllPutObject,\n\tprimitiveEQScalar: primitiveEQScalar,\n\tprimitivePredicateAtAllPutBoolean: primitivePredicateAtAllPutBoolean,\n\tzoomBitmap: zoomBitmap,\n\tprimitiveNEScalar: primitiveNEScalar,\n\tscalarGetDistanceTo: scalarGetDistanceTo,\n\tprimitiveSubArrays: primitiveSubArrays,\n});\n\n}); // end of module\n","/* Smalltalk from Squeak4.5 with VMMaker 4.13.6 translated as JS source on 3 November 2014 1:52:21 pm */\n/* Automatically generated by\n\tJSPluginCodeGenerator VMMakerJS-bf.15 uuid: fd4e10f2-3773-4e80-8bb5-c4b471a014e5\n from\n\tKlattSynthesizerPlugin VMMaker-bf.353 uuid: 8ae25e7e-8d2c-451e-8277-598b30e9c002\n */\n\nmodule(\"users.bert.SqueakJS.plugins.Klatt\").requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\"use strict\";\n\nvar VM_PROXY_MAJOR = 1;\nvar VM_PROXY_MINOR = 11;\n\n/*** Functions ***/\nfunction CLASSOF(obj) { return typeof obj === \"number\" ? interpreterProxy.classSmallInteger() : obj.sqClass }\nfunction SIZEOF(obj) { return obj.pointers ? obj.pointers.length : obj.words ? obj.words.length : obj.bytes ? obj.bytes.length : 0 }\nfunction BYTESIZEOF(obj) { return obj.bytes ? obj.bytes.length : obj.words ? obj.words.length * 4 : 0 }\nfunction DIV(a, b) { return Math.floor(a / b) | 0; } // integer division\nfunction MOD(a, b) { return a - DIV(a, b) * b | 0; } // signed modulus\nfunction SHL(a, b) { return b > 31 ? 0 : a << b; } // fix JS shift\nfunction SHR(a, b) { return b > 31 ? 0 : a >>> b; } // fix JS shift\nfunction SHIFT(a, b) { return b < 0 ? (b < -31 ? 0 : a >>> (0-b) ) : (b > 31 ? 0 : a << b); }\n\n/*** Constants ***/\nvar A1v = 46;\nvar A2f = 34;\nvar A2v = 47;\nvar A3f = 35;\nvar A3v = 48;\nvar A4f = 36;\nvar A4v = 49;\nvar A5f = 37;\nvar A6f = 38;\nvar Anv = 45;\nvar Aspiration = 9;\nvar Atv = 50;\nvar B1 = 13;\nvar B2 = 17;\nvar B2f = 40;\nvar B3 = 19;\nvar B3f = 41;\nvar B4 = 21;\nvar B4f = 42;\nvar B5 = 23;\nvar B5f = 43;\nvar B6 = 25;\nvar B6f = 44;\nvar Bnp = 27;\nvar Bnz = 29;\nvar Btp = 31;\nvar Btz = 33;\nvar Bypass = 39;\nvar Diplophonia = 4;\nvar Epsilon = 0.0001;\nvar F0 = 0;\nvar F1 = 12;\nvar F2 = 16;\nvar F3 = 18;\nvar F4 = 20;\nvar F5 = 22;\nvar F6 = 24;\nvar Flutter = 1;\nvar Fnp = 26;\nvar Fnz = 28;\nvar Friction = 10;\nvar Ftp = 30;\nvar Ftz = 32;\nvar Gain = 51;\nvar Jitter = 2;\nvar PI = 3.141592653589793;\nvar R1c = 12;\nvar R1vp = 3;\nvar R2c = 13;\nvar R2fp = 7;\nvar R2vp = 4;\nvar R3c = 14;\nvar R3fp = 8;\nvar R3vp = 5;\nvar R4c = 15;\nvar R4fp = 9;\nvar R4vp = 6;\nvar R5c = 16;\nvar R5fp = 10;\nvar R6c = 17;\nvar R6fp = 11;\nvar R7c = 18;\nvar R8c = 19;\nvar Ra = 7;\nvar Rk = 8;\nvar Rnpc = 20;\nvar Rnpp = 1;\nvar Rnz = 21;\nvar Ro = 6;\nvar Rout = 24;\nvar Rtpc = 22;\nvar Rtpp = 2;\nvar Rtz = 23;\nvar Shimmer = 3;\nvar Turbulence = 11;\nvar Voicing = 5;\n\n/*** Variables ***/\nvar a1 = 0;\nvar a2 = 0;\nvar b1 = 0;\nvar c1 = 0;\nvar cascade = 0;\nvar frame = null;\nvar glast = 0;\nvar interpreterProxy = null;\nvar moduleName = \"Klatt 3 November 2014 (e)\";\nvar nlast = 0;\nvar nmod = 0;\nvar nopen = 0;\nvar nper = 0;\nvar periodCount = 0;\nvar pitch = 0;\nvar resonators = null;\nvar samplesCount = 0;\nvar samplesPerFrame = 0;\nvar samplingRate = 0;\nvar seed = 0;\nvar t0 = 0;\nvar vlast = 0;\nvar x1 = 0;\nvar x2 = 0;\n\n\n\n/*\tAdd diplophonia (bicyclic voice). Change voicing amplitude. */\n\nfunction addAmplitudeDiplophonia() {\n\tif ((MOD(periodCount, 2)) !== 0) {\n\n\t\t/* x1 must be <= 0 */\n\n\t\tx1 = x1 * (1.0 - frame[Diplophonia]);\n\t\tif (x1 > 0) {\n\t\t\tx1 = 0;\n\t\t}\n\t}\n}\n\n\n/*\tAdd F0 flutter, as specified in:\n\t\t'Analysis, synthesis and perception of voice quality variations among\n\t\tfemale and male talkers' D.H. Klatt and L.C. Klatt JASA 87(2) February 1990.\n\tFlutter is added by applying a quasi-random element constructed from three\n\tslowly varying sine waves. */\n\nfunction addFlutter() {\n\tvar asin;\n\tvar bsin;\n\tvar csin;\n\tvar deltaF0;\n\tvar timeCount;\n\n\ttimeCount = samplesCount / samplingRate;\n\tasin = Math.sin(((2.0 * PI) * 12.7) * timeCount);\n\tbsin = Math.sin(((2.0 * PI) * 7.1) * timeCount);\n\tcsin = Math.sin(((2.0 * PI) * 4.7) * timeCount);\n\tdeltaF0 = (((frame[Flutter] * 2.0) * frame[F0]) / 100.0) * ((asin + bsin) + csin);\n\tpitch += deltaF0;\n}\n\n\n/*\tAdd diplophonia (bicyclic voice). Change F0. */\n\nfunction addFrequencyDiplophonia() {\n\tif ((MOD(periodCount, 2)) === 0) {\n\t\tpitch += (frame[Diplophonia] * frame[F0]) * (1.0 - frame[Ro]);\n\t} else {\n\t\tpitch -= (frame[Diplophonia] * frame[F0]) * (1.0 - frame[Ro]);\n\t}\n}\n\n\n/*\tAdd jitter (random F0 perturbation). */\n\nfunction addJitter() {\n\tpitch += (((nextRandom() - 32767) * frame[Jitter]) / 32768.0) * frame[F0];\n}\n\n\n/*\tAdd shimmer (random voicing amplitude perturbation). */\n\nfunction addShimmer() {\n\n\t/* x1 must be <= 0 */\n\n\tx1 += (((nextRandom() - 32767) * frame[Shimmer]) / 32768.0) * x1;\n\tif (x1 > 0) {\n\t\tx1 = 0;\n\t}\n}\n\n\n/*\tSet up an anti-resonator */\n\nfunction antiResonatorfrequencybandwidth(index, freq, bw) {\n\tvar a;\n\tvar arg;\n\tvar b;\n\tvar c;\n\tvar r;\n\n\targ = ((0.0 - PI) / samplingRate) * bw;\n\tr = Math.exp(arg);\n\tc = 0.0 - (r * r);\n\targ = ((PI * 2.0) / samplingRate) * freq;\n\tb = (r * Math.cos(arg)) * 2.0;\n\ta = (1.0 - b) - c;\n\ta = 1.0 / a;\n\tb = (0.0 - b) * a;\n\tc = (0.0 - c) * a;\n\tresonatorAput(index, a);\n\tresonatorBput(index, b);\n\tresonatorCput(index, c);\n}\n\nfunction antiResonatorvalue(index, aFloat) {\n\tvar answer;\n\tvar p1;\n\n\tanswer = ((resonatorA(index) * aFloat) + (resonatorB(index) * ((p1 = resonatorP1(index))))) + (resonatorC(index) * resonatorP2(index));\n\tresonatorP2put(index, p1);\n\tresonatorP1put(index, aFloat);\n\treturn answer;\n}\n\n\n/*\tCascade vocal tract, excited by laryngeal sources.\n\tNasal antiresonator, nasal resonator, tracheal antirresonator,\n\ttracheal resonator, then formants F8, F7, F6, F5, F4, F3, F2, F1. */\n\nfunction cascadeBranch(source) {\n\tvar out;\n\n\tif (!(cascade > 0)) {\n\t\treturn 0.0;\n\t}\n\tout = antiResonatorvalue(Rnz, source);\n\tout = resonatorvalue(Rnpc, out);\n\tout = antiResonatorvalue(Rtz, out);\n\n\t/* Do not use unless sample rate >= 16000 */\n\n\tout = resonatorvalue(Rtpc, out);\n\tif (cascade >= 8) {\n\t\tout = resonatorvalue(R8c, out);\n\t}\n\tif (cascade >= 7) {\n\t\tout = resonatorvalue(R7c, out);\n\t}\n\tif (cascade >= 6) {\n\t\tout = resonatorvalue(R6c, out);\n\t}\n\tif (cascade >= 5) {\n\t\tout = resonatorvalue(R5c, out);\n\t}\n\tif (cascade >= 4) {\n\t\tout = resonatorvalue(R4c, out);\n\t}\n\tif (cascade >= 3) {\n\t\tout = resonatorvalue(R3c, out);\n\t}\n\tif (cascade >= 2) {\n\t\tout = resonatorvalue(R2c, out);\n\t}\n\tif (cascade >= 1) {\n\t\tout = resonatorvalue(R1c, out);\n\t}\n\treturn out;\n}\n\n\n/*\tReturn the first indexable word of oop which is assumed to be variableWordSubclass */\n\nfunction checkedFloatPtrOf(oop) {\n\tinterpreterProxy.success(interpreterProxy.isWords(oop));\n\tif (interpreterProxy.failed()) {\n\t\treturn 0;\n\t}\n\treturn oop.wordsAsFloat32Array();\n}\n\n\n/*\tReturn the first indexable word of oop which is assumed to be variableWordSubclass */\n\nfunction checkedShortPtrOf(oop) {\n\tinterpreterProxy.success(interpreterProxy.isWords(oop));\n\tif (interpreterProxy.failed()) {\n\t\treturn 0;\n\t}\n\treturn oop.wordsAsInt16Array();\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nfunction getModuleName() {\n\treturn moduleName;\n}\n\nfunction glottalSource() {\n\tvar x0;\n\n\tif (t0 === 0) {\n\t\treturn 0;\n\t}\n\tif (nper < nopen) {\n\t\tx0 = (a1 * x1) + (a2 * x2);\n\t\tx2 = x1;\n\t\tx1 = x0;\n\t} else {\n\t\tx0 = (b1 * x1) - c1;\n\t\tx1 = x0;\n\t}\n\tif (nper >= t0) {\n\t\tnper = 0;\n\t\tpitchSynchronousReset();\n\t}\n\t++nper;\n\treturn x0;\n}\n\nfunction halt() {\n\t;\n}\n\nfunction linearFromdB(aNumber) {\n\treturn Math.pow(2.0,((aNumber - 87.0) / 6.0)) * 32.767;\n}\n\nfunction loadFrom(klattOop) {\n\tvar oop;\n\n\tinterpreterProxy.success(SIZEOF(klattOop) === 22);\n\tif (interpreterProxy.failed()) {\n\t\treturn false;\n\t}\n\toop = interpreterProxy.fetchPointerofObject(0, klattOop);\n\tresonators = checkedFloatPtrOf(oop);\n\tpitch = interpreterProxy.fetchFloatofObject(2, klattOop);\n\tt0 = interpreterProxy.fetchIntegerofObject(3, klattOop);\n\tnper = interpreterProxy.fetchIntegerofObject(4, klattOop);\n\tnopen = interpreterProxy.fetchIntegerofObject(5, klattOop);\n\tnmod = interpreterProxy.fetchIntegerofObject(6, klattOop);\n\ta1 = interpreterProxy.fetchFloatofObject(7, klattOop);\n\ta2 = interpreterProxy.fetchFloatofObject(8, klattOop);\n\tx1 = interpreterProxy.fetchFloatofObject(9, klattOop);\n\tx2 = interpreterProxy.fetchFloatofObject(10, klattOop);\n\tb1 = interpreterProxy.fetchFloatofObject(11, klattOop);\n\tc1 = interpreterProxy.fetchFloatofObject(12, klattOop);\n\tglast = interpreterProxy.fetchFloatofObject(13, klattOop);\n\tvlast = interpreterProxy.fetchFloatofObject(14, klattOop);\n\tnlast = interpreterProxy.fetchFloatofObject(15, klattOop);\n\tperiodCount = interpreterProxy.fetchIntegerofObject(16, klattOop);\n\tsamplesCount = interpreterProxy.fetchIntegerofObject(17, klattOop);\n\tseed = interpreterProxy.fetchIntegerofObject(18, klattOop);\n\tcascade = interpreterProxy.fetchIntegerofObject(19, klattOop);\n\tsamplesPerFrame = interpreterProxy.fetchIntegerofObject(20, klattOop);\n\tsamplingRate = interpreterProxy.fetchIntegerofObject(21, klattOop);\n\treturn interpreterProxy.failed() === false;\n}\n\n\n/*\tAnswer a random number between 0 and 65535. */\n\nfunction nextRandom() {\n\tseed = ((seed * 1309) + 13849) & 65535;\n\treturn seed;\n}\n\nfunction normalizeGlottalPulse() {\n\tvar ingore;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\n\ts0 = 0.0;\n\ts1 = x1;\n\ts2 = x2;\n\tfor (ingore = 1; ingore <= nopen; ingore++) {\n\t\ts0 = (a1 * s1) + (a2 * s2);\n\t\ts2 = s1;\n\t\ts1 = s0;\n\t}\n\tif (s0 !== 0.0) {\n\t\tx1 = (x1 / s0) * 10000.0;\n\t}\n}\n\n\n/*\tFriction-excited parallel vocal tract formants F6, F5, F4, F3, F2,\n\toutputs added with alternating sign. Sound source for other\n\tparallel resonators is friction plus first difference of\n\tvoicing waveform. */\n\nfunction parallelFrictionBranch(source) {\n\treturn (((resonatorvalue(R2fp, source) - resonatorvalue(R3fp, source)) + resonatorvalue(R4fp, source)) - resonatorvalue(R5fp, source)) + resonatorvalue(R6fp, source);\n}\n\n\n/*\tVoice-excited parallel vocal tract F1, F2, F3, F4, FNP and FTP. */\n\nfunction parallelVoicedBranch(source) {\n\treturn ((((resonatorvalue(R1vp, source) + resonatorvalue(R2vp, source)) + resonatorvalue(R3vp, source)) + resonatorvalue(R4vp, source)) + resonatorvalue(Rnpp, source)) + resonatorvalue(Rtpp, source);\n}\n\nfunction pitchSynchronousReset() {\n\tif (frame[F0] > 0) {\n\t\tvoicedPitchSynchronousReset();\n\t\tperiodCount = MOD((periodCount + 1), 65535);\n\t} else {\n\t\tt0 = 1;\n\t\tnmod = t0;\n\t}\n}\n\nfunction primitiveSynthesizeFrameIntoStartingAt() {\n\tvar aKlattFrame;\n\tvar buffer;\n\tvar bufferOop;\n\tvar rcvr;\n\tvar startIndex;\n\n\taKlattFrame = checkedFloatPtrOf(interpreterProxy.stackValue(2));\n\tbuffer = checkedShortPtrOf((bufferOop = interpreterProxy.stackValue(1)));\n\tstartIndex = interpreterProxy.stackIntegerValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\trcvr = interpreterProxy.stackObjectValue(3);\n\tif (!loadFrom(rcvr)) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.success((SIZEOF(bufferOop) * 2) >= samplesPerFrame);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tsynthesizeFrameintostartingAt(aKlattFrame, buffer, startIndex);\n\tif (!saveTo(rcvr)) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(3);\n}\n\nfunction quphicosphisinphirphid(u, phi, cosphi, sinphi, rphid) {\n\tvar expuphi;\n\n\texpuphi = Math.exp(u * phi);\n\treturn (expuphi * ((((rphid * ((u * u) + 1.0)) + u) * sinphi) - cosphi)) + 1.0;\n}\n\n\n/*\tConvert formant frequencies and bandwidth into\n\tresonator difference equation coefficients. */\n\nfunction resonatorfrequencybandwidth(index, freq, bw) {\n\tvar a;\n\tvar arg;\n\tvar b;\n\tvar c;\n\tvar r;\n\n\targ = ((0.0 - PI) / samplingRate) * bw;\n\tr = Math.exp(arg);\n\tc = 0.0 - (r * r);\n\targ = ((PI * 2.0) / samplingRate) * freq;\n\tb = (r * Math.cos(arg)) * 2.0;\n\ta = (1.0 - b) - c;\n\tresonatorAput(index, a);\n\tresonatorBput(index, b);\n\tresonatorCput(index, c);\n}\n\n\n/*\tConvert formant frequencies and bandwidth into\n\tresonator difference equation coefficients. */\n\nfunction resonatorfrequencybandwidthgain(index, freq, bw, gain) {\n\tresonatorfrequencybandwidth(index, freq, bw);\n\tresonatorAput(index, resonatorA(index) * gain);\n}\n\nfunction resonatorvalue(index, aFloat) {\n\tvar answer;\n\tvar p1;\n\n\n\t/* (p1 between: -100000 and: 100000) ifFalse: [self halt].\n\t(answer between: -100000 and: 100000) ifFalse: [self halt]. */\n\n\tanswer = ((resonatorA(index) * aFloat) + (resonatorB(index) * ((p1 = resonatorP1(index))))) + (resonatorC(index) * resonatorP2(index));\n\tresonatorP2put(index, p1);\n\tresonatorP1put(index, answer);\n\treturn answer;\n}\n\nfunction resonatorA(index) {\n\treturn resonators[(index * 5) - 5];\n}\n\nfunction resonatorAput(index, aFloat) {\n\tresonators[(index * 5) - 5] = aFloat;\n}\n\nfunction resonatorB(index) {\n\treturn resonators[(index * 5) - 4];\n}\n\nfunction resonatorBput(index, aFloat) {\n\tresonators[(index * 5) - 4] = aFloat;\n}\n\nfunction resonatorC(index) {\n\treturn resonators[(index * 5) - 3];\n}\n\nfunction resonatorCput(index, aFloat) {\n\tresonators[(index * 5) - 3] = aFloat;\n}\n\nfunction resonatorP1(index) {\n\treturn resonators[(index * 5) - 2];\n}\n\nfunction resonatorP1put(index, aFloat) {\n\tresonators[(index * 5) - 2] = aFloat;\n}\n\nfunction resonatorP2(index) {\n\treturn resonators[(index * 5) - 1];\n}\n\nfunction resonatorP2put(index, aFloat) {\n\tresonators[(index * 5) - 1] = aFloat;\n}\n\nfunction rorark(roNumber, raNumber, rkNumber) {\n\tvar cosphi;\n\tvar d;\n\tvar gamma;\n\tvar gammapwr;\n\tvar phi;\n\tvar r;\n\tvar ra;\n\tvar rho;\n\tvar rk;\n\tvar ro;\n\tvar rphid;\n\tvar sinphi;\n\tvar te;\n\tvar theta;\n\tvar u;\n\n\tte = ((t0 * roNumber)|0);\n\tro = te / t0;\n\trk = rkNumber;\n\tra = raNumber;\n\tif (ra <= 0.0) {\n\t\td = 1.0;\n\t} else {\n\t\tr = (1.0 - ro) / ra;\n\t\td = 1.0 - (r / (Math.exp(r) - 1.0));\n\t}\n\tphi = PI * (rk + 1.0);\n\tcosphi = Math.cos(phi);\n\tsinphi = Math.sin(phi);\n\trphid = ((ra / ro) * phi) * d;\n\tu = zeroQphicosphisinphirphid(phi, cosphi, sinphi, rphid);\n\ttheta = phi / te;\n\trho = Math.exp(u * theta);\n\ta1 = (2.0 * Math.cos(theta)) * rho;\n\ta2 = 0.0 - (rho * rho);\n\tx2 = 0.0;\n\tx1 = rho * Math.sin(theta);\n\tgamma = Math.exp(-1.0 / (ra * t0));\n\tgammapwr = Math.pow(gamma,(t0 - te));\n\tb1 = gamma;\n\tc1 = ((1.0 - gamma) * gammapwr) / (1.0 - gammapwr);\n\tnormalizeGlottalPulse();\n}\n\nfunction saveTo(origKlattOop) {\n\tvar a1Oop;\n\tvar a2Oop;\n\tvar b1Oop;\n\tvar c1Oop;\n\tvar glastOop;\n\tvar klattOop;\n\tvar nlastOop;\n\tvar pitchOop;\n\tvar vlastOop;\n\tvar x1Oop;\n\tvar x2Oop;\n\n\tinterpreterProxy.pushRemappableOop(origKlattOop);\n\tinterpreterProxy.pushRemappableOop(interpreterProxy.floatObjectOf(pitch));\n\tinterpreterProxy.pushRemappableOop(interpreterProxy.floatObjectOf(a1));\n\tinterpreterProxy.pushRemappableOop(interpreterProxy.floatObjectOf(a2));\n\tinterpreterProxy.pushRemappableOop(interpreterProxy.floatObjectOf(x1));\n\tinterpreterProxy.pushRemappableOop(interpreterProxy.floatObjectOf(x2));\n\tinterpreterProxy.pushRemappableOop(interpreterProxy.floatObjectOf(b1));\n\tinterpreterProxy.pushRemappableOop(interpreterProxy.floatObjectOf(c1));\n\tinterpreterProxy.pushRemappableOop(interpreterProxy.floatObjectOf(glast));\n\tinterpreterProxy.pushRemappableOop(interpreterProxy.floatObjectOf(vlast));\n\tnlastOop = interpreterProxy.floatObjectOf(nlast);\n\tvlastOop = interpreterProxy.popRemappableOop();\n\tglastOop = interpreterProxy.popRemappableOop();\n\tc1Oop = interpreterProxy.popRemappableOop();\n\tb1Oop = interpreterProxy.popRemappableOop();\n\tx2Oop = interpreterProxy.popRemappableOop();\n\tx1Oop = interpreterProxy.popRemappableOop();\n\ta2Oop = interpreterProxy.popRemappableOop();\n\ta1Oop = interpreterProxy.popRemappableOop();\n\tpitchOop = interpreterProxy.popRemappableOop();\n\tklattOop = interpreterProxy.popRemappableOop();\n\tif (interpreterProxy.failed()) {\n\t\treturn false;\n\t}\n\tinterpreterProxy.storePointerofObjectwithValue(2, klattOop, pitchOop);\n\tinterpreterProxy.storeIntegerofObjectwithValue(3, klattOop, t0);\n\tinterpreterProxy.storeIntegerofObjectwithValue(4, klattOop, nper);\n\tinterpreterProxy.storeIntegerofObjectwithValue(5, klattOop, nopen);\n\tinterpreterProxy.storeIntegerofObjectwithValue(6, klattOop, nmod);\n\tinterpreterProxy.storePointerofObjectwithValue(7, klattOop, a1Oop);\n\tinterpreterProxy.storePointerofObjectwithValue(8, klattOop, a2Oop);\n\tinterpreterProxy.storePointerofObjectwithValue(9, klattOop, x1Oop);\n\tinterpreterProxy.storePointerofObjectwithValue(10, klattOop, x2Oop);\n\tinterpreterProxy.storePointerofObjectwithValue(11, klattOop, b1Oop);\n\tinterpreterProxy.storePointerofObjectwithValue(12, klattOop, c1Oop);\n\tinterpreterProxy.storePointerofObjectwithValue(13, klattOop, glastOop);\n\tinterpreterProxy.storePointerofObjectwithValue(14, klattOop, vlastOop);\n\tinterpreterProxy.storePointerofObjectwithValue(15, klattOop, nlastOop);\n\tinterpreterProxy.storeIntegerofObjectwithValue(16, klattOop, periodCount);\n\tinterpreterProxy.storeIntegerofObjectwithValue(17, klattOop, samplesCount);\n\tinterpreterProxy.storeIntegerofObjectwithValue(18, klattOop, seed);\n\treturn interpreterProxy.failed() === false;\n}\n\nfunction setCurrentFrame(aKlattFrame) {\n\tvar ampF1V;\n\tvar ampF2F;\n\tvar ampF2V;\n\tvar ampF3F;\n\tvar ampF3V;\n\tvar ampF4F;\n\tvar ampF4V;\n\tvar ampF5F;\n\tvar ampF6F;\n\tvar ampFNV;\n\tvar ampFTV;\n\n\n\t/* Fudge factors... */\n\n\tframe = aKlattFrame;\n\n\t/* -4.44 dB */\n\n\tampFNV = linearFromdB(frame[Anv]) * 0.6;\n\n\t/* -4.44 dB */\n\n\tampFTV = linearFromdB(frame[Atv]) * 0.6;\n\n\t/* -7.96 dB */\n\n\tampF1V = linearFromdB(frame[A1v]) * 0.4;\n\n\t/* -16.5 dB */\n\n\tampF2V = linearFromdB(frame[A2v]) * 0.15;\n\n\t/* -24.4 dB */\n\n\tampF3V = linearFromdB(frame[A3v]) * 0.06;\n\n\t/* -28.0 dB */\n\n\tampF4V = linearFromdB(frame[A4v]) * 0.04;\n\n\t/* -16.5 dB */\n\n\tampF2F = linearFromdB(frame[A2f]) * 0.15;\n\n\t/* -24.4 dB */\n\n\tampF3F = linearFromdB(frame[A3f]) * 0.06;\n\n\t/* -28.0 dB */\n\n\tampF4F = linearFromdB(frame[A4f]) * 0.04;\n\n\t/* -33.2 dB */\n\n\tampF5F = linearFromdB(frame[A5f]) * 0.022;\n\n\t/* -30.5 dB */\n\t/* Set coefficients of variable cascade resonators */\n\n\tampF6F = linearFromdB(frame[A6f]) * 0.03;\n\tif (cascade >= 8) {\n\t\tif (samplingRate >= 16000) {\n\n\t\t\t/* Inside Nyquist rate? */\n\n\t\t\tresonatorfrequencybandwidth(R8c, 7500, 600);\n\t\t} else {\n\t\t\tcascade = 6;\n\t\t}\n\t}\n\tif (cascade >= 7) {\n\t\tif (samplingRate >= 16000) {\n\n\t\t\t/* Inside Nyquist rate? */\n\n\t\t\tresonatorfrequencybandwidth(R7c, 6500, 500);\n\t\t} else {\n\t\t\tcascade = 6;\n\t\t}\n\t}\n\tif (cascade >= 6) {\n\t\tresonatorfrequencybandwidth(R6c, frame[F6], frame[B6]);\n\t}\n\tif (cascade >= 5) {\n\t\tresonatorfrequencybandwidth(R5c, frame[F5], frame[B5]);\n\t}\n\tresonatorfrequencybandwidth(R4c, frame[F4], frame[B4]);\n\tresonatorfrequencybandwidth(R3c, frame[F3], frame[B3]);\n\tresonatorfrequencybandwidth(R2c, frame[F2], frame[B2]);\n\tresonatorfrequencybandwidth(R1c, frame[F1], frame[B1]);\n\tresonatorfrequencybandwidth(Rnpc, frame[Fnp], frame[Bnp]);\n\tresonatorfrequencybandwidth(Rtpc, frame[Ftp], frame[Btp]);\n\tantiResonatorfrequencybandwidth(Rnz, frame[Fnz], frame[Bnz]);\n\tantiResonatorfrequencybandwidth(Rtz, frame[Ftz], frame[Btz]);\n\tresonatorfrequencybandwidthgain(Rnpp, frame[Fnp], frame[Bnp], ampFNV);\n\tresonatorfrequencybandwidthgain(Rtpp, frame[Ftp], frame[Btp], ampFTV);\n\tresonatorfrequencybandwidthgain(R1vp, frame[F1], frame[B1], ampF1V);\n\tresonatorfrequencybandwidthgain(R2vp, frame[F2], frame[B2], ampF2V);\n\tresonatorfrequencybandwidthgain(R3vp, frame[F3], frame[B3], ampF3V);\n\tresonatorfrequencybandwidthgain(R4vp, frame[F4], frame[B4], ampF4V);\n\tresonatorfrequencybandwidthgain(R2fp, frame[F2], frame[B2f], ampF2F);\n\tresonatorfrequencybandwidthgain(R3fp, frame[F3], frame[B3f], ampF3F);\n\tresonatorfrequencybandwidthgain(R4fp, frame[F4], frame[B4f], ampF4F);\n\tresonatorfrequencybandwidthgain(R5fp, frame[F5], frame[B5f], ampF5F);\n\tresonatorfrequencybandwidthgain(R6fp, frame[F6], frame[B6f], ampF6F);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nfunction setInterpreter(anInterpreter) {\n\tvar ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy.majorVersion() == VM_PROXY_MAJOR;\n\tif (ok === false) {\n\t\treturn false;\n\t}\n\tok = interpreterProxy.minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\nfunction synthesizeFrameintostartingAt(aKlattFrame, buffer, startIndex) {\n\tvar ampGain;\n\tvar aspiration;\n\tvar aspirationNoise;\n\tvar bypass;\n\tvar friction;\n\tvar frictionNoise;\n\tvar gain;\n\tvar glotout;\n\tvar index;\n\tvar noise;\n\tvar out;\n\tvar parGlotout;\n\tvar parVoicing;\n\tvar source;\n\tvar temp;\n\tvar top;\n\tvar turbulence;\n\tvar voice;\n\tvar voicing;\n\n\tsetCurrentFrame(aKlattFrame);\n\tif (pitch > 0) {\n\t\tvoicing = linearFromdB(frame[Voicing] - 7);\n\t\tparVoicing = linearFromdB(frame[Voicing]);\n\t\tturbulence = linearFromdB(frame[Turbulence]) * 0.1;\n\t} else {\n\t\tvoicing = (parVoicing = (turbulence = 0.0));\n\t}\n\tfriction = linearFromdB(frame[Friction]) * 0.25;\n\taspiration = linearFromdB(frame[Aspiration]) * 0.05;\n\n\t/* -26.0 dB */\n\t/* Flod overall gain into output resonator (low-pass filter) */\n\n\tbypass = linearFromdB(frame[Bypass]) * 0.05;\n\tgain = frame[Gain] - 3;\n\tif (gain <= 0) {\n\t\tgain = 57;\n\t}\n\tampGain = linearFromdB(gain);\n\tresonatorfrequencybandwidthgain(Rout, 0, samplingRate, ampGain);\n\tnoise = nlast;\n\tindex = startIndex;\n\ttop = (samplesPerFrame + startIndex) - 1;\n\twhile (index <= top) {\n\n\t\t/* Get low-passed random number for aspiration and friction noise */\n\n\n\t\t/* radom number between -8196.0 and 8196.0 */\n\t\t/* Tilt down noise spectrum by soft low-pass filter having\n\t\t a pole near the origin in the z-plane. */\n\n\t\tnoise = (nextRandom() - 32768) / 4.0;\n\t\tnoise += 0.75 * nlast;\n\n\t\t/* Amplitude modulate noise (reduce noise amplitude during second\n\t\t half of glottal period) if voicing simultaneously present. */\n\n\t\tnlast = noise;\n\t\tif (nper > nmod) {\n\t\t\tnoise = noise * 0.5;\n\t\t}\n\n\t\t/* Compute voicing waveform. */\n\n\t\tfrictionNoise = friction * noise;\n\t\tvoice = glottalSource();\n\n\t\t/* Add turbulence during glottal open phase.\n\t\t Use random rather than noise because noise is low-passed. */\n\n\t\tvlast = voice;\n\t\tif (nper < nopen) {\n\t\t\tvoice += (turbulence * (nextRandom() - 32768)) / 4.0;\n\t\t}\n\t\tglotout = voicing * voice;\n\n\t\t/* Compute aspiration amplitude and add to voicing source. */\n\n\t\tparGlotout = parVoicing * voice;\n\t\taspirationNoise = aspiration * noise;\n\t\tglotout += aspirationNoise;\n\n\t\t/* Cascade vocal tract, excited by laryngeal sources.\n\t\t Nasal antiresonator, nasal resonator, trachearl antirresonator,\n\t\t tracheal resonator, then formants F8, F7, F6, F5, F4, F3, F2, F1. */\n\n\t\tparGlotout += aspirationNoise;\n\n\t\t/* Voice-excited parallel vocal tract F1, F2, F3, F4, FNP and FTP. */\n\n\t\tout = cascadeBranch(glotout);\n\n\t\t/* Source is voicing plus aspiration. */\n\n\t\tsource = parGlotout;\n\n\t\t/* Friction-excited parallel vocal tract formants F6, F5, F4, F3, F2,\n\t\t outputs added with alternating sign. Sound source for other\n\t\t parallel resonators is friction plus first difference of\n\t\t voicing waveform. */\n\n\t\tout += parallelVoicedBranch(source);\n\t\tsource = (frictionNoise + parGlotout) - glast;\n\t\tglast = parGlotout;\n\n\t\t/* Apply bypas and output low-pass filter */\n\n\t\tout = parallelFrictionBranch(source) - out;\n\t\tout = (bypass * source) - out;\n\t\tout = resonatorvalue(Rout, out);\n\t\ttemp = ((out * ampGain)|0);\n\t\tif (temp < -32768) {\n\t\t\ttemp = -32768;\n\t\t}\n\t\tif (temp > 32767) {\n\t\t\ttemp = 32767;\n\t\t}\n\t\tbuffer[index - 1] = temp;\n\t\t++index;\n\t\t++samplesCount;\n\t}\n}\n\n\n/*\tSet the pitch. */\n\nfunction voicedPitchSynchronousReset() {\n\n\t/* Add flutter and jitter (F0 perturbations). */\n\n\tpitch = frame[F0];\n\taddFlutter();\n\taddJitter();\n\taddFrequencyDiplophonia();\n\tif (pitch < 0) {\n\t\tpitch = 0;\n\t}\n\n\t/* Duration of period before amplitude modulation. */\n\n\tt0 = ((samplingRate / pitch)|0);\n\tnmod = t0;\n\tif (frame[Voicing] > 0) {\n\t\tnmod = nmod >> 1;\n\t}\n\n\t/* Set the LF glottal pulse model parameters. */\n\n\tnopen = ((t0 * frame[Ro])|0);\n\trorark(frame[Ro], frame[Ra], frame[Rk]);\n\taddShimmer();\n\taddAmplitudeDiplophonia();\n}\n\nfunction zeroQphicosphisinphirphid(phi, cosphi, sinphi, rphid) {\n\tvar qa;\n\tvar qb;\n\tvar qc;\n\tvar qzero;\n\tvar ua;\n\tvar ub;\n\tvar uc;\n\n\tqzero = quphicosphisinphirphid(0, phi, cosphi, sinphi, rphid);\n\tif (qzero > 0) {\n\t\tua = 0;\n\t\tub = 1;\n\t\tqa = qzero;\n\t\tqb = quphicosphisinphirphid(ub, phi, cosphi, sinphi, rphid);\n\t\twhile (qb > 0) {\n\t\t\tua = ub;\n\t\t\tqa = qb;\n\t\t\tub = ub * 2;\n\t\t\tqb = quphicosphisinphirphid(ub, phi, cosphi, sinphi, rphid);\n\t\t}\n\t} else {\n\t\tua = -1;\n\t\tub = 0;\n\t\tqa = quphicosphisinphirphid(ua, phi, cosphi, sinphi, rphid);\n\t\tqb = qzero;\n\t\twhile (qa < 0) {\n\t\t\tub = ua;\n\t\t\tqb = qa;\n\t\t\tua = ua * 2;\n\t\t\tqa = quphicosphisinphirphid(ua, phi, cosphi, sinphi, rphid);\n\t\t}\n\t}\n\twhile ((ub - ua) > Epsilon) {\n\t\tuc = (ub + ua) / 2.0;\n\t\tqc = quphicosphisinphirphid(uc, phi, cosphi, sinphi, rphid);\n\t\tif (qc > 0) {\n\t\t\tua = uc;\n\t\t\tqa = qc;\n\t\t} else {\n\t\t\tub = uc;\n\t\t\tqb = qc;\n\t\t}\n\t}\n\treturn (ub + ua) / 2.0;\n}\n\n\nSqueak.registerExternalModule(\"Klatt\", {\n\tsetInterpreter: setInterpreter,\n\tprimitiveSynthesizeFrameIntoStartingAt: primitiveSynthesizeFrameIntoStartingAt,\n\tgetModuleName: getModuleName,\n});\n\n}); // end of module\n","/* Smalltalk from Squeak4.5 with VMMaker 4.13.6 translated as JS source on 3 November 2014 1:52:21 pm */\n/* Automatically generated by\n\tJSSmartSyntaxPluginCodeGenerator VMMakerJS-bf.15 uuid: fd4e10f2-3773-4e80-8bb5-c4b471a014e5\n from\n\tLargeIntegersPlugin VMMaker-bf.353 uuid: 8ae25e7e-8d2c-451e-8277-598b30e9c002\n */\n\nmodule(\"users.bert.SqueakJS.plugins.LargeIntegers\").requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\"use strict\";\n\nvar VM_PROXY_MAJOR = 1;\nvar VM_PROXY_MINOR = 11;\n\n/*** Functions ***/\nfunction CLASSOF(obj) { return typeof obj === \"number\" ? interpreterProxy.classSmallInteger() : obj.sqClass }\nfunction SIZEOF(obj) { return obj.pointers ? obj.pointers.length : obj.words ? obj.words.length : obj.bytes ? obj.bytes.length : 0 }\nfunction BYTESIZEOF(obj) { return obj.bytes ? obj.bytes.length : obj.words ? obj.words.length * 4 : 0 }\nfunction DIV(a, b) { return Math.floor(a / b) | 0; } // integer division\nfunction MOD(a, b) { return a - DIV(a, b) * b | 0; } // signed modulus\nfunction SHL(a, b) { return b > 31 ? 0 : a << b; } // fix JS shift\nfunction SHR(a, b) { return b > 31 ? 0 : a >>> b; } // fix JS shift\nfunction SHIFT(a, b) { return b < 0 ? (b < -31 ? 0 : a >>> (0-b) ) : (b > 31 ? 0 : a << b); }\n\n/*** Variables ***/\nvar andOpIndex = 0;\nvar interpreterProxy = null;\nvar moduleName = \"LargeIntegers v1.5 (e)\";\nvar orOpIndex = 1;\nvar xorOpIndex = 2;\n\n\n\n/*\tArgument has to be aBytesOop! */\n/*\tTests for any magnitude bits in the interval from start to stopArg. */\n\nfunction anyBitOfBytesfromto(aBytesOop, start, stopArg) {\n\tvar lastByteIx;\n\tvar digit;\n\tvar magnitude;\n\tvar leftShift;\n\tvar rightShift;\n\tvar firstByteIx;\n\tvar stop;\n\tvar mask;\n\tvar ix;\n\n\t// missing DebugCode;\n\tif ((start < 1) || (stopArg < 1)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tmagnitude = aBytesOop;\n\tstop = Math.min(stopArg, highBitOfBytes(magnitude));\n\tif (start > stop) {\n\t\treturn false;\n\t}\n\tfirstByteIx = ((start - 1) >> 3) + 1;\n\tlastByteIx = ((stop - 1) >> 3) + 1;\n\trightShift = MOD((start - 1), 8);\n\tleftShift = 7 - (MOD((stop - 1), 8));\n\tif (firstByteIx === lastByteIx) {\n\t\tmask = (SHL(255, rightShift)) & (SHR(255, leftShift));\n\t\tdigit = digitOfBytesat(magnitude, firstByteIx);\n\t\treturn (digit & mask) !== 0;\n\t}\n\tif ((SHR(digitOfBytesat(magnitude, firstByteIx), rightShift)) !== 0) {\n\t\treturn true;\n\t}\n\tfor (ix = (firstByteIx + 1); ix <= (lastByteIx - 1); ix++) {\n\t\tif (digitOfBytesat(magnitude, ix) !== 0) {\n\t\t\treturn true;\n\t\t}\n\t}\n\tif (((SHL(digitOfBytesat(magnitude, lastByteIx), leftShift)) & 255) !== 0) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n/*\tPrecondition: bytesOop is not anInteger and a bytes object. */\n/*\tFunction #byteSizeOf: is used by the interpreter, be careful with name\n\tclashes... */\n\nfunction byteSizeOfBytes(bytesOop) {\n\treturn SIZEOF(bytesOop);\n}\n\n\n/*\tAttention: this method invalidates all oop's! Only newBytes is valid at return. */\n/*\tDoes not normalize. */\n\nfunction bytesgrowTo(aBytesObject, newLen) {\n\tvar oldLen;\n\tvar copyLen;\n\tvar newBytes;\n\n\tnewBytes = interpreterProxy.instantiateClassindexableSize(CLASSOF(aBytesObject), newLen);\n;\n\toldLen = BYTESIZEOF(aBytesObject);\n\tif (oldLen < newLen) {\n\t\tcopyLen = oldLen;\n\t} else {\n\t\tcopyLen = newLen;\n\t}\n\tcDigitCopyFromtolen(aBytesObject.bytes, newBytes.bytes, copyLen);\n\treturn newBytes;\n}\n\n\n/*\tAttention: this method invalidates all oop's! Only newBytes is valid at return. */\n\nfunction bytesOrIntgrowTo(oop, len) {\n\tvar sq_class;\n\tvar val;\n\tvar newBytes;\n\n\tif (typeof oop === \"number\") {\n\t\tval = oop;\n\t\tif (val < 0) {\n\t\t\tsq_class = interpreterProxy.classLargeNegativeInteger();\n\t\t} else {\n\t\t\tsq_class = interpreterProxy.classLargePositiveInteger();\n\t\t}\n\t\tnewBytes = interpreterProxy.instantiateClassindexableSize(sq_class, len);\n\t\tcCopyIntValtoBytes(val, newBytes);\n\t} else {\n\t\tnewBytes = bytesgrowTo(oop, len);\n\t}\n\treturn newBytes;\n}\n\nfunction cCopyIntValtoBytes(val, bytes) {\n\tvar pByte;\n\tvar ix;\n\tvar ixLimiT;\n\n\tpByte = bytes.bytes;\n\tfor (ix = 1, ixLimiT = cDigitLengthOfCSI(val); ix <= ixLimiT; ix++) {\n\t\tpByte[ix - 1] = cDigitOfCSIat(val, ix);\n\t}\n}\n\n\n/*\tpByteRes len = longLen; returns over.. */\n\nfunction cDigitAddlenwithleninto(pByteShort, shortLen, pByteLong, longLen, pByteRes) {\n\tvar i;\n\tvar limit;\n\tvar accum;\n\n\taccum = 0;\n\tlimit = shortLen - 1;\n\tfor (i = 0; i <= limit; i++) {\n\t\taccum = ((accum >>> 8) + pByteShort[i]) + pByteLong[i];\n\t\tpByteRes[i] = (accum & 255);\n\t}\n\tlimit = longLen - 1;\n\tfor (i = shortLen; i <= limit; i++) {\n\t\taccum = (accum >>> 8) + pByteLong[i];\n\t\tpByteRes[i] = (accum & 255);\n\t}\n\treturn accum >>> 8;\n}\n\n\n/*\tPrecondition: pFirst len = pSecond len. */\n\nfunction cDigitComparewithlen(pFirst, pSecond, len) {\n\tvar firstDigit;\n\tvar secondDigit;\n\tvar ix;\n\n\tix = len - 1;\n\twhile (ix >= 0) {\n\t\tif (((secondDigit = pSecond[ix])) !== ((firstDigit = pFirst[ix]))) {\n\t\t\tif (secondDigit < firstDigit) {\n\t\t\t\treturn 1;\n\t\t\t} else {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t\t--ix;\n\t}\n\treturn 0;\n}\n\nfunction cDigitCopyFromtolen(pFrom, pTo, len) {\n\tvar limit;\n\tvar i;\n\n\t;\n\tlimit = len - 1;\n\tfor (i = 0; i <= limit; i++) {\n\t\tpTo[i] = pFrom[i];\n\t}\n\treturn 0;\n}\n\nfunction cDigitDivlenremlenquolen(pDiv, divLen, pRem, remLen, pQuo, quoLen) {\n\tvar b;\n\tvar q;\n\tvar a;\n\tvar dnh;\n\tvar lo;\n\tvar hi;\n\tvar r3;\n\tvar mul;\n\tvar cond;\n\tvar l;\n\tvar k;\n\tvar j;\n\tvar i;\n\tvar dl;\n\tvar ql;\n\tvar r1r2;\n\tvar dh;\n\tvar t;\n\n\n\t/* Last actual byte of data (ST ix) */\n\n\tdl = divLen - 1;\n\tql = quoLen;\n\tdh = pDiv[dl - 1];\n\tif (dl === 1) {\n\t\tdnh = 0;\n\t} else {\n\t\tdnh = pDiv[dl - 2];\n\t}\n\tfor (k = 1; k <= ql; k++) {\n\n\t\t/* maintain quo*arg+rem=self */\n\t\t/* Estimate rem/div by dividing the leading two digits of rem by dh. */\n\t\t/* The estimate is q = qhi*16r100+qlo, where qhi and qlo are unsigned char. */\n\n\n\t\t/* r1 := rem digitAt: j. */\n\n\t\tj = (remLen + 1) - k;\n\t\tif (pRem[j - 1] === dh) {\n\t\t\tq = 255;\n\t\t} else {\n\n\t\t\t/* Compute q = (r1,r2)//dh, t = (r1,r2)\\\\dh. */\n\t\t\t/* r2 := (rem digitAt: j - 2). */\n\n\t\t\tr1r2 = pRem[j - 1];\n\t\t\tr1r2 = (r1r2 << 8) + pRem[j - 2];\n\t\t\tt = MOD(r1r2, dh);\n\n\t\t\t/* Next compute (hi,lo) := q*dnh */\n\n\t\t\tq = DIV(r1r2, dh);\n\t\t\tmul = q * dnh;\n\t\t\thi = mul >>> 8;\n\n\t\t\t/* Correct overestimate of q. \n\t\t\t\tMax of 2 iterations through loop -- see Knuth vol. 2 */\n\n\t\t\tlo = mul & 255;\n\t\t\tif (j < 3) {\n\t\t\t\tr3 = 0;\n\t\t\t} else {\n\t\t\t\tr3 = pRem[j - 3];\n\t\t\t}\n\t\t\t\t\twhile (true) {\n\t\t\t\tif ((t < hi) || ((t === hi) && (r3 < lo))) {\n\n\t\t\t\t\t/* i.e. (t,r3) < (hi,lo) */\n\n\t\t\t\t\t--q;\n\t\t\t\t\tif (lo < dnh) {\n\t\t\t\t\t\t--hi;\n\t\t\t\t\t\tlo = (lo + 256) - dnh;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlo -= dnh;\n\t\t\t\t\t}\n\t\t\t\t\tcond = hi >= dh;\n\t\t\t\t} else {\n\t\t\t\t\tcond = false;\n\t\t\t\t}\n\t\t\t\tif (!(cond)) break;\n\t\t\t\thi -= dh;\n\t\t\t}\n\t\t}\n\t\tl = j - dl;\n\t\ta = 0;\n\t\tfor (i = 1; i <= divLen; i++) {\n\t\t\thi = pDiv[i - 1] * (q >>> 8);\n\t\t\tlo = pDiv[i - 1] * (q & 255);\n\t\t\tb = (pRem[l - 1] - a) - (lo & 255);\n\t\t\tpRem[l - 1] = (b & 255);\n\n\t\t\t/* This is a possible replacement to simulate arithmetic shift (preserving sign of b) */\n\t\t\t/* b := b >> 8 bitOr: (0 - (b >> ((interpreterProxy sizeof: b)*8 */\n\t\t\t/* CHAR_BIT */\n\t\t\t/* -1)) << 8). */\n\n\t\t\tb = b >> 8;\n\t\t\ta = (hi + (lo >>> 8)) - b;\n\t\t\t++l;\n\t\t}\n\t\tif (a > 0) {\n\n\t\t\t/* Add div back into rem, decrease q by 1 */\n\n\t\t\t--q;\n\t\t\tl = j - dl;\n\t\t\ta = 0;\n\t\t\tfor (i = 1; i <= divLen; i++) {\n\t\t\t\ta = ((a >>> 8) + pRem[l - 1]) + pDiv[i - 1];\n\t\t\t\tpRem[l - 1] = (a & 255);\n\t\t\t\t++l;\n\t\t\t}\n\t\t}\n\t\tpQuo[quoLen - k] = q;\n\t}\n\treturn 0;\n}\n\n\n/*\tAnswer the index (in bits) of the high order bit of the receiver, or zero if the \n\t receiver is zero. This method is allowed (and needed) for \n\tLargeNegativeIntegers as well, since Squeak's LargeIntegers are \n\tsign/magnitude. */\n\nfunction cDigitHighBitlen(pByte, len) {\n\tvar lastDigit;\n\tvar realLength;\n\n\trealLength = len;\n\twhile (((lastDigit = pByte[realLength - 1])) === 0) {\n\t\tif (((--realLength)) === 0) {\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn cHighBit(lastDigit) + (8 * (realLength - 1));\n}\n\n\n/*\tAnswer the number of indexable fields of a CSmallInteger. This value is \n\t the same as the largest legal subscript. */\n\nfunction cDigitLengthOfCSI(csi) {\n\tif ((csi < 256) && (csi > -256)) {\n\t\treturn 1;\n\t}\n\tif ((csi < 65536) && (csi > -65536)) {\n\t\treturn 2;\n\t}\n\tif ((csi < 16777216) && (csi > -16777216)) {\n\t\treturn 3;\n\t}\n\treturn 4;\n}\n\n\n/*\tC indexed! */\n\nfunction cDigitLshiftfromlentolen(shiftCount, pFrom, lenFrom, pTo, lenTo) {\n\tvar digitShift;\n\tvar carry;\n\tvar digit;\n\tvar i;\n\tvar bitShift;\n\tvar rshift;\n\tvar limit;\n\n\tdigitShift = shiftCount >> 3;\n\tbitShift = MOD(shiftCount, 8);\n\tlimit = digitShift - 1;\n\tfor (i = 0; i <= limit; i++) {\n\t\tpTo[i] = 0;\n\t}\n\tif (bitShift === 0) {\n\n\t\t/* Fast version for digit-aligned shifts */\n\t\t/* C indexed! */\n\n\t\treturn cDigitReplacefromtowithstartingAt(pTo, digitShift, lenTo - 1, pFrom, 0);\n\t}\n\trshift = 8 - bitShift;\n\tcarry = 0;\n\tlimit = lenFrom - 1;\n\tfor (i = 0; i <= limit; i++) {\n\t\tdigit = pFrom[i];\n\t\tpTo[i + digitShift] = ((carry | (SHL(digit, bitShift))) & 255);\n\t\tcarry = SHR(digit, rshift);\n\t}\n\tif (carry !== 0) {\n\t\tpTo[lenTo - 1] = carry;\n\t}\n\treturn 0;\n}\n\nfunction cDigitMontgomerylentimeslenmodulolenmInvModBinto(pBytesFirst, firstLen, pBytesSecond, secondLen, pBytesThird, thirdLen, mInv, pBytesRes) {\n\tvar k;\n\tvar i;\n\tvar lastByte;\n\tvar limit3;\n\tvar limit2;\n\tvar limit1;\n\tvar u;\n\tvar accum;\n\n\tlimit1 = firstLen - 1;\n\tlimit2 = secondLen - 1;\n\tlimit3 = thirdLen - 1;\n\tlastByte = 0;\n\tfor (i = 0; i <= limit1; i++) {\n\t\taccum = pBytesRes[0] + (pBytesFirst[i] * pBytesSecond[0]);\n\t\tu = (accum * mInv) & 255;\n\t\taccum += u * pBytesThird[0];\n\t\tfor (k = 1; k <= limit2; k++) {\n\t\t\taccum = (((accum >>> 8) + pBytesRes[k]) + (pBytesFirst[i] * pBytesSecond[k])) + (u * pBytesThird[k]);\n\t\t\tpBytesRes[k - 1] = (accum & 255);\n\t\t}\n\t\tfor (k = secondLen; k <= limit3; k++) {\n\t\t\taccum = ((accum >>> 8) + pBytesRes[k]) + (u * pBytesThird[k]);\n\t\t\tpBytesRes[k - 1] = (accum & 255);\n\t\t}\n\t\taccum = (accum >>> 8) + lastByte;\n\t\tpBytesRes[limit3] = (accum & 255);\n\t\tlastByte = accum >>> 8;\n\t}\n\tfor (i = firstLen; i <= limit3; i++) {\n\t\taccum = pBytesRes[0];\n\t\tu = (accum * mInv) & 255;\n\t\taccum += u * pBytesThird[0];\n\t\tfor (k = 1; k <= limit3; k++) {\n\t\t\taccum = ((accum >>> 8) + pBytesRes[k]) + (u * pBytesThird[k]);\n\t\t\tpBytesRes[k - 1] = (accum & 255);\n\t\t}\n\t\taccum = (accum >>> 8) + lastByte;\n\t\tpBytesRes[limit3] = (accum & 255);\n\t\tlastByte = accum >>> 8;\n\t}\n\tif (!((lastByte === 0) && (cDigitComparewithlen(pBytesThird, pBytesRes, thirdLen) === 1))) {\n\n\t\t/* self cDigitSub: pBytesThird len: thirdLen with: pBytesRes len: thirdLen into: pBytesRes */\n\n\t\taccum = 0;\n\t\tfor (i = 0; i <= limit3; i++) {\n\t\t\taccum = (accum + pBytesRes[i]) - pBytesThird[i];\n\t\t\tpBytesRes[i] = (accum & 255);\n\t\t\taccum = accum >> 8;\n\t\t}\n\t}\n}\n\nfunction cDigitMultiplylenwithleninto(pByteShort, shortLen, pByteLong, longLen, pByteRes) {\n\tvar ab;\n\tvar j;\n\tvar digit;\n\tvar carry;\n\tvar i;\n\tvar limitLong;\n\tvar k;\n\tvar limitShort;\n\n\tif ((shortLen === 1) && (pByteShort[0] === 0)) {\n\t\treturn 0;\n\t}\n\tif ((longLen === 1) && (pByteLong[0] === 0)) {\n\t\treturn 0;\n\t}\n\tlimitShort = shortLen - 1;\n\tlimitLong = longLen - 1;\n\tfor (i = 0; i <= limitShort; i++) {\n\t\tif (((digit = pByteShort[i])) !== 0) {\n\t\t\tk = i;\n\n\t\t\t/* Loop invariant: 0<=carry<=0377, k=i+j-1 (ST) */\n\t\t\t/* -> Loop invariant: 0<=carry<=0377, k=i+j (C) (?) */\n\n\t\t\tcarry = 0;\n\t\t\tfor (j = 0; j <= limitLong; j++) {\n\t\t\t\tab = pByteLong[j];\n\t\t\t\tab = ((ab * digit) + carry) + pByteRes[k];\n\t\t\t\tcarry = ab >>> 8;\n\t\t\t\tpByteRes[k] = (ab & 255);\n\t\t\t\t++k;\n\t\t\t}\n\t\t\tpByteRes[k] = carry;\n\t\t}\n\t}\n\treturn 0;\n}\n\n\n/*\tAnswer the value of an indexable field in the receiver. \n\tLargePositiveInteger uses bytes of base two number, and each is a \n\t 'digit' base 256. */\n/*\tST indexed! */\n\nfunction cDigitOfCSIat(csi, ix) {\n\tif (ix < 1) {\n\t\tinterpreterProxy.primitiveFail();\n\t}\n\tif (ix > 4) {\n\t\treturn 0;\n\t}\n\tif (csi < 0) {\n\t\t;\n\t\treturn (SHR((0 - csi), ((ix - 1) * 8))) & 255;\n\t} else {\n\t\treturn (SHR(csi, ((ix - 1) * 8))) & 255;\n\t}\n}\n\n\n/*\tpByteRes len = longLen. */\n\nfunction cDigitOpshortlenlongleninto(opIndex, pByteShort, shortLen, pByteLong, longLen, pByteRes) {\n\tvar i;\n\tvar limit;\n\n\tlimit = shortLen - 1;\n\tif (opIndex === andOpIndex) {\n\t\tfor (i = 0; i <= limit; i++) {\n\t\t\tpByteRes[i] = (pByteShort[i] & pByteLong[i]);\n\t\t}\n\t\tlimit = longLen - 1;\n\t\tfor (i = shortLen; i <= limit; i++) {\n\t\t\tpByteRes[i] = 0;\n\t\t}\n\t\treturn 0;\n\t}\n\tif (opIndex === orOpIndex) {\n\t\tfor (i = 0; i <= limit; i++) {\n\t\t\tpByteRes[i] = (pByteShort[i] | pByteLong[i]);\n\t\t}\n\t\tlimit = longLen - 1;\n\t\tfor (i = shortLen; i <= limit; i++) {\n\t\t\tpByteRes[i] = pByteLong[i];\n\t\t}\n\t\treturn 0;\n\t}\n\tif (opIndex === xorOpIndex) {\n\t\tfor (i = 0; i <= limit; i++) {\n\t\t\tpByteRes[i] = (pByteShort[i] ^ pByteLong[i]);\n\t\t}\n\t\tlimit = longLen - 1;\n\t\tfor (i = shortLen; i <= limit; i++) {\n\t\t\tpByteRes[i] = pByteLong[i];\n\t\t}\n\t\treturn 0;\n\t}\n\treturn interpreterProxy.primitiveFail();\n}\n\n\n/*\tC indexed! */\n\nfunction cDigitReplacefromtowithstartingAt(pTo, start, stop, pFrom, repStart) {\n\treturn function() {\n\t\t// inlining self cDigitCopyFrom: pFrom + repStart to: pTo + start len: stop - start + 1\n\t\tvar len = stop - start + 1;\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tpTo[i + start] = pFrom[i + repStart];\n\t\t}\n\t\treturn 0;\n\t}();\n;\n}\n\nfunction cDigitRshiftfromlentolen(shiftCount, pFrom, fromLen, pTo, toLen) {\n\tvar j;\n\tvar digitShift;\n\tvar carry;\n\tvar digit;\n\tvar bitShift;\n\tvar leftShift;\n\tvar limit;\n\tvar start;\n\n\tdigitShift = shiftCount >> 3;\n\tbitShift = MOD(shiftCount, 8);\n\tif (bitShift === 0) {\n\n\t\t/* Fast version for byte-aligned shifts */\n\t\t/* C indexed! */\n\n\t\treturn cDigitReplacefromtowithstartingAt(pTo, 0, toLen - 1, pFrom, digitShift);\n\t}\n\tleftShift = 8 - bitShift;\n\tcarry = SHR(pFrom[digitShift], bitShift);\n\tstart = digitShift + 1;\n\tlimit = fromLen - 1;\n\tfor (j = start; j <= limit; j++) {\n\t\tdigit = pFrom[j];\n\t\tpTo[j - start] = ((carry | (SHL(digit, leftShift))) & 255);\n\t\tcarry = SHR(digit, bitShift);\n\t}\n\tif (carry !== 0) {\n\t\tpTo[toLen - 1] = carry;\n\t}\n\treturn 0;\n}\n\nfunction cDigitSublenwithleninto(pByteSmall, smallLen, pByteLarge, largeLen, pByteRes) {\n\tvar i;\n\tvar z;\n\n\n\t/* Loop invariant is -1<=z<=0 */\n\n\tz = 0;\n\tfor (i = 0; i <= (smallLen - 1); i++) {\n\t\tz = (z + pByteLarge[i]) - pByteSmall[i];\n\t\tpByteRes[i] = (z & 255);\n\t\tz = z >> 8;\n\t}\n\tfor (i = smallLen; i <= (largeLen - 1); i++) {\n\t\tz += pByteLarge[i];\n\t\tpByteRes[i] = (z & 255);\n\t\tz = z >> 8;\n\t}\n}\n\n\n/*\tAnswer the index of the high order bit of the argument, or zero if the \n\targument is zero. */\n/*\tFor 64 bit uints there could be added a 32-shift. */\n\nfunction cHighBit(uint) {\n\tvar shifted;\n\tvar bitNo;\n\n\tshifted = uint;\n\tbitNo = 0;\n\tif (!(shifted < (1 << 16))) {\n\t\tshifted = shifted >>> 16;\n\t\tbitNo += 16;\n\t}\n\tif (!(shifted < (1 << 8))) {\n\t\tshifted = shifted >>> 8;\n\t\tbitNo += 8;\n\t}\n\tif (!(shifted < (1 << 4))) {\n\t\tshifted = shifted >>> 4;\n\t\tbitNo += 4;\n\t}\n\tif (!(shifted < (1 << 2))) {\n\t\tshifted = shifted >>> 2;\n\t\tbitNo += 2;\n\t}\n\tif (!(shifted < (1 << 1))) {\n\t\tshifted = shifted >>> 1;\n\t\t++bitNo;\n\t}\n\treturn bitNo + shifted;\n}\n\n\n/*\tanOop has to be a SmallInteger! */\n\nfunction createLargeFromSmallInteger(anOop) {\n\tvar size;\n\tvar res;\n\tvar pByte;\n\tvar ix;\n\tvar sq_class;\n\tvar val;\n\n\tval = anOop;\n\tif (val < 0) {\n\t\tsq_class = interpreterProxy.classLargeNegativeInteger();\n\t} else {\n\t\tsq_class = interpreterProxy.classLargePositiveInteger();\n\t}\n\tsize = cDigitLengthOfCSI(val);\n\tres = interpreterProxy.instantiateClassindexableSize(sq_class, size);\n\tpByte = res.bytes;\n\tfor (ix = 1; ix <= size; ix++) {\n\t\tpByte[ix - 1] = cDigitOfCSIat(val, ix);\n\t}\n\treturn res;\n}\n\n\n/*\tAttention: this method invalidates all oop's! Only newBytes is valid at return. */\n/*\tDoes not normalize. */\n\nfunction digitLshift(aBytesOop, shiftCount) {\n\tvar newLen;\n\tvar oldLen;\n\tvar newBytes;\n\tvar highBit;\n\n\toldLen = BYTESIZEOF(aBytesOop);\n\tif (((highBit = cDigitHighBitlen(aBytesOop.bytes, oldLen))) === 0) {\n\t\treturn 0;\n\t}\n\tnewLen = ((highBit + shiftCount) + 7) >> 3;\n\tnewBytes = interpreterProxy.instantiateClassindexableSize(CLASSOF(aBytesOop), newLen);\n;\n\tcDigitLshiftfromlentolen(shiftCount, aBytesOop.bytes, oldLen, newBytes.bytes, newLen);\n\treturn newBytes;\n}\n\n\n/*\tAttention: this method invalidates all oop's! Only newBytes is valid at return. */\n/*\tShift right shiftCount bits, 0<=shiftCount. \n\tDiscard all digits beyond a, and all zeroes at or below a. */\n/*\tDoes not normalize. */\n\nfunction digitRshiftlookfirst(aBytesOop, shiftCount, a) {\n\tvar newOop;\n\tvar oldDigitLen;\n\tvar newByteLen;\n\tvar newBitLen;\n\tvar oldBitLen;\n\n\toldBitLen = cDigitHighBitlen(aBytesOop.bytes, a);\n\toldDigitLen = (oldBitLen + 7) >> 3;\n\tnewBitLen = oldBitLen - shiftCount;\n\tif (newBitLen <= 0) {\n\n\t\t/* All bits lost */\n\n\t\treturn interpreterProxy.instantiateClassindexableSize(CLASSOF(aBytesOop), 0);\n\t}\n\tnewByteLen = (newBitLen + 7) >> 3;\n\tnewOop = interpreterProxy.instantiateClassindexableSize(CLASSOF(aBytesOop), newByteLen);\n;\n\tcDigitRshiftfromlentolen(shiftCount, aBytesOop.bytes, oldDigitLen, newOop.bytes, newByteLen);\n\treturn newOop;\n}\n\n\n/*\tDoes not need to normalize! */\n\nfunction digitAddLargewith(firstInteger, secondInteger) {\n\tvar sum;\n\tvar shortLen;\n\tvar over;\n\tvar shortInt;\n\tvar resClass;\n\tvar newSum;\n\tvar longLen;\n\tvar firstLen;\n\tvar secondLen;\n\tvar longInt;\n\n\tfirstLen = BYTESIZEOF(firstInteger);\n\tsecondLen = BYTESIZEOF(secondInteger);\n\tresClass = CLASSOF(firstInteger);\n\tif (firstLen <= secondLen) {\n\t\tshortInt = firstInteger;\n\t\tshortLen = firstLen;\n\t\tlongInt = secondInteger;\n\t\tlongLen = secondLen;\n\t} else {\n\t\tshortInt = secondInteger;\n\t\tshortLen = secondLen;\n\t\tlongInt = firstInteger;\n\t\tlongLen = firstLen;\n\t}\n\tsum = interpreterProxy.instantiateClassindexableSize(resClass, longLen);\n;\n\tover = cDigitAddlenwithleninto(shortInt.bytes, shortLen, longInt.bytes, longLen, sum.bytes);\n\tif (over > 0) {\n\n\t\t/* sum := sum growby: 1. */\n\n\t\t\tnewSum = interpreterProxy.instantiateClassindexableSize(resClass, longLen + 1);\n;\n\t\tcDigitCopyFromtolen(sum.bytes, newSum.bytes, longLen);\n\n\t\t/* C index! */\n\n\t\tsum = newSum;\n\t\tsum.bytes[longLen] = over;\n\t}\n\treturn sum;\n}\n\n\n/*\tBit logic here is only implemented for positive integers or Zero;\n\tif rec or arg is negative, it fails. */\n\nfunction digitBitLogicwithopIndex(firstInteger, secondInteger, opIx) {\n\tvar shortLen;\n\tvar shortLarge;\n\tvar firstLarge;\n\tvar secondLarge;\n\tvar longLen;\n\tvar longLarge;\n\tvar firstLen;\n\tvar secondLen;\n\tvar result;\n\n\tif (typeof firstInteger === \"number\") {\n\t\tif (firstInteger < 0) {\n\t\t\treturn interpreterProxy.primitiveFail();\n\t\t}\n\t\t\tfirstLarge = createLargeFromSmallInteger(firstInteger);\n;\n\t} else {\n\t\tif (CLASSOF(firstInteger) === interpreterProxy.classLargeNegativeInteger()) {\n\t\t\treturn interpreterProxy.primitiveFail();\n\t\t}\n\t\tfirstLarge = firstInteger;\n\t}\n\tif (typeof secondInteger === \"number\") {\n\t\tif (secondInteger < 0) {\n\t\t\treturn interpreterProxy.primitiveFail();\n\t\t}\n\t\t\tsecondLarge = createLargeFromSmallInteger(secondInteger);\n;\n\t} else {\n\t\tif (CLASSOF(secondInteger) === interpreterProxy.classLargeNegativeInteger()) {\n\t\t\treturn interpreterProxy.primitiveFail();\n\t\t}\n\t\tsecondLarge = secondInteger;\n\t}\n\tfirstLen = BYTESIZEOF(firstLarge);\n\tsecondLen = BYTESIZEOF(secondLarge);\n\tif (firstLen < secondLen) {\n\t\tshortLen = firstLen;\n\t\tshortLarge = firstLarge;\n\t\tlongLen = secondLen;\n\t\tlongLarge = secondLarge;\n\t} else {\n\t\tshortLen = secondLen;\n\t\tshortLarge = secondLarge;\n\t\tlongLen = firstLen;\n\t\tlongLarge = firstLarge;\n\t}\n\tresult = interpreterProxy.instantiateClassindexableSize(interpreterProxy.classLargePositiveInteger(), longLen);\n;\n\tcDigitOpshortlenlongleninto(opIx, shortLarge.bytes, shortLen, longLarge.bytes, longLen, result.bytes);\n\tif (interpreterProxy.failed()) {\n\t\treturn 0;\n\t}\n\treturn normalizePositive(result);\n}\n\n\n/*\tCompare the magnitude of firstInteger with that of secondInteger. \n\tReturn a code of 1, 0, -1 for firstInteger >, = , < secondInteger */\n\nfunction digitCompareLargewith(firstInteger, secondInteger) {\n\tvar secondLen;\n\tvar firstLen;\n\n\tfirstLen = BYTESIZEOF(firstInteger);\n\tsecondLen = BYTESIZEOF(secondInteger);\n\tif (secondLen !== firstLen) {\n\t\tif (secondLen > firstLen) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\treturn 1;\n\t\t}\n\t}\n\treturn cDigitComparewithlen(firstInteger.bytes, secondInteger.bytes, firstLen);\n}\n\n\n/*\tDoes not normalize. */\n/*\tDivision by zero has to be checked in caller. */\n\nfunction digitDivLargewithnegative(firstInteger, secondInteger, neg) {\n\tvar resultClass;\n\tvar result;\n\tvar rem;\n\tvar div;\n\tvar quo;\n\tvar d;\n\tvar l;\n\tvar secondLen;\n\tvar firstLen;\n\n\tfirstLen = BYTESIZEOF(firstInteger);\n\tsecondLen = BYTESIZEOF(secondInteger);\n\tif (neg) {\n\t\tresultClass = interpreterProxy.classLargeNegativeInteger();\n\t} else {\n\t\tresultClass = interpreterProxy.classLargePositiveInteger();\n\t}\n\tl = (firstLen - secondLen) + 1;\n\tif (l <= 0) {\n\t\t\tresult = interpreterProxy.instantiateClassindexableSize(interpreterProxy.classArray(), 2);\n;\n\t\tinterpreterProxy.stObjectatput(result,1,0);\n\t\tinterpreterProxy.stObjectatput(result,2,firstInteger);\n\t\treturn result;\n\t}\n\td = 8 - cHighBit(unsafeByteOfat(secondInteger, secondLen));\n\tdiv = digitLshift(secondInteger, d);\ndiv = bytesOrIntgrowTo(div, digitLength(div) + 1);\n;\n\trem = digitLshift(firstInteger, d);\nif (digitLength(rem) === firstLen) {\n\trem = bytesOrIntgrowTo(rem, firstLen + 1);\n}\n;\n\tquo = interpreterProxy.instantiateClassindexableSize(resultClass, l);\n;\n\tcDigitDivlenremlenquolen(div.bytes, digitLength(div), rem.bytes, digitLength(rem), quo.bytes, digitLength(quo));\n\trem = digitRshiftlookfirst(rem, d, digitLength(div) - 1);\n;\n\tresult = interpreterProxy.instantiateClassindexableSize(interpreterProxy.classArray(), 2);\n;\n\tinterpreterProxy.stObjectatput(result,1,quo);\n\tinterpreterProxy.stObjectatput(result,2,rem);\n\treturn result;\n}\n\nfunction digitLength(oop) {\n\tif (typeof oop === \"number\") {\n\t\treturn cDigitLengthOfCSI(oop);\n\t} else {\n\t\treturn BYTESIZEOF(oop);\n\t}\n}\n\nfunction digitMontgomerytimesmodulomInvModB(firstLarge, secondLarge, thirdLarge, mInv) {\n\tvar prod;\n\tvar thirdLen;\n\tvar firstLen;\n\tvar secondLen;\n\n\tfirstLen = BYTESIZEOF(firstLarge);\n\tsecondLen = BYTESIZEOF(secondLarge);\n\tthirdLen = BYTESIZEOF(thirdLarge);\n\tif (!(firstLen <= thirdLen)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (!(secondLen <= thirdLen)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (!((mInv >= 0) && (mInv <= 255))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tprod = interpreterProxy.instantiateClassindexableSize(interpreterProxy.classLargePositiveInteger(), thirdLen);\n;\n\tcDigitMontgomerylentimeslenmodulolenmInvModBinto(firstLarge.bytes, firstLen, secondLarge.bytes, secondLen, thirdLarge.bytes, thirdLen, mInv, prod.bytes);\n\treturn normalizePositive(prod);\n}\n\n\n/*\tNormalizes. */\n\nfunction digitMultiplyLargewithnegative(firstInteger, secondInteger, neg) {\n\tvar longInt;\n\tvar resultClass;\n\tvar shortLen;\n\tvar shortInt;\n\tvar longLen;\n\tvar prod;\n\tvar secondLen;\n\tvar firstLen;\n\n\tfirstLen = BYTESIZEOF(firstInteger);\n\tsecondLen = BYTESIZEOF(secondInteger);\n\tif (firstLen <= secondLen) {\n\t\tshortInt = firstInteger;\n\t\tshortLen = firstLen;\n\t\tlongInt = secondInteger;\n\t\tlongLen = secondLen;\n\t} else {\n\t\tshortInt = secondInteger;\n\t\tshortLen = secondLen;\n\t\tlongInt = firstInteger;\n\t\tlongLen = firstLen;\n\t}\n\tif (neg) {\n\t\tresultClass = interpreterProxy.classLargeNegativeInteger();\n\t} else {\n\t\tresultClass = interpreterProxy.classLargePositiveInteger();\n\t}\n\tprod = interpreterProxy.instantiateClassindexableSize(resultClass, longLen + shortLen);\n;\n\tcDigitMultiplylenwithleninto(shortInt.bytes, shortLen, longInt.bytes, longLen, prod.bytes);\n\treturn normalize(prod);\n}\n\n\n/*\tArgument has to be aLargeInteger! */\n\nfunction digitOfBytesat(aBytesOop, ix) {\n\tif (ix > BYTESIZEOF(aBytesOop)) {\n\t\treturn 0;\n\t} else {\n\t\treturn unsafeByteOfat(aBytesOop, ix);\n\t}\n}\n\n\n/*\tNormalizes. */\n\nfunction digitSubLargewith(firstInteger, secondInteger) {\n\tvar smallerLen;\n\tvar larger;\n\tvar res;\n\tvar smaller;\n\tvar resLen;\n\tvar largerLen;\n\tvar firstNeg;\n\tvar firstLen;\n\tvar secondLen;\n\tvar neg;\n\n\tfirstNeg = CLASSOF(firstInteger) === interpreterProxy.classLargeNegativeInteger();\n\tfirstLen = BYTESIZEOF(firstInteger);\n\tsecondLen = BYTESIZEOF(secondInteger);\n\tif (firstLen === secondLen) {\n\t\twhile ((firstLen > 1) && (digitOfBytesat(firstInteger, firstLen) === digitOfBytesat(secondInteger, firstLen))) {\n\t\t\t--firstLen;\n\t\t}\n\t\tsecondLen = firstLen;\n\t}\n\tif ((firstLen < secondLen) || ((firstLen === secondLen) && (digitOfBytesat(firstInteger, firstLen) < digitOfBytesat(secondInteger, firstLen)))) {\n\t\tlarger = secondInteger;\n\t\tlargerLen = secondLen;\n\t\tsmaller = firstInteger;\n\t\tsmallerLen = firstLen;\n\t\tneg = firstNeg === false;\n\t} else {\n\t\tlarger = firstInteger;\n\t\tlargerLen = firstLen;\n\t\tsmaller = secondInteger;\n\t\tsmallerLen = secondLen;\n\t\tneg = firstNeg;\n\t}\n\tresLen = largerLen;\n\tres = interpreterProxy.instantiateClassindexableSize((neg\n\t? interpreterProxy.classLargeNegativeInteger()\n\t: interpreterProxy.classLargePositiveInteger()), resLen);\n;\n\tcDigitSublenwithleninto(smaller.bytes, smallerLen, larger.bytes, largerLen, res.bytes);\n\treturn (neg\n\t\t? normalizeNegative(res)\n\t\t: normalizePositive(res));\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nfunction getModuleName() {\n\treturn moduleName;\n}\n\nfunction halt() {\n\t;\n}\n\nfunction highBitOfBytes(aBytesOop) {\n\treturn cDigitHighBitlen(aBytesOop.bytes, BYTESIZEOF(aBytesOop));\n}\n\nfunction isNormalized(anInteger) {\n\tvar ix;\n\tvar len;\n\tvar sLen;\n\tvar minVal;\n\tvar maxVal;\n\n\tif (typeof anInteger === \"number\") {\n\t\treturn true;\n\t}\n\tlen = digitLength(anInteger);\n\tif (len === 0) {\n\t\treturn false;\n\t}\n\tif (unsafeByteOfat(anInteger, len) === 0) {\n\t\treturn false;\n\t}\n\n\t/* maximal digitLength of aSmallInteger */\n\n\tsLen = 4;\n\tif (len > sLen) {\n\t\treturn true;\n\t}\n\tif (len < sLen) {\n\t\treturn false;\n\t}\n\tif (CLASSOF(anInteger) === interpreterProxy.classLargePositiveInteger()) {\n\n\t\t/* SmallInteger maxVal */\n\t\t/* all bytes of maxVal but the highest one are just FF's */\n\n\t\tmaxVal = 1073741823;\n\t\treturn unsafeByteOfat(anInteger, sLen) > cDigitOfCSIat(maxVal, sLen);\n\t} else {\n\n\t\t/* SmallInteger minVal */\n\t\t/* all bytes of minVal but the highest one are just 00's */\n\n\t\tminVal = -1073741824;\n\t\tif (unsafeByteOfat(anInteger, sLen) < cDigitOfCSIat(minVal, sLen)) {\n\t\t\treturn false;\n\t\t} else {\n\n\t\t\t/* if just one digit differs, then anInteger < minval (the corresponding digit byte is greater!)\n\t\t\t\t\t\tand therefore a LargeNegativeInteger */\n\n\t\t\tfor (ix = 1; ix <= sLen; ix++) {\n\t\t\t\tif (unsafeByteOfat(anInteger, ix) !== cDigitOfCSIat(minVal, ix)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction msg(s) {\n\tconsole.log(moduleName + \": \" + s);\n}\n\n\n/*\tCheck for leading zeroes and return shortened copy if so. */\n\nfunction normalize(aLargeInteger) {\n\t// missing DebugCode;\n\tif (CLASSOF(aLargeInteger) === interpreterProxy.classLargePositiveInteger()) {\n\t\treturn normalizePositive(aLargeInteger);\n\t} else {\n\t\treturn normalizeNegative(aLargeInteger);\n\t}\n}\n\n\n/*\tCheck for leading zeroes and return shortened copy if so. */\n/*\tFirst establish len = significant length. */\n\nfunction normalizeNegative(aLargeNegativeInteger) {\n\tvar i;\n\tvar len;\n\tvar sLen;\n\tvar minVal;\n\tvar oldLen;\n\tvar val;\n\n\tlen = (oldLen = digitLength(aLargeNegativeInteger));\n\twhile ((len !== 0) && (unsafeByteOfat(aLargeNegativeInteger, len) === 0)) {\n\t\t--len;\n\t}\n\tif (len === 0) {\n\t\treturn 0;\n\t}\n\n\t/* SmallInteger minVal digitLength */\n\n\tsLen = 4;\n\tif (len <= sLen) {\n\n\t\t/* SmallInteger minVal */\n\n\t\tminVal = -1073741824;\n\t\tif ((len < sLen) || (digitOfBytesat(aLargeNegativeInteger, sLen) < cDigitOfCSIat(minVal, sLen))) {\n\n\t\t\t/* If high digit less, then can be small */\n\n\t\t\tval = 0;\n\t\t\tfor (i = len; i >= 1; i += -1) {\n\t\t\t\tval = (val * 256) - unsafeByteOfat(aLargeNegativeInteger, i);\n\t\t\t}\n\t\t\treturn val;\n\t\t}\n\t\tfor (i = 1; i <= sLen; i++) {\n\n\t\t\t/* If all digits same, then = minVal (sr: minVal digits 1 to 3 are \n\t\t\t\t 0) */\n\n\t\t\tif (digitOfBytesat(aLargeNegativeInteger, i) !== cDigitOfCSIat(minVal, i)) {\n\n\t\t\t\t/* Not so; return self shortened */\n\n\t\t\t\tif (len < oldLen) {\n\n\t\t\t\t\t/* ^ self growto: len */\n\n\t\t\t\t\treturn bytesgrowTo(aLargeNegativeInteger, len);\n\t\t\t\t} else {\n\t\t\t\t\treturn aLargeNegativeInteger;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn minVal;\n\t}\n\tif (len < oldLen) {\n\n\t\t/* ^ self growto: len */\n\n\t\treturn bytesgrowTo(aLargeNegativeInteger, len);\n\t} else {\n\t\treturn aLargeNegativeInteger;\n\t}\n}\n\n\n/*\tCheck for leading zeroes and return shortened copy if so. */\n/*\tFirst establish len = significant length. */\n\nfunction normalizePositive(aLargePositiveInteger) {\n\tvar i;\n\tvar len;\n\tvar sLen;\n\tvar val;\n\tvar oldLen;\n\n\tlen = (oldLen = digitLength(aLargePositiveInteger));\n\twhile ((len !== 0) && (unsafeByteOfat(aLargePositiveInteger, len) === 0)) {\n\t\t--len;\n\t}\n\tif (len === 0) {\n\t\treturn 0;\n\t}\n\n\t/* SmallInteger maxVal digitLength. */\n\n\tsLen = 4;\n\tif ((len <= sLen) && (digitOfBytesat(aLargePositiveInteger, sLen) <= cDigitOfCSIat(1073741823, sLen))) {\n\n\t\t/* If so, return its SmallInt value */\n\n\t\tval = 0;\n\t\tfor (i = len; i >= 1; i += -1) {\n\t\t\tval = (val * 256) + unsafeByteOfat(aLargePositiveInteger, i);\n\t\t}\n\t\treturn val;\n\t}\n\tif (len < oldLen) {\n\n\t\t/* ^ self growto: len */\n\n\t\treturn bytesgrowTo(aLargePositiveInteger, len);\n\t} else {\n\t\treturn aLargePositiveInteger;\n\t}\n}\n\nfunction primAnyBitFromTo() {\n\tvar integer;\n\tvar large;\n\tvar from;\n\tvar to;\n\tvar _return_value;\n\n\tfrom = interpreterProxy.stackIntegerValue(1);\n\tto = interpreterProxy.stackIntegerValue(0);\n\t// missing DebugCode;\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(2)));\n\tinteger = interpreterProxy.stackValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (typeof integer === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\tlarge = createLargeFromSmallInteger(integer);\n\t} else {\n\t\tlarge = integer;\n\t}\n\t_return_value = (anyBitOfBytesfromto(large, from, to)? interpreterProxy.trueObject() : interpreterProxy.falseObject());\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tConverts a SmallInteger into a - non normalized! - LargeInteger; \n\t aLargeInteger will be returned unchanged. */\n/*\tDo not check for forced fail, because we need this conversion to test the \n\tplugin in ST during forced fail, too. */\n\nfunction primAsLargeInteger() {\n\tvar anInteger;\n\tvar _return_value;\n\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(0)));\n\tanInteger = interpreterProxy.stackValue(0);\n\t// missing DebugCode;\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (typeof anInteger === \"number\") {\n\t\t_return_value = createLargeFromSmallInteger(anInteger);\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy.popthenPush(2, _return_value);\n\t\treturn null;\n\t} else {\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy.popthenPush(2, anInteger);\n\t\treturn null;\n\t}\n}\n\n\n/*\tIf calling this primitive fails, then C module does not exist. Do not check for forced fail, because we want to know if module exists during forced fail, too. */\n\nfunction primCheckIfCModuleExists() {\n\tvar _return_value;\n\n\t_return_value = (true? interpreterProxy.trueObject() : interpreterProxy.falseObject());\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(1, _return_value);\n\treturn null;\n}\n\nfunction _primDigitBitShift() {\n\tvar rShift;\n\tvar aLarge;\n\tvar anInteger;\n\tvar shiftCount;\n\tvar _return_value;\n\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(1)));\n\tanInteger = interpreterProxy.stackValue(1);\n\tshiftCount = interpreterProxy.stackIntegerValue(0);\n\t// missing DebugCode;\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (typeof anInteger === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\taLarge = createLargeFromSmallInteger(anInteger);\n\t} else {\n\t\taLarge = anInteger;\n\t}\n\tif (shiftCount >= 0) {\n\t\t_return_value = digitLshift(aLarge, shiftCount);\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy.popthenPush(3, _return_value);\n\t\treturn null;\n\t} else {\n\t\trShift = 0 - shiftCount;\n\t\t_return_value = normalize(digitRshiftlookfirst(aLarge, rShift, BYTESIZEOF(aLarge)));\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy.popthenPush(3, _return_value);\n\t\treturn null;\n\t}\n}\n\nfunction primDigitAdd() {\n\tvar firstLarge;\n\tvar firstInteger;\n\tvar secondLarge;\n\tvar secondInteger;\n\tvar _return_value;\n\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(0)));\n\tsecondInteger = interpreterProxy.stackValue(0);\n\t// missing DebugCode;\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(1)));\n\tfirstInteger = interpreterProxy.stackValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (typeof firstInteger === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\t\tfirstLarge = createLargeFromSmallInteger(firstInteger);\n;\n\t} else {\n\t\tfirstLarge = firstInteger;\n\t}\n\tif (typeof secondInteger === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\t\tsecondLarge = createLargeFromSmallInteger(secondInteger);\n;\n\t} else {\n\t\tsecondLarge = secondInteger;\n\t}\n\t_return_value = digitAddLargewith(firstLarge, secondLarge);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(2, _return_value);\n\treturn null;\n}\n\nfunction primDigitAddWith() {\n\tvar firstLarge;\n\tvar secondLarge;\n\tvar firstInteger;\n\tvar secondInteger;\n\tvar _return_value;\n\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(1)));\n\tfirstInteger = interpreterProxy.stackValue(1);\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(0)));\n\tsecondInteger = interpreterProxy.stackValue(0);\n\t// missing DebugCode;\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (typeof firstInteger === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\t\tfirstLarge = createLargeFromSmallInteger(firstInteger);\n;\n\t} else {\n\t\tfirstLarge = firstInteger;\n\t}\n\tif (typeof secondInteger === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\t\tsecondLarge = createLargeFromSmallInteger(secondInteger);\n;\n\t} else {\n\t\tsecondLarge = secondInteger;\n\t}\n\t_return_value = digitAddLargewith(firstLarge, secondLarge);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tBit logic here is only implemented for positive integers or Zero; if rec \n\tor arg is negative, it fails. */\n\nfunction primDigitBitAnd() {\n\tvar firstInteger;\n\tvar secondInteger;\n\tvar _return_value;\n\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(0)));\n\tsecondInteger = interpreterProxy.stackValue(0);\n\t// missing DebugCode;\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(1)));\n\tfirstInteger = interpreterProxy.stackValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\t_return_value = digitBitLogicwithopIndex(firstInteger, secondInteger, andOpIndex);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(2, _return_value);\n\treturn null;\n}\n\n\n/*\tBit logic here is only implemented for positive integers or Zero; if any arg is negative, it fails. */\n\nfunction primDigitBitLogicWithOp() {\n\tvar firstInteger;\n\tvar secondInteger;\n\tvar opIndex;\n\tvar _return_value;\n\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(2)));\n\tfirstInteger = interpreterProxy.stackValue(2);\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(1)));\n\tsecondInteger = interpreterProxy.stackValue(1);\n\topIndex = interpreterProxy.stackIntegerValue(0);\n\t// missing DebugCode;\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\t_return_value = digitBitLogicwithopIndex(firstInteger, secondInteger, opIndex);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(4, _return_value);\n\treturn null;\n}\n\n\n/*\tBit logic here is only implemented for positive integers or Zero; if rec \n\tor arg is negative, it fails. */\n\nfunction primDigitBitOr() {\n\tvar firstInteger;\n\tvar secondInteger;\n\tvar _return_value;\n\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(0)));\n\tsecondInteger = interpreterProxy.stackValue(0);\n\t// missing DebugCode;\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(1)));\n\tfirstInteger = interpreterProxy.stackValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\t_return_value = digitBitLogicwithopIndex(firstInteger, secondInteger, orOpIndex);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(2, _return_value);\n\treturn null;\n}\n\nfunction primDigitBitShift() {\n\tvar aLarge;\n\tvar rShift;\n\tvar anInteger;\n\tvar shiftCount;\n\tvar _return_value;\n\n\tshiftCount = interpreterProxy.stackIntegerValue(0);\n\t// missing DebugCode;\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(1)));\n\tanInteger = interpreterProxy.stackValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (typeof anInteger === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\taLarge = createLargeFromSmallInteger(anInteger);\n\t} else {\n\t\taLarge = anInteger;\n\t}\n\tif (shiftCount >= 0) {\n\t\t_return_value = digitLshift(aLarge, shiftCount);\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy.popthenPush(2, _return_value);\n\t\treturn null;\n\t} else {\n\t\trShift = 0 - shiftCount;\n\t\t_return_value = normalize(digitRshiftlookfirst(aLarge, rShift, BYTESIZEOF(aLarge)));\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy.popthenPush(2, _return_value);\n\t\treturn null;\n\t}\n}\n\nfunction primDigitBitShiftMagnitude() {\n\tvar aLarge;\n\tvar rShift;\n\tvar anInteger;\n\tvar shiftCount;\n\tvar _return_value;\n\n\tshiftCount = interpreterProxy.stackIntegerValue(0);\n\t// missing DebugCode;\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(1)));\n\tanInteger = interpreterProxy.stackValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (typeof anInteger === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\taLarge = createLargeFromSmallInteger(anInteger);\n\t} else {\n\t\taLarge = anInteger;\n\t}\n\tif (shiftCount >= 0) {\n\t\t_return_value = digitLshift(aLarge, shiftCount);\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy.popthenPush(2, _return_value);\n\t\treturn null;\n\t} else {\n\t\trShift = 0 - shiftCount;\n\t\t_return_value = normalize(digitRshiftlookfirst(aLarge, rShift, BYTESIZEOF(aLarge)));\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy.popthenPush(2, _return_value);\n\t\treturn null;\n\t}\n}\n\n\n/*\tBit logic here is only implemented for positive integers or Zero; if rec \n\tor arg is negative, it fails. */\n\nfunction primDigitBitXor() {\n\tvar firstInteger;\n\tvar secondInteger;\n\tvar _return_value;\n\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(0)));\n\tsecondInteger = interpreterProxy.stackValue(0);\n\t// missing DebugCode;\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(1)));\n\tfirstInteger = interpreterProxy.stackValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\t_return_value = digitBitLogicwithopIndex(firstInteger, secondInteger, xorOpIndex);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(2, _return_value);\n\treturn null;\n}\n\nfunction primDigitCompare() {\n\tvar firstVal;\n\tvar firstInteger;\n\tvar secondVal;\n\tvar secondInteger;\n\tvar _return_value;\n\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(0)));\n\tsecondInteger = interpreterProxy.stackValue(0);\n\t// missing DebugCode;\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(1)));\n\tfirstInteger = interpreterProxy.stackValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (typeof firstInteger === \"number\") {\n\n\t\t/* first */\n\n\t\tif (typeof secondInteger === \"number\") {\n\n\t\t\t/* second */\n\n\t\t\tif (((firstVal = firstInteger)) > ((secondVal = secondInteger))) {\n\t\t\t\t_return_value = 1;\n\t\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tinterpreterProxy.popthenPush(2, _return_value);\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\tif (firstVal < secondVal) {\n\t\t\t\t\t_return_value = -1;\n\t\t\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tinterpreterProxy.popthenPush(2, _return_value);\n\t\t\t\t\treturn null;\n\t\t\t\t} else {\n\t\t\t\t\t_return_value = 0;\n\t\t\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tinterpreterProxy.popthenPush(2, _return_value);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\n\t\t\t/* SECOND */\n\n\t\t\t_return_value = -1;\n\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tinterpreterProxy.popthenPush(2, _return_value);\n\t\t\treturn null;\n\t\t}\n\t} else {\n\n\t\t/* FIRST */\n\n\t\tif (typeof secondInteger === \"number\") {\n\n\t\t\t/* second */\n\n\t\t\t_return_value = 1;\n\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tinterpreterProxy.popthenPush(2, _return_value);\n\t\t\treturn null;\n\t\t} else {\n\n\t\t\t/* SECOND */\n\n\t\t\t_return_value = digitCompareLargewith(firstInteger, secondInteger);\n\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tinterpreterProxy.popthenPush(2, _return_value);\n\t\t\treturn null;\n\t\t}\n\t}\n}\n\nfunction primDigitCompareWith() {\n\tvar firstVal;\n\tvar secondVal;\n\tvar firstInteger;\n\tvar secondInteger;\n\tvar _return_value;\n\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(1)));\n\tfirstInteger = interpreterProxy.stackValue(1);\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(0)));\n\tsecondInteger = interpreterProxy.stackValue(0);\n\t// missing DebugCode;\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (typeof firstInteger === \"number\") {\n\n\t\t/* first */\n\n\t\tif (typeof secondInteger === \"number\") {\n\n\t\t\t/* second */\n\n\t\t\tif (((firstVal = firstInteger)) > ((secondVal = secondInteger))) {\n\t\t\t\t_return_value = 1;\n\t\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tinterpreterProxy.popthenPush(3, _return_value);\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\tif (firstVal < secondVal) {\n\t\t\t\t\t_return_value = -1;\n\t\t\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tinterpreterProxy.popthenPush(3, _return_value);\n\t\t\t\t\treturn null;\n\t\t\t\t} else {\n\t\t\t\t\t_return_value = 0;\n\t\t\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tinterpreterProxy.popthenPush(3, _return_value);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\n\t\t\t/* SECOND */\n\n\t\t\t_return_value = -1;\n\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tinterpreterProxy.popthenPush(3, _return_value);\n\t\t\treturn null;\n\t\t}\n\t} else {\n\n\t\t/* FIRST */\n\n\t\tif (typeof secondInteger === \"number\") {\n\n\t\t\t/* second */\n\n\t\t\t_return_value = 1;\n\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tinterpreterProxy.popthenPush(3, _return_value);\n\t\t\treturn null;\n\t\t} else {\n\n\t\t\t/* SECOND */\n\n\t\t\t_return_value = digitCompareLargewith(firstInteger, secondInteger);\n\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tinterpreterProxy.popthenPush(3, _return_value);\n\t\t\treturn null;\n\t\t}\n\t}\n}\n\n\n/*\tAnswer the result of dividing firstInteger by secondInteger. \n\tFail if parameters are not integers, not normalized or secondInteger is \n\tzero. */\n\nfunction primDigitDivNegative() {\n\tvar firstAsLargeInteger;\n\tvar firstInteger;\n\tvar secondAsLargeInteger;\n\tvar secondInteger;\n\tvar neg;\n\tvar _return_value;\n\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(1)));\n\tsecondInteger = interpreterProxy.stackValue(1);\n\tneg = interpreterProxy.booleanValueOf(interpreterProxy.stackValue(0));\n\t// missing DebugCode;\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(2)));\n\tfirstInteger = interpreterProxy.stackValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!isNormalized(firstInteger)) {\n\t\t// missing DebugCode;\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (!isNormalized(secondInteger)) {\n\t\t// missing DebugCode;\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\tif (typeof firstInteger === \"number\") {\n\n\t\t/* convert to LargeInteger */\n\n\t\t\tfirstAsLargeInteger = createLargeFromSmallInteger(firstInteger);\n;\n\t} else {\n\t\tfirstAsLargeInteger = firstInteger;\n\t}\n\tif (typeof secondInteger === \"number\") {\n\n\t\t/* check for zerodivide and convert to LargeInteger */\n\n\t\tif (secondInteger === 0) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t\t\tsecondAsLargeInteger = createLargeFromSmallInteger(secondInteger);\n;\n\t} else {\n\t\tsecondAsLargeInteger = secondInteger;\n\t}\n\t_return_value = digitDivLargewithnegative(firstAsLargeInteger, secondAsLargeInteger, neg);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tAnswer the result of dividing firstInteger by secondInteger.\n\tFail if parameters are not integers or secondInteger is zero. */\n\nfunction primDigitDivWithNegative() {\n\tvar firstAsLargeInteger;\n\tvar secondAsLargeInteger;\n\tvar firstInteger;\n\tvar secondInteger;\n\tvar neg;\n\tvar _return_value;\n\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(2)));\n\tfirstInteger = interpreterProxy.stackValue(2);\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(1)));\n\tsecondInteger = interpreterProxy.stackValue(1);\n\tneg = interpreterProxy.booleanValueOf(interpreterProxy.stackValue(0));\n\t// missing DebugCode;\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (typeof firstInteger === \"number\") {\n\n\t\t/* convert to LargeInteger */\n\n\t\t\tfirstAsLargeInteger = createLargeFromSmallInteger(firstInteger);\n;\n\t} else {\n\t\tfirstAsLargeInteger = firstInteger;\n\t}\n\tif (typeof secondInteger === \"number\") {\n\n\t\t/* check for zerodivide and convert to LargeInteger */\n\n\t\tif (secondInteger === 0) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t\t\tsecondAsLargeInteger = createLargeFromSmallInteger(secondInteger);\n;\n\t} else {\n\t\tsecondAsLargeInteger = secondInteger;\n\t}\n\t_return_value = digitDivLargewithnegative(firstAsLargeInteger, secondAsLargeInteger, neg);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(4, _return_value);\n\treturn null;\n}\n\nfunction primDigitMultiplyNegative() {\n\tvar firstLarge;\n\tvar firstInteger;\n\tvar secondLarge;\n\tvar secondInteger;\n\tvar neg;\n\tvar _return_value;\n\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(1)));\n\tsecondInteger = interpreterProxy.stackValue(1);\n\tneg = interpreterProxy.booleanValueOf(interpreterProxy.stackValue(0));\n\t// missing DebugCode;\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(2)));\n\tfirstInteger = interpreterProxy.stackValue(2);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (typeof firstInteger === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\t\tfirstLarge = createLargeFromSmallInteger(firstInteger);\n;\n\t} else {\n\t\tfirstLarge = firstInteger;\n\t}\n\tif (typeof secondInteger === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\t\tsecondLarge = createLargeFromSmallInteger(secondInteger);\n;\n\t} else {\n\t\tsecondLarge = secondInteger;\n\t}\n\t_return_value = digitMultiplyLargewithnegative(firstLarge, secondLarge, neg);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(3, _return_value);\n\treturn null;\n}\n\nfunction primDigitMultiplyWithNegative() {\n\tvar firstLarge;\n\tvar secondLarge;\n\tvar firstInteger;\n\tvar secondInteger;\n\tvar neg;\n\tvar _return_value;\n\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(2)));\n\tfirstInteger = interpreterProxy.stackValue(2);\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(1)));\n\tsecondInteger = interpreterProxy.stackValue(1);\n\tneg = interpreterProxy.booleanValueOf(interpreterProxy.stackValue(0));\n\t// missing DebugCode;\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (typeof firstInteger === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\t\tfirstLarge = createLargeFromSmallInteger(firstInteger);\n;\n\t} else {\n\t\tfirstLarge = firstInteger;\n\t}\n\tif (typeof secondInteger === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\t\tsecondLarge = createLargeFromSmallInteger(secondInteger);\n;\n\t} else {\n\t\tsecondLarge = secondInteger;\n\t}\n\t_return_value = digitMultiplyLargewithnegative(firstLarge, secondLarge, neg);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(4, _return_value);\n\treturn null;\n}\n\nfunction primDigitSubtract() {\n\tvar firstLarge;\n\tvar firstInteger;\n\tvar secondLarge;\n\tvar secondInteger;\n\tvar _return_value;\n\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(0)));\n\tsecondInteger = interpreterProxy.stackValue(0);\n\t// missing DebugCode;\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(1)));\n\tfirstInteger = interpreterProxy.stackValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (typeof firstInteger === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\t\tfirstLarge = createLargeFromSmallInteger(firstInteger);\n;\n\t} else {\n\t\tfirstLarge = firstInteger;\n\t}\n\tif (typeof secondInteger === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\t\tsecondLarge = createLargeFromSmallInteger(secondInteger);\n;\n\t} else {\n\t\tsecondLarge = secondInteger;\n\t}\n\t_return_value = digitSubLargewith(firstLarge, secondLarge);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(2, _return_value);\n\treturn null;\n}\n\nfunction primDigitSubtractWith() {\n\tvar firstLarge;\n\tvar secondLarge;\n\tvar firstInteger;\n\tvar secondInteger;\n\tvar _return_value;\n\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(1)));\n\tfirstInteger = interpreterProxy.stackValue(1);\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(0)));\n\tsecondInteger = interpreterProxy.stackValue(0);\n\t// missing DebugCode;\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (typeof firstInteger === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\t\tfirstLarge = createLargeFromSmallInteger(firstInteger);\n;\n\t} else {\n\t\tfirstLarge = firstInteger;\n\t}\n\tif (typeof secondInteger === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\t\tsecondLarge = createLargeFromSmallInteger(secondInteger);\n;\n\t} else {\n\t\tsecondLarge = secondInteger;\n\t}\n\t_return_value = digitSubLargewith(firstLarge, secondLarge);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(3, _return_value);\n\treturn null;\n}\n\n\n/*\tIf calling this primitive fails, then C module does not exist. */\n\nfunction primGetModuleName() {\n\tvar strPtr;\n\tvar strLen;\n\tvar i;\n\tvar strOop;\n\n\t// missing DebugCode;\n\tstrLen = strlen(getModuleName());\n\tstrOop = interpreterProxy.instantiateClassindexableSize(interpreterProxy.classString(), strLen);\n\tstrPtr = strOop.bytes;\n\tfor (i = 0; i <= (strLen - 1); i++) {\n\t\tstrPtr[i] = getModuleName()[i];\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(1, strOop);\n\treturn null;\n}\n\nfunction primMontgomeryTimesModulo() {\n\tvar firstLarge;\n\tvar secondLarge;\n\tvar firstInteger;\n\tvar thirdLarge;\n\tvar secondOperandInteger;\n\tvar thirdModuloInteger;\n\tvar smallInverseInteger;\n\tvar _return_value;\n\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(2)));\n\tsecondOperandInteger = interpreterProxy.stackValue(2);\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(1)));\n\tthirdModuloInteger = interpreterProxy.stackValue(1);\n\tsmallInverseInteger = interpreterProxy.stackIntegerValue(0);\n\t// missing DebugCode;\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(3)));\n\tfirstInteger = interpreterProxy.stackValue(3);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (typeof firstInteger === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\t\tfirstLarge = createLargeFromSmallInteger(firstInteger);\n;\n\t} else {\n\t\tfirstLarge = firstInteger;\n\t}\n\tif (typeof secondOperandInteger === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\t\tsecondLarge = createLargeFromSmallInteger(secondOperandInteger);\n;\n\t} else {\n\t\tsecondLarge = secondOperandInteger;\n\t}\n\tif (typeof thirdModuloInteger === \"number\") {\n\n\t\t/* convert it to a not normalized LargeInteger */\n\n\t\t\tthirdLarge = createLargeFromSmallInteger(thirdModuloInteger);\n;\n\t} else {\n\t\tthirdLarge = thirdModuloInteger;\n\t}\n\t_return_value = digitMontgomerytimesmodulomInvModB(firstLarge, secondLarge, thirdLarge, smallInverseInteger);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(4, _return_value);\n\treturn null;\n}\n\n\n/*\tParameter specification #(Integer) doesn't convert! */\n\nfunction primNormalize() {\n\tvar anInteger;\n\tvar _return_value;\n\n\tinterpreterProxy.success(interpreterProxy.isKindOfInteger(interpreterProxy.stackValue(0)));\n\tanInteger = interpreterProxy.stackValue(0);\n\t// missing DebugCode;\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (typeof anInteger === \"number\") {\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy.popthenPush(2, anInteger);\n\t\treturn null;\n\t}\n\t_return_value = normalize(anInteger);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(2, _return_value);\n\treturn null;\n}\n\nfunction primNormalizeNegative() {\n\tvar rcvr;\n\tvar _return_value;\n\n\t// missing DebugCode;\n\tinterpreterProxy.success(interpreterProxy.stackValue(0).sqClass === interpreterProxy.classLargeNegativeInteger());\n\trcvr = interpreterProxy.stackValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\t_return_value = normalizeNegative(rcvr);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(1, _return_value);\n\treturn null;\n}\n\nfunction primNormalizePositive() {\n\tvar rcvr;\n\tvar _return_value;\n\n\t// missing DebugCode;\n\tinterpreterProxy.success(interpreterProxy.stackValue(0).sqClass === interpreterProxy.classLargePositiveInteger());\n\trcvr = interpreterProxy.stackValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\t_return_value = normalizePositive(rcvr);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(1, _return_value);\n\treturn null;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nfunction setInterpreter(anInterpreter) {\n\tvar ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy.majorVersion() == VM_PROXY_MAJOR;\n\tif (ok === false) {\n\t\treturn false;\n\t}\n\tok = interpreterProxy.minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n/*\tArgument bytesOop must not be aSmallInteger! */\n\nfunction unsafeByteOfat(bytesOop, ix) {\n\tvar pointer;\n\n\treturn ((pointer = bytesOop.bytes))[ix - 1];\n}\n\n\nSqueak.registerExternalModule(\"LargeIntegers\", {\n\tprimDigitAddWith: primDigitAddWith,\n\tprimDigitBitShiftMagnitude: primDigitBitShiftMagnitude,\n\tprimGetModuleName: primGetModuleName,\n\tprimDigitBitLogicWithOp: primDigitBitLogicWithOp,\n\tprimCheckIfCModuleExists: primCheckIfCModuleExists,\n\tprimDigitCompare: primDigitCompare,\n\tprimDigitMultiplyNegative: primDigitMultiplyNegative,\n\tprimDigitBitShift: primDigitBitShift,\n\tprimNormalizePositive: primNormalizePositive,\n\tprimDigitSubtractWith: primDigitSubtractWith,\n\t_primDigitBitShift: _primDigitBitShift,\n\tprimDigitMultiplyWithNegative: primDigitMultiplyWithNegative,\n\tprimDigitSubtract: primDigitSubtract,\n\tprimDigitDivNegative: primDigitDivNegative,\n\tprimNormalizeNegative: primNormalizeNegative,\n\tprimDigitBitOr: primDigitBitOr,\n\tprimMontgomeryTimesModulo: primMontgomeryTimesModulo,\n\tprimDigitBitAnd: primDigitBitAnd,\n\tprimDigitDivWithNegative: primDigitDivWithNegative,\n\tsetInterpreter: setInterpreter,\n\tprimNormalize: primNormalize,\n\tprimDigitBitXor: primDigitBitXor,\n\tprimDigitCompareWith: primDigitCompareWith,\n\tprimDigitAdd: primDigitAdd,\n\tgetModuleName: getModuleName,\n\tprimAsLargeInteger: primAsLargeInteger,\n\tprimAnyBitFromTo: primAnyBitFromTo,\n});\n\n}); // end of module\n","/* Smalltalk from Squeak4.5 with VMMaker 4.13.6 translated as JS source on 3 November 2014 1:52:21 pm */\n/* Automatically generated by\n\tJSPluginCodeGenerator VMMakerJS-bf.15 uuid: fd4e10f2-3773-4e80-8bb5-c4b471a014e5\n from\n\tMatrix2x3Plugin VMMaker-bf.353 uuid: 8ae25e7e-8d2c-451e-8277-598b30e9c002\n */\n\nmodule(\"users.bert.SqueakJS.plugins.Matrix2x3Plugin\").requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\"use strict\";\n\nvar VM_PROXY_MAJOR = 1;\nvar VM_PROXY_MINOR = 11;\n\n/*** Functions ***/\nfunction CLASSOF(obj) { return typeof obj === \"number\" ? interpreterProxy.classSmallInteger() : obj.sqClass }\nfunction SIZEOF(obj) { return obj.pointers ? obj.pointers.length : obj.words ? obj.words.length : obj.bytes ? obj.bytes.length : 0 }\nfunction BYTESIZEOF(obj) { return obj.bytes ? obj.bytes.length : obj.words ? obj.words.length * 4 : 0 }\nfunction DIV(a, b) { return Math.floor(a / b) | 0; } // integer division\nfunction MOD(a, b) { return a - DIV(a, b) * b | 0; } // signed modulus\nfunction SHL(a, b) { return b > 31 ? 0 : a << b; } // fix JS shift\nfunction SHR(a, b) { return b > 31 ? 0 : a >>> b; } // fix JS shift\nfunction SHIFT(a, b) { return b < 0 ? (b < -31 ? 0 : a >>> (0-b) ) : (b > 31 ? 0 : a << b); }\n\n/*** Variables ***/\nvar interpreterProxy = null;\nvar m23ArgX = 0;\nvar m23ArgY = 0;\nvar m23ResultX = 0;\nvar m23ResultY = 0;\nvar moduleName = \"Matrix2x3Plugin 3 November 2014 (e)\";\n\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nfunction getModuleName() {\n\treturn moduleName;\n}\n\nfunction halt() {\n\t;\n}\n\n\n/*\tLoad the argument matrix */\n\nfunction loadArgumentMatrix(matrix) {\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!(interpreterProxy.isWords(matrix) && (SIZEOF(matrix) === 6))) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn null;\n\t}\n\treturn matrix.wordsAsFloat32Array();\n}\n\n\n/*\tLoad the argument point into m23ArgX and m23ArgY */\n\nfunction loadArgumentPoint(point) {\n\tvar isInt;\n\tvar oop;\n\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (CLASSOF(point) !== interpreterProxy.classPoint()) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\toop = interpreterProxy.fetchPointerofObject(0, point);\n\tisInt = typeof oop === \"number\";\n\tif (!(isInt || (oop.isFloat))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (isInt) {\n\t\tm23ArgX = oop;\n\t} else {\n\t\tm23ArgX = interpreterProxy.floatValueOf(oop);\n\t}\n\toop = interpreterProxy.fetchPointerofObject(1, point);\n\tisInt = typeof oop === \"number\";\n\tif (!(isInt || (oop.isFloat))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (isInt) {\n\t\tm23ArgY = oop;\n\t} else {\n\t\tm23ArgY = interpreterProxy.floatValueOf(oop);\n\t}\n}\n\n\n/*\tMultiply matrix m1 with m2 and store the result into m3. */\n\nfunction matrix2x3ComposeMatrixwithinto(m1, m2, m3) {\n\tvar a11;\n\tvar a12;\n\tvar a13;\n\tvar a21;\n\tvar a22;\n\tvar a23;\n\n\ta11 = (m1[0] * m2[0]) + (m1[1] * m2[3]);\n\ta12 = (m1[0] * m2[1]) + (m1[1] * m2[4]);\n\ta13 = ((m1[0] * m2[2]) + (m1[1] * m2[5])) + m1[2];\n\ta21 = (m1[3] * m2[0]) + (m1[4] * m2[3]);\n\ta22 = (m1[3] * m2[1]) + (m1[4] * m2[4]);\n\ta23 = ((m1[3] * m2[2]) + (m1[4] * m2[5])) + m1[5];\n\tm3[0] = a11;\n\tm3[1] = a12;\n\tm3[2] = a13;\n\tm3[3] = a21;\n\tm3[4] = a22;\n\tm3[5] = a23;\n}\n\n\n/*\tInvert the pre-loaded argument point by the given matrix */\n\nfunction matrix2x3InvertPoint(m) {\n\tvar det;\n\tvar detX;\n\tvar detY;\n\tvar x;\n\tvar y;\n\n\tx = m23ArgX - m[2];\n\ty = m23ArgY - m[5];\n\tdet = (m[0] * m[4]) - (m[1] * m[3]);\n\tif (det === 0.0) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tdet = 1.0 / det;\n\tdetX = (x * m[4]) - (m[1] * y);\n\tdetY = (m[0] * y) - (x * m[3]);\n\tm23ResultX = detX * det;\n\tm23ResultY = detY * det;\n}\n\n\n/*\tTransform the pre-loaded argument point by the given matrix */\n\nfunction matrix2x3TransformPoint(m) {\n\tm23ResultX = ((m23ArgX * m[0]) + (m23ArgY * m[1])) + m[2];\n\tm23ResultY = ((m23ArgX * m[3]) + (m23ArgY * m[4])) + m[5];\n}\n\nfunction okayIntValue(value) {\n\treturn (value >= -1073741824) && (m23ResultX <= 1073741823);\n}\n\nfunction primitiveComposeMatrix() {\n\tvar m1;\n\tvar m2;\n\tvar m3;\n\tvar result;\n\n\t;\n\tm3 = loadArgumentMatrix((result = interpreterProxy.stackObjectValue(0)));\n\tm2 = loadArgumentMatrix(interpreterProxy.stackObjectValue(1));\n\tm1 = loadArgumentMatrix(interpreterProxy.stackObjectValue(2));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tmatrix2x3ComposeMatrixwithinto(m1, m2, m3);\n\tinterpreterProxy.popthenPush(3, result);\n}\n\nfunction primitiveInvertPoint() {\n\tvar matrix;\n\n\tloadArgumentPoint(interpreterProxy.stackObjectValue(0));\n\tmatrix = loadArgumentMatrix(interpreterProxy.stackObjectValue(1));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tmatrix2x3InvertPoint(matrix);\n\tif (!interpreterProxy.failed()) {\n\t\troundAndStoreResultPoint(2);\n\t}\n}\n\nfunction primitiveInvertRectInto() {\n\tvar cornerX;\n\tvar cornerY;\n\tvar dstOop;\n\tvar matrix;\n\tvar maxX;\n\tvar maxY;\n\tvar minX;\n\tvar minY;\n\tvar originX;\n\tvar originY;\n\tvar srcOop;\n\n\tdstOop = interpreterProxy.stackObjectValue(0);\n\tsrcOop = interpreterProxy.stackObjectValue(1);\n\tmatrix = loadArgumentMatrix(interpreterProxy.stackObjectValue(2));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (CLASSOF(srcOop) !== CLASSOF(dstOop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (!interpreterProxy.isPointers(srcOop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (SIZEOF(srcOop) !== 2) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tloadArgumentPoint(interpreterProxy.fetchPointerofObject(0, srcOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\toriginX = m23ArgX;\n\toriginY = m23ArgY;\n\tmatrix2x3InvertPoint(matrix);\n\tminX = (maxX = m23ResultX);\n\n\t/* Load bottom-right point */\n\n\tminY = (maxY = m23ResultY);\n\tloadArgumentPoint(interpreterProxy.fetchPointerofObject(1, srcOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tcornerX = m23ArgX;\n\tcornerY = m23ArgY;\n\tmatrix2x3InvertPoint(matrix);\n\tminX = Math.min(minX, m23ResultX);\n\tmaxX = Math.max(maxX, m23ResultX);\n\tminY = Math.min(minY, m23ResultY);\n\n\t/* Load top-right point */\n\n\tmaxY = Math.max(maxY, m23ResultY);\n\tm23ArgX = cornerX;\n\tm23ArgY = originY;\n\tmatrix2x3InvertPoint(matrix);\n\tminX = Math.min(minX, m23ResultX);\n\tmaxX = Math.max(maxX, m23ResultX);\n\tminY = Math.min(minY, m23ResultY);\n\n\t/* Load bottom-left point */\n\n\tmaxY = Math.max(maxY, m23ResultY);\n\tm23ArgX = originX;\n\tm23ArgY = cornerY;\n\tmatrix2x3InvertPoint(matrix);\n\tminX = Math.min(minX, m23ResultX);\n\tmaxX = Math.max(maxX, m23ResultX);\n\tminY = Math.min(minY, m23ResultY);\n\tmaxY = Math.max(maxY, m23ResultY);\n\tif (!interpreterProxy.failed()) {\n\t\tdstOop = roundAndStoreResultRectx0y0x1y1(dstOop, minX, minY, maxX, maxY);\n\t}\n\tif (!interpreterProxy.failed()) {\n\t\tinterpreterProxy.popthenPush(3, dstOop);\n\t}\n}\n\nfunction primitiveIsIdentity() {\n\tvar matrix;\n\n\tmatrix = loadArgumentMatrix(interpreterProxy.stackObjectValue(0));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(1);\n\tinterpreterProxy.pushBool((((((matrix[0] === 1.0) && (matrix[1] === 0.0)) && (matrix[2] === 0.0)) && (matrix[3] === 0.0)) && (matrix[4] === 1.0)) && (matrix[5] === 0.0));\n}\n\nfunction primitiveIsPureTranslation() {\n\tvar matrix;\n\n\tmatrix = loadArgumentMatrix(interpreterProxy.stackObjectValue(0));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(1);\n\tinterpreterProxy.pushBool((((matrix[0] === 1.0) && (matrix[1] === 0.0)) && (matrix[3] === 0.0)) && (matrix[4] === 1.0));\n}\n\nfunction primitiveTransformPoint() {\n\tvar matrix;\n\n\tloadArgumentPoint(interpreterProxy.stackObjectValue(0));\n\tmatrix = loadArgumentMatrix(interpreterProxy.stackObjectValue(1));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tmatrix2x3TransformPoint(matrix);\n\troundAndStoreResultPoint(2);\n}\n\nfunction primitiveTransformRectInto() {\n\tvar cornerX;\n\tvar cornerY;\n\tvar dstOop;\n\tvar matrix;\n\tvar maxX;\n\tvar maxY;\n\tvar minX;\n\tvar minY;\n\tvar originX;\n\tvar originY;\n\tvar srcOop;\n\n\tdstOop = interpreterProxy.stackObjectValue(0);\n\tsrcOop = interpreterProxy.stackObjectValue(1);\n\tmatrix = loadArgumentMatrix(interpreterProxy.stackObjectValue(2));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (CLASSOF(srcOop) !== CLASSOF(dstOop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (!interpreterProxy.isPointers(srcOop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (SIZEOF(srcOop) !== 2) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tloadArgumentPoint(interpreterProxy.fetchPointerofObject(0, srcOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\toriginX = m23ArgX;\n\toriginY = m23ArgY;\n\tmatrix2x3TransformPoint(matrix);\n\tminX = (maxX = m23ResultX);\n\n\t/* Load bottom-right point */\n\n\tminY = (maxY = m23ResultY);\n\tloadArgumentPoint(interpreterProxy.fetchPointerofObject(1, srcOop));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tcornerX = m23ArgX;\n\tcornerY = m23ArgY;\n\tmatrix2x3TransformPoint(matrix);\n\tminX = Math.min(minX, m23ResultX);\n\tmaxX = Math.max(maxX, m23ResultX);\n\tminY = Math.min(minY, m23ResultY);\n\n\t/* Load top-right point */\n\n\tmaxY = Math.max(maxY, m23ResultY);\n\tm23ArgX = cornerX;\n\tm23ArgY = originY;\n\tmatrix2x3TransformPoint(matrix);\n\tminX = Math.min(minX, m23ResultX);\n\tmaxX = Math.max(maxX, m23ResultX);\n\tminY = Math.min(minY, m23ResultY);\n\n\t/* Load bottom-left point */\n\n\tmaxY = Math.max(maxY, m23ResultY);\n\tm23ArgX = originX;\n\tm23ArgY = cornerY;\n\tmatrix2x3TransformPoint(matrix);\n\tminX = Math.min(minX, m23ResultX);\n\tmaxX = Math.max(maxX, m23ResultX);\n\tminY = Math.min(minY, m23ResultY);\n\tmaxY = Math.max(maxY, m23ResultY);\n\tdstOop = roundAndStoreResultRectx0y0x1y1(dstOop, minX, minY, maxX, maxY);\n\tif (!interpreterProxy.failed()) {\n\t\tinterpreterProxy.popthenPush(3, dstOop);\n\t}\n}\n\n\n/*\tStore the result of a previous operation.\n\tFail if we cannot represent the result as SmallInteger */\n\nfunction roundAndStoreResultPoint(nItemsToPop) {\n\tm23ResultX += 0.5;\n\tm23ResultY += 0.5;\n\tif (!okayIntValue(m23ResultX)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (!okayIntValue(m23ResultY)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tinterpreterProxy.popthenPush(nItemsToPop, interpreterProxy.makePointwithxValueyValue((m23ResultX|0), (m23ResultY|0)));\n}\n\n\n/*\tCheck, round and store the result of a rectangle operation */\n\nfunction roundAndStoreResultRectx0y0x1y1(dstOop, x0, y0, x1, y1) {\n\tvar cornerOop;\n\tvar maxX;\n\tvar maxY;\n\tvar minX;\n\tvar minY;\n\tvar originOop;\n\tvar rectOop;\n\n\tminX = x0 + 0.5;\n\tif (!okayIntValue(minX)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tmaxX = x1 + 0.5;\n\tif (!okayIntValue(maxX)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tminY = y0 + 0.5;\n\tif (!okayIntValue(minY)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tmaxY = y1 + 0.5;\n\tif (!okayIntValue(maxY)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tinterpreterProxy.pushRemappableOop(dstOop);\n\toriginOop = interpreterProxy.makePointwithxValueyValue((minX|0), (minY|0));\n\tinterpreterProxy.pushRemappableOop(originOop);\n\tcornerOop = interpreterProxy.makePointwithxValueyValue((maxX|0), (maxY|0));\n\toriginOop = interpreterProxy.popRemappableOop();\n\trectOop = interpreterProxy.popRemappableOop();\n\tinterpreterProxy.storePointerofObjectwithValue(0, rectOop, originOop);\n\tinterpreterProxy.storePointerofObjectwithValue(1, rectOop, cornerOop);\n\treturn rectOop;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nfunction setInterpreter(anInterpreter) {\n\tvar ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy.majorVersion() == VM_PROXY_MAJOR;\n\tif (ok === false) {\n\t\treturn false;\n\t}\n\tok = interpreterProxy.minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\nSqueak.registerExternalModule(\"Matrix2x3Plugin\", {\n\tprimitiveInvertPoint: primitiveInvertPoint,\n\tprimitiveInvertRectInto: primitiveInvertRectInto,\n\tprimitiveIsIdentity: primitiveIsIdentity,\n\tprimitiveComposeMatrix: primitiveComposeMatrix,\n\tsetInterpreter: setInterpreter,\n\tprimitiveTransformRectInto: primitiveTransformRectInto,\n\tprimitiveIsPureTranslation: primitiveIsPureTranslation,\n\tgetModuleName: getModuleName,\n\tprimitiveTransformPoint: primitiveTransformPoint,\n});\n\n}); // end of module\n","/* Smalltalk from Squeak4.5 with VMMaker 4.13.6 translated as JS source on 3 November 2014 1:52:23 pm */\n/* Automatically generated by\n\tJSPluginCodeGenerator VMMakerJS-bf.15 uuid: fd4e10f2-3773-4e80-8bb5-c4b471a014e5\n from\n\tMiscPrimitivePlugin VMMaker-bf.353 uuid: 8ae25e7e-8d2c-451e-8277-598b30e9c002\n */\n\nmodule(\"users.bert.SqueakJS.plugins.MiscPrimitivePlugin\").requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\"use strict\";\n\nvar VM_PROXY_MAJOR = 1;\nvar VM_PROXY_MINOR = 11;\n\n/*** Functions ***/\nfunction CLASSOF(obj) { return typeof obj === \"number\" ? interpreterProxy.classSmallInteger() : obj.sqClass }\nfunction SIZEOF(obj) { return obj.pointers ? obj.pointers.length : obj.words ? obj.words.length : obj.bytes ? obj.bytes.length : 0 }\nfunction BYTESIZEOF(obj) { return obj.bytes ? obj.bytes.length : obj.words ? obj.words.length * 4 : 0 }\nfunction DIV(a, b) { return Math.floor(a / b) | 0; } // integer division\nfunction MOD(a, b) { return a - DIV(a, b) * b | 0; } // signed modulus\nfunction SHL(a, b) { return b > 31 ? 0 : a << b; } // fix JS shift\nfunction SHR(a, b) { return b > 31 ? 0 : a >>> b; } // fix JS shift\nfunction SHIFT(a, b) { return b < 0 ? (b < -31 ? 0 : a >>> (0-b) ) : (b > 31 ? 0 : a << b); }\n\n/*** Variables ***/\nvar interpreterProxy = null;\nvar moduleName = \"MiscPrimitivePlugin 3 November 2014 (e)\";\n\n\n\n/*\tCopy the integer anInt into byteArray ba at index i, and return the next index */\n\nfunction encodeBytesOfinat(anInt, ba, i) {\n\tvar j;\n\n\tfor (j = 0; j <= 3; j++) {\n\t\tba[(i + j) - 1] = ((SHR(anInt, ((3 - j) * 8))) & 255);\n\t}\n\treturn i + 4;\n}\n\n\n/*\tEncode the integer anInt in byteArray ba at index i, and return the next index.\n\tThe encoding is as follows...\n\t\t0-223\t0-223\n\t\t224-254\t(0-30)*256 + next byte (0-7935)\n\t\t255\t\tnext 4 bytes */\n\nfunction encodeIntinat(anInt, ba, i) {\n\tif (anInt <= 223) {\n\t\tba[i - 1] = anInt;\n\t\treturn i + 1;\n\t}\n\tif (anInt <= 7935) {\n\t\tba[i - 1] = ((anInt >> 8) + 224);\n\t\tba[i] = (MOD(anInt, 256));\n\t\treturn i + 2;\n\t}\n\tba[i - 1] = 255;\n\treturn encodeBytesOfinat(anInt, ba, i + 1);\n}\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nfunction getInterpreter() {\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nfunction getModuleName() {\n\treturn moduleName;\n}\n\nfunction halt() {\n\t;\n}\n\nfunction msg(s) {\n\tconsole.log(moduleName + \": \" + s);\n}\n\n\n/*\tReturn 1, 2 or 3, if string1 is <, =, or > string2, with the collating order of characters given by the order array. */\n\nfunction primitiveCompareString() {\n\tvar rcvr;\n\tvar string1;\n\tvar string2;\n\tvar order;\n\tvar c1;\n\tvar c2;\n\tvar i;\n\tvar len1;\n\tvar len2;\n\n\trcvr = interpreterProxy.stackValue(3);\n\tstring1 = interpreterProxy.stackBytes(2);\n\tstring2 = interpreterProxy.stackBytes(1);\n\torder = interpreterProxy.stackBytes(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlen1 = string1.length;\n\tlen2 = string2.length;\n\tfor (i = 1; i <= Math.min(len1, len2); i++) {\n\t\tc1 = order[string1[i - 1]];\n\t\tc2 = order[string2[i - 1]];\n\t\tif (c1 !== c2) {\n\t\t\tif (c1 < c2) {\n\t\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tinterpreterProxy.popthenPush(4, 1);\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tinterpreterProxy.popthenPush(4, 3);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}\n\tif (len1 === len2) {\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy.popthenPush(4, 2);\n\t\treturn null;\n\t}\n\tif (len1 < len2) {\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy.popthenPush(4, 1);\n\t\treturn null;\n\t} else {\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy.popthenPush(4, 3);\n\t\treturn null;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(3);\n}\n\n\n/*\tStore a run-coded compression of the receiver into the byteArray ba,\n\tand return the last index stored into. ba is assumed to be large enough.\n\tThe encoding is as follows...\n\t\tS {N D}*.\n\t\tS is the size of the original bitmap, followed by run-coded pairs.\n\t\tN is a run-length * 4 + data code.\n\t\tD, the data, depends on the data code...\n\t\t\t0\tskip N words, D is absent\n\t\t\t1\tN words with all 4 bytes = D (1 byte)\n\t\t\t2\tN words all = D (4 bytes)\n\t\t\t3\tN words follow in D (4N bytes)\n\t\tS and N are encoded as follows...\n\t\t\t0-223\t0-223\n\t\t\t224-254\t(0-30)*256 + next byte (0-7935)\n\t\t\t255\t\tnext 4 bytes */\n\nfunction primitiveCompressToByteArray() {\n\tvar rcvr;\n\tvar bm;\n\tvar ba;\n\tvar eqBytes;\n\tvar i;\n\tvar j;\n\tvar k;\n\tvar lowByte;\n\tvar m;\n\tvar size;\n\tvar word;\n\n\trcvr = interpreterProxy.stackValue(2);\n\tbm = interpreterProxy.stackInt32Array(1);\n\tba = interpreterProxy.stackBytes(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tsize = bm.length;\n\ti = encodeIntinat(size, ba, 1);\n\tk = 1;\n\twhile (k <= size) {\n\t\tword = bm[k - 1];\n\t\tlowByte = word & 255;\n\t\teqBytes = (((word >>> 8) & 255) === lowByte) && ((((word >>> 16) & 255) === lowByte) && (((word >>> 24) & 255) === lowByte));\n\t\tj = k;\n\t\twhile ((j < size) && (word === bm[j])) {\n\t\t\t++j;\n\t\t}\n\t\tif (j > k) {\n\n\t\t\t/* We have two or more = words, ending at j */\n\n\t\t\tif (eqBytes) {\n\n\t\t\t\t/* Actually words of = bytes */\n\n\t\t\t\ti = encodeIntinat((((j - k) + 1) * 4) + 1, ba, i);\n\t\t\t\tba[i - 1] = lowByte;\n\t\t\t\t++i;\n\t\t\t} else {\n\t\t\t\ti = encodeIntinat((((j - k) + 1) * 4) + 2, ba, i);\n\t\t\t\ti = encodeBytesOfinat(word, ba, i);\n\t\t\t}\n\t\t\tk = j + 1;\n\t\t} else {\n\n\t\t\t/* Check for word of 4 = bytes */\n\n\t\t\tif (eqBytes) {\n\n\t\t\t\t/* Note 1 word of 4 = bytes */\n\n\t\t\t\ti = encodeIntinat((1 * 4) + 1, ba, i);\n\t\t\t\tba[i - 1] = lowByte;\n\t\t\t\t++i;\n\t\t\t\t++k;\n\t\t\t} else {\n\n\t\t\t\t/* Finally, check for junk */\n\n\t\t\t\twhile ((j < size) && (bm[j - 1] !== bm[j])) {\n\t\t\t\t\t++j;\n\t\t\t\t}\n\t\t\t\tif (j === size) {\n\t\t\t\t\t++j;\n\t\t\t\t}\n\t\t\t\ti = encodeIntinat(((j - k) * 4) + 3, ba, i);\n\t\t\t\tfor (m = k; m <= (j - 1); m++) {\n\t\t\t\t\ti = encodeBytesOfinat(bm[m - 1], ba, i);\n\t\t\t\t}\n\t\t\t\tk = j;\n\t\t\t}\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(3, i - 1);\n\treturn null;\n}\n\n\n/*\tCopy the contents of the given array of signed 8-bit samples into the given array of 16-bit signed samples. */\n\nfunction primitiveConvert8BitSigned() {\n\tvar rcvr;\n\tvar aByteArray;\n\tvar aSoundBuffer;\n\tvar i;\n\tvar n;\n\tvar s;\n\n\trcvr = interpreterProxy.stackValue(2);\n\taByteArray = interpreterProxy.stackBytes(1);\n\taSoundBuffer = interpreterProxy.stackUint16Array(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tn = aByteArray.length;\n\tfor (i = 1; i <= n; i++) {\n\t\ts = aByteArray[i - 1];\n\t\tif (s > 127) {\n\t\t\taSoundBuffer[i - 1] = ((s - 256) << 8);\n\t\t} else {\n\t\t\taSoundBuffer[i - 1] = (s << 8);\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(2);\n}\n\n\n/*\tDecompress the body of a byteArray encoded by compressToByteArray (qv)...\n\tThe format is simply a sequence of run-coded pairs, {N D}*.\n\t\tN is a run-length * 4 + data code.\n\t\tD, the data, depends on the data code...\n\t\t\t0\tskip N words, D is absent\n\t\t\t\t(could be used to skip from one raster line to the next)\n\t\t\t1\tN words with all 4 bytes = D (1 byte)\n\t\t\t2\tN words all = D (4 bytes)\n\t\t\t3\tN words follow in D (4N bytes)\n\t\tS and N are encoded as follows (see decodeIntFrom:)...\n\t\t\t0-223\t0-223\n\t\t\t224-254\t(0-30)*256 + next byte (0-7935)\n\t\t\t255\t\tnext 4 bytes */\n/*\tNOTE: If fed with garbage, this routine could read past the end of ba, but it should fail before writing past the ned of bm. */\n\nfunction primitiveDecompressFromByteArray() {\n\tvar rcvr;\n\tvar bm;\n\tvar ba;\n\tvar index;\n\tvar anInt;\n\tvar code;\n\tvar data;\n\tvar end;\n\tvar i;\n\tvar j;\n\tvar k;\n\tvar m;\n\tvar n;\n\tvar pastEnd;\n\n\trcvr = interpreterProxy.stackValue(3);\n\tbm = interpreterProxy.stackInt32Array(2);\n\tba = interpreterProxy.stackBytes(1);\n\tindex = interpreterProxy.stackIntegerValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\n\t/* byteArray read index */\n\n\ti = index;\n\tend = ba.length;\n\n\t/* bitmap write index */\n\n\tk = 1;\n\tpastEnd = bm.length + 1;\n\twhile (i <= end) {\n\n\t\t/* Decode next run start N */\n\n\t\tanInt = ba[i - 1];\n\t\t++i;\n\t\tif (!(anInt <= 223)) {\n\t\t\tif (anInt <= 254) {\n\t\t\t\tanInt = ((anInt - 224) * 256) + ba[i - 1];\n\t\t\t\t++i;\n\t\t\t} else {\n\t\t\t\tanInt = 0;\n\t\t\t\tfor (j = 1; j <= 4; j++) {\n\t\t\t\t\tanInt = (anInt << 8) + ba[i - 1];\n\t\t\t\t\t++i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tn = anInt >>> 2;\n\t\tif ((k + n) > pastEnd) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn null;\n\t\t}\n\t\tcode = anInt & 3;\n\t\tif (code === 0) {\n\n\t\t\t/* skip */\n\n\t\t\tnull;\n\t\t}\n\t\tif (code === 1) {\n\n\t\t\t/* n consecutive words of 4 bytes = the following byte */\n\n\t\t\tdata = ba[i - 1];\n\t\t\t++i;\n\t\t\tdata = data | (data << 8);\n\t\t\tdata = data | (data << 16);\n\t\t\tfor (j = 1; j <= n; j++) {\n\t\t\t\tbm[k - 1] = data;\n\t\t\t\t++k;\n\t\t\t}\n\t\t}\n\t\tif (code === 2) {\n\n\t\t\t/* n consecutive words = 4 following bytes */\n\n\t\t\tdata = 0;\n\t\t\tfor (j = 1; j <= 4; j++) {\n\t\t\t\tdata = (data << 8) | ba[i - 1];\n\t\t\t\t++i;\n\t\t\t}\n\t\t\tfor (j = 1; j <= n; j++) {\n\t\t\t\tbm[k - 1] = data;\n\t\t\t\t++k;\n\t\t\t}\n\t\t}\n\t\tif (code === 3) {\n\n\t\t\t/* n consecutive words from the data... */\n\n\t\t\tfor (m = 1; m <= n; m++) {\n\t\t\t\tdata = 0;\n\t\t\t\tfor (j = 1; j <= 4; j++) {\n\t\t\t\t\tdata = (data << 8) | ba[i - 1];\n\t\t\t\t\t++i;\n\t\t\t\t}\n\t\t\t\tbm[k - 1] = data;\n\t\t\t\t++k;\n\t\t\t}\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(3);\n}\n\nfunction primitiveFindFirstInString() {\n\tvar rcvr;\n\tvar aString;\n\tvar inclusionMap;\n\tvar start;\n\tvar i;\n\tvar stringSize;\n\n\trcvr = interpreterProxy.stackValue(3);\n\taString = interpreterProxy.stackBytes(2);\n\tinclusionMap = interpreterProxy.stackBytes(1);\n\tstart = interpreterProxy.stackIntegerValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (inclusionMap.length !== 256) {\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy.popthenPush(4, 0);\n\t\treturn null;\n\t}\n\ti = start;\n\tstringSize = aString.length;\n\twhile ((i <= stringSize) && (inclusionMap[aString[i - 1]] === 0)) {\n\t\t++i;\n\t}\n\tif (i > stringSize) {\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy.popthenPush(4, 0);\n\t\treturn null;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(4, i);\n\treturn null;\n}\n\n\n/*\tAnswer the index in the string body at which the substring key first occurs, at or beyond start. The match is determined using matchTable, which can be used to effect, eg, case-insensitive matches. If no match is found, zero will be returned.\n\n\tThe algorithm below is not optimum -- it is intended to be translated to C which will go so fast that it wont matter. */\n\nfunction primitiveFindSubstring() {\n\tvar rcvr;\n\tvar key;\n\tvar body;\n\tvar start;\n\tvar matchTable;\n\tvar index;\n\tvar startIndex;\n\n\trcvr = interpreterProxy.stackValue(4);\n\tkey = interpreterProxy.stackBytes(3);\n\tbody = interpreterProxy.stackBytes(2);\n\tstart = interpreterProxy.stackIntegerValue(1);\n\tmatchTable = interpreterProxy.stackBytes(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (key.length === 0) {\n\t\tif (interpreterProxy.failed()) {\n\t\t\treturn null;\n\t\t}\n\t\tinterpreterProxy.popthenPush(5, 0);\n\t\treturn null;\n\t}\n\tfor (startIndex = start; startIndex <= ((body.length - key.length) + 1); startIndex++) {\n\t\tindex = 1;\n\t\twhile (matchTable[body[((startIndex + index) - 1) - 1]] === matchTable[key[index - 1]]) {\n\t\t\tif (index === key.length) {\n\t\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tinterpreterProxy.popthenPush(5, startIndex);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t++index;\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(5, 0);\n\treturn null;\n}\n\nfunction primitiveIndexOfAsciiInString() {\n\tvar rcvr;\n\tvar anInteger;\n\tvar aString;\n\tvar start;\n\tvar pos;\n\tvar stringSize;\n\n\trcvr = interpreterProxy.stackValue(3);\n\tanInteger = interpreterProxy.stackIntegerValue(2);\n\taString = interpreterProxy.stackBytes(1);\n\tstart = interpreterProxy.stackIntegerValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tstringSize = aString.length;\n\tfor (pos = start; pos <= stringSize; pos++) {\n\t\tif (aString[pos - 1] === anInteger) {\n\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tinterpreterProxy.popthenPush(4, pos);\n\t\t\treturn null;\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(4, 0);\n\treturn null;\n}\n\n\n/*\tAnswer the hash of a byte-indexed collection,\n\tusing speciesHash as the initial value.\n\tSee SmallInteger>>hashMultiply.\n\n\tThe primitive should be renamed at a\n\tsuitable point in the future */\n\nfunction primitiveStringHash() {\n\tvar rcvr;\n\tvar aByteArray;\n\tvar speciesHash;\n\tvar byteArraySize;\n\tvar hash;\n\tvar low;\n\tvar pos;\n\n\trcvr = interpreterProxy.stackValue(2);\n\taByteArray = interpreterProxy.stackBytes(1);\n\tspeciesHash = interpreterProxy.stackIntegerValue(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tbyteArraySize = aByteArray.length;\n\thash = speciesHash & 268435455;\n\tfor (pos = 1; pos <= byteArraySize; pos++) {\n\n\t\t/* Begin hashMultiply */\n\n\t\thash += aByteArray[pos - 1];\n\t\tlow = hash & 16383;\n\t\thash = ((9741 * low) + ((((9741 * (hash >>> 14)) + (101 * low)) & 16383) * 16384)) & 268435455;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.popthenPush(3, hash);\n\treturn null;\n}\n\n\n/*\ttranslate the characters in the string by the given table, in place */\n\nfunction primitiveTranslateStringWithTable() {\n\tvar rcvr;\n\tvar aString;\n\tvar start;\n\tvar stop;\n\tvar table;\n\tvar i;\n\n\trcvr = interpreterProxy.stackValue(4);\n\taString = interpreterProxy.stackBytes(3);\n\tstart = interpreterProxy.stackIntegerValue(2);\n\tstop = interpreterProxy.stackIntegerValue(1);\n\ttable = interpreterProxy.stackBytes(0);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tfor (i = start; i <= stop; i++) {\n\t\taString[i - 1] = table[aString[i - 1]];\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.pop(4);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nfunction setInterpreter(anInterpreter) {\n\tvar ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy.majorVersion() == VM_PROXY_MAJOR;\n\tif (ok === false) {\n\t\treturn false;\n\t}\n\tok = interpreterProxy.minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\nSqueak.registerExternalModule(\"MiscPrimitivePlugin\", {\n\tprimitiveConvert8BitSigned: primitiveConvert8BitSigned,\n\tprimitiveCompareString: primitiveCompareString,\n\tprimitiveTranslateStringWithTable: primitiveTranslateStringWithTable,\n\tprimitiveStringHash: primitiveStringHash,\n\tprimitiveCompressToByteArray: primitiveCompressToByteArray,\n\tprimitiveFindSubstring: primitiveFindSubstring,\n\tprimitiveIndexOfAsciiInString: primitiveIndexOfAsciiInString,\n\tsetInterpreter: setInterpreter,\n\tprimitiveDecompressFromByteArray: primitiveDecompressFromByteArray,\n\tgetModuleName: getModuleName,\n\tprimitiveFindFirstInString: primitiveFindFirstInString,\n});\n\n}); // end of module\n","/* Smalltalk from Squeak4.5 with VMMaker 4.13.6 translated as JS source on 3 November 2014 1:52:23 pm */\n/* Automatically generated by\n\tJSPluginCodeGenerator VMMakerJS-bf.15 uuid: fd4e10f2-3773-4e80-8bb5-c4b471a014e5\n from\n\tScratchPlugin VMMaker-bf.353 uuid: 8ae25e7e-8d2c-451e-8277-598b30e9c002\n */\n\nmodule(\"users.bert.SqueakJS.plugins.ScratchPlugin\").requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\"use strict\";\n\nvar VM_PROXY_MAJOR = 1;\nvar VM_PROXY_MINOR = 11;\n\n/*** Functions ***/\nfunction CLASSOF(obj) { return typeof obj === \"number\" ? interpreterProxy.classSmallInteger() : obj.sqClass }\nfunction SIZEOF(obj) { return obj.pointers ? obj.pointers.length : obj.words ? obj.words.length : obj.bytes ? obj.bytes.length : 0 }\nfunction BYTESIZEOF(obj) { return obj.bytes ? obj.bytes.length : obj.words ? obj.words.length * 4 : 0 }\nfunction DIV(a, b) { return Math.floor(a / b) | 0; } // integer division\nfunction MOD(a, b) { return a - DIV(a, b) * b | 0; } // signed modulus\nfunction SHL(a, b) { return b > 31 ? 0 : a << b; } // fix JS shift\nfunction SHR(a, b) { return b > 31 ? 0 : a >>> b; } // fix JS shift\nfunction SHIFT(a, b) { return b < 0 ? (b < -31 ? 0 : a >>> (0-b) ) : (b > 31 ? 0 : a << b); }\n\n/*** Variables ***/\nvar interpreterProxy = null;\nvar moduleName = \"ScratchPlugin 3 November 2014 (e)\";\n\n\nfunction bitmapatputHsv(bitmap, i, hue, saturation, brightness) {\n\tvar hF;\n\tvar hI;\n\tvar outPix;\n\tvar p;\n\tvar q;\n\tvar t;\n\tvar v;\n\n\n\t/* integer part of hue (0..5) */\n\n\thI = DIV(hue, 60);\n\n\t/* fractional part ofhue */\n\n\thF = MOD(hue, 60);\n\tp = (1000 - saturation) * brightness;\n\tq = (1000 - (DIV((saturation * hF), 60))) * brightness;\n\tt = (1000 - (DIV((saturation * (60 - hF)), 60))) * brightness;\n\tv = DIV((brightness * 1000), 3922);\n\tp = DIV(p, 3922);\n\tq = DIV(q, 3922);\n\tt = DIV(t, 3922);\n\tif (0 === hI) {\n\t\toutPix = ((v << 16) + (t << 8)) + p;\n\t}\n\tif (1 === hI) {\n\t\toutPix = ((q << 16) + (v << 8)) + p;\n\t}\n\tif (2 === hI) {\n\t\toutPix = ((p << 16) + (v << 8)) + t;\n\t}\n\tif (3 === hI) {\n\t\toutPix = ((p << 16) + (q << 8)) + v;\n\t}\n\tif (4 === hI) {\n\t\toutPix = ((t << 16) + (p << 8)) + v;\n\t}\n\tif (5 === hI) {\n\t\toutPix = ((v << 16) + (p << 8)) + q;\n\t}\n\tif (outPix === 0) {\n\t\toutPix = 1;\n\t}\n\tbitmap[i] = outPix;\n\treturn 0;\n}\n\n\n/*\tReturn an unsigned int pointer to the first indexable word of oop, which must be a words object. */\n\nfunction checkedFloatPtrOf(oop) {\n\tinterpreterProxy.success(interpreterProxy.isWordsOrBytes(oop));\n\tif (interpreterProxy.failed()) {\n\t\treturn 0;\n\t}\n\treturn oop.wordsAsFloat64Array();\n}\n\n\n/*\tReturn an unsigned int pointer to the first indexable word of oop, which must be a words object. */\n\nfunction checkedUnsignedIntPtrOf(oop) {\n\tinterpreterProxy.success(interpreterProxy.isWords(oop));\n\tif (interpreterProxy.failed()) {\n\t\treturn 0;\n\t}\n\treturn oop.words;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nfunction getModuleName() {\n\treturn moduleName;\n}\n\nfunction halt() {\n\t;\n}\n\n\n/*\tAnswer the hue, an angle between 0 and 360. */\n\nfunction hueFromRGBminmax(r, g, b, min, max) {\n\tvar result;\n\tvar span;\n\n\tspan = max - min;\n\tif (span === 0) {\n\t\treturn 0;\n\t}\n\tif (r === max) {\n\t\tresult = DIV((60 * (g - b)), span);\n\t} else {\n\t\tif (g === max) {\n\t\t\tresult = 120 + (DIV((60 * (b - r)), span));\n\t\t} else {\n\t\t\tresult = 240 + (DIV((60 * (r - g)), span));\n\t\t}\n\t}\n\tif (result < 0) {\n\t\treturn result + 360;\n\t}\n\treturn result;\n}\n\n\n/*\tAnswer the interpolated pixel value between the given two pixel values. If either pixel is zero (transparent) answer the other pixel. If both pixels are transparent, answer transparent. The fraction is between 0 and 1023, out of a total range of 1024. */\n\nfunction interpolateandfrac(pix1, pix2, frac2) {\n\tvar b;\n\tvar frac1;\n\tvar g;\n\tvar r;\n\tvar result;\n\n\tif (pix1 === 0) {\n\t\treturn pix2;\n\t}\n\tif (pix2 === 0) {\n\t\treturn pix1;\n\t}\n\tfrac1 = 1024 - frac2;\n\tr = ((frac1 * ((pix1 >>> 16) & 255)) + (frac2 * ((pix2 >>> 16) & 255))) >> 10;\n\tg = ((frac1 * ((pix1 >>> 8) & 255)) + (frac2 * ((pix2 >>> 8) & 255))) >> 10;\n\tb = ((frac1 * (pix1 & 255)) + (frac2 * (pix2 & 255))) >> 10;\n\tresult = ((r << 16) + (g << 8)) + b;\n\tif (result === 0) {\n\t\tresult = 1;\n\t}\n\treturn result;\n}\n\n\n/*\tAnswer the interpolated pixel value from the given bitmap at the given point. The x and y coordinates are fixed-point integers with 10 bits of fraction (i.e. they were multiplied by 1024, then truncated). If the given point is right on an edge, answer the nearest edge pixel value. If it is entirely outside of the image, answer 0 (transparent). */\n\nfunction interpolatedFromxywidthheight(bitmap, xFixed, yFixed, w, h) {\n\tvar bottomPix;\n\tvar index;\n\tvar topPix;\n\tvar x;\n\tvar xFrac;\n\tvar y;\n\tvar yFrac;\n\n\tx = xFixed >>> 10;\n\tif ((x < -1) || (x >= w)) {\n\t\treturn 0;\n\t}\n\ty = yFixed >>> 10;\n\tif ((y < -1) || (y >= h)) {\n\t\treturn 0;\n\t}\n\txFrac = xFixed & 1023;\n\tif (x === -1) {\n\t\tx = 0;\n\t\txFrac = 0;\n\t}\n\tif (x === (w - 1)) {\n\t\txFrac = 0;\n\t}\n\tyFrac = yFixed & 1023;\n\tif (y === -1) {\n\t\ty = 0;\n\t\tyFrac = 0;\n\t}\n\tif (y === (h - 1)) {\n\t\tyFrac = 0;\n\t}\n\n\t/* for squeak: + 1 */\n\n\tindex = (y * w) + x;\n\ttopPix = bitmap[index] & 16777215;\n\tif (xFrac > 0) {\n\t\ttopPix = interpolateandfrac(topPix, bitmap[index + 1] & 16777215, xFrac);\n\t}\n\tif (yFrac === 0) {\n\t\treturn topPix;\n\t}\n\n\t/* for squeak: + 1 */\n\n\tindex = ((y + 1) * w) + x;\n\tbottomPix = bitmap[index] & 16777215;\n\tif (xFrac > 0) {\n\t\tbottomPix = interpolateandfrac(bottomPix, bitmap[index + 1] & 16777215, xFrac);\n\t}\n\treturn interpolateandfrac(topPix, bottomPix, yFrac);\n}\n\nfunction primitiveBlur() {\n\tvar bTotal;\n\tvar dX;\n\tvar dY;\n\tvar gTotal;\n\tvar height;\n\tvar in_;\n\tvar inOop;\n\tvar n;\n\tvar out;\n\tvar outOop;\n\tvar outPix;\n\tvar pix;\n\tvar rTotal;\n\tvar sz;\n\tvar width;\n\tvar x;\n\tvar y;\n\n\tinOop = interpreterProxy.stackValue(2);\n\toutOop = interpreterProxy.stackValue(1);\n\twidth = interpreterProxy.stackIntegerValue(0);\n\tin_ = checkedUnsignedIntPtrOf(inOop);\n\tout = checkedUnsignedIntPtrOf(outOop);\n\tsz = SIZEOF(inOop);\n\tinterpreterProxy.success(SIZEOF(outOop) === sz);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\theight = DIV(sz, width);\n\tfor (y = 1; y <= (height - 2); y++) {\n\t\tfor (x = 1; x <= (width - 2); x++) {\n\t\t\tn = (rTotal = (gTotal = (bTotal = 0)));\n\t\t\tfor (dY = -1; dY <= 1; dY++) {\n\t\t\t\tfor (dX = -1; dX <= 1; dX++) {\n\n\t\t\t\t\t/* add 1 when testing in Squeak */\n\n\t\t\t\t\tpix = in_[((y + dY) * width) + (x + dX)] & 16777215;\n\t\t\t\t\tif (pix !== 0) {\n\n\t\t\t\t\t\t/* skip transparent pixels */\n\n\t\t\t\t\t\trTotal += (pix >>> 16) & 255;\n\t\t\t\t\t\tgTotal += (pix >>> 8) & 255;\n\t\t\t\t\t\tbTotal += pix & 255;\n\t\t\t\t\t\t++n;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (n === 0) {\n\t\t\t\toutPix = 0;\n\t\t\t} else {\n\t\t\t\toutPix = (((DIV(rTotal, n)) << 16) + ((DIV(gTotal, n)) << 8)) + (DIV(bTotal, n));\n\t\t\t}\n\t\t\tout[(y * width) + x] = outPix;\n\t\t}\n\t}\n\tinterpreterProxy.pop(3);\n\treturn 0;\n}\n\nfunction primitiveBrightnessShift() {\n\tvar b;\n\tvar brightness;\n\tvar g;\n\tvar hue;\n\tvar i;\n\tvar in_;\n\tvar inOop;\n\tvar max;\n\tvar min;\n\tvar out;\n\tvar outOop;\n\tvar pix;\n\tvar r;\n\tvar saturation;\n\tvar shift;\n\tvar sz;\n\n\tinOop = interpreterProxy.stackValue(2);\n\toutOop = interpreterProxy.stackValue(1);\n\tshift = interpreterProxy.stackIntegerValue(0);\n\tin_ = checkedUnsignedIntPtrOf(inOop);\n\tsz = SIZEOF(inOop);\n\tout = checkedUnsignedIntPtrOf(outOop);\n\tinterpreterProxy.success(SIZEOF(outOop) === sz);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tfor (i = 0; i <= (sz - 1); i++) {\n\t\tpix = in_[i] & 16777215;\n\t\tif (pix !== 0) {\n\n\t\t\t/* skip pixel values of 0 (transparent) */\n\n\t\t\tr = (pix >>> 16) & 255;\n\t\t\tg = (pix >>> 8) & 255;\n\n\t\t\t/* find min and max color components */\n\n\t\t\tb = pix & 255;\n\t\t\tmax = (min = r);\n\t\t\tif (g > max) {\n\t\t\t\tmax = g;\n\t\t\t}\n\t\t\tif (b > max) {\n\t\t\t\tmax = b;\n\t\t\t}\n\t\t\tif (g < min) {\n\t\t\t\tmin = g;\n\t\t\t}\n\t\t\tif (b < min) {\n\t\t\t\tmin = b;\n\t\t\t}\n\n\t\t\t/* find current saturation and brightness with range 0 to 1000 */\n\n\t\t\thue = hueFromRGBminmax(r, g, b, min, max);\n\t\t\tif (max === 0) {\n\t\t\t\tsaturation = 0;\n\t\t\t} else {\n\t\t\t\tsaturation = DIV(((max - min) * 1000), max);\n\t\t\t}\n\n\t\t\t/* compute new brigthness */\n\n\t\t\tbrightness = DIV((max * 1000), 255);\n\t\t\tbrightness += shift * 10;\n\t\t\tif (brightness > 1000) {\n\t\t\t\tbrightness = 1000;\n\t\t\t}\n\t\t\tif (brightness < 0) {\n\t\t\t\tbrightness = 0;\n\t\t\t}\n\t\t\tbitmapatputHsv(out, i, hue, saturation, brightness);\n\t\t}\n\t}\n\tinterpreterProxy.pop(3);\n\treturn 0;\n}\n\nfunction primitiveCondenseSound() {\n\tvar count;\n\tvar dst;\n\tvar dstOop;\n\tvar factor;\n\tvar i;\n\tvar j;\n\tvar max;\n\tvar src;\n\tvar srcOop;\n\tvar sz;\n\tvar v;\n\tvar _src = 0;\n\tvar _dst = 0;\n\n\tsrcOop = interpreterProxy.stackValue(2);\n\tdstOop = interpreterProxy.stackValue(1);\n\tfactor = interpreterProxy.stackIntegerValue(0);\n\tinterpreterProxy.success(interpreterProxy.isWords(srcOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(dstOop));\n\tcount = DIV((2 * SIZEOF(srcOop)), factor);\n\tsz = 2 * SIZEOF(dstOop);\n\tinterpreterProxy.success(sz >= count);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tsrc = srcOop.wordsAsInt16Array();\n\tdst = dstOop.wordsAsInt16Array();\n\tfor (i = 1; i <= count; i++) {\n\t\tmax = 0;\n\t\tfor (j = 1; j <= factor; j++) {\n\t\t\tv = src[_src++];\n\t\t\tif (v < 0) {\n\t\t\t\tv = 0 - v;\n\t\t\t}\n\t\t\tif (v > max) {\n\t\t\t\tmax = v;\n\t\t\t}\n\t\t}\n\t\tdst[_dst++] = max;\n\t}\n\tinterpreterProxy.pop(3);\n\treturn 0;\n}\n\nfunction primitiveDoubleSize() {\n\tvar baseIndex;\n\tvar dstX;\n\tvar dstY;\n\tvar i;\n\tvar in_;\n\tvar inH;\n\tvar inOop;\n\tvar inW;\n\tvar out;\n\tvar outH;\n\tvar outOop;\n\tvar outW;\n\tvar pix;\n\tvar x;\n\tvar y;\n\n\tinOop = interpreterProxy.stackValue(7);\n\tinW = interpreterProxy.stackIntegerValue(6);\n\tinH = interpreterProxy.stackIntegerValue(5);\n\toutOop = interpreterProxy.stackValue(4);\n\toutW = interpreterProxy.stackIntegerValue(3);\n\toutH = interpreterProxy.stackIntegerValue(2);\n\tdstX = interpreterProxy.stackIntegerValue(1);\n\tdstY = interpreterProxy.stackIntegerValue(0);\n\tin_ = checkedUnsignedIntPtrOf(inOop);\n\tout = checkedUnsignedIntPtrOf(outOop);\n\tinterpreterProxy.success((dstX + (2 * inW)) < outW);\n\tinterpreterProxy.success((dstY + (2 * inH)) < outH);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tfor (y = 0; y <= (inH - 1); y++) {\n\t\tbaseIndex = ((dstY + (2 * y)) * outW) + dstX;\n\t\tfor (x = 0; x <= (inW - 1); x++) {\n\t\t\tpix = in_[x + (y * inW)];\n\t\t\ti = baseIndex + (2 * x);\n\t\t\tout[i] = pix;\n\t\t\tout[i + 1] = pix;\n\t\t\tout[i + outW] = pix;\n\t\t\tout[(i + outW) + 1] = pix;\n\t\t}\n\t}\n\tinterpreterProxy.pop(8);\n\treturn 0;\n}\n\nfunction primitiveExtractChannel() {\n\tvar dst;\n\tvar dstOop;\n\tvar i;\n\tvar rightFlag;\n\tvar src;\n\tvar srcOop;\n\tvar sz;\n\tvar _src = 0;\n\tvar _dst = 0;\n\n\tsrcOop = interpreterProxy.stackValue(2);\n\tdstOop = interpreterProxy.stackValue(1);\n\trightFlag = interpreterProxy.booleanValueOf(interpreterProxy.stackValue(0));\n\tinterpreterProxy.success(interpreterProxy.isWords(srcOop));\n\tinterpreterProxy.success(interpreterProxy.isWords(dstOop));\n\tsz = SIZEOF(srcOop);\n\tinterpreterProxy.success(SIZEOF(dstOop) >= (sz >> 1));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tsrc = srcOop.wordsAsInt16Array();\n\tdst = dstOop.wordsAsInt16Array();\n\tif (rightFlag) {\n\t\t_src++;\n\t}\n\tfor (i = 1; i <= sz; i++) {\n\t\tdst[_dst++] = src[_src]; _src += 2;\n\t}\n\tinterpreterProxy.pop(3);\n\treturn 0;\n}\n\nfunction primitiveFisheye() {\n\tvar ang;\n\tvar centerX;\n\tvar centerY;\n\tvar dx;\n\tvar dy;\n\tvar height;\n\tvar in_;\n\tvar inOop;\n\tvar out;\n\tvar outOop;\n\tvar pix;\n\tvar power;\n\tvar r;\n\tvar scaledPower;\n\tvar srcX;\n\tvar srcY;\n\tvar sz;\n\tvar width;\n\tvar x;\n\tvar y;\n\n\tinOop = interpreterProxy.stackValue(3);\n\toutOop = interpreterProxy.stackValue(2);\n\twidth = interpreterProxy.stackIntegerValue(1);\n\tpower = interpreterProxy.stackIntegerValue(0);\n\tin_ = checkedUnsignedIntPtrOf(inOop);\n\tout = checkedUnsignedIntPtrOf(outOop);\n\tsz = SIZEOF(inOop);\n\tinterpreterProxy.success(SIZEOF(outOop) === sz);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\theight = DIV(sz, width);\n\tcenterX = width >> 1;\n\tcenterY = height >> 1;\n\theight = DIV(sz, width);\n\tcenterX = width >> 1;\n\tcenterY = height >> 1;\n\tscaledPower = power / 100.0;\n\tfor (x = 0; x <= (width - 1); x++) {\n\t\tfor (y = 0; y <= (height - 1); y++) {\n\t\t\tdx = (x - centerX) / centerX;\n\t\t\tdy = (y - centerY) / centerY;\n\t\t\tr = Math.pow(Math.sqrt((dx * dx) + (dy * dy)),scaledPower);\n\t\t\tif (r <= 1.0) {\n\t\t\t\tang = Math.atan2(dy,dx);\n\t\t\t\tsrcX = ((1024 * (centerX + ((r * Math.cos(ang)) * centerX)))|0);\n\t\t\t\tsrcY = ((1024 * (centerY + ((r * Math.sin(ang)) * centerY)))|0);\n\t\t\t} else {\n\t\t\t\tsrcX = 1024 * x;\n\t\t\t\tsrcY = 1024 * y;\n\t\t\t}\n\t\t\tpix = interpolatedFromxywidthheight(in_, srcX, srcY, width, height);\n\t\t\tout[(y * width) + x] = pix;\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\treturn 0;\n}\n\nfunction primitiveHalfSizeAverage() {\n\tvar b;\n\tvar dstH;\n\tvar dstIndex;\n\tvar dstW;\n\tvar dstX;\n\tvar dstY;\n\tvar g;\n\tvar in_;\n\tvar inH;\n\tvar inW;\n\tvar out;\n\tvar outH;\n\tvar outW;\n\tvar pixel;\n\tvar r;\n\tvar srcIndex;\n\tvar srcX;\n\tvar srcY;\n\tvar x;\n\tvar y;\n\n\tin_ = checkedUnsignedIntPtrOf(interpreterProxy.stackValue(11));\n\tinW = interpreterProxy.stackIntegerValue(10);\n\tinH = interpreterProxy.stackIntegerValue(9);\n\tout = checkedUnsignedIntPtrOf(interpreterProxy.stackValue(8));\n\toutW = interpreterProxy.stackIntegerValue(7);\n\toutH = interpreterProxy.stackIntegerValue(6);\n\tsrcX = interpreterProxy.stackIntegerValue(5);\n\tsrcY = interpreterProxy.stackIntegerValue(4);\n\tdstX = interpreterProxy.stackIntegerValue(3);\n\tdstY = interpreterProxy.stackIntegerValue(2);\n\tdstW = interpreterProxy.stackIntegerValue(1);\n\tdstH = interpreterProxy.stackIntegerValue(0);\n\tinterpreterProxy.success((srcX >= 0) && (srcY >= 0));\n\tinterpreterProxy.success((srcX + (2 * dstW)) <= inW);\n\tinterpreterProxy.success((srcY + (2 * dstH)) <= inH);\n\tinterpreterProxy.success((dstX >= 0) && (dstY >= 0));\n\tinterpreterProxy.success((dstX + dstW) <= outW);\n\tinterpreterProxy.success((dstY + dstH) <= outH);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tfor (y = 0; y <= (dstH - 1); y++) {\n\t\tsrcIndex = (inW * (srcY + (2 * y))) + srcX;\n\t\tdstIndex = (outW * (dstY + y)) + dstX;\n\t\tfor (x = 0; x <= (dstW - 1); x++) {\n\t\t\tpixel = in_[srcIndex];\n\t\t\tr = pixel & 16711680;\n\t\t\tg = pixel & 65280;\n\t\t\tb = pixel & 255;\n\t\t\tpixel = in_[srcIndex + 1];\n\t\t\tr += pixel & 16711680;\n\t\t\tg += pixel & 65280;\n\t\t\tb += pixel & 255;\n\t\t\tpixel = in_[srcIndex + inW];\n\t\t\tr += pixel & 16711680;\n\t\t\tg += pixel & 65280;\n\t\t\tb += pixel & 255;\n\t\t\tpixel = in_[(srcIndex + inW) + 1];\n\t\t\tr += pixel & 16711680;\n\t\t\tg += pixel & 65280;\n\n\t\t\t/* store combined RGB into target bitmap */\n\n\t\t\tb += pixel & 255;\n\t\t\tout[dstIndex] = (((r >>> 2) & 16711680) | (((g >>> 2) & 65280) | (b >>> 2)));\n\t\t\tsrcIndex += 2;\n\t\t\t++dstIndex;\n\t\t}\n\t}\n\tinterpreterProxy.pop(12);\n\treturn 0;\n}\n\nfunction primitiveHalfSizeDiagonal() {\n\tvar b;\n\tvar dstH;\n\tvar dstIndex;\n\tvar dstW;\n\tvar dstX;\n\tvar dstY;\n\tvar g;\n\tvar in_;\n\tvar inH;\n\tvar inW;\n\tvar out;\n\tvar outH;\n\tvar outW;\n\tvar p1;\n\tvar p2;\n\tvar r;\n\tvar srcIndex;\n\tvar srcX;\n\tvar srcY;\n\tvar x;\n\tvar y;\n\n\tin_ = checkedUnsignedIntPtrOf(interpreterProxy.stackValue(11));\n\tinW = interpreterProxy.stackIntegerValue(10);\n\tinH = interpreterProxy.stackIntegerValue(9);\n\tout = checkedUnsignedIntPtrOf(interpreterProxy.stackValue(8));\n\toutW = interpreterProxy.stackIntegerValue(7);\n\toutH = interpreterProxy.stackIntegerValue(6);\n\tsrcX = interpreterProxy.stackIntegerValue(5);\n\tsrcY = interpreterProxy.stackIntegerValue(4);\n\tdstX = interpreterProxy.stackIntegerValue(3);\n\tdstY = interpreterProxy.stackIntegerValue(2);\n\tdstW = interpreterProxy.stackIntegerValue(1);\n\tdstH = interpreterProxy.stackIntegerValue(0);\n\tinterpreterProxy.success((srcX >= 0) && (srcY >= 0));\n\tinterpreterProxy.success((srcX + (2 * dstW)) <= inW);\n\tinterpreterProxy.success((srcY + (2 * dstH)) <= inH);\n\tinterpreterProxy.success((dstX >= 0) && (dstY >= 0));\n\tinterpreterProxy.success((dstX + dstW) <= outW);\n\tinterpreterProxy.success((dstY + dstH) <= outH);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tfor (y = 0; y <= (dstH - 1); y++) {\n\t\tsrcIndex = (inW * (srcY + (2 * y))) + srcX;\n\t\tdstIndex = (outW * (dstY + y)) + dstX;\n\t\tfor (x = 0; x <= (dstW - 1); x++) {\n\t\t\tp1 = in_[srcIndex];\n\t\t\tp2 = in_[(srcIndex + inW) + 1];\n\t\t\tr = (((p1 & 16711680) + (p2 & 16711680)) >>> 1) & 16711680;\n\t\t\tg = (((p1 & 65280) + (p2 & 65280)) >>> 1) & 65280;\n\n\t\t\t/* store combined RGB into target bitmap */\n\n\t\t\tb = ((p1 & 255) + (p2 & 255)) >>> 1;\n\t\t\tout[dstIndex] = (r | (g | b));\n\t\t\tsrcIndex += 2;\n\t\t\t++dstIndex;\n\t\t}\n\t}\n\tinterpreterProxy.pop(12);\n\treturn 0;\n}\n\nfunction primitiveHueShift() {\n\tvar b;\n\tvar brightness;\n\tvar g;\n\tvar hue;\n\tvar i;\n\tvar in_;\n\tvar inOop;\n\tvar max;\n\tvar min;\n\tvar out;\n\tvar outOop;\n\tvar pix;\n\tvar r;\n\tvar saturation;\n\tvar shift;\n\tvar sz;\n\n\tinOop = interpreterProxy.stackValue(2);\n\toutOop = interpreterProxy.stackValue(1);\n\tshift = interpreterProxy.stackIntegerValue(0);\n\tin_ = checkedUnsignedIntPtrOf(inOop);\n\tsz = SIZEOF(inOop);\n\tout = checkedUnsignedIntPtrOf(outOop);\n\tinterpreterProxy.success(SIZEOF(outOop) === sz);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tfor (i = 0; i <= (sz - 1); i++) {\n\t\tpix = in_[i] & 16777215;\n\t\tif (pix !== 0) {\n\n\t\t\t/* skip pixel values of 0 (transparent) */\n\n\t\t\tr = (pix >>> 16) & 255;\n\t\t\tg = (pix >>> 8) & 255;\n\n\t\t\t/* find min and max color components */\n\n\t\t\tb = pix & 255;\n\t\t\tmax = (min = r);\n\t\t\tif (g > max) {\n\t\t\t\tmax = g;\n\t\t\t}\n\t\t\tif (b > max) {\n\t\t\t\tmax = b;\n\t\t\t}\n\t\t\tif (g < min) {\n\t\t\t\tmin = g;\n\t\t\t}\n\t\t\tif (b < min) {\n\t\t\t\tmin = b;\n\t\t\t}\n\t\t\tbrightness = DIV((max * 1000), 255);\n\t\t\tif (max === 0) {\n\t\t\t\tsaturation = 0;\n\t\t\t} else {\n\t\t\t\tsaturation = DIV(((max - min) * 1000), max);\n\t\t\t}\n\t\t\tif (brightness < 110) {\n\n\t\t\t\t/* force black to a very dark, saturated gray */\n\n\t\t\t\tbrightness = 110;\n\t\t\t\tsaturation = 1000;\n\t\t\t}\n\t\t\tif (saturation < 90) {\n\t\t\t\tsaturation = 90;\n\t\t\t}\n\t\t\tif ((brightness === 110) || (saturation === 90)) {\n\n\t\t\t\t/* tint all blacks and grays the same */\n\n\t\t\t\thue = 0;\n\t\t\t} else {\n\t\t\t\thue = hueFromRGBminmax(r, g, b, min, max);\n\t\t\t}\n\n\t\t\t/* compute new hue */\n\n\t\t\thue = MOD(((hue + shift) + 360000000), 360);\n\t\t\tbitmapatputHsv(out, i, hue, saturation, brightness);\n\t\t}\n\t}\n\tinterpreterProxy.pop(3);\n\treturn 0;\n}\n\nfunction primitiveInterpolate() {\n\tvar in_;\n\tvar inOop;\n\tvar result;\n\tvar sz;\n\tvar width;\n\tvar xFixed;\n\tvar yFixed;\n\n\tinOop = interpreterProxy.stackValue(3);\n\twidth = interpreterProxy.stackIntegerValue(2);\n\txFixed = interpreterProxy.stackIntegerValue(1);\n\tyFixed = interpreterProxy.stackIntegerValue(0);\n\tin_ = checkedUnsignedIntPtrOf(inOop);\n\tsz = SIZEOF(inOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tresult = interpolatedFromxywidthheight(in_, xFixed, yFixed, width, DIV(sz, width));\n\tinterpreterProxy.pop(5);\n\tinterpreterProxy.pushInteger(result);\n\treturn 0;\n}\n\nfunction primitiveSaturationShift() {\n\tvar b;\n\tvar brightness;\n\tvar g;\n\tvar hue;\n\tvar i;\n\tvar in_;\n\tvar inOop;\n\tvar max;\n\tvar min;\n\tvar out;\n\tvar outOop;\n\tvar pix;\n\tvar r;\n\tvar saturation;\n\tvar shift;\n\tvar sz;\n\n\tinOop = interpreterProxy.stackValue(2);\n\toutOop = interpreterProxy.stackValue(1);\n\tshift = interpreterProxy.stackIntegerValue(0);\n\tin_ = checkedUnsignedIntPtrOf(inOop);\n\tsz = SIZEOF(inOop);\n\tout = checkedUnsignedIntPtrOf(outOop);\n\tinterpreterProxy.success(SIZEOF(outOop) === sz);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tfor (i = 0; i <= (sz - 1); i++) {\n\t\tpix = in_[i] & 16777215;\n\t\tif (!(pix < 2)) {\n\n\t\t\t/* skip pixel values of 0 (transparent) and 1 (black) */\n\n\t\t\tr = (pix >>> 16) & 255;\n\t\t\tg = (pix >>> 8) & 255;\n\n\t\t\t/* find min and max color components */\n\n\t\t\tb = pix & 255;\n\t\t\tmax = (min = r);\n\t\t\tif (g > max) {\n\t\t\t\tmax = g;\n\t\t\t}\n\t\t\tif (b > max) {\n\t\t\t\tmax = b;\n\t\t\t}\n\t\t\tif (g < min) {\n\t\t\t\tmin = g;\n\t\t\t}\n\t\t\tif (b < min) {\n\t\t\t\tmin = b;\n\t\t\t}\n\t\t\tbrightness = DIV((max * 1000), 255);\n\t\t\tif (max === 0) {\n\t\t\t\tsaturation = 0;\n\t\t\t} else {\n\t\t\t\tsaturation = DIV(((max - min) * 1000), max);\n\t\t\t}\n\t\t\tif (saturation > 0) {\n\n\t\t\t\t/* do nothing if pixel is unsaturated (gray) */\n\n\n\t\t\t\t/* compute new saturation */\n\n\t\t\t\thue = hueFromRGBminmax(r, g, b, min, max);\n\t\t\t\tsaturation += shift * 10;\n\t\t\t\tif (saturation > 1000) {\n\t\t\t\t\tsaturation = 1000;\n\t\t\t\t}\n\t\t\t\tif (saturation < 0) {\n\t\t\t\t\tsaturation = 0;\n\t\t\t\t}\n\t\t\t\tbitmapatputHsv(out, i, hue, saturation, brightness);\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(3);\n\treturn 0;\n}\n\n\n/*\tScale using bilinear interpolation. */\n\nfunction primitiveScale() {\n\tvar in_;\n\tvar inH;\n\tvar inOop;\n\tvar inW;\n\tvar inX;\n\tvar inY;\n\tvar out;\n\tvar outH;\n\tvar outOop;\n\tvar outPix;\n\tvar outW;\n\tvar outX;\n\tvar outY;\n\tvar p1;\n\tvar p2;\n\tvar p3;\n\tvar p4;\n\tvar t;\n\tvar tWeight;\n\tvar w1;\n\tvar w2;\n\tvar w3;\n\tvar w4;\n\tvar xIncr;\n\tvar yIncr;\n\n\tinOop = interpreterProxy.stackValue(5);\n\tinW = interpreterProxy.stackIntegerValue(4);\n\tinH = interpreterProxy.stackIntegerValue(3);\n\toutOop = interpreterProxy.stackValue(2);\n\toutW = interpreterProxy.stackIntegerValue(1);\n\toutH = interpreterProxy.stackIntegerValue(0);\n\tinterpreterProxy.success(SIZEOF(inOop) === (inW * inH));\n\tinterpreterProxy.success(SIZEOF(outOop) === (outW * outH));\n\tin_ = checkedUnsignedIntPtrOf(inOop);\n\tout = checkedUnsignedIntPtrOf(outOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\n\t/* source x and y, scaled by 1024 */\n\n\tinX = (inY = 0);\n\n\t/* source x increment, scaled by 1024 */\n\n\txIncr = DIV((inW * 1024), outW);\n\n\t/* source y increment, scaled by 1024 */\n\n\tyIncr = DIV((inH * 1024), outH);\n\tfor (outY = 0; outY <= (outH - 1); outY++) {\n\t\tinX = 0;\n\t\tfor (outX = 0; outX <= (outW - 1); outX++) {\n\n\t\t\t/* compute weights, scaled by 2^20 */\n\n\t\t\tw1 = (1024 - (inX & 1023)) * (1024 - (inY & 1023));\n\t\t\tw2 = (inX & 1023) * (1024 - (inY & 1023));\n\t\t\tw3 = (1024 - (inX & 1023)) * (inY & 1023);\n\n\t\t\t/* get source pixels */\n\n\t\t\tw4 = (inX & 1023) * (inY & 1023);\n\t\t\tt = ((inY >>> 10) * inW) + (inX >>> 10);\n\t\t\tp1 = in_[t];\n\t\t\tif ((inX >>> 10) < (inW - 1)) {\n\t\t\t\tp2 = in_[t + 1];\n\t\t\t} else {\n\t\t\t\tp2 = p1;\n\t\t\t}\n\t\t\tif ((inY >>> 10) < (inH - 1)) {\n\t\t\t\tt += inW;\n\t\t\t}\n\t\t\tp3 = in_[t];\n\t\t\tif ((inX >>> 10) < (inW - 1)) {\n\t\t\t\tp4 = in_[t + 1];\n\t\t\t} else {\n\t\t\t\tp4 = p3;\n\t\t\t}\n\t\t\ttWeight = 0;\n\t\t\tif (p1 === 0) {\n\t\t\t\tp1 = p2;\n\t\t\t\ttWeight += w1;\n\t\t\t}\n\t\t\tif (p2 === 0) {\n\t\t\t\tp2 = p1;\n\t\t\t\ttWeight += w2;\n\t\t\t}\n\t\t\tif (p3 === 0) {\n\t\t\t\tp3 = p4;\n\t\t\t\ttWeight += w3;\n\t\t\t}\n\t\t\tif (p4 === 0) {\n\t\t\t\tp4 = p3;\n\t\t\t\ttWeight += w4;\n\t\t\t}\n\t\t\tif (p1 === 0) {\n\t\t\t\tp1 = p3;\n\t\t\t\tp2 = p4;\n\t\t\t}\n\t\t\tif (p3 === 0) {\n\t\t\t\tp3 = p1;\n\t\t\t\tp4 = p2;\n\t\t\t}\n\t\t\toutPix = 0;\n\t\t\tif (tWeight < 500000) {\n\n\t\t\t\t/* compute an (opaque) output pixel if less than 50% transparent */\n\n\t\t\t\tt = (((w1 * ((p1 >>> 16) & 255)) + (w2 * ((p2 >>> 16) & 255))) + (w3 * ((p3 >>> 16) & 255))) + (w4 * ((p4 >>> 16) & 255));\n\t\t\t\toutPix = ((t >>> 20) & 255) << 16;\n\t\t\t\tt = (((w1 * ((p1 >>> 8) & 255)) + (w2 * ((p2 >>> 8) & 255))) + (w3 * ((p3 >>> 8) & 255))) + (w4 * ((p4 >>> 8) & 255));\n\t\t\t\toutPix = outPix | (((t >>> 20) & 255) << 8);\n\t\t\t\tt = (((w1 * (p1 & 255)) + (w2 * (p2 & 255))) + (w3 * (p3 & 255))) + (w4 * (p4 & 255));\n\t\t\t\toutPix = outPix | ((t >>> 20) & 255);\n\t\t\t\tif (outPix === 0) {\n\t\t\t\t\toutPix = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tout[(outY * outW) + outX] = outPix;\n\t\t\tinX += xIncr;\n\t\t}\n\t\tinY += yIncr;\n\t}\n\tinterpreterProxy.pop(6);\n\treturn 0;\n}\n\nfunction primitiveWaterRipples1() {\n\tvar aArOop;\n\tvar aArray;\n\tvar allPix;\n\tvar bArOop;\n\tvar bArray;\n\tvar blops;\n\tvar d;\n\tvar dist;\n\tvar dx;\n\tvar dx2;\n\tvar dy;\n\tvar dy2;\n\tvar f;\n\tvar g;\n\tvar h;\n\tvar height;\n\tvar i;\n\tvar in_;\n\tvar inOop;\n\tvar j;\n\tvar newLoc;\n\tvar out;\n\tvar outOop;\n\tvar pix;\n\tvar power;\n\tvar q;\n\tvar ripply;\n\tvar t;\n\tvar t1;\n\tvar temp;\n\tvar val;\n\tvar val2;\n\tvar width;\n\tvar x;\n\tvar y;\n\n\tinOop = interpreterProxy.stackValue(5);\n\toutOop = interpreterProxy.stackValue(4);\n\twidth = interpreterProxy.stackIntegerValue(3);\n\tin_ = checkedUnsignedIntPtrOf(inOop);\n\tout = checkedUnsignedIntPtrOf(outOop);\n\tallPix = SIZEOF(inOop);\n\tripply = interpreterProxy.stackIntegerValue(2);\n\taArOop = interpreterProxy.stackValue(1);\n\tbArOop = interpreterProxy.stackValue(0);\n\taArray = checkedFloatPtrOf(aArOop);\n\tbArray = checkedFloatPtrOf(bArOop);\n\tinterpreterProxy.success(SIZEOF(outOop) === allPix);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\theight = DIV(allPix, width);\n\tt1 = Math.random();\n\tblops = (MOD(t1, ripply)) - 1;\n\tfor (t = 0; t <= ((blops / 2) - 1); t++) {\n\t\tt1 = Math.random();\n\t\tx = MOD(t1, width);\n\t\tt1 = Math.random();\n\t\ty = MOD(t1, height);\n\t\tt1 = Math.random();\n\t\tpower = MOD(t1, 8);\n\t\tfor (g = -4; g <= 4; g++) {\n\t\t\tfor (h = -4; h <= 4; h++) {\n\t\t\t\tdist = ((g * g) + (h * h));\n\t\t\t\tif ((dist < 25) && (dist > 0)) {\n\t\t\t\t\tdx = ((x + g)|0);\n\t\t\t\t\tdy = ((y + h)|0);\n\t\t\t\t\tif ((dx > 0) && ((dy > 0) && ((dy < height) && (dx < width)))) {\n\t\t\t\t\t\taArray[(dy * width) + dx] = (power * (1.0 - (dist / 25.0)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor (f = 1; f <= (width - 2); f++) {\n\t\tfor (d = 1; d <= (height - 2); d++) {\n\t\t\tval = (d * width) + f;\n\t\t\taArray[val] = (((((((((bArray[val + 1] + bArray[val - 1]) + bArray[val + width]) + bArray[val - width]) + (bArray[(val - 1) - width] / 2)) + (bArray[(val - 1) + width] / 2)) + (bArray[(val + 1) - width] / 2)) + (bArray[(val + 1) + width] / 2)) / 4) - aArray[val]);\n\t\t\taArray[val] = (aArray[val] * 0.9);\n\t\t}\n\t}\n\tfor (q = 0; q <= (width * height); q++) {\n\t\ttemp = bArray[q];\n\t\tbArray[q] = aArray[q];\n\t\taArray[q] = temp;\n\t}\n\tfor (j = 0; j <= (height - 1); j++) {\n\t\tfor (i = 0; i <= (width - 1); i++) {\n\t\t\tif ((i > 1) && ((i < (width - 1)) && ((j > 1) && (j < (height - 1))))) {\n\t\t\t\tval2 = (j * width) + i;\n\t\t\t\tdx2 = (((aArray[val2] - aArray[val2 - 1]) + (aArray[val2 + 1] - aArray[val2])) * 64);\n\t\t\t\tdy2 = (((aArray[val2] - aArray[val2 - width]) + (aArray[val2 + width] - aArray[val2])) / 64);\n\t\t\t\tif (dx2 < 2) {\n\t\t\t\t\tdx2 = -2;\n\t\t\t\t}\n\t\t\t\tif (dx2 > 2) {\n\t\t\t\t\tdx2 = 2;\n\t\t\t\t}\n\t\t\t\tif (dy2 < 2) {\n\t\t\t\t\tdy2 = -2;\n\t\t\t\t}\n\t\t\t\tif (dy2 > 2) {\n\t\t\t\t\tdy2 = 2;\n\t\t\t\t}\n\t\t\t\tnewLoc = ((((j + dy2) * width) + (i + dx2))|0);\n\t\t\t\tif ((newLoc < (width * height)) && (newLoc >= 0)) {\n\t\t\t\t\tpix = in_[newLoc];\n\t\t\t\t} else {\n\t\t\t\t\tpix = in_[i + (j * width)];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpix = in_[i + (j * width)];\n\t\t\t}\n\t\t\tout[i + (j * width)] = pix;\n\t\t}\n\t}\n\tinterpreterProxy.pop(6);\n\treturn 0;\n}\n\nfunction primitiveWhirl() {\n\tvar ang;\n\tvar centerX;\n\tvar centerY;\n\tvar cosa;\n\tvar d;\n\tvar degrees;\n\tvar dx;\n\tvar dy;\n\tvar factor;\n\tvar height;\n\tvar in_;\n\tvar inOop;\n\tvar out;\n\tvar outOop;\n\tvar pix;\n\tvar radius;\n\tvar radiusSquared;\n\tvar scaleX;\n\tvar scaleY;\n\tvar sina;\n\tvar sz;\n\tvar whirlRadians;\n\tvar width;\n\tvar x;\n\tvar y;\n\n\tinOop = interpreterProxy.stackValue(3);\n\toutOop = interpreterProxy.stackValue(2);\n\twidth = interpreterProxy.stackIntegerValue(1);\n\tdegrees = interpreterProxy.stackIntegerValue(0);\n\tin_ = checkedUnsignedIntPtrOf(inOop);\n\tout = checkedUnsignedIntPtrOf(outOop);\n\tsz = SIZEOF(inOop);\n\tinterpreterProxy.success(SIZEOF(outOop) === sz);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\theight = DIV(sz, width);\n\tcenterX = width >> 1;\n\tcenterY = height >> 1;\n\tif (centerX < centerY) {\n\t\tradius = centerX;\n\t\tscaleX = centerY / centerX;\n\t\tscaleY = 1.0;\n\t} else {\n\t\tradius = centerY;\n\t\tscaleX = 1.0;\n\t\tif (centerY < centerX) {\n\t\t\tscaleY = centerX / centerY;\n\t\t} else {\n\t\t\tscaleY = 1.0;\n\t\t}\n\t}\n\twhirlRadians = (-3.141592653589793 * degrees) / 180.0;\n\tradiusSquared = (radius * radius);\n\tfor (x = 0; x <= (width - 1); x++) {\n\t\tfor (y = 0; y <= (height - 1); y++) {\n\t\t\tdx = scaleX * (x - centerX);\n\t\t\tdy = scaleY * (y - centerY);\n\t\t\td = (dx * dx) + (dy * dy);\n\t\t\tif (d < radiusSquared) {\n\n\t\t\t\t/* inside the whirl circle */\n\n\t\t\t\tfactor = 1.0 - (Math.sqrt(d) / radius);\n\t\t\t\tang = whirlRadians * (factor * factor);\n\t\t\t\tsina = Math.sin(ang);\n\t\t\t\tcosa = Math.cos(ang);\n\t\t\t\tpix = interpolatedFromxywidthheight(in_, ((1024.0 * ((((cosa * dx) - (sina * dy)) / scaleX) + centerX))|0), ((1024.0 * ((((sina * dx) + (cosa * dy)) / scaleY) + centerY))|0), width, height);\n\t\t\t\tout[(width * y) + x] = pix;\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(4);\n\treturn 0;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nfunction setInterpreter(anInterpreter) {\n\tvar ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy.majorVersion() == VM_PROXY_MAJOR;\n\tif (ok === false) {\n\t\treturn false;\n\t}\n\tok = interpreterProxy.minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\nSqueak.registerExternalModule(\"ScratchPlugin\", {\n\tprimitiveCondenseSound: primitiveCondenseSound,\n\tgetModuleName: getModuleName,\n\tprimitiveFisheye: primitiveFisheye,\n\tprimitiveWaterRipples1: primitiveWaterRipples1,\n\tprimitiveHalfSizeDiagonal: primitiveHalfSizeDiagonal,\n\tprimitiveScale: primitiveScale,\n\tprimitiveDoubleSize: primitiveDoubleSize,\n\tsetInterpreter: setInterpreter,\n\tprimitiveWhirl: primitiveWhirl,\n\tprimitiveBlur: primitiveBlur,\n\tprimitiveBrightnessShift: primitiveBrightnessShift,\n\tprimitiveHalfSizeAverage: primitiveHalfSizeAverage,\n\tprimitiveSaturationShift: primitiveSaturationShift,\n\tprimitiveHueShift: primitiveHueShift,\n\tprimitiveInterpolate: primitiveInterpolate,\n\tprimitiveExtractChannel: primitiveExtractChannel,\n});\n\n}); // end of module\n","/* Smalltalk from Squeak4.5 with VMMaker 4.13.6 translated as JS source on 3 November 2014 1:52:26 pm */\n/* Automatically generated by\n\tJSPluginCodeGenerator VMMakerJS-bf.15 uuid: fd4e10f2-3773-4e80-8bb5-c4b471a014e5\n from\n\tSoundGenerationPlugin VMMaker-bf.353 uuid: 8ae25e7e-8d2c-451e-8277-598b30e9c002\n */\n\nmodule(\"users.bert.SqueakJS.plugins.SoundGenerationPlugin\").requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\"use strict\";\n\nvar VM_PROXY_MAJOR = 1;\nvar VM_PROXY_MINOR = 11;\n\n/*** Functions ***/\nfunction CLASSOF(obj) { return typeof obj === \"number\" ? interpreterProxy.classSmallInteger() : obj.sqClass }\nfunction SIZEOF(obj) { return obj.pointers ? obj.pointers.length : obj.words ? obj.words.length : obj.bytes ? obj.bytes.length : 0 }\nfunction BYTESIZEOF(obj) { return obj.bytes ? obj.bytes.length : obj.words ? obj.words.length * 4 : 0 }\nfunction DIV(a, b) { return Math.floor(a / b) | 0; } // integer division\nfunction MOD(a, b) { return a - DIV(a, b) * b | 0; } // signed modulus\nfunction SHL(a, b) { return b > 31 ? 0 : a << b; } // fix JS shift\nfunction SHR(a, b) { return b > 31 ? 0 : a >>> b; } // fix JS shift\nfunction SHIFT(a, b) { return b < 0 ? (b < -31 ? 0 : a >>> (0-b) ) : (b > 31 ? 0 : a << b); }\n\n/*** Constants ***/\nvar IncrementFractionBits = 16;\nvar LoopIndexFractionMask = 511;\nvar LoopIndexScaleFactor = 512;\nvar ScaleFactor = 32768;\nvar ScaledIndexOverflow = 536870912;\n\n/*** Variables ***/\nvar interpreterProxy = null;\nvar moduleName = \"SoundGenerationPlugin 3 November 2014 (e)\";\n\n\n\n/*\tNote: This is coded so that plugins can be run from Squeak. */\n\nfunction getInterpreter() {\n\treturn interpreterProxy;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nfunction getModuleName() {\n\treturn moduleName;\n}\n\nfunction halt() {\n\t;\n}\n\nfunction msg(s) {\n\tconsole.log(moduleName + \": \" + s);\n}\n\nfunction primitiveApplyReverb() {\n\tvar rcvr;\n\tvar aSoundBuffer;\n\tvar startIndex;\n\tvar n;\n\tvar delayedLeft;\n\tvar delayedRight;\n\tvar i;\n\tvar j;\n\tvar out;\n\tvar sliceIndex;\n\tvar tapGain;\n\tvar tapIndex;\n\tvar bufferIndex;\n\tvar bufferSize;\n\tvar leftBuffer;\n\tvar rightBuffer;\n\tvar tapCount;\n\tvar tapDelays;\n\tvar tapGains;\n\n\trcvr = interpreterProxy.stackValue(3);\n\taSoundBuffer = interpreterProxy.stackInt16Array(2);\n\tstartIndex = interpreterProxy.stackIntegerValue(1);\n\tn = interpreterProxy.stackIntegerValue(0);\n\ttapDelays = interpreterProxy.fetchInt32ArrayofObject(7, rcvr);\n\ttapGains = interpreterProxy.fetchInt32ArrayofObject(8, rcvr);\n\ttapCount = interpreterProxy.fetchIntegerofObject(9, rcvr);\n\tbufferSize = interpreterProxy.fetchIntegerofObject(10, rcvr);\n\tbufferIndex = interpreterProxy.fetchIntegerofObject(11, rcvr);\n\tleftBuffer = interpreterProxy.fetchInt16ArrayofObject(12, rcvr);\n\trightBuffer = interpreterProxy.fetchInt16ArrayofObject(13, rcvr);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tfor (sliceIndex = startIndex; sliceIndex <= ((startIndex + n) - 1); sliceIndex++) {\n\t\tdelayedLeft = (delayedRight = 0);\n\t\tfor (tapIndex = 1; tapIndex <= tapCount; tapIndex++) {\n\t\t\ti = bufferIndex - tapDelays[tapIndex - 1];\n\t\t\tif (i < 1) {\n\t\t\t\ti += bufferSize;\n\t\t\t}\n\t\t\ttapGain = tapGains[tapIndex - 1];\n\t\t\tdelayedLeft += tapGain * leftBuffer[i - 1];\n\t\t\tdelayedRight += tapGain * rightBuffer[i - 1];\n\t\t}\n\t\tj = (2 * sliceIndex) - 1;\n\t\tout = aSoundBuffer[j - 1] + (delayedLeft >> 15);\n\t\tif (out > 32767) {\n\t\t\tout = 32767;\n\t\t}\n\t\tif (out < -32767) {\n\t\t\tout = -32767;\n\t\t}\n\t\taSoundBuffer[j - 1] = out;\n\t\tleftBuffer[bufferIndex - 1] = out;\n\t\t++j;\n\t\tout = aSoundBuffer[j - 1] + (delayedRight >> 15);\n\t\tif (out > 32767) {\n\t\t\tout = 32767;\n\t\t}\n\t\tif (out < -32767) {\n\t\t\tout = -32767;\n\t\t}\n\t\taSoundBuffer[j - 1] = out;\n\t\trightBuffer[bufferIndex - 1] = out;\n\t\tbufferIndex = (MOD(bufferIndex, bufferSize)) + 1;\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.storeIntegerofObjectwithValue(11, rcvr, bufferIndex);\n\tinterpreterProxy.pop(3);\n}\n\n\n/*\tPlay samples from a wave table by stepping a fixed amount through the table on every sample. The table index and increment are scaled to allow fractional increments for greater pitch accuracy. */\n/*\t(FMSound pitch: 440.0 dur: 1.0 loudness: 0.5) play */\n\nfunction primitiveMixFMSound() {\n\tvar rcvr;\n\tvar n;\n\tvar aSoundBuffer;\n\tvar startIndex;\n\tvar leftVol;\n\tvar rightVol;\n\tvar doingFM;\n\tvar i;\n\tvar lastIndex;\n\tvar offset;\n\tvar s;\n\tvar sample;\n\tvar sliceIndex;\n\tvar count;\n\tvar normalizedModulation;\n\tvar scaledIndex;\n\tvar scaledIndexIncr;\n\tvar scaledOffsetIndex;\n\tvar scaledOffsetIndexIncr;\n\tvar scaledVol;\n\tvar scaledVolIncr;\n\tvar scaledVolLimit;\n\tvar scaledWaveTableSize;\n\tvar waveTable;\n\n\trcvr = interpreterProxy.stackValue(5);\n\tn = interpreterProxy.stackIntegerValue(4);\n\taSoundBuffer = interpreterProxy.stackInt16Array(3);\n\tstartIndex = interpreterProxy.stackIntegerValue(2);\n\tleftVol = interpreterProxy.stackIntegerValue(1);\n\trightVol = interpreterProxy.stackIntegerValue(0);\n\tscaledVol = interpreterProxy.fetchIntegerofObject(3, rcvr);\n\tscaledVolIncr = interpreterProxy.fetchIntegerofObject(4, rcvr);\n\tscaledVolLimit = interpreterProxy.fetchIntegerofObject(5, rcvr);\n\tcount = interpreterProxy.fetchIntegerofObject(7, rcvr);\n\twaveTable = interpreterProxy.fetchInt16ArrayofObject(8, rcvr);\n\tscaledWaveTableSize = interpreterProxy.fetchIntegerofObject(9, rcvr);\n\tscaledIndex = interpreterProxy.fetchIntegerofObject(10, rcvr);\n\tscaledIndexIncr = interpreterProxy.fetchIntegerofObject(11, rcvr);\n\tnormalizedModulation = interpreterProxy.fetchIntegerofObject(14, rcvr);\n\tscaledOffsetIndex = interpreterProxy.fetchIntegerofObject(15, rcvr);\n\tscaledOffsetIndexIncr = interpreterProxy.fetchIntegerofObject(16, rcvr);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tdoingFM = (normalizedModulation !== 0) && (scaledOffsetIndexIncr !== 0);\n\tlastIndex = (startIndex + n) - 1;\n\tfor (sliceIndex = startIndex; sliceIndex <= lastIndex; sliceIndex++) {\n\t\tsample = (scaledVol * waveTable[scaledIndex >> 15]) >> 15;\n\t\tif (doingFM) {\n\t\t\toffset = normalizedModulation * waveTable[scaledOffsetIndex >> 15];\n\t\t\tscaledOffsetIndex = MOD((scaledOffsetIndex + scaledOffsetIndexIncr), scaledWaveTableSize);\n\t\t\tif (scaledOffsetIndex < 0) {\n\t\t\t\tscaledOffsetIndex += scaledWaveTableSize;\n\t\t\t}\n\t\t\tscaledIndex = MOD(((scaledIndex + scaledIndexIncr) + offset), scaledWaveTableSize);\n\t\t\tif (scaledIndex < 0) {\n\t\t\t\tscaledIndex += scaledWaveTableSize;\n\t\t\t}\n\t\t} else {\n\t\t\tscaledIndex = MOD((scaledIndex + scaledIndexIncr), scaledWaveTableSize);\n\t\t}\n\t\tif (leftVol > 0) {\n\t\t\ti = (2 * sliceIndex) - 1;\n\t\t\ts = aSoundBuffer[i - 1] + ((sample * leftVol) >> 15);\n\t\t\tif (s > 32767) {\n\t\t\t\ts = 32767;\n\t\t\t}\n\t\t\tif (s < -32767) {\n\t\t\t\ts = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[i - 1] = s;\n\t\t}\n\t\tif (rightVol > 0) {\n\t\t\ti = 2 * sliceIndex;\n\t\t\ts = aSoundBuffer[i - 1] + ((sample * rightVol) >> 15);\n\t\t\tif (s > 32767) {\n\t\t\t\ts = 32767;\n\t\t\t}\n\t\t\tif (s < -32767) {\n\t\t\t\ts = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[i - 1] = s;\n\t\t}\n\t\tif (scaledVolIncr !== 0) {\n\t\t\tscaledVol += scaledVolIncr;\n\t\t\tif (((scaledVolIncr > 0) && (scaledVol >= scaledVolLimit)) || ((scaledVolIncr < 0) && (scaledVol <= scaledVolLimit))) {\n\n\t\t\t\t/* reached the limit; stop incrementing */\n\n\t\t\t\tscaledVol = scaledVolLimit;\n\t\t\t\tscaledVolIncr = 0;\n\t\t\t}\n\t\t}\n\t}\n\tcount -= n;\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.storeIntegerofObjectwithValue(3, rcvr, scaledVol);\n\tinterpreterProxy.storeIntegerofObjectwithValue(4, rcvr, scaledVolIncr);\n\tinterpreterProxy.storeIntegerofObjectwithValue(7, rcvr, count);\n\tinterpreterProxy.storeIntegerofObjectwithValue(10, rcvr, scaledIndex);\n\tinterpreterProxy.storeIntegerofObjectwithValue(15, rcvr, scaledOffsetIndex);\n\tinterpreterProxy.pop(5);\n}\n\n\n/*\tPlay samples from a wave table by stepping a fixed amount through the table on every sample. The table index and increment are scaled to allow fractional increments for greater pitch accuracy. If a loop length is specified, then the index is looped back when the loopEnd index is reached until count drops below releaseCount. This allows a short sampled sound to be sustained indefinitely. */\n/*\t(LoopedSampledSound pitch: 440.0 dur: 5.0 loudness: 0.5) play */\n\nfunction primitiveMixLoopedSampledSound() {\n\tvar rcvr;\n\tvar n;\n\tvar aSoundBuffer;\n\tvar startIndex;\n\tvar leftVol;\n\tvar rightVol;\n\tvar compositeLeftVol;\n\tvar compositeRightVol;\n\tvar i;\n\tvar isInStereo;\n\tvar lastIndex;\n\tvar leftVal;\n\tvar m;\n\tvar nextSampleIndex;\n\tvar rightVal;\n\tvar s;\n\tvar sampleIndex;\n\tvar sliceIndex;\n\tvar count;\n\tvar lastSample;\n\tvar leftSamples;\n\tvar loopEnd;\n\tvar releaseCount;\n\tvar rightSamples;\n\tvar scaledIndex;\n\tvar scaledIndexIncr;\n\tvar scaledLoopLength;\n\tvar scaledVol;\n\tvar scaledVolIncr;\n\tvar scaledVolLimit;\n\n\trcvr = interpreterProxy.stackValue(5);\n\tn = interpreterProxy.stackIntegerValue(4);\n\taSoundBuffer = interpreterProxy.stackInt16Array(3);\n\tstartIndex = interpreterProxy.stackIntegerValue(2);\n\tleftVol = interpreterProxy.stackIntegerValue(1);\n\trightVol = interpreterProxy.stackIntegerValue(0);\n\tscaledVol = interpreterProxy.fetchIntegerofObject(3, rcvr);\n\tscaledVolIncr = interpreterProxy.fetchIntegerofObject(4, rcvr);\n\tscaledVolLimit = interpreterProxy.fetchIntegerofObject(5, rcvr);\n\tcount = interpreterProxy.fetchIntegerofObject(7, rcvr);\n\treleaseCount = interpreterProxy.fetchIntegerofObject(8, rcvr);\n\tleftSamples = interpreterProxy.fetchInt16ArrayofObject(10, rcvr);\n\trightSamples = interpreterProxy.fetchInt16ArrayofObject(11, rcvr);\n\tlastSample = interpreterProxy.fetchIntegerofObject(16, rcvr);\n\tloopEnd = interpreterProxy.fetchIntegerofObject(17, rcvr);\n\tscaledLoopLength = interpreterProxy.fetchIntegerofObject(18, rcvr);\n\tscaledIndex = interpreterProxy.fetchIntegerofObject(19, rcvr);\n\tscaledIndexIncr = interpreterProxy.fetchIntegerofObject(20, rcvr);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tisInStereo = leftSamples !== rightSamples;\n\tcompositeLeftVol = (leftVol * scaledVol) >> 15;\n\tcompositeRightVol = (rightVol * scaledVol) >> 15;\n\ti = (2 * startIndex) - 1;\n\tlastIndex = (startIndex + n) - 1;\n\tfor (sliceIndex = startIndex; sliceIndex <= lastIndex; sliceIndex++) {\n\t\tsampleIndex = ((scaledIndex += scaledIndexIncr)) >> 9;\n\t\tif ((sampleIndex > loopEnd) && (count > releaseCount)) {\n\n\t\t\t/* loop back if not within releaseCount of the note end */\n\t\t\t/* note: unlooped sounds will have loopEnd = lastSample */\n\n\t\t\tsampleIndex = ((scaledIndex -= scaledLoopLength)) >> 9;\n\t\t}\n\t\tif (((nextSampleIndex = sampleIndex + 1)) > lastSample) {\n\t\t\tif (sampleIndex > lastSample) {\n\t\t\t\tcount = 0;\n\t\t\t\tif (interpreterProxy.failed()) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tinterpreterProxy.storeIntegerofObjectwithValue(3, rcvr, scaledVol);\n\t\t\t\tinterpreterProxy.storeIntegerofObjectwithValue(4, rcvr, scaledVolIncr);\n\t\t\t\tinterpreterProxy.storeIntegerofObjectwithValue(7, rcvr, count);\n\t\t\t\tinterpreterProxy.storeIntegerofObjectwithValue(19, rcvr, scaledIndex);\n\t\t\t\tinterpreterProxy.popthenPush(6, null);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif (scaledLoopLength === 0) {\n\t\t\t\tnextSampleIndex = sampleIndex;\n\t\t\t} else {\n\t\t\t\tnextSampleIndex = ((scaledIndex - scaledLoopLength) >> 9) + 1;\n\t\t\t}\n\t\t}\n\t\tm = scaledIndex & LoopIndexFractionMask;\n\t\trightVal = (leftVal = ((leftSamples[sampleIndex - 1] * (LoopIndexScaleFactor - m)) + (leftSamples[nextSampleIndex - 1] * m)) >> 9);\n\t\tif (isInStereo) {\n\t\t\trightVal = ((rightSamples[sampleIndex - 1] * (LoopIndexScaleFactor - m)) + (rightSamples[nextSampleIndex - 1] * m)) >> 9;\n\t\t}\n\t\tif (leftVol > 0) {\n\t\t\ts = aSoundBuffer[i - 1] + ((compositeLeftVol * leftVal) >> 15);\n\t\t\tif (s > 32767) {\n\t\t\t\ts = 32767;\n\t\t\t}\n\t\t\tif (s < -32767) {\n\t\t\t\ts = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[i - 1] = s;\n\t\t}\n\t\t++i;\n\t\tif (rightVol > 0) {\n\t\t\ts = aSoundBuffer[i - 1] + ((compositeRightVol * rightVal) >> 15);\n\t\t\tif (s > 32767) {\n\t\t\t\ts = 32767;\n\t\t\t}\n\t\t\tif (s < -32767) {\n\t\t\t\ts = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[i - 1] = s;\n\t\t}\n\t\t++i;\n\t\tif (scaledVolIncr !== 0) {\n\n\t\t\t/* update volume envelope if it is changing */\n\n\t\t\tscaledVol += scaledVolIncr;\n\t\t\tif (((scaledVolIncr > 0) && (scaledVol >= scaledVolLimit)) || ((scaledVolIncr < 0) && (scaledVol <= scaledVolLimit))) {\n\n\t\t\t\t/* reached the limit; stop incrementing */\n\n\t\t\t\tscaledVol = scaledVolLimit;\n\t\t\t\tscaledVolIncr = 0;\n\t\t\t}\n\t\t\tcompositeLeftVol = (leftVol * scaledVol) >> 15;\n\t\t\tcompositeRightVol = (rightVol * scaledVol) >> 15;\n\t\t}\n\t}\n\tcount -= n;\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.storeIntegerofObjectwithValue(3, rcvr, scaledVol);\n\tinterpreterProxy.storeIntegerofObjectwithValue(4, rcvr, scaledVolIncr);\n\tinterpreterProxy.storeIntegerofObjectwithValue(7, rcvr, count);\n\tinterpreterProxy.storeIntegerofObjectwithValue(19, rcvr, scaledIndex);\n\tinterpreterProxy.pop(5);\n}\n\n\n/*\tThe Karplus-Strong plucked string algorithm: start with a buffer full of random noise and repeatedly play the contents of that buffer while averaging adjacent samples. High harmonics damp out more quickly, transfering their energy to lower ones. The length of the buffer corresponds to the length of the string. */\n/*\t(PluckedSound pitch: 220.0 dur: 6.0 loudness: 0.8) play */\n\nfunction primitiveMixPluckedSound() {\n\tvar rcvr;\n\tvar n;\n\tvar aSoundBuffer;\n\tvar startIndex;\n\tvar leftVol;\n\tvar rightVol;\n\tvar average;\n\tvar i;\n\tvar lastIndex;\n\tvar s;\n\tvar sample;\n\tvar scaledNextIndex;\n\tvar scaledThisIndex;\n\tvar sliceIndex;\n\tvar count;\n\tvar ring;\n\tvar scaledIndex;\n\tvar scaledIndexIncr;\n\tvar scaledIndexLimit;\n\tvar scaledVol;\n\tvar scaledVolIncr;\n\tvar scaledVolLimit;\n\n\trcvr = interpreterProxy.stackValue(5);\n\tn = interpreterProxy.stackIntegerValue(4);\n\taSoundBuffer = interpreterProxy.stackInt16Array(3);\n\tstartIndex = interpreterProxy.stackIntegerValue(2);\n\tleftVol = interpreterProxy.stackIntegerValue(1);\n\trightVol = interpreterProxy.stackIntegerValue(0);\n\tscaledVol = interpreterProxy.fetchIntegerofObject(3, rcvr);\n\tscaledVolIncr = interpreterProxy.fetchIntegerofObject(4, rcvr);\n\tscaledVolLimit = interpreterProxy.fetchIntegerofObject(5, rcvr);\n\tcount = interpreterProxy.fetchIntegerofObject(7, rcvr);\n\tring = interpreterProxy.fetchInt16ArrayofObject(8, rcvr);\n\tscaledIndex = interpreterProxy.fetchIntegerofObject(9, rcvr);\n\tscaledIndexIncr = interpreterProxy.fetchIntegerofObject(10, rcvr);\n\tscaledIndexLimit = interpreterProxy.fetchIntegerofObject(11, rcvr);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlastIndex = (startIndex + n) - 1;\n\tscaledThisIndex = (scaledNextIndex = scaledIndex);\n\tfor (sliceIndex = startIndex; sliceIndex <= lastIndex; sliceIndex++) {\n\t\tscaledNextIndex = scaledThisIndex + scaledIndexIncr;\n\t\tif (scaledNextIndex >= scaledIndexLimit) {\n\t\t\tscaledNextIndex = ScaleFactor + (scaledNextIndex - scaledIndexLimit);\n\t\t}\n\t\taverage = (ring[(scaledThisIndex >> 15) - 1] + ring[(scaledNextIndex >> 15) - 1]) >> 1;\n\t\tring[(scaledThisIndex >> 15) - 1] = average;\n\n\t\t/* scale by volume */\n\n\t\tsample = (average * scaledVol) >> 15;\n\t\tscaledThisIndex = scaledNextIndex;\n\t\tif (leftVol > 0) {\n\t\t\ti = (2 * sliceIndex) - 1;\n\t\t\ts = aSoundBuffer[i - 1] + ((sample * leftVol) >> 15);\n\t\t\tif (s > 32767) {\n\t\t\t\ts = 32767;\n\t\t\t}\n\t\t\tif (s < -32767) {\n\t\t\t\ts = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[i - 1] = s;\n\t\t}\n\t\tif (rightVol > 0) {\n\t\t\ti = 2 * sliceIndex;\n\t\t\ts = aSoundBuffer[i - 1] + ((sample * rightVol) >> 15);\n\t\t\tif (s > 32767) {\n\t\t\t\ts = 32767;\n\t\t\t}\n\t\t\tif (s < -32767) {\n\t\t\t\ts = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[i - 1] = s;\n\t\t}\n\t\tif (scaledVolIncr !== 0) {\n\t\t\tscaledVol += scaledVolIncr;\n\t\t\tif (((scaledVolIncr > 0) && (scaledVol >= scaledVolLimit)) || ((scaledVolIncr < 0) && (scaledVol <= scaledVolLimit))) {\n\n\t\t\t\t/* reached the limit; stop incrementing */\n\n\t\t\t\tscaledVol = scaledVolLimit;\n\t\t\t\tscaledVolIncr = 0;\n\t\t\t}\n\t\t}\n\t}\n\tscaledIndex = scaledNextIndex;\n\tcount -= n;\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.storeIntegerofObjectwithValue(3, rcvr, scaledVol);\n\tinterpreterProxy.storeIntegerofObjectwithValue(4, rcvr, scaledVolIncr);\n\tinterpreterProxy.storeIntegerofObjectwithValue(7, rcvr, count);\n\tinterpreterProxy.storeIntegerofObjectwithValue(9, rcvr, scaledIndex);\n\tinterpreterProxy.pop(5);\n}\n\n\n/*\tMix the given number of samples with the samples already in the given buffer starting at the given index. Assume that the buffer size is at least (index + count) - 1. */\n\nfunction primitiveMixSampledSound() {\n\tvar rcvr;\n\tvar n;\n\tvar aSoundBuffer;\n\tvar startIndex;\n\tvar leftVol;\n\tvar rightVol;\n\tvar i;\n\tvar lastIndex;\n\tvar outIndex;\n\tvar overflow;\n\tvar s;\n\tvar sample;\n\tvar sampleIndex;\n\tvar count;\n\tvar indexHighBits;\n\tvar samples;\n\tvar samplesSize;\n\tvar scaledIncrement;\n\tvar scaledIndex;\n\tvar scaledVol;\n\tvar scaledVolIncr;\n\tvar scaledVolLimit;\n\n\trcvr = interpreterProxy.stackValue(5);\n\tn = interpreterProxy.stackIntegerValue(4);\n\taSoundBuffer = interpreterProxy.stackInt16Array(3);\n\tstartIndex = interpreterProxy.stackIntegerValue(2);\n\tleftVol = interpreterProxy.stackIntegerValue(1);\n\trightVol = interpreterProxy.stackIntegerValue(0);\n\tscaledVol = interpreterProxy.fetchIntegerofObject(3, rcvr);\n\tscaledVolIncr = interpreterProxy.fetchIntegerofObject(4, rcvr);\n\tscaledVolLimit = interpreterProxy.fetchIntegerofObject(5, rcvr);\n\tcount = interpreterProxy.fetchIntegerofObject(7, rcvr);\n\tsamples = interpreterProxy.fetchInt16ArrayofObject(8, rcvr);\n\tsamplesSize = interpreterProxy.fetchIntegerofObject(10, rcvr);\n\tscaledIndex = interpreterProxy.fetchIntegerofObject(11, rcvr);\n\tindexHighBits = interpreterProxy.fetchIntegerofObject(12, rcvr);\n\tscaledIncrement = interpreterProxy.fetchIntegerofObject(13, rcvr);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tlastIndex = (startIndex + n) - 1;\n\n\t/* index of next stereo output sample pair */\n\n\toutIndex = startIndex;\n\tsampleIndex = indexHighBits + (scaledIndex >>> 16);\n\twhile ((sampleIndex <= samplesSize) && (outIndex <= lastIndex)) {\n\t\tsample = (samples[sampleIndex - 1] * scaledVol) >> 15;\n\t\tif (leftVol > 0) {\n\t\t\ti = (2 * outIndex) - 1;\n\t\t\ts = aSoundBuffer[i - 1] + ((sample * leftVol) >> 15);\n\t\t\tif (s > 32767) {\n\t\t\t\ts = 32767;\n\t\t\t}\n\t\t\tif (s < -32767) {\n\t\t\t\ts = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[i - 1] = s;\n\t\t}\n\t\tif (rightVol > 0) {\n\t\t\ti = 2 * outIndex;\n\t\t\ts = aSoundBuffer[i - 1] + ((sample * rightVol) >> 15);\n\t\t\tif (s > 32767) {\n\t\t\t\ts = 32767;\n\t\t\t}\n\t\t\tif (s < -32767) {\n\t\t\t\ts = -32767;\n\t\t\t}\n\t\t\taSoundBuffer[i - 1] = s;\n\t\t}\n\t\tif (scaledVolIncr !== 0) {\n\t\t\tscaledVol += scaledVolIncr;\n\t\t\tif (((scaledVolIncr > 0) && (scaledVol >= scaledVolLimit)) || ((scaledVolIncr < 0) && (scaledVol <= scaledVolLimit))) {\n\n\t\t\t\t/* reached the limit; stop incrementing */\n\n\t\t\t\tscaledVol = scaledVolLimit;\n\t\t\t\tscaledVolIncr = 0;\n\t\t\t}\n\t\t}\n\t\tscaledIndex += scaledIncrement;\n\t\tif (scaledIndex >= ScaledIndexOverflow) {\n\t\t\toverflow = scaledIndex >>> 16;\n\t\t\tindexHighBits += overflow;\n\t\t\tscaledIndex -= overflow << 16;\n\t\t}\n\t\tsampleIndex = indexHighBits + (scaledIndex >>> 16);\n\t\t++outIndex;\n\t}\n\tcount -= n;\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.storeIntegerofObjectwithValue(3, rcvr, scaledVol);\n\tinterpreterProxy.storeIntegerofObjectwithValue(4, rcvr, scaledVolIncr);\n\tinterpreterProxy.storeIntegerofObjectwithValue(7, rcvr, count);\n\tinterpreterProxy.storeIntegerofObjectwithValue(11, rcvr, scaledIndex);\n\tinterpreterProxy.storeIntegerofObjectwithValue(12, rcvr, indexHighBits);\n\tinterpreterProxy.pop(5);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nfunction setInterpreter(anInterpreter) {\n\tvar ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy.majorVersion() == VM_PROXY_MAJOR;\n\tif (ok === false) {\n\t\treturn false;\n\t}\n\tok = interpreterProxy.minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\nSqueak.registerExternalModule(\"SoundGenerationPlugin\", {\n\tprimitiveMixFMSound: primitiveMixFMSound,\n\tprimitiveMixSampledSound: primitiveMixSampledSound,\n\tsetInterpreter: setInterpreter,\n\tgetModuleName: getModuleName,\n\tprimitiveApplyReverb: primitiveApplyReverb,\n\tprimitiveMixPluckedSound: primitiveMixPluckedSound,\n\tprimitiveMixLoopedSampledSound: primitiveMixLoopedSampledSound,\n});\n\n}); // end of module\n","/* Smalltalk from Squeak4.5 with VMMaker 4.13.6 translated as JS source on 3 November 2014 1:52:26 pm */\n/* Automatically generated by\n\tJSPluginCodeGenerator VMMakerJS-bf.15 uuid: fd4e10f2-3773-4e80-8bb5-c4b471a014e5\n from\n\tStarSqueakPlugin VMMaker-bf.353 uuid: 8ae25e7e-8d2c-451e-8277-598b30e9c002\n */\n\nmodule(\"users.bert.SqueakJS.plugins.StarSqueakPlugin\").requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\"use strict\";\n\nvar VM_PROXY_MAJOR = 1;\nvar VM_PROXY_MINOR = 11;\n\n/*** Functions ***/\nfunction CLASSOF(obj) { return typeof obj === \"number\" ? interpreterProxy.classSmallInteger() : obj.sqClass }\nfunction SIZEOF(obj) { return obj.pointers ? obj.pointers.length : obj.words ? obj.words.length : obj.bytes ? obj.bytes.length : 0 }\nfunction BYTESIZEOF(obj) { return obj.bytes ? obj.bytes.length : obj.words ? obj.words.length * 4 : 0 }\nfunction DIV(a, b) { return Math.floor(a / b) | 0; } // integer division\nfunction MOD(a, b) { return a - DIV(a, b) * b | 0; } // signed modulus\nfunction SHL(a, b) { return b > 31 ? 0 : a << b; } // fix JS shift\nfunction SHR(a, b) { return b > 31 ? 0 : a >>> b; } // fix JS shift\nfunction SHIFT(a, b) { return b < 0 ? (b < -31 ? 0 : a >>> (0-b) ) : (b > 31 ? 0 : a << b); }\n\n/*** Variables ***/\nvar interpreterProxy = null;\nvar moduleName = \"StarSqueakPlugin 3 November 2014 (e)\";\n\n\n\n/*\tReturn an unsigned int pointer to the first indexable word of oop, which must be a words object. */\n\nfunction checkedUnsignedIntPtrOf(oop) {\n\tinterpreterProxy.success(interpreterProxy.isWords(oop));\n\tif (interpreterProxy.failed()) {\n\t\treturn 0;\n\t}\n\treturn oop.words;\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nfunction getModuleName() {\n\treturn moduleName;\n}\n\nfunction halt() {\n\t;\n}\n\n\n/*\tDiffuse the integer values of the source patch variable Bitmap into the output Bitmap. Each cell of the output is the average of the NxN area around it in the source, where N = (2 * delta) + 1. */\n\nfunction primitiveDiffuseFromToWidthHeightDelta() {\n\tvar area;\n\tvar delta;\n\tvar dst;\n\tvar dstOop;\n\tvar endX;\n\tvar endY;\n\tvar height;\n\tvar rowStart;\n\tvar src;\n\tvar srcOop;\n\tvar startX;\n\tvar startY;\n\tvar sum;\n\tvar width;\n\tvar x;\n\tvar x2;\n\tvar y;\n\tvar y2;\n\n\tsrcOop = interpreterProxy.stackValue(4);\n\tdstOop = interpreterProxy.stackValue(3);\n\twidth = interpreterProxy.stackIntegerValue(2);\n\theight = interpreterProxy.stackIntegerValue(1);\n\tdelta = interpreterProxy.stackIntegerValue(0);\n\tsrc = checkedUnsignedIntPtrOf(srcOop);\n\tdst = checkedUnsignedIntPtrOf(dstOop);\n\tinterpreterProxy.success(SIZEOF(srcOop) === SIZEOF(dstOop));\n\tinterpreterProxy.success(SIZEOF(srcOop) === (width * height));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tarea = ((2 * delta) + 1) * ((2 * delta) + 1);\n\tfor (y = 0; y <= (height - 1); y++) {\n\t\tstartY = y - delta;\n\t\tif (startY < 0) {\n\t\t\tstartY = 0;\n\t\t}\n\t\tendY = y + delta;\n\t\tif (endY >= height) {\n\t\t\tendY = height - 1;\n\t\t}\n\t\tfor (x = 0; x <= (width - 1); x++) {\n\t\t\tstartX = x - delta;\n\t\t\tif (startX < 0) {\n\t\t\t\tstartX = 0;\n\t\t\t}\n\t\t\tendX = x + delta;\n\t\t\tif (endX >= width) {\n\t\t\t\tendX = width - 1;\n\t\t\t}\n\t\t\tsum = 0;\n\t\t\tfor (y2 = startY; y2 <= endY; y2++) {\n\t\t\t\trowStart = y2 * width;\n\t\t\t\tfor (x2 = startX; x2 <= endX; x2++) {\n\t\t\t\t\tsum += src[rowStart + x2];\n\t\t\t\t}\n\t\t\t}\n\t\t\tdst[(y * width) + x] = (DIV(sum, area));\n\t\t}\n\t}\n\tinterpreterProxy.pop(5);\n}\n\n\n/*\tEvaporate the integer values of the source Bitmap at the given rate. The rate is an integer between 0 and 1024, where 1024 is a scale factor of 1.0 (i.e., no evaporation). */\n\nfunction primitiveEvaporateRate() {\n\tvar i;\n\tvar patchVar;\n\tvar patchVarOop;\n\tvar rate;\n\tvar sz;\n\n\tpatchVarOop = interpreterProxy.stackValue(1);\n\trate = interpreterProxy.stackIntegerValue(0);\n\tpatchVar = checkedUnsignedIntPtrOf(patchVarOop);\n\tsz = SIZEOF(patchVarOop);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tfor (i = 0; i <= (sz - 1); i++) {\n\t\tpatchVar[i] = ((patchVar[i] * rate) >>> 10);\n\t}\n\tinterpreterProxy.pop(2);\n}\n\nfunction primitiveMapFromToWidthHeightPatchSizeRgbFlagsShift() {\n\tvar dst;\n\tvar dstIndex;\n\tvar dstOop;\n\tvar h;\n\tvar level;\n\tvar offset;\n\tvar patchSize;\n\tvar pixel;\n\tvar rgbFlags;\n\tvar rgbMult;\n\tvar rowStart;\n\tvar shiftAmount;\n\tvar src;\n\tvar srcIndex;\n\tvar srcOop;\n\tvar w;\n\tvar x;\n\tvar y;\n\n\tsrcOop = interpreterProxy.stackValue(6);\n\tdstOop = interpreterProxy.stackValue(5);\n\tw = interpreterProxy.stackIntegerValue(4);\n\th = interpreterProxy.stackIntegerValue(3);\n\tpatchSize = interpreterProxy.stackIntegerValue(2);\n\trgbFlags = interpreterProxy.stackIntegerValue(1);\n\tshiftAmount = interpreterProxy.stackIntegerValue(0);\n\tsrc = checkedUnsignedIntPtrOf(srcOop);\n\tdst = checkedUnsignedIntPtrOf(dstOop);\n\tinterpreterProxy.success(SIZEOF(dstOop) === (w * h));\n\tinterpreterProxy.success(SIZEOF(dstOop) === ((SIZEOF(srcOop) * patchSize) * patchSize));\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\trgbMult = 0;\n\tif ((rgbFlags & 4) > 0) {\n\t\trgbMult += 65536;\n\t}\n\tif ((rgbFlags & 2) > 0) {\n\t\trgbMult += 256;\n\t}\n\tif ((rgbFlags & 1) > 0) {\n\t\t++rgbMult;\n\t}\n\tsrcIndex = -1;\n\tfor (y = 0; y <= ((DIV(h, patchSize)) - 1); y++) {\n\t\tfor (x = 0; x <= ((DIV(w, patchSize)) - 1); x++) {\n\t\t\tlevel = SHIFT(src[(++srcIndex)], shiftAmount);\n\t\t\tif (level > 255) {\n\t\t\t\tlevel = 255;\n\t\t\t}\n\t\t\tif (level <= 0) {\n\n\t\t\t\t/* non-transparent black */\n\n\t\t\t\tpixel = 1;\n\t\t\t} else {\n\t\t\t\tpixel = level * rgbMult;\n\t\t\t}\n\t\t\toffset = ((y * w) + x) * patchSize;\n\t\t\tfor (rowStart = offset; rowStart <= (offset + ((patchSize - 1) * w)); rowStart += w) {\n\t\t\t\tfor (dstIndex = rowStart; dstIndex <= ((rowStart + patchSize) - 1); dstIndex++) {\n\t\t\t\t\tdst[dstIndex] = pixel;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tinterpreterProxy.pop(7);\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nfunction setInterpreter(anInterpreter) {\n\tvar ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy.majorVersion() == VM_PROXY_MAJOR;\n\tif (ok === false) {\n\t\treturn false;\n\t}\n\tok = interpreterProxy.minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\nSqueak.registerExternalModule(\"StarSqueakPlugin\", {\n\tprimitiveDiffuseFromToWidthHeightDelta: primitiveDiffuseFromToWidthHeightDelta,\n\tprimitiveEvaporateRate: primitiveEvaporateRate,\n\tsetInterpreter: setInterpreter,\n\tprimitiveMapFromToWidthHeightPatchSizeRgbFlagsShift: primitiveMapFromToWidthHeightPatchSizeRgbFlagsShift,\n\tgetModuleName: getModuleName,\n});\n\n}); // end of module\n","/* Smalltalk from Squeak4.5 with VMMaker 4.13.6 translated as JS source on 3 November 2014 1:52:20 pm */\n/* Automatically generated by\n\tJSPluginCodeGenerator VMMakerJS-bf.15 uuid: fd4e10f2-3773-4e80-8bb5-c4b471a014e5\n from\n\tDeflatePlugin VMMaker-bf.353 uuid: 8ae25e7e-8d2c-451e-8277-598b30e9c002\n */\n\nmodule(\"users.bert.SqueakJS.plugins.ZipPlugin\").requires(\"users.bert.SqueakJS.vm\").toRun(function() {\n\"use strict\";\n\nvar VM_PROXY_MAJOR = 1;\nvar VM_PROXY_MINOR = 11;\n\n/*** Functions ***/\nfunction CLASSOF(obj) { return typeof obj === \"number\" ? interpreterProxy.classSmallInteger() : obj.sqClass }\nfunction SIZEOF(obj) { return obj.pointers ? obj.pointers.length : obj.words ? obj.words.length : obj.bytes ? obj.bytes.length : 0 }\nfunction BYTESIZEOF(obj) { return obj.bytes ? obj.bytes.length : obj.words ? obj.words.length * 4 : 0 }\nfunction DIV(a, b) { return Math.floor(a / b) | 0; } // integer division\nfunction MOD(a, b) { return a - DIV(a, b) * b | 0; } // signed modulus\nfunction SHL(a, b) { return b > 31 ? 0 : a << b; } // fix JS shift\nfunction SHR(a, b) { return b > 31 ? 0 : a >>> b; } // fix JS shift\nfunction SHIFT(a, b) { return b < 0 ? (b < -31 ? 0 : a >>> (0-b) ) : (b > 31 ? 0 : a << b); }\n\n/*** Constants ***/\nvar DeflateHashMask = 32767;\nvar DeflateHashShift = 5;\nvar DeflateHashTableSize = 32768;\nvar DeflateMaxDistance = 32768;\nvar DeflateMaxDistanceCodes = 30;\nvar DeflateMaxLiteralCodes = 286;\nvar DeflateMaxMatch = 258;\nvar DeflateMinMatch = 3;\nvar DeflateWindowMask = 32767;\nvar DeflateWindowSize = 32768;\nvar MaxBits = 16;\nvar StateNoMoreData = 1;\n\n/*** Variables ***/\nvar interpreterProxy = null;\nvar moduleName = \"ZipPlugin 3 November 2014 (e)\";\nvar readStreamInstSize = 0;\nvar writeStreamInstSize = 0;\nvar zipBaseDistance = [\n0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, \n256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576];\nvar zipBaseLength = [\n0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, \n32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 0];\nvar zipBitBuf = 0;\nvar zipBitPos = 0;\nvar zipBlockPos = 0;\nvar zipBlockStart = 0;\nvar zipCollection = null;\nvar zipCollectionSize = 0;\nvar zipCrcTable = [\n0, 1996959894, 3993919788, 2567524794, 124634137, 1886057615, 3915621685, 2657392035, 249268274, 2044508324, 3772115230, 2547177864, 162941995, 2125561021, 3887607047, 2428444049, \n498536548, 1789927666, 4089016648, 2227061214, 450548861, 1843258603, 4107580753, 2211677639, 325883990, 1684777152, 4251122042, 2321926636, 335633487, 1661365465, 4195302755, 2366115317, \n997073096, 1281953886, 3579855332, 2724688242, 1006888145, 1258607687, 3524101629, 2768942443, 901097722, 1119000684, 3686517206, 2898065728, 853044451, 1172266101, 3705015759, 2882616665, \n651767980, 1373503546, 3369554304, 3218104598, 565507253, 1454621731, 3485111705, 3099436303, 671266974, 1594198024, 3322730930, 2970347812, 795835527, 1483230225, 3244367275, 3060149565, \n1994146192, 31158534, 2563907772, 4023717930, 1907459465, 112637215, 2680153253, 3904427059, 2013776290, 251722036, 2517215374, 3775830040, 2137656763, 141376813, 2439277719, 3865271297, \n1802195444, 476864866, 2238001368, 4066508878, 1812370925, 453092731, 2181625025, 4111451223, 1706088902, 314042704, 2344532202, 4240017532, 1658658271, 366619977, 2362670323, 4224994405, \n1303535960, 984961486, 2747007092, 3569037538, 1256170817, 1037604311, 2765210733, 3554079995, 1131014506, 879679996, 2909243462, 3663771856, 1141124467, 855842277, 2852801631, 3708648649, \n1342533948, 654459306, 3188396048, 3373015174, 1466479909, 544179635, 3110523913, 3462522015, 1591671054, 702138776, 2966460450, 3352799412, 1504918807, 783551873, 3082640443, 3233442989, \n3988292384, 2596254646, 62317068, 1957810842, 3939845945, 2647816111, 81470997, 1943803523, 3814918930, 2489596804, 225274430, 2053790376, 3826175755, 2466906013, 167816743, 2097651377, \n4027552580, 2265490386, 503444072, 1762050814, 4150417245, 2154129355, 426522225, 1852507879, 4275313526, 2312317920, 282753626, 1742555852, 4189708143, 2394877945, 397917763, 1622183637, \n3604390888, 2714866558, 953729732, 1340076626, 3518719985, 2797360999, 1068828381, 1219638859, 3624741850, 2936675148, 906185462, 1090812512, 3747672003, 2825379669, 829329135, 1181335161, \n3412177804, 3160834842, 628085408, 1382605366, 3423369109, 3138078467, 570562233, 1426400815, 3317316542, 2998733608, 733239954, 1555261956, 3268935591, 3050360625, 752459403, 1541320221, \n2607071920, 3965973030, 1969922972, 40735498, 2617837225, 3943577151, 1913087877, 83908371, 2512341634, 3803740692, 2075208622, 213261112, 2463272603, 3855990285, 2094854071, 198958881, \n2262029012, 4057260610, 1759359992, 534414190, 2176718541, 4139329115, 1873836001, 414664567, 2282248934, 4279200368, 1711684554, 285281116, 2405801727, 4167216745, 1634467795, 376229701, \n2685067896, 3608007406, 1308918612, 956543938, 2808555105, 3495958263, 1231636301, 1047427035, 2932959818, 3654703836, 1088359270, 936918000, 2847714899, 3736837829, 1202900863, 817233897, \n3183342108, 3401237130, 1404277552, 615818150, 3134207493, 3453421203, 1423857449, 601450431, 3009837614, 3294710456, 1567103746, 711928724, 3020668471, 3272380065, 1510334235, 755167117];\nvar zipDistTable = null;\nvar zipDistTableSize = 0;\nvar zipDistanceCodes = [\n0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, \n8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, \n10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, \n11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, \n12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, \n12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, \n13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, \n13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, \n14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, \n14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, \n14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, \n14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, \n15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, \n15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, \n15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, \n15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, \n0, 0, 16, 17, 18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, \n22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, \n24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, \n25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, \n26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, \n26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, \n27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, \n27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, \n28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, \n28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, \n28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, \n28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, \n29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, \n29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, \n29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, \n29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29];\nvar zipDistanceFreq = null;\nvar zipDistances = null;\nvar zipExtraDistanceBits = [\n0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, \n7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13];\nvar zipExtraLengthBits = [\n0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, \n3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0];\nvar zipHashHead = null;\nvar zipHashTail = null;\nvar zipHashValue = 0;\nvar zipLitTable = null;\nvar zipLitTableSize = 0;\nvar zipLiteralCount = 0;\nvar zipLiteralFreq = null;\nvar zipLiteralSize = 0;\nvar zipLiterals = null;\nvar zipMatchCount = 0;\nvar zipMatchLengthCodes = [\n257, 258, 259, 260, 261, 262, 263, 264, 265, 265, 266, 266, 267, 267, 268, 268, \n269, 269, 269, 269, 270, 270, 270, 270, 271, 271, 271, 271, 272, 272, 272, 272, \n273, 273, 273, 273, 273, 273, 273, 273, 274, 274, 274, 274, 274, 274, 274, 274, \n275, 275, 275, 275, 275, 275, 275, 275, 276, 276, 276, 276, 276, 276, 276, 276, \n277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, \n278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, \n279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, \n280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, \n281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, \n281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, \n282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, \n282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, \n283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, \n283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, \n284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, \n284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284];\nvar zipPosition = 0;\nvar zipReadLimit = 0;\nvar zipSource = null;\nvar zipSourceLimit = 0;\nvar zipSourcePos = 0;\nvar zipState = 0;\n\n\n\n/*\tCompare the two strings and return the length of matching characters.\n\tminLength is a lower bound for match lengths that will be accepted.\n\tNote: here and matchPos are zero based. */\n\nfunction comparewithmin(here, matchPos, minLength) {\n\tvar length;\n\n\n\t/* First test if we can actually get longer than minLength */\n\n\tif (zipCollection[here + minLength] !== zipCollection[matchPos + minLength]) {\n\t\treturn 0;\n\t}\n\tif (zipCollection[(here + minLength) - 1] !== zipCollection[(matchPos + minLength) - 1]) {\n\t\treturn 0;\n\t}\n\tif (zipCollection[here] !== zipCollection[matchPos]) {\n\t\treturn 0;\n\t}\n\tif (zipCollection[here + 1] !== zipCollection[matchPos + 1]) {\n\t\treturn 1;\n\t}\n\tlength = 2;\n\twhile ((length < DeflateMaxMatch) && (zipCollection[here + length] === zipCollection[matchPos + length])) {\n\t\t++length;\n\t}\n\treturn length;\n}\n\n\n/*\tContinue deflating the receiver's collection from blockPosition to lastIndex.\n\tNote that lastIndex must be at least MaxMatch away from the end of collection */\n\nfunction deflateBlockchainLengthgoodMatch(lastIndex, chainLength, goodMatch) {\n\tvar flushNeeded;\n\tvar hasMatch;\n\tvar here;\n\tvar hereLength;\n\tvar hereMatch;\n\tvar i;\n\tvar matchResult;\n\tvar newLength;\n\tvar newMatch;\n\n\tif (zipBlockPos > lastIndex) {\n\t\treturn false;\n\t}\n\tif (zipLiteralCount >= zipLiteralSize) {\n\t\treturn true;\n\t}\n\thasMatch = false;\n\there = zipBlockPos;\n\twhile (here <= lastIndex) {\n\t\tif (!hasMatch) {\n\n\t\t\t/* Find the first match */\n\n\t\t\tmatchResult = findMatchlastLengthlastMatchchainLengthgoodMatch(here, DeflateMinMatch - 1, here, chainLength, goodMatch);\n\t\t\tinsertStringAt(here);\n\t\t\thereMatch = matchResult & 65535;\n\t\t\thereLength = matchResult >>> 16;\n\t\t}\n\t\tmatchResult = findMatchlastLengthlastMatchchainLengthgoodMatch(here + 1, hereLength, hereMatch, chainLength, goodMatch);\n\t\tnewMatch = matchResult & 65535;\n\n\t\t/* Now check if the next match is better than the current one.\n\t\tIf not, output the current match (provided that the current match\n\t\tis at least MinMatch long) */\n\n\t\tnewLength = matchResult >>> 16;\n\t\tif ((hereLength >= newLength) && (hereLength >= DeflateMinMatch)) {\n\n\t\t\t/* Encode the current match */\n\n\n\t\t\t/* Insert all strings up to the end of the current match.\n\t\t\tNote: The first string has already been inserted. */\n\n\t\t\tflushNeeded = encodeMatchdistance(hereLength, here - hereMatch);\n\t\t\tfor (i = 1; i <= (hereLength - 1); i++) {\n\t\t\t\tinsertStringAt((++here));\n\t\t\t}\n\t\t\thasMatch = false;\n\t\t\t++here;\n\t\t} else {\n\n\t\t\t/* Either the next match is better than the current one or we didn't\n\t\t\thave a good match after all (e.g., current match length < MinMatch).\n\t\t\tOutput a single literal. */\n\n\t\t\tflushNeeded = encodeLiteral(zipCollection[here]);\n\t\t\t++here;\n\t\t\tif ((here <= lastIndex) && (!flushNeeded)) {\n\n\t\t\t\t/* Cache the results for the next round */\n\n\t\t\t\tinsertStringAt(here);\n\t\t\t\thasMatch = true;\n\t\t\t\thereMatch = newMatch;\n\t\t\t\thereLength = newLength;\n\t\t\t}\n\t\t}\n\t\tif (flushNeeded) {\n\t\t\tzipBlockPos = here;\n\t\t\treturn true;\n\t\t}\n\t}\n\tzipBlockPos = here;\n\treturn false;\n}\n\n\n/*\tDetermine the inst size of the class above DeflateStream by\n\t looking for the first class whose inst size is less than 13. */\n\nfunction determineSizeOfReadStream(rcvr) {\n\tvar sq_class;\n\n\tsq_class = CLASSOF(rcvr);\n\twhile ((!sq_class.isNil) && (sq_class.classInstSize() >= 13)) {\n\t\tsq_class = sq_class.superclass();\n\t}\n\tif (sq_class.isNil) {\n\t\treturn false;\n\t}\n\treadStreamInstSize = sq_class.classInstSize();\n\treturn true;\n}\n\n\n/*\tDetermine the inst size of the class above DeflateStream or\n\t ZipEncoder by looking for the first class whose inst size is less than 7. */\n\nfunction determineSizeOfWriteStream(rcvr) {\n\tvar sq_class;\n\n\tsq_class = CLASSOF(rcvr);\n\twhile ((!sq_class.isNil) && (sq_class.classInstSize() >= 7)) {\n\t\tsq_class = sq_class.superclass();\n\t}\n\tif (sq_class.isNil) {\n\t\treturn false;\n\t}\n\twriteStreamInstSize = sq_class.classInstSize();\n\treturn true;\n}\n\n\n/*\tEncode the given literal */\n\nfunction encodeLiteral(lit) {\n\tzipLiterals[zipLiteralCount] = lit;\n\tzipDistances[zipLiteralCount] = 0;\n\tzipLiteralFreq[lit]++;\n\t++zipLiteralCount;\n\treturn (zipLiteralCount === zipLiteralSize) || (((zipLiteralCount & 4095) === 0) && (shouldFlush()));\n}\n\n\n/*\tEncode the given match of length length starting at dist bytes ahead */\n\nfunction encodeMatchdistance(length, dist) {\n\tvar distance;\n\tvar literal;\n\n\tzipLiterals[zipLiteralCount] = (length - DeflateMinMatch);\n\tzipDistances[zipLiteralCount] = dist;\n\tliteral = zipMatchLengthCodes[length - DeflateMinMatch];\n\tzipLiteralFreq[literal]++;\n\tif (dist < 257) {\n\t\tdistance = zipDistanceCodes[dist - 1];\n\t} else {\n\t\tdistance = zipDistanceCodes[256 + ((dist - 1) >>> 7)];\n\t}\n\tzipDistanceFreq[distance]++;\n\t++zipLiteralCount;\n\t++zipMatchCount;\n\treturn (zipLiteralCount === zipLiteralSize) || (((zipLiteralCount & 4095) === 0) && (shouldFlush()));\n}\n\n\n/*\tFind the longest match for the string starting at here.\n\tIf there is no match longer than lastLength return lastMatch/lastLength.\n\tTraverse at most maxChainLength entries in the hash table.\n\tStop if a match of at least goodMatch size has been found. */\n\nfunction findMatchlastLengthlastMatchchainLengthgoodMatch(here, lastLength, lastMatch, maxChainLength, goodMatch) {\n\tvar bestLength;\n\tvar chainLength;\n\tvar distance;\n\tvar length;\n\tvar limit;\n\tvar matchPos;\n\tvar matchResult;\n\n\n\t/* Compute the default match result */\n\n\n\t/* There is no way to find a better match than MaxMatch */\n\n\tmatchResult = (lastLength << 16) | lastMatch;\n\tif (lastLength >= DeflateMaxMatch) {\n\t\treturn matchResult;\n\t}\n\n\t/* Compute the distance to the (possible) match */\n\n\tmatchPos = zipHashHead[updateHashAt((here + DeflateMinMatch) - 1)];\n\n\t/* Note: It is required that 0 < distance < MaxDistance */\n\n\tdistance = here - matchPos;\n\tif (!((distance > 0) && (distance < DeflateMaxDistance))) {\n\t\treturn matchResult;\n\t}\n\n\t/* Max. nr of match chain to search */\n\n\tchainLength = maxChainLength;\n\tif (here > DeflateMaxDistance) {\n\n\t\t/* Limit for matches that are too old */\n\n\t\tlimit = here - DeflateMaxDistance;\n\t} else {\n\t\tlimit = 0;\n\t}\n\tbestLength = lastLength;\n\twhile (true) {\n\n\t\t/* Compare the current string with the string at match position */\n\n\n\t\t/* Truncate accidental matches beyound stream position */\n\n\t\tlength = comparewithmin(here, matchPos, bestLength);\n\t\tif ((here + length) > zipPosition) {\n\t\t\tlength = zipPosition - here;\n\t\t}\n\t\tif ((length === DeflateMinMatch) && ((here - matchPos) > (DeflateMaxDistance >> 2))) {\n\t\t\tlength = DeflateMinMatch - 1;\n\t\t}\n\t\tif (length > bestLength) {\n\n\t\t\t/* We have a new (better) match than before */\n\t\t\t/* Compute the new match result */\n\n\t\t\tmatchResult = (length << 16) | matchPos;\n\n\t\t\t/* There is no way to find a better match than MaxMatch */\n\n\t\t\tbestLength = length;\n\t\t\tif (bestLength >= DeflateMaxMatch) {\n\t\t\t\treturn matchResult;\n\t\t\t}\n\t\t\tif (bestLength > goodMatch) {\n\t\t\t\treturn matchResult;\n\t\t\t}\n\t\t}\n\t\tif (!(((--chainLength)) > 0)) {\n\t\t\treturn matchResult;\n\t\t}\n\t\tmatchPos = zipHashTail[matchPos & DeflateWindowMask];\n\t\tif (matchPos <= limit) {\n\t\t\treturn matchResult;\n\t\t}\n\t}\n}\n\n\n/*\tNote: This is hardcoded so it can be run from Squeak.\n\tThe module name is used for validating a module *after*\n\tit is loaded to check if it does really contain the module\n\twe're thinking it contains. This is important! */\n\nfunction getModuleName() {\n\treturn moduleName;\n}\n\nfunction halt() {\n\t;\n}\n\n\n/*\tInsert the string at the given start position into the hash table.\n\tNote: The hash value is updated starting at MinMatch-1 since\n\tall strings before have already been inserted into the hash table\n\t(and the hash value is updated as well). */\n\nfunction insertStringAt(here) {\n\tvar prevEntry;\n\n\tzipHashValue = updateHashAt((here + DeflateMinMatch) - 1);\n\tprevEntry = zipHashHead[zipHashValue];\n\tzipHashHead[zipHashValue] = here;\n\tzipHashTail[here & DeflateWindowMask] = prevEntry;\n}\n\nfunction loadDeflateStreamFrom(rcvr) {\n\tvar oop;\n\n\tif (!(interpreterProxy.isPointers(rcvr) && (SIZEOF(rcvr) >= 15))) {\n\t\treturn false;\n\t}\n\toop = interpreterProxy.fetchPointerofObject(0, rcvr);\n\tif (!interpreterProxy.isBytes(oop)) {\n\t\treturn false;\n\t}\n\tif (writeStreamInstSize === 0) {\n\t\tif (!determineSizeOfWriteStream(rcvr)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (SIZEOF(rcvr) < (writeStreamInstSize + 5)) {\n\t\t\twriteStreamInstSize = 0;\n\t\t\treturn false;\n\t\t}\n\t}\n\tzipCollection = oop.bytes;\n\tzipCollectionSize = BYTESIZEOF(oop);\n\tzipPosition = interpreterProxy.fetchIntegerofObject(1, rcvr);\n\n\t/* zipWriteLimit := interpreterProxy fetchInteger: 3 ofObject: rcvr. */\n\n\tzipReadLimit = interpreterProxy.fetchIntegerofObject(2, rcvr);\n\toop = interpreterProxy.fetchPointerofObject(writeStreamInstSize + 0, rcvr);\n\tif (!(interpreterProxy.isWords(oop) && (SIZEOF(oop) === DeflateHashTableSize))) {\n\t\treturn false;\n\t}\n\tzipHashHead = oop.words;\n\toop = interpreterProxy.fetchPointerofObject(writeStreamInstSize + 1, rcvr);\n\tif (!(interpreterProxy.isWords(oop) && (SIZEOF(oop) === DeflateWindowSize))) {\n\t\treturn false;\n\t}\n\tzipHashTail = oop.words;\n\tzipHashValue = interpreterProxy.fetchIntegerofObject(writeStreamInstSize + 2, rcvr);\n\n\t/* zipBlockStart := interpreterProxy fetchInteger: writeStreamInstSize + 4 ofObject: rcvr. */\n\n\tzipBlockPos = interpreterProxy.fetchIntegerofObject(writeStreamInstSize + 3, rcvr);\n\toop = interpreterProxy.fetchPointerofObject(writeStreamInstSize + 5, rcvr);\n\tif (!interpreterProxy.isBytes(oop)) {\n\t\treturn false;\n\t}\n\tzipLiteralSize = SIZEOF(oop);\n\tzipLiterals = oop.bytes;\n\toop = interpreterProxy.fetchPointerofObject(writeStreamInstSize + 6, rcvr);\n\tif (!(interpreterProxy.isWords(oop) && (SIZEOF(oop) >= zipLiteralSize))) {\n\t\treturn false;\n\t}\n\tzipDistances = oop.words;\n\toop = interpreterProxy.fetchPointerofObject(writeStreamInstSize + 7, rcvr);\n\tif (!(interpreterProxy.isWords(oop) && (SIZEOF(oop) === DeflateMaxLiteralCodes))) {\n\t\treturn false;\n\t}\n\tzipLiteralFreq = oop.words;\n\toop = interpreterProxy.fetchPointerofObject(writeStreamInstSize + 8, rcvr);\n\tif (!(interpreterProxy.isWords(oop) && (SIZEOF(oop) === DeflateMaxDistanceCodes))) {\n\t\treturn false;\n\t}\n\tzipDistanceFreq = oop.words;\n\tzipLiteralCount = interpreterProxy.fetchIntegerofObject(writeStreamInstSize + 9, rcvr);\n\tzipMatchCount = interpreterProxy.fetchIntegerofObject(writeStreamInstSize + 10, rcvr);\n\treturn !interpreterProxy.failed();\n}\n\nfunction loadZipEncoderFrom(rcvr) {\n\tvar oop;\n\n\tif (writeStreamInstSize === 0) {\n\t\tif (!determineSizeOfWriteStream(rcvr)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (SIZEOF(rcvr) < (writeStreamInstSize + 3)) {\n\t\t\twriteStreamInstSize = 0;\n\t\t\treturn false;\n\t\t}\n\t}\n\tif (!(interpreterProxy.isPointers(rcvr) && (SIZEOF(rcvr) >= (writeStreamInstSize + 3)))) {\n\t\treturn false;\n\t}\n\toop = interpreterProxy.fetchPointerofObject(0, rcvr);\n\tif (!interpreterProxy.isBytes(oop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tzipCollection = oop.bytes;\n\tzipCollectionSize = BYTESIZEOF(oop);\n\tzipPosition = interpreterProxy.fetchIntegerofObject(1, rcvr);\n\n\t/* zipWriteLimit := interpreterProxy fetchInteger: 3 ofObject: rcvr. */\n\n\tzipReadLimit = interpreterProxy.fetchIntegerofObject(2, rcvr);\n\tzipBitBuf = interpreterProxy.fetchIntegerofObject(writeStreamInstSize + 1, rcvr);\n\tzipBitPos = interpreterProxy.fetchIntegerofObject(writeStreamInstSize + 2, rcvr);\n\treturn !interpreterProxy.failed();\n}\n\n\n/*\tRequire:\n\t\tzipCollection, zipCollectionSize, zipPosition,\n\t\tzipBitBuf, zipBitPos.\n\t */\n\nfunction nextZipBitsput(nBits, value) {\n\tif (!((value >= 0) && ((SHL(1, nBits)) > value))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tzipBitBuf = zipBitBuf | (SHL(value, zipBitPos));\n\tzipBitPos += nBits;\n\twhile ((zipBitPos >= 8) && (zipPosition < zipCollectionSize)) {\n\t\tzipCollection[zipPosition] = (zipBitBuf & 255);\n\t\t++zipPosition;\n\t\tzipBitBuf = zipBitBuf >>> 8;\n\t\tzipBitPos -= 8;\n\t}\n}\n\n\n/*\tPrimitive. Deflate the current contents of the receiver. */\n\nfunction primitiveDeflateBlock() {\n\tvar chainLength;\n\tvar goodMatch;\n\tvar lastIndex;\n\tvar rcvr;\n\tvar result;\n\n\tif (interpreterProxy.methodArgumentCount() !== 3) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tgoodMatch = interpreterProxy.stackIntegerValue(0);\n\tchainLength = interpreterProxy.stackIntegerValue(1);\n\tlastIndex = interpreterProxy.stackIntegerValue(2);\n\trcvr = interpreterProxy.stackObjectValue(3);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\t;\n\tif (!loadDeflateStreamFrom(rcvr)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tresult = deflateBlockchainLengthgoodMatch(lastIndex, chainLength, goodMatch);\n\tif (!interpreterProxy.failed()) {\n\n\t\t/* Store back modified values */\n\n\t\tinterpreterProxy.storeIntegerofObjectwithValue(writeStreamInstSize + 2, rcvr, zipHashValue);\n\t\tinterpreterProxy.storeIntegerofObjectwithValue(writeStreamInstSize + 3, rcvr, zipBlockPos);\n\t\tinterpreterProxy.storeIntegerofObjectwithValue(writeStreamInstSize + 9, rcvr, zipLiteralCount);\n\t\tinterpreterProxy.storeIntegerofObjectwithValue(writeStreamInstSize + 10, rcvr, zipMatchCount);\n\t}\n\tif (!interpreterProxy.failed()) {\n\t\tinterpreterProxy.pop(4);\n\t\tinterpreterProxy.pushBool(result);\n\t}\n}\n\n\n/*\tPrimitive. Update the hash tables after data has been moved by delta. */\n\nfunction primitiveDeflateUpdateHashTable() {\n\tvar delta;\n\tvar entry;\n\tvar i;\n\tvar table;\n\tvar tablePtr;\n\tvar tableSize;\n\n\tif (interpreterProxy.methodArgumentCount() !== 2) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tdelta = interpreterProxy.stackIntegerValue(0);\n\ttable = interpreterProxy.stackObjectValue(1);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!interpreterProxy.isWords(table)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\ttableSize = SIZEOF(table);\n\ttablePtr = table.wordsAsInt32Array();\n\tfor (i = 0; i <= (tableSize - 1); i++) {\n\t\tentry = tablePtr[i];\n\t\tif (entry >= delta) {\n\t\t\ttablePtr[i] = (entry - delta);\n\t\t} else {\n\t\t\ttablePtr[i] = 0;\n\t\t}\n\t}\n\tinterpreterProxy.pop(2);\n}\n\n\n/*\tPrimitive. Inflate a single block. */\n\nfunction primitiveInflateDecompressBlock() {\n\tvar oop;\n\tvar rcvr;\n\n\tif (interpreterProxy.methodArgumentCount() !== 2) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\toop = interpreterProxy.stackValue(0);\n\tif (!interpreterProxy.isWords(oop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tzipDistTable = oop.words;\n\n\t/* literal table */\n\n\tzipDistTableSize = SIZEOF(oop);\n\toop = interpreterProxy.stackValue(1);\n\tif (!interpreterProxy.isWords(oop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tzipLitTable = oop.words;\n\n\t/* Receiver (InflateStream) */\n\n\tzipLitTableSize = SIZEOF(oop);\n\trcvr = interpreterProxy.stackValue(2);\n\tif (!interpreterProxy.isPointers(rcvr)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (readStreamInstSize === 0) {\n\t\tif (!determineSizeOfReadStream(rcvr)) {\n\t\t\treturn interpreterProxy.primitiveFail();\n\t\t}\n\t\tif (SIZEOF(rcvr) < (readStreamInstSize + 8)) {\n\t\t\treadStreamInstSize = 0;\n\t\t\treturn interpreterProxy.primitiveFail();\n\t\t}\n\t}\n\tif (SIZEOF(rcvr) < (readStreamInstSize + 8)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tzipReadLimit = interpreterProxy.fetchIntegerofObject(2, rcvr);\n\tzipState = interpreterProxy.fetchIntegerofObject(readStreamInstSize + 0, rcvr);\n\tzipBitBuf = interpreterProxy.fetchIntegerofObject(readStreamInstSize + 1, rcvr);\n\tzipBitPos = interpreterProxy.fetchIntegerofObject(readStreamInstSize + 2, rcvr);\n\tzipSourcePos = interpreterProxy.fetchIntegerofObject(readStreamInstSize + 4, rcvr);\n\tzipSourceLimit = interpreterProxy.fetchIntegerofObject(readStreamInstSize + 5, rcvr);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\t--zipReadLimit;\n\t--zipSourcePos;\n\n\t/* collection */\n\n\t--zipSourceLimit;\n\toop = interpreterProxy.fetchPointerofObject(0, rcvr);\n\tif (!interpreterProxy.isBytes(oop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tzipCollection = oop.bytes;\n\n\t/* source */\n\n\tzipCollectionSize = BYTESIZEOF(oop);\n\toop = interpreterProxy.fetchPointerofObject(readStreamInstSize + 3, rcvr);\n\tif (!interpreterProxy.isBytes(oop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\n\t/* do the primitive */\n\n\tzipSource = oop.bytes;\n\tzipDecompressBlock();\n\tif (!interpreterProxy.failed()) {\n\n\t\t/* store modified values back */\n\n\t\tinterpreterProxy.storeIntegerofObjectwithValue(2, rcvr, zipReadLimit + 1);\n\t\tinterpreterProxy.storeIntegerofObjectwithValue(readStreamInstSize + 0, rcvr, zipState);\n\t\tinterpreterProxy.storeIntegerofObjectwithValue(readStreamInstSize + 1, rcvr, zipBitBuf);\n\t\tinterpreterProxy.storeIntegerofObjectwithValue(readStreamInstSize + 2, rcvr, zipBitPos);\n\t\tinterpreterProxy.storeIntegerofObjectwithValue(readStreamInstSize + 4, rcvr, zipSourcePos + 1);\n\t\tinterpreterProxy.pop(2);\n\t}\n}\n\n\n/*\tPrimitive. Update a 32bit CRC value. */\n\nfunction primitiveUpdateAdler32() {\n\tvar adler32;\n\tvar b;\n\tvar bytePtr;\n\tvar collection;\n\tvar i;\n\tvar length;\n\tvar s1;\n\tvar s2;\n\tvar startIndex;\n\tvar stopIndex;\n\n\tif (interpreterProxy.methodArgumentCount() !== 4) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tcollection = interpreterProxy.stackObjectValue(0);\n\tstopIndex = interpreterProxy.stackIntegerValue(1);\n\tstartIndex = interpreterProxy.stackIntegerValue(2);\n\tadler32 = interpreterProxy.positive32BitValueOf(interpreterProxy.stackValue(3));\n\tif (interpreterProxy.failed()) {\n\t\treturn 0;\n\t}\n\tif (!(interpreterProxy.isBytes(collection) && ((stopIndex >= startIndex) && (startIndex > 0)))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tlength = BYTESIZEOF(collection);\n\tif (!(stopIndex <= length)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tbytePtr = collection.bytes;\n\t--startIndex;\n\t--stopIndex;\n\ts1 = adler32 & 65535;\n\ts2 = (adler32 >>> 16) & 65535;\n\tfor (i = startIndex; i <= stopIndex; i++) {\n\t\tb = bytePtr[i];\n\t\ts1 = MOD((s1 + b), 65521);\n\t\ts2 = MOD((s2 + s1), 65521);\n\t}\n\tadler32 = (s2 << 16) + s1;\n\tinterpreterProxy.popthenPush(5, interpreterProxy.positive32BitIntegerFor(adler32));\n}\n\n\n/*\tPrimitive. Update a 32bit CRC value. */\n\nfunction primitiveUpdateGZipCrc32() {\n\tvar bytePtr;\n\tvar collection;\n\tvar crc;\n\tvar i;\n\tvar length;\n\tvar startIndex;\n\tvar stopIndex;\n\n\tif (interpreterProxy.methodArgumentCount() !== 4) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tcollection = interpreterProxy.stackObjectValue(0);\n\tstopIndex = interpreterProxy.stackIntegerValue(1);\n\tstartIndex = interpreterProxy.stackIntegerValue(2);\n\tcrc = interpreterProxy.positive32BitValueOf(interpreterProxy.stackValue(3));\n\tif (interpreterProxy.failed()) {\n\t\treturn 0;\n\t}\n\tif (!(interpreterProxy.isBytes(collection) && ((stopIndex >= startIndex) && (startIndex > 0)))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tlength = BYTESIZEOF(collection);\n\tif (!(stopIndex <= length)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tbytePtr = collection.bytes;\n\t;\n\t--startIndex;\n\t--stopIndex;\n\tfor (i = startIndex; i <= stopIndex; i++) {\n\t\tcrc = zipCrcTable[(crc ^ bytePtr[i]) & 255] ^ (crc >>> 8);\n\t}\n\tinterpreterProxy.popthenPush(5, interpreterProxy.positive32BitIntegerFor(crc));\n}\n\nfunction primitiveZipSendBlock() {\n\tvar distStream;\n\tvar distTree;\n\tvar litStream;\n\tvar litTree;\n\tvar rcvr;\n\tvar result;\n\n\tif (interpreterProxy.methodArgumentCount() !== 4) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tdistTree = interpreterProxy.stackObjectValue(0);\n\tlitTree = interpreterProxy.stackObjectValue(1);\n\tdistStream = interpreterProxy.stackObjectValue(2);\n\tlitStream = interpreterProxy.stackObjectValue(3);\n\trcvr = interpreterProxy.stackObjectValue(4);\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tif (!loadZipEncoderFrom(rcvr)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (!(interpreterProxy.isPointers(distTree) && (SIZEOF(distTree) >= 2))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (!(interpreterProxy.isPointers(litTree) && (SIZEOF(litTree) >= 2))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (!(interpreterProxy.isPointers(litStream) && (SIZEOF(litStream) >= 3))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tif (!(interpreterProxy.isPointers(distStream) && (SIZEOF(distStream) >= 3))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\t;\n\tresult = sendBlockwithwithwith(litStream, distStream, litTree, distTree);\n\tif (!interpreterProxy.failed()) {\n\t\tinterpreterProxy.storeIntegerofObjectwithValue(1, rcvr, zipPosition);\n\t\tinterpreterProxy.storeIntegerofObjectwithValue(readStreamInstSize + 1, rcvr, zipBitBuf);\n\t\tinterpreterProxy.storeIntegerofObjectwithValue(readStreamInstSize + 2, rcvr, zipBitPos);\n\t}\n\tif (!interpreterProxy.failed()) {\n\t\tinterpreterProxy.pop(5);\n\t\tinterpreterProxy.pushInteger(result);\n\t}\n}\n\n\n/*\tRequire: \n\t\tzipCollection, zipCollectionSize, zipPosition,\n\t\tzipBitBuf, zipBitPos.\n\t */\n\nfunction sendBlockwithwithwith(literalStream, distanceStream, litTree, distTree) {\n\tvar code;\n\tvar dist;\n\tvar distArray;\n\tvar distBitLengths;\n\tvar distBlCount;\n\tvar distCodes;\n\tvar extra;\n\tvar lit;\n\tvar litArray;\n\tvar litBlCount;\n\tvar litLimit;\n\tvar litPos;\n\tvar llBitLengths;\n\tvar llCodes;\n\tvar oop;\n\tvar sum;\n\n\toop = interpreterProxy.fetchPointerofObject(0, literalStream);\n\tlitPos = interpreterProxy.fetchIntegerofObject(1, literalStream);\n\tlitLimit = interpreterProxy.fetchIntegerofObject(2, literalStream);\n\tif (!((litPos <= litLimit) && (interpreterProxy.isBytes(oop) && (litLimit <= BYTESIZEOF(oop))))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tlitArray = oop.bytes;\n\toop = interpreterProxy.fetchPointerofObject(0, distanceStream);\n\tif (!(interpreterProxy.isWords(oop) && ((litLimit <= SIZEOF(oop)) && ((interpreterProxy.fetchIntegerofObject(1, distanceStream) === litPos) && (interpreterProxy.fetchIntegerofObject(2, distanceStream) === litLimit))))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tdistArray = oop.words;\n\toop = interpreterProxy.fetchPointerofObject(0, litTree);\n\tif (!interpreterProxy.isWords(oop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tlitBlCount = SIZEOF(oop);\n\tllBitLengths = oop.words;\n\toop = interpreterProxy.fetchPointerofObject(1, litTree);\n\tif (!(interpreterProxy.isWords(oop) && (litBlCount === SIZEOF(oop)))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tllCodes = oop.words;\n\toop = interpreterProxy.fetchPointerofObject(0, distTree);\n\tif (!interpreterProxy.isWords(oop)) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tdistBlCount = SIZEOF(oop);\n\tdistBitLengths = oop.words;\n\toop = interpreterProxy.fetchPointerofObject(1, distTree);\n\tif (!(interpreterProxy.isWords(oop) && (distBlCount === SIZEOF(oop)))) {\n\t\treturn interpreterProxy.primitiveFail();\n\t}\n\tdistCodes = oop.words;\n\tnextZipBitsput(0, 0);\n\tsum = 0;\n\twhile ((litPos < litLimit) && ((zipPosition + 4) < zipCollectionSize)) {\n\t\tlit = litArray[litPos];\n\t\tdist = distArray[litPos];\n\t\t++litPos;\n\t\tif (dist === 0) {\n\n\t\t\t/* literal */\n\n\t\t\t++sum;\n\t\t\tif (!(lit < litBlCount)) {\n\t\t\t\treturn interpreterProxy.primitiveFail();\n\t\t\t}\n\t\t\tnextZipBitsput(llBitLengths[lit], llCodes[lit]);\n\t\t} else {\n\n\t\t\t/* match */\n\n\t\t\tsum = (sum + lit) + DeflateMinMatch;\n\t\t\tif (!(lit < 256)) {\n\t\t\t\treturn interpreterProxy.primitiveFail();\n\t\t\t}\n\t\t\tcode = zipMatchLengthCodes[lit];\n\t\t\tif (!(code < litBlCount)) {\n\t\t\t\treturn interpreterProxy.primitiveFail();\n\t\t\t}\n\t\t\tnextZipBitsput(llBitLengths[code], llCodes[code]);\n\t\t\textra = zipExtraLengthBits[code - 257];\n\t\t\tif (extra !== 0) {\n\t\t\t\tlit -= zipBaseLength[code - 257];\n\t\t\t\tnextZipBitsput(extra, lit);\n\t\t\t}\n\t\t\t--dist;\n\t\t\tif (!(dist < 32768)) {\n\t\t\t\treturn interpreterProxy.primitiveFail();\n\t\t\t}\n\t\t\tif (dist < 256) {\n\t\t\t\tcode = zipDistanceCodes[dist];\n\t\t\t} else {\n\t\t\t\tcode = zipDistanceCodes[256 + (dist >>> 7)];\n\t\t\t}\n\t\t\tif (!(code < distBlCount)) {\n\t\t\t\treturn interpreterProxy.primitiveFail();\n\t\t\t}\n\t\t\tnextZipBitsput(distBitLengths[code], distCodes[code]);\n\t\t\textra = zipExtraDistanceBits[code];\n\t\t\tif (extra !== 0) {\n\t\t\t\tdist -= zipBaseDistance[code];\n\t\t\t\tnextZipBitsput(extra, dist);\n\t\t\t}\n\t\t}\n\t}\n\tif (interpreterProxy.failed()) {\n\t\treturn null;\n\t}\n\tinterpreterProxy.storeIntegerofObjectwithValue(1, literalStream, litPos);\n\tinterpreterProxy.storeIntegerofObjectwithValue(1, distanceStream, litPos);\n\treturn sum;\n}\n\n\n/*\tNote: This is coded so that is can be run from Squeak. */\n\nfunction setInterpreter(anInterpreter) {\n\tvar ok;\n\n\tinterpreterProxy = anInterpreter;\n\tok = interpreterProxy.majorVersion() == VM_PROXY_MAJOR;\n\tif (ok === false) {\n\t\treturn false;\n\t}\n\tok = interpreterProxy.minorVersion() >= VM_PROXY_MINOR;\n\treturn ok;\n}\n\n\n/*\tCheck if we should flush the current block.\n\tFlushing can be useful if the input characteristics change. */\n\nfunction shouldFlush() {\n\tvar nLits;\n\n\tif (zipLiteralCount === zipLiteralSize) {\n\t\treturn true;\n\t}\n\tif ((zipLiteralCount & 4095) !== 0) {\n\t\treturn false;\n\t}\n\tif ((zipMatchCount * 10) <= zipLiteralCount) {\n\n\t\t/* This is basically random data. \n\t\tThere is no need to flush early since the overhead\n\t\tfor encoding the trees will add to the overall size */\n\n\t\treturn false;\n\t}\n\tnLits = zipLiteralCount - zipMatchCount;\n\tif (nLits <= zipMatchCount) {\n\t\treturn false;\n\t}\n\treturn (nLits * 4) <= zipMatchCount;\n}\n\n\n/*\tUpdate the running hash value based on the next input byte.\n\tReturn the new updated hash value. */\n\nfunction updateHash(nextValue) {\n\treturn ((zipHashValue << 5) ^ nextValue) & DeflateHashMask;\n}\n\n\n/*\tUpdate the hash value at position here (one based) */\n\nfunction updateHashAt(here) {\n\treturn updateHash(zipCollection[here]);\n}\n\n\n/*\tDecode the next value in the receiver using the given huffman table. */\n\nfunction zipDecodeValueFromsize(table, tableSize) {\n\tvar bits;\n\tvar bitsNeeded;\n\tvar index;\n\tvar tableIndex;\n\tvar value;\n\n\n\t/* Initial bits needed */\n\n\tbitsNeeded = table[0] >>> 24;\n\tif (bitsNeeded > MaxBits) {\n\t\tinterpreterProxy.primitiveFail();\n\t\treturn 0;\n\t}\n\n\t/* First real table */\n\n\ttableIndex = 2;\n\twhile (true) {\n\n\t\t/* Get bits */\n\n\t\tbits = zipNextBits(bitsNeeded);\n\t\tindex = (tableIndex + bits) - 1;\n\t\tif (index >= tableSize) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn 0;\n\t\t}\n\n\t\t/* Lookup entry in table */\n\n\t\tvalue = table[index];\n\t\tif ((value & 1056964608) === 0) {\n\t\t\treturn value;\n\t\t}\n\n\t\t/* Table offset in low 16 bit */\n\n\t\ttableIndex = value & 65535;\n\n\t\t/* Additional bits in high 8 bit */\n\n\t\tbitsNeeded = (value >>> 24) & 255;\n\t\tif (bitsNeeded > MaxBits) {\n\t\t\tinterpreterProxy.primitiveFail();\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn 0;\n}\n\nfunction zipDecompressBlock() {\n\tvar distance;\n\tvar dstPos;\n\tvar extra;\n\tvar i;\n\tvar length;\n\tvar max;\n\tvar oldBitPos;\n\tvar oldBits;\n\tvar oldPos;\n\tvar srcPos;\n\tvar value;\n\n\tmax = zipCollectionSize - 1;\n\twhile ((zipReadLimit < max) && (zipSourcePos <= zipSourceLimit)) {\n\n\t\t/* Back up stuff if we're running out of space */\n\n\t\toldBits = zipBitBuf;\n\t\toldBitPos = zipBitPos;\n\t\toldPos = zipSourcePos;\n\t\tvalue = zipDecodeValueFromsize(zipLitTable, zipLitTableSize);\n\t\tif (value < 256) {\n\n\t\t\t/* A literal */\n\n\t\t\tzipCollection[(++zipReadLimit)] = value;\n\t\t} else {\n\n\t\t\t/* length/distance or end of block */\n\n\t\t\tif (value === 256) {\n\n\t\t\t\t/* End of block */\n\n\t\t\t\tzipState = zipState & StateNoMoreData;\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\textra = (value >>> 16) - 1;\n\t\t\tlength = value & 65535;\n\t\t\tif (extra > 0) {\n\t\t\t\tlength += zipNextBits(extra);\n\t\t\t}\n\t\t\tvalue = zipDecodeValueFromsize(zipDistTable, zipDistTableSize);\n\t\t\textra = value >>> 16;\n\t\t\tdistance = value & 65535;\n\t\t\tif (extra > 0) {\n\t\t\t\tdistance += zipNextBits(extra);\n\t\t\t}\n\t\t\tif ((zipReadLimit + length) >= max) {\n\t\t\t\tzipBitBuf = oldBits;\n\t\t\t\tzipBitPos = oldBitPos;\n\t\t\t\tzipSourcePos = oldPos;\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tdstPos = zipReadLimit;\n\t\t\tsrcPos = zipReadLimit - distance;\n\t\t\tfor (i = 1; i <= length; i++) {\n\t\t\t\tzipCollection[dstPos + i] = zipCollection[srcPos + i];\n\t\t\t}\n\t\t\tzipReadLimit += length;\n\t\t}\n\t}\n}\n\nfunction zipNextBits(n) {\n\tvar bits;\n\tvar byte;\n\n\twhile (zipBitPos < n) {\n\t\tbyte = zipSource[(++zipSourcePos)];\n\t\tzipBitBuf += SHL(byte, zipBitPos);\n\t\tzipBitPos += 8;\n\t}\n\tbits = zipBitBuf & ((SHL(1, n)) - 1);\n\tzipBitBuf = SHR(zipBitBuf, n);\n\tzipBitPos -= n;\n\treturn bits;\n}\n\n\nSqueak.registerExternalModule(\"ZipPlugin\", {\n\tprimitiveZipSendBlock: primitiveZipSendBlock,\n\tprimitiveUpdateAdler32: primitiveUpdateAdler32,\n\tprimitiveUpdateGZipCrc32: primitiveUpdateGZipCrc32,\n\tprimitiveDeflateUpdateHashTable: primitiveDeflateUpdateHashTable,\n\tsetInterpreter: setInterpreter,\n\tgetModuleName: getModuleName,\n\tprimitiveDeflateBlock: primitiveDeflateBlock,\n\tprimitiveInflateDecompressBlock: primitiveInflateDecompressBlock,\n});\n\n}); // end of module\n","// Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>\n// This work is free. You can redistribute it and/or modify it\n// under the terms of the WTFPL, Version 2\n// For more information see LICENSE.txt or http://www.wtfpl.net/\n//\n// For more information, the home page:\n// http://pieroxy.net/blog/pages/lz-string/testing.html\n//\n// LZ-based compression algorithm, version 1.3.3\nvar LZString = {\n \n \n // private property\n _keyStr : \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",\n _f : String.fromCharCode,\n \n compressToBase64 : function (input) {\n if (input == null) return \"\";\n var output = \"\";\n var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n var i = 0;\n \n input = LZString.compress(input);\n \n while (i < input.length*2) {\n \n if (i%2==0) {\n chr1 = input.charCodeAt(i/2) >> 8;\n chr2 = input.charCodeAt(i/2) & 255;\n if (i/2+1 < input.length) \n chr3 = input.charCodeAt(i/2+1) >> 8;\n else \n chr3 = NaN;\n } else {\n chr1 = input.charCodeAt((i-1)/2) & 255;\n if ((i+1)/2 < input.length) {\n chr2 = input.charCodeAt((i+1)/2) >> 8;\n chr3 = input.charCodeAt((i+1)/2) & 255;\n } else \n chr2=chr3=NaN;\n }\n i+=3;\n \n enc1 = chr1 >> 2;\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n enc4 = chr3 & 63;\n \n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n \n output = output +\n LZString._keyStr.charAt(enc1) + LZString._keyStr.charAt(enc2) +\n LZString._keyStr.charAt(enc3) + LZString._keyStr.charAt(enc4);\n \n }\n \n return output;\n },\n \n decompressFromBase64 : function (input) {\n if (input == null) return \"\";\n var output = \"\",\n ol = 0, \n output_,\n chr1, chr2, chr3,\n enc1, enc2, enc3, enc4,\n i = 0, f=LZString._f;\n \n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n \n while (i < input.length) {\n \n enc1 = LZString._keyStr.indexOf(input.charAt(i++));\n enc2 = LZString._keyStr.indexOf(input.charAt(i++));\n enc3 = LZString._keyStr.indexOf(input.charAt(i++));\n enc4 = LZString._keyStr.indexOf(input.charAt(i++));\n \n chr1 = (enc1 << 2) | (enc2 >> 4);\n chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n chr3 = ((enc3 & 3) << 6) | enc4;\n \n if (ol%2==0) {\n output_ = chr1 << 8;\n \n if (enc3 != 64) {\n output += f(output_ | chr2);\n }\n if (enc4 != 64) {\n output_ = chr3 << 8;\n }\n } else {\n output = output + f(output_ | chr1);\n \n if (enc3 != 64) {\n output_ = chr2 << 8;\n }\n if (enc4 != 64) {\n output += f(output_ | chr3);\n }\n }\n ol+=3;\n }\n \n return LZString.decompress(output);\n \n },\n\n compressToUTF16 : function (input) {\n if (input == null) return \"\";\n var output = \"\",\n i,c,\n current,\n status = 0,\n f = LZString._f;\n \n input = LZString.compress(input);\n \n for (i=0 ; i<input.length ; i++) {\n c = input.charCodeAt(i);\n switch (status++) {\n case 0:\n output += f((c >> 1)+32);\n current = (c & 1) << 14;\n break;\n case 1:\n output += f((current + (c >> 2))+32);\n current = (c & 3) << 13;\n break;\n case 2:\n output += f((current + (c >> 3))+32);\n current = (c & 7) << 12;\n break;\n case 3:\n output += f((current + (c >> 4))+32);\n current = (c & 15) << 11;\n break;\n case 4:\n output += f((current + (c >> 5))+32);\n current = (c & 31) << 10;\n break;\n case 5:\n output += f((current + (c >> 6))+32);\n current = (c & 63) << 9;\n break;\n case 6:\n output += f((current + (c >> 7))+32);\n current = (c & 127) << 8;\n break;\n case 7:\n output += f((current + (c >> 8))+32);\n current = (c & 255) << 7;\n break;\n case 8:\n output += f((current + (c >> 9))+32);\n current = (c & 511) << 6;\n break;\n case 9:\n output += f((current + (c >> 10))+32);\n current = (c & 1023) << 5;\n break;\n case 10:\n output += f((current + (c >> 11))+32);\n current = (c & 2047) << 4;\n break;\n case 11:\n output += f((current + (c >> 12))+32);\n current = (c & 4095) << 3;\n break;\n case 12:\n output += f((current + (c >> 13))+32);\n current = (c & 8191) << 2;\n break;\n case 13:\n output += f((current + (c >> 14))+32);\n current = (c & 16383) << 1;\n break;\n case 14:\n output += f((current + (c >> 15))+32, (c & 32767)+32);\n status = 0;\n break;\n }\n }\n \n return output + f(current + 32);\n },\n \n\n decompressFromUTF16 : function (input) {\n if (input == null) return \"\";\n var output = \"\",\n current,c,\n status=0,\n i = 0,\n f = LZString._f;\n \n while (i < input.length) {\n c = input.charCodeAt(i) - 32;\n \n switch (status++) {\n case 0:\n current = c << 1;\n break;\n case 1:\n output += f(current | (c >> 14));\n current = (c&16383) << 2;\n break;\n case 2:\n output += f(current | (c >> 13));\n current = (c&8191) << 3;\n break;\n case 3:\n output += f(current | (c >> 12));\n current = (c&4095) << 4;\n break;\n case 4:\n output += f(current | (c >> 11));\n current = (c&2047) << 5;\n break;\n case 5:\n output += f(current | (c >> 10));\n current = (c&1023) << 6;\n break;\n case 6:\n output += f(current | (c >> 9));\n current = (c&511) << 7;\n break;\n case 7:\n output += f(current | (c >> 8));\n current = (c&255) << 8;\n break;\n case 8:\n output += f(current | (c >> 7));\n current = (c&127) << 9;\n break;\n case 9:\n output += f(current | (c >> 6));\n current = (c&63) << 10;\n break;\n case 10:\n output += f(current | (c >> 5));\n current = (c&31) << 11;\n break;\n case 11:\n output += f(current | (c >> 4));\n current = (c&15) << 12;\n break;\n case 12:\n output += f(current | (c >> 3));\n current = (c&7) << 13;\n break;\n case 13:\n output += f(current | (c >> 2));\n current = (c&3) << 14;\n break;\n case 14:\n output += f(current | (c >> 1));\n current = (c&1) << 15;\n break;\n case 15:\n output += f(current | c);\n status=0;\n break;\n }\n \n \n i++;\n }\n \n return LZString.decompress(output);\n //return output;\n \n },\n\n\n \n compress: function (uncompressed) {\n if (uncompressed == null) return \"\";\n var i, value,\n context_dictionary= {},\n context_dictionaryToCreate= {},\n context_c=\"\",\n context_wc=\"\",\n context_w=\"\",\n context_enlargeIn= 2, // Compensate for the first entry which should not count\n context_dictSize= 3,\n context_numBits= 2,\n context_data_string=\"\", \n context_data_val=0, \n context_data_position=0,\n ii,\n f=LZString._f;\n \n for (ii = 0; ii < uncompressed.length; ii += 1) {\n context_c = uncompressed.charAt(ii);\n if (!Object.prototype.hasOwnProperty.call(context_dictionary,context_c)) {\n context_dictionary[context_c] = context_dictSize++;\n context_dictionaryToCreate[context_c] = true;\n }\n \n context_wc = context_w + context_c;\n if (Object.prototype.hasOwnProperty.call(context_dictionary,context_wc)) {\n context_w = context_wc;\n } else {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == 15) {\n context_data_position = 0;\n context_data_string += f(context_data_val);\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == 15) {\n context_data_position = 0;\n context_data_string += f(context_data_val);\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position == 15) {\n context_data_position = 0;\n context_data_string += f(context_data_val);\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == 15) {\n context_data_position = 0;\n context_data_string += f(context_data_val);\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == 15) {\n context_data_position = 0;\n context_data_string += f(context_data_val);\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n \n \n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n // Add wc to the dictionary.\n context_dictionary[context_wc] = context_dictSize++;\n context_w = String(context_c);\n }\n }\n \n // Output the code for w.\n if (context_w !== \"\") {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == 15) {\n context_data_position = 0;\n context_data_string += f(context_data_val);\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == 15) {\n context_data_position = 0;\n context_data_string += f(context_data_val);\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position == 15) {\n context_data_position = 0;\n context_data_string += f(context_data_val);\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == 15) {\n context_data_position = 0;\n context_data_string += f(context_data_val);\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == 15) {\n context_data_position = 0;\n context_data_string += f(context_data_val);\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n \n \n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n }\n \n // Mark the end of the stream\n value = 2;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == 15) {\n context_data_position = 0;\n context_data_string += f(context_data_val);\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n \n // Flush the last char\n while (true) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == 15) {\n context_data_string += f(context_data_val);\n break;\n }\n else context_data_position++;\n }\n return context_data_string;\n },\n \n decompress: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n var dictionary = [],\n next,\n enlargeIn = 4,\n dictSize = 4,\n numBits = 3,\n entry = \"\",\n result = \"\",\n i,\n w,\n bits, resb, maxpower, power,\n c,\n f = LZString._f,\n data = {string:compressed, val:compressed.charCodeAt(0), position:32768, index:1};\n \n for (i = 0; i < 3; i += 1) {\n dictionary[i] = i;\n }\n \n bits = 0;\n maxpower = Math.pow(2,2);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = 32768;\n data.val = data.string.charCodeAt(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n \n switch (next = bits) {\n case 0: \n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = 32768;\n data.val = data.string.charCodeAt(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 1: \n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = 32768;\n data.val = data.string.charCodeAt(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 2: \n return \"\";\n }\n dictionary[3] = c;\n w = result = c;\n while (true) {\n if (data.index > data.string.length) {\n return \"\";\n }\n \n bits = 0;\n maxpower = Math.pow(2,numBits);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = 32768;\n data.val = data.string.charCodeAt(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (c = bits) {\n case 0: \n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = 32768;\n data.val = data.string.charCodeAt(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 1: \n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = 32768;\n data.val = data.string.charCodeAt(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 2: \n return result;\n }\n \n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n \n if (dictionary[c]) {\n entry = dictionary[c];\n } else {\n if (c === dictSize) {\n entry = w + w.charAt(0);\n } else {\n return null;\n }\n }\n result += entry;\n \n // Add w+entry[0] to the dictionary.\n dictionary[dictSize++] = w + entry.charAt(0);\n enlargeIn--;\n \n w = entry;\n \n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n \n }\n }\n};\n\nif( typeof module !== 'undefined' && module != null ) {\n module.exports = LZString\n}\n"]}