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

Side by Side Diff: src/hydrogen-instructions.h

Issue 959203002: CpuProfiler: replace raw position with SourcePosition for DeoptReason (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix for win32 Created 5 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
« no previous file with comments | « src/deoptimizer.cc ('k') | src/ia32/assembler-ia32.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include <cstring> 8 #include <cstring>
9 #include <iosfwd> 9 #include <iosfwd>
10 10
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 // In the second case it points to an array which contains instruction's 975 // In the second case it points to an array which contains instruction's
976 // position and operands' positions. 976 // position and operands' positions.
977 class HPositionInfo { 977 class HPositionInfo {
978 public: 978 public:
979 explicit HPositionInfo(int pos) : data_(TagPosition(pos)) { } 979 explicit HPositionInfo(int pos) : data_(TagPosition(pos)) { }
980 980
981 SourcePosition position() const { 981 SourcePosition position() const {
982 if (has_operand_positions()) { 982 if (has_operand_positions()) {
983 return operand_positions()[kInstructionPosIndex]; 983 return operand_positions()[kInstructionPosIndex];
984 } 984 }
985 return SourcePosition(static_cast<int>(UntagPosition(data_))); 985 return SourcePosition::FromRaw(static_cast<int>(UntagPosition(data_)));
986 } 986 }
987 987
988 void set_position(SourcePosition pos) { 988 void set_position(SourcePosition pos) {
989 if (has_operand_positions()) { 989 if (has_operand_positions()) {
990 operand_positions()[kInstructionPosIndex] = pos; 990 operand_positions()[kInstructionPosIndex] = pos;
991 } else { 991 } else {
992 data_ = TagPosition(pos.raw()); 992 data_ = TagPosition(pos.raw());
993 } 993 }
994 } 994 }
995 995
(...skipping 6968 matching lines...) Expand 10 before | Expand all | Expand 10 after
7964 }; 7964 };
7965 7965
7966 7966
7967 7967
7968 #undef DECLARE_INSTRUCTION 7968 #undef DECLARE_INSTRUCTION
7969 #undef DECLARE_CONCRETE_INSTRUCTION 7969 #undef DECLARE_CONCRETE_INSTRUCTION
7970 7970
7971 } } // namespace v8::internal 7971 } } // namespace v8::internal
7972 7972
7973 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7973 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698