Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2013 the V8 project authors. All rights reserved. | |
| 2 # Redistribution and use in source and binary forms, with or without | |
| 3 # modification, are permitted provided that the following conditions are | |
| 4 # met: | |
| 5 # | |
| 6 # * Redistributions of source code must retain the above copyright | |
| 7 # notice, this list of conditions and the following disclaimer. | |
| 8 # * Redistributions in binary form must reproduce the above | |
| 9 # copyright notice, this list of conditions and the following | |
| 10 # disclaimer in the documentation and/or other materials provided | |
| 11 # with the distribution. | |
| 12 # * Neither the name of Google Inc. nor the names of its | |
| 13 # contributors may be used to endorse or promote products derived | |
| 14 # from this software without specific prior written permission. | |
| 15 # | |
| 16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
| 17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
| 19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
| 20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
| 21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
| 22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
| 23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
| 24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
| 25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
| 26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 27 | |
| 28 # This file contains the description for V8's heap object layouts in a | |
| 29 # JSON-esque domain-specific language. Modify this file and re-run the | |
| 30 # generator script to change the generated files. | |
| 31 | |
| 32 { types: [ # Begin main types dictionary here. | |
| 33 | |
| 34 ### | |
| 35 # | |
| 36 # Each 'type' can have the following properties: | |
| 37 # - 'name' (mandatory): The name in Pascal-case. | |
| 38 # - 'base' (mandatory): The parent type in Pascal-case. | |
| 39 # - 'fields' (mandatory): A list of all contained fields. | |
| 40 # - 'comment': A comment to be displayed for the class. | |
| 41 # | |
| 42 # Each 'field' can have the following properties: | |
| 43 # - 'name' (mandatory): The name in lower-case. | |
| 44 # - 'type': The type of the field, defaults to 'Object'. | |
| 45 # - 'comment': A comment to be displayed for the accessor. | |
| 46 # - 'bitfield': A list of fields encoded within this field. | |
| 47 # | |
| 48 # Known primitive types to be used: tBool, tSmi | |
| 49 # | |
| 50 ### | |
| 51 | |
| 52 { name: "Box", | |
| 53 base: "Struct", | |
| 54 comment: "A simple one-element struct, useful where SMIs need to be boxed.", | |
| 55 fields: [ | |
| 56 { name: "value", comment: "the boxed contents." }, | |
|
titzer
2013/09/02 08:32:10
I guess a field without a type is just assumed to
| |
| 57 ], | |
| 58 }, | |
| 59 | |
| 60 { name: "AliasedArgumentsEntry", | |
| 61 base: "Struct", | |
| 62 comment: [ | |
| 63 "Representation of a slow alias as part of a non-strict arguments objects.", | |
| 64 "For fast aliases (if HasNonStrictArgumentsElements()):", | |
| 65 " - the parameter map contains an index into the context", | |
| 66 " - all attributes of the element have default values", | |
| 67 "For slow aliases (if HasDictionaryArgumentsElements()):", | |
| 68 " - the parameter map contains no fast alias mapping (i.e. the hole)", | |
| 69 " - this struct (in the slow backing store) contains an index into the conte xt", | |
| 70 " - all attributes are available as part if the property details", | |
| 71 ], | |
| 72 fields: [ | |
| 73 { name: "aliased_context_slot", type: tSmi }, | |
| 74 ], | |
| 75 }, | |
| 76 | |
| 77 { name: "DeclaredAccessorInfo", | |
| 78 base: "AccessorInfo", | |
| 79 fields: [ | |
| 80 { name: "descriptor", type: "DeclaredAccessorDescriptor" }, | |
| 81 ], | |
| 82 }, | |
| 83 | |
| 84 { name: "ExecutableAccessorInfo", | |
| 85 base: "AccessorInfo", | |
| 86 comment: [ | |
| 87 "An accessor must have a getter, but can have no setter.", | |
| 88 "", | |
| 89 "When setting a property, V8 searches accessors in prototypes.", | |
| 90 "If an accessor was found and it does not have a setter,", | |
| 91 "the request is ignored.", | |
| 92 "", | |
| 93 "If the accessor in the prototype has the READ_ONLY property attribute, then ", | |
| 94 "a new value is added to the local object when the property is set.", | |
| 95 "This shadows the accessor in the prototype.", | |
| 96 ], | |
| 97 fields: [ | |
| 98 { name: "getter" }, | |
| 99 { name: "setter" }, | |
| 100 { name: "data" }, | |
| 101 ], | |
| 102 }, | |
| 103 | |
| 104 { name: "FunctionTemplateInfo", | |
| 105 base: "TemplateInfo", | |
| 106 fields: [ | |
| 107 { name: "serial_number" }, | |
| 108 { name: "call_code" }, | |
| 109 { name: "property_accessors" }, | |
| 110 { name: "prototype_template" }, | |
| 111 { name: "parent_template" }, | |
| 112 { name: "named_property_handler" }, | |
| 113 { name: "indexed_property_handler" }, | |
| 114 { name: "instance_template" }, | |
| 115 { name: "class_name" }, | |
| 116 { name: "signature" }, | |
| 117 { name: "instance_call_handler" }, | |
| 118 { name: "access_check_info" }, | |
| 119 { name: "flag", type: tSmi, bitfield: [ | |
|
titzer
2013/09/02 08:32:10
Should we by default pack bools into a bitfield? A
| |
| 120 { name: "hidden_prototype", type: tBool }, | |
| 121 { name: "undetectable", type: tBool }, | |
| 122 { name: "needs_access_check", type: tBool }, | |
| 123 { name: "read_only_prototype", type: tBool }, | |
| 124 { name: "remove_prototype", type: tBool }, | |
| 125 ]}, | |
| 126 { name: "length", type: tSmi }, | |
| 127 ], | |
| 128 }, | |
| 129 | |
| 130 { name: "ObjectTemplateInfo", | |
| 131 base: "TemplateInfo", | |
| 132 fields: [ | |
| 133 { name: "constructor" }, | |
| 134 { name: "internal_field_count" }, | |
| 135 ], | |
| 136 }, | |
| 137 | |
| 138 { name: "SignatureInfo", | |
| 139 base: "Struct", | |
| 140 fields: [ | |
| 141 { name: "receiver" }, | |
| 142 { name: "args" }, | |
| 143 ], | |
| 144 }, | |
| 145 | |
| 146 { name: "TypeSwitchInfo", | |
| 147 base: "Struct", | |
| 148 fields: [ | |
| 149 { name: "types" }, | |
| 150 ], | |
| 151 }, | |
| 152 | |
| 153 ]} # End main types dictionary here. | |
| OLD | NEW |