OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 CompilationInfo* info, | 287 CompilationInfo* info, |
288 Handle<SharedFunctionInfo> shared); | 288 Handle<SharedFunctionInfo> shared); |
289 }; | 289 }; |
290 | 290 |
291 | 291 |
292 // During compilation we need a global list of handles to constants | 292 // During compilation we need a global list of handles to constants |
293 // for frame elements. When the zone gets deleted, we make sure to | 293 // for frame elements. When the zone gets deleted, we make sure to |
294 // clear this list of handles as well. | 294 // clear this list of handles as well. |
295 class CompilationZoneScope : public ZoneScope { | 295 class CompilationZoneScope : public ZoneScope { |
296 public: | 296 public: |
297 explicit CompilationZoneScope(ZoneScopeMode mode) : ZoneScope(mode) { } | 297 CompilationZoneScope(Isolate* isolate, ZoneScopeMode mode) |
| 298 : ZoneScope(isolate, mode) {} |
| 299 |
298 virtual ~CompilationZoneScope() { | 300 virtual ~CompilationZoneScope() { |
299 if (ShouldDeleteOnExit()) { | 301 if (ShouldDeleteOnExit()) { |
300 Isolate* isolate = Isolate::Current(); | 302 Isolate* isolate = Isolate::Current(); |
301 isolate->frame_element_constant_list()->Clear(); | 303 isolate->frame_element_constant_list()->Clear(); |
302 isolate->result_constant_list()->Clear(); | 304 isolate->result_constant_list()->Clear(); |
303 } | 305 } |
304 } | 306 } |
305 }; | 307 }; |
306 | 308 |
307 | 309 |
308 } } // namespace v8::internal | 310 } } // namespace v8::internal |
309 | 311 |
310 #endif // V8_COMPILER_H_ | 312 #endif // V8_COMPILER_H_ |
OLD | NEW |