Chromium Code Reviews| 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 2653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2664 SMI_ACCESSORS(SharedFunctionInfo, end_position, kEndPositionOffset) | 2664 SMI_ACCESSORS(SharedFunctionInfo, end_position, kEndPositionOffset) |
| 2665 SMI_ACCESSORS(SharedFunctionInfo, function_token_position, | 2665 SMI_ACCESSORS(SharedFunctionInfo, function_token_position, |
| 2666 kFunctionTokenPositionOffset) | 2666 kFunctionTokenPositionOffset) |
| 2667 SMI_ACCESSORS(SharedFunctionInfo, compiler_hints, | 2667 SMI_ACCESSORS(SharedFunctionInfo, compiler_hints, |
| 2668 kCompilerHintsOffset) | 2668 kCompilerHintsOffset) |
| 2669 SMI_ACCESSORS(SharedFunctionInfo, this_property_assignments_count, | 2669 SMI_ACCESSORS(SharedFunctionInfo, this_property_assignments_count, |
| 2670 kThisPropertyAssignmentsCountOffset) | 2670 kThisPropertyAssignmentsCountOffset) |
| 2671 #else | 2671 #else |
| 2672 | 2672 |
| 2673 #define PSEUDO_SMI_ACCESSORS_LO(holder, name, offset) \ | 2673 #define PSEUDO_SMI_ACCESSORS_LO(holder, name, offset) \ |
| 2674 STATIC_ASSERT(holder::offset % kPointerSize == 0); \ | |
| 2674 int holder::name() { \ | 2675 int holder::name() { \ |
| 2675 int value = READ_INT_FIELD(this, offset); \ | 2676 int value = READ_INT_FIELD(this, offset); \ |
| 2676 ASSERT(kHeapObjectTag == 1); \ | 2677 ASSERT(kHeapObjectTag == 1); \ |
| 2677 ASSERT((value & kHeapObjectTag) == 0); \ | 2678 ASSERT((value & kHeapObjectTag) == 0); \ |
| 2678 return value >> 1; \ | 2679 return value >> 1; \ |
| 2679 } \ | 2680 } \ |
| 2680 void holder::set_##name(int value) { \ | 2681 void holder::set_##name(int value) { \ |
| 2681 ASSERT(kHeapObjectTag == 1); \ | 2682 ASSERT(kHeapObjectTag == 1); \ |
| 2682 ASSERT((value & 0xC0000000) == 0xC0000000 || \ | 2683 ASSERT((value & 0xC0000000) == 0xC0000000 || \ |
| 2683 (value & 0xC0000000) == 0x000000000); \ | 2684 (value & 0xC0000000) == 0x000000000); \ |
| 2684 WRITE_INT_FIELD(this, \ | 2685 WRITE_INT_FIELD(this, \ |
| 2685 offset, \ | 2686 offset, \ |
| 2686 (value << 1) & ~kHeapObjectTag); \ | 2687 (value << 1) & ~kHeapObjectTag); \ |
| 2687 } | 2688 } |
| 2688 | 2689 |
| 2689 #define PSEUDO_SMI_ACCESSORS_HI(holder, name, offset) \ | 2690 #define PSEUDO_SMI_ACCESSORS_HI(holder, name, offset) \ |
| 2691 STATIC_ASSERT(holder::offset % kPointerSize == kIntSize); \ | |
| 2690 INT_ACCESSORS(holder, name, offset) | 2692 INT_ACCESSORS(holder, name, offset) |
| 2691 | 2693 |
| 2692 | 2694 |
| 2693 | 2695 |
| 2694 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, length, kLengthOffset) | 2696 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, length, kLengthOffset) |
| 2695 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, formal_parameter_count, | 2697 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, formal_parameter_count, |
| 2696 kFormalParameterCountOffset) | 2698 kFormalParameterCountOffset) |
|
Mads Ager (chromium)
2010/11/08 10:22:09
Identation.
| |
| 2697 | 2699 |
| 2698 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, expected_nof_properties, | 2700 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, expected_nof_properties, |
| 2699 kExpectedNofPropertiesOffset) | 2701 kExpectedNofPropertiesOffset) |
|
Mads Ager (chromium)
2010/11/08 10:22:09
Identation.
| |
| 2700 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, num_literals, kNumLiteralsOffset) | 2702 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, num_literals, kNumLiteralsOffset) |
| 2701 | 2703 |
| 2702 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, start_position_and_type, | 2704 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, end_position, kEndPositionOffset) |
| 2705 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, start_position_and_type, | |
| 2703 kStartPositionAndTypeOffset) | 2706 kStartPositionAndTypeOffset) |
|
Mads Ager (chromium)
2010/11/08 10:22:09
Indentation.
| |
| 2704 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, end_position, kEndPositionOffset) | |
| 2705 | 2707 |
| 2706 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, function_token_position, | 2708 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, function_token_position, |
| 2707 kFunctionTokenPositionOffset) | 2709 kFunctionTokenPositionOffset) |
| 2708 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, compiler_hints, | 2710 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, compiler_hints, |
| 2709 kCompilerHintsOffset) | 2711 kCompilerHintsOffset) |
| 2710 | 2712 |
| 2711 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, this_property_assignments_count, | 2713 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, this_property_assignments_count, |
| 2712 kThisPropertyAssignmentsCountOffset) | 2714 kThisPropertyAssignmentsCountOffset) |
| 2713 #endif | 2715 #endif |
| 2714 | 2716 |
| (...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3579 #undef WRITE_INT_FIELD | 3581 #undef WRITE_INT_FIELD |
| 3580 #undef READ_SHORT_FIELD | 3582 #undef READ_SHORT_FIELD |
| 3581 #undef WRITE_SHORT_FIELD | 3583 #undef WRITE_SHORT_FIELD |
| 3582 #undef READ_BYTE_FIELD | 3584 #undef READ_BYTE_FIELD |
| 3583 #undef WRITE_BYTE_FIELD | 3585 #undef WRITE_BYTE_FIELD |
| 3584 | 3586 |
| 3585 | 3587 |
| 3586 } } // namespace v8::internal | 3588 } } // namespace v8::internal |
| 3587 | 3589 |
| 3588 #endif // V8_OBJECTS_INL_H_ | 3590 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |