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 3886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3897 | 3897 |
3898 int Code::major_key() { | 3898 int Code::major_key() { |
3899 ASSERT(kind() == STUB || | 3899 ASSERT(kind() == STUB || |
3900 kind() == HANDLER || | 3900 kind() == HANDLER || |
3901 kind() == BINARY_OP_IC || | 3901 kind() == BINARY_OP_IC || |
3902 kind() == COMPARE_IC || | 3902 kind() == COMPARE_IC || |
3903 kind() == COMPARE_NIL_IC || | 3903 kind() == COMPARE_NIL_IC || |
3904 kind() == STORE_IC || | 3904 kind() == STORE_IC || |
3905 kind() == LOAD_IC || | 3905 kind() == LOAD_IC || |
3906 kind() == KEYED_LOAD_IC || | 3906 kind() == KEYED_LOAD_IC || |
3907 kind() == KEYED_CALL_IC || | |
3908 kind() == TO_BOOLEAN_IC); | 3907 kind() == TO_BOOLEAN_IC); |
3909 return StubMajorKeyField::decode( | 3908 return StubMajorKeyField::decode( |
3910 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); | 3909 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); |
3911 } | 3910 } |
3912 | 3911 |
3913 | 3912 |
3914 void Code::set_major_key(int major) { | 3913 void Code::set_major_key(int major) { |
3915 ASSERT(kind() == STUB || | 3914 ASSERT(kind() == STUB || |
3916 kind() == HANDLER || | 3915 kind() == HANDLER || |
3917 kind() == BINARY_OP_IC || | 3916 kind() == BINARY_OP_IC || |
3918 kind() == COMPARE_IC || | 3917 kind() == COMPARE_IC || |
3919 kind() == COMPARE_NIL_IC || | 3918 kind() == COMPARE_NIL_IC || |
3920 kind() == LOAD_IC || | 3919 kind() == LOAD_IC || |
3921 kind() == KEYED_LOAD_IC || | 3920 kind() == KEYED_LOAD_IC || |
3922 kind() == STORE_IC || | 3921 kind() == STORE_IC || |
3923 kind() == KEYED_STORE_IC || | 3922 kind() == KEYED_STORE_IC || |
3924 kind() == KEYED_CALL_IC || | |
3925 kind() == TO_BOOLEAN_IC); | 3923 kind() == TO_BOOLEAN_IC); |
3926 ASSERT(0 <= major && major < 256); | 3924 ASSERT(0 <= major && major < 256); |
3927 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); | 3925 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); |
3928 int updated = StubMajorKeyField::update(previous, major); | 3926 int updated = StubMajorKeyField::update(previous, major); |
3929 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); | 3927 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); |
3930 } | 3928 } |
3931 | 3929 |
3932 | 3930 |
3933 bool Code::is_pregenerated() { | 3931 bool Code::is_pregenerated() { |
3934 return (kind() == STUB && IsPregeneratedField::decode(flags())); | 3932 return (kind() == STUB && IsPregeneratedField::decode(flags())); |
(...skipping 2498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6433 #undef WRITE_UINT32_FIELD | 6431 #undef WRITE_UINT32_FIELD |
6434 #undef READ_SHORT_FIELD | 6432 #undef READ_SHORT_FIELD |
6435 #undef WRITE_SHORT_FIELD | 6433 #undef WRITE_SHORT_FIELD |
6436 #undef READ_BYTE_FIELD | 6434 #undef READ_BYTE_FIELD |
6437 #undef WRITE_BYTE_FIELD | 6435 #undef WRITE_BYTE_FIELD |
6438 | 6436 |
6439 | 6437 |
6440 } } // namespace v8::internal | 6438 } } // namespace v8::internal |
6441 | 6439 |
6442 #endif // V8_OBJECTS_INL_H_ | 6440 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |