OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 }; | 72 }; |
73 | 73 |
74 | 74 |
75 // During compilation we need a global list of handles to constants | 75 // During compilation we need a global list of handles to constants |
76 // for frame elements. When the zone gets deleted, we make sure to | 76 // for frame elements. When the zone gets deleted, we make sure to |
77 // clear this list of handles as well. | 77 // clear this list of handles as well. |
78 class CompilationZoneScope : public ZoneScope { | 78 class CompilationZoneScope : public ZoneScope { |
79 public: | 79 public: |
80 explicit CompilationZoneScope(ZoneScopeMode mode) : ZoneScope(mode) { } | 80 explicit CompilationZoneScope(ZoneScopeMode mode) : ZoneScope(mode) { } |
81 virtual ~CompilationZoneScope() { | 81 virtual ~CompilationZoneScope() { |
82 if (ShouldDeleteOnExit()) FrameElement::ClearConstantList(); | 82 if (ShouldDeleteOnExit()) { |
| 83 FrameElement::ClearConstantList(); |
| 84 Result::ClearConstantList(); |
| 85 } |
83 } | 86 } |
84 }; | 87 }; |
85 | 88 |
86 | 89 |
87 } } // namespace v8::internal | 90 } } // namespace v8::internal |
88 | 91 |
89 #endif // V8_COMPILER_H_ | 92 #endif // V8_COMPILER_H_ |
OLD | NEW |