OLD | NEW |
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 Loading... |
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::Current(), zone) { | 46 factory_(zone->isolate(), zone) { |
47 InitializeAstVisitor(); | 47 InitializeAstVisitor(zone->isolate()); |
48 } | 48 } |
49 | 49 |
50 virtual ~Processor() { } | 50 virtual ~Processor() { } |
51 | 51 |
52 void Process(ZoneList<Statement*>* statements); | 52 void Process(ZoneList<Statement*>* statements); |
53 bool result_assigned() const { return result_assigned_; } | 53 bool result_assigned() const { return result_assigned_; } |
54 | 54 |
55 AstNodeFactory<AstNullVisitor>* factory() { | 55 AstNodeFactory<AstNullVisitor>* factory() { |
56 return &factory_; | 56 return &factory_; |
57 } | 57 } |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 result_statement->set_statement_pos(position); | 280 result_statement->set_statement_pos(position); |
281 body->Add(result_statement, info->zone()); | 281 body->Add(result_statement, info->zone()); |
282 } | 282 } |
283 } | 283 } |
284 | 284 |
285 return true; | 285 return true; |
286 } | 286 } |
287 | 287 |
288 | 288 |
289 } } // namespace v8::internal | 289 } } // namespace v8::internal |
OLD | NEW |