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