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

Unified Diff: src/compiler/instruction.h

Issue 2390303002: [turbofan] Check instruction input/output count limits in instruction selector. (Closed)
Patch Set: Fix silly mistakes in the test. Created 4 years, 2 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 | « no previous file | src/compiler/instruction-selector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction.h
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h
index 15d6d4c17b508ebdc6af25e1e911967a4f474a9d..b5c591416618eb65f99b920511d0a934a3e8023a 100644
--- a/src/compiler/instruction.h
+++ b/src/compiler/instruction.h
@@ -947,6 +947,14 @@ class Instruction final {
void Print(const RegisterConfiguration* config) const;
void Print() const;
+ typedef BitField<size_t, 0, 8> OutputCountField;
+ typedef BitField<size_t, 8, 16> InputCountField;
+ typedef BitField<size_t, 24, 6> TempCountField;
+
+ static const size_t kMaxOutputCount = OutputCountField::kMax;
+ static const size_t kMaxInputCount = InputCountField::kMax;
+ static const size_t kMaxTempCount = TempCountField::kMax;
+
private:
explicit Instruction(InstructionCode opcode);
@@ -955,9 +963,6 @@ class Instruction final {
InstructionOperand* inputs, size_t temp_count,
InstructionOperand* temps);
- typedef BitField<size_t, 0, 8> OutputCountField;
- typedef BitField<size_t, 8, 16> InputCountField;
- typedef BitField<size_t, 24, 6> TempCountField;
typedef BitField<bool, 30, 1> IsCallField;
InstructionCode opcode_;
« no previous file with comments | « no previous file | src/compiler/instruction-selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698