Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(777)

Side by Side Diff: src/ast.cc

Issue 110123002: Enable optimization of functions with generic switches. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Adding tests Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ast.h ('k') | src/compiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 int node_max_match = node->max_match(); 1113 int node_max_match = node->max_match();
1114 max_match_ = IncreaseBy(max_match_, node_max_match); 1114 max_match_ = IncreaseBy(max_match_, node_max_match);
1115 } 1115 }
1116 } 1116 }
1117 1117
1118 1118
1119 CaseClause::CaseClause(Isolate* isolate, 1119 CaseClause::CaseClause(Isolate* isolate,
1120 Expression* label, 1120 Expression* label,
1121 ZoneList<Statement*>* statements, 1121 ZoneList<Statement*>* statements,
1122 int pos) 1122 int pos)
1123 : AstNode(pos), 1123 : Expression(isolate, pos),
1124 label_(label), 1124 label_(label),
1125 statements_(statements), 1125 statements_(statements),
1126 compare_type_(Type::None(), isolate), 1126 compare_type_(Type::None(), isolate),
1127 compare_id_(AstNode::GetNextId(isolate)), 1127 compare_id_(AstNode::GetNextId(isolate)),
1128 entry_id_(AstNode::GetNextId(isolate)) { 1128 entry_id_(AstNode::GetNextId(isolate)) {
1129 } 1129 }
1130 1130
1131 1131
1132 #define REGULAR_NODE(NodeType) \ 1132 #define REGULAR_NODE(NodeType) \
1133 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \ 1133 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); 1244 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value());
1245 str = arr; 1245 str = arr;
1246 } else { 1246 } else {
1247 str = DoubleToCString(value_->Number(), buffer); 1247 str = DoubleToCString(value_->Number(), buffer);
1248 } 1248 }
1249 return isolate_->factory()->NewStringFromAscii(CStrVector(str)); 1249 return isolate_->factory()->NewStringFromAscii(CStrVector(str));
1250 } 1250 }
1251 1251
1252 1252
1253 } } // namespace v8::internal 1253 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698