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 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 HEnvironment* CopyWithoutHistory() const; | 633 HEnvironment* CopyWithoutHistory() const; |
634 HEnvironment* CopyAsLoopHeader(HBasicBlock* block) const; | 634 HEnvironment* CopyAsLoopHeader(HBasicBlock* block) const; |
635 | 635 |
636 // Create an "inlined version" of this environment, where the original | 636 // Create an "inlined version" of this environment, where the original |
637 // environment is the outer environment but the top expression stack | 637 // environment is the outer environment but the top expression stack |
638 // elements are moved to an inner environment as parameters. | 638 // elements are moved to an inner environment as parameters. |
639 HEnvironment* CopyForInlining(Handle<JSFunction> target, | 639 HEnvironment* CopyForInlining(Handle<JSFunction> target, |
640 int arguments, | 640 int arguments, |
641 FunctionLiteral* function, | 641 FunctionLiteral* function, |
642 HConstant* undefined, | 642 HConstant* undefined, |
643 InliningKind inlining_kind, | 643 InliningKind inlining_kind) const; |
644 bool undefined_receiver) const; | |
645 | |
646 static bool UseUndefinedReceiver(Handle<JSFunction> closure, | |
647 FunctionLiteral* function, | |
648 CallKind call_kind, | |
649 InliningKind inlining_kind) { | |
650 return (closure->shared()->native() || !function->is_classic_mode()) && | |
651 call_kind == CALL_AS_FUNCTION && inlining_kind != CONSTRUCT_CALL_RETURN; | |
652 } | |
653 | 644 |
654 HEnvironment* DiscardInlined(bool drop_extra) { | 645 HEnvironment* DiscardInlined(bool drop_extra) { |
655 HEnvironment* outer = outer_; | 646 HEnvironment* outer = outer_; |
656 while (outer->frame_type() != JS_FUNCTION) outer = outer->outer_; | 647 while (outer->frame_type() != JS_FUNCTION) outer = outer->outer_; |
657 if (drop_extra) outer->Drop(1); | 648 if (drop_extra) outer->Drop(1); |
658 return outer; | 649 return outer; |
659 } | 650 } |
660 | 651 |
661 void AddIncomingEdge(HBasicBlock* block, HEnvironment* other); | 652 void AddIncomingEdge(HBasicBlock* block, HEnvironment* other); |
662 | 653 |
(...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2496 HValue* object_elements, | 2487 HValue* object_elements, |
2497 AllocationSiteUsageContext* site_context); | 2488 AllocationSiteUsageContext* site_context); |
2498 | 2489 |
2499 void AddCheckPrototypeMaps(Handle<JSObject> holder, | 2490 void AddCheckPrototypeMaps(Handle<JSObject> holder, |
2500 Handle<Map> receiver_map); | 2491 Handle<Map> receiver_map); |
2501 | 2492 |
2502 void AddCheckConstantFunction(Handle<JSObject> holder, | 2493 void AddCheckConstantFunction(Handle<JSObject> holder, |
2503 HValue* receiver, | 2494 HValue* receiver, |
2504 Handle<Map> receiver_map); | 2495 Handle<Map> receiver_map); |
2505 | 2496 |
2506 void InstallGlobalReceiverInExpressionStack(int index, | |
2507 Handle<JSFunction> function); | |
2508 | |
2509 // The translation state of the currently-being-translated function. | 2497 // The translation state of the currently-being-translated function. |
2510 FunctionState* function_state_; | 2498 FunctionState* function_state_; |
2511 | 2499 |
2512 // The base of the function state stack. | 2500 // The base of the function state stack. |
2513 FunctionState initial_function_state_; | 2501 FunctionState initial_function_state_; |
2514 | 2502 |
2515 // Expression context of the currently visited subexpression. NULL when | 2503 // Expression context of the currently visited subexpression. NULL when |
2516 // visiting statements. | 2504 // visiting statements. |
2517 AstContext* ast_context_; | 2505 AstContext* ast_context_; |
2518 | 2506 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2690 } | 2678 } |
2691 | 2679 |
2692 private: | 2680 private: |
2693 HGraphBuilder* builder_; | 2681 HGraphBuilder* builder_; |
2694 }; | 2682 }; |
2695 | 2683 |
2696 | 2684 |
2697 } } // namespace v8::internal | 2685 } } // namespace v8::internal |
2698 | 2686 |
2699 #endif // V8_HYDROGEN_H_ | 2687 #endif // V8_HYDROGEN_H_ |
OLD | NEW |