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 2315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2326 void PushArgumentsFromEnvironment(int count); | 2326 void PushArgumentsFromEnvironment(int count); |
2327 | 2327 |
2328 void SetUpScope(DeclarationScope* scope); | 2328 void SetUpScope(DeclarationScope* scope); |
2329 void VisitStatements(ZoneList<Statement*>* statements); | 2329 void VisitStatements(ZoneList<Statement*>* statements); |
2330 | 2330 |
2331 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); | 2331 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); |
2332 AST_NODE_LIST(DECLARE_VISIT) | 2332 AST_NODE_LIST(DECLARE_VISIT) |
2333 #undef DECLARE_VISIT | 2333 #undef DECLARE_VISIT |
2334 | 2334 |
2335 private: | 2335 private: |
2336 // Helpers for flow graph construction. | 2336 bool CanInlineGlobalPropertyAccess(Variable* var, LookupIterator* it, |
2337 enum GlobalPropertyAccess { | 2337 PropertyAccessType access_type); |
2338 kUseCell, | 2338 |
2339 kUseGeneric | 2339 bool CanInlineGlobalPropertyAccess(LookupIterator* it, |
2340 }; | 2340 PropertyAccessType access_type); |
2341 GlobalPropertyAccess LookupGlobalProperty(Variable* var, LookupIterator* it, | 2341 |
2342 PropertyAccessType access_type); | 2342 void InlineGlobalPropertyLoad(LookupIterator* it, BailoutId ast_id); |
| 2343 HInstruction* InlineGlobalPropertyStore(LookupIterator* it, HValue* value, |
| 2344 BailoutId ast_id); |
2343 | 2345 |
2344 void EnsureArgumentsArePushedForAccess(); | 2346 void EnsureArgumentsArePushedForAccess(); |
2345 bool TryArgumentsAccess(Property* expr); | 2347 bool TryArgumentsAccess(Property* expr); |
2346 | 2348 |
2347 // Shared code for .call and .apply optimizations. | 2349 // Shared code for .call and .apply optimizations. |
2348 void HandleIndirectCall(Call* expr, HValue* function, int arguments_count); | 2350 void HandleIndirectCall(Call* expr, HValue* function, int arguments_count); |
2349 // Try to optimize indirect calls such as fun.apply(receiver, arguments) | 2351 // Try to optimize indirect calls such as fun.apply(receiver, arguments) |
2350 // or fun.call(...). | 2352 // or fun.call(...). |
2351 bool TryIndirectCall(Call* expr); | 2353 bool TryIndirectCall(Call* expr); |
2352 void BuildFunctionApply(Call* expr); | 2354 void BuildFunctionApply(Call* expr); |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3006 } | 3008 } |
3007 | 3009 |
3008 private: | 3010 private: |
3009 HOptimizedGraphBuilder* builder_; | 3011 HOptimizedGraphBuilder* builder_; |
3010 }; | 3012 }; |
3011 | 3013 |
3012 } // namespace internal | 3014 } // namespace internal |
3013 } // namespace v8 | 3015 } // namespace v8 |
3014 | 3016 |
3015 #endif // V8_CRANKSHAFT_HYDROGEN_H_ | 3017 #endif // V8_CRANKSHAFT_HYDROGEN_H_ |
OLD | NEW |