| 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_HYDROGEN_H_ | 5 #ifndef V8_HYDROGEN_H_ |
| 6 #define V8_HYDROGEN_H_ | 6 #define V8_HYDROGEN_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
| (...skipping 2435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2446 static bool IsReadOnlyLengthDescriptor(Handle<Map> jsarray_map); | 2446 static bool IsReadOnlyLengthDescriptor(Handle<Map> jsarray_map); |
| 2447 static bool CanInlineArrayResizeOperation(Handle<Map> receiver_map); | 2447 static bool CanInlineArrayResizeOperation(Handle<Map> receiver_map); |
| 2448 | 2448 |
| 2449 // If --trace-inlining, print a line of the inlining trace. Inlining | 2449 // If --trace-inlining, print a line of the inlining trace. Inlining |
| 2450 // succeeded if the reason string is NULL and failed if there is a | 2450 // succeeded if the reason string is NULL and failed if there is a |
| 2451 // non-NULL reason string. | 2451 // non-NULL reason string. |
| 2452 void TraceInline(Handle<JSFunction> target, | 2452 void TraceInline(Handle<JSFunction> target, |
| 2453 Handle<JSFunction> caller, | 2453 Handle<JSFunction> caller, |
| 2454 const char* failure_reason); | 2454 const char* failure_reason); |
| 2455 | 2455 |
| 2456 void HandleGlobalVariableAssignment(Variable* var, | 2456 void HandleGlobalVariableAssignment(Variable* var, HValue* value, |
| 2457 HValue* value, | 2457 FeedbackVectorICSlot ic_slot, |
| 2458 BailoutId ast_id); | 2458 BailoutId ast_id); |
| 2459 | 2459 |
| 2460 void HandlePropertyAssignment(Assignment* expr); | 2460 void HandlePropertyAssignment(Assignment* expr); |
| 2461 void HandleCompoundAssignment(Assignment* expr); | 2461 void HandleCompoundAssignment(Assignment* expr); |
| 2462 void HandlePolymorphicNamedFieldAccess(PropertyAccessType access_type, | 2462 void HandlePolymorphicNamedFieldAccess( |
| 2463 Expression* expr, | 2463 PropertyAccessType access_type, Expression* expr, |
| 2464 BailoutId ast_id, | 2464 FeedbackVectorICSlot slot, BailoutId ast_id, BailoutId return_id, |
| 2465 BailoutId return_id, | 2465 HValue* object, HValue* value, SmallMapList* types, Handle<String> name); |
| 2466 HValue* object, | |
| 2467 HValue* value, | |
| 2468 SmallMapList* types, | |
| 2469 Handle<String> name); | |
| 2470 | 2466 |
| 2471 HValue* BuildAllocateExternalElements( | 2467 HValue* BuildAllocateExternalElements( |
| 2472 ExternalArrayType array_type, | 2468 ExternalArrayType array_type, |
| 2473 bool is_zero_byte_offset, | 2469 bool is_zero_byte_offset, |
| 2474 HValue* buffer, HValue* byte_offset, HValue* length); | 2470 HValue* buffer, HValue* byte_offset, HValue* length); |
| 2475 HValue* BuildAllocateFixedTypedArray(ExternalArrayType array_type, | 2471 HValue* BuildAllocateFixedTypedArray(ExternalArrayType array_type, |
| 2476 size_t element_size, | 2472 size_t element_size, |
| 2477 ElementsKind fixed_elements_kind, | 2473 ElementsKind fixed_elements_kind, |
| 2478 HValue* byte_length, HValue* length, | 2474 HValue* byte_length, HValue* length, |
| 2479 bool initialize); | 2475 bool initialize); |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2708 PropertyDetails details_; | 2704 PropertyDetails details_; |
| 2709 }; | 2705 }; |
| 2710 | 2706 |
| 2711 HValue* BuildMonomorphicAccess(PropertyAccessInfo* info, HValue* object, | 2707 HValue* BuildMonomorphicAccess(PropertyAccessInfo* info, HValue* object, |
| 2712 HValue* checked_object, HValue* value, | 2708 HValue* checked_object, HValue* value, |
| 2713 BailoutId ast_id, BailoutId return_id, | 2709 BailoutId ast_id, BailoutId return_id, |
| 2714 bool can_inline_accessor = true); | 2710 bool can_inline_accessor = true); |
| 2715 | 2711 |
| 2716 HValue* BuildNamedAccess(PropertyAccessType access, BailoutId ast_id, | 2712 HValue* BuildNamedAccess(PropertyAccessType access, BailoutId ast_id, |
| 2717 BailoutId reutrn_id, Expression* expr, | 2713 BailoutId reutrn_id, Expression* expr, |
| 2718 HValue* object, Handle<String> name, HValue* value, | 2714 FeedbackVectorICSlot slot, HValue* object, |
| 2715 Handle<String> name, HValue* value, |
| 2719 bool is_uninitialized = false); | 2716 bool is_uninitialized = false); |
| 2720 | 2717 |
| 2721 void HandlePolymorphicCallNamed(Call* expr, | 2718 void HandlePolymorphicCallNamed(Call* expr, |
| 2722 HValue* receiver, | 2719 HValue* receiver, |
| 2723 SmallMapList* types, | 2720 SmallMapList* types, |
| 2724 Handle<String> name); | 2721 Handle<String> name); |
| 2725 void HandleLiteralCompareTypeof(CompareOperation* expr, | 2722 void HandleLiteralCompareTypeof(CompareOperation* expr, |
| 2726 Expression* sub_expr, | 2723 Expression* sub_expr, |
| 2727 Handle<String> check); | 2724 Handle<String> check); |
| 2728 void HandleLiteralCompareNil(CompareOperation* expr, | 2725 void HandleLiteralCompareNil(CompareOperation* expr, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2744 HValue* index); | 2741 HValue* index); |
| 2745 | 2742 |
| 2746 HValue* BuildBinaryOperation( | 2743 HValue* BuildBinaryOperation( |
| 2747 BinaryOperation* expr, | 2744 BinaryOperation* expr, |
| 2748 HValue* left, | 2745 HValue* left, |
| 2749 HValue* right, | 2746 HValue* right, |
| 2750 PushBeforeSimulateBehavior push_sim_result); | 2747 PushBeforeSimulateBehavior push_sim_result); |
| 2751 HInstruction* BuildIncrement(bool returns_original_input, | 2748 HInstruction* BuildIncrement(bool returns_original_input, |
| 2752 CountOperation* expr); | 2749 CountOperation* expr); |
| 2753 HInstruction* BuildKeyedGeneric(PropertyAccessType access_type, | 2750 HInstruction* BuildKeyedGeneric(PropertyAccessType access_type, |
| 2754 Expression* expr, | 2751 Expression* expr, FeedbackVectorICSlot slot, |
| 2755 HValue* object, | 2752 HValue* object, HValue* key, HValue* value); |
| 2756 HValue* key, | |
| 2757 HValue* value); | |
| 2758 | 2753 |
| 2759 HInstruction* TryBuildConsolidatedElementLoad(HValue* object, | 2754 HInstruction* TryBuildConsolidatedElementLoad(HValue* object, |
| 2760 HValue* key, | 2755 HValue* key, |
| 2761 HValue* val, | 2756 HValue* val, |
| 2762 SmallMapList* maps); | 2757 SmallMapList* maps); |
| 2763 | 2758 |
| 2764 LoadKeyedHoleMode BuildKeyedHoleMode(Handle<Map> map); | 2759 LoadKeyedHoleMode BuildKeyedHoleMode(Handle<Map> map); |
| 2765 | 2760 |
| 2766 HInstruction* BuildMonomorphicElementAccess(HValue* object, | 2761 HInstruction* BuildMonomorphicElementAccess(HValue* object, |
| 2767 HValue* key, | 2762 HValue* key, |
| 2768 HValue* val, | 2763 HValue* val, |
| 2769 HValue* dependency, | 2764 HValue* dependency, |
| 2770 Handle<Map> map, | 2765 Handle<Map> map, |
| 2771 PropertyAccessType access_type, | 2766 PropertyAccessType access_type, |
| 2772 KeyedAccessStoreMode store_mode); | 2767 KeyedAccessStoreMode store_mode); |
| 2773 | 2768 |
| 2774 HValue* HandlePolymorphicElementAccess(Expression* expr, | 2769 HValue* HandlePolymorphicElementAccess( |
| 2775 HValue* object, | 2770 Expression* expr, FeedbackVectorICSlot slot, HValue* object, HValue* key, |
| 2776 HValue* key, | 2771 HValue* val, SmallMapList* maps, PropertyAccessType access_type, |
| 2777 HValue* val, | 2772 KeyedAccessStoreMode store_mode, bool* has_side_effects); |
| 2778 SmallMapList* maps, | |
| 2779 PropertyAccessType access_type, | |
| 2780 KeyedAccessStoreMode store_mode, | |
| 2781 bool* has_side_effects); | |
| 2782 | 2773 |
| 2783 HValue* HandleKeyedElementAccess(HValue* obj, HValue* key, HValue* val, | 2774 HValue* HandleKeyedElementAccess(HValue* obj, HValue* key, HValue* val, |
| 2784 Expression* expr, BailoutId ast_id, | 2775 Expression* expr, FeedbackVectorICSlot slot, |
| 2785 BailoutId return_id, | 2776 BailoutId ast_id, BailoutId return_id, |
| 2786 PropertyAccessType access_type, | 2777 PropertyAccessType access_type, |
| 2787 bool* has_side_effects); | 2778 bool* has_side_effects); |
| 2788 | 2779 |
| 2789 HInstruction* BuildNamedGeneric(PropertyAccessType access, Expression* expr, | 2780 HInstruction* BuildNamedGeneric(PropertyAccessType access, Expression* expr, |
| 2790 HValue* object, Handle<String> name, | 2781 FeedbackVectorICSlot slot, HValue* object, |
| 2791 HValue* value, bool is_uninitialized = false); | 2782 Handle<Name> name, HValue* value, |
| 2783 bool is_uninitialized = false); |
| 2792 | 2784 |
| 2793 HCheckMaps* AddCheckMap(HValue* object, Handle<Map> map); | 2785 HCheckMaps* AddCheckMap(HValue* object, Handle<Map> map); |
| 2794 | 2786 |
| 2795 void BuildLoad(Property* property, | 2787 void BuildLoad(Property* property, |
| 2796 BailoutId ast_id); | 2788 BailoutId ast_id); |
| 2797 void PushLoad(Property* property, | 2789 void PushLoad(Property* property, |
| 2798 HValue* object, | 2790 HValue* object, |
| 2799 HValue* key); | 2791 HValue* key); |
| 2800 | 2792 |
| 2801 void BuildStoreForEffect(Expression* expression, | 2793 void BuildStoreForEffect(Expression* expression, Property* prop, |
| 2802 Property* prop, | 2794 FeedbackVectorICSlot slot, BailoutId ast_id, |
| 2803 BailoutId ast_id, | 2795 BailoutId return_id, HValue* object, HValue* key, |
| 2804 BailoutId return_id, | |
| 2805 HValue* object, | |
| 2806 HValue* key, | |
| 2807 HValue* value); | 2796 HValue* value); |
| 2808 | 2797 |
| 2809 void BuildStore(Expression* expression, | 2798 void BuildStore(Expression* expression, Property* prop, |
| 2810 Property* prop, | 2799 FeedbackVectorICSlot slot, BailoutId ast_id, |
| 2811 BailoutId ast_id, | 2800 BailoutId return_id, bool is_uninitialized = false); |
| 2812 BailoutId return_id, | |
| 2813 bool is_uninitialized = false); | |
| 2814 | 2801 |
| 2815 HInstruction* BuildLoadNamedField(PropertyAccessInfo* info, | 2802 HInstruction* BuildLoadNamedField(PropertyAccessInfo* info, |
| 2816 HValue* checked_object); | 2803 HValue* checked_object); |
| 2817 HInstruction* BuildStoreNamedField(PropertyAccessInfo* info, | 2804 HInstruction* BuildStoreNamedField(PropertyAccessInfo* info, |
| 2818 HValue* checked_object, | 2805 HValue* checked_object, |
| 2819 HValue* value); | 2806 HValue* value); |
| 2820 | 2807 |
| 2821 HValue* BuildContextChainWalk(Variable* var); | 2808 HValue* BuildContextChainWalk(Variable* var); |
| 2822 | 2809 |
| 2823 HInstruction* BuildThisFunction(); | 2810 HInstruction* BuildThisFunction(); |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3055 } | 3042 } |
| 3056 | 3043 |
| 3057 private: | 3044 private: |
| 3058 HGraphBuilder* builder_; | 3045 HGraphBuilder* builder_; |
| 3059 }; | 3046 }; |
| 3060 | 3047 |
| 3061 | 3048 |
| 3062 } } // namespace v8::internal | 3049 } } // namespace v8::internal |
| 3063 | 3050 |
| 3064 #endif // V8_HYDROGEN_H_ | 3051 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |