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

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

Issue 9836091: Reset function info counters after context disposal. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comment Created 8 years, 8 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
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3490 matching lines...) Expand 10 before | Expand all | Expand 10 after
3501 ACCESSORS(SharedFunctionInfo, initial_map, Object, kInitialMapOffset) 3501 ACCESSORS(SharedFunctionInfo, initial_map, Object, kInitialMapOffset)
3502 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, 3502 ACCESSORS(SharedFunctionInfo, instance_class_name, Object,
3503 kInstanceClassNameOffset) 3503 kInstanceClassNameOffset)
3504 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) 3504 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset)
3505 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) 3505 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset)
3506 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) 3506 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset)
3507 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) 3507 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset)
3508 ACCESSORS(SharedFunctionInfo, this_property_assignments, Object, 3508 ACCESSORS(SharedFunctionInfo, this_property_assignments, Object,
3509 kThisPropertyAssignmentsOffset) 3509 kThisPropertyAssignmentsOffset)
3510 3510
3511 SMI_ACCESSORS(SharedFunctionInfo, profiler_ticks, kProfilerTicksOffset)
3512 3511
3513 BOOL_ACCESSORS(FunctionTemplateInfo, flag, hidden_prototype, 3512 BOOL_ACCESSORS(FunctionTemplateInfo, flag, hidden_prototype,
3514 kHiddenPrototypeBit) 3513 kHiddenPrototypeBit)
3515 BOOL_ACCESSORS(FunctionTemplateInfo, flag, undetectable, kUndetectableBit) 3514 BOOL_ACCESSORS(FunctionTemplateInfo, flag, undetectable, kUndetectableBit)
3516 BOOL_ACCESSORS(FunctionTemplateInfo, flag, needs_access_check, 3515 BOOL_ACCESSORS(FunctionTemplateInfo, flag, needs_access_check,
3517 kNeedsAccessCheckBit) 3516 kNeedsAccessCheckBit)
3518 BOOL_ACCESSORS(FunctionTemplateInfo, flag, read_only_prototype, 3517 BOOL_ACCESSORS(FunctionTemplateInfo, flag, read_only_prototype,
3519 kReadOnlyPrototypeBit) 3518 kReadOnlyPrototypeBit)
3520 BOOL_ACCESSORS(SharedFunctionInfo, start_position_and_type, is_expression, 3519 BOOL_ACCESSORS(SharedFunctionInfo, start_position_and_type, is_expression,
3521 kIsExpressionBit) 3520 kIsExpressionBit)
(...skipping 29 matching lines...) Expand all
3551 SMI_ACCESSORS(SharedFunctionInfo, end_position, kEndPositionOffset) 3550 SMI_ACCESSORS(SharedFunctionInfo, end_position, kEndPositionOffset)
3552 SMI_ACCESSORS(SharedFunctionInfo, function_token_position, 3551 SMI_ACCESSORS(SharedFunctionInfo, function_token_position,
3553 kFunctionTokenPositionOffset) 3552 kFunctionTokenPositionOffset)
3554 SMI_ACCESSORS(SharedFunctionInfo, compiler_hints, 3553 SMI_ACCESSORS(SharedFunctionInfo, compiler_hints,
3555 kCompilerHintsOffset) 3554 kCompilerHintsOffset)
3556 SMI_ACCESSORS(SharedFunctionInfo, this_property_assignments_count, 3555 SMI_ACCESSORS(SharedFunctionInfo, this_property_assignments_count,
3557 kThisPropertyAssignmentsCountOffset) 3556 kThisPropertyAssignmentsCountOffset)
3558 SMI_ACCESSORS(SharedFunctionInfo, opt_count, kOptCountOffset) 3557 SMI_ACCESSORS(SharedFunctionInfo, opt_count, kOptCountOffset)
3559 SMI_ACCESSORS(SharedFunctionInfo, ast_node_count, kAstNodeCountOffset) 3558 SMI_ACCESSORS(SharedFunctionInfo, ast_node_count, kAstNodeCountOffset)
3560 SMI_ACCESSORS(SharedFunctionInfo, deopt_counter, kDeoptCounterOffset) 3559 SMI_ACCESSORS(SharedFunctionInfo, deopt_counter, kDeoptCounterOffset)
3560 SMI_ACCESSORS(SharedFunctionInfo, profiler_ticks, kProfilerTicksOffset)
3561 SMI_ACCESSORS(SharedFunctionInfo, ic_age, kICAgeOffset)
3561 #else 3562 #else
3562 3563
3563 #define PSEUDO_SMI_ACCESSORS_LO(holder, name, offset) \ 3564 #define PSEUDO_SMI_ACCESSORS_LO(holder, name, offset) \
3564 STATIC_ASSERT(holder::offset % kPointerSize == 0); \ 3565 STATIC_ASSERT(holder::offset % kPointerSize == 0); \
3565 int holder::name() { \ 3566 int holder::name() { \
3566 int value = READ_INT_FIELD(this, offset); \ 3567 int value = READ_INT_FIELD(this, offset); \
3567 ASSERT(kHeapObjectTag == 1); \ 3568 ASSERT(kHeapObjectTag == 1); \
3568 ASSERT((value & kHeapObjectTag) == 0); \ 3569 ASSERT((value & kHeapObjectTag) == 0); \
3569 return value >> 1; \ 3570 return value >> 1; \
3570 } \ 3571 } \
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
3604 compiler_hints, 3605 compiler_hints,
3605 kCompilerHintsOffset) 3606 kCompilerHintsOffset)
3606 3607
3607 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, 3608 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo,
3608 this_property_assignments_count, 3609 this_property_assignments_count,
3609 kThisPropertyAssignmentsCountOffset) 3610 kThisPropertyAssignmentsCountOffset)
3610 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, opt_count, kOptCountOffset) 3611 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, opt_count, kOptCountOffset)
3611 3612
3612 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, ast_node_count, kAstNodeCountOffset) 3613 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, ast_node_count, kAstNodeCountOffset)
3613 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, deopt_counter, kDeoptCounterOffset) 3614 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, deopt_counter, kDeoptCounterOffset)
3615
3616 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo,
3617 profiler_ticks,
3618 kProfilerTicksOffset)
3619 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, ic_age, kICAgeOffset)
3614 #endif 3620 #endif
3615 3621
3616 3622
3617 int SharedFunctionInfo::construction_count() { 3623 int SharedFunctionInfo::construction_count() {
3618 return READ_BYTE_FIELD(this, kConstructionCountOffset); 3624 return READ_BYTE_FIELD(this, kConstructionCountOffset);
3619 } 3625 }
3620 3626
3621 3627
3622 void SharedFunctionInfo::set_construction_count(int value) { 3628 void SharedFunctionInfo::set_construction_count(int value) {
3623 ASSERT(0 <= value && value < 256); 3629 ASSERT(0 <= value && value < 256);
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after
4928 #undef WRITE_UINT32_FIELD 4934 #undef WRITE_UINT32_FIELD
4929 #undef READ_SHORT_FIELD 4935 #undef READ_SHORT_FIELD
4930 #undef WRITE_SHORT_FIELD 4936 #undef WRITE_SHORT_FIELD
4931 #undef READ_BYTE_FIELD 4937 #undef READ_BYTE_FIELD
4932 #undef WRITE_BYTE_FIELD 4938 #undef WRITE_BYTE_FIELD
4933 4939
4934 4940
4935 } } // namespace v8::internal 4941 } } // namespace v8::internal
4936 4942
4937 #endif // V8_OBJECTS_INL_H_ 4943 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698