codecvt.h: Use __builtin_alloca.
2001-02-23 Benjamin Kosnik <bkoz@redhat.com> * include/bits/codecvt.h: Use __builtin_alloca. * include/bits/ostream.tcc: Same. * include/bits/fstream.tcc: Same. From-SVN: r40007
This commit is contained in:
parent
cd33b1d7ec
commit
8ac2677fbb
|
@ -1,3 +1,9 @@
|
||||||
|
2001-02-23 Benjamin Kosnik <bkoz@redhat.com>
|
||||||
|
|
||||||
|
* include/bits/codecvt.h: Use __builtin_alloca.
|
||||||
|
* include/bits/ostream.tcc: Same.
|
||||||
|
* include/bits/fstream.tcc: Same.
|
||||||
|
|
||||||
2001-02-23 Alexandre Oliva <aoliva@redhat.com>
|
2001-02-23 Alexandre Oliva <aoliva@redhat.com>
|
||||||
|
|
||||||
* mknumeric_limits (CC): Use VAR=${VAR=...} form.
|
* mknumeric_limits (CC): Use VAR=${VAR=...} form.
|
||||||
|
|
|
@ -419,7 +419,7 @@
|
||||||
if (__int_bom)
|
if (__int_bom)
|
||||||
{
|
{
|
||||||
size_t __size = __from_end - __from;
|
size_t __size = __from_end - __from;
|
||||||
intern_type* __cfixed = static_cast<intern_type*>(alloca(sizeof(intern_type) * (__size + 1)));
|
intern_type* __cfixed = static_cast<intern_type*>(__builtin_alloca(sizeof(intern_type) * (__size + 1)));
|
||||||
__cfixed[0] = static_cast<intern_type>(__int_bom);
|
__cfixed[0] = static_cast<intern_type>(__int_bom);
|
||||||
char_traits<intern_type>::copy(__cfixed + 1, __from, __size);
|
char_traits<intern_type>::copy(__cfixed + 1, __from, __size);
|
||||||
__cfrom = reinterpret_cast<char*>(__cfixed);
|
__cfrom = reinterpret_cast<char*>(__cfixed);
|
||||||
|
|
|
@ -262,7 +262,7 @@ namespace std
|
||||||
// Part one: (Re)fill external buf (_M_file->_IO_*) from
|
// Part one: (Re)fill external buf (_M_file->_IO_*) from
|
||||||
// external byte sequence (whatever physical byte sink or
|
// external byte sequence (whatever physical byte sink or
|
||||||
// FILE actually is.)
|
// FILE actually is.)
|
||||||
char_type* __conv_buf = static_cast<char_type*>(alloca(sizeof(char_type) * _M_buf_size));
|
char_type* __conv_buf = static_cast<char_type*>(__builtin_alloca(sizeof(char_type) * _M_buf_size));
|
||||||
streamsize __size = _M_file->xsgetn(__conv_buf, _M_buf_size);
|
streamsize __size = _M_file->xsgetn(__conv_buf, _M_buf_size);
|
||||||
|
|
||||||
// Part two: (Re)fill internal buf contents from external buf.
|
// Part two: (Re)fill internal buf contents from external buf.
|
||||||
|
@ -436,7 +436,7 @@ namespace std
|
||||||
// stack. Convert internal buffer plus __c (ie,
|
// stack. Convert internal buffer plus __c (ie,
|
||||||
// "pending sequence") to temporary conversion buffer.
|
// "pending sequence") to temporary conversion buffer.
|
||||||
int __plen = _M_out_end - _M_out_beg;
|
int __plen = _M_out_end - _M_out_beg;
|
||||||
char_type* __pbuf = static_cast<char_type*>(alloca(sizeof(char_type) * __plen + 1));
|
char_type* __pbuf = static_cast<char_type*>(__builtin_alloca(sizeof(char_type) * __plen + 1));
|
||||||
traits_type::copy(__pbuf, this->pbase(), __plen);
|
traits_type::copy(__pbuf, this->pbase(), __plen);
|
||||||
if (!__testeof)
|
if (!__testeof)
|
||||||
{
|
{
|
||||||
|
@ -445,7 +445,7 @@ namespace std
|
||||||
}
|
}
|
||||||
|
|
||||||
char_type* __pend;
|
char_type* __pend;
|
||||||
char* __conv_buf = static_cast<char*>(alloca(__plen));
|
char* __conv_buf = static_cast<char*>(__builtin_alloca(__plen));
|
||||||
char* __conv_end;
|
char* __conv_end;
|
||||||
_M_state_beg = _M_state_cur;
|
_M_state_beg = _M_state_cur;
|
||||||
|
|
||||||
|
|
|
@ -417,7 +417,7 @@ namespace std {
|
||||||
typedef typename traits_type::int_type int_type;
|
typedef typename traits_type::int_type int_type;
|
||||||
|
|
||||||
int_type __plen = static_cast<size_t>(__newlen - __oldlen);
|
int_type __plen = static_cast<size_t>(__newlen - __oldlen);
|
||||||
char_type* __pads = static_cast<char_type*>(alloca(sizeof(char_type) * __plen));
|
char_type* __pads = static_cast<char_type*>(__builtin_alloca(sizeof(char_type) * __plen));
|
||||||
traits_type::assign(__pads, __plen, __ios.fill());
|
traits_type::assign(__pads, __plen, __ios.fill());
|
||||||
|
|
||||||
char_type* __beg;
|
char_type* __beg;
|
||||||
|
@ -496,7 +496,7 @@ namespace std {
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
streamsize __w = __out.width();
|
streamsize __w = __out.width();
|
||||||
_CharT* __pads = static_cast<_CharT*>(alloca(sizeof(_CharT) * __w));
|
_CharT* __pads = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w));
|
||||||
__pads[0] = __c;
|
__pads[0] = __c;
|
||||||
streamsize __len = 1;
|
streamsize __len = 1;
|
||||||
if (__w > __len)
|
if (__w > __len)
|
||||||
|
@ -529,7 +529,7 @@ namespace std {
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
streamsize __w = __out.width();
|
streamsize __w = __out.width();
|
||||||
char* __pads = static_cast<char*>(alloca(__w + 1));
|
char* __pads = static_cast<char*>(__builtin_alloca(__w + 1));
|
||||||
__pads[0] = __c;
|
__pads[0] = __c;
|
||||||
streamsize __len = 1;
|
streamsize __len = 1;
|
||||||
if (__w > __len)
|
if (__w > __len)
|
||||||
|
@ -596,7 +596,7 @@ namespace std {
|
||||||
if (__cerb)
|
if (__cerb)
|
||||||
{
|
{
|
||||||
size_t __clen = __ctraits_type::length(__s);
|
size_t __clen = __ctraits_type::length(__s);
|
||||||
_CharT* __ws = static_cast<_CharT*>(alloca(sizeof(_CharT) * (__clen + 1)));
|
_CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * (__clen + 1)));
|
||||||
for (size_t __i = 0; __i <= __clen; ++__i)
|
for (size_t __i = 0; __i <= __clen; ++__i)
|
||||||
__ws[__i] = __out.widen(__s[__i]);
|
__ws[__i] = __out.widen(__s[__i]);
|
||||||
_CharT* __str = __ws;
|
_CharT* __str = __ws;
|
||||||
|
@ -604,7 +604,7 @@ namespace std {
|
||||||
try {
|
try {
|
||||||
streamsize __len = static_cast<streamsize>(__clen);
|
streamsize __len = static_cast<streamsize>(__clen);
|
||||||
streamsize __w = __out.width();
|
streamsize __w = __out.width();
|
||||||
_CharT* __pads = static_cast<_CharT*>(alloca(sizeof(_CharT) * __w));
|
_CharT* __pads = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w));
|
||||||
|
|
||||||
if (__w > __len)
|
if (__w > __len)
|
||||||
{
|
{
|
||||||
|
@ -637,7 +637,7 @@ namespace std {
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
streamsize __w = __out.width();
|
streamsize __w = __out.width();
|
||||||
char* __pads = static_cast<char*>(alloca(__w));
|
char* __pads = static_cast<char*>(__builtin_alloca(__w));
|
||||||
streamsize __len = static_cast<streamsize>(_Traits::length(__s));
|
streamsize __len = static_cast<streamsize>(_Traits::length(__s));
|
||||||
if (__w > __len)
|
if (__w > __len)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue