| 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_FULL_CODEGEN_H_ | 5 #ifndef V8_FULL_CODEGEN_H_ |
| 6 #define V8_FULL_CODEGEN_H_ | 6 #define V8_FULL_CODEGEN_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1010 static void AddStackCheck(Handle<Code> code, uint32_t pc_offset); | 1010 static void AddStackCheck(Handle<Code> code, uint32_t pc_offset); |
| 1011 | 1011 |
| 1012 // Revert the patch by AddStackCheck. | 1012 // Revert the patch by AddStackCheck. |
| 1013 static void RemoveStackCheck(Handle<Code> code, uint32_t pc_offset); | 1013 static void RemoveStackCheck(Handle<Code> code, uint32_t pc_offset); |
| 1014 | 1014 |
| 1015 // Return the current patch state of the back edge. | 1015 // Return the current patch state of the back edge. |
| 1016 static BackEdgeState GetBackEdgeState(Isolate* isolate, | 1016 static BackEdgeState GetBackEdgeState(Isolate* isolate, |
| 1017 Code* unoptimized_code, | 1017 Code* unoptimized_code, |
| 1018 Address pc_after); | 1018 Address pc_after); |
| 1019 | 1019 |
| 1020 #ifdef DEBUG | 1020 #if DCHECK_IS_ON |
| 1021 // Verify that all back edges of a certain loop depth are patched. | 1021 // Verify that all back edges of a certain loop depth are patched. |
| 1022 static bool Verify(Isolate* isolate, Code* unoptimized_code); | 1022 static bool Verify(Isolate* isolate, Code* unoptimized_code); |
| 1023 #endif // DEBUG | 1023 #endif // DCHECK_IS_ON |
| 1024 | 1024 |
| 1025 private: | 1025 private: |
| 1026 Address entry_at(uint32_t index) { | 1026 Address entry_at(uint32_t index) { |
| 1027 DCHECK(index < length_); | 1027 DCHECK(index < length_); |
| 1028 return start_ + index * kEntrySize; | 1028 return start_ + index * kEntrySize; |
| 1029 } | 1029 } |
| 1030 | 1030 |
| 1031 static const int kTableLengthSize = kIntSize; | 1031 static const int kTableLengthSize = kIntSize; |
| 1032 static const int kAstIdOffset = 0 * kIntSize; | 1032 static const int kAstIdOffset = 0 * kIntSize; |
| 1033 static const int kPcOffsetOffset = 1 * kIntSize; | 1033 static const int kPcOffsetOffset = 1 * kIntSize; |
| 1034 static const int kLoopDepthOffset = 2 * kIntSize; | 1034 static const int kLoopDepthOffset = 2 * kIntSize; |
| 1035 static const int kEntrySize = 3 * kIntSize; | 1035 static const int kEntrySize = 3 * kIntSize; |
| 1036 | 1036 |
| 1037 Address start_; | 1037 Address start_; |
| 1038 Address instruction_start_; | 1038 Address instruction_start_; |
| 1039 uint32_t length_; | 1039 uint32_t length_; |
| 1040 }; | 1040 }; |
| 1041 | 1041 |
| 1042 | 1042 |
| 1043 } } // namespace v8::internal | 1043 } } // namespace v8::internal |
| 1044 | 1044 |
| 1045 #endif // V8_FULL_CODEGEN_H_ | 1045 #endif // V8_FULL_CODEGEN_H_ |
| OLD | NEW |