| 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 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1057 int node_max_match = node->max_match(); | 1057 int node_max_match = node->max_match(); |
| 1058 max_match_ = IncreaseBy(max_match_, node_max_match); | 1058 max_match_ = IncreaseBy(max_match_, node_max_match); |
| 1059 } | 1059 } |
| 1060 } | 1060 } |
| 1061 | 1061 |
| 1062 | 1062 |
| 1063 CaseClause::CaseClause(Isolate* isolate, | 1063 CaseClause::CaseClause(Isolate* isolate, |
| 1064 Expression* label, | 1064 Expression* label, |
| 1065 ZoneList<Statement*>* statements, | 1065 ZoneList<Statement*>* statements, |
| 1066 int pos) | 1066 int pos) |
| 1067 : label_(label), | 1067 : AstNode(pos), |
| 1068 label_(label), |
| 1068 statements_(statements), | 1069 statements_(statements), |
| 1069 position_(pos), | |
| 1070 compare_type_(Type::None(), isolate), | 1070 compare_type_(Type::None(), isolate), |
| 1071 compare_id_(AstNode::GetNextId(isolate)), | 1071 compare_id_(AstNode::GetNextId(isolate)), |
| 1072 entry_id_(AstNode::GetNextId(isolate)) { | 1072 entry_id_(AstNode::GetNextId(isolate)) { |
| 1073 } | 1073 } |
| 1074 | 1074 |
| 1075 | 1075 |
| 1076 #define REGULAR_NODE(NodeType) \ | 1076 #define REGULAR_NODE(NodeType) \ |
| 1077 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \ | 1077 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \ |
| 1078 increase_node_count(); \ | 1078 increase_node_count(); \ |
| 1079 } | 1079 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1101 REGULAR_NODE(VariableDeclaration) | 1101 REGULAR_NODE(VariableDeclaration) |
| 1102 REGULAR_NODE(FunctionDeclaration) | 1102 REGULAR_NODE(FunctionDeclaration) |
| 1103 REGULAR_NODE(Block) | 1103 REGULAR_NODE(Block) |
| 1104 REGULAR_NODE(ExpressionStatement) | 1104 REGULAR_NODE(ExpressionStatement) |
| 1105 REGULAR_NODE(EmptyStatement) | 1105 REGULAR_NODE(EmptyStatement) |
| 1106 REGULAR_NODE(IfStatement) | 1106 REGULAR_NODE(IfStatement) |
| 1107 REGULAR_NODE(ContinueStatement) | 1107 REGULAR_NODE(ContinueStatement) |
| 1108 REGULAR_NODE(BreakStatement) | 1108 REGULAR_NODE(BreakStatement) |
| 1109 REGULAR_NODE(ReturnStatement) | 1109 REGULAR_NODE(ReturnStatement) |
| 1110 REGULAR_NODE(SwitchStatement) | 1110 REGULAR_NODE(SwitchStatement) |
| 1111 REGULAR_NODE(CaseClause) |
| 1111 REGULAR_NODE(Conditional) | 1112 REGULAR_NODE(Conditional) |
| 1112 REGULAR_NODE(Literal) | 1113 REGULAR_NODE(Literal) |
| 1113 REGULAR_NODE(ArrayLiteral) | 1114 REGULAR_NODE(ArrayLiteral) |
| 1114 REGULAR_NODE(ObjectLiteral) | 1115 REGULAR_NODE(ObjectLiteral) |
| 1115 REGULAR_NODE(RegExpLiteral) | 1116 REGULAR_NODE(RegExpLiteral) |
| 1116 REGULAR_NODE(FunctionLiteral) | 1117 REGULAR_NODE(FunctionLiteral) |
| 1117 REGULAR_NODE(Assignment) | 1118 REGULAR_NODE(Assignment) |
| 1118 REGULAR_NODE(Throw) | 1119 REGULAR_NODE(Throw) |
| 1119 REGULAR_NODE(Property) | 1120 REGULAR_NODE(Property) |
| 1120 REGULAR_NODE(UnaryOperation) | 1121 REGULAR_NODE(UnaryOperation) |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1187 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); | 1188 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); |
| 1188 str = arr; | 1189 str = arr; |
| 1189 } else { | 1190 } else { |
| 1190 str = DoubleToCString(value_->Number(), buffer); | 1191 str = DoubleToCString(value_->Number(), buffer); |
| 1191 } | 1192 } |
| 1192 return isolate_->factory()->NewStringFromAscii(CStrVector(str)); | 1193 return isolate_->factory()->NewStringFromAscii(CStrVector(str)); |
| 1193 } | 1194 } |
| 1194 | 1195 |
| 1195 | 1196 |
| 1196 } } // namespace v8::internal | 1197 } } // namespace v8::internal |
| OLD | NEW |