gboolean
mono_w32file_replace (const gunichar2 *destination_file_name, const gunichar2 *source_file_name, const gunichar2 *destination_backup_file_name, guint32 flags, gint32 *error)
{
- const gboolean result = ReplaceFile (destination_file_name, source_file_name, destination_backup_file_name, flags, NULL, NULL);
+ gboolean result;
+
+ result = ReplaceFile (destination_file_name, source_file_name, destination_backup_file_name, flags, NULL, NULL);
if (!result)
*error = mono_w32error_get_last ();
return result;
gint64
mono_w32file_get_file_size (gpointer handle, gint32 *error)
{
+ gint64 length;
guint32 length_hi = 0;
- const gint64 length = GetFileSize (handle, &length_hi);
- if (length == INVALID_FILE_SIZE)
- *error = mono_w32error_get_last ();
+ length = GetFileSize (handle, &length_hi);
+ if(length==INVALID_FILE_SIZE) {
+ *error=mono_w32error_get_last ();
+ }
return length | ((gint64)length_hi << 32);
}
* we avoid folding constants that when computed would raise an error, in
* case the user code was expecting to get that error raised
*/
- if (fsig->param_count == 1 && args [0]->opcode == OP_R8CONST) {
+ if (fsig->param_count == 1 && args [0]->opcode == OP_R8CONST){
double source = *(double *)args [0]->inst_p0;
int opcode = 0;
const char *mname = cmethod->name;
if (c == 'A'){
if (strcmp (mname, "Abs") == 0 && fsig->params [0]->type == MONO_TYPE_R8) {
opcode = OP_ABS;
- } else if (strcmp (mname, "Asin") == 0) {
+ } else if (strcmp (mname, "Asin") == 0){
if (fabs (source) <= 1)
opcode = OP_ASIN;
- } else if (strcmp (mname, "Asinh") == 0) {
+ } else if (strcmp (mname, "Asinh") == 0){
opcode = OP_ASINH;
- } else if (strcmp (mname, "Acos") == 0) {
+ } else if (strcmp (mname, "Acos") == 0){
if (fabs (source) <= 1)
opcode = OP_ACOS;
- } else if (strcmp (mname, "Acosh") == 0) {
+ } else if (strcmp (mname, "Acosh") == 0){
if (source >= 1)
opcode = OP_ACOSH;
- } else if (strcmp (mname, "Atan") == 0) {
+ } else if (strcmp (mname, "Atan") == 0){
opcode = OP_ATAN;
- } else if (strcmp (mname, "Atanh") == 0) {
+ } else if (strcmp (mname, "Atanh") == 0){
if (fabs (source) < 1)
opcode = OP_ATANH;
}
- } else if (c == 'C') {
+ } else if (c == 'C'){
if (strcmp (mname, "Cos") == 0) {
if (!isinf (source))
opcode = OP_COS;
- } else if (strcmp (mname, "Cbrt") == 0) {
+ } else if (strcmp (mname, "Cbrt") == 0){
opcode = OP_CBRT;
- } else if (strcmp (mname, "Cosh") == 0) {
+ } else if (strcmp (mname, "Cosh") == 0){
opcode = OP_COSH;
}
- } else if (c == 'R') {
+ } else if (c == 'R'){
if (strcmp (mname, "Round") == 0)
opcode = OP_ROUND;
- } else if (c == 'S') {
+ } else if (c == 'S'){
if (strcmp (mname, "Sin") == 0) {
if (!isinf (source))
opcode = OP_SIN;
} else if (strcmp (mname, "Sqrt") == 0) {
if (source >= 0)
opcode = OP_SQRT;
- } else if (strcmp (mname, "Sinh") == 0) {
+ } else if (strcmp (mname, "Sinh") == 0){
opcode = OP_SINH;
}
- } else if (c == 'T') {
+ } else if (c == 'T'){
if (strcmp (mname, "Tan") == 0){
if (!isinf (source))
opcode = OP_TAN;
- } else if (strcmp (mname, "Tanh") == 0) {
+ } else if (strcmp (mname, "Tanh") == 0){
opcode = OP_TANH;
}
}
ins->dreg = mono_alloc_dreg (cfg, (MonoStackType) ins->type);
ins->inst_p0 = dest;
- switch (opcode) {
+ switch (opcode){
case OP_ABS:
result = fabs (source);
break;