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

Side by Side Diff: src/rewriter.cc

Issue 10701054: Enable stub generation using Hydrogen/Lithium (again) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merge with latest Created 8 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/prettyprinter.cc ('k') | src/runtime.h » ('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 25 matching lines...) Expand all
36 namespace v8 { 36 namespace v8 {
37 namespace internal { 37 namespace internal {
38 38
39 class Processor: public AstVisitor { 39 class Processor: public AstVisitor {
40 public: 40 public:
41 Processor(Variable* result, Zone* zone) 41 Processor(Variable* result, Zone* zone)
42 : result_(result), 42 : result_(result),
43 result_assigned_(false), 43 result_assigned_(false),
44 is_set_(false), 44 is_set_(false),
45 in_try_(false), 45 in_try_(false),
46 factory_(isolate(), zone) { } 46 factory_(Isolate::Current(), zone) {
47 InitializeAstVisitor();
48 }
47 49
48 virtual ~Processor() { } 50 virtual ~Processor() { }
49 51
50 void Process(ZoneList<Statement*>* statements); 52 void Process(ZoneList<Statement*>* statements);
51 bool result_assigned() const { return result_assigned_; } 53 bool result_assigned() const { return result_assigned_; }
52 54
53 AstNodeFactory<AstNullVisitor>* factory() { 55 AstNodeFactory<AstNullVisitor>* factory() {
54 return &factory_; 56 return &factory_;
55 } 57 }
56 58
(...skipping 22 matching lines...) Expand all
79 Token::ASSIGN, result_proxy, value, RelocInfo::kNoPosition); 81 Token::ASSIGN, result_proxy, value, RelocInfo::kNoPosition);
80 } 82 }
81 83
82 // Node visitors. 84 // Node visitors.
83 #define DEF_VISIT(type) \ 85 #define DEF_VISIT(type) \
84 virtual void Visit##type(type* node); 86 virtual void Visit##type(type* node);
85 AST_NODE_LIST(DEF_VISIT) 87 AST_NODE_LIST(DEF_VISIT)
86 #undef DEF_VISIT 88 #undef DEF_VISIT
87 89
88 void VisitIterationStatement(IterationStatement* stmt); 90 void VisitIterationStatement(IterationStatement* stmt);
91
92 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
89 }; 93 };
90 94
91 95
92 void Processor::Process(ZoneList<Statement*>* statements) { 96 void Processor::Process(ZoneList<Statement*>* statements) {
93 for (int i = statements->length() - 1; i >= 0; --i) { 97 for (int i = statements->length() - 1; i >= 0; --i) {
94 Visit(statements->at(i)); 98 Visit(statements->at(i));
95 } 99 }
96 } 100 }
97 101
98 102
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 result_statement->set_statement_pos(position); 275 result_statement->set_statement_pos(position);
272 body->Add(result_statement, info->zone()); 276 body->Add(result_statement, info->zone());
273 } 277 }
274 } 278 }
275 279
276 return true; 280 return true;
277 } 281 }
278 282
279 283
280 } } // namespace v8::internal 284 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/prettyprinter.cc ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698