Files
wren/wren.xcodeproj/project.pbxproj
T
Bob Nystrom 5b05c477c6 feat: implement closures with upvalue support and statement/expression separation
Add closure objects that wrap functions with captured upvalues, enabling
first-class closures that close over local variables from enclosing scopes.
Introduce new bytecode instructions (CODE_CLOSURE, CODE_LOAD_UPVALUE,
CODE_STORE_UPVALUE, CODE_CLOSE_UPVALUE, CODE_RETURN) and a CompilerUpvalue
tracking system with a MAX_UPVALUES limit of 256. Refactor the grammar to
strictly separate statements from expressions, fixing a bug where block
expressions incorrectly popped locals while temporaries remained on the
stack. Rename internal functions (wrenCallFunction, wrenDebugDumpInstruction,
wrenDebugDumpStack) and add Upvalue allocation, closure creation, and
debug dump support for the new instructions.
2013-12-04 15:43:50 +00:00

283 lines
11 KiB
Plaintext

// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
292A45D51838566F00C34813 /* wren_value.c in Sources */ = {isa = PBXBuildFile; fileRef = 292A45D41838566F00C34813 /* wren_value.c */; };
29AB1F291816E49C004B501E /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 29AB1F201816E49C004B501E /* main.c */; };
29AB1F2F1816FA66004B501E /* wren_vm.c in Sources */ = {isa = PBXBuildFile; fileRef = 29AB1F2E1816FA66004B501E /* wren_vm.c */; };
29AB1F3218170104004B501E /* wren_compiler.c in Sources */ = {isa = PBXBuildFile; fileRef = 29AB1F3018170104004B501E /* wren_compiler.c */; };
29CEDD5718495A630074C8B7 /* wren_debug.c in Sources */ = {isa = PBXBuildFile; fileRef = 29CEDD5618495A630074C8B7 /* wren_debug.c */; };
29FA7298181D91020089013C /* wren_core.c in Sources */ = {isa = PBXBuildFile; fileRef = 29FA7297181D91020089013C /* wren_core.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 */
292A45D31838566400C34813 /* wren_value.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = wren_value.h; path = src/wren_value.h; sourceTree = SOURCE_ROOT; };
292A45D41838566F00C34813 /* wren_value.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wren_value.c; path = src/wren_value.c; sourceTree = SOURCE_ROOT; };
296681E2183283A500C1407C /* wren_common.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = wren_common.h; path = src/wren_common.h; sourceTree = SOURCE_ROOT; };
2969FFC71843A16C0007B143 /* wren.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = wren.h; path = include/wren.h; sourceTree = "<group>"; };
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; };
29AB1F2D1816FA5B004B501E /* wren_vm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = wren_vm.h; path = src/wren_vm.h; sourceTree = SOURCE_ROOT; };
29AB1F2E1816FA66004B501E /* wren_vm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wren_vm.c; path = src/wren_vm.c; sourceTree = SOURCE_ROOT; };
29AB1F3018170104004B501E /* wren_compiler.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wren_compiler.c; path = src/wren_compiler.c; sourceTree = SOURCE_ROOT; };
29AB1F3118170104004B501E /* wren_compiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wren_compiler.h; path = src/wren_compiler.h; sourceTree = SOURCE_ROOT; };
29BD8159184CCEE700FA45E9 /* wren_debug.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = wren_debug.h; path = src/wren_debug.h; sourceTree = SOURCE_ROOT; };
29CEDD5618495A630074C8B7 /* wren_debug.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wren_debug.c; path = src/wren_debug.c; sourceTree = SOURCE_ROOT; };
29FA7296181D90F30089013C /* wren_core.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = wren_core.h; path = src/wren_core.h; sourceTree = SOURCE_ROOT; };
29FA7297181D91020089013C /* wren_core.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wren_core.c; path = src/wren_core.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 */
2969FFC61843A1430007B143 /* include */ = {
isa = PBXGroup;
children = (
2969FFC71843A16C0007B143 /* wren.h */,
);
name = include;
sourceTree = "<group>";
};
29AB1EFD1816E3AD004B501E = {
isa = PBXGroup;
children = (
2969FFC61843A1430007B143 /* include */,
29AB1F081816E3AD004B501E /* src */,
29AB1F071816E3AD004B501E /* Products */,
);
sourceTree = "<group>";
};
29AB1F071816E3AD004B501E /* Products */ = {
isa = PBXGroup;
children = (
29AB1F061816E3AD004B501E /* wren */,
);
name = Products;
sourceTree = "<group>";
};
29AB1F081816E3AD004B501E /* src */ = {
isa = PBXGroup;
children = (
29AB1F201816E49C004B501E /* main.c */,
296681E2183283A500C1407C /* wren_common.h */,
29AB1F3118170104004B501E /* wren_compiler.h */,
29AB1F3018170104004B501E /* wren_compiler.c */,
29FA7296181D90F30089013C /* wren_core.h */,
29FA7297181D91020089013C /* wren_core.c */,
292A45D31838566400C34813 /* wren_value.h */,
292A45D41838566F00C34813 /* wren_value.c */,
29AB1F2D1816FA5B004B501E /* wren_vm.h */,
29AB1F2E1816FA66004B501E /* wren_vm.c */,
29BD8159184CCEE700FA45E9 /* wren_debug.h */,
29CEDD5618495A630074C8B7 /* wren_debug.c */,
);
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 = (
292A45D51838566F00C34813 /* wren_value.c in Sources */,
29CEDD5718495A630074C8B7 /* wren_debug.c in Sources */,
29AB1F291816E49C004B501E /* main.c in Sources */,
29FA7298181D91020089013C /* wren_core.c in Sources */,
29AB1F3218170104004B501E /* wren_compiler.c in Sources */,
29AB1F2F1816FA66004B501E /* wren_vm.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
29AB1F0D1816E3AD004B501E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD)";
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 = c99;
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_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_PEDANTIC = YES;
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;
ARCHS = "$(ARCHS_STANDARD)";
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 = c99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_PEDANTIC = YES;
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 */;
}