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 5221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5232 kind() == BINARY_OP_IC || | 5232 kind() == BINARY_OP_IC || |
5233 kind() == STUB || | 5233 kind() == STUB || |
5234 kind() == LOAD_IC || | 5234 kind() == LOAD_IC || |
5235 kind() == KEYED_LOAD_IC || | 5235 kind() == KEYED_LOAD_IC || |
5236 kind() == STORE_IC || | 5236 kind() == STORE_IC || |
5237 kind() == KEYED_STORE_IC); | 5237 kind() == KEYED_STORE_IC); |
5238 WRITE_FIELD(this, kTypeFeedbackInfoOffset, Smi::FromInt(value)); | 5238 WRITE_FIELD(this, kTypeFeedbackInfoOffset, Smi::FromInt(value)); |
5239 } | 5239 } |
5240 | 5240 |
5241 | 5241 |
5242 void Code::set_deoptimizing_functions(Object* value) { | 5242 Object* Code::code_to_deoptimize_link() { |
5243 // Optimized code should not have type feedback. | |
5244 ASSERT(kind() == OPTIMIZED_FUNCTION); | |
5245 return Object::cast(READ_FIELD(this, kTypeFeedbackInfoOffset)); | |
Michael Starzinger
2013/07/24 09:24:57
The "Object::cast" is a NOP as READ_FIELD already
| |
5246 } | |
5247 | |
5248 | |
5249 void Code::set_code_to_deoptimize_link(Object* value) { | |
5243 ASSERT(kind() == OPTIMIZED_FUNCTION); | 5250 ASSERT(kind() == OPTIMIZED_FUNCTION); |
5244 WRITE_FIELD(this, kTypeFeedbackInfoOffset, value); | 5251 WRITE_FIELD(this, kTypeFeedbackInfoOffset, value); |
5245 } | 5252 } |
5246 | 5253 |
5247 | 5254 |
5248 Object* Code::deoptimizing_functions() { | 5255 Object** Code::code_to_deoptimize_link_slot() { |
5249 ASSERT(kind() == OPTIMIZED_FUNCTION); | 5256 ASSERT(kind() == OPTIMIZED_FUNCTION); |
5250 return Object::cast(READ_FIELD(this, kTypeFeedbackInfoOffset)); | 5257 return HeapObject::RawField(this, kTypeFeedbackInfoOffset); |
5251 } | 5258 } |
5252 | 5259 |
5253 | 5260 |
5254 ACCESSORS(Code, gc_metadata, Object, kGCMetadataOffset) | 5261 ACCESSORS(Code, gc_metadata, Object, kGCMetadataOffset) |
5255 INT_ACCESSORS(Code, ic_age, kICAgeOffset) | 5262 INT_ACCESSORS(Code, ic_age, kICAgeOffset) |
5256 | 5263 |
5257 | 5264 |
5258 byte* Code::instruction_start() { | 5265 byte* Code::instruction_start() { |
5259 return FIELD_ADDR(this, kHeaderSize); | 5266 return FIELD_ADDR(this, kHeaderSize); |
5260 } | 5267 } |
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6200 #undef WRITE_UINT32_FIELD | 6207 #undef WRITE_UINT32_FIELD |
6201 #undef READ_SHORT_FIELD | 6208 #undef READ_SHORT_FIELD |
6202 #undef WRITE_SHORT_FIELD | 6209 #undef WRITE_SHORT_FIELD |
6203 #undef READ_BYTE_FIELD | 6210 #undef READ_BYTE_FIELD |
6204 #undef WRITE_BYTE_FIELD | 6211 #undef WRITE_BYTE_FIELD |
6205 | 6212 |
6206 | 6213 |
6207 } } // namespace v8::internal | 6214 } } // namespace v8::internal |
6208 | 6215 |
6209 #endif // V8_OBJECTS_INL_H_ | 6216 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |