| 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_CRANKSHAFT_HYDROGEN_H_ | 5 #ifndef V8_CRANKSHAFT_HYDROGEN_H_ |
| 6 #define V8_CRANKSHAFT_HYDROGEN_H_ | 6 #define V8_CRANKSHAFT_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/ast-type-bounds.h" | 10 #include "src/ast/ast-type-bounds.h" |
| 11 #include "src/ast/ast.h" | 11 #include "src/ast/ast.h" |
| 12 #include "src/ast/scopes.h" | 12 #include "src/ast/scopes.h" |
| 13 #include "src/bailout-reason.h" | 13 #include "src/bailout-reason.h" |
| 14 #include "src/compiler.h" | 14 #include "src/compiler.h" |
| 15 #include "src/crankshaft/compilation-phase.h" | 15 #include "src/crankshaft/compilation-phase.h" |
| 16 #include "src/crankshaft/hydrogen-instructions.h" | 16 #include "src/crankshaft/hydrogen-instructions.h" |
| 17 #include "src/globals.h" |
| 17 #include "src/parsing/parser.h" | 18 #include "src/parsing/parser.h" |
| 18 #include "src/zone.h" | 19 #include "src/zone.h" |
| 19 | 20 |
| 20 namespace v8 { | 21 namespace v8 { |
| 21 namespace internal { | 22 namespace internal { |
| 22 | 23 |
| 23 // Forward declarations. | 24 // Forward declarations. |
| 24 class BitVector; | 25 class BitVector; |
| 25 class FunctionState; | 26 class FunctionState; |
| 26 class HEnvironment; | 27 class HEnvironment; |
| (...skipping 1889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1916 HValue* BuildGetParentContext(HValue* depth, int depth_value); | 1917 HValue* BuildGetParentContext(HValue* depth, int depth_value); |
| 1917 | 1918 |
| 1918 HInstruction* BuildGetArrayFunction(); | 1919 HInstruction* BuildGetArrayFunction(); |
| 1919 HValue* BuildArrayBufferViewFieldAccessor(HValue* object, | 1920 HValue* BuildArrayBufferViewFieldAccessor(HValue* object, |
| 1920 HValue* checked_object, | 1921 HValue* checked_object, |
| 1921 FieldIndex index); | 1922 FieldIndex index); |
| 1922 | 1923 |
| 1923 | 1924 |
| 1924 protected: | 1925 protected: |
| 1925 void SetSourcePosition(int position) { | 1926 void SetSourcePosition(int position) { |
| 1926 if (position != RelocInfo::kNoPosition) { | 1927 if (position != kNoSourcePosition) { |
| 1927 position_.set_position(position - start_position_); | 1928 position_.set_position(position - start_position_); |
| 1928 } | 1929 } |
| 1929 // Otherwise position remains unknown. | 1930 // Otherwise position remains unknown. |
| 1930 } | 1931 } |
| 1931 | 1932 |
| 1932 void EnterInlinedSource(int start_position, int id) { | 1933 void EnterInlinedSource(int start_position, int id) { |
| 1933 if (top_info()->is_tracking_positions()) { | 1934 if (top_info()->is_tracking_positions()) { |
| 1934 start_position_ = start_position; | 1935 start_position_ = start_position; |
| 1935 position_.set_inlining_id(id); | 1936 position_.set_inlining_id(id); |
| 1936 } | 1937 } |
| 1937 } | 1938 } |
| 1938 | 1939 |
| 1939 // Convert the given absolute offset from the start of the script to | 1940 // Convert the given absolute offset from the start of the script to |
| 1940 // the SourcePosition assuming that this position corresponds to the | 1941 // the SourcePosition assuming that this position corresponds to the |
| 1941 // same function as current position_. | 1942 // same function as current position_. |
| 1942 SourcePosition ScriptPositionToSourcePosition(int position) { | 1943 SourcePosition ScriptPositionToSourcePosition(int position) { |
| 1943 if (position == RelocInfo::kNoPosition) { | 1944 if (position == kNoSourcePosition) { |
| 1944 return SourcePosition::Unknown(); | 1945 return SourcePosition::Unknown(); |
| 1945 } | 1946 } |
| 1946 SourcePosition pos = position_; | 1947 SourcePosition pos = position_; |
| 1947 pos.set_position(position - start_position_); | 1948 pos.set_position(position - start_position_); |
| 1948 return pos; | 1949 return pos; |
| 1949 } | 1950 } |
| 1950 | 1951 |
| 1951 SourcePosition source_position() { return position_; } | 1952 SourcePosition source_position() { return position_; } |
| 1952 void set_source_position(SourcePosition position) { position_ = position; } | 1953 void set_source_position(SourcePosition position) { position_ = position; } |
| 1953 | 1954 |
| (...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3099 } | 3100 } |
| 3100 | 3101 |
| 3101 private: | 3102 private: |
| 3102 HOptimizedGraphBuilder* builder_; | 3103 HOptimizedGraphBuilder* builder_; |
| 3103 }; | 3104 }; |
| 3104 | 3105 |
| 3105 } // namespace internal | 3106 } // namespace internal |
| 3106 } // namespace v8 | 3107 } // namespace v8 |
| 3107 | 3108 |
| 3108 #endif // V8_CRANKSHAFT_HYDROGEN_H_ | 3109 #endif // V8_CRANKSHAFT_HYDROGEN_H_ |
| OLD | NEW |