OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3660 return static_cast<BuiltinFunctionId>(Smi::cast(function_data())->value()); | 3660 return static_cast<BuiltinFunctionId>(Smi::cast(function_data())->value()); |
3661 } | 3661 } |
3662 | 3662 |
3663 | 3663 |
3664 int SharedFunctionInfo::code_age() { | 3664 int SharedFunctionInfo::code_age() { |
3665 return (compiler_hints() >> kCodeAgeShift) & kCodeAgeMask; | 3665 return (compiler_hints() >> kCodeAgeShift) & kCodeAgeMask; |
3666 } | 3666 } |
3667 | 3667 |
3668 | 3668 |
3669 void SharedFunctionInfo::set_code_age(int code_age) { | 3669 void SharedFunctionInfo::set_code_age(int code_age) { |
3670 set_compiler_hints(compiler_hints() | | 3670 int hints = compiler_hints() & ~(kCodeAgeMask << kCodeAgeShift); |
3671 ((code_age & kCodeAgeMask) << kCodeAgeShift)); | 3671 set_compiler_hints(hints | ((code_age & kCodeAgeMask) << kCodeAgeShift)); |
3672 } | 3672 } |
3673 | 3673 |
3674 | 3674 |
3675 bool SharedFunctionInfo::has_deoptimization_support() { | 3675 bool SharedFunctionInfo::has_deoptimization_support() { |
3676 Code* code = this->code(); | 3676 Code* code = this->code(); |
3677 return code->kind() == Code::FUNCTION && code->has_deoptimization_support(); | 3677 return code->kind() == Code::FUNCTION && code->has_deoptimization_support(); |
3678 } | 3678 } |
3679 | 3679 |
3680 | 3680 |
3681 bool JSFunction::IsBuiltin() { | 3681 bool JSFunction::IsBuiltin() { |
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4669 #undef WRITE_INT_FIELD | 4669 #undef WRITE_INT_FIELD |
4670 #undef READ_SHORT_FIELD | 4670 #undef READ_SHORT_FIELD |
4671 #undef WRITE_SHORT_FIELD | 4671 #undef WRITE_SHORT_FIELD |
4672 #undef READ_BYTE_FIELD | 4672 #undef READ_BYTE_FIELD |
4673 #undef WRITE_BYTE_FIELD | 4673 #undef WRITE_BYTE_FIELD |
4674 | 4674 |
4675 | 4675 |
4676 } } // namespace v8::internal | 4676 } } // namespace v8::internal |
4677 | 4677 |
4678 #endif // V8_OBJECTS_INL_H_ | 4678 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |