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_CODEGEN_H_ | 5 #ifndef V8_CODEGEN_H_ |
6 #define V8_CODEGEN_H_ | 6 #define V8_CODEGEN_H_ |
7 | 7 |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/runtime/runtime.h" | 9 #include "src/runtime/runtime.h" |
10 | 10 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 139 |
140 private: | 140 private: |
141 DISALLOW_COPY_AND_ASSIGN(ElementsTransitionGenerator); | 141 DISALLOW_COPY_AND_ASSIGN(ElementsTransitionGenerator); |
142 }; | 142 }; |
143 | 143 |
144 static const int kNumberDictionaryProbes = 4; | 144 static const int kNumberDictionaryProbes = 4; |
145 | 145 |
146 | 146 |
147 class CodeAgingHelper { | 147 class CodeAgingHelper { |
148 public: | 148 public: |
149 CodeAgingHelper(); | 149 explicit CodeAgingHelper(Isolate* isolate); |
150 | 150 |
151 uint32_t young_sequence_length() const { return young_sequence_.length(); } | 151 uint32_t young_sequence_length() const { return young_sequence_.length(); } |
152 bool IsYoung(byte* candidate) const { | 152 bool IsYoung(byte* candidate) const { |
153 return memcmp(candidate, | 153 return memcmp(candidate, |
154 young_sequence_.start(), | 154 young_sequence_.start(), |
155 young_sequence_.length()) == 0; | 155 young_sequence_.length()) == 0; |
156 } | 156 } |
157 void CopyYoungSequenceTo(byte* new_buffer) const { | 157 void CopyYoungSequenceTo(byte* new_buffer) const { |
158 CopyBytes(new_buffer, young_sequence_.start(), young_sequence_.length()); | 158 CopyBytes(new_buffer, young_sequence_.start(), young_sequence_.length()); |
159 } | 159 } |
160 | 160 |
161 #ifdef DEBUG | 161 #ifdef DEBUG |
162 bool IsOld(byte* candidate) const; | 162 bool IsOld(byte* candidate) const; |
163 #endif | 163 #endif |
164 | 164 |
165 protected: | 165 protected: |
166 const EmbeddedVector<byte, kNoCodeAgeSequenceLength> young_sequence_; | 166 const EmbeddedVector<byte, kNoCodeAgeSequenceLength> young_sequence_; |
167 #ifdef DEBUG | 167 #ifdef DEBUG |
168 #ifdef V8_TARGET_ARCH_ARM64 | 168 #ifdef V8_TARGET_ARCH_ARM64 |
169 const EmbeddedVector<byte, kNoCodeAgeSequenceLength> old_sequence_; | 169 const EmbeddedVector<byte, kNoCodeAgeSequenceLength> old_sequence_; |
170 #endif | 170 #endif |
171 #endif | 171 #endif |
172 }; | 172 }; |
173 | 173 |
174 } // namespace internal | 174 } // namespace internal |
175 } // namespace v8 | 175 } // namespace v8 |
176 | 176 |
177 #endif // V8_CODEGEN_H_ | 177 #endif // V8_CODEGEN_H_ |
OLD | NEW |