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 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2259 kUseCell, | 2259 kUseCell, |
2260 kUseGeneric | 2260 kUseGeneric |
2261 }; | 2261 }; |
2262 GlobalPropertyAccess LookupGlobalProperty(Variable* var, | 2262 GlobalPropertyAccess LookupGlobalProperty(Variable* var, |
2263 LookupResult* lookup, | 2263 LookupResult* lookup, |
2264 PropertyAccessType access_type); | 2264 PropertyAccessType access_type); |
2265 | 2265 |
2266 void EnsureArgumentsArePushedForAccess(); | 2266 void EnsureArgumentsArePushedForAccess(); |
2267 bool TryArgumentsAccess(Property* expr); | 2267 bool TryArgumentsAccess(Property* expr); |
2268 | 2268 |
| 2269 // For indirect calls like .call and .apply |
| 2270 bool TryIndirectCall(Call* expr); |
| 2271 // For fun.call(...) |
| 2272 bool TryCallCall(Call* expr); |
2269 // Try to optimize fun.apply(receiver, arguments) pattern. | 2273 // Try to optimize fun.apply(receiver, arguments) pattern. |
2270 bool TryCallApply(Call* expr); | 2274 bool TryCallApply(Call* expr); |
2271 | 2275 |
2272 bool TryHandleArrayCall(Call* expr, HValue* function); | 2276 bool TryHandleArrayCall(Call* expr, HValue* function); |
2273 bool TryHandleArrayCallNew(CallNew* expr, HValue* function); | 2277 bool TryHandleArrayCallNew(CallNew* expr, HValue* function); |
2274 void BuildArrayCall(Expression* expr, int arguments_count, HValue* function, | 2278 void BuildArrayCall(Expression* expr, int arguments_count, HValue* function, |
2275 Handle<AllocationSite> cell); | 2279 Handle<AllocationSite> cell); |
2276 | 2280 |
2277 enum ArrayIndexOfMode { kFirstIndexOf, kLastIndexOf }; | 2281 enum ArrayIndexOfMode { kFirstIndexOf, kLastIndexOf }; |
2278 HValue* BuildArrayIndexOf(HValue* receiver, | 2282 HValue* BuildArrayIndexOf(HValue* receiver, |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2525 Type* right_type, | 2529 Type* right_type, |
2526 Type* combined_type, | 2530 Type* combined_type, |
2527 HSourcePosition left_position, | 2531 HSourcePosition left_position, |
2528 HSourcePosition right_position, | 2532 HSourcePosition right_position, |
2529 PushBeforeSimulateBehavior push_sim_result, | 2533 PushBeforeSimulateBehavior push_sim_result, |
2530 BailoutId bailout_id); | 2534 BailoutId bailout_id); |
2531 | 2535 |
2532 HInstruction* BuildStringCharCodeAt(HValue* string, | 2536 HInstruction* BuildStringCharCodeAt(HValue* string, |
2533 HValue* index); | 2537 HValue* index); |
2534 | 2538 |
| 2539 bool IsLiveArguments(Expression* expr); |
| 2540 |
2535 HValue* BuildBinaryOperation( | 2541 HValue* BuildBinaryOperation( |
2536 BinaryOperation* expr, | 2542 BinaryOperation* expr, |
2537 HValue* left, | 2543 HValue* left, |
2538 HValue* right, | 2544 HValue* right, |
2539 PushBeforeSimulateBehavior push_sim_result); | 2545 PushBeforeSimulateBehavior push_sim_result); |
2540 HInstruction* BuildIncrement(bool returns_original_input, | 2546 HInstruction* BuildIncrement(bool returns_original_input, |
2541 CountOperation* expr); | 2547 CountOperation* expr); |
2542 HInstruction* BuildKeyedGeneric(PropertyAccessType access_type, | 2548 HInstruction* BuildKeyedGeneric(PropertyAccessType access_type, |
2543 HValue* object, | 2549 HValue* object, |
2544 HValue* key, | 2550 HValue* key, |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2839 } | 2845 } |
2840 | 2846 |
2841 private: | 2847 private: |
2842 HGraphBuilder* builder_; | 2848 HGraphBuilder* builder_; |
2843 }; | 2849 }; |
2844 | 2850 |
2845 | 2851 |
2846 } } // namespace v8::internal | 2852 } } // namespace v8::internal |
2847 | 2853 |
2848 #endif // V8_HYDROGEN_H_ | 2854 #endif // V8_HYDROGEN_H_ |
OLD | NEW |