Move the PRIMITIVE macro and all primitive function implementations (num_abs, string_contains, string_count) from vm.c into new src/primitives.c and src/primitives.h files. Add registerPrimitives() function to centralize primitive registration, removing inline PRIMITIVE calls from newVM(). Also remove unused numGlobals field from VM struct and add primitives.c to Xcode project sources.
255 lines
9.1 KiB
Plaintext
255 lines
9.1 KiB
Plaintext
// !$*UTF8*$!
|
|
{
|
|
archiveVersion = 1;
|
|
classes = {
|
|
};
|
|
objectVersion = 46;
|
|
objects = {
|
|
|
|
/* Begin PBXBuildFile section */
|
|
29AB1F291816E49C004B501E /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 29AB1F201816E49C004B501E /* main.c */; };
|
|
29AB1F2F1816FA66004B501E /* vm.c in Sources */ = {isa = PBXBuildFile; fileRef = 29AB1F2E1816FA66004B501E /* vm.c */; };
|
|
29AB1F3218170104004B501E /* compiler.c in Sources */ = {isa = PBXBuildFile; fileRef = 29AB1F3018170104004B501E /* compiler.c */; };
|
|
29FA7298181D91020089013C /* primitives.c in Sources */ = {isa = PBXBuildFile; fileRef = 29FA7297181D91020089013C /* primitives.c */; };
|
|
/* End PBXBuildFile section */
|
|
|
|
/* Begin PBXCopyFilesBuildPhase section */
|
|
29AB1F041816E3AD004B501E /* CopyFiles */ = {
|
|
isa = PBXCopyFilesBuildPhase;
|
|
buildActionMask = 2147483647;
|
|
dstPath = /usr/share/man/man1/;
|
|
dstSubfolderSpec = 0;
|
|
files = (
|
|
);
|
|
runOnlyForDeploymentPostprocessing = 1;
|
|
};
|
|
/* End PBXCopyFilesBuildPhase section */
|
|
|
|
/* Begin PBXFileReference section */
|
|
29AB1F061816E3AD004B501E /* wren */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = wren; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
29AB1F201816E49C004B501E /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = main.c; path = src/main.c; sourceTree = SOURCE_ROOT; };
|
|
29AB1F271816E49C004B501E /* wren.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; name = wren.1; path = src/wren.1; sourceTree = SOURCE_ROOT; };
|
|
29AB1F2D1816FA5B004B501E /* vm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = vm.h; path = src/vm.h; sourceTree = SOURCE_ROOT; };
|
|
29AB1F2E1816FA66004B501E /* vm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vm.c; path = src/vm.c; sourceTree = SOURCE_ROOT; };
|
|
29AB1F3018170104004B501E /* compiler.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = compiler.c; path = src/compiler.c; sourceTree = SOURCE_ROOT; };
|
|
29AB1F3118170104004B501E /* compiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = compiler.h; path = src/compiler.h; sourceTree = SOURCE_ROOT; };
|
|
29FA7296181D90F30089013C /* primitives.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = primitives.h; path = src/primitives.h; sourceTree = SOURCE_ROOT; };
|
|
29FA7297181D91020089013C /* primitives.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = primitives.c; path = src/primitives.c; sourceTree = SOURCE_ROOT; };
|
|
/* End PBXFileReference section */
|
|
|
|
/* Begin PBXFrameworksBuildPhase section */
|
|
29AB1F031816E3AD004B501E /* Frameworks */ = {
|
|
isa = PBXFrameworksBuildPhase;
|
|
buildActionMask = 2147483647;
|
|
files = (
|
|
);
|
|
runOnlyForDeploymentPostprocessing = 0;
|
|
};
|
|
/* End PBXFrameworksBuildPhase section */
|
|
|
|
/* Begin PBXGroup section */
|
|
29AB1EFD1816E3AD004B501E = {
|
|
isa = PBXGroup;
|
|
children = (
|
|
29AB1F081816E3AD004B501E /* src */,
|
|
29AB1F071816E3AD004B501E /* Products */,
|
|
);
|
|
sourceTree = "<group>";
|
|
};
|
|
29AB1F071816E3AD004B501E /* Products */ = {
|
|
isa = PBXGroup;
|
|
children = (
|
|
29AB1F061816E3AD004B501E /* wren */,
|
|
);
|
|
name = Products;
|
|
sourceTree = "<group>";
|
|
};
|
|
29AB1F081816E3AD004B501E /* src */ = {
|
|
isa = PBXGroup;
|
|
children = (
|
|
29AB1F3018170104004B501E /* compiler.c */,
|
|
29AB1F3118170104004B501E /* compiler.h */,
|
|
29FA7297181D91020089013C /* primitives.c */,
|
|
29FA7296181D90F30089013C /* primitives.h */,
|
|
29AB1F201816E49C004B501E /* main.c */,
|
|
29AB1F2E1816FA66004B501E /* vm.c */,
|
|
29AB1F2D1816FA5B004B501E /* vm.h */,
|
|
29AB1F271816E49C004B501E /* wren.1 */,
|
|
);
|
|
name = src;
|
|
path = wren;
|
|
sourceTree = "<group>";
|
|
};
|
|
/* End PBXGroup section */
|
|
|
|
/* Begin PBXNativeTarget section */
|
|
29AB1F051816E3AD004B501E /* wren */ = {
|
|
isa = PBXNativeTarget;
|
|
buildConfigurationList = 29AB1F0F1816E3AD004B501E /* Build configuration list for PBXNativeTarget "wren" */;
|
|
buildPhases = (
|
|
29AB1F021816E3AD004B501E /* Sources */,
|
|
29AB1F031816E3AD004B501E /* Frameworks */,
|
|
29AB1F041816E3AD004B501E /* CopyFiles */,
|
|
);
|
|
buildRules = (
|
|
);
|
|
dependencies = (
|
|
);
|
|
name = wren;
|
|
productName = wren;
|
|
productReference = 29AB1F061816E3AD004B501E /* wren */;
|
|
productType = "com.apple.product-type.tool";
|
|
};
|
|
/* End PBXNativeTarget section */
|
|
|
|
/* Begin PBXProject section */
|
|
29AB1EFE1816E3AD004B501E /* Project object */ = {
|
|
isa = PBXProject;
|
|
attributes = {
|
|
LastUpgradeCheck = 0500;
|
|
ORGANIZATIONNAME = "Bob Nystrom";
|
|
};
|
|
buildConfigurationList = 29AB1F011816E3AD004B501E /* Build configuration list for PBXProject "wren" */;
|
|
compatibilityVersion = "Xcode 3.2";
|
|
developmentRegion = English;
|
|
hasScannedForEncodings = 0;
|
|
knownRegions = (
|
|
en,
|
|
);
|
|
mainGroup = 29AB1EFD1816E3AD004B501E;
|
|
productRefGroup = 29AB1F071816E3AD004B501E /* Products */;
|
|
projectDirPath = "";
|
|
projectRoot = "";
|
|
targets = (
|
|
29AB1F051816E3AD004B501E /* wren */,
|
|
);
|
|
};
|
|
/* End PBXProject section */
|
|
|
|
/* Begin PBXSourcesBuildPhase section */
|
|
29AB1F021816E3AD004B501E /* Sources */ = {
|
|
isa = PBXSourcesBuildPhase;
|
|
buildActionMask = 2147483647;
|
|
files = (
|
|
29AB1F291816E49C004B501E /* main.c in Sources */,
|
|
29FA7298181D91020089013C /* primitives.c in Sources */,
|
|
29AB1F3218170104004B501E /* compiler.c in Sources */,
|
|
29AB1F2F1816FA66004B501E /* vm.c in Sources */,
|
|
);
|
|
runOnlyForDeploymentPostprocessing = 0;
|
|
};
|
|
/* End PBXSourcesBuildPhase section */
|
|
|
|
/* Begin XCBuildConfiguration section */
|
|
29AB1F0D1816E3AD004B501E /* Debug */ = {
|
|
isa = XCBuildConfiguration;
|
|
buildSettings = {
|
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
CLANG_CXX_LIBRARY = "libc++";
|
|
CLANG_ENABLE_OBJC_ARC = YES;
|
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
CLANG_WARN_EMPTY_BODY = YES;
|
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
CLANG_WARN_INT_CONVERSION = YES;
|
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
COPY_PHASE_STRIP = NO;
|
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
GCC_DYNAMIC_NO_PIC = NO;
|
|
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
|
GCC_OPTIMIZATION_LEVEL = 0;
|
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
|
"DEBUG=1",
|
|
"$(inherited)",
|
|
);
|
|
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
MACOSX_DEPLOYMENT_TARGET = 10.8;
|
|
ONLY_ACTIVE_ARCH = YES;
|
|
SDKROOT = macosx;
|
|
};
|
|
name = Debug;
|
|
};
|
|
29AB1F0E1816E3AD004B501E /* Release */ = {
|
|
isa = XCBuildConfiguration;
|
|
buildSettings = {
|
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
CLANG_CXX_LIBRARY = "libc++";
|
|
CLANG_ENABLE_OBJC_ARC = YES;
|
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
CLANG_WARN_EMPTY_BODY = YES;
|
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
CLANG_WARN_INT_CONVERSION = YES;
|
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
COPY_PHASE_STRIP = YES;
|
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
|
ENABLE_NS_ASSERTIONS = NO;
|
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
MACOSX_DEPLOYMENT_TARGET = 10.8;
|
|
SDKROOT = macosx;
|
|
};
|
|
name = Release;
|
|
};
|
|
29AB1F101816E3AD004B501E /* Debug */ = {
|
|
isa = XCBuildConfiguration;
|
|
buildSettings = {
|
|
GCC_C_LANGUAGE_STANDARD = c89;
|
|
GCC_WARN_PEDANTIC = NO;
|
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
};
|
|
name = Debug;
|
|
};
|
|
29AB1F111816E3AD004B501E /* Release */ = {
|
|
isa = XCBuildConfiguration;
|
|
buildSettings = {
|
|
GCC_C_LANGUAGE_STANDARD = c89;
|
|
GCC_WARN_PEDANTIC = NO;
|
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
};
|
|
name = Release;
|
|
};
|
|
/* End XCBuildConfiguration section */
|
|
|
|
/* Begin XCConfigurationList section */
|
|
29AB1F011816E3AD004B501E /* Build configuration list for PBXProject "wren" */ = {
|
|
isa = XCConfigurationList;
|
|
buildConfigurations = (
|
|
29AB1F0D1816E3AD004B501E /* Debug */,
|
|
29AB1F0E1816E3AD004B501E /* Release */,
|
|
);
|
|
defaultConfigurationIsVisible = 0;
|
|
defaultConfigurationName = Release;
|
|
};
|
|
29AB1F0F1816E3AD004B501E /* Build configuration list for PBXNativeTarget "wren" */ = {
|
|
isa = XCConfigurationList;
|
|
buildConfigurations = (
|
|
29AB1F101816E3AD004B501E /* Debug */,
|
|
29AB1F111816E3AD004B501E /* Release */,
|
|
);
|
|
defaultConfigurationIsVisible = 0;
|
|
defaultConfigurationName = Release;
|
|
};
|
|
/* End XCConfigurationList section */
|
|
};
|
|
rootObject = 29AB1EFE1816E3AD004B501E /* Project object */;
|
|
}
|