Commit ede6718c authored by Jan Ziak's avatar Jan Ziak Committed by Russ Cox

runtime: move type kinds into a separate file

R=rsc
CC=golang-dev
https://golang.org/cl/6285047
parent c8cbbd31
......@@ -5,6 +5,7 @@
#include "runtime.h"
#include "arch_GOARCH.h"
#include "type.h"
#include "typekind.h"
#include "malloc.h"
void
......
......@@ -13,6 +13,7 @@ package runtime
#include "malloc.h"
#include "defs_GOOS_GOARCH.h"
#include "type.h"
#include "typekind.h"
#pragma dataflag 16 /* mark mheap as 'no pointers', hiding from garbage collector */
MHeap runtime·mheap;
......
......@@ -5,6 +5,7 @@
#include "runtime.h"
#include "arch_GOARCH.h"
#include "type.h"
#include "typekind.h"
#include "malloc.h"
static int32 debug = 0;
......
......@@ -19,6 +19,7 @@ typedef struct IMethod IMethod;
typedef struct SliceType SliceType;
typedef struct FuncType FuncType;
// Needs to be in sync with typekind.h/CommonSize
struct CommonType
{
uintptr size;
......@@ -34,37 +35,6 @@ struct CommonType
Type *ptrto;
};
enum {
KindBool = 1,
KindInt,
KindInt8,
KindInt16,
KindInt32,
KindInt64,
KindUint,
KindUint8,
KindUint16,
KindUint32,
KindUint64,
KindUintptr,
KindFloat32,
KindFloat64,
KindComplex64,
KindComplex128,
KindArray,
KindChan,
KindFunc,
KindInterface,
KindMap,
KindPtr,
KindSlice,
KindString,
KindStruct,
KindUnsafePointer,
KindNoPointers = 1<<7,
};
struct Method
{
String *name;
......
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
enum {
KindBool = 1,
KindInt,
KindInt8,
KindInt16,
KindInt32,
KindInt64,
KindUint,
KindUint8,
KindUint16,
KindUint32,
KindUint64,
KindUintptr,
KindFloat32,
KindFloat64,
KindComplex64,
KindComplex128,
KindArray,
KindChan,
KindFunc,
KindInterface,
KindMap,
KindPtr,
KindSlice,
KindString,
KindStruct,
KindUnsafePointer,
KindNoPointers = 1<<7,
// size of Type interface header + CommonType structure.
CommonSize = 2*sizeof(void*) + 6*sizeof(void*) + 8,
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment