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

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

Issue 2894293003: Save/restore only live registers in the generator suspend/resume. (Closed)
Patch Set: Tweak Created 3 years, 6 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/interpreter/bytecode-register-optimizer.cc ('k') | src/interpreter/interpreter-assembler.h » ('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 <cstdint> 8 #include <cstdint>
9 #include <iosfwd> 9 #include <iosfwd>
10 #include <string> 10 #include <string>
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 \ 308 \
309 /* Update the pending message */ \ 309 /* Update the pending message */ \
310 V(SetPendingMessage, AccumulatorUse::kReadWrite) \ 310 V(SetPendingMessage, AccumulatorUse::kReadWrite) \
311 \ 311 \
312 /* Non-local flow control */ \ 312 /* Non-local flow control */ \
313 V(Throw, AccumulatorUse::kRead) \ 313 V(Throw, AccumulatorUse::kRead) \
314 V(ReThrow, AccumulatorUse::kRead) \ 314 V(ReThrow, AccumulatorUse::kRead) \
315 V(Return, AccumulatorUse::kRead) \ 315 V(Return, AccumulatorUse::kRead) \
316 \ 316 \
317 /* Generators */ \ 317 /* Generators */ \
318 V(RestoreGeneratorState, AccumulatorUse::kWrite, OperandType::kReg) \
318 V(SuspendGenerator, AccumulatorUse::kRead, OperandType::kReg, \ 319 V(SuspendGenerator, AccumulatorUse::kRead, OperandType::kReg, \
319 OperandType::kFlag8) \ 320 OperandType::kRegList, OperandType::kRegCount, OperandType::kFlag8) \
320 V(ResumeGenerator, AccumulatorUse::kWrite, OperandType::kReg) \ 321 V(RestoreGeneratorRegisters, AccumulatorUse::kNone, OperandType::kReg, \
322 OperandType::kRegOutList, OperandType::kRegCount) \
321 \ 323 \
322 /* Debugger */ \ 324 /* Debugger */ \
323 V(Debugger, AccumulatorUse::kNone) \ 325 V(Debugger, AccumulatorUse::kNone) \
324 \ 326 \
325 /* Debug Breakpoints - one for each possible size of unscaled bytecodes */ \ 327 /* Debug Breakpoints - one for each possible size of unscaled bytecodes */ \
326 /* and one for each operand widening prefix bytecode */ \ 328 /* and one for each operand widening prefix bytecode */ \
327 V(DebugBreak0, AccumulatorUse::kRead) \ 329 V(DebugBreak0, AccumulatorUse::kRead) \
328 V(DebugBreak1, AccumulatorUse::kRead, OperandType::kReg) \ 330 V(DebugBreak1, AccumulatorUse::kRead, OperandType::kReg) \
329 V(DebugBreak2, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg) \ 331 V(DebugBreak2, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg) \
330 V(DebugBreak3, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg, \ 332 V(DebugBreak3, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg, \
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 switch (operand_type) { 816 switch (operand_type) {
815 case OperandType::kReg: 817 case OperandType::kReg:
816 case OperandType::kRegOut: 818 case OperandType::kRegOut:
817 return 1; 819 return 1;
818 case OperandType::kRegPair: 820 case OperandType::kRegPair:
819 case OperandType::kRegOutPair: 821 case OperandType::kRegOutPair:
820 return 2; 822 return 2;
821 case OperandType::kRegOutTriple: 823 case OperandType::kRegOutTriple:
822 return 3; 824 return 3;
823 case OperandType::kRegList: 825 case OperandType::kRegList:
826 case OperandType::kRegOutList:
824 UNREACHABLE(); 827 UNREACHABLE();
825 default: 828 default:
826 return 0; 829 return 0;
827 } 830 }
828 UNREACHABLE(); 831 UNREACHABLE();
829 } 832 }
830 833
831 // Returns the size of |operand| for |operand_scale|. 834 // Returns the size of |operand| for |operand_scale|.
832 static OperandSize SizeOfOperand(OperandType operand, OperandScale scale); 835 static OperandSize SizeOfOperand(OperandType operand, OperandScale scale);
833 836
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 }; 891 };
889 892
890 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, 893 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
891 const Bytecode& bytecode); 894 const Bytecode& bytecode);
892 895
893 } // namespace interpreter 896 } // namespace interpreter
894 } // namespace internal 897 } // namespace internal
895 } // namespace v8 898 } // namespace v8
896 899
897 #endif // V8_INTERPRETER_BYTECODES_H_ 900 #endif // V8_INTERPRETER_BYTECODES_H_
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-register-optimizer.cc ('k') | src/interpreter/interpreter-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698