Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Unified Diff: src/interpreter/bytecodes.h

Issue 1985753002: [interpreter] Introduce fused bytecodes for common sequences. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/interpreter/bytecodes.h
diff --git a/src/interpreter/bytecodes.h b/src/interpreter/bytecodes.h
index 83c09dbd2eabebcb29cabc2cb5d90902162a4b1c..e6cda3941bec1afa3f502f46c989461f8364c529 100644
--- a/src/interpreter/bytecodes.h
+++ b/src/interpreter/bytecodes.h
@@ -119,19 +119,19 @@ namespace interpreter {
V(Mov, AccumulatorUse::kNone, OperandType::kReg, OperandType::kRegOut) \
\
/* LoadIC operations */ \
- V(LoadIC, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kIdx, \
- OperandType::kIdx) \
- V(KeyedLoadIC, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ V(LdaNamedProperty, AccumulatorUse::kWrite, OperandType::kReg, \
+ OperandType::kIdx, OperandType::kIdx) \
+ V(LdaKeyedProperty, AccumulatorUse::kReadWrite, OperandType::kReg, \
OperandType::kIdx) \
\
/* StoreIC operations */ \
- V(StoreICSloppy, AccumulatorUse::kRead, OperandType::kReg, \
+ V(StaNamedPropertySloppy, AccumulatorUse::kRead, OperandType::kReg, \
OperandType::kIdx, OperandType::kIdx) \
- V(StoreICStrict, AccumulatorUse::kRead, OperandType::kReg, \
+ V(StaNamedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \
OperandType::kIdx, OperandType::kIdx) \
- V(KeyedStoreICSloppy, AccumulatorUse::kRead, OperandType::kReg, \
+ V(StaKeyedPropertySloppy, AccumulatorUse::kRead, OperandType::kReg, \
OperandType::kReg, OperandType::kIdx) \
- V(KeyedStoreICStrict, AccumulatorUse::kRead, OperandType::kReg, \
+ V(StaKeyedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \
rmcilroy 2016/05/18 16:09:41 Could we do this renaming in a seperate CL as well
oth 2016/05/18 20:22:25 Done.
OperandType::kReg, OperandType::kIdx) \
\
/* Binary Operators */ \
@@ -254,7 +254,18 @@ namespace interpreter {
\
/* No operation (used to maintain source positions for peephole */ \
/* eliminated bytecodes). */ \
- V(Nop, AccumulatorUse::kNone)
+ V(Nop, AccumulatorUse::kNone) \
+ \
+ /* Fused bytecodes emitted by the peephole optimizer. */ \
+ V(LdrUndefined, AccumulatorUse::kNone, OperandType::kRegOut) \
+ V(LdrContextSlot, AccumulatorUse::kNone, OperandType::kReg, \
+ OperandType::kIdx, OperandType::kRegOut) \
+ V(LdrGlobal, AccumulatorUse::kNone, OperandType::kIdx, OperandType::kIdx, \
+ OperandType::kRegOut) \
+ V(LdrNamedProperty, AccumulatorUse::kNone, OperandType::kReg, \
+ OperandType::kIdx, OperandType::kIdx, OperandType::kRegOut) \
+ V(LdrKeyedProperty, AccumulatorUse::kRead, OperandType::kReg, \
+ OperandType::kIdx, OperandType::kRegOut)
rmcilroy 2016/05/17 15:49:33 I'd prefer these lived next to the Lda versions -
oth 2016/05/18 20:22:25 Done.
enum class AccumulatorUse : uint8_t {
kNone = 0,
@@ -441,7 +452,10 @@ class Bytecodes {
static const char* OperandSizeToString(OperandSize operand_size);
// Returns byte value of bytecode.
- static uint8_t ToByte(Bytecode bytecode);
+ static uint8_t ToByte(Bytecode bytecode) {
+ DCHECK_LE(bytecode, Bytecode::kLast);
+ return static_cast<uint8_t>(bytecode);
+ }
// Returns bytecode for |value|.
static Bytecode FromByte(uint8_t value);

Powered by Google App Engine
This is Rietveld 408576698