OLD | NEW |
---|---|
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
258 static void SetFunctionInfo(Handle<SharedFunctionInfo> function_info, | 258 static void SetFunctionInfo(Handle<SharedFunctionInfo> function_info, |
259 FunctionLiteral* lit, | 259 FunctionLiteral* lit, |
260 bool is_toplevel, | 260 bool is_toplevel, |
261 Handle<Script> script); | 261 Handle<Script> script); |
262 | 262 |
263 #ifdef ENABLE_DEBUGGER_SUPPORT | 263 #ifdef ENABLE_DEBUGGER_SUPPORT |
264 static bool MakeCodeForLiveEdit(CompilationInfo* info); | 264 static bool MakeCodeForLiveEdit(CompilationInfo* info); |
265 #endif | 265 #endif |
266 | 266 |
267 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, | 267 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, |
268 Handle<String> name, | 268 CompilationInfo* info, |
269 int start_position, | 269 Handle<SharedFunctionInfo> shared); |
Vitaly Repeshko
2011/02/22 15:11:19
Can we use info->shared_info() instead of passing
mnaganov (inactive)
2011/02/22 16:18:22
For the case when CompilationInfo is built up usin
| |
270 CompilationInfo* info); | |
271 }; | 270 }; |
272 | 271 |
273 | 272 |
274 // During compilation we need a global list of handles to constants | 273 // During compilation we need a global list of handles to constants |
275 // for frame elements. When the zone gets deleted, we make sure to | 274 // for frame elements. When the zone gets deleted, we make sure to |
276 // clear this list of handles as well. | 275 // clear this list of handles as well. |
277 class CompilationZoneScope : public ZoneScope { | 276 class CompilationZoneScope : public ZoneScope { |
278 public: | 277 public: |
279 explicit CompilationZoneScope(ZoneScopeMode mode) : ZoneScope(mode) { } | 278 explicit CompilationZoneScope(ZoneScopeMode mode) : ZoneScope(mode) { } |
280 virtual ~CompilationZoneScope() { | 279 virtual ~CompilationZoneScope() { |
281 if (ShouldDeleteOnExit()) { | 280 if (ShouldDeleteOnExit()) { |
282 FrameElement::ClearConstantList(); | 281 FrameElement::ClearConstantList(); |
283 Result::ClearConstantList(); | 282 Result::ClearConstantList(); |
284 } | 283 } |
285 } | 284 } |
286 }; | 285 }; |
287 | 286 |
288 | 287 |
289 } } // namespace v8::internal | 288 } } // namespace v8::internal |
290 | 289 |
291 #endif // V8_COMPILER_H_ | 290 #endif // V8_COMPILER_H_ |
OLD | NEW |