Files
sdk/runtime/lib/invocation_mirror.h
T
Régis Crelier 8cf9ef22c4 Revert "Dart Core Lib change to support generic functions in class NoSuchMethodError."
This reverts commit db15f5d73b.

Dart2js and Kernel tests are comparing text that has changed because of
the core lib change.

Change-Id: I1d33716a3d6e6a077aa1f1a9ad7cc37825d31fa6
Reviewed-on: https://dart-review.googlesource.com/9082
Reviewed-by: Siva Chandra <sivachandra@google.com>
2017-09-27 21:08:20 +00:00

51 lines
1.3 KiB
C++

// Copyright (c) 2013, 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_LIB_INVOCATION_MIRROR_H_
#define RUNTIME_LIB_INVOCATION_MIRROR_H_
#include "vm/allocation.h"
namespace dart {
class InvocationMirror : public AllStatic {
public:
// These enum correspond to the constants in invocation_mirror_patch.dart.
// It is used to communicate the reason for statically thrown
// NoSuchMethodErrors by the compiler.
enum Type {
// Constants describing the invocation type.
// kField cannot be generated by regular invocation mirrors.
kMethod = 0,
kGetter = 1,
kSetter = 2,
kField = 3,
kLocalVar = 4,
kTypeShift = 0,
kTypeBits = 3,
kTypeMask = (1 << kTypeBits) - 1
};
enum Call {
// These values, except kDynamic and kSuper, are only used when throwing
// NoSuchMethodError for compile-time resolution failures.
kDynamic = 0,
kSuper = 1,
kStatic = 2,
kConstructor = 3,
kTopLevel = 4,
kCallShift = kTypeBits,
kCallBits = 3,
kCallMask = (1 << kCallBits) - 1
};
static int EncodeType(Call call, Type type) {
return (call << kCallShift) | type;
}
};
} // namespace dart
#endif // RUNTIME_LIB_INVOCATION_MIRROR_H_