Reviewers: titzer, rmcilroy (OOO until 10th Aug),
Message:
PTAL, thanks!
Description:
[Interpreter] Remove unnecessary const specifiers on scalar types.
BUG=v8:4280
Please review this at https://codereview.chromium.org/1269813006/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+10, -10 lines):
M src/interpreter/bytecodes.h
M src/interpreter/bytecodes.cc
Index: src/interpreter/bytecodes.cc
diff --git a/src/interpreter/bytecodes.cc b/src/interpreter/bytecodes.cc
index
0787b66c317d1fa818cce77fae09287ae3a59e62..16a71a3ed63221c352418ff7d4532836ed3d1b58
100644
--- a/src/interpreter/bytecodes.cc
+++ b/src/interpreter/bytecodes.cc
@@ -52,7 +52,7 @@ Bytecode Bytecodes::FromByte(uint8_t value) {
// static
-const int Bytecodes::NumberOfOperands(Bytecode bytecode) {
+int Bytecodes::NumberOfOperands(Bytecode bytecode) {
DCHECK(bytecode <= Bytecode::kLast);
int count;
uint8_t row = ToByte(bytecode);
@@ -66,24 +66,24 @@ const int Bytecodes::NumberOfOperands(Bytecode
bytecode) {
// static
-const OperandType Bytecodes::GetOperandType(Bytecode bytecode, int i) {
+OperandType Bytecodes::GetOperandType(Bytecode bytecode, int i) {
DCHECK(bytecode <= Bytecode::kLast && i < NumberOfOperands(bytecode));
return kBytecodeTable[ToByte(bytecode)][i];
}
// static
-const int Bytecodes::Size(Bytecode bytecode) {
+int Bytecodes::Size(Bytecode bytecode) {
return 1 + NumberOfOperands(bytecode);
}
// static
-const int Bytecodes::MaximumNumberOfOperands() { return kMaxOperands; }
+int Bytecodes::MaximumNumberOfOperands() { return kMaxOperands; }
// static
-const int Bytecodes::MaximumSize() { return 1 + kMaxOperands; }
+int Bytecodes::MaximumSize() { return 1 + kMaxOperands; }
std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode) {
Index: src/interpreter/bytecodes.h
diff --git a/src/interpreter/bytecodes.h b/src/interpreter/bytecodes.h
index
b4c0d9c4446b7eda2ac1a99a683d29e018c519b2..5263bc76cc77d336f53675e2288da0c9404479bd
100644
--- a/src/interpreter/bytecodes.h
+++ b/src/interpreter/bytecodes.h
@@ -66,19 +66,19 @@ class Bytecodes {
static Bytecode FromByte(uint8_t value);
// 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|.
- static const OperandType GetOperandType(Bytecode bytecode, int i);
+ static OperandType GetOperandType(Bytecode bytecode, int i);
// 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.
- static const int MaximumNumberOfOperands();
+ static int MaximumNumberOfOperands();
// Maximum size of a bytecode and its arguments.
- static const int MaximumSize();
+ static int MaximumSize();
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(Bytecodes);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.