OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 | 43 |
44 // Base class for all static visitors. | 44 // Base class for all static visitors. |
45 class StaticVisitorBase : public AllStatic { | 45 class StaticVisitorBase : public AllStatic { |
46 public: | 46 public: |
47 enum VisitorId { | 47 enum VisitorId { |
48 kVisitSeqAsciiString = 0, | 48 kVisitSeqAsciiString = 0, |
49 kVisitSeqTwoByteString, | 49 kVisitSeqTwoByteString, |
50 kVisitShortcutCandidate, | 50 kVisitShortcutCandidate, |
51 kVisitByteArray, | 51 kVisitByteArray, |
| 52 kVisitFreeSpace, |
52 kVisitFixedArray, | 53 kVisitFixedArray, |
53 kVisitGlobalContext, | 54 kVisitGlobalContext, |
54 | 55 |
55 // For data objects, JS objects and structs along with generic visitor which | 56 // For data objects, JS objects and structs along with generic visitor which |
56 // can visit object of any size we provide visitors specialized by | 57 // can visit object of any size we provide visitors specialized by |
57 // object size in words. | 58 // object size in words. |
58 // Ids of specialized visitors are declared in a linear order (without | 59 // Ids of specialized visitors are declared in a linear order (without |
59 // holes) starting from the id of visitor specialized for 2 words objects | 60 // holes) starting from the id of visitor specialized for 2 words objects |
60 // (base visitor id) and ending with the id of generic visitor. | 61 // (base visitor id) and ending with the id of generic visitor. |
61 // Method GetVisitorIdForSize depends on this ordering to calculate visitor | 62 // Method GetVisitorIdForSize depends on this ordering to calculate visitor |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 | 393 |
393 for (; !it.done(); it.next()) { | 394 for (; !it.done(); it.next()) { |
394 it.rinfo()->template Visit<StaticVisitor>(); | 395 it.rinfo()->template Visit<StaticVisitor>(); |
395 } | 396 } |
396 } | 397 } |
397 | 398 |
398 | 399 |
399 } } // namespace v8::internal | 400 } } // namespace v8::internal |
400 | 401 |
401 #endif // V8_OBJECTS_VISITING_H_ | 402 #endif // V8_OBJECTS_VISITING_H_ |
OLD | NEW |