OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 |
11 // with the distribution. | 11 // with the distribution. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 // Base class for all static visitors. | 46 // Base class for all static visitors. |
47 class StaticVisitorBase : public AllStatic { | 47 class StaticVisitorBase : public AllStatic { |
48 public: | 48 public: |
49 enum VisitorId { | 49 enum VisitorId { |
50 kVisitSeqAsciiString = 0, | 50 kVisitSeqAsciiString = 0, |
51 kVisitSeqTwoByteString, | 51 kVisitSeqTwoByteString, |
52 kVisitShortcutCandidate, | 52 kVisitShortcutCandidate, |
53 kVisitByteArray, | 53 kVisitByteArray, |
54 kVisitFixedArray, | 54 kVisitFixedArray, |
| 55 kVisitFixedDoubleArray, |
55 kVisitGlobalContext, | 56 kVisitGlobalContext, |
56 | 57 |
57 // For data objects, JS objects and structs along with generic visitor which | 58 // For data objects, JS objects and structs along with generic visitor which |
58 // can visit object of any size we provide visitors specialized by | 59 // can visit object of any size we provide visitors specialized by |
59 // object size in words. | 60 // object size in words. |
60 // Ids of specialized visitors are declared in a linear order (without | 61 // Ids of specialized visitors are declared in a linear order (without |
61 // holes) starting from the id of visitor specialized for 2 words objects | 62 // holes) starting from the id of visitor specialized for 2 words objects |
62 // (base visitor id) and ending with the id of generic visitor. | 63 // (base visitor id) and ending with the id of generic visitor. |
63 // Method GetVisitorIdForSize depends on this ordering to calculate visitor | 64 // Method GetVisitorIdForSize depends on this ordering to calculate visitor |
64 // id of specialized visitor from given instance size, base visitor id and | 65 // id of specialized visitor from given instance size, base visitor id and |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 | 416 |
416 for (; !it.done(); it.next()) { | 417 for (; !it.done(); it.next()) { |
417 it.rinfo()->template Visit<StaticVisitor>(heap); | 418 it.rinfo()->template Visit<StaticVisitor>(heap); |
418 } | 419 } |
419 } | 420 } |
420 | 421 |
421 | 422 |
422 } } // namespace v8::internal | 423 } } // namespace v8::internal |
423 | 424 |
424 #endif // V8_OBJECTS_VISITING_H_ | 425 #endif // V8_OBJECTS_VISITING_H_ |
OLD | NEW |