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/ast.h" | 7 #include "src/ast.h" |
8 #include "src/parser.h" | 8 #include "src/parser.h" |
9 #include "src/rewriter.h" | 9 #include "src/rewriter.h" |
10 #include "src/scopes.h" | 10 #include "src/scopes.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 AstNodeFactory factory_; | 50 AstNodeFactory factory_; |
51 | 51 |
52 Expression* SetResult(Expression* value) { | 52 Expression* SetResult(Expression* value) { |
53 result_assigned_ = true; | 53 result_assigned_ = true; |
54 VariableProxy* result_proxy = factory()->NewVariableProxy(result_); | 54 VariableProxy* result_proxy = factory()->NewVariableProxy(result_); |
55 return factory()->NewAssignment( | 55 return factory()->NewAssignment( |
56 Token::ASSIGN, result_proxy, value, RelocInfo::kNoPosition); | 56 Token::ASSIGN, result_proxy, value, RelocInfo::kNoPosition); |
57 } | 57 } |
58 | 58 |
59 // Node visitors. | 59 // Node visitors. |
60 #define DEF_VISIT(type) virtual void Visit##type(type* node) OVERRIDE; | 60 #define DEF_VISIT(type) virtual void Visit##type(type* node) override; |
61 AST_NODE_LIST(DEF_VISIT) | 61 AST_NODE_LIST(DEF_VISIT) |
62 #undef DEF_VISIT | 62 #undef DEF_VISIT |
63 | 63 |
64 void VisitIterationStatement(IterationStatement* stmt); | 64 void VisitIterationStatement(IterationStatement* stmt); |
65 | 65 |
66 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); | 66 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
67 }; | 67 }; |
68 | 68 |
69 | 69 |
70 void Processor::Process(ZoneList<Statement*>* statements) { | 70 void Processor::Process(ZoneList<Statement*>* statements) { |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 processor.factory()->NewReturnStatement(result_proxy, pos); | 253 processor.factory()->NewReturnStatement(result_proxy, pos); |
254 body->Add(result_statement, info->zone()); | 254 body->Add(result_statement, info->zone()); |
255 } | 255 } |
256 } | 256 } |
257 | 257 |
258 return true; | 258 return true; |
259 } | 259 } |
260 | 260 |
261 | 261 |
262 } } // namespace v8::internal | 262 } } // namespace v8::internal |
OLD | NEW |