jitcraft/NameBinding.cpp
author David Anderson <dvander@alliedmods.net>
Wed Jul 04 19:39:00 2012 -0400 (2012-07-04)
changeset 47 050939c6181e
parent 25 23e8b3d8e4e6
child 54 8e22792a3921
permissions -rw-r--r--
Implemented gcmaps and stack frame tracing.
dvander@0
     1
/*
dvander@0
     2
 * Copyright (C) 2012 David Anderson
dvander@0
     3
 *
dvander@0
     4
 * This file is part of JITCraft.
dvander@0
     5
 *
dvander@0
     6
 * JITCraft is free software: you can redistribute it and/or modify it under
dvander@0
     7
 * the terms of the GNU General Public License as published by the Free
dvander@0
     8
 * Software Foundation, either version 3 of the License, or (at your option)
dvander@0
     9
 * any later version.
dvander@0
    10
 * 
dvander@0
    11
 * Foobar is distributed in the hope that it will be useful, but WITHOUT ANY
dvander@0
    12
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
dvander@0
    13
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
dvander@0
    14
 *
dvander@0
    15
 * You should have received a copy of the GNU General Public License along with
dvander@0
    16
 * JITCraft. If not, see http://www.gnu.org/licenses/.
dvander@0
    17
 */
dvander@0
    18
#include "NameBinding.h"
dvander@47
    19
#include "Zone.h"
dvander@0
    20
dvander@0
    21
using namespace jc;
dvander@0
    22
dvander@25
    23
BoundName::BoundName(Scope *scope, Name *name, const SourcePosition &pos)
dvander@0
    24
  : scope_(scope),
dvander@21
    25
    name_(name),
dvander@25
    26
    type_(NULL),
dvander@25
    27
    pos_(pos)
dvander@0
    28
{
dvander@0
    29
}
dvander@0
    30
dvander@25
    31
NamedFunction::NamedFunction(Scope *scope, Name *name, const SourcePosition &pos)
dvander@25
    32
  : BoundName(scope, name, pos)
dvander@0
    33
{
dvander@0
    34
}
dvander@0
    35
dvander@25
    36
Variable::Variable(Scope *scope, Name *name, const SourcePosition &pos)
dvander@25
    37
  : BoundName(scope, name, pos),
dvander@0
    38
    location_(UNALLOCATED)
dvander@0
    39
{
dvander@0
    40
}