OLD | NEW |
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_H_ | 5 #ifndef V8_HYDROGEN_H_ |
6 #define V8_HYDROGEN_H_ | 6 #define V8_HYDROGEN_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
(...skipping 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1867 HInstruction* BuildGetScriptContext(int context_index); | 1867 HInstruction* BuildGetScriptContext(int context_index); |
1868 HInstruction* BuildGetArrayFunction(); | 1868 HInstruction* BuildGetArrayFunction(); |
1869 | 1869 |
1870 protected: | 1870 protected: |
1871 void SetSourcePosition(int position) { | 1871 void SetSourcePosition(int position) { |
1872 DCHECK(position != RelocInfo::kNoPosition); | 1872 DCHECK(position != RelocInfo::kNoPosition); |
1873 position_.set_position(position - start_position_); | 1873 position_.set_position(position - start_position_); |
1874 } | 1874 } |
1875 | 1875 |
1876 void EnterInlinedSource(int start_position, int id) { | 1876 void EnterInlinedSource(int start_position, int id) { |
1877 if (FLAG_hydrogen_track_positions) { | 1877 if (top_info()->is_tracking_positions()) { |
1878 start_position_ = start_position; | 1878 start_position_ = start_position; |
1879 position_.set_inlining_id(id); | 1879 position_.set_inlining_id(id); |
1880 } | 1880 } |
1881 } | 1881 } |
1882 | 1882 |
1883 // Convert the given absolute offset from the start of the script to | 1883 // Convert the given absolute offset from the start of the script to |
1884 // the SourcePosition assuming that this position corresponds to the | 1884 // the SourcePosition assuming that this position corresponds to the |
1885 // same function as current position_. | 1885 // same function as current position_. |
1886 SourcePosition ScriptPositionToSourcePosition(int position) { | 1886 SourcePosition ScriptPositionToSourcePosition(int position) { |
1887 SourcePosition pos = position_; | 1887 SourcePosition pos = position_; |
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3026 } | 3026 } |
3027 | 3027 |
3028 private: | 3028 private: |
3029 HGraphBuilder* builder_; | 3029 HGraphBuilder* builder_; |
3030 }; | 3030 }; |
3031 | 3031 |
3032 | 3032 |
3033 } } // namespace v8::internal | 3033 } } // namespace v8::internal |
3034 | 3034 |
3035 #endif // V8_HYDROGEN_H_ | 3035 #endif // V8_HYDROGEN_H_ |
OLD | NEW |