| 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 3477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3488 return kind >= FIRST_IC_KIND && kind <= LAST_IC_KIND; | 3488 return kind >= FIRST_IC_KIND && kind <= LAST_IC_KIND; |
| 3489 } | 3489 } |
| 3490 | 3490 |
| 3491 | 3491 |
| 3492 Code::Flags Code::ComputeFlags(Kind kind, | 3492 Code::Flags Code::ComputeFlags(Kind kind, |
| 3493 InlineCacheState ic_state, | 3493 InlineCacheState ic_state, |
| 3494 ExtraICState extra_ic_state, | 3494 ExtraICState extra_ic_state, |
| 3495 StubType type, | 3495 StubType type, |
| 3496 int argc, | 3496 int argc, |
| 3497 InlineCacheHolderFlag holder) { | 3497 InlineCacheHolderFlag holder) { |
| 3498 // Extra IC state is only allowed for call IC stubs or for store IC | 3498 // Extra IC state is only allowed for call IC stubs, store IC stubs or |
| 3499 // stubs. | 3499 // load ICs with type CALLBACKS. |
| 3500 ASSERT(extra_ic_state == kNoExtraICState || | 3500 ASSERT(extra_ic_state == kNoExtraICState || |
| 3501 kind == CALL_IC || | 3501 kind == CALL_IC || |
| 3502 kind == STORE_IC || | 3502 kind == STORE_IC || |
| 3503 kind == KEYED_STORE_IC); | 3503 kind == KEYED_STORE_IC || |
| 3504 (kind == LOAD_IC && type == CALLBACKS)); |
| 3504 // Compute the bit mask. | 3505 // Compute the bit mask. |
| 3505 int bits = KindField::encode(kind) | 3506 int bits = KindField::encode(kind) |
| 3506 | ICStateField::encode(ic_state) | 3507 | ICStateField::encode(ic_state) |
| 3507 | TypeField::encode(type) | 3508 | TypeField::encode(type) |
| 3508 | ExtraICStateField::encode(extra_ic_state) | 3509 | ExtraICStateField::encode(extra_ic_state) |
| 3509 | (argc << kArgumentsCountShift) | 3510 | (argc << kArgumentsCountShift) |
| 3510 | CacheHolderField::encode(holder); | 3511 | CacheHolderField::encode(holder); |
| 3511 return static_cast<Flags>(bits); | 3512 return static_cast<Flags>(bits); |
| 3512 } | 3513 } |
| 3513 | 3514 |
| (...skipping 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5541 #undef WRITE_UINT32_FIELD | 5542 #undef WRITE_UINT32_FIELD |
| 5542 #undef READ_SHORT_FIELD | 5543 #undef READ_SHORT_FIELD |
| 5543 #undef WRITE_SHORT_FIELD | 5544 #undef WRITE_SHORT_FIELD |
| 5544 #undef READ_BYTE_FIELD | 5545 #undef READ_BYTE_FIELD |
| 5545 #undef WRITE_BYTE_FIELD | 5546 #undef WRITE_BYTE_FIELD |
| 5546 | 5547 |
| 5547 | 5548 |
| 5548 } } // namespace v8::internal | 5549 } } // namespace v8::internal |
| 5549 | 5550 |
| 5550 #endif // V8_OBJECTS_INL_H_ | 5551 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |