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 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1011 INCREASE_NODE_COUNT(Literal) | 1011 INCREASE_NODE_COUNT(Literal) |
1012 INCREASE_NODE_COUNT(ObjectLiteral) | 1012 INCREASE_NODE_COUNT(ObjectLiteral) |
1013 INCREASE_NODE_COUNT(Assignment) | 1013 INCREASE_NODE_COUNT(Assignment) |
1014 INCREASE_NODE_COUNT(Throw) | 1014 INCREASE_NODE_COUNT(Throw) |
1015 INCREASE_NODE_COUNT(Property) | 1015 INCREASE_NODE_COUNT(Property) |
1016 INCREASE_NODE_COUNT(UnaryOperation) | 1016 INCREASE_NODE_COUNT(UnaryOperation) |
1017 INCREASE_NODE_COUNT(CountOperation) | 1017 INCREASE_NODE_COUNT(CountOperation) |
1018 INCREASE_NODE_COUNT(BinaryOperation) | 1018 INCREASE_NODE_COUNT(BinaryOperation) |
1019 INCREASE_NODE_COUNT(CompareOperation) | 1019 INCREASE_NODE_COUNT(CompareOperation) |
1020 INCREASE_NODE_COUNT(ThisFunction) | 1020 INCREASE_NODE_COUNT(ThisFunction) |
| 1021 INCREASE_NODE_COUNT(Call) |
| 1022 INCREASE_NODE_COUNT(CallNew) |
1021 | 1023 |
1022 #undef INCREASE_NODE_COUNT | 1024 #undef INCREASE_NODE_COUNT |
1023 | 1025 |
1024 | 1026 |
1025 void AstConstructionVisitor::VisitWithStatement(WithStatement* node) { | 1027 void AstConstructionVisitor::VisitWithStatement(WithStatement* node) { |
1026 increase_node_count(); | 1028 increase_node_count(); |
1027 add_flag(kDontOptimize); | 1029 add_flag(kDontOptimize); |
1028 add_flag(kDontInline); | 1030 add_flag(kDontInline); |
1029 } | 1031 } |
1030 | 1032 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 add_flag(kDontInline); // TODO(1322): Allow materialized literals. | 1114 add_flag(kDontInline); // TODO(1322): Allow materialized literals. |
1113 } | 1115 } |
1114 | 1116 |
1115 | 1117 |
1116 void AstConstructionVisitor::VisitArrayLiteral(ArrayLiteral* node) { | 1118 void AstConstructionVisitor::VisitArrayLiteral(ArrayLiteral* node) { |
1117 increase_node_count(); | 1119 increase_node_count(); |
1118 add_flag(kDontInline); // TODO(1322): Allow materialized literals. | 1120 add_flag(kDontInline); // TODO(1322): Allow materialized literals. |
1119 } | 1121 } |
1120 | 1122 |
1121 | 1123 |
1122 void AstConstructionVisitor::VisitCall(Call* node) { | |
1123 increase_node_count(); | |
1124 add_flag(kDontSelfOptimize); | |
1125 } | |
1126 | |
1127 | |
1128 void AstConstructionVisitor::VisitCallNew(CallNew* node) { | |
1129 increase_node_count(); | |
1130 add_flag(kDontSelfOptimize); | |
1131 } | |
1132 | |
1133 | |
1134 void AstConstructionVisitor::VisitCallRuntime(CallRuntime* node) { | 1124 void AstConstructionVisitor::VisitCallRuntime(CallRuntime* node) { |
1135 increase_node_count(); | 1125 increase_node_count(); |
1136 add_flag(kDontSelfOptimize); | |
1137 if (node->is_jsruntime()) { | 1126 if (node->is_jsruntime()) { |
1138 // Don't try to inline JS runtime calls because we don't (currently) even | 1127 // Don't try to inline JS runtime calls because we don't (currently) even |
1139 // optimize them. | 1128 // optimize them. |
1140 add_flag(kDontInline); | 1129 add_flag(kDontInline); |
1141 } else if (node->function()->intrinsic_type == Runtime::INLINE && | 1130 } else if (node->function()->intrinsic_type == Runtime::INLINE && |
1142 (node->name()->IsEqualTo(CStrVector("_ArgumentsLength")) || | 1131 (node->name()->IsEqualTo(CStrVector("_ArgumentsLength")) || |
1143 node->name()->IsEqualTo(CStrVector("_Arguments")))) { | 1132 node->name()->IsEqualTo(CStrVector("_Arguments")))) { |
1144 // Don't inline the %_ArgumentsLength or %_Arguments because their | 1133 // Don't inline the %_ArgumentsLength or %_Arguments because their |
1145 // implementation will not work. There is no stack frame to get them | 1134 // implementation will not work. There is no stack frame to get them |
1146 // from. | 1135 // from. |
1147 add_flag(kDontInline); | 1136 add_flag(kDontInline); |
1148 } | 1137 } |
1149 } | 1138 } |
1150 | 1139 |
1151 } } // namespace v8::internal | 1140 } } // namespace v8::internal |
OLD | NEW |