| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 #ifdef ENABLE_DEBUGGER_SUPPORT | 292 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 293 static bool MakeCodeForLiveEdit(CompilationInfo* info); | 293 static bool MakeCodeForLiveEdit(CompilationInfo* info); |
| 294 #endif | 294 #endif |
| 295 | 295 |
| 296 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, | 296 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, |
| 297 CompilationInfo* info, | 297 CompilationInfo* info, |
| 298 Handle<SharedFunctionInfo> shared); | 298 Handle<SharedFunctionInfo> shared); |
| 299 }; | 299 }; |
| 300 | 300 |
| 301 | 301 |
| 302 // During compilation we need a global list of handles to constants | |
| 303 // for frame elements. When the zone gets deleted, we make sure to | |
| 304 // clear this list of handles as well. | |
| 305 class CompilationZoneScope : public ZoneScope { | |
| 306 public: | |
| 307 CompilationZoneScope(Isolate* isolate, ZoneScopeMode mode) | |
| 308 : ZoneScope(isolate, mode) {} | |
| 309 | |
| 310 virtual ~CompilationZoneScope() { | |
| 311 if (ShouldDeleteOnExit()) { | |
| 312 Isolate* isolate = Isolate::Current(); | |
| 313 isolate->frame_element_constant_list()->Clear(); | |
| 314 isolate->result_constant_list()->Clear(); | |
| 315 } | |
| 316 } | |
| 317 }; | |
| 318 | |
| 319 | |
| 320 } } // namespace v8::internal | 302 } } // namespace v8::internal |
| 321 | 303 |
| 322 #endif // V8_COMPILER_H_ | 304 #endif // V8_COMPILER_H_ |
| OLD | NEW |