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

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: Incorporate patch set 11 comments. 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 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_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 #include "src/utils.h" 10 #include "src/utils.h"
(...skipping 25 matching lines...) Expand all
36 36
37 // Returns the number of arguments expected by |bytecode|. 37 // Returns the number of arguments expected by |bytecode|.
38 static const int NumberOfArguments(Bytecode bytecode); 38 static const int NumberOfArguments(Bytecode bytecode);
39 39
40 // Returns the size of the bytecode including its arguments. 40 // Returns the size of the bytecode including its arguments.
41 static const int Size(Bytecode bytecode); 41 static const int Size(Bytecode bytecode);
42 42
43 // Returns true if the bytecode is a function return bytecode. 43 // Returns true if the bytecode is a function return bytecode.
44 static const bool IsReturn(Bytecode bytecode); 44 static const bool IsReturn(Bytecode bytecode);
45 45
46 // The maximum number of arguments across all bytecodes.
47 static const int kMaximumNumberOfArguments = 1;
48
49 // Maximum size of a bytecode and its arguments.
50 static const int kMaximumSize = 1 + kMaximumNumberOfArguments;
rmcilroy 2015/07/21 11:25:16 Is this just used for the disassembly? I don't thi
51
46 private: 52 private:
47 Bytecodes() { UNREACHABLE(); } 53 Bytecodes() { UNREACHABLE(); }
48 }; 54 };
49 55
50
51 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); 56 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode);
52 57
53 } // namespace interpreter 58 } // namespace interpreter
54 } // namespace internal 59 } // namespace internal
55 } // namespace v8 60 } // namespace v8
56 61
57 #endif // V8_INTERPRETER_BYTECODES_H_ 62 #endif // V8_INTERPRETER_BYTECODES_H_
OLDNEW
« no previous file with comments | « src/heap/objects-visiting-inl.h ('k') | src/interpreter/bytecodes.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698