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

Side by Side Diff: src/compiler/instruction.h

Issue 1775323002: [turbofan] Frame elision for code stubs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_COMPILER_INSTRUCTION_H_ 5 #ifndef V8_COMPILER_INSTRUCTION_H_
6 #define V8_COMPILER_INSTRUCTION_H_ 6 #define V8_COMPILER_INSTRUCTION_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <iosfwd> 9 #include <iosfwd>
10 #include <map> 10 #include <map>
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 opcode_ = ArchOpcodeField::encode(kArchNop); 805 opcode_ = ArchOpcodeField::encode(kArchNop);
806 bit_field_ = 0; 806 bit_field_ = 0;
807 reference_map_ = nullptr; 807 reference_map_ = nullptr;
808 } 808 }
809 809
810 bool IsNop() const { 810 bool IsNop() const {
811 return arch_opcode() == kArchNop && InputCount() == 0 && 811 return arch_opcode() == kArchNop && InputCount() == 0 &&
812 OutputCount() == 0 && TempCount() == 0; 812 OutputCount() == 0 && TempCount() == 0;
813 } 813 }
814 814
815 bool IsDeoptimizeCall() const {
816 return arch_opcode() == ArchOpcode::kArchDeoptimize ||
817 FlagsModeField::decode(opcode()) == kFlags_deoptimize;
818 }
819
820 bool IsJump() const { return arch_opcode() == ArchOpcode::kArchJmp; }
821
822 bool IsBranch() const {
823 return FlagsModeField::decode(opcode()) == kFlags_branch;
824 }
825
826 bool IsRet() const { return arch_opcode() == ArchOpcode::kArchRet; }
827
815 enum GapPosition { 828 enum GapPosition {
816 START, 829 START,
817 END, 830 END,
818 FIRST_GAP_POSITION = START, 831 FIRST_GAP_POSITION = START,
819 LAST_GAP_POSITION = END 832 LAST_GAP_POSITION = END
820 }; 833 };
821 834
822 ParallelMove* GetOrCreateParallelMove(GapPosition pos, Zone* zone) { 835 ParallelMove* GetOrCreateParallelMove(GapPosition pos, Zone* zone) {
823 if (parallel_moves_[pos] == nullptr) { 836 if (parallel_moves_[pos] == nullptr) {
824 parallel_moves_[pos] = new (zone) ParallelMove(zone); 837 parallel_moves_[pos] = new (zone) ParallelMove(zone);
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 1401
1389 1402
1390 std::ostream& operator<<(std::ostream& os, 1403 std::ostream& operator<<(std::ostream& os,
1391 const PrintableInstructionSequence& code); 1404 const PrintableInstructionSequence& code);
1392 1405
1393 } // namespace compiler 1406 } // namespace compiler
1394 } // namespace internal 1407 } // namespace internal
1395 } // namespace v8 1408 } // namespace v8
1396 1409
1397 #endif // V8_COMPILER_INSTRUCTION_H_ 1410 #endif // V8_COMPILER_INSTRUCTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698