Beispiel #1
0
primitiveSetStringProperty(void)
{
    sqInt handle;
    sqInt propID;
    sqInt result;
    sqInt srcLen;
    sqInt srcOop;
    char *srcPtr;

    if (!((methodArgumentCount()) == 3)) {
        return primitiveFail();
    }
    srcOop = stackObjectValue(0);
    propID = stackIntegerValue(1);
    handle = stackIntegerValue(2);
    if (failed()) {
        return null;
    }
    if (!(isBytes(srcOop))) {
        return primitiveFail();
    }
    srcPtr = firstIndexableField(srcOop);
    srcLen = byteSizeOf(srcOop);
    result = sqSetStringPropertySSL(handle, propID, srcPtr, srcLen);
    if (!result) {
        return primitiveFail();
    }
    if (failed()) {
        return null;
    }
    pop(methodArgumentCount());
    return 0;
}
/* win32JoystickDebugPrintRawValues:
	Print the raw values of a readout of the specified joystick.
*/
EXPORT(int) win32JoystickDebugPrintRawValues(void)
{
	int index, err;
	JOYINFO info;

	if(methodArgumentCount() != 1) return primitiveFail();
	index = stackIntegerValue(0);
	if(failed()) return 0;
	if(index < 1 || index > 2) return primitiveFail();

	warnPrintf(TEXT("Raw joystick values (%d):\n"), index);
	err = joyGetPos(index-1, &info);
	if(err != JOYERR_NOERROR) {
		if(err == MMSYSERR_NODRIVER)
			warnPrintf(TEXT("\t<no driver present>\n\n"));
		else if(err == MMSYSERR_INVALPARAM)
			warnPrintf(TEXT("\t<invalid param in joyGetPos()>\n\n"));
		else if(err == MMSYSERR_BADDEVICEID)
			warnPrintf(TEXT("\t<bad device id>\n\n"));
		else if(err == JOYERR_UNPLUGGED)
			warnPrintf(TEXT("\t<joystick unplugged>\n\n"));
		else
			warnPrintf(TEXT("\t<unknown error: %d>\n\n"), err);
	} else {
		warnPrintf(TEXT("\tX: %d\n"), info.wXpos);
		warnPrintf(TEXT("\tY: %d\n"), info.wYpos);
		warnPrintf(TEXT("\tZ: %d\n"), info.wZpos);
		warnPrintf(TEXT("\tButtons: %x\n"), info.wButtons);
	}
	pop(1); /* Leave rcvr on stack */
	return 1;
}
static sqInt
stackLightArrayValue(sqInt stackIndex)
{
	// B3DAcceleratorPlugin>>#stackLightArrayValue:
    sqInt array;
    sqInt arraySize;
    sqInt i;
    sqInt oop;

	array = stackObjectValue(stackIndex);
	if (array == null) {
return null;
	}
	if (array == (nilObject())) {
		return null;
	}
	if (!((fetchClassOf(array)) == (classArray()))) {
		return primitiveFail();
	}
	arraySize = slotSizeOf(array);
	for (i = 0; i <= (arraySize - 1); i += 1) {
		oop = fetchPointerofObject(i, array);
		if (isIntegerObject(oop)) {
			return primitiveFail();
		}
		if (!((isWords(oop))
			 && ((slotSizeOf(oop)) == 32))) {
			return primitiveFail();
		}
	}
	return array;
}
primitiveSetViewport(void)
{
	// B3DAcceleratorPlugin>>#primitiveSetViewport
    sqInt h;
    sqInt handle;
    sqInt result;
    sqInt w;
    sqInt x;
    sqInt y;

	if (!((methodArgumentCount()) == 5)) {
		return primitiveFail();
	}
	h = stackIntegerValue(0);
	w = stackIntegerValue(1);
	y = stackIntegerValue(2);
	x = stackIntegerValue(3);
	handle = stackIntegerValue(4);
	if (failed()) {
		return null;
	}
	result = b3dxSetViewport(handle, x, y, w, h);
	if (!result) {
return primitiveFail();
	}
	return pop(5);
}
primitiveCreateRendererFlags(void)
{
	// B3DAcceleratorPlugin>>#primitiveCreateRendererFlags
    sqInt flags;
    sqInt h;
    sqInt result;
    sqInt w;
    sqInt x;
    sqInt y;

	if (!((methodArgumentCount()) == 5)) {
		return primitiveFail();
	}
	h = stackIntegerValue(0);
	w = stackIntegerValue(1);
	y = stackIntegerValue(2);
	x = stackIntegerValue(3);
	flags = stackIntegerValue(4);
	if (failed()) {
		return null;
	}
	result = b3dxCreateRendererFlags(x, y, w, h, flags);
	if (result < 0) {
return primitiveFail();
	}
	pop(6);
	return pushInteger(result);
}
primitiveFileTruncate(void)
{
	// FilePlugin>>#primitiveFileTruncate
    SQFile *file;
    sqInt objectPointer;
    sqInt sz;
    squeakFileOffsetType truncatePosition;

	if (!(isIntegerObject(stackValue(0)))) {
		sz = sizeof(squeakFileOffsetType);
		if ((byteSizeOf(stackValue(0))) > sz) {
			return primitiveFail();
		}
	}
	truncatePosition = positive64BitValueOf(stackValue(0));
	/* begin fileValueOf: */
	objectPointer = stackValue(1);
	if (!((isBytes(objectPointer))
		 && ((byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {
		primitiveFail();
		file = null;
		goto l1;
	}
	file = firstIndexableField(objectPointer);
l1:	/* end fileValueOf: */;
	if (!(failed())) {
		sqFileTruncate(file, truncatePosition);
	}
	if (!(failed())) {
		pop(2);
	}
}
primitiveFileDelete(void)
{
	// FilePlugin>>#primitiveFileDelete
    char *nameIndex;
    sqInt namePointer;
    sqInt nameSize;
    sqInt okToDelete;

	namePointer = stackValue(0);
	if (!(isBytes(namePointer))) {
		return primitiveFail();
	}
	nameIndex = firstIndexableField(namePointer);

	/* If the security plugin can be loaded, use it to check for permission.
	   If not, assume it's ok */

	nameSize = byteSizeOf(namePointer);
	if (sCDFfn != 0) {
		okToDelete =  ((sqInt (*)(char *, sqInt))sCDFfn)(nameIndex, nameSize);
		if (!okToDelete) {
return primitiveFail();
		}
	}
	sqFileDeleteNameSize(nameIndex, nameSize);
	if (!(failed())) {
		pop(1);
	}
}
/*
  primitivePluginRequestUrlStream: url with: semaIndex
  Request a URL from the browser. Signal semaIndex
  when the result of the request can be queried.
  Returns a handle used in subsequent calls to plugin
  stream functions.
  Note: A request id is the index into requests[].
*/
int display_primitivePluginRequestURLStream()
{
    sqStreamRequest *req;
    int id, url, length, semaIndex;

    if (!inBrowser) return primitiveFail();

    DPRINT("VM: primitivePluginRequestURLStream()\n");

    for (id=0; id<MAX_REQUESTS; id++) {
        if (!requests[id]) break;
    }
    if (id >= MAX_REQUESTS) return primitiveFail();

    semaIndex= stackIntegerValue(0);
    url= stackObjectValue(1);
    if (failed()) return 0;

    if (!isBytes(url)) return primitiveFail();

    req= calloc(1, sizeof(sqStreamRequest));
    if (!req) return primitiveFail();
    req->localName= NULL;
    req->semaIndex= semaIndex;
    req->state= -1;
    requests[id]= req;

    length= byteSizeOf(url);
    browserGetURLRequest(id, firstIndexableField(url), length, NULL, 0);
    pop(3);
    push(positive32BitIntegerFor(id));
    DPRINT("VM:   request id: %i\n", id);
    return 1;
}
Beispiel #9
0
primitiveSetIntProperty(void)
{
    sqInt handle;
    sqInt propID;
    sqInt result;
    sqInt value;

    if (!((methodArgumentCount()) == 3)) {
        return primitiveFail();
    }
    value = signed32BitValueOf(stackValue(0));
    propID = stackIntegerValue(1);
    handle = stackIntegerValue(2);
    if (failed()) {
        return null;
    }
    result = sqSetIntPropertySSL(handle, propID, value);
    if (!result) {
        return primitiveFail();
    }
    if (failed()) {
        return null;
    }
    pop(methodArgumentCount());
    return 0;
}
primitiveSetFog(void)
{
	// B3DAcceleratorPlugin>>#primitiveSetFog
    double density;
    sqInt fogType;
    sqInt handle;
    sqInt result;
    sqInt rgba;
    double start;
    double stop;

	if (!((methodArgumentCount()) == 6)) {
		return primitiveFail();
	}
	rgba = positive32BitValueOf(stackValue(0));
	stop = floatValueOf(stackValue(1));
	start = floatValueOf(stackValue(2));
	density = floatValueOf(stackValue(3));
	fogType = stackIntegerValue(4);
	handle = stackIntegerValue(5);
	if (failed()) {
		return null;
	}
	result = b3dxSetFog(handle, fogType, density, start, stop, rgba);
	if (!result) {
return primitiveFail();
	}
	return pop(6);
}
Beispiel #11
0
primitiveDivFloatArray(void)
{
    sqInt arg;
    float *argPtr;
    sqInt i;
    sqInt length;
    sqInt rcvr;
    float *rcvrPtr;

	arg = stackValue(0);
	rcvr = stackValue(1);
	if (!((isWords(arg))
		 && ((isWords(rcvr))
		 && (((length = stSizeOf(arg))) == (stSizeOf(rcvr)))))) {
		return primitiveFail();
	}
	rcvrPtr = ((float *) (firstIndexableField(rcvr)));

	/* Check if any of the argument's values is zero */
	argPtr = ((float *) (firstIndexableField(arg)));
	for (i = 0; i < length; i += 1) {
		if ((intAtPointer(((char*) (argPtr + i)))) == 0) {
			return primitiveFail();
		}
	}
	for (i = 0; i < length; i += 1) {
		rcvrPtr[i] = ((((double) (rcvrPtr[i]))) / (((double) (argPtr[i]))));
	}
	pop(1);
	return 0;
}
Beispiel #12
0
primitiveAioEnable(void)
{
    static int eventSemaphoreIndices[FD_SETSIZE];
    sqInt externalObject;
    sqInt fd;
    sqInt flags;
    sqInt semaIndex;

	if ((nilObject()) == (stackValue(2))) {
		return primitiveFail();
	}
	fd = stackIntegerValue(2);
	if (fd < 0) {
		return primitiveFail();
	}
	semaIndex = stackIntegerValue(1);
	eventSemaphoreIndices[semaIndex] = semaIndex;
	externalObject = stackObjectValue(0);
	if (externalObject == (trueObject())) {
		flags = AIO_EXT;
	}
	else {
		flags = 0;
	}
	aioEnable(fd, &(eventSemaphoreIndices[semaIndex]), flags);
	pop(4);
	pushInteger(semaIndex);
	return 0;
}
Beispiel #13
0
primitiveDropRequestFileName(void)
{
    sqInt dropIndex;
    char *dropName;
    sqInt i;
    sqInt nameLength;
    sqInt nameOop;
    char *namePtr;

	if (!((methodArgumentCount()) == 1)) {
		return primitiveFail();
	}
	dropIndex = stackIntegerValue(0);

	/* dropRequestFileName returns name or NULL on error */
	dropName = dropRequestFileName(dropIndex);
	if (dropName == null) {
		return primitiveFail();
	}
	nameLength = strlen(dropName);
	nameOop = instantiateClassindexableSize(classString(), nameLength);
	namePtr = firstIndexableField(nameOop);
	for (i = 0; i < nameLength; i += 1) {
		namePtr[i] = (dropName[i]);
	}
	pop(2);
	push(nameOop);
	return 0;
}
Beispiel #14
0
primitiveAioSuspend(void)
{
    sqInt exceptionWatch;
    sqInt fd;
    sqInt flags;
    sqInt readWatch;
    sqInt writeWatch;

	if ((nilObject()) == (stackValue(3))) {
		return primitiveFail();
	}
	fd = stackIntegerValue(3);
	if (fd < 0) {
		return primitiveFail();
	}
	exceptionWatch = stackObjectValue(2);
	readWatch = stackObjectValue(1);
	writeWatch = stackObjectValue(0);
	flags = 0;
	if (exceptionWatch == (trueObject())) {
		flags = flags | (AIO_X);
	}
	if (readWatch == (trueObject())) {
		flags = flags | (AIO_R);
	}
	if (writeWatch == (trueObject())) {
		flags = flags | (AIO_W);
	}
	aioSuspend(fd, flags);
	pop(5);
	pushInteger(flags);
	return 0;
}
primitiveDirectoryDelete(void)
{
	// FilePlugin>>#primitiveDirectoryDelete
    sqInt dirName;
    char *dirNameIndex;
    sqInt dirNameSize;
    sqInt okToDelete;

	dirName = stackValue(0);
	if (!(isBytes(dirName))) {
		return primitiveFail();
	}
	dirNameIndex = firstIndexableField(dirName);

	/* If the security plugin can be loaded, use it to check for permission.
	   If not, assume it's ok */

	dirNameSize = byteSizeOf(dirName);
	if (sCDPfn != 0) {
		okToDelete =  ((sqInt (*)(char *, sqInt))sCDPfn)(dirNameIndex, dirNameSize);
		if (!okToDelete) {
return primitiveFail();
		}
	}
	if (!(dir_Delete(dirNameIndex, dirNameSize))) {
		return primitiveFail();
	}
	pop(1);
}
primitiveCreateRenderer(void)
{
	// B3DAcceleratorPlugin>>#primitiveCreateRenderer
    sqInt allowHardware;
    sqInt allowSoftware;
    sqInt h;
    sqInt result;
    sqInt w;
    sqInt x;
    sqInt y;

	if (!((methodArgumentCount()) == 6)) {
		return primitiveFail();
	}
	h = stackIntegerValue(0);
	w = stackIntegerValue(1);
	y = stackIntegerValue(2);
	x = stackIntegerValue(3);
	allowHardware = booleanValueOf(stackValue(4));
	allowSoftware = booleanValueOf(stackValue(5));
	if (failed()) {
		return null;
	}
	result = b3dxCreateRenderer(allowSoftware, allowHardware, x, y, w, h);
	if (result < 0) {
return primitiveFail();
	}
	pop(7);
	return pushInteger(result);
}
primitiveCompositeTexture(void)
{
	// B3DAcceleratorPlugin>>#primitiveCompositeTexture
    sqInt h;
    sqInt rendererHandle;
    sqInt result;
    sqInt texHandle;
    sqInt translucent;
    sqInt w;
    sqInt x;
    sqInt y;

	if (!((methodArgumentCount()) == 7)) {
		return primitiveFail();
	}
	translucent = booleanValueOf(stackValue(0));
	h = stackIntegerValue(1);
	w = stackIntegerValue(2);
	y = stackIntegerValue(3);
	x = stackIntegerValue(4);
	texHandle = stackIntegerValue(5);
	rendererHandle = stackIntegerValue(6);
	if (failed()) {
		return null;
	}
	result = b3dxCompositeTexture(rendererHandle, texHandle, x, y, w, h, translucent);
	if (!result) {
return primitiveFail();
	}
	return pop(7);
}
primitiveAllocateTexture(void)
{
	// B3DAcceleratorPlugin>>#primitiveAllocateTexture
    sqInt d;
    sqInt h;
    sqInt renderer;
    sqInt result;
    sqInt w;

	if (!((methodArgumentCount()) == 4)) {
		return primitiveFail();
	}
	h = stackIntegerValue(0);
	w = stackIntegerValue(1);
	d = stackIntegerValue(2);
	renderer = stackIntegerValue(3);
	if (failed()) {
		return null;
	}
	result = b3dxAllocateTexture(renderer, w, h, d);
	if (result == -1) {
return primitiveFail();
	}
	pop(5);
	return pushInteger(result);
}
static sqInt
loadClientStateverticescolorsnormalstexCoords(sqInt handle, sqInt vertices, sqInt colors, sqInt normals, sqInt texCoords)
{
	// B3DAcceleratorPlugin>>#loadClientState:vertices:colors:normals:texCoords:
    void *colorPtr;
    void *normalPtr;
    sqInt ok;
    sqInt sz;
    void *txPtr;
    void *vertexPtr;
    sqInt vtxSize;


	/* Verify vertex data */

colorPtr = (normalPtr = (txPtr = (vertexPtr = null)));
	if (!(isWords(vertices))) {
		return primitiveFail();
	}

	/* Verify assumptions of color, normal, texCoords data */

vtxSize = (slotSizeOf(vertices)) / 3;
	if (!((colors == (nilObject()))
		 || ((isWords(colors))
		 && ((slotSizeOf(colors)) == (vtxSize * 4))))) {
		return primitiveFail();
	}
	if (!((normals == (nilObject()))
		 || ((isWords(normals))
		 && ((slotSizeOf(normals)) == (vtxSize * 3))))) {
		return primitiveFail();
	}
	if (!((texCoords == (nilObject()))
		 || (isWords(texCoords)))) {
		return primitiveFail();
	}
	if (!(colors == (nilObject()))) {
		colorPtr = firstIndexableField(colors);
	}
	if (!(normals == (nilObject()))) {
		normalPtr = firstIndexableField(normals);
	}
	if (!(texCoords == (nilObject()))) {
		sz = (slotSizeOf(texCoords)) / vtxSize;
		txPtr = firstIndexableField(texCoords);
	}
	vertexPtr = firstIndexableField(vertices);
	if (failed()) {
		return null;
	}
	ok = b3dLoadClientState(handle, vertexPtr, 3, colorPtr, 4, normalPtr, 3, txPtr, sz);
	if (!ok) {
return primitiveFail();
	}
}
Beispiel #20
0
/*
  primitivePluginRequestState: id
  Return true if the operation was successfully completed.
  Return false if the operation was aborted.
  Return nil if the operation is still in progress.
*/
sqInt display_primitivePluginRequestState()
{
    sqStreamRequest *req;
    int id;

    id= stackIntegerValue(0);
    if (id < 0 || id >= MAX_REQUESTS) return primitiveFail();
    req= requests[id];
    if (!req) return primitiveFail();
    pop(2);
    if (req->state == -1) push(nilObject());
    else pushBool(req->state);
    return 1;
}
Beispiel #21
0
primitiveCreate(void)
{
    sqInt handle;

    if (!((methodArgumentCount()) == 0)) {
        return primitiveFail();
    }
    handle = sqCreateSSL();
    if (handle == 0) {
        return primitiveFail();
    }
    pop((methodArgumentCount()) + 1);
    pushInteger(handle);
    return 0;
}
Beispiel #22
0
primitiveOSFileHandle(void)
{
    sqInt fileNo;
    sqInt sqFileOop;

	sqFileOop = stackValue(0);
	if (!((((isBytes(sqFileOop))
		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
		 && (isNonNullSQFile(sqFileOop)))) {
		return primitiveFail();
	}
	/* begin fileDescriptorFrom: */
	if (!((((isBytes(sqFileOop))
		 && ((byteSizeOf(sqFileOop)) == (sizeof(SQFile))))
		 && ((getThisSessionID()) == (sessionIdentifierFromSqFile(arrayValueOf(sqFileOop)))))
		 && (isNonNullSQFile(sqFileOop)))) {
		fileNo = -1;
		goto l1;
	}
	fileNo = fileno(fileHandleFrom(sqFileOop));
l1:	/* end fileDescriptorFrom: */;
	pop(2);
	pushInteger(fileNo);
	return 0;
}
Beispiel #23
0
primitiveGetUntrustedUserDirectory(void)
{
    sqInt dirLen;
    char *dirName;
    sqInt dirOop;
    char *dirPtr;
    sqInt i;

    dirName = ioGetUntrustedUserDirectory();
    if ((dirName == null)
            || (failed())) {
        return primitiveFail();
    }
    dirLen = strlen(dirName);
    dirOop = instantiateClassindexableSize(classString(), dirLen);
    if (failed()) {
        return null;
    }
    dirPtr = firstIndexableField(dirOop);
    for (i = 0; i < dirLen; i += 1) {
        dirPtr[i] = (dirName[i]);
    }
    popthenPush(1, dirOop);
    return 0;
}
Beispiel #24
0
primitiveAtPut(void)
{
    float *floatPtr;
    double floatValue;
    sqInt index;
    sqInt rcvr;
    sqInt value;

	value = stackValue(0);
	if (isIntegerObject(value)) {
		floatValue = ((double) (integerValueOf(value)) );
	}
	else {
		floatValue = floatValueOf(value);
	}
	index = stackIntegerValue(1);
	rcvr = stackValue(2);
	if (!((!(failed()))
		 && ((isWords(rcvr))
		 && ((index > 0)
		 && (index <= (slotSizeOf(rcvr))))))) {
		return primitiveFail();
	}
	floatPtr = firstIndexableField(rcvr);
	floatPtr[index - 1] = (((float) floatValue));
	popthenPush(3, value);
	return 0;
}
Beispiel #25
0
primitiveDivScalar(void)
{
    sqInt i;
    double  inverse;
    sqInt length;
    sqInt rcvr;
    float *rcvrPtr;
    double value;

	value = stackFloatValue(0);
	if (failed()) {
		return null;
	}
	rcvr = stackValue(1);
	if (!(isWords(rcvr))) {
		return primitiveFail();
	}
	length = stSizeOf(rcvr);
	rcvrPtr = ((float *) (firstIndexableField(rcvr)));
	inverse = 1.0 / value;
	for (i = 0; i < length; i += 1) {
		rcvrPtr[i] = ((((double) (rcvrPtr[i]))) * inverse);
	}
	pop(1);
	return 0;
}
Beispiel #26
0
primitiveAioDisable(void)
{
    sqInt fd;

	if ((nilObject()) == (stackValue(0))) {
		return primitiveFail();
	}
	fd = stackIntegerValue(0);
	if (fd < 0) {
		return primitiveFail();
	}
	aioDisable(fd);
	pop(2);
	pushInteger(fd);
	return 0;
}
primitiveFileCopyNamedTo(void)
{
	// FileCopyPlugin>>#primitiveFileCopyNamedTo
	char *dstName;
	sqInt dstSz;
	sqInt ok;
	char *srcName;
	sqInt srcSz;

	success(isBytes(stackValue(1)));
	srcName = ((char *) (firstIndexableField(stackValue(1))));
	success(isBytes(stackValue(0)));
	dstName = ((char *) (firstIndexableField(stackValue(0))));
	if (failed()) {
		return null;
	}
	srcSz = slotSizeOf(((sqInt)(long)(srcName) - 4));
	dstSz = slotSizeOf(((sqInt)(long)(dstName) - 4));
	ok = sqCopyFilesizetosize(srcName, srcSz, dstName, dstSz);
	if (!ok) {
primitiveFail();
	}
	if (failed()) {
		return null;
	}
	pop(2);
	return null;
}
primitiveFileAtEnd(void)
{
	// FilePlugin>>#primitiveFileAtEnd
    sqInt atEnd;
    SQFile *file;
    sqInt objectPointer;

	/* begin fileValueOf: */
	objectPointer = stackValue(0);
	if (!((isBytes(objectPointer))
		 && ((byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {
		primitiveFail();
		file = null;
		goto l1;
	}
	file = firstIndexableField(objectPointer);
l1:	/* end fileValueOf: */;
	if (!(failed())) {
		atEnd = sqFileAtEnd(file);
	}
	if (!(failed())) {
		pop(2);
		pushBool(atEnd);
	}
}
Beispiel #29
0
primitiveDotProduct(void)
{
    sqInt arg;
    float *argPtr;
    sqInt i;
    sqInt length;
    sqInt rcvr;
    float *rcvrPtr;
    double result;

	arg = stackValue(0);
	rcvr = stackValue(1);
	if (!((isWords(arg))
		 && ((isWords(rcvr))
		 && (((length = stSizeOf(arg))) == (stSizeOf(rcvr)))))) {
		return primitiveFail();
	}
	rcvrPtr = ((float *) (firstIndexableField(rcvr)));
	argPtr = ((float *) (firstIndexableField(arg)));
	result = 0.0;
	for (i = 0; i < length; i += 1) {
		result += (((double) (rcvrPtr[i]))) * (((double) (argPtr[i])));
	}
	pop(2);
	pushFloat(result);
	return 0;
}
Beispiel #30
0
primitiveEqual(void)
{
    sqInt arg;
    float *argPtr;
    sqInt i;
    sqInt length;
    sqInt rcvr;
    float *rcvrPtr;

	arg = stackValue(0);
	rcvr = stackValue(1);
	if (!((isWords(arg))
		 && (isWords(rcvr)))) {
		return primitiveFail();
	}
	pop(2);
	if (!(((length = stSizeOf(arg))) == (stSizeOf(rcvr)))) {
		return pushBool(0);
	}
	rcvrPtr = ((float *) (firstIndexableField(rcvr)));
	argPtr = ((float *) (firstIndexableField(arg)));
	for (i = 0; i < length; i += 1) {
		if (!((rcvrPtr[i]) == (argPtr[i]))) {
			return pushBool(0);
		}
	}
	return pushBool(1);
}