| OLD | NEW | 
|    1 // Copyright 2012 the V8 project authors. All rights reserved. |    1 // Copyright 2012 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  174   void SetFunction(FunctionLiteral* literal) { |  174   void SetFunction(FunctionLiteral* literal) { | 
|  175     ASSERT(function_ == NULL); |  175     ASSERT(function_ == NULL); | 
|  176     function_ = literal; |  176     function_ = literal; | 
|  177   } |  177   } | 
|  178   // When the scope is applied, we may have deferred work to do on the function. |  178   // When the scope is applied, we may have deferred work to do on the function. | 
|  179   void PrepareForCompilation(Scope* scope); |  179   void PrepareForCompilation(Scope* scope); | 
|  180   void SetGlobalScope(Scope* global_scope) { |  180   void SetGlobalScope(Scope* global_scope) { | 
|  181     ASSERT(global_scope_ == NULL); |  181     ASSERT(global_scope_ == NULL); | 
|  182     global_scope_ = global_scope; |  182     global_scope_ = global_scope; | 
|  183   } |  183   } | 
 |  184   Handle<FixedArray> feedback_vector() const { | 
 |  185     return feedback_vector_; | 
 |  186   } | 
|  184   void SetCode(Handle<Code> code) { code_ = code; } |  187   void SetCode(Handle<Code> code) { code_ = code; } | 
|  185   void SetExtension(v8::Extension* extension) { |  188   void SetExtension(v8::Extension* extension) { | 
|  186     ASSERT(!is_lazy()); |  189     ASSERT(!is_lazy()); | 
|  187     extension_ = extension; |  190     extension_ = extension; | 
|  188   } |  191   } | 
|  189   void SetPreParseData(ScriptDataImpl* pre_parse_data) { |  192   void SetPreParseData(ScriptDataImpl* pre_parse_data) { | 
|  190     ASSERT(!is_lazy()); |  193     ASSERT(!is_lazy()); | 
|  191     pre_parse_data_ = pre_parse_data; |  194     pre_parse_data_ = pre_parse_data; | 
|  192   } |  195   } | 
|  193   void SetContext(Handle<Context> context) { |  196   void SetContext(Handle<Context> context) { | 
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  402   Handle<Script> script_; |  405   Handle<Script> script_; | 
|  403  |  406  | 
|  404   // Fields possibly needed for eager compilation, NULL by default. |  407   // Fields possibly needed for eager compilation, NULL by default. | 
|  405   v8::Extension* extension_; |  408   v8::Extension* extension_; | 
|  406   ScriptDataImpl* pre_parse_data_; |  409   ScriptDataImpl* pre_parse_data_; | 
|  407  |  410  | 
|  408   // The context of the caller for eval code, and the global context for a |  411   // The context of the caller for eval code, and the global context for a | 
|  409   // global script. Will be a null handle otherwise. |  412   // global script. Will be a null handle otherwise. | 
|  410   Handle<Context> context_; |  413   Handle<Context> context_; | 
|  411  |  414  | 
 |  415   // Used by codegen, ultimately kept rooted by the SharedFunctionInfo. | 
 |  416   Handle<FixedArray> feedback_vector_; | 
 |  417  | 
|  412   // Compilation mode flag and whether deoptimization is allowed. |  418   // Compilation mode flag and whether deoptimization is allowed. | 
|  413   Mode mode_; |  419   Mode mode_; | 
|  414   BailoutId osr_ast_id_; |  420   BailoutId osr_ast_id_; | 
|  415   // The unoptimized code we patched for OSR may not be the shared code |  421   // The unoptimized code we patched for OSR may not be the shared code | 
|  416   // afterwards, since we may need to compile it again to include deoptimization |  422   // afterwards, since we may need to compile it again to include deoptimization | 
|  417   // data.  Keep track which code we patched. |  423   // data.  Keep track which code we patched. | 
|  418   Handle<Code> unoptimized_code_; |  424   Handle<Code> unoptimized_code_; | 
|  419  |  425  | 
|  420   // Flag whether compilation needs to be aborted due to dependency change. |  426   // Flag whether compilation needs to be aborted due to dependency change. | 
|  421   bool abort_due_to_dependency_; |  427   bool abort_due_to_dependency_; | 
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  678   unsigned info_zone_start_allocation_size_; |  684   unsigned info_zone_start_allocation_size_; | 
|  679   ElapsedTimer timer_; |  685   ElapsedTimer timer_; | 
|  680  |  686  | 
|  681   DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |  687   DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 
|  682 }; |  688 }; | 
|  683  |  689  | 
|  684  |  690  | 
|  685 } }  // namespace v8::internal |  691 } }  // namespace v8::internal | 
|  686  |  692  | 
|  687 #endif  // V8_COMPILER_H_ |  693 #endif  // V8_COMPILER_H_ | 
| OLD | NEW |