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

Side by Side Diff: src/interpreter/bytecodes.cc

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 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 #include "src/interpreter/bytecodes.h" 5 #include "src/interpreter/bytecodes.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace interpreter { 9 namespace interpreter {
10 10
(...skipping 29 matching lines...) Expand all
40 const int Bytecodes::Size(Bytecode bytecode) { 40 const int Bytecodes::Size(Bytecode bytecode) {
41 return NumberOfArguments(bytecode) + 1; 41 return NumberOfArguments(bytecode) + 1;
42 } 42 }
43 43
44 44
45 const bool Bytecodes::IsReturn(Bytecode bytecode) { 45 const bool Bytecodes::IsReturn(Bytecode bytecode) {
46 return bytecode == interpreter::Bytecode::kReturn; 46 return bytecode == interpreter::Bytecode::kReturn;
47 } 47 }
48 48
49 49
50 #define CHECK_SIZE(Name, arg_count) \
51 STATIC_ASSERT(arg_count <= Bytecodes::kMaximumNumberOfArguments);
52 BYTECODE_LIST(CHECK_SIZE)
53 #undef CHECK_SIZE
54
55
50 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode) { 56 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode) {
51 return os << Bytecodes::ToString(bytecode); 57 return os << Bytecodes::ToString(bytecode);
52 } 58 }
53 59
54 } // namespace interpreter 60 } // namespace interpreter
55 } // namespace internal 61 } // namespace internal
56 } // namespace v8 62 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698