| 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  193   // generator 'caller' to build the boilerplate. |  193   // generator 'caller' to build the boilerplate. | 
|  194   static Handle<JSFunction> BuildBoilerplate(FunctionLiteral* node, |  194   static Handle<JSFunction> BuildBoilerplate(FunctionLiteral* node, | 
|  195                                              Handle<Script> script, |  195                                              Handle<Script> script, | 
|  196                                              AstVisitor* caller); |  196                                              AstVisitor* caller); | 
|  197  |  197  | 
|  198   // Set the function info for a newly compiled function. |  198   // Set the function info for a newly compiled function. | 
|  199   static void SetFunctionInfo(Handle<JSFunction> fun, |  199   static void SetFunctionInfo(Handle<JSFunction> fun, | 
|  200                               FunctionLiteral* lit, |  200                               FunctionLiteral* lit, | 
|  201                               bool is_toplevel, |  201                               bool is_toplevel, | 
|  202                               Handle<Script> script); |  202                               Handle<Script> script); | 
 |  203  | 
 |  204  private: | 
 |  205  | 
 |  206 #if defined ENABLE_LOGGING_AND_PROFILING || defined ENABLE_OPROFILE_AGENT | 
 |  207   static void LogCodeCreateEvent(Logger::LogEventsAndTags tag, | 
 |  208                                  Handle<String> name, | 
 |  209                                  Handle<String> inferred_name, | 
 |  210                                  int start_position, | 
 |  211                                  Handle<Script> script, | 
 |  212                                  Handle<Code> code); | 
 |  213 #endif | 
|  203 }; |  214 }; | 
|  204  |  215  | 
|  205  |  216  | 
|  206 // During compilation we need a global list of handles to constants |  217 // During compilation we need a global list of handles to constants | 
|  207 // for frame elements.  When the zone gets deleted, we make sure to |  218 // for frame elements.  When the zone gets deleted, we make sure to | 
|  208 // clear this list of handles as well. |  219 // clear this list of handles as well. | 
|  209 class CompilationZoneScope : public ZoneScope { |  220 class CompilationZoneScope : public ZoneScope { | 
|  210  public: |  221  public: | 
|  211   explicit CompilationZoneScope(ZoneScopeMode mode) : ZoneScope(mode) { } |  222   explicit CompilationZoneScope(ZoneScopeMode mode) : ZoneScope(mode) { } | 
|  212   virtual ~CompilationZoneScope() { |  223   virtual ~CompilationZoneScope() { | 
|  213     if (ShouldDeleteOnExit()) { |  224     if (ShouldDeleteOnExit()) { | 
|  214       FrameElement::ClearConstantList(); |  225       FrameElement::ClearConstantList(); | 
|  215       Result::ClearConstantList(); |  226       Result::ClearConstantList(); | 
|  216     } |  227     } | 
|  217   } |  228   } | 
|  218 }; |  229 }; | 
|  219  |  230  | 
|  220  |  231  | 
|  221 } }  // namespace v8::internal |  232 } }  // namespace v8::internal | 
|  222  |  233  | 
|  223 #endif  // V8_COMPILER_H_ |  234 #endif  // V8_COMPILER_H_ | 
| OLD | NEW |