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

Side by Side Diff: src/objects.h

Issue 159783002: Re-optimize faster after making a pretenuring decision. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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/deoptimizer.cc ('k') | src/objects.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include "allocation.h" 8 #include "allocation.h"
9 #include "assert-scope.h" 9 #include "assert-scope.h"
10 #include "builtins.h" 10 #include "builtins.h"
(...skipping 5443 matching lines...) Expand 10 before | Expand all | Expand 10 after
5454 // cache is passed to the stub. 5454 // cache is passed to the stub.
5455 inline bool has_function_cache(); 5455 inline bool has_function_cache();
5456 inline void set_has_function_cache(bool flag); 5456 inline void set_has_function_cache(bool flag);
5457 5457
5458 5458
5459 // [marked_for_deoptimization]: For kind OPTIMIZED_FUNCTION tells whether 5459 // [marked_for_deoptimization]: For kind OPTIMIZED_FUNCTION tells whether
5460 // the code is going to be deoptimized because of dead embedded maps. 5460 // the code is going to be deoptimized because of dead embedded maps.
5461 inline bool marked_for_deoptimization(); 5461 inline bool marked_for_deoptimization();
5462 inline void set_marked_for_deoptimization(bool flag); 5462 inline void set_marked_for_deoptimization(bool flag);
5463 5463
5464 inline bool marked_for_instant_optimization();
5465 inline void set_marked_for_instant_optimization(bool flag);
5466
5464 // [constant_pool]: The constant pool for this function. 5467 // [constant_pool]: The constant pool for this function.
5465 inline ConstantPoolArray* constant_pool(); 5468 inline ConstantPoolArray* constant_pool();
5466 inline void set_constant_pool(Object* constant_pool); 5469 inline void set_constant_pool(Object* constant_pool);
5467 5470
5468 // Get the safepoint entry for the given pc. 5471 // Get the safepoint entry for the given pc.
5469 SafepointEntry GetSafepointEntry(Address pc); 5472 SafepointEntry GetSafepointEntry(Address pc);
5470 5473
5471 // Find an object in a stub with a specified map 5474 // Find an object in a stub with a specified map
5472 Object* FindNthObject(int n, Map* match_map); 5475 Object* FindNthObject(int n, Map* match_map);
5473 5476
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
5628 // Gets the raw code age, including psuedo code-age values such as 5631 // Gets the raw code age, including psuedo code-age values such as
5629 // kNotExecutedCodeAge and kExecutedOnceCodeAge. 5632 // kNotExecutedCodeAge and kExecutedOnceCodeAge.
5630 Age GetRawAge(); 5633 Age GetRawAge();
5631 static inline Code* GetPreAgedCodeAgeStub(Isolate* isolate) { 5634 static inline Code* GetPreAgedCodeAgeStub(Isolate* isolate) {
5632 return GetCodeAgeStub(isolate, kNotExecutedCodeAge, NO_MARKING_PARITY); 5635 return GetCodeAgeStub(isolate, kNotExecutedCodeAge, NO_MARKING_PARITY);
5633 } 5636 }
5634 5637
5635 void PrintDeoptLocation(FILE* out, int bailout_id); 5638 void PrintDeoptLocation(FILE* out, int bailout_id);
5636 bool CanDeoptAt(Address pc); 5639 bool CanDeoptAt(Address pc);
5637 5640
5641 void GetICCounts(int* ic_with_type_info_count,
5642 int* ic_total_count,
5643 int* percentage);
5644
5638 #ifdef VERIFY_HEAP 5645 #ifdef VERIFY_HEAP
5639 void VerifyEmbeddedObjectsDependency(); 5646 void VerifyEmbeddedObjectsDependency();
5640 #endif 5647 #endif
5641 5648
5642 inline bool CanContainWeakObjects() { 5649 inline bool CanContainWeakObjects() {
5643 return is_optimized_code() || is_weak_stub(); 5650 return is_optimized_code() || is_weak_stub();
5644 } 5651 }
5645 5652
5646 inline bool IsWeakObject(Object* object) { 5653 inline bool IsWeakObject(Object* object) {
5647 return (is_optimized_code() && IsWeakObjectInOptimizedCode(object)) || 5654 return (is_optimized_code() && IsWeakObjectInOptimizedCode(object)) ||
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
5711 static const int kHasFunctionCacheBitCount = 1; 5718 static const int kHasFunctionCacheBitCount = 1;
5712 static const int kMarkedForDeoptimizationFirstBit = 5719 static const int kMarkedForDeoptimizationFirstBit =
5713 kStackSlotsFirstBit + kStackSlotsBitCount + 1; 5720 kStackSlotsFirstBit + kStackSlotsBitCount + 1;
5714 static const int kMarkedForDeoptimizationBitCount = 1; 5721 static const int kMarkedForDeoptimizationBitCount = 1;
5715 static const int kWeakStubFirstBit = 5722 static const int kWeakStubFirstBit =
5716 kMarkedForDeoptimizationFirstBit + kMarkedForDeoptimizationBitCount; 5723 kMarkedForDeoptimizationFirstBit + kMarkedForDeoptimizationBitCount;
5717 static const int kWeakStubBitCount = 1; 5724 static const int kWeakStubBitCount = 1;
5718 static const int kInvalidatedWeakStubFirstBit = 5725 static const int kInvalidatedWeakStubFirstBit =
5719 kWeakStubFirstBit + kWeakStubBitCount; 5726 kWeakStubFirstBit + kWeakStubBitCount;
5720 static const int kInvalidatedWeakStubBitCount = 1; 5727 static const int kInvalidatedWeakStubBitCount = 1;
5728 static const int kMarkedForInstantOptimizationFirstBit =
5729 kInvalidatedWeakStubFirstBit + kInvalidatedWeakStubBitCount + 1;
5730 static const int kMarkedForInstantOptimizationBitCount = 1;
5721 5731
5722 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); 5732 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32);
5723 STATIC_ASSERT(kHasFunctionCacheFirstBit + kHasFunctionCacheBitCount <= 32); 5733 STATIC_ASSERT(kHasFunctionCacheFirstBit + kHasFunctionCacheBitCount <= 32);
5724 STATIC_ASSERT(kInvalidatedWeakStubFirstBit + 5734 STATIC_ASSERT(kMarkedForInstantOptimizationFirstBit +
5725 kInvalidatedWeakStubBitCount <= 32); 5735 kMarkedForInstantOptimizationBitCount <= 32);
5726 5736
5727 class StackSlotsField: public BitField<int, 5737 class StackSlotsField: public BitField<int,
5728 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT 5738 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT
5729 class HasFunctionCacheField: public BitField<bool, 5739 class HasFunctionCacheField: public BitField<bool,
5730 kHasFunctionCacheFirstBit, kHasFunctionCacheBitCount> {}; // NOLINT 5740 kHasFunctionCacheFirstBit, kHasFunctionCacheBitCount> {}; // NOLINT
5731 class MarkedForDeoptimizationField: public BitField<bool, 5741 class MarkedForDeoptimizationField: public BitField<bool,
5732 kMarkedForDeoptimizationFirstBit, 5742 kMarkedForDeoptimizationFirstBit,
5733 kMarkedForDeoptimizationBitCount> {}; // NOLINT 5743 kMarkedForDeoptimizationBitCount> {}; // NOLINT
5734 class WeakStubField: public BitField<bool, 5744 class WeakStubField: public BitField<bool,
5735 kWeakStubFirstBit, 5745 kWeakStubFirstBit,
5736 kWeakStubBitCount> {}; // NOLINT 5746 kWeakStubBitCount> {}; // NOLINT
5737 class InvalidatedWeakStubField: public BitField<bool, 5747 class InvalidatedWeakStubField: public BitField<bool,
5738 kInvalidatedWeakStubFirstBit, 5748 kInvalidatedWeakStubFirstBit,
5739 kInvalidatedWeakStubBitCount> {}; // NOLINT 5749 kInvalidatedWeakStubBitCount> {}; // NOLINT
5750 class MarkedForInstantOptimizationField: public BitField<bool,
5751 kMarkedForInstantOptimizationFirstBit,
5752 kMarkedForInstantOptimizationBitCount> {}; // NOLINT
5740 5753
5741 // KindSpecificFlags2 layout (ALL) 5754 // KindSpecificFlags2 layout (ALL)
5742 static const int kIsCrankshaftedBit = 0; 5755 static const int kIsCrankshaftedBit = 0;
5743 class IsCrankshaftedField: public BitField<bool, 5756 class IsCrankshaftedField: public BitField<bool,
5744 kIsCrankshaftedBit, 1> {}; // NOLINT 5757 kIsCrankshaftedBit, 1> {}; // NOLINT
5745 5758
5746 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION) 5759 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION)
5747 static const int kStubMajorKeyFirstBit = kIsCrankshaftedBit + 1; 5760 static const int kStubMajorKeyFirstBit = kIsCrankshaftedBit + 1;
5748 static const int kSafepointTableOffsetFirstBit = 5761 static const int kSafepointTableOffsetFirstBit =
5749 kStubMajorKeyFirstBit + kStubMajorKeyBits; 5762 kStubMajorKeyFirstBit + kStubMajorKeyBits;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
5874 void UpdateToFinishedCode(DependencyGroup group, 5887 void UpdateToFinishedCode(DependencyGroup group,
5875 CompilationInfo* info, 5888 CompilationInfo* info,
5876 Code* code); 5889 Code* code);
5877 void RemoveCompilationInfo(DependentCode::DependencyGroup group, 5890 void RemoveCompilationInfo(DependentCode::DependencyGroup group,
5878 CompilationInfo* info); 5891 CompilationInfo* info);
5879 5892
5880 void DeoptimizeDependentCodeGroup(Isolate* isolate, 5893 void DeoptimizeDependentCodeGroup(Isolate* isolate,
5881 DependentCode::DependencyGroup group); 5894 DependentCode::DependencyGroup group);
5882 5895
5883 bool MarkCodeForDeoptimization(Isolate* isolate, 5896 bool MarkCodeForDeoptimization(Isolate* isolate,
5884 DependentCode::DependencyGroup group); 5897 DependentCode::DependencyGroup group,
5898 bool instant_optimize = false);
5899
5885 void AddToDependentICList(Handle<Code> stub); 5900 void AddToDependentICList(Handle<Code> stub);
5886 5901
5887 // The following low-level accessors should only be used by this class 5902 // The following low-level accessors should only be used by this class
5888 // and the mark compact collector. 5903 // and the mark compact collector.
5889 inline int number_of_entries(DependencyGroup group); 5904 inline int number_of_entries(DependencyGroup group);
5890 inline void set_number_of_entries(DependencyGroup group, int value); 5905 inline void set_number_of_entries(DependencyGroup group, int value);
5891 inline bool is_code_at(int i); 5906 inline bool is_code_at(int i);
5892 inline Code* code_at(int i); 5907 inline Code* code_at(int i);
5893 inline CompilationInfo* compilation_info_at(int i); 5908 inline CompilationInfo* compilation_info_at(int i);
5894 inline void set_object_at(int i, Object* object); 5909 inline void set_object_at(int i, Object* object);
(...skipping 5221 matching lines...) Expand 10 before | Expand all | Expand 10 after
11116 } else { 11131 } else {
11117 value &= ~(1 << bit_position); 11132 value &= ~(1 << bit_position);
11118 } 11133 }
11119 return value; 11134 return value;
11120 } 11135 }
11121 }; 11136 };
11122 11137
11123 } } // namespace v8::internal 11138 } } // namespace v8::internal
11124 11139
11125 #endif // V8_OBJECTS_H_ 11140 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698