Редактирование: Простые типы данных
Внимание! Вы не авторизовались на сайте. Ваш IP-адрес будет публично видимым, если вы будете вносить любые правки. Если вы войдёте или создадите учётную запись, правки вместо этого будут связаны с вашим именем пользователя, а также у вас появятся другие преимущества.
Правка может быть отменена. Пожалуйста, просмотрите сравнение версий, чтобы убедиться, что это именно те изменения, которые вас интересуют, и нажмите «Записать страницу», чтобы изменения вступили в силу.
Текущая версия | Ваш текст | ||
Строка 6: | Строка 6: | ||
: <pre>The IL makes minimal use of types. By design, the types used are restricted to what is necessary for unambiguous compilation to machine code and C interfacing. Unlike LLVM, QBE is not using types as a means to safety; they are only here for semantic purposes.</pre> | : <pre>The IL makes minimal use of types. By design, the types used are restricted to what is necessary for unambiguous compilation to machine code and C interfacing. Unlike LLVM, QBE is not using types as a means to safety; they are only here for semantic purposes.</pre> | ||
− | Четыре базовых типа: w (word), l (long), s (single) и d (double), соответственно для 32-битных и 64-битных целых чисел, и 32-битных и 64-битных чисел с плавающей | + | Четыре базовых типа: w (word), l (long), s (single) и d (double), соответственно для 32-битных и 64-битных целых чисел, и 32-битных и 64-битных чисел с плавающей запятой номера. Типы указателей недоступны; указатели представляются целым типом, размерности которого достаточно, чтобы представлять все адреса памяти (например, l (long) на 64-разрядных архитектурах). Временные переменные в [[QBE | промежуточном языке]] могут иметь только базовый тип. |
: <pre>The four base types are w (word), l (long), s (single), and d (double), they stand respectively for 32-bit and 64-bit integers, and 32-bit and 64-bit floating-point numbers. There are no pointer types available; pointers are typed by an integer type sufficiently wide to represent all memory addresses (e.g., l on 64-bit architectures). Temporaries in the IL can only have a basic type.</pre> | : <pre>The four base types are w (word), l (long), s (single), and d (double), they stand respectively for 32-bit and 64-bit integers, and 32-bit and 64-bit floating-point numbers. There are no pointer types available; pointers are typed by an integer type sufficiently wide to represent all memory addresses (e.g., l on 64-bit architectures). Temporaries in the IL can only have a basic type.</pre> | ||