| Index: src/objects-gen.cc
|
| diff --git a/src/objects-gen.cc b/src/objects-gen.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..aeeb82bb45249fdccfa0314980d2394ad1c03902
|
| --- /dev/null
|
| +++ b/src/objects-gen.cc
|
| @@ -0,0 +1,229 @@
|
| +// Copyright 2013 the V8 project authors. All rights reserved.
|
| +// Redistribution and use in source and binary forms, with or without
|
| +// modification, are permitted provided that the following conditions are
|
| +// met:
|
| +//
|
| +// * Redistributions of source code must retain the above copyright
|
| +// notice, this list of conditions and the following disclaimer.
|
| +// * Redistributions in binary form must reproduce the above
|
| +// copyright notice, this list of conditions and the following
|
| +// disclaimer in the documentation and/or other materials provided
|
| +// with the distribution.
|
| +// * Neither the name of Google Inc. nor the names of its
|
| +// contributors may be used to endorse or promote products derived
|
| +// from this software without specific prior written permission.
|
| +//
|
| +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| +
|
| +// This file is automatically generated from 'objects.layout' and should
|
| +// not be modified by hand. Run 'make objects' instead to update it.
|
| +
|
| +#include "v8.h"
|
| +
|
| +namespace v8 {
|
| +namespace internal {
|
| +
|
| +
|
| +#ifdef OBJECT_PRINT
|
| +void Box::BoxPrint(FILE* out) {
|
| + HeapObject::PrintHeader(out, "Box");
|
| + PrintF(out, "\n - value: ");
|
| + value()->ShortPrint();
|
| +}
|
| +#endif
|
| +
|
| +
|
| +#ifdef VERIFY_HEAP
|
| +void Box::BoxVerify() {
|
| + CHECK(IsBox());
|
| + //StructVerify();
|
| + VerifyObjectField(kValueOffset);
|
| +}
|
| +#endif
|
| +
|
| +
|
| +#ifdef OBJECT_PRINT
|
| +void AliasedArgumentsEntry::AliasedArgumentsEntryPrint(FILE* out) {
|
| + HeapObject::PrintHeader(out, "AliasedArgumentsEntry");
|
| + PrintF(out, "\n - aliased_context_slot: %d", aliased_context_slot());
|
| +}
|
| +#endif
|
| +
|
| +
|
| +#ifdef VERIFY_HEAP
|
| +void AliasedArgumentsEntry::AliasedArgumentsEntryVerify() {
|
| + CHECK(IsAliasedArgumentsEntry());
|
| + //StructVerify();
|
| + VerifySmiField(kAliasedContextSlotOffset);
|
| +}
|
| +#endif
|
| +
|
| +
|
| +#ifdef OBJECT_PRINT
|
| +void DeclaredAccessorInfo::DeclaredAccessorInfoPrint(FILE* out) {
|
| + HeapObject::PrintHeader(out, "DeclaredAccessorInfo");
|
| + PrintF(out, "\n - descriptor: ");
|
| + descriptor()->ShortPrint();
|
| +}
|
| +#endif
|
| +
|
| +
|
| +#ifdef VERIFY_HEAP
|
| +void DeclaredAccessorInfo::DeclaredAccessorInfoVerify() {
|
| + CHECK(IsDeclaredAccessorInfo());
|
| + //AccessorInfoVerify();
|
| + VerifyObjectField(kDescriptorOffset);
|
| +}
|
| +#endif
|
| +
|
| +
|
| +#ifdef OBJECT_PRINT
|
| +void ExecutableAccessorInfo::ExecutableAccessorInfoPrint(FILE* out) {
|
| + HeapObject::PrintHeader(out, "ExecutableAccessorInfo");
|
| + PrintF(out, "\n - getter: ");
|
| + getter()->ShortPrint();
|
| + PrintF(out, "\n - setter: ");
|
| + setter()->ShortPrint();
|
| + PrintF(out, "\n - data: ");
|
| + data()->ShortPrint();
|
| +}
|
| +#endif
|
| +
|
| +
|
| +#ifdef VERIFY_HEAP
|
| +void ExecutableAccessorInfo::ExecutableAccessorInfoVerify() {
|
| + CHECK(IsExecutableAccessorInfo());
|
| + //AccessorInfoVerify();
|
| + VerifyObjectField(kGetterOffset);
|
| + VerifyObjectField(kSetterOffset);
|
| + VerifyObjectField(kDataOffset);
|
| +}
|
| +#endif
|
| +
|
| +
|
| +#ifdef OBJECT_PRINT
|
| +void FunctionTemplateInfo::FunctionTemplateInfoPrint(FILE* out) {
|
| + HeapObject::PrintHeader(out, "FunctionTemplateInfo");
|
| + PrintF(out, "\n - serial_number: ");
|
| + serial_number()->ShortPrint();
|
| + PrintF(out, "\n - call_code: ");
|
| + call_code()->ShortPrint();
|
| + PrintF(out, "\n - property_accessors: ");
|
| + property_accessors()->ShortPrint();
|
| + PrintF(out, "\n - prototype_template: ");
|
| + prototype_template()->ShortPrint();
|
| + PrintF(out, "\n - parent_template: ");
|
| + parent_template()->ShortPrint();
|
| + PrintF(out, "\n - named_property_handler: ");
|
| + named_property_handler()->ShortPrint();
|
| + PrintF(out, "\n - indexed_property_handler: ");
|
| + indexed_property_handler()->ShortPrint();
|
| + PrintF(out, "\n - instance_template: ");
|
| + instance_template()->ShortPrint();
|
| + PrintF(out, "\n - class_name: ");
|
| + class_name()->ShortPrint();
|
| + PrintF(out, "\n - signature: ");
|
| + signature()->ShortPrint();
|
| + PrintF(out, "\n - instance_call_handler: ");
|
| + instance_call_handler()->ShortPrint();
|
| + PrintF(out, "\n - access_check_info: ");
|
| + access_check_info()->ShortPrint();
|
| + PrintF(out, "\n - flag: %d", flag());
|
| + PrintF(out, "\n - length: %d", length());
|
| +}
|
| +#endif
|
| +
|
| +
|
| +#ifdef VERIFY_HEAP
|
| +void FunctionTemplateInfo::FunctionTemplateInfoVerify() {
|
| + CHECK(IsFunctionTemplateInfo());
|
| + //TemplateInfoVerify();
|
| + VerifyObjectField(kSerialNumberOffset);
|
| + VerifyObjectField(kCallCodeOffset);
|
| + VerifyObjectField(kPropertyAccessorsOffset);
|
| + VerifyObjectField(kPrototypeTemplateOffset);
|
| + VerifyObjectField(kParentTemplateOffset);
|
| + VerifyObjectField(kNamedPropertyHandlerOffset);
|
| + VerifyObjectField(kIndexedPropertyHandlerOffset);
|
| + VerifyObjectField(kInstanceTemplateOffset);
|
| + VerifyObjectField(kClassNameOffset);
|
| + VerifyObjectField(kSignatureOffset);
|
| + VerifyObjectField(kInstanceCallHandlerOffset);
|
| + VerifyObjectField(kAccessCheckInfoOffset);
|
| + VerifySmiField(kFlagOffset);
|
| + VerifySmiField(kLengthOffset);
|
| +}
|
| +#endif
|
| +
|
| +
|
| +#ifdef OBJECT_PRINT
|
| +void ObjectTemplateInfo::ObjectTemplateInfoPrint(FILE* out) {
|
| + HeapObject::PrintHeader(out, "ObjectTemplateInfo");
|
| + PrintF(out, "\n - constructor: ");
|
| + constructor()->ShortPrint();
|
| + PrintF(out, "\n - internal_field_count: ");
|
| + internal_field_count()->ShortPrint();
|
| +}
|
| +#endif
|
| +
|
| +
|
| +#ifdef VERIFY_HEAP
|
| +void ObjectTemplateInfo::ObjectTemplateInfoVerify() {
|
| + CHECK(IsObjectTemplateInfo());
|
| + //TemplateInfoVerify();
|
| + VerifyObjectField(kConstructorOffset);
|
| + VerifyObjectField(kInternalFieldCountOffset);
|
| +}
|
| +#endif
|
| +
|
| +
|
| +#ifdef OBJECT_PRINT
|
| +void SignatureInfo::SignatureInfoPrint(FILE* out) {
|
| + HeapObject::PrintHeader(out, "SignatureInfo");
|
| + PrintF(out, "\n - receiver: ");
|
| + receiver()->ShortPrint();
|
| + PrintF(out, "\n - args: ");
|
| + args()->ShortPrint();
|
| +}
|
| +#endif
|
| +
|
| +
|
| +#ifdef VERIFY_HEAP
|
| +void SignatureInfo::SignatureInfoVerify() {
|
| + CHECK(IsSignatureInfo());
|
| + //StructVerify();
|
| + VerifyObjectField(kReceiverOffset);
|
| + VerifyObjectField(kArgsOffset);
|
| +}
|
| +#endif
|
| +
|
| +
|
| +#ifdef OBJECT_PRINT
|
| +void TypeSwitchInfo::TypeSwitchInfoPrint(FILE* out) {
|
| + HeapObject::PrintHeader(out, "TypeSwitchInfo");
|
| + PrintF(out, "\n - types: ");
|
| + types()->ShortPrint();
|
| +}
|
| +#endif
|
| +
|
| +
|
| +#ifdef VERIFY_HEAP
|
| +void TypeSwitchInfo::TypeSwitchInfoVerify() {
|
| + CHECK(IsTypeSwitchInfo());
|
| + //StructVerify();
|
| + VerifyObjectField(kTypesOffset);
|
| +}
|
| +#endif
|
| +
|
| +
|
| +} } // namespace v8::internal
|
|
|