| 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 // Only flush code for functions. | 559 // Only flush code for functions. |
| 560 if (shared_info->code()->kind() != Code::FUNCTION) { | 560 if (shared_info->code()->kind() != Code::FUNCTION) { |
| 561 return false; | 561 return false; |
| 562 } | 562 } |
| 563 | 563 |
| 564 // Function must be lazy compilable. | 564 // Function must be lazy compilable. |
| 565 if (!shared_info->allows_lazy_compilation()) { | 565 if (!shared_info->allows_lazy_compilation()) { |
| 566 return false; | 566 return false; |
| 567 } | 567 } |
| 568 | 568 |
| 569 // We do not (yet?) flush code for generator functions, because we don't know |
| 570 // if there are still live activations (generator objects) on the heap. |
| 571 if (shared_info->is_generator()) { |
| 572 return false; |
| 573 } |
| 574 |
| 569 // If this is a full script wrapped in a function we do no flush the code. | 575 // If this is a full script wrapped in a function we do no flush the code. |
| 570 if (shared_info->is_toplevel()) { | 576 if (shared_info->is_toplevel()) { |
| 571 return false; | 577 return false; |
| 572 } | 578 } |
| 573 | 579 |
| 574 // If this is a native function we do not flush the code because %SetCode | 580 // If this is a native function we do not flush the code because %SetCode |
| 575 // breaks the one-to-one relation between SharedFunctionInfo and Code. | 581 // breaks the one-to-one relation between SharedFunctionInfo and Code. |
| 576 if (shared_info->native()) { | 582 if (shared_info->native()) { |
| 577 return false; | 583 return false; |
| 578 } | 584 } |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 RelocIterator it(this, mode_mask); | 731 RelocIterator it(this, mode_mask); |
| 726 for (; !it.done(); it.next()) { | 732 for (; !it.done(); it.next()) { |
| 727 it.rinfo()->template Visit<StaticVisitor>(heap); | 733 it.rinfo()->template Visit<StaticVisitor>(heap); |
| 728 } | 734 } |
| 729 } | 735 } |
| 730 | 736 |
| 731 | 737 |
| 732 } } // namespace v8::internal | 738 } } // namespace v8::internal |
| 733 | 739 |
| 734 #endif // V8_OBJECTS_VISITING_INL_H_ | 740 #endif // V8_OBJECTS_VISITING_INL_H_ |
| OLD | NEW |