From 849ae9fe372f75472099c97f886950729b420ee5 Mon Sep 17 00:00:00 2001 From: David Rubin Date: Fri, 21 Jun 2024 22:19:59 -0700 Subject: [PATCH] add copyrights to files --- build.zig | 4 ++++ build.zig.zon | 8 +++++++- graph/plot.py | 4 ++++ src/compiler/CodeObject.zig | 4 ++++ src/compiler/Instruction.zig | 4 ++++ src/compiler/Marshal.zig | 4 ++++ src/compiler/objtype.zig | 4 ++++ src/compiler/opcodes.zig | 5 +++-- src/crash_report.zig | 4 ++++ src/frontend/Python.zig | 4 ++++ src/frontend/cpython.zig | 4 ++++ src/graph/Graph.zig | 4 ++++ src/main.zig | 4 ++++ src/modules/builtins.zig | 4 ++++ src/print_co.zig | 4 ++++ src/vm/Object.zig | 4 ++++ src/vm/Vm.zig | 4 ++++ src/vm/errors.zig | 4 ++++ tests/cases.zig | 4 ++++ tests/matrix.zig | 4 ++++ tools/opcode2zig.zig | 4 ++++ 21 files changed, 86 insertions(+), 3 deletions(-) diff --git a/build.zig b/build.zig index 269e46c..078afd1 100644 --- a/build.zig +++ b/build.zig @@ -1,3 +1,7 @@ +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only + const std = @import("std"); const CpythonStep = @import("build/CpythonStep.zig"); diff --git a/build.zig.zon b/build.zig.zon index f14fb80..ef029fd 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,7 +1,13 @@ .{ .name = "osmium", .version = "0.1.0", - .paths = .{""}, + .minimum_zig_version = "0.13.0", + .paths = .{ + "src", + "build.zig", + "build.zig.zon", + "README.md", + }, .dependencies = .{ .tracer = .{ .url = "https://github.com/Rexicon226/zig-tracer/archive/6400e066bb3849be4906f3b6e124d6c8c5a5083f.tar.gz", diff --git a/graph/plot.py b/graph/plot.py index dc7798c..f2ef169 100644 --- a/graph/plot.py +++ b/graph/plot.py @@ -1,3 +1,7 @@ +# Copyright (c) 2024, David Rubin +# +# SPDX-License-Identifier: GPL-3.0-only + import struct import matplotlib.pyplot as plt import networkx as nx diff --git a/src/compiler/CodeObject.zig b/src/compiler/CodeObject.zig index 46414f2..54ff83f 100644 --- a/src/compiler/CodeObject.zig +++ b/src/compiler/CodeObject.zig @@ -1,3 +1,7 @@ +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only + //! A 3.10 CodeObject const std = @import("std"); diff --git a/src/compiler/Instruction.zig b/src/compiler/Instruction.zig index 7112bcf..e0cfde2 100644 --- a/src/compiler/Instruction.zig +++ b/src/compiler/Instruction.zig @@ -1,3 +1,7 @@ +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only + //! A thin wrapper around the 2 bytes that makeup the bytecode const Instruction = @This(); diff --git a/src/compiler/Marshal.zig b/src/compiler/Marshal.zig index 9e8f2c1..ee2b751 100644 --- a/src/compiler/Marshal.zig +++ b/src/compiler/Marshal.zig @@ -1,3 +1,7 @@ +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only + //! Serialization of PYC files. const std = @import("std"); diff --git a/src/compiler/objtype.zig b/src/compiler/objtype.zig index 6279206..535544c 100644 --- a/src/compiler/objtype.zig +++ b/src/compiler/objtype.zig @@ -1,3 +1,7 @@ +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only + /// Object types pub const ObjType = enum(u8) { TYPE_NULL = '0', diff --git a/src/compiler/opcodes.zig b/src/compiler/opcodes.zig index f014c26..ec41096 100644 --- a/src/compiler/opcodes.zig +++ b/src/compiler/opcodes.zig @@ -1,5 +1,6 @@ -// This file was autogenerated by tools/opcode2zig.zig -// DO NOT EDIT +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only /// Op Codes pub const OpCode = enum(u8) { diff --git a/src/crash_report.zig b/src/crash_report.zig index 62f54f0..aa0ec2d 100644 --- a/src/crash_report.zig +++ b/src/crash_report.zig @@ -1,3 +1,7 @@ +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only + //! Overrides the panics to provide more information //! Slightly stolen from the Zig Compiler :P diff --git a/src/frontend/Python.zig b/src/frontend/Python.zig index 520db32..ac6c0e9 100644 --- a/src/frontend/Python.zig +++ b/src/frontend/Python.zig @@ -1,3 +1,7 @@ +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only + //! Inputs python source and outputs Bytecode pub const Error = error{ diff --git a/src/frontend/cpython.zig b/src/frontend/cpython.zig index f8f7fa8..d3dae7d 100644 --- a/src/frontend/cpython.zig +++ b/src/frontend/cpython.zig @@ -1,3 +1,7 @@ +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only + //! CPython bindings for compiling source code into bytecode. const std = @import("std"); diff --git a/src/graph/Graph.zig b/src/graph/Graph.zig index f36de91..3ebeb84 100644 --- a/src/graph/Graph.zig +++ b/src/graph/Graph.zig @@ -1,3 +1,7 @@ +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only + //! Creates a temporal graph of a CodeObject const std = @import("std"); diff --git a/src/main.zig b/src/main.zig index c5d8cc3..d04c6e9 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1,3 +1,7 @@ +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only + const std = @import("std"); const builtin = @import("builtin"); diff --git a/src/modules/builtins.zig b/src/modules/builtins.zig index d207917..19064f3 100644 --- a/src/modules/builtins.zig +++ b/src/modules/builtins.zig @@ -1,3 +1,7 @@ +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only + //! Scope References to builtin functions // NOTE: Builtin functions are expected to append their returns to the stack themselves. diff --git a/src/print_co.zig b/src/print_co.zig index 0582c07..aa1e939 100644 --- a/src/print_co.zig +++ b/src/print_co.zig @@ -1,3 +1,7 @@ +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only + //! Logic to print a CodeObject in a tasteful manner. const std = @import("std"); diff --git a/src/vm/Object.zig b/src/vm/Object.zig index 979a0ce..54d12d4 100644 --- a/src/vm/Object.zig +++ b/src/vm/Object.zig @@ -1,3 +1,7 @@ +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only + const Object = @This(); const std = @import("std"); diff --git a/src/vm/Vm.zig b/src/vm/Vm.zig index 6d93ea6..fdd7209 100644 --- a/src/vm/Vm.zig +++ b/src/vm/Vm.zig @@ -1,3 +1,7 @@ +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only + //! Virtual Machine that runs Python Bytecode blazingly fast const std = @import("std"); diff --git a/src/vm/errors.zig b/src/vm/errors.zig index 2448cb2..207f805 100644 --- a/src/vm/errors.zig +++ b/src/vm/errors.zig @@ -1,3 +1,7 @@ +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only + //! Handles error creation, serialisation, and printing const std = @import("std"); diff --git a/tests/cases.zig b/tests/cases.zig index 414d044..4724b6d 100644 --- a/tests/cases.zig +++ b/tests/cases.zig @@ -1,3 +1,7 @@ +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only + const std = @import("std"); const matrix = @import("matrix.zig"); diff --git a/tests/matrix.zig b/tests/matrix.zig index ecf3ca2..0e04dbe 100644 --- a/tests/matrix.zig +++ b/tests/matrix.zig @@ -1,3 +1,7 @@ +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only + const std = @import("std"); const File = std.fs.File; const Allocator = std.mem.Allocator; diff --git a/tools/opcode2zig.zig b/tools/opcode2zig.zig index 28a0f8d..7b59630 100644 --- a/tools/opcode2zig.zig +++ b/tools/opcode2zig.zig @@ -1,3 +1,7 @@ +// Copyright (c) 2024, David Rubin +// +// SPDX-License-Identifier: GPL-3.0-only + //! Converts "opcode.h" into a zig enum. const std = @import("std");