Chromium Code Reviews| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 } | 96 } |
| 97 void MarkAsGlobal() { | 97 void MarkAsGlobal() { |
| 98 ASSERT(!is_lazy()); | 98 ASSERT(!is_lazy()); |
| 99 flags_ |= IsGlobal::encode(true); | 99 flags_ |= IsGlobal::encode(true); |
| 100 } | 100 } |
| 101 void set_parameter_count(int parameter_count) { | 101 void set_parameter_count(int parameter_count) { |
| 102 ASSERT(IsStub()); | 102 ASSERT(IsStub()); |
| 103 parameter_count_ = parameter_count; | 103 parameter_count_ = parameter_count; |
| 104 } | 104 } |
| 105 | 105 |
| 106 void ProcessFeedbackSlots(); | |
| 107 int slot_count() { return function()->slot_count(); } | |
| 108 | |
| 106 void set_this_has_uses(bool has_no_uses) { | 109 void set_this_has_uses(bool has_no_uses) { |
| 107 this_has_uses_ = has_no_uses; | 110 this_has_uses_ = has_no_uses; |
| 108 } | 111 } |
| 109 bool this_has_uses() { | 112 bool this_has_uses() { |
| 110 return this_has_uses_; | 113 return this_has_uses_; |
| 111 } | 114 } |
| 112 void SetLanguageMode(LanguageMode language_mode) { | 115 void SetLanguageMode(LanguageMode language_mode) { |
| 113 ASSERT(this->language_mode() == CLASSIC_MODE || | 116 ASSERT(this->language_mode() == CLASSIC_MODE || |
| 114 this->language_mode() == language_mode || | 117 this->language_mode() == language_mode || |
| 115 language_mode == EXTENDED_MODE); | 118 language_mode == EXTENDED_MODE); |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 625 int line_offset, | 628 int line_offset, |
| 626 int column_offset, | 629 int column_offset, |
| 627 bool is_shared_cross_origin, | 630 bool is_shared_cross_origin, |
| 628 Handle<Context> context, | 631 Handle<Context> context, |
| 629 v8::Extension* extension, | 632 v8::Extension* extension, |
| 630 ScriptDataImpl* pre_data, | 633 ScriptDataImpl* pre_data, |
| 631 Handle<Object> script_data, | 634 Handle<Object> script_data, |
| 632 NativesFlag is_natives_code); | 635 NativesFlag is_natives_code); |
| 633 | 636 |
| 634 // Create a shared function info object (the code may be lazily compiled). | 637 // Create a shared function info object (the code may be lazily compiled). |
| 635 static Handle<SharedFunctionInfo> BuildFunctionInfo(FunctionLiteral* node, | 638 static Handle<SharedFunctionInfo> BuildFunctionInfo( |
| 636 Handle<Script> script); | 639 FunctionLiteral* node, |
| 640 Handle<Script> script, | |
| 641 bool process_feedback = true); | |
|
Benedikt Meurer
2014/02/04 08:53:50
This bool parameter is really confusing. If we rea
mvstanton
2014/02/04 13:03:27
Took some effort but I finally figured out another
| |
| 637 | 642 |
| 638 enum ConcurrencyMode { NOT_CONCURRENT, CONCURRENT }; | 643 enum ConcurrencyMode { NOT_CONCURRENT, CONCURRENT }; |
| 639 | 644 |
| 640 // Generate and return optimized code or start a concurrent optimization job. | 645 // Generate and return optimized code or start a concurrent optimization job. |
| 641 // In the latter case, return the InOptimizationQueue builtin. On failure, | 646 // In the latter case, return the InOptimizationQueue builtin. On failure, |
| 642 // return the empty handle. | 647 // return the empty handle. |
| 643 static Handle<Code> GetOptimizedCode( | 648 static Handle<Code> GetOptimizedCode( |
| 644 Handle<JSFunction> function, | 649 Handle<JSFunction> function, |
| 645 Handle<Code> current_code, | 650 Handle<Code> current_code, |
| 646 ConcurrencyMode mode, | 651 ConcurrencyMode mode, |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 676 unsigned info_zone_start_allocation_size_; | 681 unsigned info_zone_start_allocation_size_; |
| 677 ElapsedTimer timer_; | 682 ElapsedTimer timer_; |
| 678 | 683 |
| 679 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 684 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
| 680 }; | 685 }; |
| 681 | 686 |
| 682 | 687 |
| 683 } } // namespace v8::internal | 688 } } // namespace v8::internal |
| 684 | 689 |
| 685 #endif // V8_COMPILER_H_ | 690 #endif // V8_COMPILER_H_ |
| OLD | NEW |