Difference between revisions of "Raw List of Smoke Changes"

From Earlham CS Department
Jump to navigation Jump to search
(New page: A list of tiny, probably significant code changes in the Smoke source)
 
(Standard Changelist)
 
(41 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
A list of tiny, probably significant code changes in the Smoke source
 
A list of tiny, probably significant code changes in the Smoke source
 +
 +
I recommend using your browser's search function when it starts to get large and ugly.
 +
 +
Unless otherwise specified, all source files are in Smoke/code/src/
 +
 +
<nowiki> Remember that "--~~~~" is how to put in your signature</nowiki>
 +
 +
== Common, repeated changes ==
 +
Here I'll put some changes that I've done over and over again on many different files
 +
 +
* Deleted #pragmas
 +
** #pragma once - essentially an ifndef for lazy programmers
 +
** #pragma warning (X) - suppress X warning. The equivalent of telling the compiler "I know I'm doing it wrong! Shut up!"
 +
* Changed explicit enum references to implicit
 +
** for example
 +
enum Status { Running, Stopped }
 +
// BEFORE
 +
newstatus = Status::Running
 +
// AFTER
 +
newstatus = Running
 +
 +
== Standard Changelist ==
 +
 +
--[[User:Leemasa|Leemasa]] 22:09, 3 April 2010 (UTC)
 +
* Framework/Threadpool.h: removed _stdcall
 +
--[[User:Leemasa|Leemasa]] 12:54, 3 April 2010 (UTC)
 +
* Framework/Framework.cpp: Changed strcpy_s and strcat_s, microsoft-specific versions with "Security enhancement" to their standard counterparts
 +
** removed the string length parameter that the _s versions take and the standard versions do not
 +
* Framework/Instrumentation.h: Changed LONG to long
 +
 +
--[[User:Leemasa|Leemasa]] 22:38, 2 April 2010 (UTC)
 +
* Framework/Scheduler.h: Changed throw(...) to throw()
 +
 +
 +
--[[User:Leemasa|Leemasa]] 21:32, 2 April 2010 (UTC)
 +
* Moved files from Smoke/code/extern to (Earlham Smoke Directory)/code: tbb, TinyXml
 +
 +
 +
--[[User:Leemasa|Leemasa]] 14:43, 2 April 2010 (UTC)
 +
* Framework/Framework.h: Changed throw (...) to throw() x2
 +
* Smoke.cpp: changed #include(Framework.h) to #include(Framework.cpp)
 +
** Bad style, but it's a fix for now.
 +
* Framework/Framework.cpp: removed a few #pragma warnings
 +
 +
--[[User:Leemasa|Leemasa]] 03:09, 27 March 2010 (UTC)
 +
* Framework/EnvironmentManager.cpp: Replaced Microsoft-Specific Interlocked-Exchanged with a simple get
 +
** This is a single enum value we're talking about, so its assignment is essentially atomic by nature.
 +
* Framework/EnvironmentManager.h: Removed Singleton declaration in EnvironmentManager
 +
 +
==Old Changes==
 +
These changes occurred before the new ordering scheme was set in place
 +
 +
* BaseTypes/MathX.h: changed intrin.h to xmmintrin.h --[[User:Leemasa|Leemasa]] 01:00, 26 February 2010 (UTC)
 +
* Framework/EnvironmentManager.cpp: deleted windows.h --[[User:Leemasa|Leemasa]] 03:18, 24 February 2010 (UTC)
 +
* BaseTypes/DataTypes.h: deleted W64SAFE in front of type declaration --[[User:Leemasa|Leemasa]] 03:18, 24 February 2010 (UTC)
 +
* BaseTypes/Math.h: deleted microsoft-specific "declspec" function x2 --[[User:Leemasa|Leemasa]] 03:27, 24 February 2010 (UTC)
 +
** This was mis-typed earlier as "deleted math.h" --[[User:Leemasa|Leemasa]] 21:03, 25 February 2010 (UTC)
 +
* BaseTypes/Math.h: deleted extra qualification ‘Matrix4x4::’ on member ‘Inverse’ --[[User:Leemasa|Leemasa]] 21:08, 25 February 2010 (UTC)
 +
* __m128 is defined in Linux's xmmintrin.h library, but requires a special kernel patch to work. --[[User:Leemasa|Leemasa]] 01:00, 26 February 2010 (UTC)
 +
** The entire MathX.h library is built around this, so I'm commenting that library out for now --[[User:Leemasa|Leemasa]] 01:44, 26 February 2010 (UTC)
 +
*** The solution! No kernel patch required. In the Makefile, added -sse2 flag. Now xmmintrin is successful --[[User:Leemasa|Leemasa]] 15:54, 28 February 2010 (UTC)
 +
* BaseTypes/Math.h: Changed all V++'s __forceinline s to __inline__s --[[User:Leemasa|Leemasa]] 01:20, 26 February 2010 (UTC)
 +
* BaseTypes/MathX.h: changed windows-specific _aligned_malloc to posix_memalign, and _aligned_free to free.--[[User:Leemasa|Leemasa]] 22:15, 4 March 2010 (UTC)
 +
* BaseTypes/MathX.h: UNREFERENCE_PARAM(a) removed--[[User:Leemasa|Leemasa]] 22:15, 4 March 2010 (UTC)
 +
* Removed #pragma warning from Math.h, ArrayList.h, and RedBlackTree.h--[[User:Leemasa|Leemasa]] 22:15, 4 March 2010 (UTC)
 +
* BaseTypes/RedBlackTree.h: Removed all the NodeColor:: specifiers from the Red, Black enums--[[User:Leemasa|Leemasa]] 22:15, 4 March 2010 (UTC)
 +
* Tentatively removed the following files (commented out the includes)
 +
** BaseTypes/MathX.h
 +
** BaseTypes/ArrayList.h
 +
** BaseTypes/List.h
 +
** BaseTypes/RedBlackTree.h
 +
--[[User:Leemasa|Leemasa]] 18:26, 6 March 2010 (UTC)
 +
* BaseTypes/Synchronization.h: deleted UNREFERENCED_PARAM( l ) --[[User:Leemasa|Leemasa]] 01:57, 9 March 2010 (UTC)
 +
* Makefile: Added -Wno-long-long --[[User:Leemasa|Leemasa]] 01:57, 9 March 2010 (UTC)
 +
* BaseTypes/Defines.h: deleted redefinition of NULL --[[User:Leemasa|Leemasa]] 01:57, 9 March 2010 (UTC)
 +
* BaseTypes/Synchronization.h: deleted dummy assignment function --[[User:Leemasa|Leemasa]] 01:57, 9 March 2010 (UTC)
 +
* Interfaces/SystemTypes.h: commented out "Names" and "DisplayNames" namespaces, which were warning that they're unused
 +
* Interfaces/System.h: changed friend ISystem to friend class ISystem--[[User:Leemasa|Leemasa]] 21:23, 12 March 2010 (UTC)
 +
* Interfaces/System.h: changed friend ISystemScene to friend class ISystemScene--[[User:Leemasa|Leemasa]] 21:23, 12 March 2010 (UTC)
 +
* All UNREFERENCED_PARAMS deleted--[[User:Leemasa|Leemasa]] 21:23, 12 March 2010 (UTC)
 +
* Interfaces/System.h: Removed 3 __stdcalls from function typedefs at end--[[User:Leemasa|Leemasa]] 21:23, 12 March 2010 (UTC)
 +
* Interfaces/SystemTypes.h: Replaced Microsoft-Specific _BitScanForward with unix-compatible variant (behavior not yet tested, marked with secret handshake)
 +
* Framework/EnvironmentManager.cpp: Replaced stricmp with Posix-conformant strcasecmp
 +
* Framework/EnvironmentManager.cpp: Explicitly labeled a few class references as being part of Interface::
 +
* Framework/EnvironmentManager.cpp: Changed LONG to long. Couldn't find info on LONG, marking with secret handshake
 +
--[[User:Leemasa|Leemasa]] 03:33, 22 March 2010 (UTC)

Latest revision as of 18:09, 3 April 2010

A list of tiny, probably significant code changes in the Smoke source

I recommend using your browser's search function when it starts to get large and ugly.

Unless otherwise specified, all source files are in Smoke/code/src/

Remember that "--~~~~" is how to put in your signature

Common, repeated changes

Here I'll put some changes that I've done over and over again on many different files

  • Deleted #pragmas
    • #pragma once - essentially an ifndef for lazy programmers
    • #pragma warning (X) - suppress X warning. The equivalent of telling the compiler "I know I'm doing it wrong! Shut up!"
  • Changed explicit enum references to implicit
    • for example
enum Status { Running, Stopped }
// BEFORE
newstatus = Status::Running
// AFTER
newstatus = Running

Standard Changelist

--Leemasa 22:09, 3 April 2010 (UTC)

  • Framework/Threadpool.h: removed _stdcall

--Leemasa 12:54, 3 April 2010 (UTC)

  • Framework/Framework.cpp: Changed strcpy_s and strcat_s, microsoft-specific versions with "Security enhancement" to their standard counterparts
    • removed the string length parameter that the _s versions take and the standard versions do not
  • Framework/Instrumentation.h: Changed LONG to long

--Leemasa 22:38, 2 April 2010 (UTC)

  • Framework/Scheduler.h: Changed throw(...) to throw()


--Leemasa 21:32, 2 April 2010 (UTC)

  • Moved files from Smoke/code/extern to (Earlham Smoke Directory)/code: tbb, TinyXml


--Leemasa 14:43, 2 April 2010 (UTC)

  • Framework/Framework.h: Changed throw (...) to throw() x2
  • Smoke.cpp: changed #include(Framework.h) to #include(Framework.cpp)
    • Bad style, but it's a fix for now.
  • Framework/Framework.cpp: removed a few #pragma warnings

--Leemasa 03:09, 27 March 2010 (UTC)

  • Framework/EnvironmentManager.cpp: Replaced Microsoft-Specific Interlocked-Exchanged with a simple get
    • This is a single enum value we're talking about, so its assignment is essentially atomic by nature.
  • Framework/EnvironmentManager.h: Removed Singleton declaration in EnvironmentManager

Old Changes

These changes occurred before the new ordering scheme was set in place

  • BaseTypes/MathX.h: changed intrin.h to xmmintrin.h --Leemasa 01:00, 26 February 2010 (UTC)
  • Framework/EnvironmentManager.cpp: deleted windows.h --Leemasa 03:18, 24 February 2010 (UTC)
  • BaseTypes/DataTypes.h: deleted W64SAFE in front of type declaration --Leemasa 03:18, 24 February 2010 (UTC)
  • BaseTypes/Math.h: deleted microsoft-specific "declspec" function x2 --Leemasa 03:27, 24 February 2010 (UTC)
    • This was mis-typed earlier as "deleted math.h" --Leemasa 21:03, 25 February 2010 (UTC)
  • BaseTypes/Math.h: deleted extra qualification ‘Matrix4x4::’ on member ‘Inverse’ --Leemasa 21:08, 25 February 2010 (UTC)
  • __m128 is defined in Linux's xmmintrin.h library, but requires a special kernel patch to work. --Leemasa 01:00, 26 February 2010 (UTC)
    • The entire MathX.h library is built around this, so I'm commenting that library out for now --Leemasa 01:44, 26 February 2010 (UTC)
      • The solution! No kernel patch required. In the Makefile, added -sse2 flag. Now xmmintrin is successful --Leemasa 15:54, 28 February 2010 (UTC)
  • BaseTypes/Math.h: Changed all V++'s __forceinline s to __inline__s --Leemasa 01:20, 26 February 2010 (UTC)
  • BaseTypes/MathX.h: changed windows-specific _aligned_malloc to posix_memalign, and _aligned_free to free.--Leemasa 22:15, 4 March 2010 (UTC)
  • BaseTypes/MathX.h: UNREFERENCE_PARAM(a) removed--Leemasa 22:15, 4 March 2010 (UTC)
  • Removed #pragma warning from Math.h, ArrayList.h, and RedBlackTree.h--Leemasa 22:15, 4 March 2010 (UTC)
  • BaseTypes/RedBlackTree.h: Removed all the NodeColor:: specifiers from the Red, Black enums--Leemasa 22:15, 4 March 2010 (UTC)
  • Tentatively removed the following files (commented out the includes)
    • BaseTypes/MathX.h
    • BaseTypes/ArrayList.h
    • BaseTypes/List.h
    • BaseTypes/RedBlackTree.h

--Leemasa 18:26, 6 March 2010 (UTC)

  • BaseTypes/Synchronization.h: deleted UNREFERENCED_PARAM( l ) --Leemasa 01:57, 9 March 2010 (UTC)
  • Makefile: Added -Wno-long-long --Leemasa 01:57, 9 March 2010 (UTC)
  • BaseTypes/Defines.h: deleted redefinition of NULL --Leemasa 01:57, 9 March 2010 (UTC)
  • BaseTypes/Synchronization.h: deleted dummy assignment function --Leemasa 01:57, 9 March 2010 (UTC)
  • Interfaces/SystemTypes.h: commented out "Names" and "DisplayNames" namespaces, which were warning that they're unused
  • Interfaces/System.h: changed friend ISystem to friend class ISystem--Leemasa 21:23, 12 March 2010 (UTC)
  • Interfaces/System.h: changed friend ISystemScene to friend class ISystemScene--Leemasa 21:23, 12 March 2010 (UTC)
  • All UNREFERENCED_PARAMS deleted--Leemasa 21:23, 12 March 2010 (UTC)
  • Interfaces/System.h: Removed 3 __stdcalls from function typedefs at end--Leemasa 21:23, 12 March 2010 (UTC)
  • Interfaces/SystemTypes.h: Replaced Microsoft-Specific _BitScanForward with unix-compatible variant (behavior not yet tested, marked with secret handshake)
  • Framework/EnvironmentManager.cpp: Replaced stricmp with Posix-conformant strcasecmp
  • Framework/EnvironmentManager.cpp: Explicitly labeled a few class references as being part of Interface::
  • Framework/EnvironmentManager.cpp: Changed LONG to long. Couldn't find info on LONG, marking with secret handshake

--Leemasa 03:33, 22 March 2010 (UTC)