OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2137 } | 2137 } |
2138 | 2138 |
2139 | 2139 |
2140 int Code::arguments_count() { | 2140 int Code::arguments_count() { |
2141 ASSERT(is_call_stub() || kind() == STUB); | 2141 ASSERT(is_call_stub() || kind() == STUB); |
2142 return ExtractArgumentsCountFromFlags(flags()); | 2142 return ExtractArgumentsCountFromFlags(flags()); |
2143 } | 2143 } |
2144 | 2144 |
2145 | 2145 |
2146 CodeStub::Major Code::major_key() { | 2146 CodeStub::Major Code::major_key() { |
2147 ASSERT(kind() == STUB); | 2147 ASSERT(kind() == STUB || kind() == BINARY_OP_IC); |
2148 return static_cast<CodeStub::Major>(READ_BYTE_FIELD(this, | 2148 return static_cast<CodeStub::Major>(READ_BYTE_FIELD(this, |
2149 kStubMajorKeyOffset)); | 2149 kStubMajorKeyOffset)); |
2150 } | 2150 } |
2151 | 2151 |
2152 | 2152 |
2153 void Code::set_major_key(CodeStub::Major major) { | 2153 void Code::set_major_key(CodeStub::Major major) { |
2154 ASSERT(kind() == STUB); | 2154 ASSERT(kind() == STUB || kind() == BINARY_OP_IC); |
2155 ASSERT(0 <= major && major < 256); | 2155 ASSERT(0 <= major && major < 256); |
2156 WRITE_BYTE_FIELD(this, kStubMajorKeyOffset, major); | 2156 WRITE_BYTE_FIELD(this, kStubMajorKeyOffset, major); |
2157 } | 2157 } |
2158 | 2158 |
2159 | 2159 |
2160 bool Code::is_inline_cache_stub() { | 2160 bool Code::is_inline_cache_stub() { |
2161 Kind kind = this->kind(); | 2161 Kind kind = this->kind(); |
2162 return kind >= FIRST_IC_KIND && kind <= LAST_IC_KIND; | 2162 return kind >= FIRST_IC_KIND && kind <= LAST_IC_KIND; |
2163 } | 2163 } |
2164 | 2164 |
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3048 #undef WRITE_INT_FIELD | 3048 #undef WRITE_INT_FIELD |
3049 #undef READ_SHORT_FIELD | 3049 #undef READ_SHORT_FIELD |
3050 #undef WRITE_SHORT_FIELD | 3050 #undef WRITE_SHORT_FIELD |
3051 #undef READ_BYTE_FIELD | 3051 #undef READ_BYTE_FIELD |
3052 #undef WRITE_BYTE_FIELD | 3052 #undef WRITE_BYTE_FIELD |
3053 | 3053 |
3054 | 3054 |
3055 } } // namespace v8::internal | 3055 } } // namespace v8::internal |
3056 | 3056 |
3057 #endif // V8_OBJECTS_INL_H_ | 3057 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |