Commit 93d03643 authored by Florian Sattler's avatar Florian Sattler Committed by Commit Bot

[parser] Decreased size of Bailout/Abort reason.

This reduces the enum size to only take up one byte, hence decreasing
class size.

Bug: v8:7926
Change-Id: Ie50cfcd48541e44394814f375fd72f2b65722fdf
Reviewed-on: https://chromium-review.googlesource.com/1186582
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55378}
parent 91de4f50
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#ifndef V8_BAILOUT_REASON_H_ #ifndef V8_BAILOUT_REASON_H_
#define V8_BAILOUT_REASON_H_ #define V8_BAILOUT_REASON_H_
#include <cstdint>
namespace v8 { namespace v8 {
namespace internal { namespace internal {
...@@ -114,11 +116,11 @@ namespace internal { ...@@ -114,11 +116,11 @@ namespace internal {
V(kOptimizationDisabledForTest, "Optimization disabled for test") V(kOptimizationDisabledForTest, "Optimization disabled for test")
#define ERROR_MESSAGES_CONSTANTS(C, T) C, #define ERROR_MESSAGES_CONSTANTS(C, T) C,
enum class BailoutReason { enum class BailoutReason : uint8_t {
BAILOUT_MESSAGES_LIST(ERROR_MESSAGES_CONSTANTS) kLastErrorMessage BAILOUT_MESSAGES_LIST(ERROR_MESSAGES_CONSTANTS) kLastErrorMessage
}; };
enum class AbortReason { enum class AbortReason : uint8_t {
ABORT_MESSAGES_LIST(ERROR_MESSAGES_CONSTANTS) kLastErrorMessage ABORT_MESSAGES_LIST(ERROR_MESSAGES_CONSTANTS) kLastErrorMessage
}; };
#undef ERROR_MESSAGES_CONSTANTS #undef ERROR_MESSAGES_CONSTANTS
......
...@@ -24,7 +24,7 @@ namespace v8 { ...@@ -24,7 +24,7 @@ namespace v8 {
namespace internal { namespace internal {
// Forward declarations. // Forward declarations.
enum class AbortReason; enum class AbortReason : uint8_t;
class Zone; class Zone;
namespace compiler { namespace compiler {
......
...@@ -39,7 +39,7 @@ constexpr Register kRuntimeCallArgvRegister = a2; ...@@ -39,7 +39,7 @@ constexpr Register kRuntimeCallArgvRegister = a2;
constexpr Register kWasmInstanceRegister = a0; constexpr Register kWasmInstanceRegister = a0;
// Forward declarations // Forward declarations
enum class AbortReason; enum class AbortReason : uint8_t;
// Reserved Register Usage Summary. // Reserved Register Usage Summary.
// //
......
...@@ -39,7 +39,7 @@ constexpr Register kRuntimeCallArgvRegister = a2; ...@@ -39,7 +39,7 @@ constexpr Register kRuntimeCallArgvRegister = a2;
constexpr Register kWasmInstanceRegister = a0; constexpr Register kWasmInstanceRegister = a0;
// Forward declarations. // Forward declarations.
enum class AbortReason; enum class AbortReason : uint8_t;
// Reserved Register Usage Summary. // Reserved Register Usage Summary.
// //
......
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