1.1 --- a/src/Functions.cpp Mon Jun 10 00:46:29 2013 +0100
1.2 +++ b/src/Functions.cpp Mon Jun 10 01:04:43 2013 +0100
1.3 @@ -1,50 +1,50 @@
1.4 -/*
1.5 - * Copyright (C) 2012 David Anderson
1.6 - *
1.7 - * This file is part of SourcePawn.
1.8 - *
1.9 - * SourcePawn is free software: you can redistribute it and/or modify it under
1.10 - * the terms of the GNU General Public License as published by the Free
1.11 - * Software Foundation, either version 3 of the License, or (at your option)
1.12 - * any later version.
1.13 - *
1.14 - * SourcePawn is distributed in the hope that it will be useful, but WITHOUT ANY
1.15 - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1.16 - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
1.17 - *
1.18 - * You should have received a copy of the GNU General Public License along with
1.19 - * SourcePawn. If not, see http://www.gnu.org/licenses/.
1.20 - */
1.21 -#include "Functions.h"
1.22 -#include "Modules.h"
1.23 -#include "Zone.h"
1.24 -#include "Heap-inl.h"
1.25 -
1.26 -using namespace ke;
1.27 -
1.28 -Function *
1.29 -Function::New(Zone *zone, Handle<Code> code, Handle<FunctionType> type, Handle<String> name,
1.30 - const SourcePosition &pos)
1.31 -{
1.32 - Function *fun = Function::cast(zone->allocate(MapKind_Function, sizeof(Function), Heap::Tenure_Old));
1.33 - if (!fun)
1.34 - return NULL;
1.35 -
1.36 - fun->code_ = code;
1.37 - fun->pos_ = pos;
1.38 - fun->type_ = type;
1.39 - fun->name_ = name;
1.40 - return fun;
1.41 -}
1.42 -
1.43 -Native *
1.44 -Native::New(Zone *zone, Handle<FunctionType> type, size_t index)
1.45 -{
1.46 - Native *fun = Native::cast(zone->allocate(MapKind_Native, sizeof(Native), Heap::Tenure_Old));
1.47 - if (!fun)
1.48 - return NULL;
1.49 -
1.50 - fun->type_ = type;
1.51 - fun->index_ = index;
1.52 - return fun;
1.53 -}
1.54 +/*
1.55 + * Copyright (C) 2012 David Anderson
1.56 + *
1.57 + * This file is part of SourcePawn.
1.58 + *
1.59 + * SourcePawn is free software: you can redistribute it and/or modify it under
1.60 + * the terms of the GNU General Public License as published by the Free
1.61 + * Software Foundation, either version 3 of the License, or (at your option)
1.62 + * any later version.
1.63 + *
1.64 + * SourcePawn is distributed in the hope that it will be useful, but WITHOUT ANY
1.65 + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1.66 + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
1.67 + *
1.68 + * You should have received a copy of the GNU General Public License along with
1.69 + * SourcePawn. If not, see http://www.gnu.org/licenses/.
1.70 + */
1.71 +#include "Functions.h"
1.72 +#include "Modules.h"
1.73 +#include "Zone.h"
1.74 +#include "Heap-inl.h"
1.75 +
1.76 +using namespace ke;
1.77 +
1.78 +Function *
1.79 +Function::New(Zone *zone, Handle<Code> code, Handle<FunctionType> type, Handle<String> name,
1.80 + const SourcePosition &pos)
1.81 +{
1.82 + Function *fun = Function::cast(zone->allocate(MapKind_Function, sizeof(Function), Heap::Tenure_Old));
1.83 + if (!fun)
1.84 + return NULL;
1.85 +
1.86 + fun->code_ = code;
1.87 + fun->pos_ = pos;
1.88 + fun->type_ = type;
1.89 + fun->name_ = name;
1.90 + return fun;
1.91 +}
1.92 +
1.93 +Native *
1.94 +Native::New(Zone *zone, Handle<FunctionType> type, size_t index)
1.95 +{
1.96 + Native *fun = Native::cast(zone->allocate(MapKind_Native, sizeof(Native), Heap::Tenure_Old));
1.97 + if (!fun)
1.98 + return NULL;
1.99 +
1.100 + fun->type_ = type;
1.101 + fun->index_ = index;
1.102 + return fun;
1.103 +}