Merge pull request #33 from MyvarHD/master

Added Unbox
This commit is contained in:
Matthijs ter Woord 2014-12-20 18:50:33 +01:00
commit fa1499a77e
5 changed files with 1707 additions and 1663 deletions

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -14,7 +14,7 @@
<!-- Looks like this was a mispelled attribute. Replaced by DebugEnabled below. <!-- Looks like this was a mispelled attribute. Replaced by DebugEnabled below.
<DebugEnable>true</DebugEnable> <DebugEnable>true</DebugEnable>
--> -->
<DebugEnabled>true</DebugEnabled> <DebugEnabled>True</DebugEnabled>
<DebugMode>Source</DebugMode> <DebugMode>Source</DebugMode>
<TraceMode>User</TraceMode> <TraceMode>User</TraceMode>
<EnableGDB>False</EnableGDB> <EnableGDB>False</EnableGDB>
@ -26,6 +26,43 @@
<Deployment>ISO</Deployment> <Deployment>ISO</Deployment>
<Launch>VMware</Launch> <Launch>VMware</Launch>
<VisualStudioDebugPort>Pipe: Cosmos\Serial</VisualStudioDebugPort> <VisualStudioDebugPort>Pipe: Cosmos\Serial</VisualStudioDebugPort>
<StackCorruptionDetectionEnabled>True</StackCorruptionDetectionEnabled>
<VMware_Name>TestBedBoot</VMware_Name>
<VMware_Description>Use VMware Player or Workstation to deploy and debug.</VMware_Description>
<VMware_Deployment>ISO</VMware_Deployment>
<VMware_Launch>VMware</VMware_Launch>
<VMware_DebugEnabled>True</VMware_DebugEnabled>
<VMware_StackCorruptionDetectionEnabled>True</VMware_StackCorruptionDetectionEnabled>
<VMware_DebugMode>Source</VMware_DebugMode>
<VMware_VisualStudioDebugPort>Pipe: Cosmos\Serial</VMware_VisualStudioDebugPort>
<VMware_VMwareEdition>Player</VMware_VMwareEdition>
<VMware_OutputPath>bin\Debug\</VMware_OutputPath>
<VMware_EnableGDB>False</VMware_EnableGDB>
<VMware_StartCosmosGDB>false</VMware_StartCosmosGDB>
<PXE_Name>TestBedBoot</PXE_Name>
<PXE_Description>Creates a PXE setup and hosts a DCHP and TFTP server to deploy directly to physical hardware. Allows debugging with a serial cable.</PXE_Description>
<PXE_Deployment>PXE</PXE_Deployment>
<PXE_Launch>None</PXE_Launch>
<PXE_DebugEnabled>False</PXE_DebugEnabled>
<PXE_StackCorruptionDetectionEnabled>True</PXE_StackCorruptionDetectionEnabled>
<PXE_DebugMode>Source</PXE_DebugMode>
<PXE_VisualStudioDebugPort>Pipe: Cosmos\Serial</PXE_VisualStudioDebugPort>
<PXE_VMwareEdition>Player</PXE_VMwareEdition>
<PXE_OutputPath>bin\Debug\</PXE_OutputPath>
<PXE_EnableGDB>False</PXE_EnableGDB>
<PXE_StartCosmosGDB>false</PXE_StartCosmosGDB>
<ISO_Name>TestBedBoot</ISO_Name>
<ISO_Description>Creates a bootable ISO image which can be burned to a DVD. After running the selected project, an explorer window will open containing the ISO file. The ISO file can then be burned to a CD or DVD and used to boot a physical or virtual system.</ISO_Description>
<ISO_Deployment>ISO</ISO_Deployment>
<ISO_Launch>None</ISO_Launch>
<ISO_DebugEnabled>False</ISO_DebugEnabled>
<ISO_StackCorruptionDetectionEnabled>True</ISO_StackCorruptionDetectionEnabled>
<ISO_DebugMode>Source</ISO_DebugMode>
<ISO_VisualStudioDebugPort>Pipe: Cosmos\Serial</ISO_VisualStudioDebugPort>
<ISO_VMwareEdition>Player</ISO_VMwareEdition>
<ISO_OutputPath>bin\Debug\</ISO_OutputPath>
<ISO_EnableGDB>False</ISO_EnableGDB>
<ISO_StartCosmosGDB>false</ISO_StartCosmosGDB>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include=".\TestBed.csproj"> <ProjectReference Include=".\TestBed.csproj">
@ -34,9 +71,9 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Cosmos.Core.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983"/> <Reference Include="Cosmos.Core.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983" />
<Reference Include="Cosmos.System.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983"/> <Reference Include="Cosmos.System.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983" />
<Reference Include="Cosmos.Debug.Kernel.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983"/> <Reference Include="Cosmos.Debug.Kernel.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983" />
</ItemGroup> </ItemGroup>
<!--<ItemGroup> <!--<ItemGroup>
<Content Include="Cosmos.bxrc"> <Content Include="Cosmos.bxrc">

View file

@ -42,6 +42,8 @@ namespace Cosmos.IL2CPU.ILOpCodes {
return 0; return 0;
case Code.Unbox_Any: case Code.Unbox_Any:
return 1; return 1;
case Code.Unbox:
return 1;
default: default:
throw new NotImplementedException("OpCode '" + OpCode + "' not implemented! Encountered in method " + aMethod.ToString()); throw new NotImplementedException("OpCode '" + OpCode + "' not implemented! Encountered in method " + aMethod.ToString());
} }
@ -71,6 +73,8 @@ namespace Cosmos.IL2CPU.ILOpCodes {
return 0; return 0;
case Code.Unbox_Any: case Code.Unbox_Any:
return 1; return 1;
case Code.Unbox:
return 1;
default: default:
throw new NotImplementedException("OpCode '" + OpCode + "' not implemented!"); throw new NotImplementedException("OpCode '" + OpCode + "' not implemented!");
} }
@ -102,6 +106,9 @@ namespace Cosmos.IL2CPU.ILOpCodes {
case Code.Unbox_Any: case Code.Unbox_Any:
StackPushTypes[0] = Value; StackPushTypes[0] = Value;
return; return;
case Code.Unbox:
StackPushTypes[0] = Value;
return;
case Code.Newarr: case Code.Newarr:
StackPushTypes[0] = Value.MakeArrayType(); StackPushTypes[0] = Value.MakeArrayType();
return; return;

File diff suppressed because it is too large Load diff