| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 2617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2628 ASSERT_SIZE_TAG_ALIGNED(body_size); | 2628 ASSERT_SIZE_TAG_ALIGNED(body_size); |
| 2629 ASSERT_SIZE_TAG_ALIGNED(sinfo_size); | 2629 ASSERT_SIZE_TAG_ALIGNED(sinfo_size); |
| 2630 return RoundUp(kHeaderSize + body_size + sinfo_size, kCodeAlignment); | 2630 return RoundUp(kHeaderSize + body_size + sinfo_size, kCodeAlignment); |
| 2631 } | 2631 } |
| 2632 | 2632 |
| 2633 // Calculate the size of the code object to report for log events. This takes | 2633 // Calculate the size of the code object to report for log events. This takes |
| 2634 // the layout of the code object into account. | 2634 // the layout of the code object into account. |
| 2635 int ExecutableSize() { | 2635 int ExecutableSize() { |
| 2636 // Check that the assumptions about the layout of the code object holds. | 2636 // Check that the assumptions about the layout of the code object holds. |
| 2637 ASSERT_EQ(instruction_start() - address(), | 2637 ASSERT_EQ(instruction_start() - address(), |
| 2638 Code::kHeaderSize); | 2638 static_cast<intptr_t>(Code::kHeaderSize)); |
| 2639 return instruction_size() + Code::kHeaderSize; | 2639 return instruction_size() + Code::kHeaderSize; |
| 2640 } | 2640 } |
| 2641 | 2641 |
| 2642 // Locating source position. | 2642 // Locating source position. |
| 2643 int SourcePosition(Address pc); | 2643 int SourcePosition(Address pc); |
| 2644 int SourceStatementPosition(Address pc); | 2644 int SourceStatementPosition(Address pc); |
| 2645 | 2645 |
| 2646 // Casting. | 2646 // Casting. |
| 2647 static inline Code* cast(Object* obj); | 2647 static inline Code* cast(Object* obj); |
| 2648 | 2648 |
| (...skipping 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4853 } else { | 4853 } else { |
| 4854 value &= ~(1 << bit_position); | 4854 value &= ~(1 << bit_position); |
| 4855 } | 4855 } |
| 4856 return value; | 4856 return value; |
| 4857 } | 4857 } |
| 4858 }; | 4858 }; |
| 4859 | 4859 |
| 4860 } } // namespace v8::internal | 4860 } } // namespace v8::internal |
| 4861 | 4861 |
| 4862 #endif // V8_OBJECTS_H_ | 4862 #endif // V8_OBJECTS_H_ |
| OLD | NEW |