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

Side by Side 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: Fix pedantic build (take2). Created 5 years, 4 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
« no previous file with comments | « src/heap/objects-visiting-inl.h ('k') | src/interpreter/bytecodes.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BYTECODES_H_ 5 #ifndef V8_INTERPRETER_BYTECODES_H_
6 #define V8_INTERPRETER_BYTECODES_H_ 6 #define V8_INTERPRETER_BYTECODES_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 // Clients of this interface shouldn't depend on lots of interpreter internals. 10 // Clients of this interface shouldn't depend on lots of interpreter internals.
(...skipping 24 matching lines...) Expand all
35 public: 35 public:
36 // Returns string representation of |bytecode|. 36 // Returns string representation of |bytecode|.
37 static const char* ToString(Bytecode bytecode); 37 static const char* ToString(Bytecode bytecode);
38 38
39 // Returns the number of arguments expected by |bytecode|. 39 // Returns the number of arguments expected by |bytecode|.
40 static const int NumberOfArguments(Bytecode bytecode); 40 static const int NumberOfArguments(Bytecode bytecode);
41 41
42 // Returns the size of the bytecode including its arguments. 42 // Returns the size of the bytecode including its arguments.
43 static const int Size(Bytecode bytecode); 43 static const int Size(Bytecode bytecode);
44 44
45 // The maximum number of arguments across all bytecodes.
46 static const int kMaximumNumberOfArguments = 1;
47
48 // Maximum size of a bytecode and its arguments.
49 static const int kMaximumSize = 1 + kMaximumNumberOfArguments;
50
45 private: 51 private:
46 DISALLOW_IMPLICIT_CONSTRUCTORS(Bytecodes); 52 DISALLOW_IMPLICIT_CONSTRUCTORS(Bytecodes);
47 }; 53 };
48 54
49
50 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); 55 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode);
51 56
52 } // namespace interpreter 57 } // namespace interpreter
53 } // namespace internal 58 } // namespace internal
54 } // namespace v8 59 } // namespace v8
55 60
56 #endif // V8_INTERPRETER_BYTECODES_H_ 61 #endif // V8_INTERPRETER_BYTECODES_H_
OLDNEW
« no previous file with comments | « src/heap/objects-visiting-inl.h ('k') | src/interpreter/bytecodes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698