| 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_CRANKSHAFT_HYDROGEN_H_ | 5 #ifndef V8_CRANKSHAFT_HYDROGEN_H_ |
| 6 #define V8_CRANKSHAFT_HYDROGEN_H_ | 6 #define V8_CRANKSHAFT_HYDROGEN_H_ |
| 7 | 7 |
| 8 #include "src/accessors.h" | 8 #include "src/accessors.h" |
| 9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
| 10 #include "src/ast/ast-type-bounds.h" | 10 #include "src/ast/ast-type-bounds.h" |
| (...skipping 2342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2353 void PushArgumentsFromEnvironment(int count); | 2353 void PushArgumentsFromEnvironment(int count); |
| 2354 | 2354 |
| 2355 void SetUpScope(DeclarationScope* scope); | 2355 void SetUpScope(DeclarationScope* scope); |
| 2356 void VisitStatements(ZoneList<Statement*>* statements); | 2356 void VisitStatements(ZoneList<Statement*>* statements); |
| 2357 | 2357 |
| 2358 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); | 2358 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); |
| 2359 AST_NODE_LIST(DECLARE_VISIT) | 2359 AST_NODE_LIST(DECLARE_VISIT) |
| 2360 #undef DECLARE_VISIT | 2360 #undef DECLARE_VISIT |
| 2361 | 2361 |
| 2362 private: | 2362 private: |
| 2363 // Helpers for flow graph construction. | 2363 bool LookupGlobalPropertyCell(Variable* var, LookupIterator* it, |
| 2364 enum GlobalPropertyAccess { | 2364 PropertyAccessType access_type); |
| 2365 kUseCell, | 2365 |
| 2366 kUseGeneric | 2366 bool LookupGlobalPropertyCell(LookupIterator* it, |
| 2367 }; | 2367 PropertyAccessType access_type); |
| 2368 GlobalPropertyAccess LookupGlobalProperty(Variable* var, LookupIterator* it, | 2368 |
| 2369 PropertyAccessType access_type); | 2369 void LoadFromCell(LookupIterator* it, BailoutId ast_id); |
| 2370 | 2370 |
| 2371 void EnsureArgumentsArePushedForAccess(); | 2371 void EnsureArgumentsArePushedForAccess(); |
| 2372 bool TryArgumentsAccess(Property* expr); | 2372 bool TryArgumentsAccess(Property* expr); |
| 2373 | 2373 |
| 2374 // Shared code for .call and .apply optimizations. | 2374 // Shared code for .call and .apply optimizations. |
| 2375 void HandleIndirectCall(Call* expr, HValue* function, int arguments_count); | 2375 void HandleIndirectCall(Call* expr, HValue* function, int arguments_count); |
| 2376 // Try to optimize indirect calls such as fun.apply(receiver, arguments) | 2376 // Try to optimize indirect calls such as fun.apply(receiver, arguments) |
| 2377 // or fun.call(...). | 2377 // or fun.call(...). |
| 2378 bool TryIndirectCall(Call* expr); | 2378 bool TryIndirectCall(Call* expr); |
| 2379 void BuildFunctionApply(Call* expr); | 2379 void BuildFunctionApply(Call* expr); |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3033 } | 3033 } |
| 3034 | 3034 |
| 3035 private: | 3035 private: |
| 3036 HOptimizedGraphBuilder* builder_; | 3036 HOptimizedGraphBuilder* builder_; |
| 3037 }; | 3037 }; |
| 3038 | 3038 |
| 3039 } // namespace internal | 3039 } // namespace internal |
| 3040 } // namespace v8 | 3040 } // namespace v8 |
| 3041 | 3041 |
| 3042 #endif // V8_CRANKSHAFT_HYDROGEN_H_ | 3042 #endif // V8_CRANKSHAFT_HYDROGEN_H_ |
| OLD | NEW |