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

Side by Side Diff: src/interpreter/bytecode-pipeline.h

Issue 1985753002: [interpreter] Introduce fused bytecodes for common sequences. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: nit. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_INTERPRETER_BYTECODE_PIPELINE_H_ 5 #ifndef V8_INTERPRETER_BYTECODE_PIPELINE_H_
6 #define V8_INTERPRETER_BYTECODE_PIPELINE_H_ 6 #define V8_INTERPRETER_BYTECODE_PIPELINE_H_
7 7
8 #include "src/interpreter/bytecode-register-allocator.h" 8 #include "src/interpreter/bytecode-register-allocator.h"
9 #include "src/interpreter/bytecodes.h" 9 #include "src/interpreter/bytecodes.h"
10 #include "src/zone-containers.h" 10 #include "src/zone-containers.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 // Clone |other|. 94 // Clone |other|.
95 void Clone(const BytecodeNode* const other); 95 void Clone(const BytecodeNode* const other);
96 96
97 // Print to stream |os|. 97 // Print to stream |os|.
98 void Print(std::ostream& os) const; 98 void Print(std::ostream& os) const;
99 99
100 // Return the size when this node is serialized to a bytecode array. 100 // Return the size when this node is serialized to a bytecode array.
101 size_t Size() const; 101 size_t Size() const;
102 102
103 // Transform to a node representing |new_bytecode| which has one
104 // operand more than the current bytecode.
105 void Transform(Bytecode new_bytecode, uint32_t extra_operand,
106 OperandScale extra_operand_scale);
107
103 Bytecode bytecode() const { return bytecode_; } 108 Bytecode bytecode() const { return bytecode_; }
104 109
105 uint32_t operand(int i) const { 110 uint32_t operand(int i) const {
106 DCHECK_LT(i, operand_count()); 111 DCHECK_LT(i, operand_count());
107 return operands_[i]; 112 return operands_[i];
108 } 113 }
109 uint32_t* operands() { return operands_; } 114 uint32_t* operands() { return operands_; }
110 const uint32_t* operands() const { return operands_; } 115 const uint32_t* operands() const { return operands_; }
111 116
112 int operand_count() const { return Bytecodes::NumberOfOperands(bytecode_); } 117 int operand_count() const { return Bytecodes::NumberOfOperands(bytecode_); }
(...skipping 16 matching lines...) Expand all
129 }; 134 };
130 135
131 std::ostream& operator<<(std::ostream& os, const BytecodeSourceInfo& info); 136 std::ostream& operator<<(std::ostream& os, const BytecodeSourceInfo& info);
132 std::ostream& operator<<(std::ostream& os, const BytecodeNode& node); 137 std::ostream& operator<<(std::ostream& os, const BytecodeNode& node);
133 138
134 } // namespace interpreter 139 } // namespace interpreter
135 } // namespace internal 140 } // namespace internal
136 } // namespace v8 141 } // namespace v8
137 142
138 #endif // V8_INTERPRETER_BYTECODE_PIPELINE_H_ 143 #endif // V8_INTERPRETER_BYTECODE_PIPELINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698