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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 Expression* sub_expr, | 435 Expression* sub_expr, |
436 NilValue nil); | 436 NilValue nil); |
437 | 437 |
438 // Bailout support. | 438 // Bailout support. |
439 void PrepareForBailout(Expression* node, State state); | 439 void PrepareForBailout(Expression* node, State state); |
440 void PrepareForBailoutForId(BailoutId id, State state); | 440 void PrepareForBailoutForId(BailoutId id, State state); |
441 | 441 |
442 // Feedback slot support. The feedback vector will be cleared during gc and | 442 // Feedback slot support. The feedback vector will be cleared during gc and |
443 // collected by the type-feedback oracle. | 443 // collected by the type-feedback oracle. |
444 Handle<FixedArray> FeedbackVector() { | 444 Handle<FixedArray> FeedbackVector() { |
445 return feedback_vector_; | 445 return info_->feedback_vector(); |
446 } | 446 } |
447 void StoreFeedbackVectorSlot(int slot, Handle<Object> object) { | 447 void EnsureSlotContainsAllocationSite(int slot); |
448 feedback_vector_->set(slot, *object); | |
449 } | |
450 void InitializeFeedbackVector(); | |
451 | 448 |
452 // Record a call's return site offset, used to rebuild the frame if the | 449 // Record a call's return site offset, used to rebuild the frame if the |
453 // called function was inlined at the site. | 450 // called function was inlined at the site. |
454 void RecordJSReturnSite(Call* call); | 451 void RecordJSReturnSite(Call* call); |
455 | 452 |
456 // Prepare for bailout before a test (or compare) and branch. If | 453 // Prepare for bailout before a test (or compare) and branch. If |
457 // should_normalize, then the following comparison will not handle the | 454 // should_normalize, then the following comparison will not handle the |
458 // canonical JS true value so we will insert a (dead) test against true at | 455 // canonical JS true value so we will insert a (dead) test against true at |
459 // the actual bailout target from the optimized code. If not | 456 // the actual bailout target from the optimized code. If not |
460 // should_normalize, the true and false labels are ignored. | 457 // should_normalize, the true and false labels are ignored. |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 int loop_depth_; | 839 int loop_depth_; |
843 ZoneList<Handle<Object> >* globals_; | 840 ZoneList<Handle<Object> >* globals_; |
844 Handle<FixedArray> modules_; | 841 Handle<FixedArray> modules_; |
845 int module_index_; | 842 int module_index_; |
846 const ExpressionContext* context_; | 843 const ExpressionContext* context_; |
847 ZoneList<BailoutEntry> bailout_entries_; | 844 ZoneList<BailoutEntry> bailout_entries_; |
848 GrowableBitVector prepared_bailout_ids_; | 845 GrowableBitVector prepared_bailout_ids_; |
849 ZoneList<BackEdgeEntry> back_edges_; | 846 ZoneList<BackEdgeEntry> back_edges_; |
850 int ic_total_count_; | 847 int ic_total_count_; |
851 Handle<FixedArray> handler_table_; | 848 Handle<FixedArray> handler_table_; |
852 Handle<FixedArray> feedback_vector_; | |
853 Handle<Cell> profiling_counter_; | 849 Handle<Cell> profiling_counter_; |
854 bool generate_debug_code_; | 850 bool generate_debug_code_; |
855 | 851 |
856 friend class NestedStatement; | 852 friend class NestedStatement; |
857 | 853 |
858 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); | 854 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
859 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); | 855 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); |
860 }; | 856 }; |
861 | 857 |
862 | 858 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 | 961 |
966 Address start_; | 962 Address start_; |
967 Address instruction_start_; | 963 Address instruction_start_; |
968 uint32_t length_; | 964 uint32_t length_; |
969 }; | 965 }; |
970 | 966 |
971 | 967 |
972 } } // namespace v8::internal | 968 } } // namespace v8::internal |
973 | 969 |
974 #endif // V8_FULL_CODEGEN_H_ | 970 #endif // V8_FULL_CODEGEN_H_ |
OLD | NEW |