| 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 2263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2274 return FIELD_ADDR(this, kHeaderSize); | 2274 return FIELD_ADDR(this, kHeaderSize); |
| 2275 } | 2275 } |
| 2276 | 2276 |
| 2277 | 2277 |
| 2278 int Code::body_size() { | 2278 int Code::body_size() { |
| 2279 return RoundUp(instruction_size() + relocation_size(), kObjectAlignment); | 2279 return RoundUp(instruction_size() + relocation_size(), kObjectAlignment); |
| 2280 } | 2280 } |
| 2281 | 2281 |
| 2282 | 2282 |
| 2283 byte* Code::relocation_start() { | 2283 byte* Code::relocation_start() { |
| 2284 return FIELD_ADDR(this, CodeSize() - sinfo_size() - relocation_size()); | 2284 return FIELD_ADDR(this, kHeaderSize + instruction_size()); |
| 2285 } | 2285 } |
| 2286 | 2286 |
| 2287 | 2287 |
| 2288 byte* Code::entry() { | 2288 byte* Code::entry() { |
| 2289 return instruction_start(); | 2289 return instruction_start(); |
| 2290 } | 2290 } |
| 2291 | 2291 |
| 2292 | 2292 |
| 2293 bool Code::contains(byte* pc) { | 2293 bool Code::contains(byte* pc) { |
| 2294 return (instruction_start() <= pc) && | 2294 return (instruction_start() <= pc) && |
| 2295 (pc < instruction_start() + instruction_size()); | 2295 (pc < instruction_start() + instruction_size()); |
| 2296 } | 2296 } |
| 2297 | 2297 |
| 2298 | 2298 |
| 2299 byte* Code::sinfo_start() { | 2299 byte* Code::sinfo_start() { |
| 2300 return FIELD_ADDR(this, CodeSize() - sinfo_size()); | 2300 return FIELD_ADDR(this, kHeaderSize + body_size()); |
| 2301 } | 2301 } |
| 2302 | 2302 |
| 2303 | 2303 |
| 2304 ACCESSORS(JSArray, length, Object, kLengthOffset) | 2304 ACCESSORS(JSArray, length, Object, kLengthOffset) |
| 2305 | 2305 |
| 2306 | 2306 |
| 2307 ACCESSORS(JSRegExp, data, Object, kDataOffset) | 2307 ACCESSORS(JSRegExp, data, Object, kDataOffset) |
| 2308 | 2308 |
| 2309 | 2309 |
| 2310 JSRegExp::Type JSRegExp::TypeTag() { | 2310 JSRegExp::Type JSRegExp::TypeTag() { |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2552 #undef WRITE_INT_FIELD | 2552 #undef WRITE_INT_FIELD |
| 2553 #undef READ_SHORT_FIELD | 2553 #undef READ_SHORT_FIELD |
| 2554 #undef WRITE_SHORT_FIELD | 2554 #undef WRITE_SHORT_FIELD |
| 2555 #undef READ_BYTE_FIELD | 2555 #undef READ_BYTE_FIELD |
| 2556 #undef WRITE_BYTE_FIELD | 2556 #undef WRITE_BYTE_FIELD |
| 2557 | 2557 |
| 2558 | 2558 |
| 2559 } } // namespace v8::internal | 2559 } } // namespace v8::internal |
| 2560 | 2560 |
| 2561 #endif // V8_OBJECTS_INL_H_ | 2561 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |