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 4760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4771 return function_data()->IsSmi(); | 4771 return function_data()->IsSmi(); |
4772 } | 4772 } |
4773 | 4773 |
4774 | 4774 |
4775 BuiltinFunctionId SharedFunctionInfo::builtin_function_id() { | 4775 BuiltinFunctionId SharedFunctionInfo::builtin_function_id() { |
4776 ASSERT(HasBuiltinFunctionId()); | 4776 ASSERT(HasBuiltinFunctionId()); |
4777 return static_cast<BuiltinFunctionId>(Smi::cast(function_data())->value()); | 4777 return static_cast<BuiltinFunctionId>(Smi::cast(function_data())->value()); |
4778 } | 4778 } |
4779 | 4779 |
4780 | 4780 |
4781 int SharedFunctionInfo::code_age() { | |
4782 return (compiler_hints() >> kCodeAgeShift) & kCodeAgeMask; | |
4783 } | |
4784 | |
4785 | |
4786 void SharedFunctionInfo::set_code_age(int code_age) { | |
4787 int hints = compiler_hints() & ~(kCodeAgeMask << kCodeAgeShift); | |
4788 set_compiler_hints(hints | ((code_age & kCodeAgeMask) << kCodeAgeShift)); | |
4789 } | |
4790 | |
4791 | |
4792 int SharedFunctionInfo::ic_age() { | 4781 int SharedFunctionInfo::ic_age() { |
4793 return ICAgeBits::decode(counters()); | 4782 return ICAgeBits::decode(counters()); |
4794 } | 4783 } |
4795 | 4784 |
4796 | 4785 |
4797 void SharedFunctionInfo::set_ic_age(int ic_age) { | 4786 void SharedFunctionInfo::set_ic_age(int ic_age) { |
4798 set_counters(ICAgeBits::update(counters(), ic_age)); | 4787 set_counters(ICAgeBits::update(counters(), ic_age)); |
4799 } | 4788 } |
4800 | 4789 |
4801 | 4790 |
(...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6181 #undef WRITE_UINT32_FIELD | 6170 #undef WRITE_UINT32_FIELD |
6182 #undef READ_SHORT_FIELD | 6171 #undef READ_SHORT_FIELD |
6183 #undef WRITE_SHORT_FIELD | 6172 #undef WRITE_SHORT_FIELD |
6184 #undef READ_BYTE_FIELD | 6173 #undef READ_BYTE_FIELD |
6185 #undef WRITE_BYTE_FIELD | 6174 #undef WRITE_BYTE_FIELD |
6186 | 6175 |
6187 | 6176 |
6188 } } // namespace v8::internal | 6177 } } // namespace v8::internal |
6189 | 6178 |
6190 #endif // V8_OBJECTS_INL_H_ | 6179 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |