changeset 10245:08d0c4b1a48d

8048891: Remove unused JObjC from jdk repository Reviewed-by: mchung
author alanb
date Wed, 02 Jul 2014 10:03:40 +0100
parents 6c9d15a88501
children 4ee22aef03c6
files src/macosx/native/jobjc/JObjC.xcodeproj/default.pbxuser src/macosx/native/jobjc/JObjC.xcodeproj/project.pbxproj src/macosx/native/jobjc/README.txt src/macosx/native/jobjc/TODOS src/macosx/native/jobjc/bridgesupport.gmk src/macosx/native/jobjc/build.xml src/macosx/native/jobjc/extract_classes.pl src/macosx/native/jobjc/run-and-write-if-okay src/macosx/native/jobjc/rungen src/macosx/native/jobjc/runjava src/macosx/native/jobjc/src/core/PrimitiveCoder.hs src/macosx/native/jobjc/src/core/java/com/apple/jobjc/CFType.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/CIF.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Coder.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/FFIType.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Function.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/ID.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Invoke.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/JObjCRuntime.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/MacOSXFramework.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NSClass.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeArgumentBuffer.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeBuffer.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeObjectLifecycleManager.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Opaque.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Pointer.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/PrimitiveCoder.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/SEL.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Struct.java src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Subclassing.java src/macosx/native/jobjc/src/core/native/CIF.m src/macosx/native/jobjc/src/core/native/Coder.m src/macosx/native/jobjc/src/core/native/FFIType.m src/macosx/native/jobjc/src/core/native/Function.m src/macosx/native/jobjc/src/core/native/ID.m src/macosx/native/jobjc/src/core/native/Invoke.m src/macosx/native/jobjc/src/core/native/JObjCRuntime.m src/macosx/native/jobjc/src/core/native/MacOSXFramework.m src/macosx/native/jobjc/src/core/native/NSClass.m src/macosx/native/jobjc/src/core/native/NativeBuffer.h src/macosx/native/jobjc/src/core/native/NativeBuffer.m src/macosx/native/jobjc/src/core/native/NativeObjectLifecycleManager.m src/macosx/native/jobjc/src/core/native/SEL.m src/macosx/native/jobjc/src/core/native/Subclassing.m src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/BootClassPathMinus.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/ClassConsolidator.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/ClassGenerator.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/FileCopier.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/FrameworkGenerator.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/FunctionGenerator.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/Generator.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/MethodDisambiguator.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/RestrictedKeywords.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/Utils.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/AbstractObjCClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/CFTypeClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/CategoryClassClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/CategoryClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/CopiedFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/FrameworkClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/GeneratedClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/JObjCClassClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/JObjCClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/MixedPrimitiveCoderClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/OpaqueClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/OutputFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/RootJObjCClass.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/StructClassFile.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Arg.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/CFType.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Category.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Clazz.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Constant.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Element.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/ElementWType.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Framework.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Function.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/FunctionAlias.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/InformalProtocol.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Method.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/NativeEnum.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Opaque.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/OutputFileGenerator.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Protocol.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/ReturnValue.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/StringConstant.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/Struct.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/TypeElement.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/coders/CoderDescriptor.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/coders/ComplexCoderDescriptor.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/coders/PrimitiveCoderDescriptor.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/types/JType.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/types/NType.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/types/Type.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/types/TypeCache.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/model/types/TypeToJType.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/Fp.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/JavaLang.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/NTypeMerger.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/NTypeParser.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/NTypePrinter.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/ObjectInspector.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/QA.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/StringStream.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/StructOffsetResolver.java src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/utils/StructOffsetResolverBigBang.java src/macosx/native/jobjc/src/generator/java/com/apple/jobjc/SuperClassExtractor.java src/macosx/native/jobjc/src/generator/java/com/apple/jobjc/UnsafeRuntimeAccess.java src/macosx/native/jobjc/src/runtime-additions/java/com/apple/jobjc/Utils.java src/macosx/native/jobjc/src/runtime-additions/native/NativeNumber.m src/macosx/native/jobjc/src/runtime-additions/native/NativeString.m src/macosx/native/jobjc/src/runtime-additions/native/NativeThread.m src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/BaseBench.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/BenchFunCall.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/BenchIDPop.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/BenchStructCoding.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/BenchUnsafe.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/CategoryTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/FunctionTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/GUIDemo.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/IBDemo.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/IntroTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/NSClassTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/NativeBufferTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/NativeTypeTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/PooledTestCase.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/SELTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/StructTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/SubclassingTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/TestUtils.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/UtilsTest.java src/macosx/native/jobjc/src/tests/java/com/apple/jobjc/VarArgsTest.java src/macosx/native/jobjc/src/tests/native/FunCallBench.m
diffstat 133 files changed, 0 insertions(+), 14732 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/native/jobjc/JObjC.xcodeproj/default.pbxuser	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,207 +0,0 @@
-// !$*UTF8*$!
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-{
-        00E6828EFEC88D1A11DB9C8B /* Project object */ = {
-                activeBuildConfigurationName = Release;
-                activeExecutable = 6A9FA6570246BA6C0CC91562 /* JObjC */;
-                activeTarget = EB9FD8610AEECCF5008E157E /* JObjC */;
-                addToTargets = (
-                        4CEBA78E08679EF10015D03E /* JNILib */,
-                );
-                breakpointsGroup = 0AB3651F0B2F67B300788B6C /* XCBreakpointsBucket */;
-                codeSenseManager = 0AB364DB0B2F66FD00788B6C /* Code sense */;
-                executables = (
-                        6A9FA6570246BA6C0CC91562 /* JObjC */,
-                );
-                perUserDictionary = {
-                        PBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {
-                                PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
-                                PBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;
-                                PBXFileTableDataSourceColumnWidthsKey = (
-                                        22,
-                                        300,
-                                        131,
-                                );
-                                PBXFileTableDataSourceColumnsKey = (
-                                        PBXExecutablesDataSource_ActiveFlagID,
-                                        PBXExecutablesDataSource_NameID,
-                                        PBXExecutablesDataSource_CommentsID,
-                                );
-                        };
-                        PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
-                                PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
-                                PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
-                                PBXFileTableDataSourceColumnWidthsKey = (
-                                        20,
-                                        245,
-                                        20,
-                                        48,
-                                        43,
-                                        43,
-                                        20,
-                                );
-                                PBXFileTableDataSourceColumnsKey = (
-                                        PBXFileDataSource_FiletypeID,
-                                        PBXFileDataSource_Filename_ColumnID,
-                                        PBXFileDataSource_Built_ColumnID,
-                                        PBXFileDataSource_ObjectSize_ColumnID,
-                                        PBXFileDataSource_Errors_ColumnID,
-                                        PBXFileDataSource_Warnings_ColumnID,
-                                        PBXFileDataSource_Target_ColumnID,
-                                );
-                        };
-                        PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
-                                PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
-                                PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
-                                PBXFileTableDataSourceColumnWidthsKey = (
-                                        20,
-                                        200,
-                                        65,
-                                        20,
-                                        48,
-                                        43,
-                                        43,
-                                );
-                                PBXFileTableDataSourceColumnsKey = (
-                                        PBXFileDataSource_FiletypeID,
-                                        PBXFileDataSource_Filename_ColumnID,
-                                        PBXTargetDataSource_PrimaryAttribute,
-                                        PBXFileDataSource_Built_ColumnID,
-                                        PBXFileDataSource_ObjectSize_ColumnID,
-                                        PBXFileDataSource_Errors_ColumnID,
-                                        PBXFileDataSource_Warnings_ColumnID,
-                                );
-                        };
-                };
-                sourceControlManager = 0AB364DA0B2F66FD00788B6C /* Source Control */;
-                userBuildSettings = {
-                };
-        };
-        0AB364DA0B2F66FD00788B6C /* Source Control */ = {
-                isa = PBXSourceControlManager;
-                fallbackIsa = XCSourceControlManager;
-                isSCMEnabled = 0;
-                scmConfiguration = {
-                };
-                scmType = "";
-        };
-        0AB364DB0B2F66FD00788B6C /* Code sense */ = {
-                isa = PBXCodeSenseManager;
-                indexTemplatePath = "";
-        };
-        0AB3651F0B2F67B300788B6C /* XCBreakpointsBucket */ = {
-                isa = XCBreakpointsBucket;
-                name = "Project Breakpoints";
-                objects = (
-                );
-        };
-        0AB365570B2F6ABB00788B6C /* JObjCdylib.c */ = {
-                uiCtxt = {
-                        sepNavIntBoundsRect = "{{0, 0}, {847, 783}}";
-                        sepNavSelRange = "{0, 0}";
-                        sepNavVisRect = "{{0, 0}, {847, 783}}";
-                        sepNavWindowFrame = "{{84, 198}, {886, 912}}";
-                };
-        };
-        0A3CC35E0B94BB8800F6BA26 /* java */ = {
-                isa = PBXFileReference;
-                explicitFileType = "compiled.mach-o.executable";
-                name = java;
-                path = /usr/bin/java;
-                sourceTree = "<absolute>";
-        };
-        363028F90383184400C91562 /* Manifest */ = {
-                uiCtxt = {
-                        sepNavIntBoundsRect = "{{0, 0}, {847, 783}}";
-                        sepNavSelRange = "{0, 0}";
-                        sepNavVisRect = "{{0, 0}, {847, 783}}";
-                        sepNavWindowFrame = "{{38, 240}, {886, 912}}";
-                };
-        };
-        4CEBA78E08679EF10015D03E /* Dylib */ = {
-                activeExec = 0;
-        };
-        6A9FA6570246BA6C0CC91562 /* JObjC */ = {
-                isa = PBXExecutable;
-                activeArgIndex = 0;
-                activeArgIndices = (
-                        YES,
-                );
-                argumentStrings = (
-                        "-cp JObjC.jar JObjC",
-                );
-                autoAttachOnCrash = 1;
-                configStateDict = {
-                        "PBXLSLaunchAction-0" = {
-                                PBXLSLaunchAction = 0;
-                                PBXLSLaunchStartAction = 1;
-                                PBXLSLaunchStdioStyle = 2;
-                                PBXLSLaunchStyle = 0;
-                                class = PBXLSRunLaunchConfig;
-                                displayName = "Executable Runner";
-                                identifier = com.apple.Xcode.launch.runConfig;
-                                remoteHostInfo = "";
-                                startActionInfo = "";
-                        };
-                        "PBXLSLaunchAction-1" = {
-                                PBXLSLaunchAction = 1;
-                                PBXLSLaunchStartAction = 1;
-                                PBXLSLaunchStdioStyle = 2;
-                                PBXLSLaunchStyle = 0;
-                                class = PBXJavaDebuggingNativeLaunchConfig;
-                                displayName = "Java Debugger";
-                                identifier = com.apple.Xcode.launch.JavaDebugNativeConfig;
-                                remoteHostInfo = "";
-                                startActionInfo = "";
-                        };
-                };
-                customDataFormattersEnabled = 1;
-                debuggerPlugin = GDBDebugging;
-                disassemblyDisplayState = 0;
-                dylibVariantSuffix = "";
-                enableDebugStr = 1;
-                environmentEntries = (
-                );
-                executableSystemSymbolLevel = 0;
-                executableUserSymbolLevel = 0;
-                launchableReference = 0A3CC35E0B94BB8800F6BA26 /* java */;
-                libgmallocEnabled = 0;
-                name = JObjC;
-                sourceDirectories = (
-                );
-                startupPath = "dist";
-        };
-        EB9FD8610AEECCF5008E157E /* JObjC */ = {
-                activeExec = 0;
-        };
-        EB9FD8720AEECD83008E157E /* build.xml */ = {
-                uiCtxt = {
-                        sepNavIntBoundsRect = "{{0, 0}, {847, 1260}}";
-                        sepNavSelRange = "{1260, 0}";
-                        sepNavVisRect = "{{0, 8}, {847, 783}}";
-                        sepNavWindowFrame = "{{752, 266}, {886, 912}}";
-                };
-        };
-}
--- a/src/macosx/native/jobjc/JObjC.xcodeproj/project.pbxproj	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1397 +0,0 @@
-// !$*UTF8*$!
-{
-        archiveVersion = 1;
-        classes = {
-        };
-        objectVersion = 44;
-        objects = {
-
-/* Begin PBXAggregateTarget section */
-                89EBD58C0C95F43D000F04A0 /* B&I */ = {
-                        isa = PBXAggregateTarget;
-                        buildConfigurationList = 89EBD5930C95F44E000F04A0 /* Build configuration list for PBXAggregateTarget "B&I" */;
-                        buildPhases = (
-                        );
-                        dependencies = (
-                                C592D6590E12F27400D076FF /* PBXTargetDependency */,
-                                C592D65B0E12F27600D076FF /* PBXTargetDependency */,
-                                C592D65D0E12F27E00D076FF /* PBXTargetDependency */,
-                                89D7CB9C0CDC64F800472EA2 /* PBXTargetDependency */,
-                                C592D65F0E12F28500D076FF /* PBXTargetDependency */,
-                                C592D6610E12F28E00D076FF /* PBXTargetDependency */,
-                                C592D6630E12F29200D076FF /* PBXTargetDependency */,
-                                89D7CC920CDE7A8200472EA2 /* PBXTargetDependency */,
-                        );
-                        name = "B&I";
-                        productName = "B&I";
-                };
-/* End PBXAggregateTarget section */
-
-/* Begin PBXBuildFile section */
-                89D7C9F70CDB900E00472EA2 /* CIF.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9EC0CDB900E00472EA2 /* CIF.m */; };
-                89D7C9F80CDB900E00472EA2 /* Coder.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9ED0CDB900E00472EA2 /* Coder.m */; };
-                89D7C9F90CDB900E00472EA2 /* Function.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9EE0CDB900E00472EA2 /* Function.m */; };
-                89D7C9FA0CDB900E00472EA2 /* ID.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9EF0CDB900E00472EA2 /* ID.m */; };
-                89D7C9FB0CDB900E00472EA2 /* JObjCRuntime.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9F00CDB900E00472EA2 /* JObjCRuntime.m */; };
-                89D7C9FC0CDB900E00472EA2 /* MacOSXFramework.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9F10CDB900E00472EA2 /* MacOSXFramework.m */; };
-                89D7C9FD0CDB900E00472EA2 /* NativeBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 89D7C9F20CDB900E00472EA2 /* NativeBuffer.h */; };
-                89D7C9FE0CDB900E00472EA2 /* NativeBuffer.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9F30CDB900E00472EA2 /* NativeBuffer.m */; };
-                89D7C9FF0CDB900E00472EA2 /* NativeObjectLifecycleManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9F40CDB900E00472EA2 /* NativeObjectLifecycleManager.m */; };
-                89D7CA000CDB900E00472EA2 /* NSClass.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9F50CDB900E00472EA2 /* NSClass.m */; };
-                89D7CA010CDB900E00472EA2 /* SEL.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9F60CDB900E00472EA2 /* SEL.m */; };
-                89D7CB770CDC4A6500472EA2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 890FBACC0C6F782C00902C32 /* Foundation.framework */; };
-                89D7CB780CDC4A6500472EA2 /* JavaVM.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 890FBACA0C6F781000902C32 /* JavaVM.framework */; };
-                89D7CB790CDC4A6500472EA2 /* JavaNativeFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 896D90BB0CC2877C005625F5 /* JavaNativeFoundation.framework */; };
-                89D7CB7A0CDC4A6500472EA2 /* libffi.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 89E437680C97A7F200C756EE /* libffi.dylib */; };
-                89D7CCA40CDF9A2600472EA2 /* NativeBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 89D7C9F20CDB900E00472EA2 /* NativeBuffer.h */; };
-                89D7CCA60CDF9A2600472EA2 /* CIF.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9EC0CDB900E00472EA2 /* CIF.m */; };
-                89D7CCA70CDF9A2600472EA2 /* Coder.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9ED0CDB900E00472EA2 /* Coder.m */; };
-                89D7CCA80CDF9A2600472EA2 /* Function.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9EE0CDB900E00472EA2 /* Function.m */; };
-                89D7CCA90CDF9A2600472EA2 /* ID.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9EF0CDB900E00472EA2 /* ID.m */; };
-                89D7CCAA0CDF9A2600472EA2 /* JObjCRuntime.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9F00CDB900E00472EA2 /* JObjCRuntime.m */; };
-                89D7CCAB0CDF9A2600472EA2 /* MacOSXFramework.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9F10CDB900E00472EA2 /* MacOSXFramework.m */; };
-                89D7CCAC0CDF9A2600472EA2 /* NativeBuffer.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9F30CDB900E00472EA2 /* NativeBuffer.m */; };
-                89D7CCAD0CDF9A2600472EA2 /* NativeObjectLifecycleManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9F40CDB900E00472EA2 /* NativeObjectLifecycleManager.m */; };
-                89D7CCAE0CDF9A2600472EA2 /* NSClass.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9F50CDB900E00472EA2 /* NSClass.m */; };
-                89D7CCAF0CDF9A2600472EA2 /* SEL.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7C9F60CDB900E00472EA2 /* SEL.m */; };
-                89D7CCB10CDF9A2600472EA2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 890FBACC0C6F782C00902C32 /* Foundation.framework */; };
-                89D7CCB20CDF9A2600472EA2 /* JavaVM.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 890FBACA0C6F781000902C32 /* JavaVM.framework */; };
-                89D7CCB30CDF9A2600472EA2 /* JavaNativeFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 896D90BB0CC2877C005625F5 /* JavaNativeFoundation.framework */; };
-                89D7CCB40CDF9A2600472EA2 /* libffi.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 89E437680C97A7F200C756EE /* libffi.dylib */; };
-                89D7CCBB0CDF9AA200472EA2 /* NativeString.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7CCBA0CDF9AA200472EA2 /* NativeString.m */; };
-                89D7CCBD0CDF9AB100472EA2 /* NativeNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7CCBC0CDF9AB100472EA2 /* NativeNumber.m */; };
-                89D7CCBF0CDF9AC600472EA2 /* NativeThread.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D7CCBE0CDF9AC600472EA2 /* NativeThread.m */; };
-                C5742F6D0E316EFA00093838 /* Subclassing.m in Sources */ = {isa = PBXBuildFile; fileRef = C5742F6B0E316EFA00093838 /* Subclassing.m */; };
-                C5742F700E316F8600093838 /* Subclassing.m in Sources */ = {isa = PBXBuildFile; fileRef = C5742F6B0E316EFA00093838 /* Subclassing.m */; };
-                C5D196C90DF9E43C006F9FB9 /* FFIType.m in Sources */ = {isa = PBXBuildFile; fileRef = C5D196C80DF9E43C006F9FB9 /* FFIType.m */; };
-                C5D197D90DFB77C6006F9FB9 /* FFIType.m in Sources */ = {isa = PBXBuildFile; fileRef = C5D196C80DF9E43C006F9FB9 /* FFIType.m */; };
-                C5E4547B0E36729F0046D3E8 /* Invoke.m in Sources */ = {isa = PBXBuildFile; fileRef = C5E454790E36729F0046D3E8 /* Invoke.m */; };
-                C5E4547D0E367DAB0046D3E8 /* Invoke.m in Sources */ = {isa = PBXBuildFile; fileRef = C5E454790E36729F0046D3E8 /* Invoke.m */; };
-                C5F3B23D0E39948300B771AE /* FunCallBench.m in Sources */ = {isa = PBXBuildFile; fileRef = C5F3B1370E398F8E00B771AE /* FunCallBench.m */; };
-                C5F3B2620E3AB0F300B771AE /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5F3B2610E3AB0F300B771AE /* AppKit.framework */; };
-                C5F3B2640E3AB0F300B771AE /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C5F3B2630E3AB0F300B771AE /* Cocoa.framework */; };
-                C5F3B2650E3AB0F300B771AE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 890FBACC0C6F782C00902C32 /* Foundation.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXContainerItemProxy section */
-                2CC7556013A1322100B09D1B /* PBXContainerItemProxy */ = {
-                        isa = PBXContainerItemProxy;
-                        containerPortal = 00E6828EFEC88D1A11DB9C8B /* Project object */;
-                        proxyType = 1;
-                        remoteGlobalIDString = EB9FD8610AEECCF5008E157E;
-                        remoteInfo = "build-core-java";
-                };
-                2CC7556213A1322800B09D1B /* PBXContainerItemProxy */ = {
-                        isa = PBXContainerItemProxy;
-                        containerPortal = 00E6828EFEC88D1A11DB9C8B /* Project object */;
-                        proxyType = 1;
-                        remoteGlobalIDString = C5F3B1530E39927900B771AE;
-                        remoteInfo = "build-test-java";
-                };
-                2CC7556413A1323700B09D1B /* PBXContainerItemProxy */ = {
-                        isa = PBXContainerItemProxy;
-                        containerPortal = 00E6828EFEC88D1A11DB9C8B /* Project object */;
-                        proxyType = 1;
-                        remoteGlobalIDString = 89D7CA160CDBA94D00472EA2;
-                        remoteInfo = "build-generator-java";
-                };
-                2CC7556613A1324300B09D1B /* PBXContainerItemProxy */ = {
-                        isa = PBXContainerItemProxy;
-                        containerPortal = 00E6828EFEC88D1A11DB9C8B /* Project object */;
-                        proxyType = 1;
-                        remoteGlobalIDString = 89D7CC600CDE75EC00472EA2;
-                        remoteInfo = "build-additions-java";
-                };
-                2CC7556813A1325700B09D1B /* PBXContainerItemProxy */ = {
-                        isa = PBXContainerItemProxy;
-                        containerPortal = 00E6828EFEC88D1A11DB9C8B /* Project object */;
-                        proxyType = 1;
-                        remoteGlobalIDString = 89D7CB870CDC4ED000472EA2;
-                        remoteInfo = "run-generator";
-                };
-                2CC7556A13A132AF00B09D1B /* PBXContainerItemProxy */ = {
-                        isa = PBXContainerItemProxy;
-                        containerPortal = 00E6828EFEC88D1A11DB9C8B /* Project object */;
-                        proxyType = 1;
-                        remoteGlobalIDString = 4CEBA78E08679EF10015D03E;
-                        remoteInfo = "build-core-native";
-                };
-                2CC7556C13A132B200B09D1B /* PBXContainerItemProxy */ = {
-                        isa = PBXContainerItemProxy;
-                        containerPortal = 00E6828EFEC88D1A11DB9C8B /* Project object */;
-                        proxyType = 1;
-                        remoteGlobalIDString = EB9FD8610AEECCF5008E157E;
-                        remoteInfo = "build-core-java";
-                };
-                89D7CB9B0CDC64F800472EA2 /* PBXContainerItemProxy */ = {
-                        isa = PBXContainerItemProxy;
-                        containerPortal = 00E6828EFEC88D1A11DB9C8B /* Project object */;
-                        proxyType = 1;
-                        remoteGlobalIDString = 89D7CB870CDC4ED000472EA2;
-                        remoteInfo = "run-generator";
-                };
-                89D7CC910CDE7A8200472EA2 /* PBXContainerItemProxy */ = {
-                        isa = PBXContainerItemProxy;
-                        containerPortal = 00E6828EFEC88D1A11DB9C8B /* Project object */;
-                        proxyType = 1;
-                        remoteGlobalIDString = 89D7CC720CDE767500472EA2;
-                        remoteInfo = "assemble-product-java";
-                };
-                C592D6580E12F27400D076FF /* PBXContainerItemProxy */ = {
-                        isa = PBXContainerItemProxy;
-                        containerPortal = 00E6828EFEC88D1A11DB9C8B /* Project object */;
-                        proxyType = 1;
-                        remoteGlobalIDString = EB9FD8610AEECCF5008E157E;
-                        remoteInfo = "build-core-java";
-                };
-                C592D65A0E12F27600D076FF /* PBXContainerItemProxy */ = {
-                        isa = PBXContainerItemProxy;
-                        containerPortal = 00E6828EFEC88D1A11DB9C8B /* Project object */;
-                        proxyType = 1;
-                        remoteGlobalIDString = 4CEBA78E08679EF10015D03E;
-                        remoteInfo = "build-core-native";
-                };
-                C592D65C0E12F27E00D076FF /* PBXContainerItemProxy */ = {
-                        isa = PBXContainerItemProxy;
-                        containerPortal = 00E6828EFEC88D1A11DB9C8B /* Project object */;
-                        proxyType = 1;
-                        remoteGlobalIDString = 89D7CA160CDBA94D00472EA2;
-                        remoteInfo = "build-generator-java";
-                };
-                C592D65E0E12F28500D076FF /* PBXContainerItemProxy */ = {
-                        isa = PBXContainerItemProxy;
-                        containerPortal = 00E6828EFEC88D1A11DB9C8B /* Project object */;
-                        proxyType = 1;
-                        remoteGlobalIDString = 89D7CC4C0CDE4C0400472EA2;
-                        remoteInfo = "build-generated-java";
-                };
-                C592D6600E12F28E00D076FF /* PBXContainerItemProxy */ = {
-                        isa = PBXContainerItemProxy;
-                        containerPortal = 00E6828EFEC88D1A11DB9C8B /* Project object */;
-                        proxyType = 1;
-                        remoteGlobalIDString = 89D7CC600CDE75EC00472EA2;
-                        remoteInfo = "build-additions-java";
-                };
-                C592D6620E12F29200D076FF /* PBXContainerItemProxy */ = {
-                        isa = PBXContainerItemProxy;
-                        containerPortal = 00E6828EFEC88D1A11DB9C8B /* Project object */;
-                        proxyType = 1;
-                        remoteGlobalIDString = 89D7CCA20CDF9A2600472EA2;
-                        remoteInfo = "build-additions-native";
-                };
-                C5D197DA0DFB77E4006F9FB9 /* PBXContainerItemProxy */ = {
-                        isa = PBXContainerItemProxy;
-                        containerPortal = 00E6828EFEC88D1A11DB9C8B /* Project object */;
-                        proxyType = 1;
-                        remoteGlobalIDString = 4CEBA78E08679EF10015D03E;
-                        remoteInfo = "build-core-native";
-                };
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXFileReference section */
-                0AB364E40B2F671600788B6C /* src */ = {isa = PBXFileReference; lastKnownFileType = folder; path = src; sourceTree = "<group>"; };
-                890FBACA0C6F781000902C32 /* JavaVM.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaVM.framework; path = /System/Library/Frameworks/JavaVM.framework; sourceTree = "<absolute>"; };
-                890FBACC0C6F782C00902C32 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
-                896D90BB0CC2877C005625F5 /* JavaNativeFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaNativeFoundation.framework; path = /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework; sourceTree = "<absolute>"; };
-                896D91230CC2ED34005625F5 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.txt; sourceTree = "<group>"; };
-                89736E5F0CE819E5008C4205 /* JObjC.jar */ = {isa = PBXFileReference; lastKnownFileType = archive.jar; path = JObjC.jar; sourceTree = BUILT_PRODUCTS_DIR; };
-                89D7C9EC0CDB900E00472EA2 /* CIF.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CIF.m; sourceTree = "<group>"; };
-                89D7C9ED0CDB900E00472EA2 /* Coder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Coder.m; sourceTree = "<group>"; };
-                89D7C9EE0CDB900E00472EA2 /* Function.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Function.m; sourceTree = "<group>"; };
-                89D7C9EF0CDB900E00472EA2 /* ID.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ID.m; sourceTree = "<group>"; };
-                89D7C9F00CDB900E00472EA2 /* JObjCRuntime.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JObjCRuntime.m; sourceTree = "<group>"; };
-                89D7C9F10CDB900E00472EA2 /* MacOSXFramework.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MacOSXFramework.m; sourceTree = "<group>"; };
-                89D7C9F20CDB900E00472EA2 /* NativeBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeBuffer.h; sourceTree = "<group>"; };
-                89D7C9F30CDB900E00472EA2 /* NativeBuffer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NativeBuffer.m; sourceTree = "<group>"; };
-                89D7C9F40CDB900E00472EA2 /* NativeObjectLifecycleManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NativeObjectLifecycleManager.m; sourceTree = "<group>"; };
-                89D7C9F50CDB900E00472EA2 /* NSClass.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSClass.m; sourceTree = "<group>"; };
-                89D7C9F60CDB900E00472EA2 /* SEL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SEL.m; sourceTree = "<group>"; };
-                89D7CCB80CDF9A2600472EA2 /* libJObjC.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libJObjC.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
-                89D7CCBA0CDF9AA200472EA2 /* NativeString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NativeString.m; sourceTree = "<group>"; };
-                89D7CCBC0CDF9AB100472EA2 /* NativeNumber.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NativeNumber.m; sourceTree = "<group>"; };
-                89D7CCBE0CDF9AC600472EA2 /* NativeThread.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NativeThread.m; sourceTree = "<group>"; };
-                89E437680C97A7F200C756EE /* libffi.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libffi.dylib; path = /usr/lib/libffi.dylib; sourceTree = "<absolute>"; };
-                C5742F6B0E316EFA00093838 /* Subclassing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Subclassing.m; sourceTree = "<group>"; };
-                C5D196C80DF9E43C006F9FB9 /* FFIType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FFIType.m; sourceTree = "<group>"; };
-                C5E454790E36729F0046D3E8 /* Invoke.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Invoke.m; sourceTree = "<group>"; };
-                C5F3B1370E398F8E00B771AE /* FunCallBench.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FunCallBench.m; sourceTree = "<group>"; };
-                C5F3B1450E39910500B771AE /* libJObjC-tests.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libJObjC-tests.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
-                C5F3B2610E3AB0F300B771AE /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
-                C5F3B2630E3AB0F300B771AE /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
-                EB9FD8720AEECD83008E157E /* build.xml */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = build.xml; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-                4CEBA78D08679EF10015D03E /* Frameworks */ = {
-                        isa = PBXFrameworksBuildPhase;
-                        buildActionMask = 2147483647;
-                        files = (
-                                89D7CB770CDC4A6500472EA2 /* Foundation.framework in Frameworks */,
-                                89D7CB780CDC4A6500472EA2 /* JavaVM.framework in Frameworks */,
-                                89D7CB790CDC4A6500472EA2 /* JavaNativeFoundation.framework in Frameworks */,
-                                89D7CB7A0CDC4A6500472EA2 /* libffi.dylib in Frameworks */,
-                        );
-                        runOnlyForDeploymentPostprocessing = 0;
-                };
-                89D7CCB00CDF9A2600472EA2 /* Frameworks */ = {
-                        isa = PBXFrameworksBuildPhase;
-                        buildActionMask = 2147483647;
-                        files = (
-                                89D7CCB10CDF9A2600472EA2 /* Foundation.framework in Frameworks */,
-                                89D7CCB20CDF9A2600472EA2 /* JavaVM.framework in Frameworks */,
-                                89D7CCB30CDF9A2600472EA2 /* JavaNativeFoundation.framework in Frameworks */,
-                                89D7CCB40CDF9A2600472EA2 /* libffi.dylib in Frameworks */,
-                        );
-                        runOnlyForDeploymentPostprocessing = 0;
-                };
-                C5F3B1430E39910500B771AE /* Frameworks */ = {
-                        isa = PBXFrameworksBuildPhase;
-                        buildActionMask = 2147483647;
-                        files = (
-                                C5F3B2620E3AB0F300B771AE /* AppKit.framework in Frameworks */,
-                                C5F3B2640E3AB0F300B771AE /* Cocoa.framework in Frameworks */,
-                                C5F3B2650E3AB0F300B771AE /* Foundation.framework in Frameworks */,
-                        );
-                        runOnlyForDeploymentPostprocessing = 0;
-                };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-                00E6828FFEC88D1A11DB9C8B = {
-                        isa = PBXGroup;
-                        children = (
-                                896D91230CC2ED34005625F5 /* README.txt */,
-                                EB9FD8720AEECD83008E157E /* build.xml */,
-                                0AB364E40B2F671600788B6C /* src */,
-                                89D7C9EB0CDB900E00472EA2 /* native-core */,
-                                89D7CA020CDB902200472EA2 /* native-additions */,
-                                C5A9597F0E398F050057C96D /* native-tests */,
-                                89D7CA030CDB903000472EA2 /* products */,
-                                890FBAC90C6F77B700902C32 /* frameworks */,
-                                C5F3B1450E39910500B771AE /* libJObjC-tests.dylib */,
-                                C5F3B2610E3AB0F300B771AE /* AppKit.framework */,
-                                C5F3B2630E3AB0F300B771AE /* Cocoa.framework */,
-                        );
-                        sourceTree = "<group>";
-                };
-                890FBAC90C6F77B700902C32 /* frameworks */ = {
-                        isa = PBXGroup;
-                        children = (
-                                890FBACC0C6F782C00902C32 /* Foundation.framework */,
-                                890FBACA0C6F781000902C32 /* JavaVM.framework */,
-                                896D90BB0CC2877C005625F5 /* JavaNativeFoundation.framework */,
-                                89E437680C97A7F200C756EE /* libffi.dylib */,
-                        );
-                        name = frameworks;
-                        sourceTree = "<group>";
-                };
-                89D7C9EB0CDB900E00472EA2 /* native-core */ = {
-                        isa = PBXGroup;
-                        children = (
-                                89D7C9EC0CDB900E00472EA2 /* CIF.m */,
-                                89D7C9ED0CDB900E00472EA2 /* Coder.m */,
-                                C5D196C80DF9E43C006F9FB9 /* FFIType.m */,
-                                89D7C9EE0CDB900E00472EA2 /* Function.m */,
-                                89D7C9EF0CDB900E00472EA2 /* ID.m */,
-                                C5E454790E36729F0046D3E8 /* Invoke.m */,
-                                89D7C9F00CDB900E00472EA2 /* JObjCRuntime.m */,
-                                89D7C9F10CDB900E00472EA2 /* MacOSXFramework.m */,
-                                89D7C9F20CDB900E00472EA2 /* NativeBuffer.h */,
-                                89D7C9F30CDB900E00472EA2 /* NativeBuffer.m */,
-                                89D7C9F40CDB900E00472EA2 /* NativeObjectLifecycleManager.m */,
-                                89D7C9F50CDB900E00472EA2 /* NSClass.m */,
-                                89D7C9F60CDB900E00472EA2 /* SEL.m */,
-                                C5742F6B0E316EFA00093838 /* Subclassing.m */,
-                        );
-                        name = "native-core";
-                        path = src/core/native;
-                        sourceTree = "<group>";
-                };
-                89D7CA020CDB902200472EA2 /* native-additions */ = {
-                        isa = PBXGroup;
-                        children = (
-                                89D7CCBA0CDF9AA200472EA2 /* NativeString.m */,
-                                89D7CCBC0CDF9AB100472EA2 /* NativeNumber.m */,
-                                89D7CCBE0CDF9AC600472EA2 /* NativeThread.m */,
-                        );
-                        name = "native-additions";
-                        path = "src/runtime-additions/native";
-                        sourceTree = "<group>";
-                };
-                89D7CA030CDB903000472EA2 /* products */ = {
-                        isa = PBXGroup;
-                        children = (
-                                89736E5F0CE819E5008C4205 /* JObjC.jar */,
-                                89D7CCB80CDF9A2600472EA2 /* libJObjC.dylib */,
-                        );
-                        name = products;
-                        path = "src/runtime-additions/native";
-                        sourceTree = "<group>";
-                };
-                C5A9597F0E398F050057C96D /* native-tests */ = {
-                        isa = PBXGroup;
-                        children = (
-                                C5F3B1370E398F8E00B771AE /* FunCallBench.m */,
-                        );
-                        name = "native-tests";
-                        path = src/tests/native;
-                        sourceTree = "<group>";
-                };
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
-                4CEBA78B08679EF10015D03E /* Headers */ = {
-                        isa = PBXHeadersBuildPhase;
-                        buildActionMask = 2147483647;
-                        files = (
-                                89D7C9FD0CDB900E00472EA2 /* NativeBuffer.h in Headers */,
-                        );
-                        runOnlyForDeploymentPostprocessing = 0;
-                };
-                89D7CCA30CDF9A2600472EA2 /* Headers */ = {
-                        isa = PBXHeadersBuildPhase;
-                        buildActionMask = 2147483647;
-                        files = (
-                                89D7CCA40CDF9A2600472EA2 /* NativeBuffer.h in Headers */,
-                        );
-                        runOnlyForDeploymentPostprocessing = 0;
-                };
-                C5F3B1410E39910500B771AE /* Headers */ = {
-                        isa = PBXHeadersBuildPhase;
-                        buildActionMask = 2147483647;
-                        files = (
-                        );
-                        runOnlyForDeploymentPostprocessing = 0;
-                };
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXLegacyTarget section */
-                89D7CA160CDBA94D00472EA2 /* build-generator-java */ = {
-                        isa = PBXLegacyTarget;
-                        buildArgumentsString = "-verbose -emacs $ACTION";
-                        buildConfigurationList = 89D7CA1C0CDBA9B000472EA2 /* Build configuration list for PBXLegacyTarget "build-generator-java" */;
-                        buildPhases = (
-                        );
-                        buildToolPath = /usr/bin/ant;
-                        dependencies = (
-                                2CC7556D13A132B200B09D1B /* PBXTargetDependency */,
-                                2CC7556B13A132AF00B09D1B /* PBXTargetDependency */,
-                        );
-                        name = "build-generator-java";
-                        passBuildSettingsInEnvironment = 1;
-                        productName = "generator-build-java";
-                };
-                89D7CB870CDC4ED000472EA2 /* run-generator */ = {
-                        isa = PBXLegacyTarget;
-                        buildArgumentsString = "-verbose -emacs $ACTION";
-                        buildConfigurationList = 89D7CB8E0CDC4ED900472EA2 /* Build configuration list for PBXLegacyTarget "run-generator" */;
-                        buildPhases = (
-                        );
-                        buildToolPath = /usr/bin/ant;
-                        dependencies = (
-                                2CC7556513A1323700B09D1B /* PBXTargetDependency */,
-                        );
-                        name = "run-generator";
-                        passBuildSettingsInEnvironment = 1;
-                        productName = "run-generator";
-                };
-                89D7CC4C0CDE4C0400472EA2 /* build-generated-java */ = {
-                        isa = PBXLegacyTarget;
-                        buildArgumentsString = "-verbose -emacs $ACTION";
-                        buildConfigurationList = 89D7CC510CDE4C5200472EA2 /* Build configuration list for PBXLegacyTarget "build-generated-java" */;
-                        buildPhases = (
-                        );
-                        buildToolPath = /usr/bin/ant;
-                        dependencies = (
-                                2CC7556913A1325700B09D1B /* PBXTargetDependency */,
-                        );
-                        name = "build-generated-java";
-                        passBuildSettingsInEnvironment = 1;
-                        productName = "build-generated-java";
-                };
-                89D7CC600CDE75EC00472EA2 /* build-additions-java */ = {
-                        isa = PBXLegacyTarget;
-                        buildArgumentsString = "-verbose -emacs $ACTION";
-                        buildConfigurationList = 89D7CC630CDE762000472EA2 /* Build configuration list for PBXLegacyTarget "build-additions-java" */;
-                        buildPhases = (
-                        );
-                        buildToolPath = /usr/bin/ant;
-                        dependencies = (
-                        );
-                        name = "build-additions-java";
-                        passBuildSettingsInEnvironment = 1;
-                        productName = "build-additions-java";
-                };
-                89D7CC720CDE767500472EA2 /* assemble-product-java */ = {
-                        isa = PBXLegacyTarget;
-                        buildArgumentsString = "-verbose -emacs $ACTION";
-                        buildConfigurationList = 89D7CC7A0CDE76F500472EA2 /* Build configuration list for PBXLegacyTarget "assemble-product-java" */;
-                        buildPhases = (
-                        );
-                        buildToolPath = /usr/bin/ant;
-                        dependencies = (
-                        );
-                        name = "assemble-product-java";
-                        passBuildSettingsInEnvironment = 1;
-                        productName = "package-product";
-                };
-                C5F3B1530E39927900B771AE /* build-test-java */ = {
-                        isa = PBXLegacyTarget;
-                        buildArgumentsString = "-verbose -emacs $ACTION";
-                        buildConfigurationList = C5F3B15B0E3992AC00B771AE /* Build configuration list for PBXLegacyTarget "build-test-java" */;
-                        buildPhases = (
-                        );
-                        buildToolPath = /usr/bin/ant;
-                        dependencies = (
-                        );
-                        name = "build-test-java";
-                        passBuildSettingsInEnvironment = 1;
-                        productName = "build-test";
-                };
-                EB9FD8610AEECCF5008E157E /* build-core-java */ = {
-                        isa = PBXLegacyTarget;
-                        buildArgumentsString = "-verbose -emacs $ACTION";
-                        buildConfigurationList = EB9FD8690AEECD13008E157E /* Build configuration list for PBXLegacyTarget "build-core-java" */;
-                        buildPhases = (
-                        );
-                        buildToolPath = /usr/bin/ant;
-                        buildWorkingDirectory = "";
-                        dependencies = (
-                        );
-                        name = "build-core-java";
-                        passBuildSettingsInEnvironment = 1;
-                        productName = AntJNIWrapper;
-                };
-/* End PBXLegacyTarget section */
-
-/* Begin PBXNativeTarget section */
-                4CEBA78E08679EF10015D03E /* build-core-native */ = {
-                        isa = PBXNativeTarget;
-                        buildConfigurationList = 4CEBA79108679F100015D03E /* Build configuration list for PBXNativeTarget "build-core-native" */;
-                        buildPhases = (
-                                4CEBA78B08679EF10015D03E /* Headers */,
-                                4CEBA78C08679EF10015D03E /* Sources */,
-                                4CEBA78D08679EF10015D03E /* Frameworks */,
-                        );
-                        buildRules = (
-                        );
-                        dependencies = (
-                                2CC7556113A1322100B09D1B /* PBXTargetDependency */,
-                        );
-                        name = "build-core-native";
-                        productName = DylibN;
-                        productType = "com.apple.product-type.library.dynamic";
-                };
-                89D7CCA20CDF9A2600472EA2 /* build-additions-native */ = {
-                        isa = PBXNativeTarget;
-                        buildConfigurationList = 89D7CCB50CDF9A2600472EA2 /* Build configuration list for PBXNativeTarget "build-additions-native" */;
-                        buildPhases = (
-                                89D7CCA30CDF9A2600472EA2 /* Headers */,
-                                89D7CCA50CDF9A2600472EA2 /* Sources */,
-                                89D7CCB00CDF9A2600472EA2 /* Frameworks */,
-                        );
-                        buildRules = (
-                        );
-                        dependencies = (
-                                2CC7556713A1324300B09D1B /* PBXTargetDependency */,
-                                C5D197DB0DFB77E4006F9FB9 /* PBXTargetDependency */,
-                        );
-                        name = "build-additions-native";
-                        productName = DylibN;
-                        productReference = 89D7CCB80CDF9A2600472EA2 /* libJObjC.dylib */;
-                        productType = "com.apple.product-type.library.dynamic";
-                };
-                C5F3B1440E39910500B771AE /* build-test-native */ = {
-                        isa = PBXNativeTarget;
-                        buildConfigurationList = C5F3B1480E39917500B771AE /* Build configuration list for PBXNativeTarget "build-test-native" */;
-                        buildPhases = (
-                                C5F3B1410E39910500B771AE /* Headers */,
-                                C5F3B1420E39910500B771AE /* Sources */,
-                                C5F3B1430E39910500B771AE /* Frameworks */,
-                        );
-                        buildRules = (
-                        );
-                        dependencies = (
-                                2CC7556313A1322800B09D1B /* PBXTargetDependency */,
-                        );
-                        name = "build-test-native";
-                        productName = "build-tests-native";
-                        productReference = C5F3B1450E39910500B771AE /* libJObjC-tests.dylib */;
-                        productType = "com.apple.product-type.library.dynamic";
-                };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-                00E6828EFEC88D1A11DB9C8B /* Project object */ = {
-                        isa = PBXProject;
-                        attributes = {
-                                LastUpgradeCheck = 0410;
-                        };
-                        buildConfigurationList = 4CEBA75C08679E4D0015D03E /* Build configuration list for PBXProject "JObjC" */;
-                        compatibilityVersion = "Xcode 3.0";
-                        developmentRegion = English;
-                        hasScannedForEncodings = 1;
-                        knownRegions = (
-                                English,
-                                Japanese,
-                                French,
-                                German,
-                        );
-                        mainGroup = 00E6828FFEC88D1A11DB9C8B;
-                        productRefGroup = 00E6828FFEC88D1A11DB9C8B;
-                        projectDirPath = "";
-                        projectRoot = "";
-                        targets = (
-                                89EBD58C0C95F43D000F04A0 /* B&I */,
-                                EB9FD8610AEECCF5008E157E /* build-core-java */,
-                                4CEBA78E08679EF10015D03E /* build-core-native */,
-                                89D7CA160CDBA94D00472EA2 /* build-generator-java */,
-                                89D7CB870CDC4ED000472EA2 /* run-generator */,
-                                89D7CC4C0CDE4C0400472EA2 /* build-generated-java */,
-                                89D7CC600CDE75EC00472EA2 /* build-additions-java */,
-                                89D7CCA20CDF9A2600472EA2 /* build-additions-native */,
-                                89D7CC720CDE767500472EA2 /* assemble-product-java */,
-                                C5F3B1530E39927900B771AE /* build-test-java */,
-                                C5F3B1440E39910500B771AE /* build-test-native */,
-                        );
-                };
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
-                4CEBA78C08679EF10015D03E /* Sources */ = {
-                        isa = PBXSourcesBuildPhase;
-                        buildActionMask = 2147483647;
-                        files = (
-                                C5E4547B0E36729F0046D3E8 /* Invoke.m in Sources */,
-                                C5742F6D0E316EFA00093838 /* Subclassing.m in Sources */,
-                                89D7C9F70CDB900E00472EA2 /* CIF.m in Sources */,
-                                89D7C9F80CDB900E00472EA2 /* Coder.m in Sources */,
-                                89D7C9F90CDB900E00472EA2 /* Function.m in Sources */,
-                                89D7C9FA0CDB900E00472EA2 /* ID.m in Sources */,
-                                89D7C9FB0CDB900E00472EA2 /* JObjCRuntime.m in Sources */,
-                                89D7C9FC0CDB900E00472EA2 /* MacOSXFramework.m in Sources */,
-                                89D7C9FE0CDB900E00472EA2 /* NativeBuffer.m in Sources */,
-                                89D7C9FF0CDB900E00472EA2 /* NativeObjectLifecycleManager.m in Sources */,
-                                89D7CA000CDB900E00472EA2 /* NSClass.m in Sources */,
-                                89D7CA010CDB900E00472EA2 /* SEL.m in Sources */,
-                                C5D196C90DF9E43C006F9FB9 /* FFIType.m in Sources */,
-                        );
-                        runOnlyForDeploymentPostprocessing = 0;
-                };
-                89D7CCA50CDF9A2600472EA2 /* Sources */ = {
-                        isa = PBXSourcesBuildPhase;
-                        buildActionMask = 2147483647;
-                        files = (
-                                C5E4547D0E367DAB0046D3E8 /* Invoke.m in Sources */,
-                                C5742F700E316F8600093838 /* Subclassing.m in Sources */,
-                                89D7CCA60CDF9A2600472EA2 /* CIF.m in Sources */,
-                                89D7CCA70CDF9A2600472EA2 /* Coder.m in Sources */,
-                                89D7CCA80CDF9A2600472EA2 /* Function.m in Sources */,
-                                89D7CCA90CDF9A2600472EA2 /* ID.m in Sources */,
-                                89D7CCAA0CDF9A2600472EA2 /* JObjCRuntime.m in Sources */,
-                                89D7CCAB0CDF9A2600472EA2 /* MacOSXFramework.m in Sources */,
-                                89D7CCAC0CDF9A2600472EA2 /* NativeBuffer.m in Sources */,
-                                89D7CCAD0CDF9A2600472EA2 /* NativeObjectLifecycleManager.m in Sources */,
-                                89D7CCAE0CDF9A2600472EA2 /* NSClass.m in Sources */,
-                                89D7CCAF0CDF9A2600472EA2 /* SEL.m in Sources */,
-                                89D7CCBB0CDF9AA200472EA2 /* NativeString.m in Sources */,
-                                89D7CCBD0CDF9AB100472EA2 /* NativeNumber.m in Sources */,
-                                89D7CCBF0CDF9AC600472EA2 /* NativeThread.m in Sources */,
-                                C5D197D90DFB77C6006F9FB9 /* FFIType.m in Sources */,
-                        );
-                        runOnlyForDeploymentPostprocessing = 0;
-                };
-                C5F3B1420E39910500B771AE /* Sources */ = {
-                        isa = PBXSourcesBuildPhase;
-                        buildActionMask = 2147483647;
-                        files = (
-                                C5F3B23D0E39948300B771AE /* FunCallBench.m in Sources */,
-                        );
-                        runOnlyForDeploymentPostprocessing = 0;
-                };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXTargetDependency section */
-                2CC7556113A1322100B09D1B /* PBXTargetDependency */ = {
-                        isa = PBXTargetDependency;
-                        target = EB9FD8610AEECCF5008E157E /* build-core-java */;
-                        targetProxy = 2CC7556013A1322100B09D1B /* PBXContainerItemProxy */;
-                };
-                2CC7556313A1322800B09D1B /* PBXTargetDependency */ = {
-                        isa = PBXTargetDependency;
-                        target = C5F3B1530E39927900B771AE /* build-test-java */;
-                        targetProxy = 2CC7556213A1322800B09D1B /* PBXContainerItemProxy */;
-                };
-                2CC7556513A1323700B09D1B /* PBXTargetDependency */ = {
-                        isa = PBXTargetDependency;
-                        target = 89D7CA160CDBA94D00472EA2 /* build-generator-java */;
-                        targetProxy = 2CC7556413A1323700B09D1B /* PBXContainerItemProxy */;
-                };
-                2CC7556713A1324300B09D1B /* PBXTargetDependency */ = {
-                        isa = PBXTargetDependency;
-                        target = 89D7CC600CDE75EC00472EA2 /* build-additions-java */;
-                        targetProxy = 2CC7556613A1324300B09D1B /* PBXContainerItemProxy */;
-                };
-                2CC7556913A1325700B09D1B /* PBXTargetDependency */ = {
-                        isa = PBXTargetDependency;
-                        target = 89D7CB870CDC4ED000472EA2 /* run-generator */;
-                        targetProxy = 2CC7556813A1325700B09D1B /* PBXContainerItemProxy */;
-                };
-                2CC7556B13A132AF00B09D1B /* PBXTargetDependency */ = {
-                        isa = PBXTargetDependency;
-                        target = 4CEBA78E08679EF10015D03E /* build-core-native */;
-                        targetProxy = 2CC7556A13A132AF00B09D1B /* PBXContainerItemProxy */;
-                };
-                2CC7556D13A132B200B09D1B /* PBXTargetDependency */ = {
-                        isa = PBXTargetDependency;
-                        target = EB9FD8610AEECCF5008E157E /* build-core-java */;
-                        targetProxy = 2CC7556C13A132B200B09D1B /* PBXContainerItemProxy */;
-                };
-                89D7CB9C0CDC64F800472EA2 /* PBXTargetDependency */ = {
-                        isa = PBXTargetDependency;
-                        target = 89D7CB870CDC4ED000472EA2 /* run-generator */;
-                        targetProxy = 89D7CB9B0CDC64F800472EA2 /* PBXContainerItemProxy */;
-                };
-                89D7CC920CDE7A8200472EA2 /* PBXTargetDependency */ = {
-                        isa = PBXTargetDependency;
-                        target = 89D7CC720CDE767500472EA2 /* assemble-product-java */;
-                        targetProxy = 89D7CC910CDE7A8200472EA2 /* PBXContainerItemProxy */;
-                };
-                C592D6590E12F27400D076FF /* PBXTargetDependency */ = {
-                        isa = PBXTargetDependency;
-                        target = EB9FD8610AEECCF5008E157E /* build-core-java */;
-                        targetProxy = C592D6580E12F27400D076FF /* PBXContainerItemProxy */;
-                };
-                C592D65B0E12F27600D076FF /* PBXTargetDependency */ = {
-                        isa = PBXTargetDependency;
-                        target = 4CEBA78E08679EF10015D03E /* build-core-native */;
-                        targetProxy = C592D65A0E12F27600D076FF /* PBXContainerItemProxy */;
-                };
-                C592D65D0E12F27E00D076FF /* PBXTargetDependency */ = {
-                        isa = PBXTargetDependency;
-                        target = 89D7CA160CDBA94D00472EA2 /* build-generator-java */;
-                        targetProxy = C592D65C0E12F27E00D076FF /* PBXContainerItemProxy */;
-                };
-                C592D65F0E12F28500D076FF /* PBXTargetDependency */ = {
-                        isa = PBXTargetDependency;
-                        target = 89D7CC4C0CDE4C0400472EA2 /* build-generated-java */;
-                        targetProxy = C592D65E0E12F28500D076FF /* PBXContainerItemProxy */;
-                };
-                C592D6610E12F28E00D076FF /* PBXTargetDependency */ = {
-                        isa = PBXTargetDependency;
-                        target = 89D7CC600CDE75EC00472EA2 /* build-additions-java */;
-                        targetProxy = C592D6600E12F28E00D076FF /* PBXContainerItemProxy */;
-                };
-                C592D6630E12F29200D076FF /* PBXTargetDependency */ = {
-                        isa = PBXTargetDependency;
-                        target = 89D7CCA20CDF9A2600472EA2 /* build-additions-native */;
-                        targetProxy = C592D6620E12F29200D076FF /* PBXContainerItemProxy */;
-                };
-                C5D197DB0DFB77E4006F9FB9 /* PBXTargetDependency */ = {
-                        isa = PBXTargetDependency;
-                        target = 4CEBA78E08679EF10015D03E /* build-core-native */;
-                        targetProxy = C5D197DA0DFB77E4006F9FB9 /* PBXContainerItemProxy */;
-                };
-/* End PBXTargetDependency section */
-
-/* Begin XCBuildConfiguration section */
-                4CEBA75D08679E4D0015D03E /* Debug */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                ARCHS = (
-                                        "$(NATIVE_ARCH_32_BIT)",
-                                        "$(NATIVE_ARCH_64_BIT)",
-                                );
-                                GCC_ENABLE_OBJC_GC = supported;
-                                SYMROOT = build;
-                        };
-                        name = Debug;
-                };
-                4CEBA75E08679E4D0015D03E /* Release */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                GCC_ENABLE_OBJC_GC = supported;
-                                INSTALL_PATH = /System/Library/Java/Extensions;
-                        };
-                        name = Release;
-                };
-                4CEBA79208679F100015D03E /* Debug */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                ARCHS = (
-                                        "$(NATIVE_ARCH_32_BIT)",
-                                        "$(NATIVE_ARCH_64_BIT)",
-                                );
-                                COPY_PHASE_STRIP = NO;
-                                DYLIB_COMPATIBILITY_VERSION = 1;
-                                DYLIB_CURRENT_VERSION = 1;
-                                EXECUTABLE_EXTENSION = dylib;
-                                EXECUTABLE_PREFIX = lib;
-                                FRAMEWORK_SEARCH_PATHS = (
-                                        "$(inherited)",
-                                        "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
-                                );
-                                FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaVM.framework/Versions/A/Frameworks\"";
-                                FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaVM.framework/Versions/A/Frameworks\"";
-                                GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-                                GCC_MODEL_TUNING = G5;
-                                GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
-                                GCC_TREAT_NONCONFORMANT_CODE_ERRORS_AS_WARNINGS = YES;
-                                GCC_TREAT_WARNINGS_AS_ERRORS = YES;
-                                GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-                                GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
-                                GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-                                GCC_WARN_ABOUT_RETURN_TYPE = YES;
-                                GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
-                                GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = YES;
-                                GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
-                                GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
-                                GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
-                                GCC_WARN_MISSING_PARENTHESES = YES;
-                                GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
-                                GCC_WARN_PEDANTIC = NO;
-                                GCC_WARN_PROTOTYPE_CONVERSION = NO;
-                                GCC_WARN_SHADOW = YES;
-                                GCC_WARN_SIGN_COMPARE = YES;
-                                GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES;
-                                GCC_WARN_UNINITIALIZED_AUTOS = YES;
-                                GCC_WARN_UNKNOWN_PRAGMAS = YES;
-                                GCC_WARN_UNUSED_FUNCTION = YES;
-                                GCC_WARN_UNUSED_VARIABLE = YES;
-                                HEADER_SEARCH_PATHS = (
-                                        "$(HEADER_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
-                                        /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers,
-                                );
-                                HEADER_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/src/jni_headers/core\" \"$(OBJROOT)/src/jni_headers/core\"";
-                                LIBRARY_SEARCH_PATHS = (
-                                        "$(inherited)",
-                                        "$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
-                                );
-                                LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaVM.framework/Versions/1.5.0/Libraries\"";
-                                LIBRARY_STYLE = DYNAMIC;
-                                MACH_O_TYPE = mh_dylib;
-                                OTHER_LDFLAGS = "";
-                                OTHER_REZFLAGS = "";
-                                PRODUCT_NAME = JObjC;
-                                SECTORDER_FLAGS = "";
-                                VALID_ARCHS = "ppc7400 ppc970 i386 x86_64 ppc";
-                                WARNING_CFLAGS = (
-                                        "-Wmost",
-                                        "-Wno-four-char-constants",
-                                        "-Wno-unknown-pragmas",
-                                        "-Wformat",
-                                        "-Wformat-security",
-                                        "-Wcast-align",
-                                        "-Wwrite-strings",
-                                        "-Wuninitialized",
-                                        "-Wshadow",
-                                        "-Wshorten-64-to-32",
-                                        "-Wsign-compare",
-                                        "-Wpointer-arith",
-                                        "-Wall",
-                                );
-                                ZERO_LINK = NO;
-                        };
-                        name = Debug;
-                };
-                4CEBA79308679F100015D03E /* Release */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                ARCHS = (
-                                        i386,
-                                        ppc,
-                                        x86_64,
-                                );
-                                COPY_PHASE_STRIP = YES;
-                                DYLIB_COMPATIBILITY_VERSION = 1;
-                                DYLIB_CURRENT_VERSION = 1;
-                                EXECUTABLE_EXTENSION = dylib;
-                                EXECUTABLE_PREFIX = lib;
-                                FRAMEWORK_SEARCH_PATHS = (
-                                        "$(inherited)",
-                                        "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
-                                );
-                                FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaVM.framework/Versions/A/Frameworks\"";
-                                FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaVM.framework/Versions/A/Frameworks\"";
-                                GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-                                GCC_MODEL_TUNING = G5;
-                                GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
-                                GCC_TREAT_NONCONFORMANT_CODE_ERRORS_AS_WARNINGS = YES;
-                                GCC_TREAT_WARNINGS_AS_ERRORS = YES;
-                                GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-                                GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
-                                GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-                                GCC_WARN_ABOUT_RETURN_TYPE = YES;
-                                GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
-                                GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = YES;
-                                GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
-                                GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
-                                GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
-                                GCC_WARN_MISSING_PARENTHESES = YES;
-                                GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
-                                GCC_WARN_PEDANTIC = NO;
-                                GCC_WARN_PROTOTYPE_CONVERSION = NO;
-                                GCC_WARN_SHADOW = YES;
-                                GCC_WARN_SIGN_COMPARE = YES;
-                                GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES;
-                                GCC_WARN_UNINITIALIZED_AUTOS = YES;
-                                GCC_WARN_UNKNOWN_PRAGMAS = YES;
-                                GCC_WARN_UNUSED_FUNCTION = YES;
-                                GCC_WARN_UNUSED_VARIABLE = YES;
-                                HEADER_SEARCH_PATHS = (
-                                        "$(HEADER_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
-                                        /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers,
-                                );
-                                HEADER_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/src/jni_headers/core\" \"$(OBJROOT)/src/jni_headers/core\"";
-                                LIBRARY_SEARCH_PATHS = (
-                                        "$(inherited)",
-                                        "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
-                                );
-                                LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaVM.framework/Versions/1.5.0/Libraries\"";
-                                LIBRARY_STYLE = DYNAMIC;
-                                MACH_O_TYPE = mh_dylib;
-                                OTHER_LDFLAGS = "";
-                                OTHER_REZFLAGS = "";
-                                PRODUCT_NAME = JObjC;
-                                SECTORDER_FLAGS = "";
-                                VALID_ARCHS = "ppc7400 ppc970 i386 x86_64 ppc";
-                                WARNING_CFLAGS = (
-                                        "-Wmost",
-                                        "-Wno-four-char-constants",
-                                        "-Wno-unknown-pragmas",
-                                        "-Wformat",
-                                        "-Wformat-security",
-                                        "-Wcast-align",
-                                        "-Wwrite-strings",
-                                        "-Wuninitialized",
-                                        "-Wshadow",
-                                        "-Wshorten-64-to-32",
-                                        "-Wsign-compare",
-                                        "-Wpointer-arith",
-                                        "-Wall",
-                                );
-                                ZERO_LINK = NO;
-                        };
-                        name = Release;
-                };
-                89D7CA170CDBA94D00472EA2 /* Debug */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                COPY_PHASE_STRIP = NO;
-                                GCC_DYNAMIC_NO_PIC = NO;
-                                GCC_OPTIMIZATION_LEVEL = 0;
-                                PRODUCT_NAME = "build-generator";
-                        };
-                        name = Debug;
-                };
-                89D7CA180CDBA94D00472EA2 /* Release */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                COPY_PHASE_STRIP = YES;
-                                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-                                PRODUCT_NAME = "build-generator";
-                                ZERO_LINK = NO;
-                        };
-                        name = Release;
-                };
-                89D7CB880CDC4ED000472EA2 /* Debug */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                COPY_PHASE_STRIP = NO;
-                                GCC_DYNAMIC_NO_PIC = NO;
-                                GCC_OPTIMIZATION_LEVEL = "\U00010";
-                                PRODUCT_NAME = "run-generator";
-                        };
-                        name = Debug;
-                };
-                89D7CB890CDC4ED000472EA2 /* Release */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                COPY_PHASE_STRIP = YES;
-                                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-                                PRODUCT_NAME = "run-generator";
-                                ZERO_LINK = NO;
-                        };
-                        name = Release;
-                };
-                89D7CC4D0CDE4C0400472EA2 /* Debug */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                COPY_PHASE_STRIP = NO;
-                                GCC_DYNAMIC_NO_PIC = NO;
-                                GCC_OPTIMIZATION_LEVEL = 0;
-                                PRODUCT_NAME = "build-generated";
-                        };
-                        name = Debug;
-                };
-                89D7CC4E0CDE4C0400472EA2 /* Release */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                COPY_PHASE_STRIP = YES;
-                                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-                                PRODUCT_NAME = "build-generated";
-                                ZERO_LINK = NO;
-                        };
-                        name = Release;
-                };
-                89D7CC610CDE75EC00472EA2 /* Debug */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                COPY_PHASE_STRIP = NO;
-                                GCC_DYNAMIC_NO_PIC = NO;
-                                GCC_OPTIMIZATION_LEVEL = 0;
-                                PRODUCT_NAME = "build-additions";
-                        };
-                        name = Debug;
-                };
-                89D7CC620CDE75EC00472EA2 /* Release */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                COPY_PHASE_STRIP = YES;
-                                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-                                PRODUCT_NAME = "build-additions";
-                                ZERO_LINK = NO;
-                        };
-                        name = Release;
-                };
-                89D7CC730CDE767500472EA2 /* Debug */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                COPY_PHASE_STRIP = NO;
-                                GCC_DYNAMIC_NO_PIC = NO;
-                                GCC_OPTIMIZATION_LEVEL = 0;
-                                PRODUCT_NAME = "assemble-product";
-                        };
-                        name = Debug;
-                };
-                89D7CC740CDE767500472EA2 /* Release */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                COPY_PHASE_STRIP = YES;
-                                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-                                PRODUCT_NAME = "assemble-product";
-                                ZERO_LINK = NO;
-                        };
-                        name = Release;
-                };
-                89D7CCB60CDF9A2600472EA2 /* Debug */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                ARCHS = (
-                                        "$(NATIVE_ARCH_32_BIT)",
-                                        "$(NATIVE_ARCH_64_BIT)",
-                                );
-                                COPY_PHASE_STRIP = NO;
-                                DYLIB_COMPATIBILITY_VERSION = 1;
-                                DYLIB_CURRENT_VERSION = 1;
-                                EXECUTABLE_EXTENSION = dylib;
-                                EXECUTABLE_PREFIX = lib;
-                                FRAMEWORK_SEARCH_PATHS = (
-                                        "$(inherited)",
-                                        "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
-                                );
-                                FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaVM.framework/Versions/A/Frameworks\"";
-                                FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaVM.framework/Versions/A/Frameworks\"";
-                                GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-                                GCC_MODEL_TUNING = G5;
-                                GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
-                                GCC_TREAT_NONCONFORMANT_CODE_ERRORS_AS_WARNINGS = YES;
-                                GCC_TREAT_WARNINGS_AS_ERRORS = NO;
-                                GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-                                GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
-                                GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-                                GCC_WARN_ABOUT_RETURN_TYPE = YES;
-                                GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
-                                GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = YES;
-                                GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
-                                GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
-                                GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
-                                GCC_WARN_MISSING_PARENTHESES = YES;
-                                GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
-                                GCC_WARN_PEDANTIC = NO;
-                                GCC_WARN_PROTOTYPE_CONVERSION = NO;
-                                GCC_WARN_SHADOW = YES;
-                                GCC_WARN_SIGN_COMPARE = YES;
-                                GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES;
-                                GCC_WARN_UNINITIALIZED_AUTOS = YES;
-                                GCC_WARN_UNKNOWN_PRAGMAS = YES;
-                                GCC_WARN_UNUSED_FUNCTION = YES;
-                                GCC_WARN_UNUSED_VARIABLE = YES;
-                                HEADER_SEARCH_PATHS = (
-                                        "$(HEADER_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
-                                        "$(HEADER_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
-                                        /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers,
-                                );
-                                HEADER_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/src/jni_headers/core\" \"$(OBJROOT)/src/jni_headers/core\"";
-                                HEADER_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/src/jni_headers/additions\" \"$(OBJROOT)/src/jni_headers/additions\"";
-                                INSTALL_PATH = /usr/local/lib;
-                                LIBRARY_SEARCH_PATHS = (
-                                        "$(inherited)",
-                                        "$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
-                                );
-                                LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaVM.framework/Versions/1.5.0/Libraries\"";
-                                LIBRARY_STYLE = DYNAMIC;
-                                MACH_O_TYPE = mh_dylib;
-                                OTHER_LDFLAGS = "";
-                                OTHER_REZFLAGS = "";
-                                PRODUCT_NAME = JObjC;
-                                SECTORDER_FLAGS = "";
-                                VALID_ARCHS = "ppc7400 ppc970 i386 x86_64 ppc";
-                                WARNING_CFLAGS = (
-                                        "-Wmost",
-                                        "-Wno-four-char-constants",
-                                        "-Wno-unknown-pragmas",
-                                        "-Wformat",
-                                        "-Wformat-security",
-                                        "-Wcast-align",
-                                        "-Wwrite-strings",
-                                        "-Wuninitialized",
-                                        "-Wshadow",
-                                        "-Wshorten-64-to-32",
-                                        "-Wsign-compare",
-                                        "-Wpointer-arith",
-                                        "-Wall",
-                                );
-                                ZERO_LINK = NO;
-                        };
-                        name = Debug;
-                };
-                89D7CCB70CDF9A2600472EA2 /* Release */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                ARCHS = (
-                                        x86_64,
-                                        ppc,
-                                        i386,
-                                );
-                                COPY_PHASE_STRIP = YES;
-                                DYLIB_COMPATIBILITY_VERSION = 1;
-                                DYLIB_CURRENT_VERSION = 1;
-                                EXECUTABLE_EXTENSION = dylib;
-                                EXECUTABLE_PREFIX = lib;
-                                FRAMEWORK_SEARCH_PATHS = (
-                                        "$(inherited)",
-                                        "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
-                                );
-                                FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaVM.framework/Versions/A/Frameworks\"";
-                                FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaVM.framework/Versions/A/Frameworks\"";
-                                GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-                                GCC_MODEL_TUNING = G5;
-                                GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
-                                GCC_TREAT_NONCONFORMANT_CODE_ERRORS_AS_WARNINGS = YES;
-                                GCC_TREAT_WARNINGS_AS_ERRORS = NO;
-                                GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-                                GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
-                                GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-                                GCC_WARN_ABOUT_RETURN_TYPE = YES;
-                                GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
-                                GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = YES;
-                                GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
-                                GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
-                                GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
-                                GCC_WARN_MISSING_PARENTHESES = YES;
-                                GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
-                                GCC_WARN_PEDANTIC = NO;
-                                GCC_WARN_PROTOTYPE_CONVERSION = NO;
-                                GCC_WARN_SHADOW = YES;
-                                GCC_WARN_SIGN_COMPARE = YES;
-                                GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES;
-                                GCC_WARN_UNINITIALIZED_AUTOS = YES;
-                                GCC_WARN_UNKNOWN_PRAGMAS = YES;
-                                GCC_WARN_UNUSED_FUNCTION = YES;
-                                GCC_WARN_UNUSED_VARIABLE = YES;
-                                HEADER_SEARCH_PATHS = (
-                                        "$(HEADER_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
-                                        "$(HEADER_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
-                                        /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers,
-                                );
-                                HEADER_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/src/jni_headers/core\"  \"$(OBJROOT)/src/jni_headers/core\"";
-                                HEADER_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/src/jni_headers/additions\"  \"$(OBJROOT)/src/jni_headers/additions\"";
-                                LIBRARY_SEARCH_PATHS = (
-                                        "$(inherited)",
-                                        "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
-                                );
-                                LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaVM.framework/Versions/1.5.0/Libraries\"";
-                                LIBRARY_STYLE = DYNAMIC;
-                                MACH_O_TYPE = mh_dylib;
-                                OTHER_LDFLAGS = "";
-                                OTHER_REZFLAGS = "";
-                                PRODUCT_NAME = JObjC;
-                                SECTORDER_FLAGS = "";
-                                VALID_ARCHS = "ppc7400 ppc970 i386 x86_64 ppc";
-                                WARNING_CFLAGS = (
-                                        "-Wmost",
-                                        "-Wno-four-char-constants",
-                                        "-Wno-unknown-pragmas",
-                                        "-Wformat",
-                                        "-Wformat-security",
-                                        "-Wcast-align",
-                                        "-Wwrite-strings",
-                                        "-Wuninitialized",
-                                        "-Wshadow",
-                                        "-Wshorten-64-to-32",
-                                        "-Wsign-compare",
-                                        "-Wpointer-arith",
-                                        "-Wall",
-                                );
-                                ZERO_LINK = NO;
-                        };
-                        name = Release;
-                };
-                89EBD58D0C95F43D000F04A0 /* Debug */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                COPY_PHASE_STRIP = NO;
-                                GCC_DYNAMIC_NO_PIC = NO;
-                                GCC_OPTIMIZATION_LEVEL = 0;
-                                PRODUCT_NAME = "B&I";
-                        };
-                        name = Debug;
-                };
-                89EBD58E0C95F43D000F04A0 /* Release */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                COPY_PHASE_STRIP = YES;
-                                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-                                PRODUCT_NAME = "B&I";
-                                ZERO_LINK = NO;
-                        };
-                        name = Release;
-                };
-                C5F3B1460E39910500B771AE /* Debug */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                ALWAYS_SEARCH_USER_PATHS = YES;
-                                ARCHS = (
-                                        x86_64,
-                                        i386,
-                                        ppc,
-                                );
-                                COPY_PHASE_STRIP = NO;
-                                DEBUG_INFORMATION_FORMAT = dwarf;
-                                EXECUTABLE_EXTENSION = dylib;
-                                EXECUTABLE_PREFIX = lib;
-                                FRAMEWORK_SEARCH_PATHS = (
-                                        "$(inherited)",
-                                        "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
-                                );
-                                FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaVM.framework/Versions/A/Frameworks\"";
-                                FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaVM.framework/Versions/A/Frameworks\"";
-                                GCC_DYNAMIC_NO_PIC = NO;
-                                GCC_MODEL_TUNING = G5;
-                                GCC_OPTIMIZATION_LEVEL = 0;
-                                HEADER_SEARCH_PATHS = (
-                                        "$(HEADER_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
-                                        "$(HEADER_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
-                                        /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers,
-                                        "\"$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/src/jni_headers/core\"",
-                                        "\"$(OBJROOT)/src/jni_headers/core\"",
-                                        "\"$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/src/jni_headers/additions\"",
-                                        "\"$(OBJROOT)/src/jni_headers/additions\"",
-                                        "\"$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/src/jni_headers/test\"",
-                                        "\"$(OBJROOT)/src/jni_headers/test\"",
-                                );
-                                INSTALL_PATH = /usr/local/lib;
-                                LIBRARY_STYLE = DYNAMIC;
-                                MACH_O_TYPE = mh_dylib;
-                                PRODUCT_NAME = "JObjC-tests";
-                                SKIP_INSTALL = YES;
-                        };
-                        name = Debug;
-                };
-                C5F3B1470E39910500B771AE /* Release */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                ALWAYS_SEARCH_USER_PATHS = YES;
-                                ARCHS = (
-                                        x86_64,
-                                        i386,
-                                        ppc,
-                                );
-                                COPY_PHASE_STRIP = YES;
-                                DEBUG_INFORMATION_FORMAT = dwarf;
-                                EXECUTABLE_EXTENSION = dylib;
-                                EXECUTABLE_PREFIX = lib;
-                                FRAMEWORK_SEARCH_PATHS = (
-                                        "$(inherited)",
-                                        "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
-                                );
-                                FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaVM.framework/Versions/A/Frameworks\"";
-                                FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaVM.framework/Versions/A/Frameworks\"";
-                                GCC_MODEL_TUNING = G5;
-                                HEADER_SEARCH_PATHS = (
-                                        "$(HEADER_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
-                                        "$(HEADER_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
-                                        /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers,
-                                        "\"$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/src/jni_headers/core\"",
-                                        "\"$(OBJROOT)/src/jni_headers/core\"",
-                                        "\"$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/src/jni_headers/additions\"",
-                                        "\"$(OBJROOT)/src/jni_headers/additions\"",
-                                        "\"$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/src/jni_headers/test\"",
-                                        "\"$(OBJROOT)/src/jni_headers/test\"",
-                                );
-                                INSTALL_PATH = /usr/local/lib;
-                                LIBRARY_STYLE = DYNAMIC;
-                                MACH_O_TYPE = mh_dylib;
-                                PRODUCT_NAME = "JObjC-tests";
-                                SKIP_INSTALL = YES;
-                                ZERO_LINK = NO;
-                        };
-                        name = Release;
-                };
-                C5F3B1540E39927A00B771AE /* Debug */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                COPY_PHASE_STRIP = NO;
-                                GCC_DYNAMIC_NO_PIC = NO;
-                                GCC_OPTIMIZATION_LEVEL = 0;
-                                PRODUCT_NAME = "build-test";
-                        };
-                        name = Debug;
-                };
-                C5F3B1550E39927A00B771AE /* Release */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                COPY_PHASE_STRIP = YES;
-                                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-                                PRODUCT_NAME = "build-test";
-                                ZERO_LINK = NO;
-                        };
-                        name = Release;
-                };
-                EB9FD86A0AEECD13008E157E /* Debug */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                COPY_PHASE_STRIP = NO;
-                                GCC_DYNAMIC_NO_PIC = NO;
-                                GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-                                GCC_OPTIMIZATION_LEVEL = 0;
-                                PRODUCT_NAME = "build-core";
-                        };
-                        name = Debug;
-                };
-                EB9FD86B0AEECD13008E157E /* Release */ = {
-                        isa = XCBuildConfiguration;
-                        buildSettings = {
-                                COPY_PHASE_STRIP = YES;
-                                GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-                                PRODUCT_NAME = "build-core";
-                                ZERO_LINK = NO;
-                        };
-                        name = Release;
-                };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-                4CEBA75C08679E4D0015D03E /* Build configuration list for PBXProject "JObjC" */ = {
-                        isa = XCConfigurationList;
-                        buildConfigurations = (
-                                4CEBA75D08679E4D0015D03E /* Debug */,
-                                4CEBA75E08679E4D0015D03E /* Release */,
-                        );
-                        defaultConfigurationIsVisible = 0;
-                        defaultConfigurationName = Release;
-                };
-                4CEBA79108679F100015D03E /* Build configuration list for PBXNativeTarget "build-core-native" */ = {
-                        isa = XCConfigurationList;
-                        buildConfigurations = (
-                                4CEBA79208679F100015D03E /* Debug */,
-                                4CEBA79308679F100015D03E /* Release */,
-                        );
-                        defaultConfigurationIsVisible = 0;
-                        defaultConfigurationName = Release;
-                };
-                89D7CA1C0CDBA9B000472EA2 /* Build configuration list for PBXLegacyTarget "build-generator-java" */ = {
-                        isa = XCConfigurationList;
-                        buildConfigurations = (
-                                89D7CA170CDBA94D00472EA2 /* Debug */,
-                                89D7CA180CDBA94D00472EA2 /* Release */,
-                        );
-                        defaultConfigurationIsVisible = 0;
-                        defaultConfigurationName = Release;
-                };
-                89D7CB8E0CDC4ED900472EA2 /* Build configuration list for PBXLegacyTarget "run-generator" */ = {
-                        isa = XCConfigurationList;
-                        buildConfigurations = (
-                                89D7CB880CDC4ED000472EA2 /* Debug */,
-                                89D7CB890CDC4ED000472EA2 /* Release */,
-                        );
-                        defaultConfigurationIsVisible = 0;
-                        defaultConfigurationName = Release;
-                };
-                89D7CC510CDE4C5200472EA2 /* Build configuration list for PBXLegacyTarget "build-generated-java" */ = {
-                        isa = XCConfigurationList;
-                        buildConfigurations = (
-                                89D7CC4D0CDE4C0400472EA2 /* Debug */,
-                                89D7CC4E0CDE4C0400472EA2 /* Release */,
-                        );
-                        defaultConfigurationIsVisible = 0;
-                        defaultConfigurationName = Release;
-                };
-                89D7CC630CDE762000472EA2 /* Build configuration list for PBXLegacyTarget "build-additions-java" */ = {
-                        isa = XCConfigurationList;
-                        buildConfigurations = (
-                                89D7CC610CDE75EC00472EA2 /* Debug */,
-                                89D7CC620CDE75EC00472EA2 /* Release */,
-                        );
-                        defaultConfigurationIsVisible = 0;
-                        defaultConfigurationName = Release;
-                };
-                89D7CC7A0CDE76F500472EA2 /* Build configuration list for PBXLegacyTarget "assemble-product-java" */ = {
-                        isa = XCConfigurationList;
-                        buildConfigurations = (
-                                89D7CC730CDE767500472EA2 /* Debug */,
-                                89D7CC740CDE767500472EA2 /* Release */,
-                        );
-                        defaultConfigurationIsVisible = 0;
-                        defaultConfigurationName = Release;
-                };
-                89D7CCB50CDF9A2600472EA2 /* Build configuration list for PBXNativeTarget "build-additions-native" */ = {
-                        isa = XCConfigurationList;
-                        buildConfigurations = (
-                                89D7CCB60CDF9A2600472EA2 /* Debug */,
-                                89D7CCB70CDF9A2600472EA2 /* Release */,
-                        );
-                        defaultConfigurationIsVisible = 0;
-                        defaultConfigurationName = Release;
-                };
-                89EBD5930C95F44E000F04A0 /* Build configuration list for PBXAggregateTarget "B&I" */ = {
-                        isa = XCConfigurationList;
-                        buildConfigurations = (
-                                89EBD58D0C95F43D000F04A0 /* Debug */,
-                                89EBD58E0C95F43D000F04A0 /* Release */,
-                        );
-                        defaultConfigurationIsVisible = 0;
-                        defaultConfigurationName = Release;
-                };
-                C5F3B1480E39917500B771AE /* Build configuration list for PBXNativeTarget "build-test-native" */ = {
-                        isa = XCConfigurationList;
-                        buildConfigurations = (
-                                C5F3B1460E39910500B771AE /* Debug */,
-                                C5F3B1470E39910500B771AE /* Release */,
-                        );
-                        defaultConfigurationIsVisible = 0;
-                        defaultConfigurationName = Release;
-                };
-                C5F3B15B0E3992AC00B771AE /* Build configuration list for PBXLegacyTarget "build-test-java" */ = {
-                        isa = XCConfigurationList;
-                        buildConfigurations = (
-                                C5F3B1540E39927A00B771AE /* Debug */,
-                                C5F3B1550E39927A00B771AE /* Release */,
-                        );
-                        defaultConfigurationIsVisible = 0;
-                        defaultConfigurationName = Release;
-                };
-                EB9FD8690AEECD13008E157E /* Build configuration list for PBXLegacyTarget "build-core-java" */ = {
-                        isa = XCConfigurationList;
-                        buildConfigurations = (
-                                EB9FD86A0AEECD13008E157E /* Debug */,
-                                EB9FD86B0AEECD13008E157E /* Release */,
-                        );
-                        defaultConfigurationIsVisible = 0;
-                        defaultConfigurationName = Release;
-                };
-/* End XCConfigurationList section */
-        };
-        rootObject = 00E6828EFEC88D1A11DB9C8B /* Project object */;
-}
--- a/src/macosx/native/jobjc/README.txt	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-#title JObjC
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-JObjC core provides a pure Java interface for calling C functions and
-sending ObjC messages. Given some information, it can marshal types
-automatically.
-
-It also parses BridgeSupport to generate Java wrappers around
-Framework bundles. These wrappers rely on the core to provide access
-to the C constants, enums, structs, functions, ObjC classes, etc of a
-framework.
-
-* How to build it
-
-Your best option is `ant all`. There's an Xcode "B&I" target that
-works for buildit.
-
-You'll need a recent JavaNativeFoundation, and perhaps some other
-things. Everything is usually there on SnowLeopard (or Leopard after
-the common ~javabuild/bin/update runs).
-
-The build process is quite involved. Xcode takes care of the native
-parts, ant takes care of the Java parts, and there's an unholy mix of
-external targets and hidden dependencies that keep Xcode and ant (and
-buildit on top of that) from stepping on each other. So a warning: the
-ant and Xcode targets don't have proper dependencies set up because of
-this. They have some dependencies configured, but not the entire
-chain. This is because of the jumping back and forth between
-externals. If you run the aggregate targets (Xcode B&I, ant all, ant
-test, ant bench), everything's is good. But if you manually invoke
-individual targets, chances are you'll miss something. Let's go over
-it all step by step:
-
-** ant gen-pcoder
-
-The PrimitiveCoder subclasses have a lot of boiler plate which
-simplifies the generated MixedPrimitiveCoder classes. So instead of
-maintaining it, I maintain a tiny Haskell script that spits out the
-Java code. This ant target runs that script if Haskell is available on
-the system. If it isn't available, this will silently fail. That's
-okay, because chances are the PrimitiveCoder.java that you got from
-svn is current and does not need to be updated.
-
-** ant build-core / Xcode build-core-java
-
-Build core simply builds the JObjC core java classes, and also
-generates headers for the JNI for Xcode.
-
-** ant build-core-native / Xcode build-core-native
-
-Xcode builds the native core, using the headers from the Java core. It
-generates libJObjC.dylib.
-
-** ant build-generator / Xcode build-generator-java
-
-ant builds the generator.
-
-** ant run-generator / Xcode run-generator
-
-ant runs the generator, using the core Java and native classes.
-
-What is rungen? And what's run-generator-old? run-generator-old is the
-preferred way to run the generator from ant, but there's a strange bug
-when running from buildit that causes run-generator-old to
-freeze. Pratik was helping me debug it, inspecting the stack and
-snooping dtrace probes, but we never found the reason for the
-block. So I figured that maybe if I just add a layer of indirection
-maybe it'll work around that. And it did. Sad but true.
-
-** ant build-generated / Xcode build-generated-java
-
-Build the generator output.
-
-** ant build-additions / Xcode build-additions-java
-
-Builds java additions.
-
-** ant build-additions-native / Xcode build-additions-native
-
-This builds a new version of libJObjC.dylib. It will rebuild
-everything from the core, and include everything from additions.
-
-** ant assemble-product / Xcode assemble-product-java
-
-Create a jar, copy products to destination, etc.
-
-* How to test it
-
-The test cases also contain a Java component and a native component,
-and are built similarly to the above. The benchmarks are built
-together with the tests. So "ant build-test" and "ant
-build-test-native" will build both the benchmarks and the test. "ant
-test" will run the test. "ant bench" will run benchmarks. If you only
-want to run a specific benchmark, you can pass a regexp in the
-environment variable BENCH_MATCH.
-
-<src>
-ant test
-ant bench
-BENCH_MATCH=Foo ant bench
-</src>
-
-Test and bench reports will end up in
-build/JObjC.build/Debug/test-reports/
-
-* How to use it
-
-Include the jar in your classpath and set your java.library.path to
-the directory that contains the dylib. Same thing for app bundles.
--- a/src/macosx/native/jobjc/TODOS	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-#
-egrep "(TODO|FIXME|XXX|HACK)" -r src
--- a/src/macosx/native/jobjc/bridgesupport.gmk	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# makefile for generating a stable set of bridgesupport files that change timestamp
-# only when the bridgesupport data actually changes
-
-FRAMEWORKS_DIR = /System/Library/Frameworks
-GBM = /usr/bin/gen_bridge_metadata
-GEN_HEADERS = $(addsuffix .headers,$(FRAMEWORKS))
-GEN_BRIDGESUPPORT = $(addsuffix .bridgesupport,$(FRAMEWORKS))
-
-%.bridgesupport : %.headers $(FRAMEWORKS_DIR)/%.framework/Headers/*.h
-	@echo "generating bridge support for" $<
-	if [ -f $(FRAMEWORKS_DIR)/$(<:.headers=.framework)/Resources/BridgeSupport/$(<:.headers=Full.bridgesupport) ] ; \
-	  then cp $(FRAMEWORKS_DIR)/$(<:.headers=.framework)/Resources/BridgeSupport/$(<:.headers=Full.bridgesupport) $@ ; \
-	  else $(GBM) -F complete --framework $(<:.headers=.framework) -o $@ ; \
-	fi
-	if cmp -s $@ $(STABLE_GEN_DIR)/$(@:.bridgesupport=Full.bridgesupport) ; \
-	  then : ; \
-	  else cp $@ $(STABLE_GEN_DIR)/$(@:.bridgesupport=Full.bridgesupport) ; \
-	fi
-
-%.headers : $(FRAMEWORKS_DIR)/%.framework/Headers
-	@echo linking $<
-	ln -s $< $@
-
-$(STABLE_GEN_DIR):
-	mkdir -p $(STABLE_GEN_DIR)
-
-$(GEN_BRIDGESUPPORT): $(GEN_HEADERS) $(STABLE_GEN_DIR)
-
-all: $(GEN_BRIDGESUPPORT)
--- a/src/macosx/native/jobjc/build.xml	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,520 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-#
--->
-<project name="JObjC" default="install" basedir=".">
-  <property environment="env"/>
-  <echoproperties/>
-
-  <target name="installhdrs">
-    <echo>Nothing to do for install-headers build phase</echo>
-  </target>
-
-  <target name="installsrc">
-    <echo>Nothing to do for install-source build phase</echo>
-  </target>
-
-  <property name="redirection-target-defined" value="${env.PRODUCT_NAME}"/>
-
-  <target name="install" description="Redirects to the target specified in $PRODUCT_NAME">
-    <fail unless="env.PRODUCT_NAME" status="-1">
-      This Ant build file depends on the native Xcode project to invoke
-      targets by defining $PRODUCT_NAME to specify the target.
-    </fail>
-
-    <echo>--- Redirecting to target "${env.PRODUCT_NAME}"</echo>
-    <antcall target="${env.PRODUCT_NAME}"/>
-  </target>
-
-  <property name="compile.debug" value="true"/>
-
-  <!-- building from the command line / xcode b&i -->
-  <condition property="src" value="." else="${env.SRCROOT}">
-    <not><isset property="env.SRCROOT"/></not>
-  </condition>
-
-  <condition property="cfg" value="Debug" else="${env.CONFIGURATION}">
-    <not><isset property="env.CONFIGURATION"/></not>
-  </condition>
-
-  <condition property="obj" value="build/JObjC.build/${cfg}" else="${env.OBJROOT}">
-    <not><isset property="env.OBJROOT"/></not>
-  </condition>
-
-  <condition property="dst" value="build/${cfg}" else="${env.DSTROOT}/${cfg}">
-    <not><isset property="env.DSTROOT"/></not>
-  </condition>
-
-  <condition property="ARCHS" value="ppc i386 x86_64" else="${env.RC_ARCHS}">
-    <not><isset property="env.RC_ARCHS"/></not>
-  </condition>
-
-  <!-- -/- -->
-
-  <property name="bin" location="${obj}/bin"/>
-  <property name="gendoc" location="${obj}/doc"/>
-
-  <condition property="nativelib.dir" value="${dst}">
-    <not><isset property="env.CONFIGURATION_BUILD_DIR"/></not>
-  </condition>
-  <condition property="nativelib.dir" value="${env.CONFIGURATION_BUILD_DIR}">
-    <isset property="env.CONFIGURATION_BUILD_DIR"/>
-  </condition>
-  <property name="nativelib.file" location="${nativelib.dir}/libJObjC.dylib" />
-
-  <property name="jniheaders" location="${obj}/src/jni_headers"/>
-
-  <property name="core.src" location="${src}/src/core/java"/>
-  <property name="core.bin" location="${bin}/core"/>
-  <property name="core.jniheaders" location="${jniheaders}/core"/>
-  <property name="core.nativelib.dir" location="${nativelib.dir}"/>
-
-  <property name="generator.src" location="${src}/src/generator/java"/>
-  <property name="generator.bin" location="${bin}/generator"/>
-
-  <property name="generated.src" location="${obj}/src/jobjc"/>
-  <property name="generated.bin" location="${bin}/generated"/>
-
-  <property name="additions.src" location="${src}/src/runtime-additions"/>
-  <property name="additions.bin" location="${bin}/additions"/>
-  <property name="additions.jniheaders" location="${jniheaders}/additions"/>
-  <property name="additions.nativelib.dir" location="${nativelib.dir}"/>
-
-  <property name="test.src" location="${src}/src/tests/java"/>
-  <property name="test.bin" location="${bin}/test"/>
-  <property name="test.jniheaders" location="${jniheaders}/test"/>
-  <property name="test.reports" location="${obj}/test-reports"/>
-
-  <condition property="product.target_path"
-             value="/System/Library/Java/Extensions"
-             else="${env.INSTALL_PATH}">
-    <not><isset property="env.INSTALL_PATH"/></not>
-  </condition>
-
-  <echo message="(Settings :src '${src}' :cfg '${cfg}' :obj '${obj}' :dst '${dst}')"/>
-
-  <path id="test.lib.path.id">
-    <fileset dir="/usr/share/java">
-      <include name="**/*.jar"/>
-    </fileset>
-  </path>
-
-  <property name="product.jarfile.dir" location="${obj}"/>
-  <property name="product.jarfile.name" value="JObjC.jar"/>
-  <property name="product.jarfile" location="${product.jarfile.dir}/${product.jarfile.name}"/>
-
-  <target name="gen-pcoder" description="Generate PrimitiveCoder.java">
-    <exec executable="ruby" failonerror="true">
-      <arg value="${src}/run-and-write-if-okay"/>
-      <arg value="${src}/src/core/PrimitiveCoder.hs"/>
-      <arg value="${src}/src/core/java/com/apple/jobjc/PrimitiveCoder.java"/>
-    </exec>
-  </target>
-
-  <target name="build-core" depends="gen-pcoder" description="Compile the core runtime classes">
-    <mkdir dir="${core.bin}" />
-    <!-- Compile PrimitiveCoder first to work around javac bug. -->
-    <javac srcdir="${core.src}" destdir="${core.bin}" source="1.5" target="1.5" debug="${compile.debug}"
-           includes="**/PrimitiveCoder.java"
-           includeantruntime="false">
-      <classpath>
-        <path location="${obj}/../langtools/dist/lib/classes.jar"/>
-      </classpath>
-    </javac>
-    <javac srcdir="${core.src}" destdir="${core.bin}" source="1.5" target="1.5" debug="${compile.debug}" includeantruntime="false">
-      <classpath>
-        <path location="${obj}/../langtools/dist/lib/classes.jar"/>
-      </classpath>
-    </javac>
-
-    <exec executable="/usr/bin/perl" outputproperty="core.classes" failonerror="true">
-      <arg value="${src}/extract_classes.pl"/>
-      <arg path="${core.bin}"/>
-    </exec>
-
-    <mkdir dir="${core.jniheaders}" />
-    <javah destdir="${core.jniheaders}" class="${core.classes}">
-      <classpath path="${core.bin}"/>
-    </javah>
-  </target>
-
-  <target name="build-core-native" depends="build-core">
-    <exec executable="xcodebuild" failonerror="true">
-      <env key="CC" value=""/>
-      <env key="CXX" value=""/>
-      <arg value="-configuration"/>
-      <arg value="${cfg}"/>
-      <arg value="-target"/>
-      <arg value="build-core-native"/>
-      <arg value="SRCROOT=${src}"/>
-      <arg value="OBJROOT=${obj}"/>
-      <arg value="DSTROOT=${dst}"/>
-      <arg value="TARGET_TEMP_DIR=${env.DSTROOT}"/>
-      <arg value="PROJECT_TEMP_DIR=${env.DSTROOT}"/>
-      <arg value="BUILD_DIR=${env.DSTROOT}"/>
-    </exec>
-  </target>
-
-  <!-- macosx jdk 7 puts jobjc core classes on the bootclasspath by default -->
-  <target name="build-generator" description="Compile and assemble the generator">
-    <mkdir dir="${generator.bin}"/>
-    <javac srcdir="${generator.src}" destdir="${generator.bin}" source="1.5" target="1.5" debug="${compile.debug}" includeantruntime="false">
-      <compilerarg value="-version"/>
-      <compilerarg value="-Xbootclasspath/p:${core.bin}"/>
-    </javac>
-  </target>
-
-  <!-- Use this indirection hack to work around buildit lockup when
-  running the generator. -->
-  <target name="run-generator" depends="build-generator" description="Invoke the assembled generator">
-    <mkdir dir="${generated.src}"/>
-    <exec executable="ruby" failonerror="true">
-      <arg value="${src}/rungen"/>
-      <arg value="install"/>
-      <arg value="${product.jarfile.name}"/>
-      <arg value="${nativelib.dir}"/>
-      <arg value="${obj}"/>
-      <arg value="${ARCHS}"/>
-      <arg value="${env.STABLE_GEN_DIR}"/>
-    </exec>
-  </target>
-
-  <target name="run-generator-old" depends="build-generator" description="Invoke the assembled generator">
-    <mkdir dir="${generated.src}"/>
-    <java classname="com.apple.internal.jobjc.generator.Generator" fork="true" failonerror="true">
-      <jvmarg value="-Xms128m" />
-      <jvmarg value="-Xmx512m" />
-      <assertions><enable/></assertions>
-      <classpath>
-        <path location="${core.bin}"/>
-        <path location="${generator.bin}"/>
-      </classpath>
-      <sysproperty key="java.library.path" value="${core.nativelib.dir}"/>
-      <arg value="dst=${generated.src}"/>
-    </java>
-  </target>
-
-  <target name="build-generated" description="Build and assemble the JObjC core and all generated frameworks">
-    <mkdir dir="${generated.bin}"/>
-    <javac srcdir="${generated.src}" destdir="${generated.bin}" source="1.5" target="1.5" fork="yes" memoryMaximumSize="512m" debug="${compile.debug}" includeantruntime="false">
-      <classpath>
-        <path location="${core.bin}"/>
-      </classpath>
-      <compilerarg value="-version"/>
-    </javac>
-  </target>
-
-  <target name="build-additions" depends="build-generated">
-    <mkdir dir="${additions.bin}"/>
-    <javac srcdir="${additions.src}" destdir="${additions.bin}" source="1.5" target="1.5" debug="${compile.debug}" includeantruntime="false">
-      <classpath>
-        <path location="${core.bin}"/>
-        <path location="${generated.bin}"/>
-      </classpath>
-      <compilerarg value="-version"/>
-    </javac>
-
-    <exec executable="/usr/bin/perl" outputproperty="additions.classes" failonerror="true">
-      <arg value="${src}/extract_classes.pl"/>
-      <arg path="${additions.bin}"/>
-    </exec>
-
-    <mkdir dir="${additions.jniheaders}"/>
-    <javah destdir="${additions.jniheaders}" class="${additions.classes}">
-      <classpath>
-        <path location="${core.bin}"/>
-        <path location="${generated.bin}"/>
-        <path location="${additions.bin}"/>
-      </classpath>
-    </javah>
-  </target>
-
-  <target name="build-additions-native">
-    <exec executable="xcodebuild" failonerror="true">
-      <env key="CC" value=""/>
-      <env key="CXX" value=""/>
-      <arg value="-configuration"/>
-      <arg value="${cfg}"/>
-      <arg value="-target"/>
-      <arg value="build-additions-native"/>
-      <arg value="SRCROOT=${src}"/>
-      <arg value="OBJROOT=${obj}"/>
-      <arg value="DSTROOT=${dst}"/>
-      <arg value="TARGET_TEMP_DIR=${env.DSTROOT}"/>
-      <arg value="PROJECT_TEMP_DIR=${env.DSTROOT}"/>
-      <arg value="BUILD_DIR=${env.DSTROOT}"/>
-    </exec>
-  </target>
-
-  <target name="assemble-product">
-    <mkdir dir="${product.jarfile.dir}"/>
-    <jar jarfile="${product.jarfile}" level="9" index="true">
-      <fileset dir="${core.bin}"/>
-      <fileset dir="${generated.bin}"/>
-      <fileset dir="${additions.bin}"/>
-    </jar>
-
-    <mkdir dir="${dst}/${product.target_path}"/>
-    <copy file="${product.jarfile}" toDir="${dst}/${product.target_path}" failonerror="true" verbose="true"/>
-    <copy file="${nativelib.file}" toDir="${dst}/${product.target_path}" failonerror="true" verbose="true"/>
-  </target>
-
-  <target name="doc-core">
-    <mkdir dir="${gendoc}"/>
-    <javadoc destdir="${gendoc}" access="protected">
-      <fileset dir="${src}/src" includes="**/*.java"/>
-    </javadoc>
-  </target>
-
-  <target name="build-test" description="compile unit tests">
-    <mkdir dir="${test.bin}"/>
-    <javac srcdir="${test.src}" destdir="${test.bin}" debug="false" includeantruntime="false">
-      <classpath>
-        <pathelement location="${core.bin}"/>
-        <pathelement location="${generator.bin}"/>
-        <pathelement location="${generated.bin}"/>
-        <pathelement location="${additions.bin}"/>
-      </classpath>
-      <classpath refid="test.lib.path.id"/>
-      <compilerarg value="-version"/>
-    </javac>
-
-    <exec executable="/usr/bin/perl" outputproperty="test.classes" failonerror="true">
-      <arg value="${src}/extract_classes.pl"/>
-      <arg path="${test.bin}"/>
-    </exec>
-
-    <mkdir dir="${test.jniheaders}"/>
-    <javah destdir="${test.jniheaders}" class="${test.classes}">
-      <classpath>
-        <path location="${core.bin}"/>
-        <path location="${generated.bin}"/>
-        <path location="${additions.bin}"/>
-        <path location="${test.bin}"/>
-      </classpath>
-      <classpath refid="test.lib.path.id"/>
-    </javah>
-  </target>
-
-  <target name="build-test-installed" description="compile unit tests">
-    <mkdir dir="${test.bin}"/>
-    <javac srcdir="${test.src}" destdir="${test.bin}" debug="false" includeantruntime="false">
-      <compilerarg value="-verbose"/>
-      <classpath>
-        <pathelement location="${generator.bin}"/>
-        <pathelement location="${generated.bin}"/>
-        <pathelement location="${additions.bin}"/>
-      </classpath>
-      <classpath refid="test.lib.path.id"/>
-      <compilerarg value="-version"/>
-    </javac>
-
-    <exec executable="/usr/bin/perl" outputproperty="test.classes" failonerror="true">
-      <arg value="${src}/extract_classes.pl"/>
-      <arg path="${test.bin}"/>
-    </exec>
-
-    <mkdir dir="${test.jniheaders}"/>
-    <javah destdir="${test.jniheaders}" class="${test.classes}">
-      <classpath>
-        <path location="${generated.bin}"/>
-        <path location="${additions.bin}"/>
-        <path location="${test.bin}"/>
-      </classpath>
-      <classpath refid="test.lib.path.id"/>
-    </javah>
-  </target>
-
-  <target name="build-test-native" depends="build-test">
-    <exec executable="xcodebuild" failonerror="true">
-      <env key="CC" value=""/>
-      <env key="CXX" value=""/>
-      <arg value="-configuration"/>
-      <arg value="${cfg}"/>
-      <arg value="-target"/>
-      <arg value="build-test-native"/>
-      <arg value="SRCROOT=${src}"/>
-      <arg value="OBJROOT=${obj}"/>
-      <arg value="DSTROOT=${dst}"/>
-      <arg value="TARGET_TEMP_DIR=${env.DSTROOT}"/>
-      <arg value="PROJECT_TEMP_DIR=${env.DSTROOT}"/>
-      <arg value="BUILD_DIR=${env.DSTROOT}"/>
-    </exec>
-  </target>
-
-  <target name="build-test-native-installed" depends="build-test-installed">
-    <exec executable="xcodebuild" failonerror="true">
-      <env key="CC" value=""/>
-      <env key="CXX" value=""/>
-      <arg value="-configuration"/>
-      <arg value="${cfg}"/>
-      <arg value="-target"/>
-      <arg value="build-test-native"/>
-      <arg value="SRCROOT=${src}"/>
-      <arg value="OBJROOT=${obj}"/>
-      <arg value="DSTROOT=${dst}"/>
-      <arg value="TARGET_TEMP_DIR=${env.DSTROOT}"/>
-      <arg value="PROJECT_TEMP_DIR=${env.DSTROOT}"/>
-      <arg value="BUILD_DIR=${env.DSTROOT}"/>
-    </exec>
-  </target>
-
-  <target name="test" depends="build-test-native" description="run unit tests">
-    <mkdir dir="${test.reports}"/>
-    <junit fork="yes" printsummary="yes">
-      <assertions>
-        <enable/>
-      </assertions>
-      <jvmarg value="-server" />
-
-      <sysproperty key="java.library.path" value="${nativelib.dir}" />
-      <classpath>
-        <pathelement location="${core.bin}"/>
-        <pathelement location="${generator.bin}"/>
-        <pathelement location="${generated.bin}"/>
-        <pathelement location="${additions.bin}"/>
-        <pathelement location="${test.bin}"/>
-      </classpath>
-      <classpath refid="test.lib.path.id"/>
-
-      <formatter type="plain"/>
-
-      <batchtest fork="yes" todir="${test.reports}">
-        <fileset dir="${test.src}">
-          <include name="**/*Test.java"/>
-          <exclude name="**/AllTests.java"/>
-        </fileset>
-      </batchtest>
-    </junit>
-  </target>
-
-  <target name="test-installed" depends="build-test-native-installed" description="run unit tests">
-    <mkdir dir="${test.reports}"/>
-    <junit fork="yes" printsummary="yes">
-      <assertions>
-        <enable/>
-      </assertions>
-      <jvmarg value="-server" />
-
-      <sysproperty key="java.library.path" value="${nativelib.dir}" />
-      <classpath>
-        <pathelement location="${generator.bin}"/>
-        <pathelement location="${generated.bin}"/>
-        <pathelement location="${additions.bin}"/>
-        <pathelement location="${test.bin}"/>
-      </classpath>
-      <classpath refid="test.lib.path.id"/>
-
-      <formatter type="plain"/>
-
-      <batchtest fork="yes" todir="${test.reports}">
-        <fileset dir="${test.src}">
-          <include name="**/*Test.java"/>
-          <exclude name="**/AllTests.java"/>
-        </fileset>
-      </batchtest>
-    </junit>
-  </target>
-
-
-  <condition property="bench_match" value="*" else="${env.BENCH_MATCH}">
-    <not><isset property="env.BENCH_MATCH"/></not>
-  </condition>
-
-  <target name="bench" depends="build-test-native" description="run benchmarks">
-    <mkdir dir="${test.reports}"/>
-    <junit fork="yes" printsummary="yes">
-      <sysproperty key="java.library.path" value="${nativelib.dir}" />
-      <classpath>
-        <pathelement location="${core.bin}"/>
-        <pathelement location="${generator.bin}"/>
-        <pathelement location="${generated.bin}"/>
-        <pathelement location="${additions.bin}"/>
-        <pathelement location="${test.bin}"/>
-      </classpath>
-      <classpath refid="test.lib.path.id"/>
-
-      <jvmarg value="-Xms256m" />
-      <jvmarg value="-Xmx1024m" />
-      <jvmarg value="-server" />
-
-      <formatter type="plain"/>
-
-      <batchtest fork="yes" todir="${test.reports}">
-        <fileset dir="${test.src}">
-          <include name="**/Bench*${bench_match}*.java"/>
-        </fileset>
-      </batchtest>
-    </junit>
-  </target>
-
-  <target name="bench-installed" depends="build-test-native-installed" description="run benchmarks">
-    <mkdir dir="${test.reports}"/>
-    <junit fork="yes" printsummary="yes">
-      <sysproperty key="java.library.path" value="${nativelib.dir}" />
-      <classpath>
-        <pathelement location="${generator.bin}"/>
-        <pathelement location="${generated.bin}"/>
-        <pathelement location="${additions.bin}"/>
-        <pathelement location="${test.bin}"/>
-      </classpath>
-      <classpath refid="test.lib.path.id"/>
-
-      <jvmarg value="-Xms256m" />
-      <jvmarg value="-Xmx1024m" />
-      <jvmarg value="-server" />
-
-      <formatter type="plain"/>
-
-      <batchtest fork="yes" todir="${test.reports}">
-        <fileset dir="${test.src}">
-          <include name="**/Bench*${bench_match}*.java"/>
-        </fileset>
-      </batchtest>
-    </junit>
-  </target>
-
-  <target name="clean">
-    <delete dir="build"/>
-    <delete dir="${obj}"/>
-    <delete dir="${dst}"/>
-    <delete dir="${gendoc}"/>
-    <delete dir="${test.reports}"/>
-  </target>
-
-
-  <target name="clean-all" depends="clean,build-core,build-core-native,build-generator,run-generator,build-generated,build-additions,build-additions-native,assemble-product">
-  </target>
-  <target name="all" depends="build-core,build-core-native,build-generator,run-generator,build-generated,build-additions,build-additions-native,assemble-product">
-  </target>
-  <target name="all-test" depends="build-core,build-core-native,build-generator,run-generator,build-generated,build-additions,build-additions-native,assemble-product,test-installed">
-  </target>
-  <target name="clean-all-test" depends="clean,build-core,build-core-native,build-generator,run-generator,build-generated,build-additions,build-additions-native,assemble-product,test-installed">
-  </target>
-  <target name="all-but-gen" depends="clean,build-core,build-core-native,build-generator,build-generated,build-additions,build-additions-native,assemble-product">
-  </target>
-</project>
--- a/src/macosx/native/jobjc/extract_classes.pl	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#!/usr/bin/perl
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-##
-
-$file_dir = $ARGV[0];
-@file_list = qx("/usr/bin/find" "$file_dir");
-
-foreach $file (@file_list) {
-        if ($file =~ s/\.class//) {
-            if ($file !~ s/\$[0-9]//) {
-                $file =~ s/$file_dir\///g;
-                $file =~ s/\//\./g;
-                chomp($file);
-                print "$file,";
-            }
-        }
-}
--- a/src/macosx/native/jobjc/run-and-write-if-okay	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-#!/usr/bin/env ruby
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-#
-
-if ARGV.length < 2
-  puts <<EOF
-Expects two args: EXEC and OUTPATH. First, it runs and prints
-`EXEC 2>&1`. If it returns successfully, it writes the output to OUTPATH.
-This script will return successfully unless writing the output fails.
-EOF
-  exit
-end
-
-EXECPATH = ARGV[0]
-OUTPATH  = ARGV[1]
-
-output = `#{EXECPATH}`
-puts output
-
-if $?.to_i == 0
-  puts "Writing output of #{EXECPATH} to #{OUTPATH}"
-  File.open(OUTPATH, 'w') {|f| f.write(output) }
-else
-  puts "#{EXECPATH} failed to run trial. Ignoring."
-end
--- a/src/macosx/native/jobjc/rungen	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-#!/usr/bin/env ruby
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-#
-
-xcodeAction = ARGV[0]
-
-exit unless xcodeAction == "install"
-
-JOBJC_JAR = ARGV[1]
-LIBPATH = ARGV[2]
-OBJROOT = ARGV[3]
-ARCHS   = ARGV[4]
-STABLE_GEN_DIR = ARGV[5]
-
-ourJavaHome = ENV['JAVA_HOME']
-ourJavaVersion = `java -fullversion 2>&1`
-$stderr.puts "ENV['JAVA_HOME'] = #{ourJavaHome}"
-$stderr.puts "java -fullversion = #{ourJavaVersion}"
-
-$stderr.puts "jobjc_jar = #{JOBJC_JAR}"
-$stderr.puts "libpath = #{LIBPATH}"
-$stderr.puts "objroot = #{OBJROOT}"
-$stderr.puts "ARCHS   = #{ARCHS}"
-$stderr.puts "STABLE_GEN_DIR = #{STABLE_GEN_DIR}"
-
-jarch = if ARCHS =~ /x86_64/ then "-d64" else "-d32" end
-
-# compute the boot class path, but remove the JObjC jar file that may have been installed in the boot jdk
-
-bootclasspathcmd = "java -classpath #{OBJROOT}/bin/core:#{OBJROOT}/bin/generator com.apple.internal.jobjc.generator.BootClassPathMinus #{JOBJC_JAR}"
-$stderr.puts bootclasspathcmd
-bootclasspath = `#{bootclasspathcmd}`
-
-$stderr.puts "bootclasspath is: "
-$stderr.puts bootclasspath
-
-# we run the generator with our newly created JObjC.  The installed version (if available) has been removed from
-# the boot class path, so we are building with everything newly created.
-cmd = "java #{jarch} -Xms128m -Xmx512m -Djava.library.path=#{LIBPATH} -Xbootclasspath:#{bootclasspath.chomp} -classpath #{OBJROOT}/bin/core:#{OBJROOT}/bin/generator -ea com.apple.internal.jobjc.generator.Generator dst=#{OBJROOT}/src/jobjc frameworks=#{STABLE_GEN_DIR}"
-
-$stderr.puts cmd
-puts `#{cmd} 2>&1`
-
-raise $?.to_i if $?.to_i != 0
--- a/src/macosx/native/jobjc/runjava	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-#
-java -ea -classpath "lib/junit-4.4.jar:build/JObjC.build/Debug/bin/core:build/JObjC.build/Debug/bin/generator:build/JObjC.build/Debug/bin/additions:build/JObjC.build/Debug/bin/test:build/JObjC.build/Debug/bin/generated" -Djava.library.path=build/Debug $@
--- a/src/macosx/native/jobjc/src/core/PrimitiveCoder.hs	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,275 +0,0 @@
-#!/usr/bin/env runhaskell
-
-{-
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
--}
-{-
-The simplest way to get Haskell is through MacPorts: sudo port install ghc
-
-Otherwise, see http://www.haskell.org/ghc/
--}
-
-import Data.List
-import Data.Maybe
-import Data.Char
-
-data Width = W32 | W64
-             deriving (Show, Eq, Bounded, Enum)
-
-data NType = NBOOL | Nschar | Nuchar | Nsshort | Nushort | Nsint | Nuint
-           | Nslong | Nulong | Nslonglong | Nulonglong | Nfloat | Ndouble
-             deriving (Show, Eq, Bounded, Enum)
-
-data JPrim = Jboolean | Jbyte | Jchar | Jshort | Jint | Jlong | Jfloat | Jdouble
-             deriving (Show, Eq, Bounded, Enum)
-
-data JClass = JBoolean | JByte | JCharacter | JShort | JInteger | JLong
-            | JFloat | JDouble
-              deriving (Show, Eq, Bounded, Enum)
-
-data FFIType = SINT8 | UINT8 | SINT16 | UINT16 | SINT32 | UINT32
-             | SINT64 | UINT64 | FLOAT | DOUBLE
-             deriving (Show, Eq, Bounded, Enum)
-
-widths = [minBound..maxBound] :: [Width]
-ntypes = [minBound..maxBound] :: [NType]
-jprims = [minBound..maxBound] :: [JPrim]
-jclasses = [minBound..maxBound] :: [JClass]
-ffitypes = [minBound..maxBound] :: [FFIType]
-
--- What's the FFIType for a given Width and NType? For example: W32 NBOOL -> SINT8
-ffitype :: Width -> NType -> FFIType
-ffitype _ NBOOL   = SINT8
-ffitype _ Nschar  = SINT8
-ffitype _ Nuchar  = UINT8
-ffitype _ Nsshort = SINT16
-ffitype _ Nushort = UINT16
-ffitype _ Nsint   = SINT32
-ffitype _ Nuint   = UINT32
-ffitype W32 Nslong = SINT32
-ffitype W64 Nslong = SINT64
-ffitype W32 Nulong = UINT32
-ffitype W64 Nulong = UINT64
-ffitype _ Nslonglong = SINT64
-ffitype _ Nulonglong = UINT64
-ffitype _ Nfloat  = FLOAT
-ffitype _ Ndouble = DOUBLE
-
-sizeof :: FFIType -> Int
-sizeof SINT8  = 1
-sizeof UINT8  = 1
-sizeof SINT16 = 2
-sizeof UINT16 = 2
-sizeof SINT32 = 4
-sizeof UINT32 = 4
-sizeof SINT64 = 8
-sizeof UINT64 = 8
-sizeof FLOAT  = 4
-sizeof DOUBLE = 8
-
--- What's the Obj-C encoding for a given NType? For example: unsigned char -> 'C'
-encoding nt = fromJust $ lookup nt $
-              [(NBOOL, 'B'), (Nschar, 'c'), (Nuchar, 'C'), (Nsshort, 's'),
-               (Nushort, 'S'), (Nsint, 'i'), (Nuint, 'I'), (Nslong, 'l'),
-               (Nulong, 'L'), (Nslonglong, 'q'), (Nulonglong, 'Q'),
-               (Nfloat, 'f'), (Ndouble, 'd')]
-
--- What's the JPrim for a given NType? For example: native signed long long -> java long
-ntype2jprim nt = fromJust $ lookup nt $
-                 [(NBOOL, Jboolean), (Nschar, Jbyte), (Nuchar, Jbyte),
-                  (Nsshort, Jshort), (Nushort, Jshort), (Nsint, Jint), (Nuint, Jint),
-                  (Nslong, Jlong), (Nulong, Jlong),
-                  (Nslonglong, Jlong), (Nulonglong, Jlong),
-                  (Nfloat, Jfloat), (Ndouble, Jdouble)]
-
--- What's the JClass for a given JPrim? For example: int -> Integer
-jprim2jclass jp = fromJust $ lookup jp $
-                  [(Jboolean, JBoolean), (Jbyte, JByte), (Jchar, JCharacter),
-                   (Jshort, JShort), (Jint, JInteger), (Jlong, JLong),
-                   (Jfloat, JFloat), (Jdouble, JDouble)]
-
--- Convert a type to something suitable for Java code. For example: Jboolean -> boolean
-ntype2js nt = tail $ show nt
-jclass2js t = tail $ show t
-jprim2js p = tail $ show p
-ffitype2js f = "FFI_" ++ (show f)
-
--- Capitalize the first letter of a String
-capitalize [] = []
-capitalize s = [toUpper $ head s] ++ tail s
-
--- Given an Width and NType, return the Java code for reading said NType from memory.
-popAddr :: Width -> NType -> String
-popAddr _ NBOOL   = "rt.unsafe.getByte(addr) != 0"
-popAddr _ Nschar  = "rt.unsafe.getByte(addr)"
-popAddr _ Nuchar  = "rt.unsafe.getByte(addr)"
-popAddr W32 Nslong = "rt.unsafe.getInt(addr)"
-popAddr W32 Nulong = "rt.unsafe.getInt(addr)"
-popAddr _ ntype = "rt.unsafe.get" ++ (capitalize.jprim2js.ntype2jprim $ ntype) ++ "(addr)"
-
--- Given an Width and NType, return the Java code for writing said NType to memory.
-pushAddr :: Width -> NType -> String
-pushAddr _ NBOOL   = "rt.unsafe.putByte(addr, (byte) (x ? 1 : 0));"
-pushAddr _ Nschar  = "rt.unsafe.putByte(addr, x);"
-pushAddr _ Nuchar  = "rt.unsafe.putByte(addr, x);"
-pushAddr W32 Nslong = "rt.unsafe.putInt(addr, (int) x);"
-pushAddr W32 Nulong = "rt.unsafe.putInt(addr, (int) x);"
-pushAddr _ ntype = "rt.unsafe.put" ++ (capitalize jprimS) ++ "(addr, (" ++ jprimS ++ ") x);"
-    where jprimS = jprim2js.ntype2jprim $ ntype
-
--- Helpers for generating Java ternarnies and conditionals.
-archExpr x32 x64 = if x32 /= x64 then retdiff else x32
-    where retdiff = "(JObjCRuntime.IS64 ? (" ++ x64 ++ ") : (" ++ x32 ++ "))"
-
-archStmt x32 x64 = if x32 /= x64 then retdiff else x32
-    where retdiff = "if(JObjCRuntime.IS64){ " ++ x64 ++ " }else{ " ++ x32 ++ " }"
-
--- Get a Java expression for the correct FFIType at runtime. For example: (JObjCRuntime.IS64 ? FFI_SINT64 : FFI_SINT32)
-ffitypeVal nt = archExpr (ffitype2js $ ffitype W32 nt)
-                         (ffitype2js $ ffitype W64 nt)
-
--- Similar to ffiTypeVal. Get the correct pop expression and push statement.
-popAddrVal nt = archExpr (popAddr W32 nt) (popAddr W64 nt)
-pushAddrVal nt = archStmt (pushAddr W32 nt) (pushAddr W64 nt)
-
--- What's the Coder class name we're using for a given NType?
-coderName nt = aux nt ++ "Coder"
-    where
-      aux NBOOL   = "Bool"
-      aux Nschar  = "SChar"
-      aux Nuchar  = "UChar"
-      aux Nsshort = "SShort"
-      aux Nushort = "UShort"
-      aux Nsint   = "SInt"
-      aux Nuint   = "UInt"
-      aux Nslong  = "SLong"
-      aux Nulong  = "ULong"
-      aux Nslonglong   = "SLongLong"
-      aux Nulonglong   = "ULongLong"
-      aux Nfloat  = "Float"
-      aux Ndouble = "Double"
-
--- Operation for converting between primitives. Usually it just casts, but booleans are special.
-jconvertPrims sym Jboolean Jboolean = sym
-jconvertPrims sym Jboolean b = "((" ++ jprim2js b ++ ")(" ++ sym ++ " ? 1 : 0))"
-jconvertPrims sym a Jboolean = "(" ++ sym ++ " != 0)"
-jconvertPrims sym a b = if a == b then sym else "((" ++ jprim2js b ++ ")" ++ sym ++ ")"
-
-sizeofRet nt =
-    let ffitypes = map (\w -> ffitype w nt) widths
-        sizes = map sizeof ffitypes in
-    if (length $ nub sizes) == 1
-    then "\t\treturn " ++ (show.head $ sizes) ++ ";"
-    else unlines [
-              "\t\tswitch(w){",
-              (unlines $ map casestmt widths),
-              "\t\tdefault: return -1;",
-               "\t\t}"]
-    where
-      casestmt w = "\t\t\tcase " ++ (show w) ++ ": return " ++
-                   (show.sizeof $ ffitype w nt) ++ ";"
-
--- Generate a coder class for a given NType.
-c2java ntype =
-    unlines [
- "// native " ++ ntypeS ++ " -> java " ++ jprimS,
- "public static final class " ++ className ++ " extends PrimitiveCoder<" ++ jclassS ++ ">{",
- "\tpublic static final " ++ className ++ " INST = new " ++ className ++ "();",
- "\tpublic " ++ className ++ "(){ super("++ffitypeVal ntype++", \"" ++ [encoding ntype] ++ "\", "++jclassS++".class, "++jprimS++".class); }",
- "\t// compile time",
- "\t@Override public void push(JObjCRuntime rt, long addr, " ++ jprimS ++ " x){",
- "\t\t" ++ pushAddrVal ntype,
- "\t}",
- "\t@Override public " ++ jprimS ++ " pop" ++ capitalize jprimS ++ "(JObjCRuntime rt, long addr){",
- "\t\treturn " ++ popAddrVal ntype ++ ";",
- "\t}",
- "\t// for runtime coding",
- "\t@Override public int sizeof(Width w){",
- sizeofRet ntype,
- "\t}",
- "\t@Override public void push(JObjCRuntime rt, long addr, " ++ jclassS ++ " x){ " ++
- "push(rt, addr, (" ++ jprimS ++ ") x); }",
- "\t@Override public " ++ jclassS ++ " pop(JObjCRuntime rt, long addr){ " ++
- "return pop" ++ capitalize jprimS ++ "(rt, addr); }",
- "\t// proxies for mixed encoding",
- makeProxyMethods ntype,
- "}"
- ]
-     where
-       jprim = ntype2jprim ntype
-       jclass = jprim2jclass jprim
-       jprimS = jprim2js jprim
-       jclassS = jclass2js jclass
-       ntypeS = ntype2js ntype
-       className = coderName ntype
-
--- Generate push and pop methods that convert and proxy to actual implementation.
-makeProxyMethods nt = unlines $ map aux jprims
-    where
-      targetJPrim = ntype2jprim nt
-      targetJPrimS = jprim2js targetJPrim
-      aux jprim = if targetJPrim == jprim then "" else unlines [
-                   "\t@Override public void push(JObjCRuntime rt, long addr, " ++ jprimS ++ " x){ " ++
-                   "push(rt, addr, " ++ pushConversion "x" ++ "); }",
-                   "\t@Override public " ++ jprimS ++ " pop" ++ capitalize jprimS ++ "(JObjCRuntime rt, long addr){ " ++
-                   "return " ++ (popConversion ("pop" ++ capitalize targetJPrimS ++ "(rt, addr)")) ++ "; }"
-                  ]
-          where
-            jprimS = jprim2js jprim
-            pushConversion sym = jconvertPrims sym jprim targetJPrim
-            popConversion sym = jconvertPrims sym targetJPrim jprim
-
-main = do
-  putStrLn "package com.apple.jobjc;"
-
-  putStrLn "import com.apple.jobjc.JObjCRuntime.Width;"
-
-  putStrLn "// Auto generated by PrimitiveCoder.hs"
-  putStrLn "// Do not edit by hand."
-
-  putStrLn "public abstract class PrimitiveCoder<T> extends Coder<T>{"
-
-  putStrLn "\tpublic PrimitiveCoder(int ffiTypeCode, String objCEncoding, Class jclass, Class jprim){"
-  putStrLn "\t\tsuper(ffiTypeCode, objCEncoding, jclass, jprim);"
-  putStrLn "\t}"
-
-  mapM_ (\p -> putStrLn $ unlines [makePopI p, makePushI p]) jprims
-
-  mapM_ (putStrLn . c2java) ntypes
-
-  putStrLn "}"
-    where
-      makePopI jprim = unlines ["\tpublic final " ++ jprim2js jprim ++ " pop" ++ (capitalize.jprim2js $ jprim)
-                                   ++ "(NativeArgumentBuffer args){\n"
-                                   ++ "\t\treturn pop" ++ (capitalize.jprim2js $ jprim) ++ "(args.runtime, args.retValPtr);\n"
-                                   ++ "\t}",
-                                "\tpublic abstract " ++ jprim2js jprim ++ " pop" ++ (capitalize.jprim2js $ jprim) ++ "(JObjCRuntime runtime, long addr);"]
-      makePushI jprim = unlines ["\tpublic final void push"
-          ++ "(NativeArgumentBuffer args, " ++ jprim2js jprim ++ " x){\n"
-          ++ "\t\tpush(args.runtime, args.argValuesPtr, x);\n"
-          ++ "\t\targs.didPutArgValue(sizeof());\n"
-          ++ "\t}",
-        "\tpublic abstract void push(JObjCRuntime runtime, long addr, " ++ jprim2js jprim ++ " x);"]
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/CFType.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-
-
-public class CFType extends Pointer<Void> {
-    protected CFType(long ptr) { super(ptr); }
-    protected CFType(Pointer<?> ptr) { super(ptr.ptr); }
-
-    protected ID getTollFreeBridge(JObjCRuntime runtime){
-        return ID.getObjCObjectFor(runtime, super.ptr);
-    }
-}
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/CIF.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-
-import com.apple.jobjc.Coder.PrimitivePointerCoder;
-
-class CIF {
-    private static native int getSizeofCIF();
-    private static final int SIZEOF = getSizeofCIF();
-    private static native boolean prepCIF(long cifPtr, int nargs, long retFFITypePtr, long argsPtr);
-
-    public static CIF createCIFFor(final NativeArgumentBuffer args, final Coder returnCoder, final Coder ... argCoders) {
-        NativeBuffer cifBuf = new NativeBuffer(SIZEOF + (argCoders.length * JObjCRuntime.PTR_LEN));
-        final long argsPtr = cifBuf.bufferPtr + SIZEOF;
-
-        {
-            long argsIterPtr = argsPtr;
-            for(final Coder coder : argCoders){
-                PrimitivePointerCoder.INST.push(args.runtime, argsIterPtr, coder.getFFITypePtr());
-                argsIterPtr += JObjCRuntime.PTR_LEN;
-            }
-        }
-
-        boolean ok = prepCIF(cifBuf.bufferPtr, argCoders.length, returnCoder.getFFITypePtr(), argsPtr);
-        if(!ok)
-            throw new RuntimeException("ffi_prep_cif failed.");
-
-        return new CIF(cifBuf, returnCoder, argCoders);
-    }
-
-    final NativeBuffer cif;
-    // CIF needs to keep refs to the Coders, so they don't get finalized and their FFITypes freed.
-    final Coder returnCoder;
-    final Coder[] argCoders;
-
-    private CIF(final NativeBuffer cif, Coder returnCoder, Coder... argCoders) {
-        this.cif = cif;
-        this.returnCoder = returnCoder;
-        this.argCoders = argCoders;
-    }
-}
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Coder.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,289 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-
-import java.io.StringWriter;
-import java.lang.reflect.Method;
-
-import com.apple.jobjc.JObjCRuntime.Width;
-import com.apple.jobjc.PrimitiveCoder.BoolCoder;
-import com.apple.jobjc.PrimitiveCoder.DoubleCoder;
-import com.apple.jobjc.PrimitiveCoder.FloatCoder;
-import com.apple.jobjc.PrimitiveCoder.SCharCoder;
-import com.apple.jobjc.PrimitiveCoder.SIntCoder;
-import com.apple.jobjc.PrimitiveCoder.SLongLongCoder;
-import com.apple.jobjc.PrimitiveCoder.SShortCoder;
-
-public abstract class Coder<T> {
-    private static native long getNativeFFITypePtrForCode(final int code);
-
-    static final int FFI_VOID        = 0;
-    static final int FFI_PTR        = FFI_VOID+1;
-
-    static final int FFI_SINT8        = FFI_PTR+1;
-    static final int FFI_UINT8        = FFI_SINT8+1;
-    static final int FFI_SINT16        = FFI_UINT8+1;
-    static final int FFI_UINT16        = FFI_SINT16+1;
-    static final int FFI_SINT32        = FFI_UINT16+1;
-    static final int FFI_UINT32        = FFI_SINT32+1;
-    static final int FFI_SINT64        = FFI_UINT32+1;
-    static final int FFI_UINT64        = FFI_SINT64+1;
-
-    static final int FFI_FLOAT        = FFI_UINT64+1;
-    static final int FFI_DOUBLE        = FFI_FLOAT+1;
-    static final int FFI_LONGDOUBLE    = FFI_DOUBLE+1;
-
-    private static long[] ffiCodesToFFITypePtrs;
-    static{
-        System.loadLibrary("JObjC");
-        ffiCodesToFFITypePtrs = new long[FFI_LONGDOUBLE + 1];
-        for (int i = 0; i < FFI_LONGDOUBLE + 1; i++) ffiCodesToFFITypePtrs[i] = getNativeFFITypePtrForCode(i);
-    }
-
-    long getFFITypePtr() {
-        return ffiCodesToFFITypePtrs[getTypeCode()];
-    }
-
-    // runtime coding
-    public abstract void push(final JObjCRuntime runtime, final long addr, final T x);
-    public abstract T pop(final JObjCRuntime runtime, final long addr);
-
-    public void push(final NativeArgumentBuffer args, final T x){
-        push(args.runtime, args.argValuesPtr, x);
-        args.didPutArgValue(sizeof());
-    }
-
-    public T pop(final NativeArgumentBuffer args){
-        return pop(args.runtime, args.retValPtr);
-    }
-
-    public abstract int sizeof(Width w);
-    final public int sizeof(){ return sizeof(JObjCRuntime.WIDTH); }
-
-    //
-
-    public Coder(int ffiTypeCode, String objCEncoding, Class jclass, Class jprim) {
-        this.ffiTypeCode = ffiTypeCode;
-        this.objCEncoding = objCEncoding;
-        this.jclass = jclass;
-        this.jprim = jprim;
-    }
-
-    public Coder(int ffiTypeCode, String objCEncoding, Class jclass) {
-        this(ffiTypeCode, objCEncoding, jclass, null);
-    }
-
-    private final int ffiTypeCode;
-    private final String objCEncoding;
-    private final Class jclass;
-    private final Class jprim;
-
-    final int getTypeCode() { return ffiTypeCode; }
-    final String getObjCEncoding(){ return objCEncoding; }
-    public final Class getJavaClass() { return jclass; }
-    public final Class getJavaPrimitive() { return jprim; }
-
-    // runtime coding
-
-    private static Coder[] runtimeCoders;
-    static public Coder getCoderAtRuntimeForType(Class cls){
-        if(runtimeCoders == null) runtimeCoders = new Coder[]{
-            NSClassCoder.INST, IDCoder.INST, PointerCoder.INST,
-            DoubleCoder.INST, FloatCoder.INST, SLongLongCoder.INST,
-            SIntCoder.INST, SShortCoder.INST, SCharCoder.INST, BoolCoder.INST,
-            VoidCoder.INST
-        };
-
-        for(Coder c : runtimeCoders)
-            if((c.getJavaClass() != null && c.getJavaClass().isAssignableFrom(cls)) ||
-                    (c.getJavaPrimitive() != null && c.getJavaPrimitive().isAssignableFrom(cls)))
-                return c;
-
-        if(Struct.class.isAssignableFrom(cls)){
-            try {
-                Method m = cls.getDeclaredMethod("getStructCoder");
-                m.setAccessible(true);
-                return (Coder) m.invoke(null);
-            } catch (Exception e) {
-                throw new RuntimeException(e);
-            }
-        }
-
-        throw new RuntimeException("Could not find suitable coder for " + cls);
-    }
-
-    static public Coder getCoderAtRuntime(Object inst){
-        if(inst == null)              return PointerCoder.INST;
-        if(inst instanceof Struct)    return ((Struct) inst).getCoder();
-        return getCoderAtRuntimeForType(inst.getClass());
-    }
-
-    //
-
-    public static final class VoidCoder extends Coder<Object>{
-        public static final VoidCoder INST = new VoidCoder();
-        public VoidCoder(){ super(FFI_VOID, "v", Void.class, void.class); }
-        @Override public int sizeof(Width w) { return -1; }
-        @Override public Object pop(JObjCRuntime runtime, long addr) { throw new RuntimeException("Trying to pop a Void."); }
-        @Override public void push(JObjCRuntime runtime, long addr, Object x) { throw new RuntimeException("Trying to push a Void."); }
-    }
-
-    public static final class UnknownCoder extends Coder<Object> {
-        public static final UnknownCoder INST = new UnknownCoder();
-        public UnknownCoder(){ super(-1, "?", null, null); }
-        @Override public int sizeof(Width w) { return -1; }
-        @Override public void push(JObjCRuntime runtime, long addr, Object x) { throw new RuntimeException("Coder not implemented");}
-        @Override public Object pop(JObjCRuntime runtime, long addr) { throw new RuntimeException("Coder not implemented"); }
-    }
-
-    public static final class PrimitivePointerCoder extends Coder<Long> {
-        public static final PrimitivePointerCoder INST = new PrimitivePointerCoder();
-        public PrimitivePointerCoder(){ super(Coder.FFI_PTR, "^?", Long.class, long.class); }
-        @Override public int sizeof(Width w) { return JObjCRuntime.PTR_LEN; }
-
-        public void push(JObjCRuntime runtime, long addr, long x) {
-            if(JObjCRuntime.IS64)
-                runtime.unsafe.putLong(addr, x);
-            else
-                runtime.unsafe.putInt(addr, (int) x);
-        }
-
-        public void push(final JObjCRuntime runtime, final NativeArgumentBuffer argBuf, final long ptr) {
-            push(runtime, argBuf.argValuesPtr, ptr);
-            argBuf.didPutArgValue(sizeof());
-        }
-
-        public long popPtr(final JObjCRuntime runtime, final long addr) {
-            return JObjCRuntime.IS64 ? runtime.unsafe.getLong(addr) : runtime.unsafe.getInt(addr);
-        }
-
-        public long popPtr(final JObjCRuntime runtime, final NativeArgumentBuffer argBuf) {
-            return popPtr(runtime, argBuf.retValPtr);
-        }
-
-        @Override public Long pop(JObjCRuntime runtime, long addr) { return popPtr(runtime, addr); }
-        @Override public void push(JObjCRuntime runtime, long addr, Long x) { push(runtime, addr, (long) x); }
-    }
-
-    public static final class PointerCoder extends Coder<Pointer> {
-        public static final PointerCoder INST = new PointerCoder();
-        public PointerCoder(){ super(FFI_PTR, "^?", Pointer.class); }
-        @Override public int sizeof(Width w) { return PrimitivePointerCoder.INST.sizeof(w); }
-
-        @Override public Pointer pop(JObjCRuntime runtime, long addr) {
-            return new Pointer(PrimitivePointerCoder.INST.popPtr(runtime, addr));
-        }
-        @Override public void push(JObjCRuntime runtime, long addr, Pointer x) {
-            PrimitivePointerCoder.INST.push(runtime, addr, x == null ? 0 : x.ptr);
-        }
-    }
-
-    public static final class SELCoder extends Coder<SEL> {
-        public static final SELCoder INST = new SELCoder();
-        public SELCoder(){ super(FFI_PTR, ":", SEL.class); }
-        @Override public int sizeof(Width w) { return PrimitivePointerCoder.INST.sizeof(w); }
-
-        @Override public void push(JObjCRuntime runtime, long addr, SEL x) {
-            PrimitivePointerCoder.INST.push(runtime, addr, x == null ? 0 : x.selPtr);
-        }
-        @Override public SEL pop(JObjCRuntime runtime, long addr) {
-            return new SEL(PrimitivePointerCoder.INST.popPtr(runtime, addr));
-        }
-    }
-
-    public static abstract class StructCoder extends Coder<Struct> {
-        private final FFIType ffiType;
-        final int sizeof;
-
-        public StructCoder(final int sizeof, final Coder... elementCoders){
-            super(-1, objCEncoding(elementCoders), null);
-            this.ffiType = new FFIType(elementCoders);
-            this.sizeof = sizeof;
-        }
-
-        @Override public int sizeof(Width w) { return sizeof; }
-
-        private static String objCEncoding(final Coder[] elementCoders) {
-            StringWriter str = new StringWriter();
-            str.append("{?=");
-            for(Coder c : elementCoders)
-                str.append(c.getObjCEncoding());
-            str.append("}");
-            return str.toString();
-        }
-
-        @Override long getFFITypePtr() { return ffiType.getPtr(); }
-
-        @Override public void push(NativeArgumentBuffer argBuf, Struct x) {
-            // Just point to the instance on the heap instead of copying it onto the arg buf.
-            argBuf.doPutArgPtr(x.raw.bufferPtr);
-        }
-
-        @Override public void push(JObjCRuntime rt, long addr, Struct x) {
-            rt.unsafe.copyMemory(x.raw.bufferPtr, addr, sizeof);
-        }
-
-        protected abstract Struct newInstance(JObjCRuntime runtime);
-
-        @Override public Struct pop(final JObjCRuntime runtime, final long addr) {
-            Struct s = newInstance(runtime);
-            runtime.unsafe.copyMemory(addr, s.raw.bufferPtr, sizeof);
-            return s;
-        }
-    }
-
-    public static final class IDCoder extends Coder<ID>{
-        public static final IDCoder INST = new IDCoder();
-        public IDCoder(){ super(FFI_PTR, "@", ID.class); }
-        @Override public int sizeof(Width w) { return PrimitivePointerCoder.INST.sizeof(w); }
-
-        public <T extends ID> T newID(final JObjCRuntime runtime, final long objPtr) {
-            return (T) ID.getObjCObjectFor(runtime, objPtr);
-        }
-
-        @Override public ID pop(final JObjCRuntime runtime, final long addr) {
-            return newID(runtime, PrimitivePointerCoder.INST.popPtr(runtime, addr));
-        }
-
-        @Override public void push(final JObjCRuntime runtime, final long addr, final ID x) {
-            PointerCoder.INST.push(runtime, addr, x);
-        }
-    }
-
-    public static final class NSClassCoder extends Coder<NSClass>{
-        public static final NSClassCoder INST = new NSClassCoder();
-        public NSClassCoder(){ super(FFI_PTR, "#", NSClass.class); }
-        @Override public int sizeof(Width w) { return PrimitivePointerCoder.INST.sizeof(w); }
-
-        @Override public NSClass pop(JObjCRuntime runtime, long addr) {
-            final long clsPtr = PrimitivePointerCoder.INST.popPtr(runtime, addr);
-            if (clsPtr == 0) return null;
-            return NSClass.getObjCClassFor(runtime, clsPtr);
-        }
-        @Override public void push(JObjCRuntime runtime, long addr, NSClass x) {
-            PointerCoder.INST.push(runtime, addr, x);
-        }
-    }
-}
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/FFIType.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-
-import com.apple.jobjc.Coder.PrimitivePointerCoder;
-
-
-class FFIType{
-    private static native void makeFFIType(long ffi_type_buf, long elements_buf);
-    private static native int  getFFITypeSizeof();
-    private static int FFI_TYPE_SIZEOF = getFFITypeSizeof();
-    final NativeBuffer ffi_type;
-    final NativeBuffer elements;
-    final Coder[] elementCoders;
-
-    public FFIType(final Coder... elementCoders){
-        final JObjCRuntime runtime = JObjCRuntime.inst();
-        this.elementCoders = elementCoders;
-        this.ffi_type = new NativeBuffer(FFI_TYPE_SIZEOF);
-        this.elements = new NativeBuffer(JObjCRuntime.PTR_LEN * (elementCoders.length + 1));
-
-        long elIterPtr = elements.bufferPtr;
-        for(Coder c : elementCoders){
-            PrimitivePointerCoder.INST.push(runtime, elIterPtr, c.getFFITypePtr());
-            elIterPtr += PrimitivePointerCoder.INST.sizeof();
-        }
-        PrimitivePointerCoder.INST.push(runtime, elIterPtr, 0);
-
-        makeFFIType(ffi_type.bufferPtr, elements.bufferPtr);
-    }
-
-    public long getPtr(){
-        return ffi_type.bufferPtr;
-    }
-}
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Function.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-
-
-public class Function {
-    private static native long getFxnPtrForFunctionName(final String functionName);
-    private static native long getFxnPtrForFunctionNameAndLib(final long libPtr, final String functionName);
-
-    final long fxnPtr;
-
-    Function(final long fxnPtr) {
-        this.fxnPtr = fxnPtr;
-    }
-
-    public Function(final String name) {
-        this(getFxnPtr(name));
-    }
-
-    public Function(final MacOSXFramework framework, final String name) {
-        this(getFxnPtr(name, framework));
-    }
-
-    static long getFxnPtr(final String name){
-        long fxnPtr = getFxnPtrForFunctionName(name);
-        if(fxnPtr == 0) throw new RuntimeException("Function pointer for " + name + " not found in runtime.");
-        return fxnPtr;
-    }
-
-    static long getFxnPtr(final String name, final MacOSXFramework framework){
-        long fxnPtr = 0;
-        for(int i = 0; fxnPtr == 0 && i < framework.nativeLibPtrs.length; i++){
-            fxnPtr = getFxnPtrForFunctionNameAndLib(framework.nativeLibPtrs[i], name);
-            if(fxnPtr != 0) return fxnPtr;
-        }
-        throw new RuntimeException("Function pointer for " + name + " not found in framework " + framework + ".");
-    }
-}
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/ID.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,163 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-
-import java.lang.ref.WeakReference;
-import java.lang.reflect.Constructor;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-
-public class ID extends Pointer<Void>{
-    static native String getNativeDescription(final long objPtr);
-
-    final JObjCRuntime runtime;
-
-    static final Class[] CTOR_ARGS = { long.class, JObjCRuntime.class };
-    protected ID(final long objPtr, final JObjCRuntime runtime) {
-        super(objPtr);
-        runtime.assertOK();
-        this.runtime = runtime;
-    }
-
-    protected ID(final ID obj, final JObjCRuntime runtime) {
-        this(obj.ptr, runtime);
-    }
-
-    @Override protected NativeObjectLifecycleManager getNativeObjectLifecycleManager() {
-        return NativeObjectLifecycleManager.CFRetainRelease.INST;
-    }
-
-    protected final JObjCRuntime getRuntime() { return runtime; }
-
-    @Override public String toString(){
-        String s = super.toString();
-        return s + " (ObjC: " + ptr + " / " + Long.toHexString(ptr) + ")";
-    }
-
-    //
-
-    public static <T extends ID> T getInstance(final long ptr, final JObjCRuntime runtime){
-        return (T) getObjCObjectFor(runtime, ptr);
-    }
-
-    static <T extends ID> T getObjCObjectFor(final JObjCRuntime runtime, final long objPtr){
-        if (objPtr == 0) return null;
-
-        final WeakReference cachedObj = objectCache.get().get(objPtr);
-        if(cachedObj != null && cachedObj.get() != null) return (T) cachedObj.get();
-
-        final long clsPtr = NSClass.getClass(objPtr);
-
-        final T newObj = (T) (runtime.subclassing.isUserClass(clsPtr) ?
-                Subclassing.getJObjectFromIVar(objPtr)
-                : createNewObjCObjectFor(runtime, objPtr, clsPtr));
-
-        objectCache.get().put(objPtr, new WeakReference(newObj));
-        return newObj;
-    }
-
-    static <T extends ID> T createNewObjCObjectFor(final JObjCRuntime runtime, final long objPtr, final long clsPtr) {
-        final Constructor<T> ctor = getConstructorForClassPtr(runtime, clsPtr);
-        return (T) createNewObjCObjectForConstructor(ctor, objPtr, runtime);
-    }
-
-    @SuppressWarnings("unchecked")
-    static <T extends ID> Constructor<T> getConstructorForClassPtr(final JObjCRuntime runtime, final long clazzPtr){
-        final Constructor<T> cachedCtor = (Constructor<T>) constructorCache.get().get(clazzPtr);
-        if(cachedCtor != null) return cachedCtor;
-
-        final Class<T> clazz = getClassForClassPtr(runtime, clazzPtr);
-        Constructor<T> ctor;
-        try {
-            ctor = clazz.getDeclaredConstructor(CTOR_ARGS);
-        } catch (SecurityException e) {
-            throw new RuntimeException(e);
-        } catch (NoSuchMethodException e) {
-            throw new RuntimeException(e);
-        }
-        ctor.setAccessible(true);
-        constructorCache.get().put(clazzPtr, (Constructor<ID>) ctor);
-        return ctor;
-    }
-
-    @SuppressWarnings("unchecked")
-    static <T extends ID> Class<T> getClassForClassPtr(final JObjCRuntime runtime, final long clazzPtr){
-        final String className = NSClass.getClassNameOfClass(clazzPtr);
-        final Class<T> clazz = (Class<T>) runtime.getClassForNativeClassName(className);
-        if(clazz == null){
-            final long superClazzPtr = NSClass.getSuperClassOfClass(clazzPtr);
-            if(superClazzPtr != 0)
-                return getClassForClassPtr(runtime, superClazzPtr);
-        }
-        return clazz;
-    }
-
-    static <T extends ID> T createNewObjCObjectForConstructor(final Constructor ctor, final long objPtr, final JObjCRuntime runtime) {
-        try {
-            final T newInstance = (T) ctor.newInstance(new Object[] { Long.valueOf(objPtr), runtime });
-            objectCache.get().put(objPtr, new WeakReference(newInstance));
-            return newInstance;
-        } catch (final Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    static <T extends ID> T createNewObjCObjectForClass(final Class<T> clazz, final long objPtr, final JObjCRuntime runtime) {
-        try {
-            final Constructor<T> constructor = clazz.getDeclaredConstructor(CTOR_ARGS);
-            constructor.setAccessible(true);
-            return (T) createNewObjCObjectForConstructor(constructor, objPtr, runtime);
-        } catch (final Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    //
-
-    static final ThreadLocal<LinkedHashMap<Long, Constructor>> constructorCache = new ThreadLocal<LinkedHashMap<Long, Constructor>>(){
-        @Override protected LinkedHashMap<Long, Constructor> initialValue(){
-            final int MAX_ENTRIES = 1000;
-            final float LOAD_FACTOR = 0.75f;
-            return new LinkedHashMap<Long, Constructor>((int) (MAX_ENTRIES/LOAD_FACTOR), LOAD_FACTOR, true) {
-                @Override protected boolean removeEldestEntry(Map.Entry<Long, Constructor> eldest) {
-                    return size() > MAX_ENTRIES;
-                }
-            };
-        }
-    };
-
-    static final ThreadLocal<LinkedHashMap<Long, WeakReference>> objectCache = new ThreadLocal<LinkedHashMap<Long, WeakReference>>(){
-        @Override protected LinkedHashMap<Long, WeakReference> initialValue(){
-            final int MAX_ENTRIES = 1000;
-            final float LOAD_FACTOR = 0.75f;
-            return new LinkedHashMap<Long, WeakReference>((int) (MAX_ENTRIES/LOAD_FACTOR), LOAD_FACTOR, true) {
-                @Override protected boolean removeEldestEntry(Map.Entry<Long, WeakReference> eldest) {
-                    return size() > MAX_ENTRIES || eldest.getValue().get() == null;
-                }
-            };
-        }
-    };
-}
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Invoke.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,224 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-
-import com.apple.jobjc.Coder.IDCoder;
-import com.apple.jobjc.Coder.NSClassCoder;
-import com.apple.jobjc.Coder.PrimitivePointerCoder;
-import com.apple.jobjc.Coder.SELCoder;
-import com.apple.jobjc.Coder.StructCoder;
-
-
-public abstract class Invoke {
-    public abstract void invoke(NativeArgumentBuffer argBuf);
-    public abstract void invoke(NativeArgumentBuffer buffer, Struct retvalStruct);
-
-    //
-
-    public static final class FunCall extends Invoke{
-        static native void invoke(long cifPtr, long fxnPtr, long retValPtr, long argsPtr);
-
-        final long fxnPtr;
-        final CIF cif;
-
-        FunCall(long fxnPtr, CIF cif) {
-            this.fxnPtr = fxnPtr;
-            this.cif = cif;
-        }
-
-        public FunCall(final JObjCRuntime runtime, final String name, final Coder returnCoder, final Coder ... argCoders) {
-            this(Function.getFxnPtr(name), CIF.createCIFFor(runtime.getThreadLocalState(), returnCoder, argCoders));
-        }
-
-        public FunCall(final MacOSXFramework framework, final String name, final Coder returnCoder, final Coder ... argCoders) {
-            this(Function.getFxnPtr(name, framework), CIF.createCIFFor(framework.getRuntime().getThreadLocalState(), returnCoder, argCoders));
-        }
-
-        public void init(final NativeArgumentBuffer argBuf) {
-            argBuf.reset();
-        }
-
-        @Override public void invoke(final NativeArgumentBuffer argBuf) {
-            invoke(argBuf, argBuf.retValPtr);
-        }
-
-        @Override public void invoke(final NativeArgumentBuffer buffer, final Struct retvalStruct) {
-            invoke(buffer, retvalStruct.raw.bufferPtr);
-        }
-
-        void invoke(final NativeArgumentBuffer argBuf, final long retValPtr) {
-            invoke(cif.cif.bufferPtr, fxnPtr, retValPtr, argBuf.buffer.bufferPtr);
-        }
-    }
-
-    public static final class MsgSend extends Invoke{
-        static{ System.load("/usr/lib/libobjc.dylib"); }
-
-        private static final long OBJC_MSG_SEND_FXN_PTR = new Function("objc_msgSend").fxnPtr;
-        private static final long OBJC_MSG_SEND_FPRET_FXN_PTR = new Function("objc_msgSend_fpret").fxnPtr;
-        private static final long OBJC_MSG_SEND_STRET_FXN_PTR = new Function("objc_msgSend_stret").fxnPtr;
-
-        final FunCall funCall;
-        final long selPtr;
-
-        public MsgSend(final JObjCRuntime runtime, final String name, final Coder returnCoder, final Coder ... argCoders) {
-            this.funCall = new FunCall(getMsgSendFxnPtr(returnCoder),
-                    CIF.createCIFFor(runtime.getThreadLocalState(), returnCoder, getSelCoders(argCoders)));
-            this.selPtr = SEL.getSelectorPtr(name);
-        }
-
-        public void init(final NativeArgumentBuffer nativeBuffer, final ID obj) {
-            funCall.init(nativeBuffer);
-            IDCoder.INST.push(nativeBuffer, obj);
-            PrimitivePointerCoder.INST.push(nativeBuffer.runtime, nativeBuffer, selPtr);
-        }
-
-        @Override public void invoke(final NativeArgumentBuffer argBuf) {
-            funCall.invoke(argBuf);
-        }
-
-        @Override public void invoke(final NativeArgumentBuffer buffer, final Struct retvalStruct) {
-            funCall.invoke(buffer, retvalStruct);
-        }
-
-        // support
-
-        static Coder[] getSelCoders(final Coder[] argCoders) {
-            final Coder[] selArgCoders = new Coder[argCoders.length + 2];
-            selArgCoders[0] = IDCoder.INST;
-            selArgCoders[1] = SELCoder.INST;
-            for (int i = 0; i < argCoders.length; i++)
-                selArgCoders[i + 2] = argCoders[i];
-            return selArgCoders;
-        }
-
-        static long getMsgSendFxnPtr(final Coder returnCoder) {
-            if(returnCoder instanceof StructCoder){
-                StructCoder scoder = (StructCoder) returnCoder;
-
-                switch(JObjCRuntime.ARCH){
-                case ppc:
-                    return OBJC_MSG_SEND_STRET_FXN_PTR;
-                case i386:
-                    switch(scoder.sizeof){
-                    case 1: case 2: case 4: case 8:
-                        return OBJC_MSG_SEND_FXN_PTR;
-                    }
-                    return OBJC_MSG_SEND_STRET_FXN_PTR;
-                case x86_64:
-                    if(scoder.sizeof > 16)
-                        return OBJC_MSG_SEND_STRET_FXN_PTR;
-                    else
-                        return OBJC_MSG_SEND_FXN_PTR;
-                default:
-                    throw new RuntimeException();
-                }
-            }
-
-            final int typeCode = returnCoder.getTypeCode();
-
-            switch(JObjCRuntime.ARCH){
-            case ppc:
-                return OBJC_MSG_SEND_FXN_PTR;
-            case i386:
-                switch(typeCode) {
-                case Coder.FFI_FLOAT: case Coder.FFI_DOUBLE: case Coder.FFI_LONGDOUBLE:
-                    return OBJC_MSG_SEND_FPRET_FXN_PTR;
-                }
-                return OBJC_MSG_SEND_FXN_PTR;
-            case x86_64:
-                if(typeCode == Coder.FFI_LONGDOUBLE)
-                    return OBJC_MSG_SEND_FPRET_FXN_PTR;
-                return OBJC_MSG_SEND_FXN_PTR;
-            default:
-                throw new RuntimeException();
-            }
-        }
-    }
-
-    public static final class MsgSendSuper extends Invoke{
-        static{ System.load("/usr/lib/libobjc.dylib"); }
-
-        private static final long OBJC_MSG_SEND_SUPER_FXN_PTR = new Function("objc_msgSendSuper").fxnPtr;
-        private static final long OBJC_MSG_SEND_SUPER_STRET_FXN_PTR = new Function("objc_msgSendSuper_stret").fxnPtr;
-
-        final FunCall funCall;
-        final long selPtr;
-
-        public MsgSendSuper(final JObjCRuntime runtime, final String name, final Coder returnCoder, final Coder ... argCoders) {
-            this.funCall = new FunCall(getMsgSendSuperFxnPtr(returnCoder),
-                    CIF.createCIFFor(runtime.getThreadLocalState(), returnCoder, getSuperSelCoders(argCoders)));
-            this.selPtr = SEL.getSelectorPtr(name);
-        }
-
-        public void init(final NativeArgumentBuffer argBuf, final ID obj, final NSClass cls) {
-            funCall.init(argBuf);
-
-            // Instead of mallocing a struct, or keeping another thread local,
-            // let's write objc_super out to the argbuf, and then point an argument
-            // to the data.
-
-            final long valPtr = argBuf.argValuesPtr;
-            final int ptrLen = JObjCRuntime.PTR_LEN;
-
-            IDCoder     .INST.push(argBuf.runtime, valPtr,          obj);
-            NSClassCoder.INST.push(argBuf.runtime, valPtr + ptrLen, cls);
-            argBuf.argValuesPtr += ptrLen + ptrLen;
-
-            PrimitivePointerCoder.INST.push(argBuf.runtime, argBuf, valPtr);
-            PrimitivePointerCoder.INST.push(argBuf.runtime, argBuf, selPtr);
-        }
-
-        @Override public void invoke(final NativeArgumentBuffer argBuf) {
-            funCall.invoke(argBuf);
-        }
-
-        @Override public void invoke(final NativeArgumentBuffer buffer, final Struct retvalStruct) {
-            funCall.invoke(buffer, retvalStruct);
-        }
-
-        //
-
-        private final static StructCoder objc_super_coder = new StructCoder(JObjCRuntime.PTR_LEN*2, IDCoder.INST, NSClassCoder.INST){
-            @Override protected Struct newInstance(JObjCRuntime runtime) { return null; }};
-
-        static Coder[] getSuperSelCoders(final Coder[] argCoders) {
-            final Coder[] selArgCoders = new Coder[argCoders.length + 2];
-            selArgCoders[0] = objc_super_coder;
-            selArgCoders[1] = SELCoder.INST;
-            for (int i = 0; i < argCoders.length; i++)
-                selArgCoders[i + 2] = argCoders[i];
-            return selArgCoders;
-        }
-
-        static long getMsgSendSuperFxnPtr(final Coder returnCoder){
-            long normal = MsgSend.getMsgSendFxnPtr(returnCoder);
-            if(normal == MsgSend.OBJC_MSG_SEND_STRET_FXN_PTR)
-                return OBJC_MSG_SEND_SUPER_STRET_FXN_PTR;
-            else
-                return OBJC_MSG_SEND_SUPER_FXN_PTR;
-        }
-    }
-}
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/JObjCRuntime.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-
-import java.lang.reflect.Field;
-import java.nio.ByteOrder;
-import java.util.ArrayList;
-import java.util.List;
-
-import sun.misc.Unsafe;
-
-
-public final class JObjCRuntime {
-    static { System.loadLibrary("JObjC"); }
-
-    public static enum Arch{ ppc, i386, x86_64 };
-    public static enum Width{ W32, W64 };
-
-    public static final Arch ARCH = getArch();
-    public static final Width WIDTH = getWidth();
-
-    private static Arch getArch(){
-        String arch = System.getProperty("os.arch");
-        if("ppc".equals(arch)) return Arch.ppc;
-        if("i386".equals(arch)) return Arch.i386;
-        if("x86_64".equals(arch)) return Arch.x86_64;
-        if("amd64".equals(arch)) return Arch.x86_64;
-        if("universal".equals(arch)) return Arch.x86_64;
-        throw new RuntimeException("Did not recognize os.arch system property: '" + arch + "'");
-    }
-
-    private static Width getWidth(){
-        String width = System.getProperty("sun.arch.data.model");
-        if("32".equals(width)) return Width.W32;
-        if("64".equals(width)) return Width.W64;
-        throw new RuntimeException("Did not recognize sun.arch.data.model system property: '" + width + "'");
-    }
-
-    public static final boolean IS32 = System.getProperty("sun.arch.data.model").equals("32");
-    public static final boolean IS64 = System.getProperty("sun.arch.data.model").equals("64");
-    public static final int PTR_LEN = IS64 ? 8 : 4;
-    public static final boolean IS_BIG_ENDIAN = ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN;
-    static final boolean DEBUG = Boolean.parseBoolean(System.getProperty("JObjC.debug"));
-
-    static void checkPermission(){
-        final SecurityManager security = System.getSecurityManager();
-        if (security != null) security.checkPermission(new RuntimePermission("canProcessApplicationEvents"));
-    }
-
-    public final void assertOK(){
-        if(this != instance)
-            throw new SecurityException("runtime");
-    }
-
-    private JObjCRuntime(){}
-
-    private static JObjCRuntime instance;
-    static JObjCRuntime inst() {
-        if (instance == null) instance = new JObjCRuntime();
-        return instance;
-    }
-
-    public static JObjCRuntime getInstance() {
-        checkPermission();
-        return inst();
-    }
-
-    public final NativeArgumentBuffer getThreadLocalState() {
-        return NativeArgumentBuffer.getThreadLocalBuffer(this);
-    }
-
-    final Unsafe unsafe = getUnsafe();
-    final Subclassing subclassing = new Subclassing(this);
-    final List<String> registeredPackages = new ArrayList<String>();
-
-    @SuppressWarnings("unchecked")
-    Class<? extends ID> getClassForNativeClassName(final String className) {
-        for (final String pkg : registeredPackages) {
-            try {
-                final Class<?> clazz = Class.forName(pkg + "." + className);
-                if (clazz != null) return (Class<? extends ID>)clazz;
-            } catch (final ClassNotFoundException e) { }
-        }
-
-        return null;
-    }
-
-    private final static Unsafe getUnsafe() {
-        Unsafe inst = null;
-        try {
-            Field f = Unsafe.class.getDeclaredField("theUnsafe");
-            f.setAccessible(true);
-            inst = (Unsafe) f.get(null);
-            if(inst == null) throw new NullPointerException("Unsafe.theUnsafe == null");
-        } catch (Exception e) {
-            throw new RuntimeException("Unable to get instance of Unsafe.", e);
-        }
-        return inst;
-    }
-
-    public void registerPackage(final String pkg) {
-        registeredPackages.add(pkg);
-    }
-
-    /**
-     * Register a subclass of NSObject to allow the native side to send
-     * messages which in turn call java methods declared on the class.
-     * If a native class by the same name already exists, registerClass
-     * will simply return without doing anything.
-     *
-     * For a usage example, see the SubclassingTest.
-     */
-    public boolean registerUserClass(Class<? extends ID> clazz, Class<? extends NSClass> clazzClazz) {
-        return subclassing.registerUserClass(clazz, clazzClazz);
-    }
-
-}
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/MacOSXFramework.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-
-
-
-public class MacOSXFramework {
-    private static native long retainFramework(final String frameworkName);
-    private static native void releaseFramework(final long frameworkPtr);
-    private static native void getConstant(final long frameworkPtr, String symbol, final long bufferPtr, final int size);
-
-    private final JObjCRuntime runtime;
-    protected final long[] nativeLibPtrs;
-
-    final long getFrameworkPtr() { return nativeLibPtrs.length > 0 ? nativeLibPtrs[0] : 0; }
-
-    private static long[] createFrameworkPtrsFromPaths(final String[] frameworkLibPaths) {
-        final long[] libPtrs = new long[frameworkLibPaths.length];
-        for(int i = 0; i < libPtrs.length; i++){
-            libPtrs[i] = retainFramework(frameworkLibPaths[i]);
-            if(libPtrs[i] == 0) throw new RuntimeException("Could not open library at " + frameworkLibPaths[i]);
-        }
-        return libPtrs;
-    }
-
-    protected MacOSXFramework(final JObjCRuntime runtime, final String[] nativeLibPaths) {
-        runtime.assertOK();
-        this.runtime = runtime;
-        this.nativeLibPtrs = createFrameworkPtrsFromPaths(nativeLibPaths);
-    }
-
-    @Override protected final synchronized void finalize() throws Throwable {
-        for(long lib : nativeLibPtrs)
-            if(lib != 0) releaseFramework(lib);
-    }
-
-    protected final JObjCRuntime getRuntime(){ return runtime; }
-
-    protected void getConstant(final String symbol, final long retValPtr, final int size){
-        assert size >= 0;
-        assert retValPtr != 0;
-        getConstant(getFrameworkPtr(), symbol, retValPtr, size);
-    }
-
-    protected void getConstant(final String symbol, final NativeArgumentBuffer out, final int size){
-        getConstant(symbol, out.retValPtr, size);
-    }
-
-    protected void getConstant(final String symbol, final Struct out, final int size){
-        getConstant(symbol, out.raw.bufferPtr, size);
-    }
-}
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NSClass.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-
-import java.lang.ref.WeakReference;
-import java.lang.reflect.Constructor;
-
-
-public class NSClass<T extends ID> extends ID {
-    public static class NSClassNotFoundException extends RuntimeException{
-        public NSClassNotFoundException(String m){ super(m); }
-        public NSClassNotFoundException(String m, Throwable cause){ super(m, cause); }
-    }
-
-    static native long getNativeClassByName(String name);
-    static native long getSuperClassOfClass(long classPtr);
-    static native String getClassNameOfClass(long classPtr);
-    static native long getClass(long objPtr);
-
-    public NSClass(final long ptr, final JObjCRuntime runtime) {
-        super(ptr, runtime);
-    }
-
-    public NSClass(final String name, final JObjCRuntime runtime) {
-        this(getNativeClassByName(name), runtime);
-        if(ptr == 0) throw new NSClassNotFoundException("NSClass pointer is 0. Found no class named " + name);
-    }
-
-    protected NSClass(final JObjCRuntime runtime){
-        super(0, runtime);
-        final String sn = getClass().getSimpleName();
-        final String name = sn.substring(0, sn.lastIndexOf("Class"));
-        ptr = getNativeClassByName(name);
-        if(ptr == 0) throw new NSClassNotFoundException("NSClass pointer is 0. Found no class named " + name);
-    }
-
-    NSClass<? super T> getSuperClass() {
-        return new NSClass<T>(getSuperClassOfClass(ptr), runtime);
-    }
-
-    String getClassName() { return getClassNameOfClass(ptr); }
-
-    @Override protected NativeObjectLifecycleManager getNativeObjectLifecycleManager() {
-        return NativeObjectLifecycleManager.Nothing.INST;
-    }
-
-    @Override public boolean equals(Object o){
-        return (o instanceof NSClass) && (this.ptr == ((NSClass) o).ptr);
-    }
-
-    //
-
-    static <T extends NSClass> T getObjCClassFor(final JObjCRuntime runtime, final long clsPtr){
-        if (clsPtr == 0) return null;
-
-        final WeakReference cachedObj = objectCache.get().get(clsPtr);
-        if(cachedObj != null && cachedObj.get() != null) return (T) cachedObj.get();
-
-        final T newObj = (T) createNewObjCClassFor(runtime, clsPtr);
-        objectCache.get().put(clsPtr, new WeakReference(newObj));
-        return newObj;
-    }
-
-    static <T extends NSClass> T createNewObjCClassFor(final JObjCRuntime runtime, final long clsPtr) {
-        final Constructor<T> ctor = getNSClassConstructorForClassPtr(runtime, clsPtr);
-        return (T) createNewObjCObjectForConstructor(ctor, clsPtr, runtime);
-    }
-
-    @SuppressWarnings("unchecked")
-    static <T extends NSClass> Constructor<T> getNSClassConstructorForClassPtr(final JObjCRuntime runtime, final long clazzPtr){
-        final Class<T> clazz = getNSClassForClassPtr(runtime, clazzPtr);
-        Constructor<T> ctor;
-        try {
-            ctor = clazz.getDeclaredConstructor(CTOR_ARGS);
-        } catch (SecurityException e) {
-            throw new RuntimeException(e);
-        } catch (NoSuchMethodException e) {
-            throw new RuntimeException(e);
-        }
-        ctor.setAccessible(true);
-        return ctor;
-    }
-
-    @SuppressWarnings("unchecked")
-    static <T extends ID> Class<T> getNSClassForClassPtr(final JObjCRuntime runtime, final long clazzPtr){
-        final String className = NSClass.getClassNameOfClass(clazzPtr);
-        final Class<T> clazz = (Class<T>) runtime.getClassForNativeClassName(className + "Class");
-        if(clazz == null){
-            final long superClazzPtr = NSClass.getSuperClassOfClass(clazzPtr);
-            if(superClazzPtr != 0)
-                return getNSClassForClassPtr(runtime, superClazzPtr);
-        }
-        return clazz;
-    }
-}
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeArgumentBuffer.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-
-import java.nio.ByteOrder;
-
-import com.apple.jobjc.Coder.PrimitivePointerCoder;
-
-
-public final class NativeArgumentBuffer{
-    private static final ThreadLocal<NativeArgumentBuffer> threadLocal = new ThreadLocal<NativeArgumentBuffer>();
-
-    static NativeArgumentBuffer getThreadLocalBuffer(final JObjCRuntime runtime) {
-        runtime.assertOK();
-        final NativeArgumentBuffer alreadyCreated = threadLocal.get();
-        if (alreadyCreated != null) return alreadyCreated;
-
-        final NativeArgumentBuffer newThreadLocalState = new NativeArgumentBuffer(runtime);
-        threadLocal.set(newThreadLocalState);
-        return newThreadLocalState;
-    }
-
-    final JObjCRuntime runtime;
-
-    final NativeBuffer buffer;
-
-    long argPtrsPtr;
-    long argValuesPtr;
-    final long retValPtr;
-
-    private static final int MAX_ARGS = 512;
-    private static final int BUF_SIZE = MAX_ARGS * 8 * 2;
-    private static final int ARG_VALS_OFFSET = BUF_SIZE/2;
-
-    private NativeArgumentBuffer(final JObjCRuntime runtime) {
-        runtime.assertOK();
-        this.runtime = runtime;
-        this.buffer = new NativeBuffer(BUF_SIZE);
-        this.buffer.buffer.order(ByteOrder.nativeOrder());
-
-        reset();
-        this.retValPtr = buffer.bufferPtr;
-    }
-
-
-    // Call before each new call
-    public void reset() {
-        argPtrsPtr = buffer.bufferPtr;
-        argValuesPtr = buffer.bufferPtr + ARG_VALS_OFFSET;
-        assert buffer.ptrInBounds(argValuesPtr);
-    }
-
-    // Push a pointer to a block of memory
-    public void doPutArgPtr(long ptr) {
-        assert buffer.ptrInBounds(argPtrsPtr);
-        PrimitivePointerCoder.INST.push(runtime, argPtrsPtr, ptr);
-        argPtrsPtr += JObjCRuntime.PTR_LEN;
-    }
-
-    // Call this after having written a value of size `sizeof` to `argValuesPtr`.
-    public void didPutArgValue(int sizeof) {
-        assert buffer.ptrInBounds(argValuesPtr);
-        doPutArgPtr(argValuesPtr);
-        argValuesPtr += sizeof;
-    }
-
-
-    @Override public String toString() {
-        final StringBuilder builder = new StringBuilder();
-        final long bptr = buffer.bufferPtr;
-
-        for(long i = bptr; i < bptr + ARG_VALS_OFFSET; i += JObjCRuntime.PTR_LEN){
-            if(argPtrsPtr == i)
-                builder.append("*");
-            builder.append(PrimitivePointerCoder.INST.popPtr(JObjCRuntime.inst(), i));
-            builder.append(" ");
-        }
-
-        builder.append("\n");
-
-        for(long i = bptr + ARG_VALS_OFFSET; i < bptr + BUF_SIZE; i += JObjCRuntime.PTR_LEN){
-            if(argValuesPtr == i)
-                builder.append("*");
-            builder.append(PrimitivePointerCoder.INST.popPtr(JObjCRuntime.inst(), i));
-            builder.append(" ");
-        }
-
-        return builder.toString();
-    }
-}
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeBuffer.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-
-/**
- * A wrapper around a direct ByteBuffer and its native pointer. For documentation, @see java.nio.ByteBuffer
- */
-public class NativeBuffer {
-    static native long getPtrOfBuffer(final ByteBuffer byteBuffer);
-
-    public final ByteBuffer buffer;
-    public final long bufferPtr;
-
-    public NativeBuffer(final int capacity){
-        this(ByteBuffer.allocateDirect(capacity));
-    }
-
-    /**
-     * Wrap a ByteBuffer and set the ByteOrder to nativeOrder.
-     */
-    public NativeBuffer(ByteBuffer buffer){
-        this.buffer = buffer;
-        this.bufferPtr = getPtrOfBuffer(buffer);
-        assert buffer != null;
-        assert bufferPtr != 0;
-        this.buffer.order(ByteOrder.nativeOrder());
-    }
-
-    public byte   get() { return buffer.get(); }
-    public char   getChar() { return buffer.getChar(); }
-    public double getDouble() { return buffer.getDouble(); }
-    public float  getFloat() { return buffer.getFloat(); }
-    public int    getInt() { return buffer.getInt(); }
-    public long   getLong() { return buffer.getLong(); }
-    public short  getShort() { return buffer.getShort(); }
-    public NativeBuffer put(byte b) { buffer.put(b); return this; }
-    public NativeBuffer put(NativeBuffer src) { buffer.put(src.buffer); return this; }
-    public NativeBuffer putChar(char c) { buffer.putChar(c); return this; }
-    public NativeBuffer putDouble(double d) { buffer.putDouble(d); return this; }
-    public NativeBuffer putFloat(float f) { buffer.putFloat(f); return this; }
-    public NativeBuffer putInt(int i) { buffer.putInt(i); return this; }
-    public NativeBuffer putLong(long l) { buffer.putLong(l); return this; }
-    public NativeBuffer putShort(short s) { buffer.putShort(s); return this; }
-
-    public int capacity() { return buffer.capacity(); }
-    public int position() { return buffer.position(); }
-    public NativeBuffer position(int newPosition) { buffer.position(newPosition); return this; }
-    public NativeBuffer rewind(){ buffer.rewind(); return this; }
-
-    public int limit() { return buffer.limit(); }
-    public NativeBuffer limit(final int sizeof) { buffer.limit(sizeof); return this; }
-
-    public int remaining() { return buffer.remaining(); }
-
-    public NativeBuffer slice(){ return new NativeBuffer(buffer.slice()); }
-
-    @Override public String toString() {
-        final StringBuilder builder = new StringBuilder();
-
-        for(int i = 0; i < limit(); i += JObjCRuntime.PTR_LEN){
-            if(position() == i)
-                builder.append("*");
-            if(JObjCRuntime.IS32)
-                builder.append(buffer.getInt(i));
-            else
-                builder.append(buffer.getLong(i));
-            builder.append(" ");
-        }
-
-        return builder.toString();
-    }
-
-    public long positionPtr() {
-        return bufferPtr + position();
-    }
-
-    /**
-     * bufferPtr <= ptr && ptr < bufferPtr + capacity();
-     */
-    public boolean ptrInBounds(final long ptr){
-        return bufferPtr <= ptr && ptr < bufferPtr + capacity();
-    }
-}
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/NativeObjectLifecycleManager.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-
-
-public abstract class NativeObjectLifecycleManager {
-    private static native void retainNativeObject(final long ptr);
-    private static native void releaseNativeObject(final long ptr);
-    private static native void freeNativeObject(final long ptr);
-
-    abstract void begin(final long ptr);
-    abstract void end(final long ptr);
-    boolean shouldPreRetain() { return false; }
-
-    public static class CFRetainRelease extends NativeObjectLifecycleManager {
-        public static final NativeObjectLifecycleManager INST = new CFRetainRelease();
-        @Override void begin(final long ptr) { retainNativeObject(ptr); }
-        @Override void end(final long ptr) { releaseNativeObject(ptr); }
-        @Override boolean shouldPreRetain() { return true; }
-    }
-
-    public static class Free extends NativeObjectLifecycleManager {
-        public static final NativeObjectLifecycleManager INST = new Free();
-        @Override void begin(final long ptr) { }
-        @Override void end(final long ptr) { freeNativeObject(ptr); }
-    }
-
-    public static class Nothing extends NativeObjectLifecycleManager {
-        public static final NativeObjectLifecycleManager INST = new Nothing();
-        @Override void begin(final long ptr) { }
-        @Override void end(final long ptr) { }
-    }
-}
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Opaque.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-
-
-public class Opaque extends Pointer<Void> {
-    protected Opaque(long ptr) { super(ptr); }
-    protected Opaque(Pointer<?> ptr) { super(ptr.ptr); }
-}
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Pointer.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-
-
-public class Pointer <T> implements Comparable<Pointer<T>>{
-    long ptr;
-
-    protected Pointer(final long ptr) {
-        this.ptr = ptr;
-        getNativeObjectLifecycleManager().begin(ptr);
-    }
-
-    @Override protected final synchronized void finalize() throws Throwable {
-        long pptr = ptr;
-        ptr = 0;
-        if (pptr != 0) getNativeObjectLifecycleManager().end(pptr);
-    }
-
-    protected NativeObjectLifecycleManager getNativeObjectLifecycleManager() {
-        return NativeObjectLifecycleManager.Nothing.INST;
-    }
-
-    @Override public boolean equals(Object o) {
-        return o instanceof Pointer && ptr == ((Pointer) o).ptr;
-    }
-
-    @Override public int hashCode() { return (int)(ptr^(ptr>>>32)); }
-
-    public int compareTo(Pointer<T> o) {
-        if(this==o || ptr==o.ptr) return 0;
-        if(ptr < o.ptr) return -1;
-        return 1;
-    }
-}
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/PrimitiveCoder.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,700 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-import com.apple.jobjc.JObjCRuntime.Width;
-// Auto generated by PrimitiveCoder.hs
-// Do not edit by hand.
-public abstract class PrimitiveCoder<T> extends Coder<T>{
-    public PrimitiveCoder(int ffiTypeCode, String objCEncoding, Class jclass, Class jprim){
-        super(ffiTypeCode, objCEncoding, jclass, jprim);
-    }
-    public final boolean popBoolean(NativeArgumentBuffer args){
-        return popBoolean(args.runtime, args.retValPtr);
-    }
-    public abstract boolean popBoolean(JObjCRuntime runtime, long addr);
-
-    public final void push(NativeArgumentBuffer args, boolean x){
-        push(args.runtime, args.argValuesPtr, x);
-        args.didPutArgValue(sizeof());
-    }
-    public abstract void push(JObjCRuntime runtime, long addr, boolean x);
-
-
-    public final byte popByte(NativeArgumentBuffer args){
-        return popByte(args.runtime, args.retValPtr);
-    }
-    public abstract byte popByte(JObjCRuntime runtime, long addr);
-
-    public final void push(NativeArgumentBuffer args, byte x){
-        push(args.runtime, args.argValuesPtr, x);
-        args.didPutArgValue(sizeof());
-    }
-    public abstract void push(JObjCRuntime runtime, long addr, byte x);
-
-
-    public final char popChar(NativeArgumentBuffer args){
-        return popChar(args.runtime, args.retValPtr);
-    }
-    public abstract char popChar(JObjCRuntime runtime, long addr);
-
-    public final void push(NativeArgumentBuffer args, char x){
-        push(args.runtime, args.argValuesPtr, x);
-        args.didPutArgValue(sizeof());
-    }
-    public abstract void push(JObjCRuntime runtime, long addr, char x);
-
-
-    public final short popShort(NativeArgumentBuffer args){
-        return popShort(args.runtime, args.retValPtr);
-    }
-    public abstract short popShort(JObjCRuntime runtime, long addr);
-
-    public final void push(NativeArgumentBuffer args, short x){
-        push(args.runtime, args.argValuesPtr, x);
-        args.didPutArgValue(sizeof());
-    }
-    public abstract void push(JObjCRuntime runtime, long addr, short x);
-
-
-    public final int popInt(NativeArgumentBuffer args){
-        return popInt(args.runtime, args.retValPtr);
-    }
-    public abstract int popInt(JObjCRuntime runtime, long addr);
-
-    public final void push(NativeArgumentBuffer args, int x){
-        push(args.runtime, args.argValuesPtr, x);
-        args.didPutArgValue(sizeof());
-    }
-    public abstract void push(JObjCRuntime runtime, long addr, int x);
-
-
-    public final long popLong(NativeArgumentBuffer args){
-        return popLong(args.runtime, args.retValPtr);
-    }
-    public abstract long popLong(JObjCRuntime runtime, long addr);
-
-    public final void push(NativeArgumentBuffer args, long x){
-        push(args.runtime, args.argValuesPtr, x);
-        args.didPutArgValue(sizeof());
-    }
-    public abstract void push(JObjCRuntime runtime, long addr, long x);
-
-
-    public final float popFloat(NativeArgumentBuffer args){
-        return popFloat(args.runtime, args.retValPtr);
-    }
-    public abstract float popFloat(JObjCRuntime runtime, long addr);
-
-    public final void push(NativeArgumentBuffer args, float x){
-        push(args.runtime, args.argValuesPtr, x);
-        args.didPutArgValue(sizeof());
-    }
-    public abstract void push(JObjCRuntime runtime, long addr, float x);
-
-
-    public final double popDouble(NativeArgumentBuffer args){
-        return popDouble(args.runtime, args.retValPtr);
-    }
-    public abstract double popDouble(JObjCRuntime runtime, long addr);
-
-    public final void push(NativeArgumentBuffer args, double x){
-        push(args.runtime, args.argValuesPtr, x);
-        args.didPutArgValue(sizeof());
-    }
-    public abstract void push(JObjCRuntime runtime, long addr, double x);
-
-
-// native BOOL -> java boolean
-public static final class BoolCoder extends PrimitiveCoder<Boolean>{
-    public static final BoolCoder INST = new BoolCoder();
-    public BoolCoder(){ super(FFI_SINT8, "B", Boolean.class, boolean.class); }
-    // compile time
-    @Override public void push(JObjCRuntime rt, long addr, boolean x){
-        rt.unsafe.putByte(addr, (byte) (x ? 1 : 0));
-    }
-    @Override public boolean popBoolean(JObjCRuntime rt, long addr){
-        return rt.unsafe.getByte(addr) != 0;
-    }
-    // for runtime coding
-    @Override public int sizeof(Width w){
-        return 1;
-    }
-    @Override public void push(JObjCRuntime rt, long addr, Boolean x){ push(rt, addr, (boolean) x); }
-    @Override public Boolean pop(JObjCRuntime rt, long addr){ return popBoolean(rt, addr); }
-    // proxies for mixed encoding
-
-    @Override public void push(JObjCRuntime rt, long addr, byte x){ push(rt, addr, (x != 0)); }
-    @Override public byte popByte(JObjCRuntime rt, long addr){ return ((byte)(popBoolean(rt, addr) ? 1 : 0)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, char x){ push(rt, addr, (x != 0)); }
-    @Override public char popChar(JObjCRuntime rt, long addr){ return ((char)(popBoolean(rt, addr) ? 1 : 0)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, short x){ push(rt, addr, (x != 0)); }
-    @Override public short popShort(JObjCRuntime rt, long addr){ return ((short)(popBoolean(rt, addr) ? 1 : 0)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, int x){ push(rt, addr, (x != 0)); }
-    @Override public int popInt(JObjCRuntime rt, long addr){ return ((int)(popBoolean(rt, addr) ? 1 : 0)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, long x){ push(rt, addr, (x != 0)); }
-    @Override public long popLong(JObjCRuntime rt, long addr){ return ((long)(popBoolean(rt, addr) ? 1 : 0)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, float x){ push(rt, addr, (x != 0)); }
-    @Override public float popFloat(JObjCRuntime rt, long addr){ return ((float)(popBoolean(rt, addr) ? 1 : 0)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, double x){ push(rt, addr, (x != 0)); }
-    @Override public double popDouble(JObjCRuntime rt, long addr){ return ((double)(popBoolean(rt, addr) ? 1 : 0)); }
-
-
-}
-
-// native schar -> java byte
-public static final class SCharCoder extends PrimitiveCoder<Byte>{
-    public static final SCharCoder INST = new SCharCoder();
-    public SCharCoder(){ super(FFI_SINT8, "c", Byte.class, byte.class); }
-    // compile time
-    @Override public void push(JObjCRuntime rt, long addr, byte x){
-        rt.unsafe.putByte(addr, x);
-    }
-    @Override public byte popByte(JObjCRuntime rt, long addr){
-        return rt.unsafe.getByte(addr);
-    }
-    // for runtime coding
-    @Override public int sizeof(Width w){
-        return 1;
-    }
-    @Override public void push(JObjCRuntime rt, long addr, Byte x){ push(rt, addr, (byte) x); }
-    @Override public Byte pop(JObjCRuntime rt, long addr){ return popByte(rt, addr); }
-    // proxies for mixed encoding
-    @Override public void push(JObjCRuntime rt, long addr, boolean x){ push(rt, addr, ((byte)(x ? 1 : 0))); }
-    @Override public boolean popBoolean(JObjCRuntime rt, long addr){ return (popByte(rt, addr) != 0); }
-
-
-    @Override public void push(JObjCRuntime rt, long addr, char x){ push(rt, addr, ((byte)x)); }
-    @Override public char popChar(JObjCRuntime rt, long addr){ return ((char)popByte(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, short x){ push(rt, addr, ((byte)x)); }
-    @Override public short popShort(JObjCRuntime rt, long addr){ return ((short)popByte(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, int x){ push(rt, addr, ((byte)x)); }
-    @Override public int popInt(JObjCRuntime rt, long addr){ return ((int)popByte(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, long x){ push(rt, addr, ((byte)x)); }
-    @Override public long popLong(JObjCRuntime rt, long addr){ return ((long)popByte(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, float x){ push(rt, addr, ((byte)x)); }
-    @Override public float popFloat(JObjCRuntime rt, long addr){ return ((float)popByte(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, double x){ push(rt, addr, ((byte)x)); }
-    @Override public double popDouble(JObjCRuntime rt, long addr){ return ((double)popByte(rt, addr)); }
-
-
-}
-
-// native uchar -> java byte
-public static final class UCharCoder extends PrimitiveCoder<Byte>{
-    public static final UCharCoder INST = new UCharCoder();
-    public UCharCoder(){ super(FFI_UINT8, "C", Byte.class, byte.class); }
-    // compile time
-    @Override public void push(JObjCRuntime rt, long addr, byte x){
-        rt.unsafe.putByte(addr, x);
-    }
-    @Override public byte popByte(JObjCRuntime rt, long addr){
-        return rt.unsafe.getByte(addr);
-    }
-    // for runtime coding
-    @Override public int sizeof(Width w){
-        return 1;
-    }
-    @Override public void push(JObjCRuntime rt, long addr, Byte x){ push(rt, addr, (byte) x); }
-    @Override public Byte pop(JObjCRuntime rt, long addr){ return popByte(rt, addr); }
-    // proxies for mixed encoding
-    @Override public void push(JObjCRuntime rt, long addr, boolean x){ push(rt, addr, ((byte)(x ? 1 : 0))); }
-    @Override public boolean popBoolean(JObjCRuntime rt, long addr){ return (popByte(rt, addr) != 0); }
-
-
-    @Override public void push(JObjCRuntime rt, long addr, char x){ push(rt, addr, ((byte)x)); }
-    @Override public char popChar(JObjCRuntime rt, long addr){ return ((char)popByte(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, short x){ push(rt, addr, ((byte)x)); }
-    @Override public short popShort(JObjCRuntime rt, long addr){ return ((short)popByte(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, int x){ push(rt, addr, ((byte)x)); }
-    @Override public int popInt(JObjCRuntime rt, long addr){ return ((int)popByte(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, long x){ push(rt, addr, ((byte)x)); }
-    @Override public long popLong(JObjCRuntime rt, long addr){ return ((long)popByte(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, float x){ push(rt, addr, ((byte)x)); }
-    @Override public float popFloat(JObjCRuntime rt, long addr){ return ((float)popByte(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, double x){ push(rt, addr, ((byte)x)); }
-    @Override public double popDouble(JObjCRuntime rt, long addr){ return ((double)popByte(rt, addr)); }
-
-
-}
-
-// native sshort -> java short
-public static final class SShortCoder extends PrimitiveCoder<Short>{
-    public static final SShortCoder INST = new SShortCoder();
-    public SShortCoder(){ super(FFI_SINT16, "s", Short.class, short.class); }
-    // compile time
-    @Override public void push(JObjCRuntime rt, long addr, short x){
-        rt.unsafe.putShort(addr, (short) x);
-    }
-    @Override public short popShort(JObjCRuntime rt, long addr){
-        return rt.unsafe.getShort(addr);
-    }
-    // for runtime coding
-    @Override public int sizeof(Width w){
-        return 2;
-    }
-    @Override public void push(JObjCRuntime rt, long addr, Short x){ push(rt, addr, (short) x); }
-    @Override public Short pop(JObjCRuntime rt, long addr){ return popShort(rt, addr); }
-    // proxies for mixed encoding
-    @Override public void push(JObjCRuntime rt, long addr, boolean x){ push(rt, addr, ((short)(x ? 1 : 0))); }
-    @Override public boolean popBoolean(JObjCRuntime rt, long addr){ return (popShort(rt, addr) != 0); }
-
-    @Override public void push(JObjCRuntime rt, long addr, byte x){ push(rt, addr, ((short)x)); }
-    @Override public byte popByte(JObjCRuntime rt, long addr){ return ((byte)popShort(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, char x){ push(rt, addr, ((short)x)); }
-    @Override public char popChar(JObjCRuntime rt, long addr){ return ((char)popShort(rt, addr)); }
-
-
-    @Override public void push(JObjCRuntime rt, long addr, int x){ push(rt, addr, ((short)x)); }
-    @Override public int popInt(JObjCRuntime rt, long addr){ return ((int)popShort(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, long x){ push(rt, addr, ((short)x)); }
-    @Override public long popLong(JObjCRuntime rt, long addr){ return ((long)popShort(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, float x){ push(rt, addr, ((short)x)); }
-    @Override public float popFloat(JObjCRuntime rt, long addr){ return ((float)popShort(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, double x){ push(rt, addr, ((short)x)); }
-    @Override public double popDouble(JObjCRuntime rt, long addr){ return ((double)popShort(rt, addr)); }
-
-
-}
-
-// native ushort -> java short
-public static final class UShortCoder extends PrimitiveCoder<Short>{
-    public static final UShortCoder INST = new UShortCoder();
-    public UShortCoder(){ super(FFI_UINT16, "S", Short.class, short.class); }
-    // compile time
-    @Override public void push(JObjCRuntime rt, long addr, short x){
-        rt.unsafe.putShort(addr, (short) x);
-    }
-    @Override public short popShort(JObjCRuntime rt, long addr){
-        return rt.unsafe.getShort(addr);
-    }
-    // for runtime coding
-    @Override public int sizeof(Width w){
-        return 2;
-    }
-    @Override public void push(JObjCRuntime rt, long addr, Short x){ push(rt, addr, (short) x); }
-    @Override public Short pop(JObjCRuntime rt, long addr){ return popShort(rt, addr); }
-    // proxies for mixed encoding
-    @Override public void push(JObjCRuntime rt, long addr, boolean x){ push(rt, addr, ((short)(x ? 1 : 0))); }
-    @Override public boolean popBoolean(JObjCRuntime rt, long addr){ return (popShort(rt, addr) != 0); }
-
-    @Override public void push(JObjCRuntime rt, long addr, byte x){ push(rt, addr, ((short)x)); }
-    @Override public byte popByte(JObjCRuntime rt, long addr){ return ((byte)popShort(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, char x){ push(rt, addr, ((short)x)); }
-    @Override public char popChar(JObjCRuntime rt, long addr){ return ((char)popShort(rt, addr)); }
-
-
-    @Override public void push(JObjCRuntime rt, long addr, int x){ push(rt, addr, ((short)x)); }
-    @Override public int popInt(JObjCRuntime rt, long addr){ return ((int)popShort(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, long x){ push(rt, addr, ((short)x)); }
-    @Override public long popLong(JObjCRuntime rt, long addr){ return ((long)popShort(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, float x){ push(rt, addr, ((short)x)); }
-    @Override public float popFloat(JObjCRuntime rt, long addr){ return ((float)popShort(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, double x){ push(rt, addr, ((short)x)); }
-    @Override public double popDouble(JObjCRuntime rt, long addr){ return ((double)popShort(rt, addr)); }
-
-
-}
-
-// native sint -> java int
-public static final class SIntCoder extends PrimitiveCoder<Integer>{
-    public static final SIntCoder INST = new SIntCoder();
-    public SIntCoder(){ super(FFI_SINT32, "i", Integer.class, int.class); }
-    // compile time
-    @Override public void push(JObjCRuntime rt, long addr, int x){
-        rt.unsafe.putInt(addr, (int) x);
-    }
-    @Override public int popInt(JObjCRuntime rt, long addr){
-        return rt.unsafe.getInt(addr);
-    }
-    // for runtime coding
-    @Override public int sizeof(Width w){
-        return 4;
-    }
-    @Override public void push(JObjCRuntime rt, long addr, Integer x){ push(rt, addr, (int) x); }
-    @Override public Integer pop(JObjCRuntime rt, long addr){ return popInt(rt, addr); }
-    // proxies for mixed encoding
-    @Override public void push(JObjCRuntime rt, long addr, boolean x){ push(rt, addr, ((int)(x ? 1 : 0))); }
-    @Override public boolean popBoolean(JObjCRuntime rt, long addr){ return (popInt(rt, addr) != 0); }
-
-    @Override public void push(JObjCRuntime rt, long addr, byte x){ push(rt, addr, ((int)x)); }
-    @Override public byte popByte(JObjCRuntime rt, long addr){ return ((byte)popInt(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, char x){ push(rt, addr, ((int)x)); }
-    @Override public char popChar(JObjCRuntime rt, long addr){ return ((char)popInt(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, short x){ push(rt, addr, ((int)x)); }
-    @Override public short popShort(JObjCRuntime rt, long addr){ return ((short)popInt(rt, addr)); }
-
-
-    @Override public void push(JObjCRuntime rt, long addr, long x){ push(rt, addr, ((int)x)); }
-    @Override public long popLong(JObjCRuntime rt, long addr){ return ((long)popInt(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, float x){ push(rt, addr, ((int)x)); }
-    @Override public float popFloat(JObjCRuntime rt, long addr){ return ((float)popInt(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, double x){ push(rt, addr, ((int)x)); }
-    @Override public double popDouble(JObjCRuntime rt, long addr){ return ((double)popInt(rt, addr)); }
-
-
-}
-
-// native uint -> java int
-public static final class UIntCoder extends PrimitiveCoder<Integer>{
-    public static final UIntCoder INST = new UIntCoder();
-    public UIntCoder(){ super(FFI_UINT32, "I", Integer.class, int.class); }
-    // compile time
-    @Override public void push(JObjCRuntime rt, long addr, int x){
-        rt.unsafe.putInt(addr, (int) x);
-    }
-    @Override public int popInt(JObjCRuntime rt, long addr){
-        return rt.unsafe.getInt(addr);
-    }
-    // for runtime coding
-    @Override public int sizeof(Width w){
-        return 4;
-    }
-    @Override public void push(JObjCRuntime rt, long addr, Integer x){ push(rt, addr, (int) x); }
-    @Override public Integer pop(JObjCRuntime rt, long addr){ return popInt(rt, addr); }
-    // proxies for mixed encoding
-    @Override public void push(JObjCRuntime rt, long addr, boolean x){ push(rt, addr, ((int)(x ? 1 : 0))); }
-    @Override public boolean popBoolean(JObjCRuntime rt, long addr){ return (popInt(rt, addr) != 0); }
-
-    @Override public void push(JObjCRuntime rt, long addr, byte x){ push(rt, addr, ((int)x)); }
-    @Override public byte popByte(JObjCRuntime rt, long addr){ return ((byte)popInt(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, char x){ push(rt, addr, ((int)x)); }
-    @Override public char popChar(JObjCRuntime rt, long addr){ return ((char)popInt(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, short x){ push(rt, addr, ((int)x)); }
-    @Override public short popShort(JObjCRuntime rt, long addr){ return ((short)popInt(rt, addr)); }
-
-
-    @Override public void push(JObjCRuntime rt, long addr, long x){ push(rt, addr, ((int)x)); }
-    @Override public long popLong(JObjCRuntime rt, long addr){ return ((long)popInt(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, float x){ push(rt, addr, ((int)x)); }
-    @Override public float popFloat(JObjCRuntime rt, long addr){ return ((float)popInt(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, double x){ push(rt, addr, ((int)x)); }
-    @Override public double popDouble(JObjCRuntime rt, long addr){ return ((double)popInt(rt, addr)); }
-
-
-}
-
-// native slong -> java long
-public static final class SLongCoder extends PrimitiveCoder<Long>{
-    public static final SLongCoder INST = new SLongCoder();
-    public SLongCoder(){ super((JObjCRuntime.IS64 ? (FFI_SINT64) : (FFI_SINT32)), "l", Long.class, long.class); }
-    // compile time
-    @Override public void push(JObjCRuntime rt, long addr, long x){
-        if(JObjCRuntime.IS64){ rt.unsafe.putLong(addr, (long) x); }else{ rt.unsafe.putInt(addr, (int) x); }
-    }
-    @Override public long popLong(JObjCRuntime rt, long addr){
-        return (JObjCRuntime.IS64 ? (rt.unsafe.getLong(addr)) : (rt.unsafe.getInt(addr)));
-    }
-    // for runtime coding
-    @Override public int sizeof(Width w){
-        switch(w){
-            case W32: return 4;
-            case W64: return 8;
-
-        default: return -1;
-        }
-
-    }
-    @Override public void push(JObjCRuntime rt, long addr, Long x){ push(rt, addr, (long) x); }
-    @Override public Long pop(JObjCRuntime rt, long addr){ return popLong(rt, addr); }
-    // proxies for mixed encoding
-    @Override public void push(JObjCRuntime rt, long addr, boolean x){ push(rt, addr, ((long)(x ? 1 : 0))); }
-    @Override public boolean popBoolean(JObjCRuntime rt, long addr){ return (popLong(rt, addr) != 0); }
-
-    @Override public void push(JObjCRuntime rt, long addr, byte x){ push(rt, addr, ((long)x)); }
-    @Override public byte popByte(JObjCRuntime rt, long addr){ return ((byte)popLong(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, char x){ push(rt, addr, ((long)x)); }
-    @Override public char popChar(JObjCRuntime rt, long addr){ return ((char)popLong(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, short x){ push(rt, addr, ((long)x)); }
-    @Override public short popShort(JObjCRuntime rt, long addr){ return ((short)popLong(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, int x){ push(rt, addr, ((long)x)); }
-    @Override public int popInt(JObjCRuntime rt, long addr){ return ((int)popLong(rt, addr)); }
-
-
-    @Override public void push(JObjCRuntime rt, long addr, float x){ push(rt, addr, ((long)x)); }
-    @Override public float popFloat(JObjCRuntime rt, long addr){ return ((float)popLong(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, double x){ push(rt, addr, ((long)x)); }
-    @Override public double popDouble(JObjCRuntime rt, long addr){ return ((double)popLong(rt, addr)); }
-
-
-}
-
-// native ulong -> java long
-public static final class ULongCoder extends PrimitiveCoder<Long>{
-    public static final ULongCoder INST = new ULongCoder();
-    public ULongCoder(){ super((JObjCRuntime.IS64 ? (FFI_UINT64) : (FFI_UINT32)), "L", Long.class, long.class); }
-    // compile time
-    @Override public void push(JObjCRuntime rt, long addr, long x){
-        if(JObjCRuntime.IS64){ rt.unsafe.putLong(addr, (long) x); }else{ rt.unsafe.putInt(addr, (int) x); }
-    }
-    @Override public long popLong(JObjCRuntime rt, long addr){
-        return (JObjCRuntime.IS64 ? (rt.unsafe.getLong(addr)) : (rt.unsafe.getInt(addr)));
-    }
-    // for runtime coding
-    @Override public int sizeof(Width w){
-        switch(w){
-            case W32: return 4;
-            case W64: return 8;
-
-        default: return -1;
-        }
-
-    }
-    @Override public void push(JObjCRuntime rt, long addr, Long x){ push(rt, addr, (long) x); }
-    @Override public Long pop(JObjCRuntime rt, long addr){ return popLong(rt, addr); }
-    // proxies for mixed encoding
-    @Override public void push(JObjCRuntime rt, long addr, boolean x){ push(rt, addr, ((long)(x ? 1 : 0))); }
-    @Override public boolean popBoolean(JObjCRuntime rt, long addr){ return (popLong(rt, addr) != 0); }
-
-    @Override public void push(JObjCRuntime rt, long addr, byte x){ push(rt, addr, ((long)x)); }
-    @Override public byte popByte(JObjCRuntime rt, long addr){ return ((byte)popLong(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, char x){ push(rt, addr, ((long)x)); }
-    @Override public char popChar(JObjCRuntime rt, long addr){ return ((char)popLong(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, short x){ push(rt, addr, ((long)x)); }
-    @Override public short popShort(JObjCRuntime rt, long addr){ return ((short)popLong(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, int x){ push(rt, addr, ((long)x)); }
-    @Override public int popInt(JObjCRuntime rt, long addr){ return ((int)popLong(rt, addr)); }
-
-
-    @Override public void push(JObjCRuntime rt, long addr, float x){ push(rt, addr, ((long)x)); }
-    @Override public float popFloat(JObjCRuntime rt, long addr){ return ((float)popLong(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, double x){ push(rt, addr, ((long)x)); }
-    @Override public double popDouble(JObjCRuntime rt, long addr){ return ((double)popLong(rt, addr)); }
-
-
-}
-
-// native slonglong -> java long
-public static final class SLongLongCoder extends PrimitiveCoder<Long>{
-    public static final SLongLongCoder INST = new SLongLongCoder();
-    public SLongLongCoder(){ super(FFI_SINT64, "q", Long.class, long.class); }
-    // compile time
-    @Override public void push(JObjCRuntime rt, long addr, long x){
-        rt.unsafe.putLong(addr, (long) x);
-    }
-    @Override public long popLong(JObjCRuntime rt, long addr){
-        return rt.unsafe.getLong(addr);
-    }
-    // for runtime coding
-    @Override public int sizeof(Width w){
-        return 8;
-    }
-    @Override public void push(JObjCRuntime rt, long addr, Long x){ push(rt, addr, (long) x); }
-    @Override public Long pop(JObjCRuntime rt, long addr){ return popLong(rt, addr); }
-    // proxies for mixed encoding
-    @Override public void push(JObjCRuntime rt, long addr, boolean x){ push(rt, addr, ((long)(x ? 1 : 0))); }
-    @Override public boolean popBoolean(JObjCRuntime rt, long addr){ return (popLong(rt, addr) != 0); }
-
-    @Override public void push(JObjCRuntime rt, long addr, byte x){ push(rt, addr, ((long)x)); }
-    @Override public byte popByte(JObjCRuntime rt, long addr){ return ((byte)popLong(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, char x){ push(rt, addr, ((long)x)); }
-    @Override public char popChar(JObjCRuntime rt, long addr){ return ((char)popLong(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, short x){ push(rt, addr, ((long)x)); }
-    @Override public short popShort(JObjCRuntime rt, long addr){ return ((short)popLong(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, int x){ push(rt, addr, ((long)x)); }
-    @Override public int popInt(JObjCRuntime rt, long addr){ return ((int)popLong(rt, addr)); }
-
-
-    @Override public void push(JObjCRuntime rt, long addr, float x){ push(rt, addr, ((long)x)); }
-    @Override public float popFloat(JObjCRuntime rt, long addr){ return ((float)popLong(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, double x){ push(rt, addr, ((long)x)); }
-    @Override public double popDouble(JObjCRuntime rt, long addr){ return ((double)popLong(rt, addr)); }
-
-
-}
-
-// native ulonglong -> java long
-public static final class ULongLongCoder extends PrimitiveCoder<Long>{
-    public static final ULongLongCoder INST = new ULongLongCoder();
-    public ULongLongCoder(){ super(FFI_UINT64, "Q", Long.class, long.class); }
-    // compile time
-    @Override public void push(JObjCRuntime rt, long addr, long x){
-        rt.unsafe.putLong(addr, (long) x);
-    }
-    @Override public long popLong(JObjCRuntime rt, long addr){
-        return rt.unsafe.getLong(addr);
-    }
-    // for runtime coding
-    @Override public int sizeof(Width w){
-        return 8;
-    }
-    @Override public void push(JObjCRuntime rt, long addr, Long x){ push(rt, addr, (long) x); }
-    @Override public Long pop(JObjCRuntime rt, long addr){ return popLong(rt, addr); }
-    // proxies for mixed encoding
-    @Override public void push(JObjCRuntime rt, long addr, boolean x){ push(rt, addr, ((long)(x ? 1 : 0))); }
-    @Override public boolean popBoolean(JObjCRuntime rt, long addr){ return (popLong(rt, addr) != 0); }
-
-    @Override public void push(JObjCRuntime rt, long addr, byte x){ push(rt, addr, ((long)x)); }
-    @Override public byte popByte(JObjCRuntime rt, long addr){ return ((byte)popLong(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, char x){ push(rt, addr, ((long)x)); }
-    @Override public char popChar(JObjCRuntime rt, long addr){ return ((char)popLong(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, short x){ push(rt, addr, ((long)x)); }
-    @Override public short popShort(JObjCRuntime rt, long addr){ return ((short)popLong(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, int x){ push(rt, addr, ((long)x)); }
-    @Override public int popInt(JObjCRuntime rt, long addr){ return ((int)popLong(rt, addr)); }
-
-
-    @Override public void push(JObjCRuntime rt, long addr, float x){ push(rt, addr, ((long)x)); }
-    @Override public float popFloat(JObjCRuntime rt, long addr){ return ((float)popLong(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, double x){ push(rt, addr, ((long)x)); }
-    @Override public double popDouble(JObjCRuntime rt, long addr){ return ((double)popLong(rt, addr)); }
-
-
-}
-
-// native float -> java float
-public static final class FloatCoder extends PrimitiveCoder<Float>{
-    public static final FloatCoder INST = new FloatCoder();
-    public FloatCoder(){ super(FFI_FLOAT, "f", Float.class, float.class); }
-    // compile time
-    @Override public void push(JObjCRuntime rt, long addr, float x){
-        rt.unsafe.putFloat(addr, (float) x);
-    }
-    @Override public float popFloat(JObjCRuntime rt, long addr){
-        return rt.unsafe.getFloat(addr);
-    }
-    // for runtime coding
-    @Override public int sizeof(Width w){
-        return 4;
-    }
-    @Override public void push(JObjCRuntime rt, long addr, Float x){ push(rt, addr, (float) x); }
-    @Override public Float pop(JObjCRuntime rt, long addr){ return popFloat(rt, addr); }
-    // proxies for mixed encoding
-    @Override public void push(JObjCRuntime rt, long addr, boolean x){ push(rt, addr, ((float)(x ? 1 : 0))); }
-    @Override public boolean popBoolean(JObjCRuntime rt, long addr){ return (popFloat(rt, addr) != 0); }
-
-    @Override public void push(JObjCRuntime rt, long addr, byte x){ push(rt, addr, ((float)x)); }
-    @Override public byte popByte(JObjCRuntime rt, long addr){ return ((byte)popFloat(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, char x){ push(rt, addr, ((float)x)); }
-    @Override public char popChar(JObjCRuntime rt, long addr){ return ((char)popFloat(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, short x){ push(rt, addr, ((float)x)); }
-    @Override public short popShort(JObjCRuntime rt, long addr){ return ((short)popFloat(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, int x){ push(rt, addr, ((float)x)); }
-    @Override public int popInt(JObjCRuntime rt, long addr){ return ((int)popFloat(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, long x){ push(rt, addr, ((float)x)); }
-    @Override public long popLong(JObjCRuntime rt, long addr){ return ((long)popFloat(rt, addr)); }
-
-
-    @Override public void push(JObjCRuntime rt, long addr, double x){ push(rt, addr, ((float)x)); }
-    @Override public double popDouble(JObjCRuntime rt, long addr){ return ((double)popFloat(rt, addr)); }
-
-
-}
-
-// native double -> java double
-public static final class DoubleCoder extends PrimitiveCoder<Double>{
-    public static final DoubleCoder INST = new DoubleCoder();
-    public DoubleCoder(){ super(FFI_DOUBLE, "d", Double.class, double.class); }
-    // compile time
-    @Override public void push(JObjCRuntime rt, long addr, double x){
-        rt.unsafe.putDouble(addr, (double) x);
-    }
-    @Override public double popDouble(JObjCRuntime rt, long addr){
-        return rt.unsafe.getDouble(addr);
-    }
-    // for runtime coding
-    @Override public int sizeof(Width w){
-        return 8;
-    }
-    @Override public void push(JObjCRuntime rt, long addr, Double x){ push(rt, addr, (double) x); }
-    @Override public Double pop(JObjCRuntime rt, long addr){ return popDouble(rt, addr); }
-    // proxies for mixed encoding
-    @Override public void push(JObjCRuntime rt, long addr, boolean x){ push(rt, addr, ((double)(x ? 1 : 0))); }
-    @Override public boolean popBoolean(JObjCRuntime rt, long addr){ return (popDouble(rt, addr) != 0); }
-
-    @Override public void push(JObjCRuntime rt, long addr, byte x){ push(rt, addr, ((double)x)); }
-    @Override public byte popByte(JObjCRuntime rt, long addr){ return ((byte)popDouble(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, char x){ push(rt, addr, ((double)x)); }
-    @Override public char popChar(JObjCRuntime rt, long addr){ return ((char)popDouble(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, short x){ push(rt, addr, ((double)x)); }
-    @Override public short popShort(JObjCRuntime rt, long addr){ return ((short)popDouble(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, int x){ push(rt, addr, ((double)x)); }
-    @Override public int popInt(JObjCRuntime rt, long addr){ return ((int)popDouble(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, long x){ push(rt, addr, ((double)x)); }
-    @Override public long popLong(JObjCRuntime rt, long addr){ return ((long)popDouble(rt, addr)); }
-
-    @Override public void push(JObjCRuntime rt, long addr, float x){ push(rt, addr, ((double)x)); }
-    @Override public float popFloat(JObjCRuntime rt, long addr){ return ((float)popDouble(rt, addr)); }
-
-
-
-}
-
-}
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/SEL.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-
-
-public class SEL {
-    static native long getSelectorPtr(String selectorName);
-    static native String getSelectorName(long ptr);
-
-    final long selPtr;
-
-    SEL(long ptr) {
-        this.selPtr = ptr;
-    }
-
-    public SEL(final String name) {
-        this(getSelectorPtr(name));
-    }
-
-    @Override public String toString(){
-        return ((int)selPtr) + " / " + selPtr + " : " + getSelectorName(selPtr);
-    }
-
-    /**
-     * Converts something like "performSelectorOnMainThread_withObject_wait"
-     * to "performSelectorOnMainThread:withObject:wait:"
-     */
-    public static String selectorName(String jMethodName, boolean hasArgs){
-        String b = jMethodName.replaceAll("_", ":");
-        return hasArgs ? b + ":" : b;
-    }
-
-    public static String jMethodName(String selectorName){
-        return selectorName.replaceAll(":", "_").replaceAll("_$", "");
-    }
-
-    public static boolean validName(String selectorName){
-        return selectorName.matches("^[a-zA-Z_][a-zA-Z0-9_:]*$");
-    }
-}
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Struct.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-
-
-/**
- * A struct is malloced on the C heap and accessed in Java through a ByteBuffer.
- */
-public abstract class Struct{
-    protected final NativeBuffer raw;
-    private final JObjCRuntime runtime;
-    protected final JObjCRuntime getRuntime(){ return runtime; }
-
-    /**
-     * Create a brand new struct from nothing.
-     */
-    protected Struct(final JObjCRuntime runtime, final int SIZEOF){
-        this(runtime, new NativeBuffer(SIZEOF), SIZEOF);
-    }
-
-    /**
-     * Create a struct by taking ownership of an existing buffer.
-     * Used for struct fields of type struct. For example, the origin and size fields
-     * in NSRect would be initialized with this constructor.
-     */
-    protected Struct(final JObjCRuntime runtime, final NativeBuffer buffer, final int SIZEOF){
-        if(runtime == null) throw new NullPointerException("runtime");
-        this.runtime = runtime;
-        this.raw = buffer;
-        this.raw.limit(SIZEOF);
-    }
-
-    abstract public Coder getCoder();
-}
--- a/src/macosx/native/jobjc/src/core/java/com/apple/jobjc/Subclassing.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.jobjc;
-
-import java.io.StringWriter;
-import java.lang.reflect.Method;
-import java.util.HashSet;
-import java.util.Set;
-
-import com.apple.jobjc.Coder.PrimitivePointerCoder;
-import com.apple.jobjc.Coder.VoidCoder;
-import com.apple.jobjc.Invoke.MsgSend;
-
-
-final class Subclassing {
-    static native long allocateClassPair(long superClass, String name);
-    static native boolean addIVarForJObj(long clazz);
-    static native boolean patchAlloc(long classPtr);
-    static native boolean addMethod(long cls, String name, Method jMethod, CIF cif, long cifPtr, String objCEncodedType);
-    static native void registerClassPair(long clazz);
-
-    static native <T extends ID> T getJObjectFromIVar(long objPtr);
-    static native void initJObjectToIVar(long objPtr, ID object);
-
-    final Set<Long> registeredUserSubclasses = new HashSet<Long>();
-    final JObjCRuntime runtime;
-
-    Subclassing(JObjCRuntime runtime){
-        this.runtime = runtime;
-    }
-
-    boolean registerUserClass(final Class<? extends ID> clazz, final Class<? extends NSClass> clazzClazz) {
-        final String nativeClassName = clazz.getSimpleName();
-        // Is it already registered?
-        if(0 != NSClass.getNativeClassByName(nativeClassName))
-            return false;
-
-        if(clazz.isAnonymousClass())
-            throw new RuntimeException("JObjC cannot register anonymous classes.");
-
-        // Verify superclass
-        long superClass = NSClass.getNativeClassByName(clazz.getSuperclass().getSimpleName());
-        if(0 == superClass)
-            throw new RuntimeException(clazz.getSuperclass() + ", the superclass of " + clazz + ", must be a registered class.");
-
-        runtime.registerPackage(clazz.getPackage().getName());
-
-        // Create class
-        long classPtr = Subclassing.allocateClassPair(superClass, nativeClassName);
-        if(classPtr == 0) throw new RuntimeException("objc_allocateClassPair returned 0.");
-
-        // Add ivar to hold jobject
-        boolean addedI = Subclassing.addIVarForJObj(classPtr);
-        if(!addedI) throw new RuntimeException("class_addIvar returned false.");
-
-        // Verify constructor
-        try {
-            clazz.getConstructor(ID.CTOR_ARGS);
-        } catch (Exception e) {
-            throw new RuntimeException("Could not access required constructor: " + ID.CTOR_ARGS, e);
-        }
-
-        // Patch alloc to create corresponding jobject on invoke
-        patchAlloc(classPtr);
-
-        // Add methods
-        Set<String> takenSelNames = new HashSet<String>();
-        for(Method method : clazz.getDeclaredMethods()){
-            // No overloading
-            String selName = SEL.selectorName(method.getName(), method.getParameterTypes().length > 0);
-            if(takenSelNames.contains(selName))
-                throw new RuntimeException("Obj-C does not allow method overloading. The Objective-C selector '"
-                        + selName + "' appears more than once in class " + clazz.getCanonicalName() + " / " + nativeClassName + ".");
-
-            method.setAccessible(true);
-
-            // Divine CIF
-            Coder returnCoder = Coder.getCoderAtRuntimeForType(method.getReturnType());
-            Class[] paramTypes = method.getParameterTypes();
-            Coder[] argCoders = new Coder[paramTypes.length];
-            for(int i = 0; i < paramTypes.length; i++)
-                argCoders[i] = Coder.getCoderAtRuntimeForType(paramTypes[i]);
-
-            CIF cif = new MsgSend(runtime, selName, returnCoder, argCoders).funCall.cif;
-
-            // .. and objc encoding
-            StringWriter encType = new StringWriter();
-            encType.append(returnCoder.getObjCEncoding());
-            encType.append("@:");
-            for(int i = 0; i < argCoders.length; i++)
-                encType.append(argCoders[i].getObjCEncoding());
-
-            // Add it!
-            boolean addedM = Subclassing.addMethod(classPtr, selName, method, cif, cif.cif.bufferPtr, encType.toString());
-            if(!addedM) throw new RuntimeException("Failed to add method.");
-            takenSelNames.add(selName);
-        }
-
-        // Seal it
-        Subclassing.registerClassPair(classPtr);
-        registeredUserSubclasses.add(classPtr);
-
-        return true;
-    }
-
-    boolean isUserClass(long clsPtr) {
-        return registeredUserSubclasses.contains(clsPtr);
-    }
-
-    // Called from JNI
-
-    private static void initJObject(final long objPtr){
-//        System.err.println("initJObject " + objPtr + " / " + Long.toHexString(objPtr));
-        ID newObj = ID.createNewObjCObjectFor(JObjCRuntime.inst(), objPtr, NSClass.getClass(objPtr));
-//        System.err.println("... " + newObj);
-        initJObjectToIVar(objPtr, newObj);
-    }
-
-    private static void invokeFromJNI(ID obj, Method method, CIF cif, long result, long args){
-        assert obj != null;
-        assert obj.getClass().equals(method.getDeclaringClass()) :
-            obj.getClass().toString() + " != " + method.getDeclaringClass().toString();
-
-        final int argCount = method.getParameterTypes().length;
-
-        // The first two args & coders are for objc id and sel. Skip them.
-        final Object[] argObjects = new Object[argCount];
-        for(int i = 0; i < argCount; i++){
-            final long argAddrAddr = args + ((i+2) * JObjCRuntime.PTR_LEN);
-            final long argAddr = PrimitivePointerCoder.INST.popPtr(obj.runtime, argAddrAddr);
-            argObjects[i] = cif.argCoders[i + 2].pop(obj.runtime, argAddr);
-        }
-
-        Object retVal;
-        try {
-            retVal = method.invoke(obj, argObjects);
-        } catch (Exception e) {
-            e.printStackTrace();
-            throw new RuntimeException(e);
-        }
-
-        if(!(cif.returnCoder instanceof VoidCoder))
-            cif.returnCoder.push(obj.runtime, result, retVal);
-    }
-}
--- a/src/macosx/native/jobjc/src/core/native/CIF.m	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "com_apple_jobjc_CIF.h"
-
-#define MACOSX
-#include <ffi/ffi.h>
-#include <JavaNativeFoundation/JavaNativeFoundation.h>
-
-#include "NativeBuffer.h"
-
-JNIEXPORT jint JNICALL Java_com_apple_jobjc_CIF_getSizeofCIF
-(JNIEnv *env, jclass clazz)
-{
-    return (jint) sizeof(ffi_cif);
-}
-
-JNIEXPORT jboolean JNICALL Java_com_apple_jobjc_CIF_prepCIF
-(JNIEnv *env, jclass clazz, jlong jCIFPtr, jint jNargs, jlong jRetTypePtr, jlong jArgsPtr)
-{
-    ffi_cif *cif = jlong_to_ptr(jCIFPtr);
-    unsigned int nargs = jNargs;
-    ffi_type *rtype = jlong_to_ptr(jRetTypePtr);
-    ffi_type **atypes = jlong_to_ptr(jArgsPtr);
-
-//    NSLog(@"rtype->(size: %d, alignment: %d, type: %d)", rtype->size, rtype->alignment, rtype->type);
-    return (jboolean) (FFI_OK == ffi_prep_cif(cif, FFI_DEFAULT_ABI, nargs, rtype, atypes));
-}
--- a/src/macosx/native/jobjc/src/core/native/Coder.m	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "com_apple_jobjc_Coder.h"
-
-#include <JavaNativeFoundation/JavaNativeFoundation.h>
-#define MACOSX
-#include <ffi/ffi.h>
-#include <AppKit/AppKit.h>
-
-/*
- * Class:     com_apple_jobjc_Coder
- * Method:    getNativeFFITypeCodeForCode
- * Signature: (I)J
- */
-JNIEXPORT jlong JNICALL Java_com_apple_jobjc_Coder_getNativeFFITypePtrForCode
-(JNIEnv *env, jclass clazz, jint code)
-{
-    switch ((long)code) {
-        case com_apple_jobjc_Coder_FFI_VOID:        return ptr_to_jlong(&ffi_type_void);
-        case com_apple_jobjc_Coder_FFI_PTR:            return ptr_to_jlong(&ffi_type_pointer);
-        case com_apple_jobjc_Coder_FFI_SINT8:        return ptr_to_jlong(&ffi_type_sint8);
-        case com_apple_jobjc_Coder_FFI_UINT8:        return ptr_to_jlong(&ffi_type_uint8);
-        case com_apple_jobjc_Coder_FFI_SINT16:        return ptr_to_jlong(&ffi_type_sint16);
-        case com_apple_jobjc_Coder_FFI_UINT16:        return ptr_to_jlong(&ffi_type_uint16);
-        case com_apple_jobjc_Coder_FFI_SINT32:        return ptr_to_jlong(&ffi_type_sint32);
-        case com_apple_jobjc_Coder_FFI_UINT32:        return ptr_to_jlong(&ffi_type_uint32);
-        case com_apple_jobjc_Coder_FFI_SINT64:        return ptr_to_jlong(&ffi_type_sint64);
-        case com_apple_jobjc_Coder_FFI_UINT64:        return ptr_to_jlong(&ffi_type_uint64);
-        case com_apple_jobjc_Coder_FFI_FLOAT:        return ptr_to_jlong(&ffi_type_float);
-        case com_apple_jobjc_Coder_FFI_DOUBLE:        return ptr_to_jlong(&ffi_type_double);
-        case com_apple_jobjc_Coder_FFI_LONGDOUBLE:    return ptr_to_jlong(&ffi_type_longdouble);
-    }
-
-    return ptr_to_jlong(NULL);
-}
--- a/src/macosx/native/jobjc/src/core/native/FFIType.m	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-#include <JavaNativeFoundation/JavaNativeFoundation.h>
-#include <ffi/ffi.h>
-
-#include "com_apple_jobjc_FFIType.h"
-
-JNIEXPORT void JNICALL Java_com_apple_jobjc_FFIType_makeFFIType
-(JNIEnv *env, jclass clazz, jlong ffi_type_jlong, jlong ffi_type_elements_jlong)
-{
-    ffi_type *type = jlong_to_ptr(ffi_type_jlong);
-    type->elements = jlong_to_ptr(ffi_type_elements_jlong);
-    type->type = FFI_TYPE_STRUCT;
-    type->size = type->alignment = 0;
-}
-
-JNIEXPORT jint JNICALL Java_com_apple_jobjc_FFIType_getFFITypeSizeof
-(JNIEnv *env, jclass clazz)
-{
-    return (jint) sizeof(ffi_type);
-}
--- a/src/macosx/native/jobjc/src/core/native/Function.m	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "com_apple_jobjc_Function.h"
-
-#define MACOSX
-#include <dlfcn.h>
-#include <JavaNativeFoundation/JavaNativeFoundation.h>
-
-JNIEXPORT jlong JNICALL Java_com_apple_jobjc_Function_getFxnPtrForFunctionName
-(JNIEnv *env, jclass clazz, jstring fxnName)
-{
-    const char *functionName = (*env)->GetStringUTFChars(env, fxnName, NULL);
-    void *fxnPtr = dlsym(RTLD_SELF, functionName);
-    (*env)->ReleaseStringUTFChars(env, fxnName, functionName);
-    return ptr_to_jlong(fxnPtr);
-}
-
-JNIEXPORT jlong JNICALL Java_com_apple_jobjc_Function_getFxnPtrForFunctionNameAndLib
-(JNIEnv *env, jclass clazz, jlong frameworkPtr, jstring fxnName)
-{
-    void *frameworkHandle = jlong_to_ptr(frameworkPtr);
-
-    const char *functionName = (*env)->GetStringUTFChars(env, fxnName, NULL);
-    void *fxnPtr = dlsym(frameworkHandle, functionName);
-    (*env)->ReleaseStringUTFChars(env, fxnName, functionName);
-
-    return ptr_to_jlong(fxnPtr);
-}
--- a/src/macosx/native/jobjc/src/core/native/ID.m	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "com_apple_jobjc_ID.h"
-
-#include <JavaNativeFoundation/JavaNativeFoundation.h>
-
-#include <objc/runtime.h>
-#include <objc/message.h>
-
-/*
- * Class:     com_apple_jobjc_ID
- * Method:    getNativeDescription
- * Signature: (J)Ljava/lang/String;
- */
-JNIEXPORT jstring JNICALL Java_com_apple_jobjc_ID_getNativeDescription
-(JNIEnv *env, jclass clazz, jlong objPtr)
-{
-    jstring ret = NULL;
-
-JNF_COCOA_ENTER(env);
-
-    NSString *desc = [((id)jlong_to_ptr(objPtr)) description];
-    ret = JNFNSToJavaString(env, desc);
-
-JNF_COCOA_EXIT(env);
-
-    return ret;
-}
--- a/src/macosx/native/jobjc/src/core/native/Invoke.m	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "com_apple_jobjc_Invoke_FunCall.h"
-#include <ffi/ffi.h>
-#include <objc/message.h>
-#include <JavaNativeFoundation/JavaNativeFoundation.h>
-
-JNIEXPORT void JNICALL Java_com_apple_jobjc_Invoke_00024FunCall_invoke
-(JNIEnv *env, jclass clazz, jlong cifPtr, jlong fxnPtr, jlong retValPtr, jlong argsPtr)
-{
-    ffi_cif *cif = jlong_to_ptr(cifPtr);
-    void *fxn    = jlong_to_ptr(fxnPtr);
-    void *retVal = jlong_to_ptr(retValPtr);
-    void **args  = jlong_to_ptr(argsPtr);
-
-    ffi_call(cif, fxn, retVal, args);
-}
--- a/src/macosx/native/jobjc/src/core/native/JObjCRuntime.m	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "Cocoa/Cocoa.h"
-
--- a/src/macosx/native/jobjc/src/core/native/MacOSXFramework.m	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "com_apple_jobjc_MacOSXFramework.h"
-
-#include <dlfcn.h>
-#include <JavaNativeFoundation/JavaNativeFoundation.h>
-
-/*
- * Class:     com_apple_jobjc_MacOSXFramework
- * Method:    retainFramework
- * Signature: (Ljava/lang/String;)J
- */
-JNIEXPORT jlong JNICALL Java_com_apple_jobjc_MacOSXFramework_retainFramework
-(JNIEnv *env, jclass clazz, jstring frameworkName)
-{
-    if (frameworkName == NULL) return ptr_to_jlong(NULL);
-    const char *frameworkNameCStr = (*env)->GetStringUTFChars(env, frameworkName, JNI_FALSE);
-    const void *library = dlopen(frameworkNameCStr, RTLD_LOCAL);
-    (*env)->ReleaseStringUTFChars(env, frameworkName, frameworkNameCStr);
-    return ptr_to_jlong(library);
-}
-
-/*
- * Class:     com_apple_jobjc_MacOSXFramework
- * Method:    releaseFramework
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_apple_jobjc_MacOSXFramework_releaseFramework
-(JNIEnv *env, jclass clazz, jlong frameworkPtr)
-{
-    dlclose(jlong_to_ptr(frameworkPtr));
-}
-
-JNIEXPORT void JNICALL Java_com_apple_jobjc_MacOSXFramework_getConstant
-(JNIEnv *env, jclass clazz, jlong frameworkPtr, jstring constSymbol, jlong retBuffer, jint size)
-{
-    const char *symbol = (*env)->GetStringUTFChars(env, constSymbol, JNI_FALSE);
-    void *handle = frameworkPtr ? jlong_to_ptr(frameworkPtr) : RTLD_DEFAULT;
-    void *data = dlsym(handle, symbol);
-    (*env)->ReleaseStringUTFChars(env, constSymbol, symbol);
-
-    if(!data)
-        (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/RuntimeException"), dlerror());
-    else
-        memcpy(jlong_to_ptr(retBuffer), data, (size_t) size);
-}
--- a/src/macosx/native/jobjc/src/core/native/NSClass.m	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "com_apple_jobjc_NSClass.h"
-#include <objc/runtime.h>
-
-#include <JavaNativeFoundation/JavaNativeFoundation.h>
-
-/*
- * Class:     com_apple_jobjc_NSClass
- * Method:    getNativeClassByName
- * Signature: (JLjava/lang/String;)J
- */
-JNIEXPORT jlong JNICALL Java_com_apple_jobjc_NSClass_getNativeClassByName
-(JNIEnv *env, jclass clazz, jstring className)
-{
-    if (className == NULL) return ptr_to_jlong(NULL);
-    const char *classNameCStr = (*env)->GetStringUTFChars(env, className, JNI_FALSE);
-    const id obj = objc_getClass(classNameCStr);
-    (*env)->ReleaseStringUTFChars(env, className, classNameCStr);
-
-    if (obj == nil) return ptr_to_jlong(NULL);
-    return ptr_to_jlong(obj);
-}
-
-/*
- * Class:     com_apple_jobjc_NSClass
- * Method:    getSuperClass
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_com_apple_jobjc_NSClass_getSuperClassOfClass
-(JNIEnv *env, jclass clazz, jlong clazzPtr)
-{
-    if (clazzPtr == 0L) return ptr_to_jlong(NULL);
-    const Class objClazz = (Class)jlong_to_ptr(clazzPtr);
-    return ptr_to_jlong(class_getSuperclass(objClazz));
-}
-
-/*
- * Class:     com_apple_jobjc_NSClass
- * Method:    getClassName
- * Signature: (J)Ljava/lang/String;
- */
-JNIEXPORT jstring JNICALL Java_com_apple_jobjc_NSClass_getClassNameOfClass
-(JNIEnv *env, jclass clazz, jlong clazzPtr)
-{
-    const char *clazzName = (char *)class_getName((Class)jlong_to_ptr(clazzPtr));
-    return (*env)->NewStringUTF(env, clazzName);
-}
-
-JNIEXPORT jlong JNICALL Java_com_apple_jobjc_NSClass_getClass
-(JNIEnv *env, jclass clazz, jlong objPtr)
-{
-    id obj = (id)jlong_to_ptr(objPtr);
-    return ptr_to_jlong(object_getClass(obj));
-}
--- a/src/macosx/native/jobjc/src/core/native/NativeBuffer.h	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- *  NativeBuffer.h
- *  Copyright 2007 Apple Inc. All rights reserved.
- *
- */
-
-#define BUFFER_AT(buffer, offset)                (((UInt8 *)buffer) + offset)
-#define GET_VALUE(type, buffer, offset)            (*((type *)BUFFER_AT(buffer, offset)))
-#define PUT_VALUE(type, buffer, offset, value)    (*((type *)BUFFER_AT(buffer, offset)) = value)
-
-#define GET_INT_AT(buffer, offset)                GET_VALUE(jint, buffer, offset)
-#define GET_LONG_AT(buffer, offset)                GET_VALUE(jlong, buffer, offset)
-
-#define PUT_INT_AT(buffer, offset, value)        PUT_VALUE(jint, buffer, offset, value)
-#define PUT_LONG_AT(buffer, offset, value)        PUT_VALUE(jlong, buffer, offset, value)
--- a/src/macosx/native/jobjc/src/core/native/NativeBuffer.m	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "com_apple_jobjc_NativeBuffer.h"
-
-#define MACOSX
-#include <ffi/ffi.h>
-#include <JavaNativeFoundation/JavaNativeFoundation.h>
-
-JNIEXPORT jlong JNICALL Java_com_apple_jobjc_NativeBuffer_getPtrOfBuffer
-(JNIEnv *env, jclass clazz, jobject buffer)
-{
-    if (buffer == NULL) return ptr_to_jlong(0);
-    return ptr_to_jlong((*env)->GetDirectBufferAddress(env, buffer));
-}
--- a/src/macosx/native/jobjc/src/core/native/NativeObjectLifecycleManager.m	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "com_apple_jobjc_NativeObjectLifecycleManager.h"
-
-#include <JavaNativeFoundation/JavaNativeFoundation.h>
-
-
-/*
- * Class:     com_apple_jobjc_NativeObjectLifecycleManager
- * Method:    retainNativeObject
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_apple_jobjc_NativeObjectLifecycleManager_retainNativeObject
-(JNIEnv *env, jclass clazz, jlong ptr)
-{
-    if (ptr == 0L) return;
-    CFRetain(jlong_to_ptr(ptr));
-}
-
-/*
- * Class:     com_apple_jobjc_NativeObjectLifecycleManager
- * Method:    releaseNativeObject
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_apple_jobjc_NativeObjectLifecycleManager_releaseNativeObject
-(JNIEnv *env, jclass clazz, jlong ptr)
-{
-    if (ptr == 0L) return;
-    CFRelease(jlong_to_ptr(ptr));
-}
-
-/*
- * Class:     com_apple_jobjc_NativeObjectLifecycleManager
- * Method:    freeNativeObject
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_apple_jobjc_NativeObjectLifecycleManager_freeNativeObject
-(JNIEnv *env, jclass clazz, jlong ptr)
-{
-    if (ptr == 0L) return;
-    free(jlong_to_ptr(ptr));
-}
--- a/src/macosx/native/jobjc/src/core/native/SEL.m	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "com_apple_jobjc_SEL.h"
-
-#include <JavaNativeFoundation/JavaNativeFoundation.h>
-#include <objc/message.h>
-
-JNIEXPORT jlong JNICALL Java_com_apple_jobjc_SEL_getSelectorPtr
-(JNIEnv *env, jclass jclazz, jstring selName)
-{
-    const char *selNameAsChars = (*env)->GetStringUTFChars(env, selName, JNI_FALSE);
-    const SEL sel = sel_registerName(selNameAsChars);
-    (*env)->ReleaseStringUTFChars(env, selName, selNameAsChars);
-    return ptr_to_jlong((void*)sel);
-}
-
-JNIEXPORT jstring JNICALL Java_com_apple_jobjc_SEL_getSelectorName
-(JNIEnv *env, jclass jclazz, jlong selPtr)
-{
-    return (*env)->NewStringUTF(env, sel_getName(jlong_to_ptr(selPtr)));
-}
--- a/src/macosx/native/jobjc/src/core/native/Subclassing.m	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,301 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "com_apple_jobjc_Subclassing.h"
-
-#include <math.h>
-#include <assert.h>
-#include <errno.h>
-
-#include <objc/runtime.h>
-#include <objc/message.h>
-
-#include <ffi/ffi.h>
-#include <sys/mman.h>
-
-#include <JavaNativeFoundation/JavaNativeFoundation.h>
-
-// Subclassing of Obj-C classes in Java
-//
-// See:
-//  - Objective-C Runtime documentation
-//  - man ffi_prep_closure
-//  - Subclassing.java
-
-
-#pragma mark Accessing object in IVar
-
-#define JOBJ_IVAR_NAME "jObjWrapper"
-static jobject getJObjectFromIVar(id obj);
-
-jobject getJObjectFromIVar(id obj)
-{
-    JNFJObjectWrapper *wrapper = NULL;
-    object_getInstanceVariable(obj, JOBJ_IVAR_NAME, (void**) &wrapper);
-    return wrapper ? [wrapper jObject] : NULL;
-}
-
-JNIEXPORT jobject JNICALL Java_com_apple_jobjc_Subclassing_getJObjectFromIVar
-(JNIEnv *env, jclass jClass, jlong jPtr)
-{
-    id obj = (id) jlong_to_ptr(jPtr);
-    if(obj == NULL){
-        (*env)->ThrowNew(env, (*env)->FindClass(env,
-            "java/lang/NullPointerException"), "obj");
-        return NULL;
-    }
-
-    JNFJObjectWrapper *wrapper;
-
-    if(!object_getInstanceVariable(obj, JOBJ_IVAR_NAME, (void**) &wrapper)){
-        NSLog(@"IVar '%s' not found. obj: %@", JOBJ_IVAR_NAME, obj);
-        (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/RuntimeException"),
-            "Could not find instance variable that holds Java object.");
-        return NULL;
-    }
-
-    return wrapper ? [wrapper jObject] : NULL;
-}
-
-JNIEXPORT void JNICALL Java_com_apple_jobjc_Subclassing_initJObjectToIVar
-(JNIEnv *env, jclass jClass, jlong jPtr, jobject jObject)
-{
-    id obj = (id) jlong_to_ptr(jPtr);
-    JNFJObjectWrapper *wrapper = [[JNFJObjectWrapper alloc]
-        initWithJObject:jObject withEnv:env];
-    [wrapper retain];
-
-    if(!object_setInstanceVariable(obj, JOBJ_IVAR_NAME, wrapper)){
-        NSLog(@"IVar '%s' not found. obj: %@", JOBJ_IVAR_NAME, obj);
-        (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/RuntimeException"),
-            "Could not find instance variable that holds Java object.");
-        return;
-    }
-}
-
-#pragma mark Registering class
-
-JNIEXPORT jlong JNICALL Java_com_apple_jobjc_Subclassing_allocateClassPair
-(JNIEnv *env, jclass clazz, jlong jSuperClass, jstring jName)
-{
-    const Class superClass = (Class)jlong_to_ptr(jSuperClass);
-    assert(superClass);
-
-    const char *name = (*env)->GetStringUTFChars(env, jName, JNI_FALSE);
-    const Class newClass = objc_allocateClassPair(superClass, name, 0);
-    (*env)->ReleaseStringUTFChars(env, jName, name);
-
-    return ptr_to_jlong(newClass);
-}
-
-JNIEXPORT jboolean JNICALL Java_com_apple_jobjc_Subclassing_addIVarForJObj
-(JNIEnv *env, jclass clazz, jlong jSynthClass)
-{
-    return class_addIvar(
-        jlong_to_ptr(jSynthClass),
-        JOBJ_IVAR_NAME,
-        sizeof(id),
-        (uint8_t)log2((double)sizeof(id)),
-        "@");
-}
-
-JNIEXPORT void JNICALL Java_com_apple_jobjc_Subclassing_registerClassPair
-(JNIEnv *env, jclass clazz, jlong jClass)
-{
-    Class c = jlong_to_ptr(jClass);
-//    NSLog(@"Registering class pair %p / %s", c, class_getName(c));
-    objc_registerClassPair(c);
-}
-
-
-#pragma mark Patching +alloc
-
-static id patchedAllocIMP(id obj, SEL sel);
-static void addJavaInstance(id obj);
-
-JNIEXPORT jboolean JNICALL Java_com_apple_jobjc_Subclassing_patchAlloc
-(JNIEnv *env, jclass clazz, jlong jNativeClass)
-{
-    Class metaClass = object_getClass(jlong_to_ptr(jNativeClass));
-    return class_addMethod(metaClass,
-       sel_registerName("alloc"),
-       (IMP) patchedAllocIMP,
-       "@@:");
-}
-
-static id patchedAllocIMP(id cls, SEL sel){
-    id inst = class_createInstance(cls, 0);
-    addJavaInstance(inst);
-    return inst;
-}
-
-static void addJavaInstance(id obj){
-//    NSLog(@"addJavaInstance %p", obj);
-//    NSLog(@"... calling up to Java");
-
-    static JNF_CLASS_CACHE(jc_Subclassing, "com/apple/jobjc/Subclassing");
-    static JNF_STATIC_MEMBER_CACHE(jm_Subclassing_initJObject,
-        jc_Subclassing,
-        "initJObject",
-        "(J)V");
-
-    JNFThreadContext threadWasAttached = JNFThreadDetachOnThreadDeath;
-    JNIEnv *env = JNFObtainEnv(&threadWasAttached);
-    JNFCallStaticVoidMethod(env, jm_Subclassing_initJObject,
-        ptr_to_jlong(obj));
-
-    JNFReleaseEnv(env, &threadWasAttached);
-}
-
-
-#pragma mark Adding methods
-
-static ffi_closure *make_closure(ffi_cif *cif, void *user_data);
-static void sel_closure_call(ffi_cif* cif, void* result, void** args, void* user_data);
-
-typedef struct closure_data_t{
-    JNFJObjectWrapper *jMethod;
-    JNFJObjectWrapper *jCIF;
-} closure_data_t;
-
-static ffi_closure *make_closure(ffi_cif *cif, void *user_data){
-    // Allocate a page to hold the closure with read and write permissions.
-    ffi_closure *closure;
-    if ((closure = mmap(NULL, sizeof(ffi_closure), PROT_READ | PROT_WRITE,
-                        MAP_ANON | MAP_PRIVATE, -1, (off_t) 0)) == (void*)-1)
-    {
-        fprintf(stderr, "mmap failed with errno: %d", errno);
-        return NULL;
-    }
-
-    // Prepare the ffi_closure structure.
-    ffi_status status;
-    if ((status = ffi_prep_closure(closure, cif, sel_closure_call, (void *)user_data)) != FFI_OK)
-    {
-        fprintf(stderr, "ffi_prep_closure failed with ffi_status: %d", status);
-        munmap(closure, sizeof(ffi_closure));
-        return NULL;
-    }
-
-    // Ensure that the closure will execute on all architectures.
-    if (mprotect(closure, sizeof(closure), PROT_READ | PROT_EXEC) == -1)
-    {
-        fprintf(stderr, "mprotect failed with errno: %d", errno);
-        munmap(closure, sizeof(ffi_closure));
-        return NULL;
-    }
-    return closure;
-}
-
-JNIEXPORT jboolean JNICALL Java_com_apple_jobjc_Subclassing_addMethod
-(JNIEnv *env, jclass clazz, jlong jClass, jstring jSelName, jobject jMethod,
-    jobject jCIF, jlong jCIFPtr, jstring jObjCEncodedType)
-{
-    ffi_cif *cif = jlong_to_ptr(jCIFPtr);
-
-    closure_data_t *user_data = malloc(sizeof(closure_data_t));
-    user_data->jMethod = [[JNFJObjectWrapper alloc] initWithJObject:jMethod withEnv:env];
-    user_data->jCIF = [[JNFJObjectWrapper alloc] initWithJObject:jCIF withEnv:env];
-
-    ffi_closure *closure;;
-    if(!(closure = make_closure(cif, user_data))){
-        [user_data->jMethod release];
-        [user_data->jCIF release];
-        free(user_data);
-        return NO;
-    }
-
-    const Class objcClass = (Class)jlong_to_ptr(jClass);
-
-    const char *selName = (*env)->GetStringUTFChars(env, jSelName, JNI_FALSE);
-    const char *objCEncodedType = (*env)->GetStringUTFChars(env, jObjCEncodedType, JNI_FALSE);
-
-//    NSLog(@"Adding method '%s' :: '%s' to '%s' / %p",
-//        selName,
-//        objCEncodedType,
-//        class_getName(objcClass),
-//        objcClass);
-
-    BOOL ret = class_addMethod(objcClass, sel_registerName(selName), (IMP) closure, objCEncodedType);
-
-    (*env)->ReleaseStringUTFChars(env, jSelName, selName);
-    (*env)->ReleaseStringUTFChars(env, jObjCEncodedType, objCEncodedType);
-
-    if(!ret){
-        NSLog(@"class_addMethod failed");
-        munmap(closure, sizeof(ffi_closure));
-        [user_data->jMethod release];
-        [user_data->jCIF release];
-        free(user_data);
-        return NO;
-    }
-
-    return ret;
-}
-
-static void sel_closure_call(ffi_cif* cif, void* result, void** args, void* user_data)
-{
-    id obj = *(id*) args[0];
-//    SEL sel = *(SEL*) args[1];
-
-//    NSLog(@"Subclassing: sel_closure_call: %p %p", obj, sel);
-//    NSLog(@"Subclassing: sel_closure_call: obj class: %@  sel name: %s", object_getClass(obj), sel_getName(sel));
-
-    jobject jObj = getJObjectFromIVar(obj);
-
-    if(!jObj){
-        addJavaInstance(obj);
-        jObj = getJObjectFromIVar(obj);
-    }
-
-    closure_data_t *jmeta = user_data;
-    jobject jMethod = [jmeta->jMethod jObject];
-    jobject jCIF = [jmeta->jCIF jObject];
-
-    JNFThreadContext threadWasAttached = JNFThreadDetachOnThreadDeath;
-    JNIEnv *env = JNFObtainEnv(&threadWasAttached);
-
-    if((*env)->ExceptionOccurred(env)) goto bail;
-
-        static JNF_CLASS_CACHE(jc, "com/apple/jobjc/Subclassing");
-        static JNF_STATIC_MEMBER_CACHE(jm_invokeFromJNI, jc, "invokeFromJNI",
-        "(Lcom/apple/jobjc/ID;Ljava/lang/reflect/Method;Lcom/apple/jobjc/CIF;JJ)V");
-
-    JNFCallStaticVoidMethod(env, jm_invokeFromJNI,
-        jObj,
-        jMethod,
-        jCIF,
-        ptr_to_jlong(result),
-        ptr_to_jlong(args));
-
-bail:
-    JNFReleaseEnv(env, &threadWasAttached);
-
-    if((*env)->ExceptionOccurred(env)){
-        NSLog(@"Exception!");
-        (*env)->ExceptionDescribe(env);
-    }
-    JNFReleaseEnv(env, &threadWasAttached);
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/BootClassPathMinus.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator;
-
-public class BootClassPathMinus {
-
-    /*
-     * return the default boot class path with all parts mentioned in arguments removed
-     */
-    public static void main(String[] args) {
-    String bootClassPath = System.getProperty("sun.boot.class.path");
-    StringBuffer newPath = new StringBuffer(bootClassPath.length());
-    String[] bootClassPathParts = bootClassPath.split(java.io.File.pathSeparator, 0);
-    for (String part : bootClassPathParts) {
-        boolean found = false;
-        for (String minus : args) {
-        if (part.endsWith(minus)) {
-            found = true;
-        }
-        }
-        if (!found) {
-        if (newPath.length() > 0) newPath.append(java.io.File.pathSeparatorChar);
-        newPath.append(part);
-        }
-    }
-    System.out.println(newPath.toString());
-    }
-
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/ClassConsolidator.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.apple.internal.jobjc.generator.model.Category;
-import com.apple.internal.jobjc.generator.model.Clazz;
-import com.apple.internal.jobjc.generator.model.Framework;
-
-public class ClassConsolidator {
-    private static String[] PREFERRED_FRAMEWORKS = { "Foundation", "AppKit" };
-
-    static void consolidateClassesForFrameworks(final List<Framework> frameworks) throws Throwable {
-        System.out.println("--2-- Resolving duplicate classes:");
-        final Map<String, List<Clazz>> allClasses = new HashMap<String, List<Clazz>>();
-
-        for (final Framework framework : frameworks) {
-            for (final Clazz clazz : framework.classes) {
-                final List<Clazz> existingClazzList = allClasses.get(clazz.name);
-                if(existingClazzList != null)
-                    existingClazzList.add(clazz);
-                else
-                    allClasses.put(clazz.name, new ArrayList<Clazz>(Arrays.asList(clazz)));
-            }
-        }
-
-        final Map<String, Clazz> filteredClasses = new HashMap<String, Clazz>();
-        final List<List<Clazz>> dreggs = new ArrayList<List<Clazz>>();
-
-        final Collection<List<Clazz>> clazzLists = allClasses.values();
-        for (final List<Clazz> clazzList : clazzLists) {
-            if (clazzList.size() > 1) {
-                // add to the list for later analysis
-                dreggs.add(clazzList);
-                continue;
-            }
-
-            // if there is only one class definition, go with it!
-            final Clazz clazz = clazzList.get(0);
-            filteredClasses.put(clazz.name, clazz);
-        }
-
-        // figure out which class is the real class, and convert the rest to categories
-        for (final List<Clazz> dreg : dreggs)
-            deriveCategoriesFrom(dreg, filteredClasses);
-
-        // patch up the inheritance hierarchy
-        System.out.println("Determining super classes:");
-        for (final Framework framework : frameworks)
-            framework.resolveSuperClasses(filteredClasses);
-    }
-
-    private static void deriveCategoriesFrom(final List<Clazz> clazzes, final Map<String, Clazz> filteredClasses) {
-        final List<Clazz> clazzesToDerive = new ArrayList<Clazz>(clazzes);
-
-        for (final String preferredFrameworkName : PREFERRED_FRAMEWORKS) {
-            for (final Clazz clazz : clazzesToDerive) {
-                if (!preferredFrameworkName.equals(clazz.parent.name)) continue;
-
-                System.out.print("\t" + clazz.parent.name + " owns \"" + clazz.name + "\", ");
-                addCategoriesAndPatchClasses(clazzes, clazz);
-                filteredClasses.put(clazz.name, clazz);
-                return;
-            }
-        }
-
-        final List<String> frameworkNameList = new ArrayList<String>(clazzes.size());
-        for (final Clazz clazz : clazzes) frameworkNameList.add(clazz.parent.name);
-        throw new RuntimeException("Could not derived a preferred framework for: " + clazzes.get(0).name + ", from (" + Utils.joinWComma(frameworkNameList) + ")");
-    }
-
-    private static void addCategoriesAndPatchClasses(final List<Clazz> clazzes, final Clazz clazz) {
-        final List<String> fwNames = new ArrayList<String>(clazzes.size());
-
-        for (final Clazz cls : clazzes) {
-            if (cls == clazz) continue;
-            fwNames.add(cls.parent.name);
-            cls.parent.classes.remove(cls);
-            cls.parent.categories.add(new Category(cls, clazz));
-        }
-
-        System.out.println("creating categories in: " + Utils.joinWComma(fwNames));
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/ClassGenerator.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator;
-
-import java.util.*;
-
-import com.apple.internal.jobjc.generator.classes.*;
-import com.apple.internal.jobjc.generator.model.Framework;
-
-public class ClassGenerator {
-    public static final String JOBJC_PACKAGE = "com.apple.jobjc";
-
-    public static List<OutputFile> generateClasses(final List<Framework> frameworks) {
-        final List<OutputFile> generatedClassFiles = new ArrayList<OutputFile>();
-
-        generatedClassFiles.add(new RootJObjCClass(frameworks));
-        for (final Framework f : frameworks) {
-            f.generateClasses(generatedClassFiles);
-        }
-
-        return generatedClassFiles;
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/FileCopier.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator;
-
-import java.io.File;
-import java.util.*;
-
-import com.apple.internal.jobjc.generator.classes.*;
-
-public class FileCopier {
-    public static List<OutputFile> addSourceFilesFrom(final String srcPath) {
-        final List<OutputFile> outputFileList = new ArrayList<OutputFile>();
-
-        final List<File> fileList = getFileList(srcPath);
-        for (final File file : fileList) {
-            outputFileList.add(new CopiedFile(file, ClassGenerator.JOBJC_PACKAGE, file.getName().replace("\\.java", "")));
-        }
-
-        return outputFileList;
-    }
-
-    private static List<File> getFileList(final String srcPath) {
-        final File srcRoot = new File(srcPath);
-        if (!srcRoot.exists()) throw new RuntimeException("Source root " + srcRoot + " does not exist. Nowhere to copy base runtime objects from.");
-
-        final File targetDir = new File(srcRoot, ClassGenerator.JOBJC_PACKAGE.replaceAll("\\.", "\\/"));
-        if (!targetDir.exists() || !targetDir.isDirectory()) throw new RuntimeException("Base runtime object source directory " + targetDir + " does not exist. No runtime class files to copy.");
-
-        final List<File> fileList = new ArrayList<File>();
-        final File[] targetDirFileList = targetDir.listFiles();
-        for (final File file : targetDirFileList) {
-            if (!file.isFile()) continue;
-            if (!file.getName().endsWith(".java")) continue;
-            fileList.add(file);
-        }
-
-        return fileList;
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/FrameworkGenerator.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import com.apple.internal.jobjc.generator.model.Framework;
-import com.apple.internal.jobjc.generator.model.Framework.FrameworkDependency;
-import com.apple.internal.jobjc.generator.utils.Fp;
-import com.apple.internal.jobjc.generator.utils.StructOffsetResolverBigBang;
-import com.apple.jobjc.JObjCRuntime;
-
-public class FrameworkGenerator {
-    private static final String BRIDGESUPPORT_FILE_EXTENSION = "Full.bridgesupport";
-    private static final String FRAMEWORK_MATCH = "^.*Full\\.bridgesupport$";
-    private static final String FRAMEWORK_PRUNE = "^.*(PyObjC|/Versions|\\.lproj|/Headers|/PrivateHeaders).*$";
-
-    static List<File> findFrameworkFilesIn(final File file) throws IOException{
-        final List<File> bridgeSupportFiles = Utils.find(file, FRAMEWORK_MATCH, FRAMEWORK_PRUNE);
-        System.out.println("found " + bridgeSupportFiles.size() + " frameworks");
-        return bridgeSupportFiles;
-    }
-
-    static List<Framework> parseFrameworksFrom(final List<File> bridgeSupportFiles) {
-        final List<Framework> frameworks = new ArrayList<Framework>();
-
-        System.out.println("Parsing XML");
-        for (final File file : bridgeSupportFiles){
-            Framework f = new Framework(extractFrameworkNameFrom(file), file);
-            try{
-                f.load();
-                frameworks.add(f);
-                System.out.println("Generator@" + JObjCRuntime.ARCH + " loaded "
-                        + f.name + " (" + Fp.join(":", f.binaries) + ")");
-            }
-            catch(Exception x){
-                System.out.println("!! Generator@" + JObjCRuntime.ARCH + " failed to load "
-                        + f.name + " (" + Fp.join(":", f.binaries) + "). SKIPPING");
-            }
-        }
-
-        System.out.println("Parsing dependencies");
-        for (final Framework f : frameworks) f.parseDependencies(frameworks);
-
-        Set<String> alreadyWarnedDependency = new HashSet<String>();
-        for(final Framework f : frameworks)
-            for(final FrameworkDependency dep : f.dependencies)
-                if(dep.object == null && !alreadyWarnedDependency.contains(dep.name)){
-                    System.out.println(String.format("Warning: unresolved dependency: %1$30s -> %2$s", f.name, dep.name));
-                    alreadyWarnedDependency.add(dep.name);
-                }
-        if(alreadyWarnedDependency.size() > 0)
-            System.out.println("Unresolved dependencies lead to unresolved types.");
-
-        Utils.topologicalSort(frameworks);
-        List<Framework> cycle = Utils.getDependencyCycle(frameworks);
-        if(cycle != null)
-            System.out.println("Warning: cycle found in framework dependencies: " + Fp.join(" -> ", cycle));
-
-        System.out.println("Parsing types");
-        for (final Framework f : frameworks){
-            f.parseCFTypes();
-            f.parseOpaques();
-        }
-        for (final Framework f : frameworks) f.parseStructs();
-
-        new StructOffsetResolverBigBang().resolve(frameworks);
-
-        System.out.println("Parsing classes");
-        for (final Framework f : frameworks) f.parseClasses();
-
-        System.out.println("Parsing constants");
-        for (final Framework f : frameworks) f.parseConstants();
-
-        System.out.println("Parsing functions");
-        for (final Framework f : frameworks) f.parseFunctions();
-
-        return frameworks;
-    }
-
-    private static String extractFrameworkNameFrom(final File file) {
-        final String fileName = file.getName();
-        return fileName.substring(0, fileName.lastIndexOf(BRIDGESUPPORT_FILE_EXTENSION));
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/FunctionGenerator.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator;
-
-import java.io.PrintStream;
-import java.io.StringWriter;
-
-import com.apple.internal.jobjc.generator.model.Arg;
-import com.apple.internal.jobjc.generator.model.Function;
-import com.apple.internal.jobjc.generator.model.Method;
-import com.apple.internal.jobjc.generator.model.types.JType;
-import com.apple.internal.jobjc.generator.utils.JavaLang.JLCall;
-import com.apple.internal.jobjc.generator.utils.JavaLang.JLField;
-import com.apple.internal.jobjc.generator.utils.JavaLang.JLMethod;
-import com.apple.internal.jobjc.generator.utils.JavaLang.JLTertiary;
-import com.apple.jobjc.Coder;
-import com.apple.jobjc.Invoke;
-import com.apple.jobjc.Invoke.FunCall;
-import com.apple.jobjc.Invoke.MsgSend;
-
-public class FunctionGenerator {
-    private final static String VARARGS_NAME = "varargs";
-
-    private static String createFieldCache(final Class<? extends Invoke> type, final Function fxn) {
-        final String identifier = makeInstanceName(fxn);
-
-        JLField field = new JLField("private static", type.getCanonicalName(), identifier);
-        // It's okay to make it static, because the getter isn't static, so the only way to access it is through an instance.
-        JLMethod getter = new JLMethod("private final", type.getCanonicalName(), "get_" + identifier);
-
-        JLCall createIt = new JLCall("new " + type.getCanonicalName());
-        createIt.args.add(firstArg(fxn));
-        createIt.args.add("\"" + fxn.name + "\"");
-        createIt.args.add(fxn.returnValue.type.getJType().getCoderDescriptor().getCoderInstanceName());
-        for (final Arg arg : fxn.args)
-            createIt.args.add(arg.type.getJType().getCoderDescriptor().getCoderInstanceName());
-
-        getter.body.add("return " + new JLTertiary(identifier + " != null", identifier, identifier + " = " + createIt) + ";");
-
-        return field.toString() + getter.toString();
-    }
-
-    private static String createLocalForward(final Class<? extends Invoke> type, final Function fxn) {
-        final String identifier = makeInstanceName(fxn);
-        return new JLField("final", type.getCanonicalName(), identifier, new JLCall("get_" + identifier)).toString();
-    }
-
-    private static String createLocalNew(final Class<? extends Invoke> type, final Function fxn) {
-        final String identifier = makeInstanceName(fxn);
-        StringWriter out = new StringWriter();
-
-        out.append(String.format("%3$s[] argCoders = new %3$s[%1$d + %2$s.length];\n", fxn.args.size(), VARARGS_NAME, Coder.class.getCanonicalName()));
-
-        for(int i = 0; i < fxn.args.size(); i++)
-            out.append(String.format("argCoders[%1$d] = %2$s;\n", i, fxn.args.get(0).type.getJType().getCoderDescriptor().getCoderInstanceName()));
-
-        if(fxn.variadic){
-            out.append(String.format("for(int i = %1$d; i < (%1$d + %2$s.length); i++)\n", fxn.args.size(), VARARGS_NAME));
-            out.append(String.format("\targCoders[i] = %1$s.getCoderAtRuntime(%2$s[i - %3$s]);\n", Coder.class.getCanonicalName(), VARARGS_NAME, fxn.args.size()));
-        }
-
-        out.append("final " + type.getCanonicalName() + " " + identifier + " = new " + type.getCanonicalName() + "(" + firstArg(fxn) + ", \"" + fxn.name + "\", "
-                + fxn.returnValue.type.getJType().getCoderDescriptor().getCoderInstanceName() + ", argCoders);");
-
-        return out.toString();
-    }
-
-    private static final String CONTEXT_NAME = "nativeBuffer";
-
-    public static void writeOutFunction(final PrintStream out, final Class<? extends Invoke> type, final Function fxn, final String initWithObj) {
-        final String instName = makeInstanceName(fxn);
-        final JType returnJavaType = fxn.returnValue.type.getJType();
-
-        if(!fxn.variadic){
-            out.print(createFieldCache(type, fxn));
-            out.println();
-        }
-
-        JLMethod meth = new JLMethod("public", returnJavaType.getJavaReturnTypeName(), fxn.getJavaName());
-
-        for(Arg arg : fxn.args)
-            meth.args.add("final " + arg.type.getJType().getTypeNameAsParam() + " " + arg.javaName);
-
-        if(fxn.variadic)
-            meth.args.add("final Object... " + VARARGS_NAME);
-
-        if(fxn instanceof Method && ((Method)fxn).ignore){
-            String suggestion = ((Method)fxn).suggestion == null ? "" : (" Suggested work-around: " + ((Method)fxn).suggestion);
-            meth.jdoc.add("@deprecated The framework recommends that this method be ignored. (It may be deprecated.)" + suggestion);
-            meth.attrs.add("@Deprecated");
-        }
-
-        // type mismatch warning
-        {
-            {
-                String retMsg = fxn.returnValue.type.getJType().getCoderDescriptor().mismatchMessage();
-                if(retMsg != null){
-                    meth.jdoc.add("@deprecated Possible type mismatch: (return value) " + retMsg);
-                    meth.attrs.add("@Deprecated");
-                }
-            }
-
-            for(int i = 0; i < fxn.args.size(); i++){
-                final Arg arg = fxn.args.get(i);
-                String argMsg = arg.type.getJType().getCoderDescriptor().mismatchMessage();
-                if(argMsg != null){
-                    meth.jdoc.add("@deprecated Possible type mismatch: (arg" + i + ": " + arg.javaName + ") " + argMsg);
-                    meth.attrs.add("@Deprecated");
-                }
-            }
-        }
-
-        if(fxn.variadic)
-            meth.body.add(createLocalNew(coreType(fxn), fxn));
-        else
-            meth.body.add(createLocalForward(coreType(fxn), fxn));
-
-        meth.body.add(returnJavaType.createDeclareBuffer(CONTEXT_NAME));
-        meth.body.add(returnJavaType.createInit(CONTEXT_NAME, instName, initWithObj));
-
-        for(final Arg arg : fxn.args)
-            meth.body.add(arg.type.getJType().getCoderDescriptor().getPushStatementFor(CONTEXT_NAME, arg.javaName));
-
-        if(fxn.variadic){
-            meth.body.add(String.format("for(int i = %1$d; i < (%1$d + %2$s.length); i++)", fxn.args.size(), VARARGS_NAME));
-            meth.body.add(String.format("\targCoders[i].push(%1$s, %2$s[i - %3$d]);", CONTEXT_NAME, VARARGS_NAME, fxn.args.size()));
-        }
-
-        meth.body.add(returnJavaType.createInvoke(CONTEXT_NAME, instName));
-        meth.body.add(returnJavaType.createPop(CONTEXT_NAME));
-        meth.body.add(returnJavaType.createReturn());
-
-        out.print(meth.toString());
-        out.println();
-    }
-
-    private static Class<? extends Invoke> coreType(final Function fxn){
-        return fxn instanceof Method ? MsgSend.class : FunCall.class;
-    }
-
-    private static String firstArg(Function fxn){
-        return fxn instanceof Method ? "getRuntime()" : "this";
-    }
-
-    private static String makeInstanceName(Function fxn){
-        String ext;
-        if(fxn instanceof Method){
-            if(((Method) fxn).isClassMethod) ext = "CMetInst";
-            else                             ext = "IMetInst";
-        }
-        else
-            ext = "FxnInst";
-
-        return fxn.getJavaName() + "_" + ext;
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/Generator.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import com.apple.internal.jobjc.generator.classes.MixedPrimitiveCoderClassFile;
-import com.apple.internal.jobjc.generator.classes.OutputFile;
-import com.apple.internal.jobjc.generator.model.Framework;
-import com.apple.internal.jobjc.generator.model.coders.ComplexCoderDescriptor;
-import com.apple.internal.jobjc.generator.model.types.Type;
-import com.apple.internal.jobjc.generator.model.types.TypeCache;
-import com.apple.internal.jobjc.generator.utils.Fp.Pair;
-
-public class Generator {
-    private static final String DEFAULT_FRAMEWORKS_PATH = "/System/Library/Frameworks";
-    private static final String DEFAULT_OUTPUT_PATH = "/tmp/JObjC";
-
-    public static void main(final String...args) throws Throwable {
-        final Map<String, String> argMap = Utils.getArgs(args);
-
-        final String dst = get(argMap, "dst", DEFAULT_OUTPUT_PATH);
-        System.out.println("Cleaning up: " + dst);
-        final File dstLoc = new File(dst);
-        Utils.recDelete(dstLoc);
-        dstLoc.mkdirs();
-        System.out.println("Outputting classes to: " + dst);
-
-        final String frameworksPath = get(argMap, "frameworks", DEFAULT_FRAMEWORKS_PATH);
-        System.out.println("Searching for bridged frameworks in: " + frameworksPath);
-
-        final List<File> bridgeSupportFiles = FrameworkGenerator.findFrameworkFilesIn(new File(frameworksPath));
-        final List<Framework> frameworks = FrameworkGenerator.parseFrameworksFrom(bridgeSupportFiles);
-
-        System.out.println("--1-- Generator: consolidateClassesForFrameworks");
-        ClassConsolidator.consolidateClassesForFrameworks(frameworks);
-
-        System.out.println("--1-- Generator: TypeCache load");
-        TypeCache.inst().load(frameworks);
-
-        System.out.println("--1-- Generator: disambiguateMethodNames");
-        MethodDisambiguator.disambiguateMethodNames();
-
-        System.out.println("--1-- Generator: disambiguateFunctionsIn");
-        MethodDisambiguator.disambiguateFunctionsIn(frameworks);
-
-        System.out.println("--1-- Generator: generateClasses");
-        final List<OutputFile> sourceFiles = ClassGenerator.generateClasses(frameworks);
-        sourceFiles.add(new MixedPrimitiveCoderClassFile(ComplexCoderDescriptor.getMixedEncoders()));
-
-        System.out.println("--1-- Generator: writing " + sourceFiles.size() + " files");
-        for (final OutputFile sourceFile : sourceFiles) sourceFile.write(dstLoc);
-
-        System.out.println("I have " + TypeCache.inst().getUnknownTypes().size() + " unresolved types.");
-        for (final Type type : TypeCache.inst().getUnknownTypes())
-            System.out.println("[Warning] unknown type: " + type);
-
-        for(Type type : TypeCache.inst().typesByNTypes.values()){
-            if(!type.type32.getClass().equals(type.type64.getClass())){
-                System.out.format("Type with differing NTypes: %1$15s: %2$s\n", type.name, new Pair(type.type32, type.type64));
-            }
-        }
-    }
-
-    private static String get(final Map<String, String> defaults, final String key, final String defaultValue) {
-        final String value = defaults.get(key);
-        if (value != null) return value;
-        return defaultValue;
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/MethodDisambiguator.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator;
-
-import java.util.List;
-
-import com.apple.internal.jobjc.generator.model.Clazz;
-import com.apple.internal.jobjc.generator.model.Framework;
-import com.apple.internal.jobjc.generator.model.Function;
-import com.apple.internal.jobjc.generator.model.types.TypeCache;
-
-public class MethodDisambiguator {
-    static void disambiguateMethodNames() {
-        // link all subclassers off their parents
-        for (final Clazz clazz : TypeCache.inst().getAllClasses()) {
-            final Clazz superClazz = clazz.superClass;
-            if (superClazz != null) superClazz.subClassers.add(clazz);
-        }
-
-        // recursively call all subclassers, starting from NSObject on down
-        disambiguateMethodNamesFor(TypeCache.inst().getClassForName("NSObject"));
-
-        // NSProxy does not appear to subclass from NSObject, but it is still a real full class...?
-        disambiguateMethodNamesFor(TypeCache.inst().getClassForName("NSProxy"));
-    }
-
-    static void disambiguateMethodNamesFor(final Clazz clazz) {
-        clazz.disambiguateMethods();
-        for (final Clazz subClazz : clazz.subClassers) {
-            disambiguateMethodNamesFor(subClazz);
-        }
-    }
-
-    public static void disambiguateFunctionsIn(final List<Framework> frameworks) {
-        for (final Framework framework : frameworks) {
-            disambiguateFunctionsInFramework(framework);
-        }
-    }
-
-    static void disambiguateFunctionsInFramework(final Framework framework) {
-        for (final Function fxn : framework.functions)
-            fxn.disambiguateArgs();
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/RestrictedKeywords.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-public class RestrictedKeywords {
-    static final String[] JAVA_KEYWORD_CONFLICTS = {
-        "wait", "null", "class", "new", "toString", "finalize", "boolean", "interface", "final", "static"
-    };
-
-    static final Set<String> originalRestrictedSet = new HashSet<String>(Arrays.asList(JAVA_KEYWORD_CONFLICTS));
-
-    public static Set<String> getNewRestrictedSet() {
-        return new HashSet<String>(originalRestrictedSet);
-    }
-
-    public static boolean isRestricted(String s){
-        return originalRestrictedSet.contains(s);
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/Utils.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.regex.Pattern;
-
-import com.apple.internal.jobjc.generator.model.Framework;
-import com.apple.internal.jobjc.generator.model.Framework.FrameworkDependency;
-import com.apple.internal.jobjc.generator.utils.Fp;
-
-public class Utils {
-    public static boolean isLeopard = System.getProperty("os.version").startsWith("10.5");
-    public static boolean isSnowLeopard = System.getProperty("os.version").startsWith("10.6");
-
-    @SuppressWarnings("unchecked")
-    public static <T> List<T> list(final Object...args) {
-        final ArrayList<Object> list = new ArrayList<Object>(args.length);
-        for (final Object arg : args) list.add(arg);
-        return (List<T>)list;
-    }
-
-    /**
-     * A small implementation of UNIX find.
-     * @param matchRegex Only collect paths that match this regex.
-     * @param pruneRegex Don't recurse down a path that matches this regex. May be null.
-     * @throws IOException if File.getCanonicalPath() fails.
-     */
-    public static List<File> find(final File startpath, final String matchRegex, final String pruneRegex) throws IOException{
-        final Pattern matchPattern = Pattern.compile(matchRegex, Pattern.CASE_INSENSITIVE);
-        final Pattern prunePattern = pruneRegex == null ? null : Pattern.compile(pruneRegex, Pattern.CASE_INSENSITIVE);
-        final Set<String> visited = new HashSet<String>();
-        final List<File> found = new ArrayList<File>();
-        class Search{
-            void search(final File path) throws IOException{
-                if(prunePattern != null && prunePattern.matcher(path.getAbsolutePath()).matches()) return;
-                String cpath = path.getCanonicalPath();
-                if(!visited.add(cpath))  return;
-                if(matchPattern.matcher(path.getAbsolutePath()).matches())
-                    found.add(path);
-                if(path.isDirectory())
-                    for(File sub : path.listFiles())
-                        search(sub);
-            }
-        }
-        new Search().search(startpath);
-        return found;
-    }
-
-    public static String joinWComma(final List<?> list) { return Fp.join(", ", list); }
-    public static String joinWComma(final Object[] list) { return Fp.join(", ", Arrays.asList(list)); }
-
-    public static class Substituter {
-        String str;
-
-        public Substituter(final String str) {
-            this.str = str.replaceAll("\\#", "\t").replaceAll("\\~", "\n");
-        }
-
-        public void replace(final String key, final String value) {
-            str = str.replaceAll("\\$" + key, value);
-        }
-
-        /**
-         * Apply String.format first, and then pass through Substituter.
-         */
-        public static String format(String format, Object... args){
-            return new Substituter(String.format(format, args)).toString();
-        }
-
-        @Override public String toString() {
-            return str;
-        }
-    }
-
-    static Map<String, String> getArgs(final String...args) {
-        final Map<String, String> argMap = new HashMap<String, String>();
-        for (final String arg : args) {
-            final String[] splitArg = arg.split("\\=");
-            if (splitArg.length != 2) continue;
-            argMap.put(splitArg[0], splitArg[1]);
-        }
-        return argMap;
-    }
-
-    static void recDelete(final File file) {
-        if (!file.exists()) return;
-        if (file.isDirectory()) for (final File f : file.listFiles()) recDelete(f);
-        file.delete();
-    }
-
-    public static String capitalize(String s){
-        if(s.length() == 0) return s;
-        return Character.toString(Character.toUpperCase(s.charAt(0))) + s.substring(1);
-    }
-
-    /**
-     * Sort frameworks by dependencies. If A is a dependency of B,
-     * then A will come before B in the list.
-     */
-    public static void topologicalSort(final List<Framework> frameworks) {
-        final Set<Framework> visited = new TreeSet<Framework>();
-        final List<Framework> sorted = new ArrayList<Framework>(frameworks.size());
-        class Rec{
-            void visit(final Framework fw){
-                if(!visited.add(fw)) return;
-                for(FrameworkDependency dep : fw.dependencies)
-                    if(dep.object != null)
-                        visit(dep.object);
-                sorted.add(fw);
-            }
-        }
-        for(Framework fw : frameworks) new Rec().visit(fw);
-        frameworks.clear();
-        frameworks.addAll(sorted);
-    }
-
-    /**
-     * If there is a cycle it is returned. Otherwise null is returned.
-     */
-    public static List<Framework> getDependencyCycle(List<Framework> frameworks) {
-        @SuppressWarnings("serial")
-        class FoundCycle extends Throwable{
-            public final List<Framework> cycle;
-            public FoundCycle(List<Framework> cycle){
-                this.cycle = cycle;
-            }
-        };
-        class Rec{
-            void visit(final Framework fw, List<Framework> visited) throws FoundCycle{
-                visited = new LinkedList<Framework>(visited);
-                if(visited.contains(fw)){
-                    visited.add(fw);
-                    throw new FoundCycle(visited);
-                }
-                visited.add(fw);
-                for(FrameworkDependency dep : fw.dependencies)
-                    if(dep.object != null)
-                        visit(dep.object, visited);
-            }
-        }
-        try{ for(Framework fw : frameworks){ new Rec().visit(fw, new LinkedList<Framework>()); }}
-        catch(FoundCycle x){ return x.cycle; }
-        return null;
-    }
-
-    public static String getCanonicalPath(File file) throws RuntimeException{
-        try {
-            return file.getCanonicalPath();
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/AbstractObjCClassFile.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator.classes;
-
-import com.apple.internal.jobjc.generator.model.Clazz;
-
-public abstract class AbstractObjCClassFile extends GeneratedClassFile {
-    final Clazz clazz;
-
-    public AbstractObjCClassFile(final Clazz clazz, final String classname, final String genericArgs, final String superClass) {
-        super(clazz.getPackage(), classname, genericArgs, superClass);
-        this.clazz = clazz;
-    }
-
-    public AbstractObjCClassFile(final Clazz clazz, final String classname, final String superClass) {
-        super(clazz.getPackage(), classname, superClass);
-        this.clazz = clazz;
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/CFTypeClassFile.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator.classes;
-
-import java.io.PrintStream;
-
-import com.apple.internal.jobjc.generator.model.CFType;
-import com.apple.jobjc.Pointer;
-
-public class CFTypeClassFile extends GeneratedClassFile {
-    final CFType cftype;
-
-    public CFTypeClassFile(final CFType cftype) {
-        super(cftype.parent.pkg, cftype.type.getJType().getJavaClassName(), com.apple.jobjc.CFType.class.getCanonicalName());
-        this.cftype = cftype;
-    }
-
-    @Override public void writeBeginning(PrintStream out){
-        out.println("\tpublic " + className + "(" + Pointer.class.getName() + "<?> ptr){");
-        out.println("\t\tsuper(ptr);");
-        out.println("\t}");
-        out.println("");
-        out.println("\tpublic " + className + "(long ptr){");
-        out.println("\t\tsuper(ptr);");
-        out.println("\t}");
-    }
-
-    @Override public void writeBody(PrintStream out){
-        if(cftype.getTypeIdFunc != null){
-            out.println("\tpublic static long getTypeId(){");
-            out.println("\t\treturn " + RootJObjCClass.runtimeFrameworkInst(cftype.parent.name) + "." + cftype.getTypeIdFunc + "();");
-            out.println("\t}");
-        }
-        else
-            out.println("\t// getTypeIdFunc not found");
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/CategoryClassClassFile.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator.classes;
-
-import java.io.PrintStream;
-import java.util.HashSet;
-import java.util.Set;
-
-import com.apple.internal.jobjc.generator.FunctionGenerator;
-import com.apple.internal.jobjc.generator.model.Category;
-import com.apple.internal.jobjc.generator.model.Method;
-import com.apple.jobjc.JObjCRuntime;
-import com.apple.jobjc.Invoke.MsgSend;
-
-public class CategoryClassClassFile extends AbstractObjCClassFile {
-    final Category category;
-
-    public CategoryClassClassFile(final Category category) {
-        super(category.category, category.category.name + "Class",
-                category.category.superClass.getFullPath() + "Class");
-        this.category = category;
-    }
-
-    @Override public void writeBeginning(final PrintStream out) {
-        out.format(
-                "\t%1$s(%2$s runtime) {\n" +
-                "\t\tsuper(\"%3$s\", runtime);\n" +
-                "\t}\n",
-                className, JObjCRuntime.class.getCanonicalName(), category.category.superClass.name);
-    }
-
-    @Override public void writeBody(final PrintStream out) {
-        Set<String> written = new HashSet<String>();
-        for(final Method method : this.clazz.classMethods)
-            if(written.add(method.name))
-                FunctionGenerator.writeOutFunction(out, MsgSend.class, method, "this");
-            else
-                System.out.format("Duplicate method: %1$s %2$s -%3$s\n", clazz.parent.name, className, method.name);
-    }
-
-    @Override protected boolean isFinal(){ return true; }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/CategoryClassFile.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator.classes;
-
-import java.io.PrintStream;
-
-import com.apple.internal.jobjc.generator.model.Category;
-import com.apple.jobjc.JObjCRuntime;
-
-public class CategoryClassFile extends JObjCClassFile {
-    private final Category category;
-
-    public CategoryClassFile(final Category category) {
-        super(category.category);
-        this.category = category;
-    }
-
-    @Override public void writeBeginning(final PrintStream out) {
-        String targetCls = category.category.superClass.getFullPath();
-        out.format("\tpublic %1$s(final %2$s obj, final %3$s runtime) {\n" +
-                "\t\tsuper(obj, runtime);\n" +
-                "\t}\n",
-            className, targetCls, JObjCRuntime.class.getCanonicalName());
-        super.writeBeginning(out);
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/CopiedFile.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator.classes;
-
-import java.io.*;
-
-public class CopiedFile extends OutputFile {
-    final File sourceFile;
-
-    public CopiedFile(final File sourceFile, final String pkg, final String filename) {
-        super(pkg, filename);
-        this.sourceFile = sourceFile;
-    }
-
-    @Override
-    public void write(final File parentDir) {
-        try {
-            final PrintStream out = open(parentDir);
-            final InputStream in = new FileInputStream(sourceFile);
-
-            copy(in, out);
-            close(out);
-        } catch (final IOException e) { throw new RuntimeException(e); }
-    }
-
-    private static void copy(final InputStream in, final PrintStream out) throws IOException {
-        int bit;
-        while (-1 != (bit = in.read())) {
-            out.write(bit);
-        }
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/FrameworkClassFile.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator.classes;
-
-import java.io.File;
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.TreeSet;
-
-import com.apple.internal.jobjc.generator.FunctionGenerator;
-import com.apple.internal.jobjc.generator.Utils;
-import com.apple.internal.jobjc.generator.model.Category;
-import com.apple.internal.jobjc.generator.model.Clazz;
-import com.apple.internal.jobjc.generator.model.Constant;
-import com.apple.internal.jobjc.generator.model.Framework;
-import com.apple.internal.jobjc.generator.model.Function;
-import com.apple.internal.jobjc.generator.model.NativeEnum;
-import com.apple.internal.jobjc.generator.model.StringConstant;
-import com.apple.internal.jobjc.generator.model.Struct;
-import com.apple.internal.jobjc.generator.model.types.JType;
-import com.apple.internal.jobjc.generator.model.types.JType.JStruct;
-import com.apple.internal.jobjc.generator.utils.Fp;
-import com.apple.internal.jobjc.generator.utils.JavaLang;
-import com.apple.internal.jobjc.generator.utils.Fp.Map1;
-import com.apple.internal.jobjc.generator.utils.JavaLang.JLCall;
-import com.apple.internal.jobjc.generator.utils.JavaLang.JLField;
-import com.apple.internal.jobjc.generator.utils.JavaLang.JLMethod;
-import com.apple.internal.jobjc.generator.utils.JavaLang.JLReturn;
-import com.apple.jobjc.JObjCRuntime;
-import com.apple.jobjc.MacOSXFramework;
-import com.apple.jobjc.Invoke.FunCall;
-
-public class FrameworkClassFile extends GeneratedClassFile {
-    final Framework framework;
-
-    public FrameworkClassFile(final Framework framework) {
-        super(framework.pkg, framework.name + "Framework", MacOSXFramework.class.getName());
-        this.framework = framework;
-    }
-
-    @Override public void writeBeginning(final PrintStream out) {
-        List<String> binPaths = Fp.map(new Map1<File,String>(){
-            public String apply(File a) { return "\"" + a.getAbsolutePath() + "\""; }},
-            framework.binaries);
-        out.println(new Utils.Substituter(
-                "#public " + className + "(" + JObjCRuntime.class.getName() + " runtime) {~" +
-                "##super(runtime, new String[]{" + Fp.join(", ", binPaths) + "});~" +
-                "#}~"
-        ));
-    }
-
-    @Override public void writeBody(final PrintStream out) {
-        for(final Struct struct : new ArrayList<Struct>(framework.structs)){
-            out.println("\tpublic " + struct.name + " make" + struct.name + "(){");
-            out.println("\t\treturn new " + struct.name + "(getRuntime());");
-            out.println("\t}");
-            out.println("\tpublic " + struct.name + " make" + struct.name + "(com.apple.jobjc.NativeBuffer base){");
-            out.println("\t\treturn new " + struct.name + "(getRuntime(), base);");
-            out.println("\t}");
-        }
-
-        for(final NativeEnum nenum : framework.enums){
-            if(nenum.ignore){
-                out.println("\t/**");
-                out.println("\t * @deprecated Suggestion: " + nenum.suggestion);
-                out.println("\t */");
-                out.println("\t@Deprecated");
-            }
-            out.println(String.format("\tpublic final %3$s %1$s(){ return %2$s; }",
-                    nenum.name, nenum.valueToString(), nenum.type.getJType().getJavaReturnTypeName()));
-        }
-
-        for(final Constant konst : framework.constants){
-            String cacheName = "_" + konst.name;
-            final JType jtype = konst.type.getJType();
-            final String cast = jtype.getReturnTypeCast() == null ? "" : "(" + jtype.getReturnTypeCast() + ")";
-            out.println();
-
-            out.print(new JLField("private", jtype.getJavaTypeName(), cacheName, jtype.getDefaultReturnValue()));
-
-            JLMethod reader = new JLMethod("public final", jtype.getJavaReturnTypeName(), konst.name);
-            reader.body.add("if(" + cacheName + " != " + jtype.getDefaultReturnValue() + ") return " + cast + cacheName + ";");
-
-            String contextName = jtype instanceof JStruct ? "returnValue" : "nativeBuffer";
-
-            if(jtype instanceof JStruct)
-                reader.body.add(((JStruct)jtype).createReturnValue());
-            else
-                reader.body.add(jtype.createDeclareBuffer(contextName));
-
-            reader.body.add("getConstant(\"" + konst.name + "\", " + contextName + ", " + jtype.getCoderDescriptor().getCoderInstanceName() + ".sizeof());");
-
-            reader.body.add(jtype.createPop(contextName));
-            reader.body.add(cacheName + " = returnValue;");
-            reader.body.add(jtype.createReturn());
-
-            out.print(reader);
-        }
-
-        for(final StringConstant konst : framework.stringConstants){
-            if(Fp.any(new Map1<Constant,Boolean>(){ public Boolean apply(Constant a) {
-                return a.name.equals(konst.name);
-                }}, new ArrayList<Constant>(framework.constants))){
-                System.out.println("Warning: [" + framework.name + "] String constant " + konst.name + " is already defined in constants. Skipping.");
-            }
-            else{
-                out.println("\tpublic final String " + konst.name + "(){ return \"" + escapeQuotes(konst.value) + "\"; }");
-            }
-        }
-
-        /**
-         * Order classes to get stable output
-         */
-        TreeSet<Clazz> sortedClasses = new TreeSet<Clazz>(framework.classes);
-        for (final Clazz clazz : sortedClasses) {
-            final String classClassName = clazz.name + "Class";
-            out.println(JavaLang.makeSingleton("_" + classClassName, clazz.name, classClassName, "getRuntime()"));
-        }
-
-        for (final Category cat : framework.categories) {
-            final String classClassName = cat.category.name + "Class";
-            out.println(JavaLang.makeSingleton("_" + classClassName, cat.category.name, classClassName, "getRuntime()"));
-
-            JLMethod jlm = new JLMethod("public", cat.category.name, cat.category.name, "final " + cat.category.superClass.getFullPath() + " obj");
-            jlm.body.add(new JLReturn(new JLCall("new " + cat.category.name, "obj", "getRuntime()")));
-            out.println(jlm);
-        }
-
-        for (final Function fxn : framework.functions){
-            FunctionGenerator.writeOutFunction(out, FunCall.class, fxn, null);
-        }
-    }
-
-    private String escapeQuotes(String s){
-        return s.replace("\"", "\\\"");
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/GeneratedClassFile.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator.classes;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintStream;
-
-public class GeneratedClassFile extends OutputFile {
-    protected final String className;
-    protected final String genericArgs;
-    protected final String superClass;
-
-    public GeneratedClassFile(final String pkg, final String classname, final String superClass) {
-        this(pkg, classname, null, superClass);
-    }
-
-    public GeneratedClassFile(final String pkg, final String classname, final String genericArgs, final String superClass) {
-        super(pkg, classname + ".java");
-        this.className = classname;
-        this.genericArgs = genericArgs;
-        this.superClass = superClass;
-    }
-
-    @Override
-    public void write(final File parentDir) {
-        try {
-            final PrintStream out = open(parentDir);
-            out.println("package " + pkg + ";");
-            out.println();
-            out.print("public " + (isFinal() ? "final" : "") + " class " + className);
-            if(genericArgs != null) out.print("<" + genericArgs + ">");
-            if (superClass != null) out.print(" extends " + superClass);
-            out.println(" {");
-            writeBeginning(out);
-            writeBody(out);
-            writeEnd(out);
-            out.println("}");
-            close(out);
-        } catch (final IOException e) { throw new RuntimeException(e); }
-    }
-
-    public void writeBeginning(final PrintStream out) {
-
-    }
-
-    public void writeBody(final PrintStream out) {
-
-    }
-
-    public void writeEnd(final PrintStream out) {
-
-    }
-
-    protected boolean isFinal(){ return false; }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/JObjCClassClassFile.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator.classes;
-
-import java.io.PrintStream;
-import java.util.HashSet;
-import java.util.Set;
-
-import com.apple.internal.jobjc.generator.ClassGenerator;
-import com.apple.internal.jobjc.generator.FunctionGenerator;
-import com.apple.internal.jobjc.generator.model.Clazz;
-import com.apple.internal.jobjc.generator.model.Method;
-import com.apple.jobjc.JObjCRuntime;
-import com.apple.jobjc.Invoke.MsgSend;
-
-public class JObjCClassClassFile extends AbstractObjCClassFile {
-    public JObjCClassClassFile(final Clazz clazz) {
-        super(clazz, clazz.name + "Class", clazz.superClass != null ? clazz.superClass.getFullPath() + "Class" : ClassGenerator.JOBJC_PACKAGE + ".NSClass<" + clazz.name + ">");
-    }
-
-    @Override public void writeBeginning(final PrintStream out) {
-        out.format(
-                "\tpublic %1$s(%2$s runtime) {\n" +
-                "\t\tsuper(runtime);\n" +
-                "\t}\n",
-                className, JObjCRuntime.class.getCanonicalName());
-        out.format(
-                "\tpublic %1$s(String name, %2$s runtime) {\n" +
-                "\t\tsuper(name, runtime);\n" +
-                "\t}\n",
-                className, JObjCRuntime.class.getCanonicalName());
-        out.format(
-                "\tpublic %1$s(long ptr, %2$s runtime) {\n" +
-                "\t\tsuper(ptr, runtime);\n" +
-                "\t}\n",
-                className, JObjCRuntime.class.getCanonicalName());
-    }
-
-    @Override public void writeBody(final PrintStream out) {
-        Set<String> written = new HashSet<String>();
-        for(final Method method : this.clazz.classMethods)
-            if(written.add(method.name))
-                FunctionGenerator.writeOutFunction(out, MsgSend.class, method, "this");
-            else
-                System.out.format("Duplicate method: %1$s %2$s -%3$s\n", clazz.parent.name, className, method.name);
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/JObjCClassFile.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator.classes;
-
-import java.io.PrintStream;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-
-import com.apple.internal.jobjc.generator.FunctionGenerator;
-import com.apple.internal.jobjc.generator.model.Clazz;
-import com.apple.internal.jobjc.generator.model.Method;
-import com.apple.jobjc.JObjCRuntime;
-import com.apple.jobjc.NativeObjectLifecycleManager;
-import com.apple.jobjc.Invoke.MsgSend;
-
-public class JObjCClassFile extends AbstractObjCClassFile {
-    public JObjCClassFile(final Clazz clazz) {
-        super(clazz, clazz.name,
-                clazz.superClass == null ? "com.apple.jobjc.ID"
-                        : clazz.superClass.getFullPath());
-    }
-
-    private static Map<String, NativeObjectLifecycleManager> nolmForClass =
-        new TreeMap<String, NativeObjectLifecycleManager>();
-    static{
-        nolmForClass.put("NSAutoreleasePool", NativeObjectLifecycleManager.Nothing.INST);
-    }
-
-    @Override public void writeBeginning(final PrintStream out) {
-        out.format("\tpublic %1$s(final long objPtr, final %2$s runtime) {\n" +
-                "\t\tsuper(objPtr, runtime);\n" +
-                "\t}\n",
-            className, JObjCRuntime.class.getCanonicalName());
-
-        out.format("\tpublic %1$s(final %1$s obj, final %2$s runtime) {\n" +
-                "\t\tsuper(obj, runtime);\n" +
-                "\t}\n",
-            className, JObjCRuntime.class.getCanonicalName());
-
-        NativeObjectLifecycleManager nolm = nolmForClass.get(clazz.name);
-        if(nolm != null)
-            out.format("\t@Override\n"+
-                    "\tprotected %1$s getNativeObjectLifecycleManager() {\n" +
-                    "\t\treturn %2$s.INST;\n" +
-                    "\t}\n",
-                    NativeObjectLifecycleManager.class.getCanonicalName(), nolm.getClass().getCanonicalName());
-    }
-
-    @Override public void writeBody(final PrintStream out) {
-        Set<String> written = new HashSet<String>();
-        for(final Method method : this.clazz.instanceMethods)
-            if(written.add(method.name))
-                FunctionGenerator.writeOutFunction(out, MsgSend.class, method, "this");
-            else
-                System.out.format("Duplicate method: %1$s %2$s -%3$s\n", clazz.parent.name, className, method.name);
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/MixedPrimitiveCoderClassFile.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator.classes;
-
-import java.io.PrintStream;
-import java.util.Collection;
-
-import com.apple.internal.jobjc.generator.ClassGenerator;
-import com.apple.internal.jobjc.generator.model.coders.ComplexCoderDescriptor.MixedEncodingDescriptor;
-import com.apple.jobjc.PrimitiveCoder;
-
-public class MixedPrimitiveCoderClassFile extends GeneratedClassFile {
-    private static final String MULTI_CODER_CLASSNAME = "MixedPrimitiveCoder";
-    public static final String FULL_MULTI_CODER_CLASSNAME = ClassGenerator.JOBJC_PACKAGE + "." + MULTI_CODER_CLASSNAME;
-
-    final Collection<MixedEncodingDescriptor> coderDescs;
-
-    public MixedPrimitiveCoderClassFile(final Collection<MixedEncodingDescriptor> coderDescs) {
-        super(ClassGenerator.JOBJC_PACKAGE, MULTI_CODER_CLASSNAME, "java.lang.Object");
-        this.coderDescs = coderDescs;
-    }
-
-    @Override
-    public void writeBody(final PrintStream out) {
-        for (final MixedEncodingDescriptor desc : coderDescs) {
-            out.println("\tpublic static final " + PrimitiveCoder.class.getCanonicalName() + " " + desc.getMixedName() + " = " + desc.getDefinition() + ";");
-        }
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/OpaqueClassFile.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator.classes;
-
-import java.io.PrintStream;
-
-import com.apple.internal.jobjc.generator.model.Opaque;
-import com.apple.jobjc.Pointer;
-
-public class OpaqueClassFile extends GeneratedClassFile {
-    final Opaque opaque;
-
-    public OpaqueClassFile(final Opaque opaque) {
-        super(opaque.parent.pkg, opaque.type.getJType().getJavaClassName(), com.apple.jobjc.Opaque.class.getCanonicalName());
-        this.opaque = opaque;
-    }
-
-    @Override public void writeBeginning(PrintStream out){
-        out.println("\t// " + opaque.type);
-        out.println("\t// " + opaque.type.getJType());
-        out.println("");
-        out.println("\tpublic " + className + "(" + Pointer.class.getName() + "<?> ptr){");
-        out.println("\t\tsuper(ptr);");
-        out.println("\t}");
-        out.println("");
-        out.println("\tpublic " + className + "(long ptr){");
-        out.println("\t\tsuper(ptr);");
-        out.println("\t}");
-    }
-
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/OutputFile.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator.classes;
-
-import java.io.*;
-
-public abstract class OutputFile {
-    final String pkg;
-    final String fileName;
-
-    public OutputFile(final String pkg, final String filename) {
-        this.pkg = pkg;
-        this.fileName = filename;
-    }
-
-    public PrintStream open(final File parentDir) throws IOException {
-        final File pkgDir = new File(parentDir, pkg.replace('.', '/'));
-        pkgDir.mkdirs();
-        final File classFile = new File(pkgDir, fileName);
-        classFile.createNewFile();
-        return new PrintStream(classFile);
-    }
-
-    public void close(final PrintStream out) {
-        out.close();
-    }
-
-    public abstract void write(final File parentDir);
-
-    public boolean isClass(final Class<?> clazz) {
-        final String pkgName = clazz.getPackage().getName();
-        if (!pkgName.equals(pkg)) return false;
-
-        return fileName.contains(clazz.getSimpleName());
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/RootJObjCClass.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator.classes;
-
-import java.io.PrintStream;
-import java.util.List;
-
-import com.apple.internal.jobjc.generator.ClassGenerator;
-import com.apple.internal.jobjc.generator.model.Framework;
-import com.apple.internal.jobjc.generator.utils.JavaLang;
-import com.apple.internal.jobjc.generator.utils.JavaLang.JLCtor;
-import com.apple.internal.jobjc.generator.utils.JavaLang.JLField;
-import com.apple.internal.jobjc.generator.utils.JavaLang.JLMethod;
-import com.apple.jobjc.JObjCRuntime;
-
-public class RootJObjCClass extends GeneratedClassFile {
-    private static final String JOBJC_CLASSNAME = "JObjC";
-    public static final String FULL_JOBJC_CLASSNAME = ClassGenerator.JOBJC_PACKAGE + "." + JOBJC_CLASSNAME;
-    public static final String JOBJC_RUNTIME_INST = FULL_JOBJC_CLASSNAME + ".getInstance()";
-    public static final String JOBJC_RUNTIME_INST_R = FULL_JOBJC_CLASSNAME + ".getInstance(getRuntime())";
-
-    public static final String runtimeFrameworkInst(String fwname){
-        return JOBJC_RUNTIME_INST + "." + fwname + "()";
-    }
-
-    public static final String runtimeFrameworkInstR(String fwname){
-        return JOBJC_RUNTIME_INST_R + "." + fwname + "()";
-    }
-
-    final List<Framework> frameworks;
-
-    public RootJObjCClass(final List<Framework> frameworks) {
-        super(ClassGenerator.JOBJC_PACKAGE, JOBJC_CLASSNAME, "java.lang.Object");
-        this.frameworks = frameworks;
-    }
-
-    @Override public void writeBeginning(final PrintStream out) {
-        out.print(new JLField("private static", JOBJC_CLASSNAME, "instance"));
-        out.print(new JLField("private final", JObjCRuntime.class.getName(), "runtime"));
-
-        JLMethod getInstR = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance", "final JObjCRuntime runtime");
-        getInstR.body.add("if(runtime == null) throw new NullPointerException(\"runtime\");");
-        getInstR.body.add("if(instance == null) instance = new JObjC(runtime);");
-        getInstR.body.add("return instance;");
-        out.print(getInstR);
-
-        JLMethod getInst = new JLMethod("public static", JOBJC_CLASSNAME, "getInstance");
-        getInst.body.add("return getInstance(JObjCRuntime.getInstance());");
-        out.print(getInst);
-
-        JLCtor ctor = new JLCtor("private", JOBJC_CLASSNAME, "final JObjCRuntime runtime");
-        ctor.body.add("this.runtime = runtime;");
-        for (final Framework f : frameworks)
-            ctor.body.add("runtime.registerPackage(\"" + f.pkg + "\");");
-        out.print(ctor);
-    }
-
-    @Override public void writeBody(final PrintStream out) {
-        for (final Framework f : frameworks)
-            out.println(JavaLang.makeSingleton("_" + f.name, f.name, f.pkg + "." + f.name + "Framework", "runtime"));
-    }
-}
--- a/src/macosx/native/jobjc/src/generator/java/com/apple/internal/jobjc/generator/classes/StructClassFile.java	Wed Jul 02 17:03:47 2014 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.apple.internal.jobjc.generator.classes;
-
-import java.io.PrintStream;
-
-import com.apple.internal.jobjc.generator.model.Struct;
-import com.apple.internal.jobjc.generator.model.Struct.Field;
-import com.apple.internal.jobjc.generator.model.coders.CoderDescriptor;
-import com.apple.internal.jobjc.generator.model.types.JType;
-import com.apple.internal.jobjc.generator.model.types.JType.JStruct;
-import com.apple.internal.jobjc.generator.model.types.NType.NBitfield;
-import com.apple.internal.jobjc.generator.model.types.NType.NStruct;
-import com.apple.internal.jobjc.generator.utils.Fp;
-import com.apple.internal.jobjc.generator.utils.Fp.Map1;
-import com.apple.jobjc.JObjCRuntime;
-import com.apple.jobjc.Coder.StructCoder;
-
-public class StructClassFile extends GeneratedClassFile {
-    final Struct struct;
-
-    public StructClassFile(final Struct struct) {
-        super(struct.parent.pkg, struct.name, com.apple.jobjc.Struct.class.getName());
-        this.struct = struct;
-    }
-
-    @Override public boolean isFinal(){ return true; }
-
-    @Override public void writeBeginning(final PrintStream out) {
-        out.println();
-        out.println("\tpublic static int SIZEOF = " + JObjCRuntime.class.getName() + ".IS64 ? "
-                + ((NStruct) struct.type.type64).sizeof64() + " : " + ((NStruct) struct.type.type32).sizeof32() + ";");
-        out.println();
-        out.format("\tpublic final static %1$s getStructCoder(){ return coder; }\n", StructCoder.class.getCanonicalName());
-        out.format("\t@Override public final %1$s getCoder(){ return coder; }\n", StructCoder.class.getCanonicalName());
-        out.format("\tprivate final static %1$s coder = new %1$s(SIZEOF%2$s%3$s){\n", StructCoder.class.getCanonicalName(),
-                (struct.fields.size() > 0 ? ",\n\t\t" : ""),
-                Fp.join(",\n\t\t", Fp.map(new Map1<Field,String>(){
-                    public String apply(Field a) {
-                        return a.type.getJType().getCoderDescriptor().getCoderInstanceName();
-                    }}, struct.fields)));
-        out.format("\t\t@Override protected %1$s newInstance(%2$s runtime){ return new %1$s(runtime); }\n",
-                struct.name,
-                JObjCRuntime.class.getCanonicalName());
-        out.println("\t};");
-        out.println();
-        out.println("\t" + struct.name + "(final " + JObjCRuntime.class.getCanonicalName() + " runtime){");
-        out.println("\t\tsuper(runtime, SIZEOF);");
-        out.println("\t}");
-        out.println();
-        out.println("\tpublic " + struct.name + "(final " + JObjCRuntime.class.getCanonicalName() + " runtime, final com.apple.jobjc.NativeBuffer buffer) {");
-        out.println("\t\tsuper(runtime, buffer, SIZEOF);");
-        out.println("\t}");
-    }
-
-    @Override public void writeBody(final PrintStream out) {
-        for(Struct.Field field : struct.fields){
-            if(field.type.type64 instanceof NStruct && field.type.type32 instanceof NStruct)
-                writeStructField(field, out);
-            else
-                writeField(field, out);
-        }
-    }
-
-    private void writeField(final Struct.Field field, final PrintStream out){
-        if(field.type.type32 instanceof NBitfield){
-            out.format("\t// Skipping bitfield '%1$s'\n", field.name);
-            return;
-        }
-        String privName = field.name + "__";
-        String offsetName = field.name.toUpperCase() + "_OFFSET";
-        JType jtype = field.type.getJType();
-        String retType = jtype.getJavaReturnTypeName();
-        CoderDescriptor cdesc = jtype.getCoderDescriptor();
-        out.println();
-        out.println("\tprivate static final int " + offsetName + " = " + JObjCRuntime.class.getName()
-                + ".IS64 ? " + field.field64.offset64() + " : " + field.field32.offset32() + ";");
-
-        out.println("\t//" + cdesc.getClass().toString());
-        out.println("\tpublic " + retType + " " + getterName(field) + "(){");
-        out.println(jtype.createPopAddr("getRuntime()", "this.raw.bufferPtr + " + offsetName));
-        out.println(jtype.createReturn());
-        out.println("\t}");
-        out.println();
-        out.println("\tpublic void " + setterName(field.name) + "(final " + retType + " " + privName + "){");
-        out.println("\t\t" + cdesc.getPushAddrStatementFor("getRuntime()", "this.raw.bufferPtr + " + offsetName, privName));
-        out.println("\t}");
-    }
-
-    private void writeStructField(final Struct.Field field, final PrintStream out){
-        if(field.type.getJType() == null || !(field.type.getJType() instanceof JStruct)){
-            out.println("\t// Found bad JavaType (" + field.type.getJType() + ") for field (" + field.name + ") of type (" + field.type + ")");
-            return;
-        }
-        String privName = field.name + "__";
-        String offsetName = field.name.toUpperCase() + "_OFFSET";
-        JStruct jstype = (JStruct) field.type.getJType();
-        String retTypeName = jstype.getJavaReturnTypeName();
-        out.println();
-        out.println("\tprivate static final int " + offsetName + " = " + JObjCRuntime.class.getName() + ".IS64"
-                + " ? " + field.field64.offset64() + " : " + field.field32.offset32() + ";");
-
-        out.println("\tprivate " + retTypeName + " " + privName + " = null;");
-        out.println("\tpublic " + retTypeName + " " + getterName(field) + "(){");
-        out.println("\t\tif(null==" + privName + "){");
-