From 13f1f0861f9d20b1dec6fa5dad8d0ea661d91309 Mon Sep 17 00:00:00 2001 From: Eliot Miranda Date: Thu, 10 Jan 2013 23:34:44 +0000 Subject: [PATCH] CogVM source as per /VMMaker.oscog-eem.253. Implement absent receiver dynamic super send in the Cogit. Change the Teleplace licenses to 3D ICC. git-svn-id: http://squeakvm.org/svn/squeak/branches/Cog@2669 fa1542d4-bde8-0310-ad64-8ed1123d492a Former-commit-id: 53aa860b7d33811becf39f2ba7277ce507b5e107 --- LICENSE | 5 +- README | 2 +- .../Mpeg3Plugin.xcodeproj/project.pbxproj | 3 -- macbuild/install.sh | 15 ------ nscogsrc/vm/cogit.c | 53 ++++++++++++++----- nscogsrc/vm/cogit.h | 2 +- nscogsrc/vm/cogmethod.h | 2 +- platforms/Cross/vm/sqExternalSemaphores.c | 2 +- platforms/Cross/vm/sqMemoryFence.h | 2 +- platforms/Cross/vm/sqTicker.c | 2 +- platforms/Mac OS/vm/nsPoolManagement.h | 2 +- platforms/Mac OS/vm/nsPoolManagement.m | 2 +- .../Mpeg3Plugin.xcodeproj/project.pbxproj | 3 -- 13 files changed, 52 insertions(+), 43 deletions(-) delete mode 100755 macbuild/install.sh diff --git a/LICENSE b/LICENSE index 4e33342554..1c6c7bce7c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,6 @@ -All contributions from Teleplace in this release are -Copyright (c) 2010 Teleplace, Inc. +License (MIT): +All contributions from 3D Immersive Collaboration Consulting in this release are +Copyright (c) 2013 3D Immersive Collaboration Consulting, LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README b/README index ea3b04b06d..e4d09948e4 100644 --- a/README +++ b/README @@ -225,7 +225,7 @@ best as time allows. Better still if you find and fix bugs be sure to let me know. License (MIT): -Copyright (c) 2010 Teleplace, Inc. +Copyright (c) 2013 3D Immersive Collaboration Consulting, LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/macbuild/Mpeg3Plugin/Mpeg3Plugin.xcodeproj/project.pbxproj b/macbuild/Mpeg3Plugin/Mpeg3Plugin.xcodeproj/project.pbxproj index e1de4f7d62..52109235b1 100644 --- a/macbuild/Mpeg3Plugin/Mpeg3Plugin.xcodeproj/project.pbxproj +++ b/macbuild/Mpeg3Plugin/Mpeg3Plugin.xcodeproj/project.pbxproj @@ -259,9 +259,6 @@ /* Begin PBXProject section */ 66DF6BFD01D7DCEA00A80119 /* Project object */ = { isa = PBXProject; - attributes = { - ORGANIZATIONNAME = "Teleplace, Inc."; - }; buildConfigurationList = 946BCE000959347500803517 /* Build configuration list for PBXProject "Mpeg3Plugin" */; compatibilityVersion = "Xcode 3.0"; developmentRegion = English; diff --git a/macbuild/install.sh b/macbuild/install.sh deleted file mode 100755 index 00fd61701d..0000000000 --- a/macbuild/install.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# This puts a fresh-built vm into /Applications without removing what was already there, -# by overwriting only the parts you've just built. - -# Copy to /Applications, excluding any .svn subdirs. - -tar cf - --exclude .svn --exclude 'Squeak*icns' ./Teleplace.app | (cd /Applications; tar xf -) - -# All the sub-content frameworks and the exe need to be executable; -# we just do everything so we don't miss anything. - -cd /Applications/Teleplace.app -chmod -R a+x ./* - diff --git a/nscogsrc/vm/cogit.c b/nscogsrc/vm/cogit.c index 7f68ac6397..d3b7dfe36c 100644 --- a/nscogsrc/vm/cogit.c +++ b/nscogsrc/vm/cogit.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.250 uuid: e0de5572-7682-4c5e-b5a0-ca2f32cf0c81 + CCodeGenerator VMMaker.oscog-eem.253 uuid: 4a3ac3fb-d367-478b-ad95-ad3bb8b6216f from - StackToRegisterMappingCogit VMMaker.oscog-eem.250 uuid: e0de5572-7682-4c5e-b5a0-ca2f32cf0c81 + StackToRegisterMappingCogit VMMaker.oscog-eem.253 uuid: 4a3ac3fb-d367-478b-ad95-ad3bb8b6216f */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.250 uuid: e0de5572-7682-4c5e-b5a0-ca2f32cf0c81 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.253 uuid: 4a3ac3fb-d367-478b-ad95-ad3bb8b6216f " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -752,8 +752,10 @@ static sqInt genSafeTrampolineForcalledargarg(void *aRoutine, char *aString, sqI static sqInt genSaveRegisters(AbstractInstruction * self_in_genSaveRegisters); static sqInt genSaveStackPointers(void); static sqInt genSecondExtendedSendBytecode(void); +static sqInt genSendAbsentDynamicSupernumArgs(sqInt selector, sqInt numArgs); static sqInt genSendAbsentImplicit0ArgsBytecode(void); static sqInt genSendAbsentImplicitnumArgs(sqInt selector, sqInt numArgs); +static sqInt genSendDynamicSupernumArgs(sqInt selector, sqInt numArgs); static sqInt genSendLiteralSelector0ArgsBytecode(void); static sqInt genSendLiteralSelector1ArgBytecode(void); static sqInt genSendLiteralSelector2ArgsBytecode(void); @@ -8570,13 +8572,7 @@ genDoubleFailIfZeroArgRcvrarg(sqInt rcvrReg, sqInt argReg) static sqInt genDynamicSuperSendBytecode(void) { - sqInt numArgs; - sqInt selector; - - numArgs = byte1; - selector = literalofMethod(byte2, methodObj); - marshallSendArguments(numArgs); - return genMarshalledSendDynamicSupernumArgs(selector, numArgs); + return genSendDynamicSupernumArgs(literalofMethod(byte2, methodObj), byte1); } @@ -8984,8 +8980,14 @@ genExtReturnTopFromBlock(void) static sqInt genExtSendAbsentDynamicSuperBytecode(void) { - error("shouldBeImplemented"); - return EncounteredUnknownBytecode; + sqInt litIndex; + sqInt nArgs; + + litIndex = (((usqInt) byte1) >> 3) + (extA << 5); + extA = 0; + nArgs = (byte1 & 7) + (extB << 3); + extB = 0; + return genSendAbsentDynamicSupernumArgs(literalofMethod(litIndex, methodObj), nArgs); } @@ -12426,6 +12428,26 @@ genSecondExtendedSendBytecode(void) } +/* OK, we could do better and avoid spilling ReceiverResultReg if we + refactored marshallImplicitReceiverSendArguments: to take a flag saying + whether the + receiver was in ReceiverResultReg (absent receiver send) or on the stack + (absent dynamic super send) and in the latter case loading + ReceiverResultReg from the stack after marshalling. But this is a rare + bytecode so for the moment + don't bother. */ + +static sqInt +genSendAbsentDynamicSupernumArgs(sqInt selector, sqInt numArgs) +{ + ssAllocateCallReg(ReceiverResultReg); + /* begin MoveMw:r:R: */ + genoperandoperandoperand(MoveMwrR, FoxMFReceiver, FPReg, ReceiverResultReg); + marshallImplicitReceiverSendArguments(numArgs); + return genMarshalledSendDynamicSupernumArgs(selector, numArgs); +} + + /* 160-175 1010 i i i i Send To Absent Implicit Receiver Literal Selector #iiii With 0 Arguments. */ @@ -12453,6 +12475,13 @@ genSendAbsentImplicitnumArgs(sqInt selector, sqInt numArgs) return genMarshalledSendnumArgs(selector, numArgs); } +static sqInt +genSendDynamicSupernumArgs(sqInt selector, sqInt numArgs) +{ + marshallSendArguments(numArgs); + return genMarshalledSendDynamicSupernumArgs(selector, numArgs); +} + static sqInt genSendLiteralSelector0ArgsBytecode(void) { diff --git a/nscogsrc/vm/cogit.h b/nscogsrc/vm/cogit.h index f1daa2f82d..3c8a4c7692 100644 --- a/nscogsrc/vm/cogit.h +++ b/nscogsrc/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.250 uuid: e0de5572-7682-4c5e-b5a0-ca2f32cf0c81 + CCodeGenerator VMMaker.oscog-eem.253 uuid: 4a3ac3fb-d367-478b-ad95-ad3bb8b6216f */ diff --git a/nscogsrc/vm/cogmethod.h b/nscogsrc/vm/cogmethod.h index 62f240cb6d..2a621daa4e 100644 --- a/nscogsrc/vm/cogmethod.h +++ b/nscogsrc/vm/cogmethod.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.250 uuid: e0de5572-7682-4c5e-b5a0-ca2f32cf0c81 + CCodeGenerator VMMaker.oscog-eem.253 uuid: 4a3ac3fb-d367-478b-ad95-ad3bb8b6216f */ typedef struct { diff --git a/platforms/Cross/vm/sqExternalSemaphores.c b/platforms/Cross/vm/sqExternalSemaphores.c index 02cdda7181..56cdf5b348 100644 --- a/platforms/Cross/vm/sqExternalSemaphores.c +++ b/platforms/Cross/vm/sqExternalSemaphores.c @@ -3,7 +3,7 @@ * * Authors: Eliot Miranda & Brad Fowlow * - * Copyright (C) 2009 by Teleplace, Inc. + * Copyright (c) 2013 3D Immersive Collaboration Consulting, LLC. * * All rights reserved. * diff --git a/platforms/Cross/vm/sqMemoryFence.h b/platforms/Cross/vm/sqMemoryFence.h index 7fa9910750..1ae44ea375 100644 --- a/platforms/Cross/vm/sqMemoryFence.h +++ b/platforms/Cross/vm/sqMemoryFence.h @@ -3,7 +3,7 @@ * * Author: Eliot Miranda * - * Copyright (C) 2010 by Teleplace, Inc. + * Copyright (c) 2013 3D Immersive Collaboration Consulting, LLC. * * All rights reserved. * diff --git a/platforms/Cross/vm/sqTicker.c b/platforms/Cross/vm/sqTicker.c index b9d6e65d68..771d5ee46e 100644 --- a/platforms/Cross/vm/sqTicker.c +++ b/platforms/Cross/vm/sqTicker.c @@ -3,7 +3,7 @@ * * Authors: Eliot Miranda & Josh Gargus * - * Copyright (C) 2010 by Teleplace, Inc. + * Copyright (c) 2013 3D Immersive Collaboration Consulting, LLC. * * All rights reserved. * diff --git a/platforms/Mac OS/vm/nsPoolManagement.h b/platforms/Mac OS/vm/nsPoolManagement.h index 44b60f4bf1..7fd757904c 100644 --- a/platforms/Mac OS/vm/nsPoolManagement.h +++ b/platforms/Mac OS/vm/nsPoolManagement.h @@ -3,7 +3,7 @@ // CoreVM // // Created by Brad Fowlow on 10/15/09. -// Copyright 2009 Teleplace, Inc. All rights reserved. +// Copyright (c) 2013 3D Immersive Collaboration Consulting, LLC. // Main autorelese-pool drain/reset. // To be called regularly, diff --git a/platforms/Mac OS/vm/nsPoolManagement.m b/platforms/Mac OS/vm/nsPoolManagement.m index dda6f89672..2426cfb1ae 100644 --- a/platforms/Mac OS/vm/nsPoolManagement.m +++ b/platforms/Mac OS/vm/nsPoolManagement.m @@ -3,7 +3,7 @@ // CoreVM // // Created by Brad Fowlow on 10/15/09. -// Copyright 2009 Teleplace, Inc. All rights reserved. +// Copyright (c) 2013 3D Immersive Collaboration Consulting, LLC. #import "interp.h" #import "sqMemoryAccess.h" /* for sqInt ?!?!? */ diff --git a/stackbuild/macbuild/Mpeg3Plugin/Mpeg3Plugin.xcodeproj/project.pbxproj b/stackbuild/macbuild/Mpeg3Plugin/Mpeg3Plugin.xcodeproj/project.pbxproj index a2304fb3b3..1ea94f05aa 100644 --- a/stackbuild/macbuild/Mpeg3Plugin/Mpeg3Plugin.xcodeproj/project.pbxproj +++ b/stackbuild/macbuild/Mpeg3Plugin/Mpeg3Plugin.xcodeproj/project.pbxproj @@ -259,9 +259,6 @@ /* Begin PBXProject section */ 66DF6BFD01D7DCEA00A80119 /* Project object */ = { isa = PBXProject; - attributes = { - ORGANIZATIONNAME = "Teleplace, Inc."; - }; buildConfigurationList = 946BCE000959347500803517 /* Build configuration list for PBXProject "Mpeg3Plugin" */; compatibilityVersion = "Xcode 3.0"; developmentRegion = English;