| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 // TODO(all): Copied ARM value. Check this is sensible for A64. | 137 // TODO(all): Copied ARM value. Check this is sensible for A64. |
| 138 static const int kCodeSizeMultiplier = 142; | 138 static const int kCodeSizeMultiplier = 142; |
| 139 #elif V8_TARGET_ARCH_MIPS | 139 #elif V8_TARGET_ARCH_MIPS |
| 140 static const int kCodeSizeMultiplier = 142; | 140 static const int kCodeSizeMultiplier = 142; |
| 141 #else | 141 #else |
| 142 #error Unsupported target architecture. | 142 #error Unsupported target architecture. |
| 143 #endif | 143 #endif |
| 144 | 144 |
| 145 class BackEdgeTableIterator { | 145 class BackEdgeTableIterator { |
| 146 public: | 146 public: |
| 147 explicit BackEdgeTableIterator(Code* unoptimized) { | 147 explicit BackEdgeTableIterator(Code* unoptimized, |
| 148 DisallowHeapAllocation* required) { |
| 148 ASSERT(unoptimized->kind() == Code::FUNCTION); | 149 ASSERT(unoptimized->kind() == Code::FUNCTION); |
| 149 instruction_start_ = unoptimized->instruction_start(); | 150 instruction_start_ = unoptimized->instruction_start(); |
| 150 cursor_ = instruction_start_ + unoptimized->back_edge_table_offset(); | 151 cursor_ = instruction_start_ + unoptimized->back_edge_table_offset(); |
| 151 ASSERT(cursor_ < instruction_start_ + unoptimized->instruction_size()); | 152 ASSERT(cursor_ < instruction_start_ + unoptimized->instruction_size()); |
| 152 table_length_ = Memory::uint32_at(cursor_); | 153 table_length_ = Memory::uint32_at(cursor_); |
| 153 cursor_ += kTableLengthSize; | 154 cursor_ += kTableLengthSize; |
| 154 end_ = cursor_ + table_length_ * kEntrySize; | 155 end_ = cursor_ + table_length_ * kEntrySize; |
| 155 } | 156 } |
| 156 | 157 |
| 157 bool Done() { return cursor_ >= end_; } | 158 bool Done() { return cursor_ >= end_; } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 188 static const int kTableLengthSize = kIntSize; | 189 static const int kTableLengthSize = kIntSize; |
| 189 static const int kAstIdOffset = 0 * kIntSize; | 190 static const int kAstIdOffset = 0 * kIntSize; |
| 190 static const int kPcOffsetOffset = 1 * kIntSize; | 191 static const int kPcOffsetOffset = 1 * kIntSize; |
| 191 static const int kLoopDepthOffset = 2 * kIntSize; | 192 static const int kLoopDepthOffset = 2 * kIntSize; |
| 192 static const int kEntrySize = 3 * kIntSize; | 193 static const int kEntrySize = 3 * kIntSize; |
| 193 | 194 |
| 194 Address cursor_; | 195 Address cursor_; |
| 195 Address end_; | 196 Address end_; |
| 196 Address instruction_start_; | 197 Address instruction_start_; |
| 197 uint32_t table_length_; | 198 uint32_t table_length_; |
| 198 DisallowHeapAllocation no_gc_while_iterating_over_raw_addresses_; | |
| 199 | 199 |
| 200 DISALLOW_COPY_AND_ASSIGN(BackEdgeTableIterator); | 200 DISALLOW_COPY_AND_ASSIGN(BackEdgeTableIterator); |
| 201 }; | 201 }; |
| 202 | 202 |
| 203 | 203 |
| 204 private: | 204 private: |
| 205 class Breakable; | 205 class Breakable; |
| 206 class Iteration; | 206 class Iteration; |
| 207 | 207 |
| 208 class TestContext; | 208 class TestContext; |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 } | 939 } |
| 940 | 940 |
| 941 private: | 941 private: |
| 942 Zone* zone_; | 942 Zone* zone_; |
| 943 }; | 943 }; |
| 944 | 944 |
| 945 | 945 |
| 946 } } // namespace v8::internal | 946 } } // namespace v8::internal |
| 947 | 947 |
| 948 #endif // V8_FULL_CODEGEN_H_ | 948 #endif // V8_FULL_CODEGEN_H_ |
| OLD | NEW |