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

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

Issue 9403009: Count ICs that have type information. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 months 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3553 matching lines...) Expand 10 before | Expand all | Expand 10 after
3564 SMI_ACCESSORS(SharedFunctionInfo, end_position, kEndPositionOffset) 3564 SMI_ACCESSORS(SharedFunctionInfo, end_position, kEndPositionOffset)
3565 SMI_ACCESSORS(SharedFunctionInfo, function_token_position, 3565 SMI_ACCESSORS(SharedFunctionInfo, function_token_position,
3566 kFunctionTokenPositionOffset) 3566 kFunctionTokenPositionOffset)
3567 SMI_ACCESSORS(SharedFunctionInfo, compiler_hints, 3567 SMI_ACCESSORS(SharedFunctionInfo, compiler_hints,
3568 kCompilerHintsOffset) 3568 kCompilerHintsOffset)
3569 SMI_ACCESSORS(SharedFunctionInfo, this_property_assignments_count, 3569 SMI_ACCESSORS(SharedFunctionInfo, this_property_assignments_count,
3570 kThisPropertyAssignmentsCountOffset) 3570 kThisPropertyAssignmentsCountOffset)
3571 SMI_ACCESSORS(SharedFunctionInfo, opt_count, kOptCountOffset) 3571 SMI_ACCESSORS(SharedFunctionInfo, opt_count, kOptCountOffset)
3572 SMI_ACCESSORS(SharedFunctionInfo, ast_node_count, kAstNodeCountOffset) 3572 SMI_ACCESSORS(SharedFunctionInfo, ast_node_count, kAstNodeCountOffset)
3573 SMI_ACCESSORS(SharedFunctionInfo, deopt_counter, kDeoptCounterOffset) 3573 SMI_ACCESSORS(SharedFunctionInfo, deopt_counter, kDeoptCounterOffset)
3574 SMI_ACCESSORS(SharedFunctionInfo, ic_total_count, kIcTotalCountOffset)
3575 SMI_ACCESSORS(SharedFunctionInfo, ic_typeinfo_count, kIcTypeInfoCountOffset)
3574 #else 3576 #else
3575 3577
3576 #define PSEUDO_SMI_ACCESSORS_LO(holder, name, offset) \ 3578 #define PSEUDO_SMI_ACCESSORS_LO(holder, name, offset) \
3577 STATIC_ASSERT(holder::offset % kPointerSize == 0); \ 3579 STATIC_ASSERT(holder::offset % kPointerSize == 0); \
3578 int holder::name() { \ 3580 int holder::name() { \
3579 int value = READ_INT_FIELD(this, offset); \ 3581 int value = READ_INT_FIELD(this, offset); \
3580 ASSERT(kHeapObjectTag == 1); \ 3582 ASSERT(kHeapObjectTag == 1); \
3581 ASSERT((value & kHeapObjectTag) == 0); \ 3583 ASSERT((value & kHeapObjectTag) == 0); \
3582 return value >> 1; \ 3584 return value >> 1; \
3583 } \ 3585 } \
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
3617 compiler_hints, 3619 compiler_hints,
3618 kCompilerHintsOffset) 3620 kCompilerHintsOffset)
3619 3621
3620 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, 3622 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo,
3621 this_property_assignments_count, 3623 this_property_assignments_count,
3622 kThisPropertyAssignmentsCountOffset) 3624 kThisPropertyAssignmentsCountOffset)
3623 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, opt_count, kOptCountOffset) 3625 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, opt_count, kOptCountOffset)
3624 3626
3625 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, ast_node_count, kAstNodeCountOffset) 3627 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, ast_node_count, kAstNodeCountOffset)
3626 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, deopt_counter, kDeoptCounterOffset) 3628 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, deopt_counter, kDeoptCounterOffset)
3629
3630 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, ic_total_count, kIcTotalCountOffset)
3631 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, ic_typeinfo_count,
3632 kIcTypeInfoCountOffset)
3627 #endif 3633 #endif
3628 3634
3629 3635
3630 int SharedFunctionInfo::construction_count() { 3636 int SharedFunctionInfo::construction_count() {
3631 return READ_BYTE_FIELD(this, kConstructionCountOffset); 3637 return READ_BYTE_FIELD(this, kConstructionCountOffset);
3632 } 3638 }
3633 3639
3634 3640
3635 void SharedFunctionInfo::set_construction_count(int value) { 3641 void SharedFunctionInfo::set_construction_count(int value) {
3636 ASSERT(0 <= value && value < 256); 3642 ASSERT(0 <= value && value < 256);
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after
4896 #undef WRITE_INT_FIELD 4902 #undef WRITE_INT_FIELD
4897 #undef READ_SHORT_FIELD 4903 #undef READ_SHORT_FIELD
4898 #undef WRITE_SHORT_FIELD 4904 #undef WRITE_SHORT_FIELD
4899 #undef READ_BYTE_FIELD 4905 #undef READ_BYTE_FIELD
4900 #undef WRITE_BYTE_FIELD 4906 #undef WRITE_BYTE_FIELD
4901 4907
4902 4908
4903 } } // namespace v8::internal 4909 } } // namespace v8::internal
4904 4910
4905 #endif // V8_OBJECTS_INL_H_ 4911 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698