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 2780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2791 } | 2791 } |
2792 | 2792 |
2793 | 2793 |
2794 Code::Flags Code::ComputeFlags(Kind kind, | 2794 Code::Flags Code::ComputeFlags(Kind kind, |
2795 InLoopFlag in_loop, | 2795 InLoopFlag in_loop, |
2796 InlineCacheState ic_state, | 2796 InlineCacheState ic_state, |
2797 ExtraICState extra_ic_state, | 2797 ExtraICState extra_ic_state, |
2798 PropertyType type, | 2798 PropertyType type, |
2799 int argc, | 2799 int argc, |
2800 InlineCacheHolderFlag holder) { | 2800 InlineCacheHolderFlag holder) { |
2801 // Extra IC state is only allowed for monomorphic call IC stubs | 2801 // Extra IC state is only allowed for call IC stubs or for store IC |
2802 // or for store IC stubs. | 2802 // stubs. |
2803 ASSERT(extra_ic_state == kNoExtraICState || | 2803 ASSERT(extra_ic_state == kNoExtraICState || |
2804 (kind == CALL_IC && (ic_state == MONOMORPHIC || | 2804 (kind == CALL_IC) || |
2805 ic_state == MONOMORPHIC_PROTOTYPE_FAILURE)) || | |
2806 (kind == STORE_IC) || | 2805 (kind == STORE_IC) || |
2807 (kind == KEYED_STORE_IC)); | 2806 (kind == KEYED_STORE_IC)); |
2808 // Compute the bit mask. | 2807 // Compute the bit mask. |
2809 int bits = kind << kFlagsKindShift; | 2808 int bits = kind << kFlagsKindShift; |
2810 if (in_loop) bits |= kFlagsICInLoopMask; | 2809 if (in_loop) bits |= kFlagsICInLoopMask; |
2811 bits |= ic_state << kFlagsICStateShift; | 2810 bits |= ic_state << kFlagsICStateShift; |
2812 bits |= type << kFlagsTypeShift; | 2811 bits |= type << kFlagsTypeShift; |
2813 bits |= extra_ic_state << kFlagsExtraICStateShift; | 2812 bits |= extra_ic_state << kFlagsExtraICStateShift; |
2814 bits |= argc << kFlagsArgumentsCountShift; | 2813 bits |= argc << kFlagsArgumentsCountShift; |
2815 if (holder == PROTOTYPE_MAP) bits |= kFlagsCacheInPrototypeMapMask; | 2814 if (holder == PROTOTYPE_MAP) bits |= kFlagsCacheInPrototypeMapMask; |
(...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4315 #undef WRITE_INT_FIELD | 4314 #undef WRITE_INT_FIELD |
4316 #undef READ_SHORT_FIELD | 4315 #undef READ_SHORT_FIELD |
4317 #undef WRITE_SHORT_FIELD | 4316 #undef WRITE_SHORT_FIELD |
4318 #undef READ_BYTE_FIELD | 4317 #undef READ_BYTE_FIELD |
4319 #undef WRITE_BYTE_FIELD | 4318 #undef WRITE_BYTE_FIELD |
4320 | 4319 |
4321 | 4320 |
4322 } } // namespace v8::internal | 4321 } } // namespace v8::internal |
4323 | 4322 |
4324 #endif // V8_OBJECTS_INL_H_ | 4323 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |