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 3868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3879 | 3879 |
3880 int Code::major_key() { | 3880 int Code::major_key() { |
3881 ASSERT(kind() == STUB || | 3881 ASSERT(kind() == STUB || |
3882 kind() == HANDLER || | 3882 kind() == HANDLER || |
3883 kind() == BINARY_OP_IC || | 3883 kind() == BINARY_OP_IC || |
3884 kind() == COMPARE_IC || | 3884 kind() == COMPARE_IC || |
3885 kind() == COMPARE_NIL_IC || | 3885 kind() == COMPARE_NIL_IC || |
3886 kind() == STORE_IC || | 3886 kind() == STORE_IC || |
3887 kind() == LOAD_IC || | 3887 kind() == LOAD_IC || |
3888 kind() == KEYED_LOAD_IC || | 3888 kind() == KEYED_LOAD_IC || |
| 3889 kind() == KEYED_CALL_IC || |
3889 kind() == TO_BOOLEAN_IC); | 3890 kind() == TO_BOOLEAN_IC); |
3890 return StubMajorKeyField::decode( | 3891 return StubMajorKeyField::decode( |
3891 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); | 3892 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); |
3892 } | 3893 } |
3893 | 3894 |
3894 | 3895 |
3895 void Code::set_major_key(int major) { | 3896 void Code::set_major_key(int major) { |
3896 ASSERT(kind() == STUB || | 3897 ASSERT(kind() == STUB || |
3897 kind() == HANDLER || | 3898 kind() == HANDLER || |
3898 kind() == BINARY_OP_IC || | 3899 kind() == BINARY_OP_IC || |
3899 kind() == COMPARE_IC || | 3900 kind() == COMPARE_IC || |
3900 kind() == COMPARE_NIL_IC || | 3901 kind() == COMPARE_NIL_IC || |
3901 kind() == LOAD_IC || | 3902 kind() == LOAD_IC || |
3902 kind() == KEYED_LOAD_IC || | 3903 kind() == KEYED_LOAD_IC || |
3903 kind() == STORE_IC || | 3904 kind() == STORE_IC || |
3904 kind() == KEYED_STORE_IC || | 3905 kind() == KEYED_STORE_IC || |
| 3906 kind() == KEYED_CALL_IC || |
3905 kind() == TO_BOOLEAN_IC); | 3907 kind() == TO_BOOLEAN_IC); |
3906 ASSERT(0 <= major && major < 256); | 3908 ASSERT(0 <= major && major < 256); |
3907 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); | 3909 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); |
3908 int updated = StubMajorKeyField::update(previous, major); | 3910 int updated = StubMajorKeyField::update(previous, major); |
3909 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); | 3911 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); |
3910 } | 3912 } |
3911 | 3913 |
3912 | 3914 |
3913 bool Code::is_pregenerated() { | 3915 bool Code::is_pregenerated() { |
3914 return (kind() == STUB && IsPregeneratedField::decode(flags())); | 3916 return (kind() == STUB && IsPregeneratedField::decode(flags())); |
(...skipping 2498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6413 #undef WRITE_UINT32_FIELD | 6415 #undef WRITE_UINT32_FIELD |
6414 #undef READ_SHORT_FIELD | 6416 #undef READ_SHORT_FIELD |
6415 #undef WRITE_SHORT_FIELD | 6417 #undef WRITE_SHORT_FIELD |
6416 #undef READ_BYTE_FIELD | 6418 #undef READ_BYTE_FIELD |
6417 #undef WRITE_BYTE_FIELD | 6419 #undef WRITE_BYTE_FIELD |
6418 | 6420 |
6419 | 6421 |
6420 } } // namespace v8::internal | 6422 } } // namespace v8::internal |
6421 | 6423 |
6422 #endif // V8_OBJECTS_INL_H_ | 6424 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |