Commit e6e3c6a8 authored by oth's avatar oth Committed by Commit bot

[Interpreter] Remove unnecessary const specifiers on scalar types.

BUG=v8:4280
LOG=N

Review URL: https://codereview.chromium.org/1269813006

Cr-Commit-Position: refs/heads/master@{#29961}
parent 11eb702e
...@@ -52,7 +52,7 @@ Bytecode Bytecodes::FromByte(uint8_t value) { ...@@ -52,7 +52,7 @@ Bytecode Bytecodes::FromByte(uint8_t value) {
// static // static
const int Bytecodes::NumberOfOperands(Bytecode bytecode) { int Bytecodes::NumberOfOperands(Bytecode bytecode) {
DCHECK(bytecode <= Bytecode::kLast); DCHECK(bytecode <= Bytecode::kLast);
int count; int count;
uint8_t row = ToByte(bytecode); uint8_t row = ToByte(bytecode);
...@@ -66,24 +66,24 @@ const int Bytecodes::NumberOfOperands(Bytecode bytecode) { ...@@ -66,24 +66,24 @@ const int Bytecodes::NumberOfOperands(Bytecode bytecode) {
// static // static
const OperandType Bytecodes::GetOperandType(Bytecode bytecode, int i) { OperandType Bytecodes::GetOperandType(Bytecode bytecode, int i) {
DCHECK(bytecode <= Bytecode::kLast && i < NumberOfOperands(bytecode)); DCHECK(bytecode <= Bytecode::kLast && i < NumberOfOperands(bytecode));
return kBytecodeTable[ToByte(bytecode)][i]; return kBytecodeTable[ToByte(bytecode)][i];
} }
// static // static
const int Bytecodes::Size(Bytecode bytecode) { int Bytecodes::Size(Bytecode bytecode) {
return 1 + NumberOfOperands(bytecode); return 1 + NumberOfOperands(bytecode);
} }
// static // static
const int Bytecodes::MaximumNumberOfOperands() { return kMaxOperands; } int Bytecodes::MaximumNumberOfOperands() { return kMaxOperands; }
// static // static
const int Bytecodes::MaximumSize() { return 1 + kMaxOperands; } int Bytecodes::MaximumSize() { return 1 + kMaxOperands; }
std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode) { std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode) {
......
...@@ -66,19 +66,19 @@ class Bytecodes { ...@@ -66,19 +66,19 @@ class Bytecodes {
static Bytecode FromByte(uint8_t value); static Bytecode FromByte(uint8_t value);
// Returns the number of operands expected by |bytecode|. // Returns the number of operands expected by |bytecode|.
static const int NumberOfOperands(Bytecode bytecode); static int NumberOfOperands(Bytecode bytecode);
// Return the i-th operand of |bytecode|. // Return the i-th operand of |bytecode|.
static const OperandType GetOperandType(Bytecode bytecode, int i); static OperandType GetOperandType(Bytecode bytecode, int i);
// Returns the size of the bytecode including its arguments. // Returns the size of the bytecode including its arguments.
static const int Size(Bytecode bytecode); static int Size(Bytecode bytecode);
// The maximum number of operands across all bytecodes. // The maximum number of operands across all bytecodes.
static const int MaximumNumberOfOperands(); static int MaximumNumberOfOperands();
// Maximum size of a bytecode and its arguments. // Maximum size of a bytecode and its arguments.
static const int MaximumSize(); static int MaximumSize();
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(Bytecodes); DISALLOW_IMPLICIT_CONSTRUCTORS(Bytecodes);
......
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