| 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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 SharedFunctionInfo* shared_info = function->shared(); | 638 SharedFunctionInfo* shared_info = function->shared(); |
| 639 | 639 |
| 640 // Code is either on stack, in compilation cache or referenced | 640 // Code is either on stack, in compilation cache or referenced |
| 641 // by optimized version of function. | 641 // by optimized version of function. |
| 642 MarkBit code_mark = Marking::MarkBitFrom(function->code()); | 642 MarkBit code_mark = Marking::MarkBitFrom(function->code()); |
| 643 if (code_mark.Get()) { | 643 if (code_mark.Get()) { |
| 644 return false; | 644 return false; |
| 645 } | 645 } |
| 646 | 646 |
| 647 // The function must have a valid context and not be a builtin. | 647 // The function must have a valid context and not be a builtin. |
| 648 if (!IsValidNonBuiltinContext(function->unchecked_context())) { | 648 if (!IsValidNonBuiltinContext(function->context())) { |
| 649 return false; | 649 return false; |
| 650 } | 650 } |
| 651 | 651 |
| 652 // We do not (yet) flush code for optimized functions. | 652 // We do not (yet) flush code for optimized functions. |
| 653 if (function->code() != shared_info->code()) { | 653 if (function->code() != shared_info->code()) { |
| 654 return false; | 654 return false; |
| 655 } | 655 } |
| 656 | 656 |
| 657 // Check age of optimized code. | 657 // Check age of optimized code. |
| 658 if (FLAG_age_code && !function->code()->IsOld()) { | 658 if (FLAG_age_code && !function->code()->IsOld()) { |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 RelocIterator it(this, mode_mask); | 852 RelocIterator it(this, mode_mask); |
| 853 for (; !it.done(); it.next()) { | 853 for (; !it.done(); it.next()) { |
| 854 it.rinfo()->template Visit<StaticVisitor>(heap); | 854 it.rinfo()->template Visit<StaticVisitor>(heap); |
| 855 } | 855 } |
| 856 } | 856 } |
| 857 | 857 |
| 858 | 858 |
| 859 } } // namespace v8::internal | 859 } } // namespace v8::internal |
| 860 | 860 |
| 861 #endif // V8_OBJECTS_VISITING_INL_H_ | 861 #endif // V8_OBJECTS_VISITING_INL_H_ |
| OLD | NEW |