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_FULL_CODEGEN_H_ | 5 #ifndef V8_FULL_CODEGEN_FULL_CODEGEN_H_ |
6 #define V8_FULL_CODEGEN_FULL_CODEGEN_H_ | 6 #define V8_FULL_CODEGEN_FULL_CODEGEN_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assert-scope.h" | 9 #include "src/assert-scope.h" |
10 #include "src/ast/ast.h" | 10 #include "src/ast/ast.h" |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 Expression* sub_expr, | 337 Expression* sub_expr, |
338 NilValue nil); | 338 NilValue nil); |
339 | 339 |
340 // Bailout support. | 340 // Bailout support. |
341 void PrepareForBailout(Expression* node, Deoptimizer::BailoutState state); | 341 void PrepareForBailout(Expression* node, Deoptimizer::BailoutState state); |
342 void PrepareForBailoutForId(BailoutId id, Deoptimizer::BailoutState state); | 342 void PrepareForBailoutForId(BailoutId id, Deoptimizer::BailoutState state); |
343 | 343 |
344 // Returns a smi for the index into the FixedArray that backs the feedback | 344 // Returns a smi for the index into the FixedArray that backs the feedback |
345 // vector | 345 // vector |
346 Smi* SmiFromSlot(FeedbackVectorSlot slot) const { | 346 Smi* SmiFromSlot(FeedbackVectorSlot slot) const { |
347 return Smi::FromInt(TypeFeedbackVector::GetIndexFromSpec( | 347 return Smi::FromInt(TypeFeedbackVector::GetIndex(slot)); |
348 literal()->feedback_vector_spec(), slot)); | |
349 } | 348 } |
350 | 349 |
351 // Record a call's return site offset, used to rebuild the frame if the | 350 // Record a call's return site offset, used to rebuild the frame if the |
352 // called function was inlined at the site. | 351 // called function was inlined at the site. |
353 void RecordJSReturnSite(Call* call); | 352 void RecordJSReturnSite(Call* call); |
354 | 353 |
355 // Prepare for bailout before a test (or compare) and branch. If | 354 // Prepare for bailout before a test (or compare) and branch. If |
356 // should_normalize, then the following comparison will not handle the | 355 // should_normalize, then the following comparison will not handle the |
357 // canonical JS true value so we will insert a (dead) test against true at | 356 // canonical JS true value so we will insert a (dead) test against true at |
358 // the actual bailout target from the optimized code. If not | 357 // the actual bailout target from the optimized code. If not |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 Address start_; | 889 Address start_; |
891 Address instruction_start_; | 890 Address instruction_start_; |
892 uint32_t length_; | 891 uint32_t length_; |
893 }; | 892 }; |
894 | 893 |
895 | 894 |
896 } // namespace internal | 895 } // namespace internal |
897 } // namespace v8 | 896 } // namespace v8 |
898 | 897 |
899 #endif // V8_FULL_CODEGEN_FULL_CODEGEN_H_ | 898 #endif // V8_FULL_CODEGEN_FULL_CODEGEN_H_ |
OLD | NEW |