Permalink
Browse files

drop using static from stages 0 and 1

  • Loading branch information...
1 parent 650fdfe commit 4006a0bf623cf2f18a4c55b8288cceac09c15336 @NotFound committed Apr 29, 2012
Showing with 0 additions and 64 deletions.
  1. +0 −31 winxedst0.cpp
  2. +0 −33 winxedst1.winxed
View
@@ -1301,34 +1301,6 @@ ExternStatement::ExternStatement(Tokenizer &tk)
//**********************************************************************
-class StaticStatement : public BaseStatement
-{
-public:
- StaticStatement(Block &bl, Tokenizer &tk)
- {
- Token t;
- do {
- t = tk.get();
- std::string name = t.identifier();
- names.push_back(name);
- bl.genlocal(name, REGvar);
- } while ((t= tk.get()).isop(','));
- RequireOp(';', t);
- }
-private:
- void emit (Emit &e)
- {
- for (size_t i= 0; i < names.size(); ++i) {
- std::string name = names[i];
- e << ".const 'Sub' " << name << " = '" << name << "'\n";
- }
- }
-
- std::vector<std::string> names;
-};
-
-//**********************************************************************
-
class Expr : public InBlock
{
public:
@@ -2141,9 +2113,6 @@ BaseStatement *parseUsing(Block &block, Tokenizer &tk)
{
return new ExternStatement(tk);
}
- else if (t.iskeyword("static")) {
- return new StaticStatement(block, tk);
- }
else
{
NamespaceKey ns;
View
@@ -2310,8 +2310,6 @@ function parseUsing(t, tk, owner)
switch {
case taux.iskeyword('extern'):
return new ExternStatement(t, tk, owner);
- case taux.iskeyword('static'):
- return new StaticStatement(t, tk, owner);
case taux.iskeyword('namespace'):
return new UsingNamespaceStatement(taux, tk, owner);
default:
@@ -2589,37 +2587,6 @@ class ExternStatement : Statement
}
//*********************************************
-// StaticStatement
-//*********************************************
-
-class StaticStatement : Statement
-{
- var names;
- function StaticStatement(start, tk, owner)
- {
- self.Statement(start, owner);
- var names = parseList(tk, null, parseIdentifier, ';');
- for (var name in names) {
- string id = self.generatesubid();
- self.createvarnamed(name, REGvar, id);
- }
- self.names = names;
- }
- function optimize()
- {
- return self;
- }
- function emit(e)
- {
- self.annotate(e);
- for (var name in self.names) {
- var v = self.getvar(name);
- e.say(".const 'Sub' ", v.getreg(), " = '", name, "'");
- }
- }
-}
-
-//*********************************************
// UsingStatement
//*********************************************

0 comments on commit 4006a0b

Please sign in to comment.