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 2520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2531 ASSERT(HeapObject::cast(obj)->Size() == JSValue::kSize); | 2531 ASSERT(HeapObject::cast(obj)->Size() == JSValue::kSize); |
2532 return reinterpret_cast<JSValue*>(obj); | 2532 return reinterpret_cast<JSValue*>(obj); |
2533 } | 2533 } |
2534 | 2534 |
2535 | 2535 |
2536 INT_ACCESSORS(Code, instruction_size, kInstructionSizeOffset) | 2536 INT_ACCESSORS(Code, instruction_size, kInstructionSizeOffset) |
2537 INT_ACCESSORS(Code, relocation_size, kRelocationSizeOffset) | 2537 INT_ACCESSORS(Code, relocation_size, kRelocationSizeOffset) |
2538 INT_ACCESSORS(Code, sinfo_size, kSInfoSizeOffset) | 2538 INT_ACCESSORS(Code, sinfo_size, kSInfoSizeOffset) |
2539 | 2539 |
2540 | 2540 |
2541 Code::ICTargetState Code::ic_flag() { | |
2542 return static_cast<ICTargetState>(READ_BYTE_FIELD(this, kICFlagOffset)); | |
2543 } | |
2544 | |
2545 | |
2546 void Code::set_ic_flag(ICTargetState value) { | |
2547 WRITE_BYTE_FIELD(this, kICFlagOffset, value); | |
2548 } | |
2549 | |
2550 | |
2551 byte* Code::instruction_start() { | 2541 byte* Code::instruction_start() { |
2552 return FIELD_ADDR(this, kHeaderSize); | 2542 return FIELD_ADDR(this, kHeaderSize); |
2553 } | 2543 } |
2554 | 2544 |
2555 | 2545 |
2556 int Code::body_size() { | 2546 int Code::body_size() { |
2557 return RoundUp(instruction_size() + relocation_size(), kObjectAlignment); | 2547 return RoundUp(instruction_size() + relocation_size(), kObjectAlignment); |
2558 } | 2548 } |
2559 | 2549 |
2560 | 2550 |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2888 #undef WRITE_INT_FIELD | 2878 #undef WRITE_INT_FIELD |
2889 #undef READ_SHORT_FIELD | 2879 #undef READ_SHORT_FIELD |
2890 #undef WRITE_SHORT_FIELD | 2880 #undef WRITE_SHORT_FIELD |
2891 #undef READ_BYTE_FIELD | 2881 #undef READ_BYTE_FIELD |
2892 #undef WRITE_BYTE_FIELD | 2882 #undef WRITE_BYTE_FIELD |
2893 | 2883 |
2894 | 2884 |
2895 } } // namespace v8::internal | 2885 } } // namespace v8::internal |
2896 | 2886 |
2897 #endif // V8_OBJECTS_INL_H_ | 2887 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |