| 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 2616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2627 static int SizeFor(int body_size, int sinfo_size) { | 2627 static int SizeFor(int body_size, int sinfo_size) { |
| 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(static_cast<int>(instruction_start() - address()), |
| 2638 static_cast<intptr_t>(Code::kHeaderSize)); | 2638 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 2212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4861 } else { | 4861 } else { |
| 4862 value &= ~(1 << bit_position); | 4862 value &= ~(1 << bit_position); |
| 4863 } | 4863 } |
| 4864 return value; | 4864 return value; |
| 4865 } | 4865 } |
| 4866 }; | 4866 }; |
| 4867 | 4867 |
| 4868 } } // namespace v8::internal | 4868 } } // namespace v8::internal |
| 4869 | 4869 |
| 4870 #endif // V8_OBJECTS_H_ | 4870 #endif // V8_OBJECTS_H_ |
| OLD | NEW |