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

Side by Side Diff: src/rewriter.cc

Issue 159633: Another name change for consistency's sake. NODE_LIST -> AST_NODE_LIST. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 4 months 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/prettyprinter.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 bool has_function_literal_; 52 bool has_function_literal_;
53 // Helper object for function name inferring. 53 // Helper object for function name inferring.
54 FuncNameInferrer func_name_inferrer_; 54 FuncNameInferrer func_name_inferrer_;
55 55
56 // Helpers 56 // Helpers
57 void OptimizeArguments(ZoneList<Expression*>* arguments); 57 void OptimizeArguments(ZoneList<Expression*>* arguments);
58 58
59 // Node visitors. 59 // Node visitors.
60 #define DEF_VISIT(type) \ 60 #define DEF_VISIT(type) \
61 virtual void Visit##type(type* node); 61 virtual void Visit##type(type* node);
62 NODE_LIST(DEF_VISIT) 62 AST_NODE_LIST(DEF_VISIT)
63 #undef DEF_VISIT 63 #undef DEF_VISIT
64 64
65 DISALLOW_COPY_AND_ASSIGN(AstOptimizer); 65 DISALLOW_COPY_AND_ASSIGN(AstOptimizer);
66 }; 66 };
67 67
68 68
69 void AstOptimizer::Optimize(ZoneList<Statement*>* statements) { 69 void AstOptimizer::Optimize(ZoneList<Statement*>* statements) {
70 int len = statements->length(); 70 int len = statements->length();
71 for (int i = 0; i < len; i++) { 71 for (int i = 0; i < len; i++) {
72 Visit(statements->at(i)); 72 Visit(statements->at(i));
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 550
551 Expression* SetResult(Expression* value) { 551 Expression* SetResult(Expression* value) {
552 result_assigned_ = true; 552 result_assigned_ = true;
553 return new Assignment(Token::ASSIGN, result_, value, 553 return new Assignment(Token::ASSIGN, result_, value,
554 RelocInfo::kNoPosition); 554 RelocInfo::kNoPosition);
555 } 555 }
556 556
557 // Node visitors. 557 // Node visitors.
558 #define DEF_VISIT(type) \ 558 #define DEF_VISIT(type) \
559 virtual void Visit##type(type* node); 559 virtual void Visit##type(type* node);
560 NODE_LIST(DEF_VISIT) 560 AST_NODE_LIST(DEF_VISIT)
561 #undef DEF_VISIT 561 #undef DEF_VISIT
562 }; 562 };
563 563
564 564
565 void Processor::Process(ZoneList<Statement*>* statements) { 565 void Processor::Process(ZoneList<Statement*>* statements) {
566 for (int i = statements->length() - 1; i >= 0; --i) { 566 for (int i = statements->length() - 1; i >= 0; --i) {
567 Visit(statements->at(i)); 567 Visit(statements->at(i));
568 } 568 }
569 } 569 }
570 570
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 optimizer.Optimize(body); 834 optimizer.Optimize(body);
835 if (optimizer.HasStackOverflow()) { 835 if (optimizer.HasStackOverflow()) {
836 return false; 836 return false;
837 } 837 }
838 } 838 }
839 return true; 839 return true;
840 } 840 }
841 841
842 842
843 } } // namespace v8::internal 843 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/prettyprinter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698