3b057dea98
Our generated code does not keep the context in a special register anymore (for quite some time now). The context is just another definition in the IR language and gets assigned register locations by the linearscan register allocator. Furthermore we no longer use an empty context for closures which have no captured states, instead the context of those closures is just `null`. This CL therefore removes Object::empty_context() and the CTX constant. Change-Id: Iea171e0d0fd56c48f1c456e08e060a12267e39cc Reviewed-on: https://dart-review.googlesource.com/51129 Commit-Queue: Martin Kustermann <kustermann@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com>
72 lines
1.8 KiB
C++
72 lines
1.8 KiB
C++
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#ifndef RUNTIME_VM_SNAPSHOT_IDS_H_
|
|
#define RUNTIME_VM_SNAPSHOT_IDS_H_
|
|
|
|
#include "vm/dart_entry.h"
|
|
#include "vm/raw_object.h"
|
|
|
|
namespace dart {
|
|
|
|
// Index for predefined singleton objects used in a snapshot.
|
|
enum {
|
|
kNullObject = 0,
|
|
kSentinelObject,
|
|
kTransitionSentinelObject,
|
|
kEmptyArrayObject,
|
|
kZeroArrayObject,
|
|
kTrueValue,
|
|
kFalseValue,
|
|
// Marker for special encoding of double objects in message snapshots.
|
|
kDoubleObject,
|
|
// Object id has been optimized away; reader should use next available id.
|
|
kOmittedObjectId,
|
|
|
|
kClassIdsOffset = kOmittedObjectId,
|
|
|
|
// The class ids of predefined classes are included in this list
|
|
// at an offset of kClassIdsOffset.
|
|
|
|
kObjectType = (kNumPredefinedCids + kClassIdsOffset),
|
|
kNullType,
|
|
kDynamicType,
|
|
kVoidType,
|
|
kFunctionType,
|
|
kNumberType,
|
|
kSmiType,
|
|
kMintType,
|
|
kDoubleType,
|
|
kIntType,
|
|
kBoolType,
|
|
kStringType,
|
|
kArrayType,
|
|
kEmptyTypeArguments,
|
|
|
|
kExtractorParameterTypes,
|
|
kExtractorParameterNames,
|
|
kEmptyContextScopeObject,
|
|
kImplicitClosureScopeObject,
|
|
kEmptyObjectPool,
|
|
kEmptyDescriptors,
|
|
kEmptyVarDescriptors,
|
|
kEmptyExceptionHandlers,
|
|
kCachedArgumentsDescriptor0,
|
|
kCachedArgumentsDescriptorN =
|
|
(kCachedArgumentsDescriptor0 +
|
|
ArgumentsDescriptor::kCachedDescriptorCount - 1),
|
|
kCachedICDataArray0,
|
|
kCachedICDataArrayN =
|
|
(kCachedICDataArray0 + ICData::kCachedICDataArrayCount - 1),
|
|
|
|
kInstanceObjectId,
|
|
kStaticImplicitClosureObjectId,
|
|
kMaxPredefinedObjectIds,
|
|
kInvalidIndex = -1,
|
|
};
|
|
|
|
} // namespace dart
|
|
|
|
#endif // RUNTIME_VM_SNAPSHOT_IDS_H_
|