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 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1078 } | 1078 } |
1079 | 1079 |
1080 | 1080 |
1081 #define REGULAR_NODE(NodeType) \ | 1081 #define REGULAR_NODE(NodeType) \ |
1082 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \ | 1082 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \ |
1083 increase_node_count(); \ | 1083 increase_node_count(); \ |
1084 } | 1084 } |
1085 #define DONT_OPTIMIZE_NODE(NodeType) \ | 1085 #define DONT_OPTIMIZE_NODE(NodeType) \ |
1086 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \ | 1086 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \ |
1087 increase_node_count(); \ | 1087 increase_node_count(); \ |
1088 add_flag(kDontOptimize); \ | 1088 set_dont_optimize_reason(k##NodeType); \ |
1089 add_flag(kDontInline); \ | 1089 add_flag(kDontInline); \ |
1090 add_flag(kDontSelfOptimize); \ | 1090 add_flag(kDontSelfOptimize); \ |
1091 } | 1091 } |
1092 #define DONT_SELFOPTIMIZE_NODE(NodeType) \ | 1092 #define DONT_SELFOPTIMIZE_NODE(NodeType) \ |
1093 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \ | 1093 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \ |
1094 increase_node_count(); \ | 1094 increase_node_count(); \ |
1095 add_flag(kDontSelfOptimize); \ | 1095 add_flag(kDontSelfOptimize); \ |
1096 } | 1096 } |
1097 #define DONT_CACHE_NODE(NodeType) \ | 1097 #define DONT_CACHE_NODE(NodeType) \ |
1098 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \ | 1098 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \ |
1099 increase_node_count(); \ | 1099 increase_node_count(); \ |
1100 add_flag(kDontOptimize); \ | 1100 set_dont_optimize_reason(k##NodeType); \ |
1101 add_flag(kDontInline); \ | 1101 add_flag(kDontInline); \ |
1102 add_flag(kDontSelfOptimize); \ | 1102 add_flag(kDontSelfOptimize); \ |
1103 add_flag(kDontCache); \ | 1103 add_flag(kDontCache); \ |
1104 } | 1104 } |
1105 | 1105 |
1106 REGULAR_NODE(VariableDeclaration) | 1106 REGULAR_NODE(VariableDeclaration) |
1107 REGULAR_NODE(FunctionDeclaration) | 1107 REGULAR_NODE(FunctionDeclaration) |
1108 REGULAR_NODE(Block) | 1108 REGULAR_NODE(Block) |
1109 REGULAR_NODE(ExpressionStatement) | 1109 REGULAR_NODE(ExpressionStatement) |
1110 REGULAR_NODE(EmptyStatement) | 1110 REGULAR_NODE(EmptyStatement) |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1192 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); | 1192 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); |
1193 str = arr; | 1193 str = arr; |
1194 } else { | 1194 } else { |
1195 str = DoubleToCString(value_->Number(), buffer); | 1195 str = DoubleToCString(value_->Number(), buffer); |
1196 } | 1196 } |
1197 return isolate_->factory()->NewStringFromAscii(CStrVector(str)); | 1197 return isolate_->factory()->NewStringFromAscii(CStrVector(str)); |
1198 } | 1198 } |
1199 | 1199 |
1200 | 1200 |
1201 } } // namespace v8::internal | 1201 } } // namespace v8::internal |
OLD | NEW |