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

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

Issue 2100793003: [interpreter] Streamline bytecode array writing. (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 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 int operand_count() const { return Bytecodes::NumberOfOperands(bytecode_); } 176 int operand_count() const { return Bytecodes::NumberOfOperands(bytecode_); }
177 177
178 const BytecodeSourceInfo& source_info() const { return source_info_; } 178 const BytecodeSourceInfo& source_info() const { return source_info_; }
179 BytecodeSourceInfo& source_info() { return source_info_; } 179 BytecodeSourceInfo& source_info() { return source_info_; }
180 180
181 bool operator==(const BytecodeNode& other) const; 181 bool operator==(const BytecodeNode& other) const;
182 bool operator!=(const BytecodeNode& other) const { return !(*this == other); } 182 bool operator!=(const BytecodeNode& other) const { return !(*this == other); }
183 183
184 private: 184 private:
185 static const int kInvalidPosition = kMinInt; 185 static const int kInvalidPosition = kMinInt;
186 static const size_t kMaxOperands = 4;
187 186
188 Bytecode bytecode_; 187 Bytecode bytecode_;
189 uint32_t operands_[kMaxOperands]; 188 uint32_t operands_[Bytecodes::kMaxOperands];
190 BytecodeSourceInfo source_info_; 189 BytecodeSourceInfo source_info_;
191 }; 190 };
192 191
193 std::ostream& operator<<(std::ostream& os, const BytecodeSourceInfo& info); 192 std::ostream& operator<<(std::ostream& os, const BytecodeSourceInfo& info);
194 std::ostream& operator<<(std::ostream& os, const BytecodeNode& node); 193 std::ostream& operator<<(std::ostream& os, const BytecodeNode& node);
195 194
196 } // namespace interpreter 195 } // namespace interpreter
197 } // namespace internal 196 } // namespace internal
198 } // namespace v8 197 } // namespace v8
199 198
200 #endif // V8_INTERPRETER_BYTECODE_PIPELINE_H_ 199 #endif // V8_INTERPRETER_BYTECODE_PIPELINE_H_
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-writer.cc ('k') | src/interpreter/bytecode-register-optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698