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/accessors.h" | 8 #include "src/accessors.h" |
9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
10 #include "src/ast.h" | 10 #include "src/ast.h" |
(...skipping 1871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1882 if (top_info()->is_tracking_positions()) { | 1882 if (top_info()->is_tracking_positions()) { |
1883 start_position_ = start_position; | 1883 start_position_ = start_position; |
1884 position_.set_inlining_id(id); | 1884 position_.set_inlining_id(id); |
1885 } | 1885 } |
1886 } | 1886 } |
1887 | 1887 |
1888 // Convert the given absolute offset from the start of the script to | 1888 // Convert the given absolute offset from the start of the script to |
1889 // the SourcePosition assuming that this position corresponds to the | 1889 // the SourcePosition assuming that this position corresponds to the |
1890 // same function as current position_. | 1890 // same function as current position_. |
1891 SourcePosition ScriptPositionToSourcePosition(int position) { | 1891 SourcePosition ScriptPositionToSourcePosition(int position) { |
| 1892 if (position == RelocInfo::kNoPosition) { |
| 1893 return SourcePosition::Unknown(); |
| 1894 } |
1892 SourcePosition pos = position_; | 1895 SourcePosition pos = position_; |
1893 pos.set_position(position - start_position_); | 1896 pos.set_position(position - start_position_); |
1894 return pos; | 1897 return pos; |
1895 } | 1898 } |
1896 | 1899 |
1897 SourcePosition source_position() { return position_; } | 1900 SourcePosition source_position() { return position_; } |
1898 void set_source_position(SourcePosition position) { position_ = position; } | 1901 void set_source_position(SourcePosition position) { position_ = position; } |
1899 | 1902 |
1900 HValue* BuildAllocateEmptyArrayBuffer(HValue* byte_length); | 1903 HValue* BuildAllocateEmptyArrayBuffer(HValue* byte_length); |
1901 template <typename ViewClass> | 1904 template <typename ViewClass> |
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3040 } | 3043 } |
3041 | 3044 |
3042 private: | 3045 private: |
3043 HGraphBuilder* builder_; | 3046 HGraphBuilder* builder_; |
3044 }; | 3047 }; |
3045 | 3048 |
3046 | 3049 |
3047 } } // namespace v8::internal | 3050 } } // namespace v8::internal |
3048 | 3051 |
3049 #endif // V8_HYDROGEN_H_ | 3052 #endif // V8_HYDROGEN_H_ |
OLD | NEW |