| 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 3504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3515 | 3515 |
| 3516 | 3516 |
| 3517 void Code::set_major_key(int major) { | 3517 void Code::set_major_key(int major) { |
| 3518 ASSERT(kind() == STUB || | 3518 ASSERT(kind() == STUB || |
| 3519 kind() == COMPILED_STUB || | 3519 kind() == COMPILED_STUB || |
| 3520 kind() == UNARY_OP_IC || | 3520 kind() == UNARY_OP_IC || |
| 3521 kind() == BINARY_OP_IC || | 3521 kind() == BINARY_OP_IC || |
| 3522 kind() == COMPARE_IC || | 3522 kind() == COMPARE_IC || |
| 3523 kind() == LOAD_IC || | 3523 kind() == LOAD_IC || |
| 3524 kind() == KEYED_LOAD_IC || | 3524 kind() == KEYED_LOAD_IC || |
| 3525 kind() == STORE_IC || |
| 3526 kind() == KEYED_STORE_IC || |
| 3525 kind() == TO_BOOLEAN_IC); | 3527 kind() == TO_BOOLEAN_IC); |
| 3526 ASSERT(0 <= major && major < 256); | 3528 ASSERT(0 <= major && major < 256); |
| 3527 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); | 3529 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); |
| 3528 int updated = StubMajorKeyField::update(previous, major); | 3530 int updated = StubMajorKeyField::update(previous, major); |
| 3529 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); | 3531 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); |
| 3530 } | 3532 } |
| 3531 | 3533 |
| 3532 | 3534 |
| 3533 bool Code::is_pregenerated() { | 3535 bool Code::is_pregenerated() { |
| 3534 return kind() == STUB && IsPregeneratedField::decode(flags()); | 3536 return kind() == STUB && IsPregeneratedField::decode(flags()); |
| (...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4920 ASSERT(kind() == COMPARE_IC || kind() == BINARY_OP_IC || kind() == LOAD_IC); | 4922 ASSERT(kind() == COMPARE_IC || kind() == BINARY_OP_IC || kind() == LOAD_IC); |
| 4921 Object* value = READ_FIELD(this, kTypeFeedbackInfoOffset); | 4923 Object* value = READ_FIELD(this, kTypeFeedbackInfoOffset); |
| 4922 return Smi::cast(value)->value(); | 4924 return Smi::cast(value)->value(); |
| 4923 } | 4925 } |
| 4924 | 4926 |
| 4925 | 4927 |
| 4926 void Code::set_stub_info(int value) { | 4928 void Code::set_stub_info(int value) { |
| 4927 ASSERT(kind() == COMPARE_IC || | 4929 ASSERT(kind() == COMPARE_IC || |
| 4928 kind() == BINARY_OP_IC || | 4930 kind() == BINARY_OP_IC || |
| 4929 kind() == LOAD_IC || | 4931 kind() == LOAD_IC || |
| 4930 kind() == KEYED_LOAD_IC); | 4932 kind() == KEYED_LOAD_IC || |
| 4933 kind() == STORE_IC || |
| 4934 kind() == KEYED_STORE_IC); |
| 4931 WRITE_FIELD(this, kTypeFeedbackInfoOffset, Smi::FromInt(value)); | 4935 WRITE_FIELD(this, kTypeFeedbackInfoOffset, Smi::FromInt(value)); |
| 4932 } | 4936 } |
| 4933 | 4937 |
| 4934 | 4938 |
| 4935 void Code::set_deoptimizing_functions(Object* value) { | 4939 void Code::set_deoptimizing_functions(Object* value) { |
| 4936 ASSERT(kind() == OPTIMIZED_FUNCTION); | 4940 ASSERT(kind() == OPTIMIZED_FUNCTION); |
| 4937 WRITE_FIELD(this, kTypeFeedbackInfoOffset, value); | 4941 WRITE_FIELD(this, kTypeFeedbackInfoOffset, value); |
| 4938 } | 4942 } |
| 4939 | 4943 |
| 4940 | 4944 |
| (...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5887 #undef WRITE_UINT32_FIELD | 5891 #undef WRITE_UINT32_FIELD |
| 5888 #undef READ_SHORT_FIELD | 5892 #undef READ_SHORT_FIELD |
| 5889 #undef WRITE_SHORT_FIELD | 5893 #undef WRITE_SHORT_FIELD |
| 5890 #undef READ_BYTE_FIELD | 5894 #undef READ_BYTE_FIELD |
| 5891 #undef WRITE_BYTE_FIELD | 5895 #undef WRITE_BYTE_FIELD |
| 5892 | 5896 |
| 5893 | 5897 |
| 5894 } } // namespace v8::internal | 5898 } } // namespace v8::internal |
| 5895 | 5899 |
| 5896 #endif // V8_OBJECTS_INL_H_ | 5900 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |