| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2894 } | 2894 } |
| 2895 | 2895 |
| 2896 | 2896 |
| 2897 void HGraphBuilder::VisitSharedFunctionInfoLiteral( | 2897 void HGraphBuilder::VisitSharedFunctionInfoLiteral( |
| 2898 SharedFunctionInfoLiteral* expr) { | 2898 SharedFunctionInfoLiteral* expr) { |
| 2899 BAILOUT("SharedFunctionInfoLiteral"); | 2899 BAILOUT("SharedFunctionInfoLiteral"); |
| 2900 } | 2900 } |
| 2901 | 2901 |
| 2902 | 2902 |
| 2903 void HGraphBuilder::VisitConditional(Conditional* expr) { | 2903 void HGraphBuilder::VisitConditional(Conditional* expr) { |
| 2904 HSubgraph* then_graph = CreateEmptySubgraph(); | 2904 HSubgraph* true_graph = CreateEmptySubgraph(); |
| 2905 HSubgraph* else_graph = CreateEmptySubgraph(); | 2905 HSubgraph* false_graph = CreateEmptySubgraph(); |
| 2906 VISIT_FOR_CONTROL(expr->condition(), | 2906 VISIT_FOR_CONTROL(expr->condition(), |
| 2907 then_graph->entry_block(), | 2907 true_graph->entry_block(), |
| 2908 else_graph->entry_block()); | 2908 false_graph->entry_block()); |
| 2909 | 2909 |
| 2910 // Visit the true and false subexpressions in the same AST context as the | 2910 // Visit the true and false subexpressions in the same AST context as the |
| 2911 // whole expression. | 2911 // whole expression. |
| 2912 then_graph->entry_block()->SetJoinId(expr->ThenId()); | 2912 true_graph->entry_block()->SetJoinId(expr->ThenId()); |
| 2913 { SubgraphScope scope(this, then_graph); | 2913 { SubgraphScope scope(this, true_graph); |
| 2914 Visit(expr->then_expression()); | 2914 Visit(expr->then_expression()); |
| 2915 CHECK_BAILOUT; | 2915 CHECK_BAILOUT; |
| 2916 } | 2916 } |
| 2917 | 2917 |
| 2918 else_graph->entry_block()->SetJoinId(expr->ElseId()); | 2918 false_graph->entry_block()->SetJoinId(expr->ElseId()); |
| 2919 { SubgraphScope scope(this, else_graph); | 2919 { SubgraphScope scope(this, false_graph); |
| 2920 Visit(expr->else_expression()); | 2920 Visit(expr->else_expression()); |
| 2921 CHECK_BAILOUT; | 2921 CHECK_BAILOUT; |
| 2922 } | 2922 } |
| 2923 | 2923 |
| 2924 if (!ast_context()->IsTest()) { | 2924 if (!ast_context()->IsTest()) { |
| 2925 subgraph()->AppendJoin(then_graph, else_graph, expr); | 2925 subgraph()->AppendJoin(true_graph, false_graph, expr); |
| 2926 } | 2926 } |
| 2927 } | 2927 } |
| 2928 | 2928 |
| 2929 | 2929 |
| 2930 void HGraphBuilder::LookupGlobalPropertyCell(Variable* var, | 2930 void HGraphBuilder::LookupGlobalPropertyCell(Variable* var, |
| 2931 LookupResult* lookup, | 2931 LookupResult* lookup, |
| 2932 bool is_store) { | 2932 bool is_store) { |
| 2933 if (var->is_this()) { | 2933 if (var->is_this()) { |
| 2934 BAILOUT("global this reference"); | 2934 BAILOUT("global this reference"); |
| 2935 } | 2935 } |
| (...skipping 3011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5947 } | 5947 } |
| 5948 } | 5948 } |
| 5949 | 5949 |
| 5950 #ifdef DEBUG | 5950 #ifdef DEBUG |
| 5951 if (graph_ != NULL) graph_->Verify(); | 5951 if (graph_ != NULL) graph_->Verify(); |
| 5952 if (allocator_ != NULL) allocator_->Verify(); | 5952 if (allocator_ != NULL) allocator_->Verify(); |
| 5953 #endif | 5953 #endif |
| 5954 } | 5954 } |
| 5955 | 5955 |
| 5956 } } // namespace v8::internal | 5956 } } // namespace v8::internal |
| OLD | NEW |