e2c41789ee
- Don't build and cache vestigial members/constructors maps. - Avoid creating multiple LibraryMirrors for the same library. - Store infrequently used method flags as a bitfield. - Don't cache MethodMirror source. mirrors_reader_test final heap size: 10.8 -> 8.9 MB (-17.5%) mirrors_reader_test time: 1.55 -> 1.33 seconds (-14.2%) R=asiva@google.com Review URL: https://codereview.chromium.org//1080393006 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45352 260f80e4-7a28-3924-810f-c04153c831b5
35 lines
1.3 KiB
C++
35 lines
1.3 KiB
C++
// Copyright (c) 2011, 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 LIB_MIRRORS_H_
|
|
#define LIB_MIRRORS_H_
|
|
|
|
#include "vm/allocation.h"
|
|
|
|
namespace dart {
|
|
|
|
class Mirrors : public AllStatic {
|
|
public:
|
|
#define MIRRORS_KIND_SHIFT_LIST(V) \
|
|
V(kAbstract) \
|
|
V(kGetter) \
|
|
V(kSetter) \
|
|
V(kConstructor) \
|
|
V(kConstCtor) \
|
|
V(kGenerativeCtor) \
|
|
V(kRedirectingCtor) \
|
|
V(kFactoryCtor) \
|
|
|
|
// These offsets much be kept in sync with those in mirrors_impl.dart.
|
|
enum KindShifts {
|
|
#define DEFINE_KIND_SHIFT_ENUM(name) name,
|
|
MIRRORS_KIND_SHIFT_LIST(DEFINE_KIND_SHIFT_ENUM)
|
|
#undef DEFINE_KIND_SHIFT_ENUM
|
|
};
|
|
};
|
|
|
|
} // namespace dart
|
|
|
|
#endif // LIB_MIRRORS_H_
|