| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2603 } | 2603 } |
| 2604 | 2604 |
| 2605 | 2605 |
| 2606 Code::Flags Code::ComputeFlags(Kind kind, | 2606 Code::Flags Code::ComputeFlags(Kind kind, |
| 2607 InLoopFlag in_loop, | 2607 InLoopFlag in_loop, |
| 2608 InlineCacheState ic_state, | 2608 InlineCacheState ic_state, |
| 2609 ExtraICState extra_ic_state, | 2609 ExtraICState extra_ic_state, |
| 2610 PropertyType type, | 2610 PropertyType type, |
| 2611 int argc, | 2611 int argc, |
| 2612 InlineCacheHolderFlag holder) { | 2612 InlineCacheHolderFlag holder) { |
| 2613 // Extra IC state is only allowed for monomorphic call IC stubs. | 2613 // Extra IC state is only allowed for monomorphic call IC stubs |
| 2614 // or for store IC stubs. |
| 2614 ASSERT(extra_ic_state == kNoExtraICState || | 2615 ASSERT(extra_ic_state == kNoExtraICState || |
| 2615 (kind == CALL_IC && (ic_state == MONOMORPHIC || | 2616 (kind == CALL_IC && (ic_state == MONOMORPHIC || |
| 2616 ic_state == MONOMORPHIC_PROTOTYPE_FAILURE))); | 2617 ic_state == MONOMORPHIC_PROTOTYPE_FAILURE)) || |
| 2618 (kind == STORE_IC)); |
| 2617 // Compute the bit mask. | 2619 // Compute the bit mask. |
| 2618 int bits = kind << kFlagsKindShift; | 2620 int bits = kind << kFlagsKindShift; |
| 2619 if (in_loop) bits |= kFlagsICInLoopMask; | 2621 if (in_loop) bits |= kFlagsICInLoopMask; |
| 2620 bits |= ic_state << kFlagsICStateShift; | 2622 bits |= ic_state << kFlagsICStateShift; |
| 2621 bits |= type << kFlagsTypeShift; | 2623 bits |= type << kFlagsTypeShift; |
| 2622 bits |= extra_ic_state << kFlagsExtraICStateShift; | 2624 bits |= extra_ic_state << kFlagsExtraICStateShift; |
| 2623 bits |= argc << kFlagsArgumentsCountShift; | 2625 bits |= argc << kFlagsArgumentsCountShift; |
| 2624 if (holder == PROTOTYPE_MAP) bits |= kFlagsCacheInPrototypeMapMask; | 2626 if (holder == PROTOTYPE_MAP) bits |= kFlagsCacheInPrototypeMapMask; |
| 2625 // Cast to flags and validate result before returning it. | 2627 // Cast to flags and validate result before returning it. |
| 2626 Flags result = static_cast<Flags>(bits); | 2628 Flags result = static_cast<Flags>(bits); |
| (...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3929 #undef WRITE_INT_FIELD | 3931 #undef WRITE_INT_FIELD |
| 3930 #undef READ_SHORT_FIELD | 3932 #undef READ_SHORT_FIELD |
| 3931 #undef WRITE_SHORT_FIELD | 3933 #undef WRITE_SHORT_FIELD |
| 3932 #undef READ_BYTE_FIELD | 3934 #undef READ_BYTE_FIELD |
| 3933 #undef WRITE_BYTE_FIELD | 3935 #undef WRITE_BYTE_FIELD |
| 3934 | 3936 |
| 3935 | 3937 |
| 3936 } } // namespace v8::internal | 3938 } } // namespace v8::internal |
| 3937 | 3939 |
| 3938 #endif // V8_OBJECTS_INL_H_ | 3940 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |