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

Unified Diff: src/interpreter/bytecode-pipeline.h

Issue 2111923002: [interpreter] Introduce binary op bytecodes for Smi operand. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 5 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
« no previous file with comments | « src/interpreter/bytecode-peephole-optimizer.cc ('k') | src/interpreter/bytecode-pipeline.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-pipeline.h
diff --git a/src/interpreter/bytecode-pipeline.h b/src/interpreter/bytecode-pipeline.h
index 92a4cd6380dc23cfd137ba3ce5f30ac60a40982f..ee458f6f25cd56ae5624ddfad824174b05f83008 100644
--- a/src/interpreter/bytecode-pipeline.h
+++ b/src/interpreter/bytecode-pipeline.h
@@ -151,8 +151,21 @@ class BytecodeNode final : ZoneObject {
BytecodeNode(const BytecodeNode& other);
BytecodeNode& operator=(const BytecodeNode& other);
- void set_bytecode(Bytecode bytecode);
- void set_bytecode(Bytecode bytecode, uint32_t operand0);
+ void set_bytecode(Bytecode bytecode) {
+ DCHECK_EQ(Bytecodes::NumberOfOperands(bytecode), 0);
+ bytecode_ = bytecode;
+ }
+ void set_bytecode(Bytecode bytecode, uint32_t operand0) {
+ DCHECK_EQ(Bytecodes::NumberOfOperands(bytecode), 1);
+ bytecode_ = bytecode;
+ operands_[0] = operand0;
+ }
+ void set_bytecode(Bytecode bytecode, uint32_t operand0, uint32_t operand1) {
+ DCHECK_EQ(Bytecodes::NumberOfOperands(bytecode), 2);
+ bytecode_ = bytecode;
+ operands_[0] = operand0;
+ operands_[1] = operand1;
+ }
// Clone |other|.
void Clone(const BytecodeNode* const other);
« no previous file with comments | « src/interpreter/bytecode-peephole-optimizer.cc ('k') | src/interpreter/bytecode-pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698