From 17100fb205f2a063a99dda9988fb26fa50cb8cc3 Mon Sep 17 00:00:00 2001 From: "mstarzinger@chromium.org" Date: Mon, 8 Apr 2013 11:17:32 +0000 Subject: [PATCH] Move StackHandlerConstants to platform-independent frames.h * src/frames.h: Move StackHandlerConstants here, as it is the same for all architectures. BUG= Review URL: https://codereview.chromium.org/13638002 Patch from Andy Wingo . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/frames-arm.h | 12 ------------ src/frames.h | 12 ++++++++++++ src/ia32/frames-ia32.h | 12 ------------ src/mips/frames-mips.h | 12 ------------ src/x64/frames-x64.h | 12 ------------ 5 files changed, 12 insertions(+), 48 deletions(-) diff --git a/src/arm/frames-arm.h b/src/arm/frames-arm.h index 30f4057fa..19b29b855 100644 --- a/src/arm/frames-arm.h +++ b/src/arm/frames-arm.h @@ -100,18 +100,6 @@ const int kNumSafepointSavedRegisters = kNumJSCallerSaved + kNumCalleeSaved; // ---------------------------------------------------- -class StackHandlerConstants : public AllStatic { - public: - static const int kNextOffset = 0 * kPointerSize; - static const int kCodeOffset = 1 * kPointerSize; - static const int kStateOffset = 2 * kPointerSize; - static const int kContextOffset = 3 * kPointerSize; - static const int kFPOffset = 4 * kPointerSize; - - static const int kSize = kFPOffset + kPointerSize; -}; - - class EntryFrameConstants : public AllStatic { public: static const int kCallerFPOffset = -3 * kPointerSize; diff --git a/src/frames.h b/src/frames.h index ca0d5bec9..39382db60 100644 --- a/src/frames.h +++ b/src/frames.h @@ -84,6 +84,18 @@ class InnerPointerToCodeCache { }; +class StackHandlerConstants : public AllStatic { + public: + static const int kNextOffset = 0 * kPointerSize; + static const int kCodeOffset = 1 * kPointerSize; + static const int kStateOffset = 2 * kPointerSize; + static const int kContextOffset = 3 * kPointerSize; + static const int kFPOffset = 4 * kPointerSize; + + static const int kSize = kFPOffset + kPointerSize; +}; + + class StackHandler BASE_EMBEDDED { public: enum Kind { diff --git a/src/ia32/frames-ia32.h b/src/ia32/frames-ia32.h index c59b1664a..6223748d6 100644 --- a/src/ia32/frames-ia32.h +++ b/src/ia32/frames-ia32.h @@ -60,18 +60,6 @@ const int kAlignmentZapValue = 0x12345678; // Not heap object tagged. // ---------------------------------------------------- -class StackHandlerConstants : public AllStatic { - public: - static const int kNextOffset = 0 * kPointerSize; - static const int kCodeOffset = 1 * kPointerSize; - static const int kStateOffset = 2 * kPointerSize; - static const int kContextOffset = 3 * kPointerSize; - static const int kFPOffset = 4 * kPointerSize; - - static const int kSize = kFPOffset + kPointerSize; -}; - - class EntryFrameConstants : public AllStatic { public: static const int kCallerFPOffset = -6 * kPointerSize; diff --git a/src/mips/frames-mips.h b/src/mips/frames-mips.h index 1568ce66e..f6f20cd20 100644 --- a/src/mips/frames-mips.h +++ b/src/mips/frames-mips.h @@ -152,18 +152,6 @@ const int kSafepointRegisterStackIndexMap[kNumRegs] = { // ---------------------------------------------------- -class StackHandlerConstants : public AllStatic { - public: - static const int kNextOffset = 0 * kPointerSize; - static const int kCodeOffset = 1 * kPointerSize; - static const int kStateOffset = 2 * kPointerSize; - static const int kContextOffset = 3 * kPointerSize; - static const int kFPOffset = 4 * kPointerSize; - - static const int kSize = kFPOffset + kPointerSize; -}; - - class EntryFrameConstants : public AllStatic { public: static const int kCallerFPOffset = -3 * kPointerSize; diff --git a/src/x64/frames-x64.h b/src/x64/frames-x64.h index 53c345906..14cc5b8f2 100644 --- a/src/x64/frames-x64.h +++ b/src/x64/frames-x64.h @@ -48,18 +48,6 @@ const int kNumSafepointRegisters = 16; // ---------------------------------------------------- -class StackHandlerConstants : public AllStatic { - public: - static const int kNextOffset = 0 * kPointerSize; - static const int kCodeOffset = 1 * kPointerSize; - static const int kStateOffset = 2 * kPointerSize; - static const int kContextOffset = 3 * kPointerSize; - static const int kFPOffset = 4 * kPointerSize; - - static const int kSize = kFPOffset + kPointerSize; -}; - - class EntryFrameConstants : public AllStatic { public: #ifdef _WIN64 -- 2.34.1