ruby-changes:55738
From: Nobuyoshi <ko1@a...>
Date: Thu, 16 May 2019 15:55:49 +0900 (JST)
Subject: [ruby-changes:55738] Nobuyoshi Nakada: a160b2f567 (trunk): Make COROUTINE_REGISTERS compile-time only not to be a global symbol
https://git.ruby-lang.org/ruby.git/commit/?id=a160b2f567 From a160b2f56716f70fa3e485ae89875da48baefc1d Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 16 May 2019 15:51:37 +0900 Subject: Make COROUTINE_REGISTERS compile-time only not to be a global symbol diff --git a/coroutine/amd64/Context.h b/coroutine/amd64/Context.h index 1801c1e..4ae31d1 100644 --- a/coroutine/amd64/Context.h +++ b/coroutine/amd64/Context.h @@ -16,7 +16,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/coroutine/amd64/Context.h#L16 #define COROUTINE __attribute__((noreturn)) void -const size_t COROUTINE_REGISTERS = 6; +enum {COROUTINE_REGISTERS = 6}; typedef struct { diff --git a/coroutine/arm32/Context.h b/coroutine/arm32/Context.h index 60732df..d2bb582 100644 --- a/coroutine/arm32/Context.h +++ b/coroutine/arm32/Context.h @@ -16,7 +16,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/coroutine/arm32/Context.h#L16 #define COROUTINE __attribute__((noreturn)) void -const size_t COROUTINE_REGISTERS = 9; +enum {COROUTINE_REGISTERS = 9}; typedef struct { diff --git a/coroutine/arm64/Context.h b/coroutine/arm64/Context.h index 03b91fd..ed646e8 100644 --- a/coroutine/arm64/Context.h +++ b/coroutine/arm64/Context.h @@ -16,7 +16,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/coroutine/arm64/Context.h#L16 #define COROUTINE __attribute__((noreturn)) void -const size_t COROUTINE_REGISTERS = 0xb0 / 8; +enum {COROUTINE_REGISTERS = 0xb0 / 8}; typedef struct { diff --git a/coroutine/ppc64le/Context.h b/coroutine/ppc64le/Context.h index de592f5..5971cd8 100644 --- a/coroutine/ppc64le/Context.h +++ b/coroutine/ppc64le/Context.h @@ -9,9 +9,11 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/coroutine/ppc64le/Context.h#L9 #define COROUTINE __attribute__((noreturn)) void -const size_t COROUTINE_REGISTERS = +enum { + COROUTINE_REGISTERS = 19 /* 18 general purpose registers (r14-r31) and 1 return address */ - + 4; /* space for fiber_entry() to store the link register */ + + 4 /* space for fiber_entry() to store the link register */ +}; typedef struct { diff --git a/coroutine/win32/Context.h b/coroutine/win32/Context.h index aa9f17d..779a9a8 100644 --- a/coroutine/win32/Context.h +++ b/coroutine/win32/Context.h @@ -17,7 +17,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/coroutine/win32/Context.h#L17 #define COROUTINE __declspec(noreturn) void __fastcall /* This doesn't include thread information block */ -const size_t COROUTINE_REGISTERS = 4; +enum {COROUTINE_REGISTERS = 4}; typedef struct { diff --git a/coroutine/win64/Context.h b/coroutine/win64/Context.h index 16a8f58..1c78dd5 100644 --- a/coroutine/win64/Context.h +++ b/coroutine/win64/Context.h @@ -16,7 +16,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/coroutine/win64/Context.h#L16 #define COROUTINE __declspec(noreturn) void -const size_t COROUTINE_REGISTERS = 8; +enum {COROUTINE_REGISTERS = 8}; const size_t COROUTINE_XMM_REGISTERS = 1+10*2; typedef struct diff --git a/coroutine/x86/Context.h b/coroutine/x86/Context.h index b077227..b471ecd 100644 --- a/coroutine/x86/Context.h +++ b/coroutine/x86/Context.h @@ -16,7 +16,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/coroutine/x86/Context.h#L16 #define COROUTINE __attribute__((noreturn, fastcall)) void -const size_t COROUTINE_REGISTERS = 4; +enum {COROUTINE_REGISTERS = 4}; typedef struct { -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/