Files
swift-mirror/include/swift/AST/KnownIdentifiers.def
Joe Groff ab09922966 Runtime/IRGen: Replace the _SwiftNativeNS*Base +load hack with a compiler hack.
Rather than swizzle the superclass of these bridging classes at +load time, have the compiler set their ObjC runtime base classes, using a "@_swift_native_objc_runtime_base" attribute that tells the compiler to use a different implicit base class from SwiftObject. This lets the runtime shed its last lingering +loads, and should overall be more robust, since it doesn't rely on static initialization order or deprecated ObjC runtime calls.

Swift SVN r28219
2015-05-06 22:00:59 +00:00

116 lines
4.1 KiB
C++

//===-- KnownIdentifiers.def - Known identifier metaprogramming -*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// This file defines macros used for macro-metaprogramming with compiler-known
// identifers.
//
//===----------------------------------------------------------------------===//
#ifndef IDENTIFIER
# error Must define IDENTIFIER(Id) before including this x-macro file
#endif
#ifndef IDENTIFIER_WITH_NAME
# error Must define IDENTIFIER_WITH_NAME(Name, IdStr) before including this x-macro file
#endif
IDENTIFIER(atIndexedSubscript)
IDENTIFIER_WITH_NAME(forceBridgeFromObjectiveC, "_forceBridgeFromObjectiveC")
IDENTIFIER_WITH_NAME(conditionallyBridgeFromObjectiveC,
"_conditionallyBridgeFromObjectiveC")
IDENTIFIER_WITH_NAME(bridgeToObjectiveC, "_bridgeToObjectiveC")
IDENTIFIER(code)
IDENTIFIER(dealloc)
IDENTIFIER(deinit)
IDENTIFIER(domain)
IDENTIFIER(Element)
IDENTIFIER(error)
IDENTIFIER(forKeyedSubscript)
IDENTIFIER(Foundation)
IDENTIFIER(fromRaw)
IDENTIFIER(generate)
IDENTIFIER(Generator)
IDENTIFIER(hashValue)
IDENTIFIER(init)
IDENTIFIER(load)
IDENTIFIER(next)
IDENTIFIER(NSError)
IDENTIFIER(NSObject)
IDENTIFIER(objectAtIndexedSubscript)
IDENTIFIER(objectForKeyedSubscript)
IDENTIFIER(ObjectiveC)
IDENTIFIER(Protocol)
IDENTIFIER(rawValue)
IDENTIFIER(RawValue)
IDENTIFIER(self)
IDENTIFIER(Self)
IDENTIFIER(setObject)
IDENTIFIER(simd)
IDENTIFIER(Some)
IDENTIFIER(subscript)
IDENTIFIER(SwiftObject)
IDENTIFIER(toRaw)
IDENTIFIER(Type)
IDENTIFIER(value)
IDENTIFIER_WITH_NAME(Underscore, "_")
IDENTIFIER_WITH_NAME(MatchOperator, "~=")
IDENTIFIER_WITH_NAME(EqualsOperator, "==")
IDENTIFIER_WITH_NAME(NotEqualsOperator, "!=")
// Built-in identifiers
IDENTIFIER_WITH_NAME(MaxBuiltinIntegerType, "_MaxBuiltinIntegerType")
IDENTIFIER(IntegerLiteralType)
IDENTIFIER_WITH_NAME(AllZeros, "allZeros")
IDENTIFIER_WITH_NAME(BoolValue, "boolValue")
IDENTIFIER_WITH_NAME(NilLiteral, "nilLiteral")
IDENTIFIER_WITH_NAME(IntegerLiteral, "integerLiteral")
IDENTIFIER_WITH_NAME(BuiltinIntegerLiteral, "_builtinIntegerLiteral")
IDENTIFIER_WITH_NAME(MaxBuiltinFloatType, "_MaxBuiltinFloatType")
IDENTIFIER(FloatLiteralType)
IDENTIFIER_WITH_NAME(FloatLiteral, "floatLiteral")
IDENTIFIER_WITH_NAME(BuiltinFloatLiteral, "_builtinFloatLiteral")
IDENTIFIER(BooleanLiteralType)
IDENTIFIER_WITH_NAME(BuiltinBooleanLiteral, "_builtinBooleanLiteral")
IDENTIFIER_WITH_NAME(BooleanLiteral, "booleanLiteral")
IDENTIFIER(CharacterLiteralType)
IDENTIFIER_WITH_NAME(CharacterLiteral, "characterLiteral")
IDENTIFIER_WITH_NAME(BuiltinCharacterLiteral, "_builtinCharacterLiteral")
IDENTIFIER(ExtendedGraphemeClusterLiteralType)
IDENTIFIER_WITH_NAME(BuiltinExtendedGraphemeClusterLiteral,
"_builtinExtendedGraphemeClusterLiteral")
IDENTIFIER_WITH_NAME(ExtendedGraphemeClusterLiteral,
"extendedGraphemeClusterLiteral")
IDENTIFIER(UnicodeScalarLiteralType)
IDENTIFIER_WITH_NAME(BuiltinUnicodeScalarLiteral,
"_builtinUnicodeScalarLiteral")
IDENTIFIER_WITH_NAME(UnicodeScalarLiteral, "unicodeScalarLiteral")
IDENTIFIER_WITH_NAME(StringLiteral, "stringLiteral")
IDENTIFIER_WITH_NAME(BuiltinUTF16StringLiteral, "_builtinUTF16StringLiteral")
IDENTIFIER_WITH_NAME(BuiltinStringLiteral, "_builtinStringLiteral")
IDENTIFIER(StringLiteralType)
IDENTIFIER_WITH_NAME(StringInterpolation, "stringInterpolation")
IDENTIFIER_WITH_NAME(StringInterpolationSegment, "stringInterpolationSegment")
IDENTIFIER_WITH_NAME(ArrayLiteral, "arrayLiteral")
IDENTIFIER_WITH_NAME(DictionaryLiteral, "dictionaryLiteral")
IDENTIFIER_WITH_NAME(GetBuiltinLogicValue, "_getBuiltinLogicValue")
IDENTIFIER_WITH_NAME(CVarArgType, "CVarArgType")
IDENTIFIER_WITH_NAME(OptionalNilComparisonType, "_OptionalNilComparisonType")
#undef IDENTIFIER
#undef IDENTIFIER_WITH_NAME