aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-05-09 09:27:14 -0400
committerGitHub <noreply@github.com>2018-05-09 09:27:14 -0400
commit116914ab3e72491c863ca8a062bd8fa184c01e04 (patch)
tree84572f9ee727bf371bc55c0b232691b8e1ac9484 /src/codegen.cpp
parent670c9f9b741651f8b9873356a9e24da07c3ed355 (diff)
parent2a74aa206781b56d3aae5c0e8a94c75f0d73ac51 (diff)
downloadzig-116914ab3e72491c863ca8a062bd8fa184c01e04.tar.gz
zig-116914ab3e72491c863ca8a062bd8fa184c01e04.zip
Merge pull request #1000 from zig-lang/slice-type-info
Added Slice as its own type info in userland
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index db69708e9a..4e58f86d4b 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -6345,6 +6345,7 @@ static void define_builtin_compile_vars(CodeGen *g) {
const TypeTableEntryId id = type_id_at_index(i);
buf_appendf(contents, " %s,\n", type_id_name(id));
}
+ buf_appendf(contents, " Slice,\n");
buf_appendf(contents, "};\n\n");
}
{
@@ -6357,6 +6358,7 @@ static void define_builtin_compile_vars(CodeGen *g) {
" Int: Int,\n"
" Float: Float,\n"
" Pointer: Pointer,\n"
+ " Slice: Slice,\n"
" Array: Array,\n"
" Struct: Struct,\n"
" FloatLiteral: void,\n"
@@ -6392,6 +6394,8 @@ static void define_builtin_compile_vars(CodeGen *g) {
" child: type,\n"
" };\n"
"\n"
+ " pub const Slice = Pointer;\n"
+ "\n"
" pub const Array = struct {\n"
" len: usize,\n"
" child: type,\n"