OLD | NEW |
---|---|
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 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1590 // For post mortem debugging. | 1590 // For post mortem debugging. |
1591 void RememberUnmappedPage(Address page, bool compacted); | 1591 void RememberUnmappedPage(Address page, bool compacted); |
1592 | 1592 |
1593 // Global inline caching age: it is incremented on some GCs after context | 1593 // Global inline caching age: it is incremented on some GCs after context |
1594 // disposal. We use it to flush inline caches. | 1594 // disposal. We use it to flush inline caches. |
1595 int global_ic_age() { | 1595 int global_ic_age() { |
1596 return global_ic_age_; | 1596 return global_ic_age_; |
1597 } | 1597 } |
1598 | 1598 |
1599 void AgeInlineCaches() { | 1599 void AgeInlineCaches() { |
1600 ++global_ic_age_; | 1600 const int kMaxICAge = SharedFunctionInfo::kICAgeMask; |
1601 global_ic_age_ = global_ic_age_ < kMaxICAge ? global_ic_age_ + 1 : 0; | |
Jakob Kummerow
2012/06/11 12:13:59
I guess it doesn't really matter, but the followin
ulan
2012/06/11 16:07:31
Done. Left out ASSERT, since BitField<> guarantees
| |
1601 } | 1602 } |
1602 | 1603 |
1603 private: | 1604 private: |
1604 Heap(); | 1605 Heap(); |
1605 | 1606 |
1606 // This can be calculated directly from a pointer to the heap; however, it is | 1607 // This can be calculated directly from a pointer to the heap; however, it is |
1607 // more expedient to get at the isolate directly from within Heap methods. | 1608 // more expedient to get at the isolate directly from within Heap methods. |
1608 Isolate* isolate_; | 1609 Isolate* isolate_; |
1609 | 1610 |
1610 Object* roots_[kRootListLength]; | 1611 Object* roots_[kRootListLength]; |
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2701 AssertNoAllocation no_alloc; // i.e. no gc allowed. | 2702 AssertNoAllocation no_alloc; // i.e. no gc allowed. |
2702 | 2703 |
2703 private: | 2704 private: |
2704 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2705 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2705 }; | 2706 }; |
2706 #endif // DEBUG || LIVE_OBJECT_LIST | 2707 #endif // DEBUG || LIVE_OBJECT_LIST |
2707 | 2708 |
2708 } } // namespace v8::internal | 2709 } } // namespace v8::internal |
2709 | 2710 |
2710 #endif // V8_HEAP_H_ | 2711 #endif // V8_HEAP_H_ |
OLD | NEW |