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

Side by Side Diff: src/objects.h

Issue 9837005: Age inline caches after context disposal. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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 4156 matching lines...) Expand 10 before | Expand all | Expand 10 after
4167 4167
4168 // [type_feedback_info]: Struct containing type feedback information. 4168 // [type_feedback_info]: Struct containing type feedback information.
4169 // Will contain either a TypeFeedbackInfo object, or undefined. 4169 // Will contain either a TypeFeedbackInfo object, or undefined.
4170 DECL_ACCESSORS(type_feedback_info, Object) 4170 DECL_ACCESSORS(type_feedback_info, Object)
4171 4171
4172 // [gc_metadata]: Field used to hold GC related metadata. The contents of this 4172 // [gc_metadata]: Field used to hold GC related metadata. The contents of this
4173 // field does not have to be traced during garbage collection since 4173 // field does not have to be traced during garbage collection since
4174 // it is only used by the garbage collector itself. 4174 // it is only used by the garbage collector itself.
4175 DECL_ACCESSORS(gc_metadata, Object) 4175 DECL_ACCESSORS(gc_metadata, Object)
4176 4176
4177 // [context_disposed_count]: The value of the global_context_disposed_count
4178 // at the moment when this code object was created.
4179 inline void set_context_disposed_count(int count);
4180 inline int context_disposed_count();
4181
4177 // Unchecked accessors to be used during GC. 4182 // Unchecked accessors to be used during GC.
4178 inline ByteArray* unchecked_relocation_info(); 4183 inline ByteArray* unchecked_relocation_info();
4179 inline FixedArray* unchecked_deoptimization_data(); 4184 inline FixedArray* unchecked_deoptimization_data();
4180 4185
4181 inline int relocation_size(); 4186 inline int relocation_size();
4182 4187
4183 // [flags]: Various code flags. 4188 // [flags]: Various code flags.
4184 inline Flags flags(); 4189 inline Flags flags();
4185 inline void set_flags(Flags flags); 4190 inline void set_flags(Flags flags);
4186 4191
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
4419 4424
4420 // Layout description. 4425 // Layout description.
4421 static const int kInstructionSizeOffset = HeapObject::kHeaderSize; 4426 static const int kInstructionSizeOffset = HeapObject::kHeaderSize;
4422 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize; 4427 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize;
4423 static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize; 4428 static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize;
4424 static const int kDeoptimizationDataOffset = 4429 static const int kDeoptimizationDataOffset =
4425 kHandlerTableOffset + kPointerSize; 4430 kHandlerTableOffset + kPointerSize;
4426 static const int kTypeFeedbackInfoOffset = 4431 static const int kTypeFeedbackInfoOffset =
4427 kDeoptimizationDataOffset + kPointerSize; 4432 kDeoptimizationDataOffset + kPointerSize;
4428 static const int kGCMetadataOffset = kTypeFeedbackInfoOffset + kPointerSize; 4433 static const int kGCMetadataOffset = kTypeFeedbackInfoOffset + kPointerSize;
4429 static const int kFlagsOffset = kGCMetadataOffset + kPointerSize; 4434 static const int kContextDisposedCountOffset =
4430 4435 kGCMetadataOffset + kPointerSize;
4436 static const int kFlagsOffset = kContextDisposedCountOffset + kIntSize;
Vyacheslav Egorov (Chromium) 2012/03/22 14:47:05 I wonder how big our Code object will become with
4431 static const int kKindSpecificFlagsOffset = kFlagsOffset + kIntSize; 4437 static const int kKindSpecificFlagsOffset = kFlagsOffset + kIntSize;
4432 static const int kKindSpecificFlagsSize = 2 * kIntSize; 4438 static const int kKindSpecificFlagsSize = 2 * kIntSize;
4433 4439
4434 static const int kHeaderPaddingStart = kKindSpecificFlagsOffset + 4440 static const int kHeaderPaddingStart = kKindSpecificFlagsOffset +
4435 kKindSpecificFlagsSize; 4441 kKindSpecificFlagsSize;
4436 4442
4437 // Add padding to align the instruction start following right after 4443 // Add padding to align the instruction start following right after
4438 // the Code object header. 4444 // the Code object header.
4439 static const int kHeaderSize = 4445 static const int kHeaderSize =
4440 (kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask; 4446 (kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask;
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
5315 // deopt. 5321 // deopt.
5316 inline int deopt_counter(); 5322 inline int deopt_counter();
5317 inline void set_deopt_counter(int counter); 5323 inline void set_deopt_counter(int counter);
5318 5324
5319 inline int profiler_ticks(); 5325 inline int profiler_ticks();
5320 inline void set_profiler_ticks(int ticks); 5326 inline void set_profiler_ticks(int ticks);
5321 5327
5322 inline int ast_node_count(); 5328 inline int ast_node_count();
5323 inline void set_ast_node_count(int count); 5329 inline void set_ast_node_count(int count);
5324 5330
5331 // The value of the global_context_disposed_count at the moment
5332 // when the opt_count was reset.
5333 inline int context_disposed_count();
5334 inline void set_context_disposed_count(int count);
5335
5325 // Add information on assignments of the form this.x = ...; 5336 // Add information on assignments of the form this.x = ...;
5326 void SetThisPropertyAssignmentsInfo( 5337 void SetThisPropertyAssignmentsInfo(
5327 bool has_only_simple_this_property_assignments, 5338 bool has_only_simple_this_property_assignments,
5328 FixedArray* this_property_assignments); 5339 FixedArray* this_property_assignments);
5329 5340
5330 // Clear information on assignments of the form this.x = ...; 5341 // Clear information on assignments of the form this.x = ...;
5331 void ClearThisPropertyAssignmentsInfo(); 5342 void ClearThisPropertyAssignmentsInfo();
5332 5343
5333 // Indicate that this function only consists of assignments of the form 5344 // Indicate that this function only consists of assignments of the form
5334 // this.x = y; where y is either a constant or refers to an argument. 5345 // this.x = y; where y is either a constant or refers to an argument.
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
5489 kConstructStubOffset + kPointerSize; 5500 kConstructStubOffset + kPointerSize;
5490 static const int kFunctionDataOffset = 5501 static const int kFunctionDataOffset =
5491 kInstanceClassNameOffset + kPointerSize; 5502 kInstanceClassNameOffset + kPointerSize;
5492 static const int kScriptOffset = kFunctionDataOffset + kPointerSize; 5503 static const int kScriptOffset = kFunctionDataOffset + kPointerSize;
5493 static const int kDebugInfoOffset = kScriptOffset + kPointerSize; 5504 static const int kDebugInfoOffset = kScriptOffset + kPointerSize;
5494 static const int kInferredNameOffset = kDebugInfoOffset + kPointerSize; 5505 static const int kInferredNameOffset = kDebugInfoOffset + kPointerSize;
5495 static const int kInitialMapOffset = 5506 static const int kInitialMapOffset =
5496 kInferredNameOffset + kPointerSize; 5507 kInferredNameOffset + kPointerSize;
5497 static const int kThisPropertyAssignmentsOffset = 5508 static const int kThisPropertyAssignmentsOffset =
5498 kInitialMapOffset + kPointerSize; 5509 kInitialMapOffset + kPointerSize;
5510 static const int kContextDisposedCountOffset =
5511 kThisPropertyAssignmentsOffset + kPointerSize;
5499 static const int kProfilerTicksOffset = 5512 static const int kProfilerTicksOffset =
5500 kThisPropertyAssignmentsOffset + kPointerSize; 5513 kContextDisposedCountOffset + kPointerSize;
5501 #if V8_HOST_ARCH_32_BIT 5514 #if V8_HOST_ARCH_32_BIT
5502 // Smi fields. 5515 // Smi fields.
5503 static const int kLengthOffset = 5516 static const int kLengthOffset =
5504 kProfilerTicksOffset + kPointerSize; 5517 kProfilerTicksOffset + kPointerSize;
5505 static const int kFormalParameterCountOffset = kLengthOffset + kPointerSize; 5518 static const int kFormalParameterCountOffset = kLengthOffset + kPointerSize;
5506 static const int kExpectedNofPropertiesOffset = 5519 static const int kExpectedNofPropertiesOffset =
5507 kFormalParameterCountOffset + kPointerSize; 5520 kFormalParameterCountOffset + kPointerSize;
5508 static const int kNumLiteralsOffset = 5521 static const int kNumLiteralsOffset =
5509 kExpectedNofPropertiesOffset + kPointerSize; 5522 kExpectedNofPropertiesOffset + kPointerSize;
5510 static const int kStartPositionAndTypeOffset = 5523 static const int kStartPositionAndTypeOffset =
(...skipping 3068 matching lines...) Expand 10 before | Expand all | Expand 10 after
8579 } else { 8592 } else {
8580 value &= ~(1 << bit_position); 8593 value &= ~(1 << bit_position);
8581 } 8594 }
8582 return value; 8595 return value;
8583 } 8596 }
8584 }; 8597 };
8585 8598
8586 } } // namespace v8::internal 8599 } } // namespace v8::internal
8587 8600
8588 #endif // V8_OBJECTS_H_ 8601 #endif // V8_OBJECTS_H_
OLDNEW
« src/mark-compact.cc ('K') | « src/mark-compact.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698