OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/rewriter.h" | 7 #include "src/rewriter.h" |
8 | 8 |
9 #include "src/ast.h" | 9 #include "src/ast.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 Expression* SetResult(Expression* value) { | 54 Expression* SetResult(Expression* value) { |
55 result_assigned_ = true; | 55 result_assigned_ = true; |
56 VariableProxy* result_proxy = factory()->NewVariableProxy(result_); | 56 VariableProxy* result_proxy = factory()->NewVariableProxy(result_); |
57 return factory()->NewAssignment( | 57 return factory()->NewAssignment( |
58 Token::ASSIGN, result_proxy, value, RelocInfo::kNoPosition); | 58 Token::ASSIGN, result_proxy, value, RelocInfo::kNoPosition); |
59 } | 59 } |
60 | 60 |
61 // Node visitors. | 61 // Node visitors. |
62 #define DEF_VISIT(type) \ | 62 #define DEF_VISIT(type) \ |
63 virtual void Visit##type(type* node); | 63 virtual void Visit##type(type* node) OVERRIDE; |
64 AST_NODE_LIST(DEF_VISIT) | 64 AST_NODE_LIST(DEF_VISIT) |
65 #undef DEF_VISIT | 65 #undef DEF_VISIT |
66 | 66 |
67 void VisitIterationStatement(IterationStatement* stmt); | 67 void VisitIterationStatement(IterationStatement* stmt); |
68 | 68 |
69 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); | 69 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
70 }; | 70 }; |
71 | 71 |
72 | 72 |
73 void Processor::Process(ZoneList<Statement*>* statements) { | 73 void Processor::Process(ZoneList<Statement*>* statements) { |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 processor.factory()->NewReturnStatement(result_proxy, pos); | 257 processor.factory()->NewReturnStatement(result_proxy, pos); |
258 body->Add(result_statement, info->zone()); | 258 body->Add(result_statement, info->zone()); |
259 } | 259 } |
260 } | 260 } |
261 | 261 |
262 return true; | 262 return true; |
263 } | 263 } |
264 | 264 |
265 | 265 |
266 } } // namespace v8::internal | 266 } } // namespace v8::internal |
OLD | NEW |