Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • anders.blomdell
  • compiler-refactoring
  • labcomm2006
  • labcomm2013
  • labcomm2014
  • master
  • pragma
  • python_sig_hash
  • typedefs
  • typeref
  • v2006.0
  • v2013.0
  • v2014.0
  • v2014.1
  • v2014.2
  • v2014.3
  • v2014.4
  • v2014.5
  • v2014.6
  • v2015.0
20 results

Target

Select target project
0 results Searching
Select Git revision
Loading items
Show changes

Commits on Source 112

12 additional commits have been omitted to prevent performance issues.
280 files
+ 7022
13885
Compare changes
  • Side-by-side
  • Inline

Files

.bzrignore

deleted100644 → 0
+0 −41
Original line number Diff line number Diff line
AST
AST/*
LabComm.class
labComm.jar
lib/java/se/lth/control/labcomm/LabComm.class
lib/java/se/lth/control/labcomm/LabCommDecoderChannel.class
lib/java/se/lth/control/labcomm/LabCommDecoder.class
lib/java/se/lth/control/labcomm/LabCommDecoderRegistry.class
lib/java/se/lth/control/labcomm/LabCommDecoderRegistry$Entry.class
lib/java/se/lth/control/labcomm/LabCommDispatcher.class
lib/java/se/lth/control/labcomm/LabCommEncoderChannel.class
lib/java/se/lth/control/labcomm/LabCommEncoder.class
lib/java/se/lth/control/labcomm/LabCommEncoderRegistry.class
lib/java/se/lth/control/labcomm/LabCommEncoderRegistry$Entry.class
lib/java/se/lth/control/labcomm/LabCommHandler.class
lib/java/se/lth/control/labcomm/LabCommReader.class
lib/java/se/lth/control/labcomm/LabCommSample.class
lib/java/se/lth/control/labcomm/LabCommType.class
lib/java/se/lth/control/labcomm/LabCommWriter.class
gen
labcomm.dll
labcomm.jar
example.c
example.h
example.py
examples/wiki_example/example.encoded
example.encoded
examples/simple/*.class
examples/simple/encoded_data
examples/simple/example_decoder
examples/simple/example_encoder
lib/c/test/test_labcomm_basic_type_encoding
lib/c/test/test_labcomm_generated_encoding
lib/java/se/lth/control/labcomm/WriterWrapper.class
lib/c/liblabcomm.so.1
lib/c/test/test_labcomm_pthread_scheduler
lib/c/liblabcomm_plain_c.so.1
lib/c/test/test_signature_plain_c
test/test_signature_numbers
lib/c/test/test_signature_numbers
lib/c/test/test_labcomm
+1 −0
Original line number Diff line number Diff line
@@ -2,3 +2,4 @@
*.class
*.o
*.pyc
examples/dynamic/gen
+12 −1
Original line number Diff line number Diff line
SUBDIRS=compiler lib test examples packaging
export LABCOMM_JAR=$(shell pwd)/compiler/labcomm_compiler.jar
export LABCOMM_JAR=$(shell pwd)/compiler/labcomm2014_compiler.jar
export LABCOMM=java -jar $(LABCOMM_JAR) 
export VALGRIND=valgrind --leak-check=full --error-exitcode=1

UNAME_S=$(shell uname -s)

.PHONY: all
all: $(SUBDIRS:%=all-%)

.PHONY: all-%
all-%:
ifeq ($(UNAME_S),Darwin)
	DYLD_LIBRARY_PATH=`pwd`/lib/c $(MAKE) -C $*
else
	LD_LIBRARY_PATH=`pwd`/lib/c $(MAKE) -C $*
endif

.PHONY: test
test: $(SUBDIRS:%=test-%)

.PHONY: test-%
test-%:
ifeq ($(UNAME_S),Darwin)
	DYLD_LIBRARY_PATH=`pwd`/lib/c $(MAKE) -C $* test
else
	LD_LIBRARY_PATH=`pwd`/lib/c $(MAKE) -C $* test
endif

.PHONY: clean
clean: $(SUBDIRS:%=clean-%)
Original line number Diff line number Diff line
gen
labcomm2006_compiler.jar
labcomm2014_compiler.jar
labcomm_compiler.jar
labcomm2014_compiler.jar
+0 −43
Original line number Diff line number Diff line
aspect ArrayRewrite {

  syn boolean Dim.isVariable() {
    for (int i = 0 ; i < getNumExp() ; i++) {
      if (getExp(i) instanceof VariableSize) {
	return true;
      }	
    }
    return false;
  }

  rewrite ParseArrayType {
    when (! getDim(0).isVariable()) 
    to FixedArrayType  { 
      if (getNumDim() == 1) {
        return new FixedArrayType(getType(), 
				  getDim(0).getExpList());
      } else {
        List l = new List();
        for (int i = 1 ; i < getNumDim() ; i++) {
	  l.add(getDim(i));
        }
        return new FixedArrayType(new ParseArrayType(getType(), l), 
				  getDim(0).getExpList());
      }
    }
    when (getDim(0).isVariable()) 
    to VariableArrayType  { 
      if (getNumDim() == 1) {
        return new VariableArrayType(getType(), 
				     getDim(0).getExpList());
      } else {
        List l = new List();
        for (int i = 1 ; i < getNumDim() ; i++) {
	  l.add(getDim(i));
        }
        return new VariableArrayType(new ParseArrayType(getType(), l), 
				     getDim(0).getExpList());
      }
    }
  }

}

compiler/2006/DeclNames.jrag

deleted100644 → 0
+0 −14
Original line number Diff line number Diff line
aspect DeclNames {
	inh String Type.declName();
	eq Decl.getType().declName() = getName();

	inh String Field.declName();
	eq StructType.getField(int i).declName() = declName();
    
        //TODO: aspect should be renamed to parent-something

        inh Decl Type.parentDecl();
        inh Decl Field.parentDecl();
        eq Decl.getType().parentDecl() = this;
        eq StructType.getField(int i).parentDecl() = parentDecl();
}

compiler/2006/ErrorCheck.jrag

deleted100644 → 0
+0 −31
Original line number Diff line number Diff line
import java.util.Collection;

aspect ErrorCheck {

	syn int ASTNode.lineNumber() = getLine(getStart());

	protected String ASTNode.errors = null;
	
	protected void ASTNode.error(String s) {
	    s = "Error at " + lineNumber() + ": " + s;
	    if(errors == null) {
	      errors = s;
	    } else {
	      errors = errors + "\n" + s;
	    }
	}

	protected boolean ASTNode.hasErrors() {
		return errors != null;
	}
	public void ASTNode.errorCheck(Collection collection) {
	    nameCheck();
            typeCheck();
	    if(hasErrors())
		collection.add(errors);
	    for(int i = 0; i < getNumChild(); i++) {
		getChild(i).errorCheck(collection);
	    }
	}

}