Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: src/objects-inl.h

Issue 4685002: Merge r5776 into 2.4 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.4/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2620 matching lines...) Expand 10 before | Expand all | Expand 10 after
2631 SMI_ACCESSORS(SharedFunctionInfo, end_position, kEndPositionOffset) 2631 SMI_ACCESSORS(SharedFunctionInfo, end_position, kEndPositionOffset)
2632 SMI_ACCESSORS(SharedFunctionInfo, function_token_position, 2632 SMI_ACCESSORS(SharedFunctionInfo, function_token_position,
2633 kFunctionTokenPositionOffset) 2633 kFunctionTokenPositionOffset)
2634 SMI_ACCESSORS(SharedFunctionInfo, compiler_hints, 2634 SMI_ACCESSORS(SharedFunctionInfo, compiler_hints,
2635 kCompilerHintsOffset) 2635 kCompilerHintsOffset)
2636 SMI_ACCESSORS(SharedFunctionInfo, this_property_assignments_count, 2636 SMI_ACCESSORS(SharedFunctionInfo, this_property_assignments_count,
2637 kThisPropertyAssignmentsCountOffset) 2637 kThisPropertyAssignmentsCountOffset)
2638 #else 2638 #else
2639 2639
2640 #define PSEUDO_SMI_ACCESSORS_LO(holder, name, offset) \ 2640 #define PSEUDO_SMI_ACCESSORS_LO(holder, name, offset) \
2641 STATIC_ASSERT(holder::offset % kPointerSize == 0); \
2641 int holder::name() { \ 2642 int holder::name() { \
2642 int value = READ_INT_FIELD(this, offset); \ 2643 int value = READ_INT_FIELD(this, offset); \
2643 ASSERT(kHeapObjectTag == 1); \ 2644 ASSERT(kHeapObjectTag == 1); \
2644 ASSERT((value & kHeapObjectTag) == 0); \ 2645 ASSERT((value & kHeapObjectTag) == 0); \
2645 return value >> 1; \ 2646 return value >> 1; \
2646 } \ 2647 } \
2647 void holder::set_##name(int value) { \ 2648 void holder::set_##name(int value) { \
2648 ASSERT(kHeapObjectTag == 1); \ 2649 ASSERT(kHeapObjectTag == 1); \
2649 ASSERT((value & 0xC0000000) == 0xC0000000 || \ 2650 ASSERT((value & 0xC0000000) == 0xC0000000 || \
2650 (value & 0xC0000000) == 0x000000000); \ 2651 (value & 0xC0000000) == 0x000000000); \
2651 WRITE_INT_FIELD(this, \ 2652 WRITE_INT_FIELD(this, \
2652 offset, \ 2653 offset, \
2653 (value << 1) & ~kHeapObjectTag); \ 2654 (value << 1) & ~kHeapObjectTag); \
2654 } 2655 }
2655 2656
2656 #define PSEUDO_SMI_ACCESSORS_HI(holder, name, offset) \ 2657 #define PSEUDO_SMI_ACCESSORS_HI(holder, name, offset) \
2658 STATIC_ASSERT(holder::offset % kPointerSize == kIntSize); \
2657 INT_ACCESSORS(holder, name, offset) 2659 INT_ACCESSORS(holder, name, offset)
2658 2660
2659 2661
2662 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, length, kLengthOffset)
2663 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo,
2664 formal_parameter_count,
2665 kFormalParameterCountOffset)
2660 2666
2661 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, length, kLengthOffset) 2667 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo,
2662 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, formal_parameter_count, 2668 expected_nof_properties,
2663 kFormalParameterCountOffset) 2669 kExpectedNofPropertiesOffset)
2664
2665 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, expected_nof_properties,
2666 kExpectedNofPropertiesOffset)
2667 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, num_literals, kNumLiteralsOffset) 2670 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, num_literals, kNumLiteralsOffset)
2668 2671
2669 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, start_position_and_type, 2672 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, end_position, kEndPositionOffset)
2670 kStartPositionAndTypeOffset) 2673 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo,
2671 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, end_position, kEndPositionOffset) 2674 start_position_and_type,
2675 kStartPositionAndTypeOffset)
2672 2676
2673 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, function_token_position, 2677 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo,
2674 kFunctionTokenPositionOffset) 2678 function_token_position,
2675 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, compiler_hints, 2679 kFunctionTokenPositionOffset)
2676 kCompilerHintsOffset) 2680 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo,
2681 compiler_hints,
2682 kCompilerHintsOffset)
2677 2683
2678 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, this_property_assignments_count, 2684 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo,
2679 kThisPropertyAssignmentsCountOffset) 2685 this_property_assignments_count,
2686 kThisPropertyAssignmentsCountOffset)
2680 #endif 2687 #endif
2681 2688
2682 2689
2683 int SharedFunctionInfo::construction_count() { 2690 int SharedFunctionInfo::construction_count() {
2684 return READ_BYTE_FIELD(this, kConstructionCountOffset); 2691 return READ_BYTE_FIELD(this, kConstructionCountOffset);
2685 } 2692 }
2686 2693
2687 2694
2688 void SharedFunctionInfo::set_construction_count(int value) { 2695 void SharedFunctionInfo::set_construction_count(int value) {
2689 ASSERT(0 <= value && value < 256); 2696 ASSERT(0 <= value && value < 256);
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
3537 #undef WRITE_INT_FIELD 3544 #undef WRITE_INT_FIELD
3538 #undef READ_SHORT_FIELD 3545 #undef READ_SHORT_FIELD
3539 #undef WRITE_SHORT_FIELD 3546 #undef WRITE_SHORT_FIELD
3540 #undef READ_BYTE_FIELD 3547 #undef READ_BYTE_FIELD
3541 #undef WRITE_BYTE_FIELD 3548 #undef WRITE_BYTE_FIELD
3542 3549
3543 3550
3544 } } // namespace v8::internal 3551 } } // namespace v8::internal
3545 3552
3546 #endif // V8_OBJECTS_INL_H_ 3553 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698