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

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

Issue 914413007: CpuProfiler: move InlinedFunctionInfo class from HGraphBuilder to CompilationInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: out of bounds access to the script source was fixed Created 5 years, 10 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/hydrogen.cc ('k') | no next file » | 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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 // inlined function. 419 // inlined function.
420 // When the flag is not set we simply track absolute offset from the 420 // When the flag is not set we simply track absolute offset from the
421 // script start. 421 // script start.
422 class HSourcePosition { 422 class HSourcePosition {
423 public: 423 public:
424 HSourcePosition(const HSourcePosition& other) : value_(other.value_) { } 424 HSourcePosition(const HSourcePosition& other) : value_(other.value_) { }
425 425
426 static HSourcePosition Unknown() { 426 static HSourcePosition Unknown() {
427 return HSourcePosition(RelocInfo::kNoPosition); 427 return HSourcePosition(RelocInfo::kNoPosition);
428 } 428 }
429 static HSourcePosition FromRaw(int raw_value) {
430 return HSourcePosition(raw_value);
431 }
429 432
430 bool IsUnknown() const { return value_ == RelocInfo::kNoPosition; } 433 bool IsUnknown() const { return value_ == RelocInfo::kNoPosition; }
431 434
432 int position() const { return PositionField::decode(value_); } 435 int position() const { return PositionField::decode(value_); }
433 void set_position(int position) { 436 void set_position(int position) {
434 if (FLAG_hydrogen_track_positions) { 437 if (FLAG_hydrogen_track_positions) {
435 value_ = static_cast<int>(PositionField::update(value_, position)); 438 value_ = static_cast<int>(PositionField::update(value_, position));
436 } else { 439 } else {
437 value_ = position; 440 value_ = position;
438 } 441 }
(...skipping 7559 matching lines...) Expand 10 before | Expand all | Expand 10 after
7998 }; 8001 };
7999 8002
8000 8003
8001 8004
8002 #undef DECLARE_INSTRUCTION 8005 #undef DECLARE_INSTRUCTION
8003 #undef DECLARE_CONCRETE_INSTRUCTION 8006 #undef DECLARE_CONCRETE_INSTRUCTION
8004 8007
8005 } } // namespace v8::internal 8008 } } // namespace v8::internal
8006 8009
8007 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 8010 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698