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

Unified Diff: src/interpreter/bytecodes.h

Issue 1230753004: [Interpreter] Add BytecodeArray class and add to SharedFunctionInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Avoid outputting junk data in BytecodeArray::Print() and ByteArray::Print(). Created 5 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
Index: src/interpreter/bytecodes.h
diff --git a/src/interpreter/bytecodes.h b/src/interpreter/bytecodes.h
index de451b54bb0d77ffb3e86791896a1e20129654ab..998e628191446379a26669fe4214ecd5a34705ef 100644
--- a/src/interpreter/bytecodes.h
+++ b/src/interpreter/bytecodes.h
@@ -43,11 +43,16 @@ class Bytecodes {
// Returns true if the bytecode is a function return bytecode.
static const bool IsReturn(Bytecode bytecode);
+ // The maximum number of arguments across all bytecodes.
+ static const int kMaximumNumberOfArguments = 1;
+
+ // Maximum size of a bytecode and its arguments.
+ static const int kMaximumSize = 1 + kMaximumNumberOfArguments;
+
private:
Bytecodes() { UNREACHABLE(); }
};
-
std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode);
} // namespace interpreter

Powered by Google App Engine
This is Rietveld 408576698