Changeset 49a980b


Ignore:
Timestamp:
Aug 31, 2020, 5:23:49 PM (15 months ago)
Author:
m3zulfiq <m3zulfiq@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
d3aa64f
Parents:
191a190 (diff), 942453a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Files:
15 added
1 deleted
43 edited
7 moved

Legend:

Unmodified
Added
Removed
  • .gitignore

    r191a190 r49a980b  
    1818**/Makefile
    1919**/Makefile.in
     20**/Makefile.dist.in
    2021/version
    2122
  • Makefile.am

    r191a190 r49a980b  
    2121
    2222SUBDIRS = driver src . @LIBCFA_TARGET_DIRS@
     23DIST_SUBDIRS = driver src . libcfa benchmark longrun_tests tests tools tools/prettyprinter
    2324
    2425@LIBCFA_TARGET_MAKEFILES@ : Makefile $(srcdir)/libcfa/configure
     
    2627        @ls $(config_file) || (echo "Missing config.data, re-run configure script again" && false)
    2728        @$(eval config_data = $(shell cat $(config_file)))
    28         @echo "Configuring libcfa with '$(config_data)''"
     29        @echo "Configuring libcfa ($(abs_top_srcdir)/libcfa/configure) with '$(config_data)' from $(shell pwd) / $(dir $@)"
    2930        @cd $(dir $@) && $(abs_top_srcdir)/libcfa/configure $(config_data)
    3031
     
    3233
    3334man1_MANS = doc/man/cfa.1
     35
     36EXTRA_DIST = LICENSE doc/man/cfa.1 libcfa/configure libcfa/Makefile.dist.am libcfa/Makefile.dist.in
    3437
    3538debug=yes
  • benchmark/Makefile.am

    r191a190 r49a980b  
    6666# Dummy hack tricks
    6767EXTRA_PROGRAMS = dummy # build but do not install
    68 dummy_SOURCES = dummyC.c dummyCXX.cpp
     68nodist_dummy_SOURCES = dummyC.c dummyCXX.cpp
    6969
    7070dummyC.c:
     
    8080## =========================================================================================================
    8181
    82 all : basic$(EXEEXT) ctxswitch$(EXEEXT) mutex$(EXEEXT) schedint$(EXEEXT) schedext$(EXEEXT) creation$(EXEEXT)
     82# all is used by make dist so ignore it
     83all:
     84
     85all-bench : basic$(EXEEXT) ctxswitch$(EXEEXT) mutex$(EXEEXT) schedint$(EXEEXT) schedext$(EXEEXT) creation$(EXEEXT)
    8386
    8487basic_loop_DURATION = 15000000000
     
    476479## =========================================================================================================
    477480
    478 compile$(EXEEXT) :              \
     481bcompile$(EXEEXT) :             \
    479482        compile-array.make      \
    480483        compile-attributes.make \
  • configure.ac

    r191a190 r49a980b  
    137137                \'--enable-gprofiler=*) ;;
    138138                \'--disable-gprofiler) ;;
     139
     140                # skip this, it only causes problems
     141                \'--srcdir=*) ;;
    139142
    140143                # append all other arguments to the sub configure arguments
     
    202205
    203206        LIBCFA_TARGET_DIRS="${LIBCFA_TARGET_DIRS} ${lib_dir}"
     207        LIBCFA_1TARGET_DIR="${lib_dir}"
    204208        LIBCFA_TARGET_MAKEFILES="${LIBCFA_TARGET_MAKEFILES} ${lib_dir}/Makefile"
    205209
     
    213217
    214218AC_SUBST(LIBCFA_TARGET_DIRS)
     219AC_SUBST(LIBCFA_1TARGET_DIR)
    215220AC_SUBST(LIBCFA_TARGET_MAKEFILES)
    216221
     
    278283        driver/Makefile
    279284        src/Makefile
    280         benchmark/Makefile
     285        libcfa/Makefile:libcfa/Makefile.dist.in
    281286        tests/Makefile
    282287        longrun_tests/Makefile
     288        benchmark/Makefile
    283289        tools/Makefile
    284290        tools/prettyprinter/Makefile
  • libcfa/prelude/Makefile.am

    r191a190 r49a980b  
    2222cfalibdir = ${CFA_LIBDIR}
    2323cfalib_DATA = gcc-builtins.cf builtins.cf extras.cf prelude.cfa bootloader.c defines.hfa
     24
     25EXTRA_DIST = bootloader.cf builtins.c builtins.def extras.c extras.regx extras.regx2 prelude-gen.cc prototypes.awk prototypes.c prototypes.sed sync-builtins.cf
    2426
    2527CC = @LOCAL_CFACC@
  • libcfa/src/Makefile.am

    r191a190 r49a980b  
    3131# AM_CFAFLAGS for only cfa source
    3232# use -no-include-stdhdr to prevent rebuild cycles
    33 # The built sources must not depend on the installed headers
    34 AM_CFAFLAGS = -quiet -cfalib -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
     33# The built sources must not depend on the installed inst_headers_src
     34AM_CFAFLAGS = -quiet -cfalib -I$(srcdir)/stdhdr -I$(srcdir)/concurrency $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
    3535AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC -fexceptions -pthread @ARCH_FLAGS@ @CONFIG_CFLAGS@
    3636AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
     
    3939#----------------------------------------------------------------------------------------------------------------
    4040if BUILDLIB
    41 headers_nosrc = bitmanip.hfa exception.hfa math.hfa gmp.hfa time_t.hfa clock.hfa \
    42                 bits/align.hfa bits/containers.hfa bits/defs.hfa bits/debug.hfa bits/locks.hfa \
    43                 containers/list.hfa containers/stackLockFree.hfa concurrency/iofwd.hfa
     41inst_headers_nosrc = \
     42        bitmanip.hfa \
     43        clock.hfa \
     44        exception.hfa \
     45        gmp.hfa \
     46        math.hfa \
     47        time_t.hfa \
     48        bits/align.hfa \
     49        bits/containers.hfa \
     50        bits/debug.hfa \
     51        bits/defs.hfa \
     52        bits/locks.hfa \
     53        concurrency/iofwd.hfa \
     54        containers/list.hfa \
     55        containers/stackLockFree.hfa
    4456
    45 headers = common.hfa fstream.hfa heap.hfa iostream.hfa iterator.hfa limits.hfa rational.hfa \
    46                 time.hfa stdlib.hfa parseargs.hfa \
    47                 containers/maybe.hfa containers/pair.hfa containers/result.hfa containers/vector.hfa
     57inst_headers_src = \
     58        common.hfa \
     59        fstream.hfa \
     60        heap.hfa \
     61        iostream.hfa \
     62        iterator.hfa \
     63        limits.hfa \
     64        parseargs.hfa \
     65        rational.hfa \
     66        stdlib.hfa \
     67        time.hfa \
     68        containers/maybe.hfa \
     69        containers/pair.hfa \
     70        containers/result.hfa \
     71        containers/vector.hfa
    4872
    49 libsrc = startup.cfa interpose.cfa bits/debug.cfa assert.cfa exception.c virtual.c ${headers:.hfa=.cfa}
     73libsrc = ${inst_headers_src} ${inst_headers_src:.hfa=.cfa} \
     74        assert.cfa \
     75        bits/algorithm.hfa \
     76        bits/debug.cfa \
     77        exception.c \
     78        exception.h \
     79        interpose.cfa \
     80        lsda.h \
     81        startup.cfa \
     82        startup.hfa \
     83        virtual.c \
     84        virtual.h
    5085
    5186# not all platforms support concurrency, add option do disable it
    52 thread_headers_nosrc = bits/random.hfa concurrency/invoke.h concurrency/kernel/fwd.hfa
     87inst_thread_headers_nosrc = \
     88        bits/random.hfa \
     89        concurrency/invoke.h \
     90        concurrency/kernel/fwd.hfa
    5391
    54 thread_headers = concurrency/coroutine.hfa concurrency/thread.hfa concurrency/kernel.hfa \
    55                 concurrency/monitor.hfa concurrency/mutex.hfa concurrency/exception.hfa
     92inst_thread_headers_src = \
     93        concurrency/coroutine.hfa \
     94        concurrency/exception.hfa \
     95        concurrency/kernel.hfa \
     96        concurrency/monitor.hfa \
     97        concurrency/mutex.hfa \
     98        concurrency/thread.hfa
    5699
    57 thread_libsrc = concurrency/CtxSwitch-@ARCHITECTURE@.S concurrency/alarm.cfa \
    58                 concurrency/invoke.c concurrency/io.cfa concurrency/iocall.cfa \
    59                 concurrency/io/setup.cfa \
    60                 concurrency/kernel/startup.cfa concurrency/preemption.cfa \
    61                 concurrency/ready_queue.cfa concurrency/stats.cfa \
    62                 ${thread_headers:.hfa=.cfa}
     100thread_libsrc = ${inst_thread_headers_src} ${inst_thread_headers_src:.hfa=.cfa} \
     101        bits/signal.hfa \
     102        concurrency/alarm.cfa \
     103        concurrency/alarm.hfa \
     104        concurrency/CtxSwitch-@ARCHITECTURE@.S \
     105        concurrency/invoke.c \
     106        concurrency/io.cfa \
     107        concurrency/io/setup.cfa \
     108        concurrency/io/types.hfa \
     109        concurrency/iocall.cfa \
     110        concurrency/iofwd.hfa \
     111        concurrency/kernel_private.hfa \
     112        concurrency/kernel/startup.cfa \
     113        concurrency/preemption.cfa \
     114        concurrency/preemption.hfa \
     115        concurrency/ready_queue.cfa \
     116        concurrency/ready_subqueue.hfa \
     117        concurrency/snzi.hfa \
     118        concurrency/stats.cfa \
     119        concurrency/stats.hfa \
     120        concurrency/stats.hfa
     121
    63122else
    64 headers =
    65 thread_headers =
    66 headers_nosrc =
    67 thread_headers_nosrc =
     123inst_headers_src =
     124inst_thread_headers_src =
     125inst_headers_nosrc =
     126inst_thread_headers_nosrc =
    68127libsrc =
    69128endif
     
    115174
    116175#----------------------------------------------------------------------------------------------------------------
    117 libcfa_la_SOURCES = prelude.cfa ${libsrc}
     176libcfa_la_SOURCES = ${libsrc}
     177nodist_libcfa_la_SOURCES = prelude.cfa
    118178libcfa_la_LDFLAGS = -version-info @CFA_VERSION@
    119179
     
    124184
    125185cfa_includedir = $(CFA_INCDIR)
    126 nobase_cfa_include_HEADERS = ${stdhdr} ${headers} ${headers_nosrc} ${thread_headers} ${thread_headers_nosrc}
     186nobase_cfa_include_HEADERS = ${stdhdr} ${inst_headers_src} ${inst_headers_nosrc} ${inst_thread_headers_src} ${inst_thread_headers_nosrc}
     187EXTRA_DIST = stdhdr
    127188
    128189#----------------------------------------------------------------------------------------------------------------
  • libcfa/src/bits/defs.hfa

    r191a190 r49a980b  
    1010// Created On       : Thu Nov  9 13:24:10 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 13 22:00:23 2020
    13 // Update Count     : 19
     12// Last Modified On : Wed Aug 26 16:22:32 2020
     13// Update Count     : 20
    1414//
    1515
     
    4949
    5050static inline long long int rdtscl(void) {
    51         #if defined( __aarch64__ )
     51        #if defined( __i386 ) || defined( __x86_64 )
     52        unsigned int lo, hi;
     53        __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi));
     54        return ( (unsigned long long)lo)|( ((unsigned long long)hi)<<32 );
     55        #elif defined( __aarch64__ ) || defined( __arm__ )
    5256        // https://github.com/google/benchmark/blob/v1.1.0/src/cycleclock.h#L116
    5357        long long int virtual_timer_value;
     
    5559        return virtual_timer_value;
    5660        #else
    57         unsigned int lo, hi;
    58         __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi));
    59         return ( (unsigned long long)lo)|( ((unsigned long long)hi)<<32 );
     61                #error unsupported hardware architecture
    6062        #endif // __ARM_ARCH
    6163}
  • libcfa/src/concurrency/CtxSwitch-arm64.S

    r191a190 r49a980b  
    22// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    33//
    4 // CtxSwitch-arm.S --
     4// CtxSwitch-arm64.S --
    55//
    66// Author           : Peter A. Buhr
    77// Created On       : Sun Aug 16 07:50:13 2020
    88// Last Modified By : Peter A. Buhr
    9 // Last Modified On : Thu Aug 20 18:43:51 2020
    10 // Update Count     : 24
     9// Last Modified On : Wed Aug 26 16:24:59 2020
     10// Update Count     : 25
    1111//
    1212
     
    2626#define SAVE            20 * 8
    2727
    28         .file "CtxSwitch-arm.S"
     28        .file "CtxSwitch-arm64.S"
    2929        .text
    3030        .align 2
    3131        .global __cfactx_switch
    32         .type __cfactx_switch, @function
     32        .type __cfactx_switch, %function
    3333__cfactx_switch:
    3434
     
    9191        .align 2
    9292        .global __cfactx_invoke_stub
    93         .type __cfactx_invoke_stub, @function
     93        .type __cfactx_invoke_stub, %function
    9494__cfactx_invoke_stub:
    9595        mov x0, x19                                                     // load main as parameter 0
  • libcfa/src/concurrency/kernel.cfa

    r191a190 r49a980b  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Aug 14 15:23:00 2020
    13 // Update Count     : 69
     12// Last Modified On : Mon Aug 31 07:08:20 2020
     13// Update Count     : 71
    1414//
    1515
     
    7474                )
    7575
    76 #elif defined( __ARM_ARCH )
     76#elif defined( __arm__ )
     77        #define __x87_store
     78        #define __x87_load
     79
     80#elif defined( __aarch64__ )
    7781        #define __x87_store              \
    7882                uint32_t __fpcntl[2];    \
     
    9397
    9498#else
    95         #error unknown hardware architecture
     99        #error unsupported hardware architecture
    96100#endif
    97101
  • libcfa/src/concurrency/preemption.cfa

    r191a190 r49a980b  
    1010// Created On       : Mon Jun 5 14:20:42 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Aug 21 13:45:32 2020
    13 // Update Count     : 52
     12// Last Modified On : Wed Aug 26 16:46:03 2020
     13// Update Count     : 53
    1414//
    1515
     
    5656#elif defined( __x86_64 )
    5757#define CFA_REG_IP gregs[REG_RIP]
    58 #elif defined( __ARM_ARCH )
     58#elif defined( __arm__ )
     59#define CFA_REG_IP arm_pc
     60#elif defined( __aarch64__ )
    5961#define CFA_REG_IP pc
    6062#else
    61 #error unknown hardware architecture
     63#error unsupported hardware architecture
    6264#endif
    6365
  • libcfa/src/exception.c

    r191a190 r49a980b  
    1010// Created On       : Mon Jun 26 15:13:00 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Aug 21 11:27:56 2020
    13 // Update Count     : 29
     12// Last Modified On : Sat Aug 29 15:52:22 2020
     13// Update Count     : 34
    1414//
    1515
     
    1818
    1919#include "exception.h"
    20 
    21 // Implementation of the secret header is hardware dependent.
    22 #if defined( __x86_64 ) || defined( __i386 )
    23 #elif defined( __ARM_ARCH )
    24 #warning FIX ME: check if anything needed for ARM
    25 #else
    26 #warning Exception Handling: No known architecture detected.
    27 #endif
    2820
    2921#include <stdlib.h>
     
    3426#include "stdhdr/assert.h"
    3527
    36 // FIX ME: temporary hack to keep ARM build working
     28#if defined( __ARM_ARCH )
     29#warning FIX ME: temporary hack to keep ARM build working
    3730#ifndef _URC_FATAL_PHASE1_ERROR
    3831#define _URC_FATAL_PHASE1_ERROR 3
     
    4134#define _URC_FATAL_PHASE2_ERROR 2
    4235#endif // ! _URC_FATAL_PHASE2_ERROR
     36#endif // __ARM_ARCH
    4337
    4438#include "lsda.h"
     
    626620
    627621#pragma GCC pop_options
     622
     623#elif defined( __ARM_ARCH )
     624_Unwind_Reason_Code __gcfa_personality_v0(
     625                int version,
     626                _Unwind_Action actions,
     627                unsigned long long exception_class,
     628                struct _Unwind_Exception * unwind_exception,
     629                struct _Unwind_Context * unwind_context) {
     630        return _URC_CONTINUE_UNWIND;
     631}
     632
     633__attribute__((noinline))
     634void __cfaehm_try_terminate(void (*try_block)(),
     635                void (*catch_block)(int index, exception_t * except),
     636                __attribute__((unused)) int (*match_block)(exception_t * except)) {
     637}
     638#else
     639        #error unsupported hardware architecture
    628640#endif // __x86_64 || __i386
  • src/AST/Convert.cpp

    r191a190 r49a980b  
    705705                        new KeywordCastExpr(
    706706                                get<Expression>().accept1(node->arg),
    707                                 castTarget
     707                                castTarget,
     708                                {node->concrete_target.field, node->concrete_target.getter}
    708709                        )
    709710                );
     
    20872088                                old->location,
    20882089                                GET_ACCEPT_1(arg, Expr),
    2089                                 castTarget
     2090                                castTarget,
     2091                                {old->concrete_target.field, old->concrete_target.getter}
    20902092                        )
    20912093                );
  • src/AST/Expr.hpp

    r191a190 r49a980b  
    312312public:
    313313        ptr<Expr> arg;
     314        struct Concrete {
     315                std::string field;
     316                std::string getter;
     317
     318                Concrete() = default;
     319                Concrete(const Concrete &) = default;
     320        };
    314321        ast::AggregateDecl::Aggregate target;
     322        Concrete concrete_target;
     323
    315324
    316325        KeywordCastExpr( const CodeLocation & loc, const Expr * a, ast::AggregateDecl::Aggregate t )
    317326        : Expr( loc ), arg( a ), target( t ) {}
     327
     328        KeywordCastExpr( const CodeLocation & loc, const Expr * a, ast::AggregateDecl::Aggregate t, const Concrete & ct )
     329        : Expr( loc ), arg( a ), target( t ), concrete_target( ct ) {}
    318330
    319331        /// Get a name for the target type
  • src/AST/module.mk

    r191a190 r49a980b  
    1717SRC_AST = \
    1818        AST/AssertAcyclic.cpp \
     19        AST/AssertAcyclic.hpp \
    1920        AST/Attribute.cpp \
     21        AST/Attribute.hpp \
     22        AST/Bitfield.hpp \
     23        AST/Chain.hpp \
    2024        AST/Convert.cpp \
     25        AST/Convert.hpp \
     26        AST/Copy.hpp \
     27        AST/CVQualifiers.hpp \
    2128        AST/Decl.cpp \
     29        AST/Decl.hpp \
    2230        AST/DeclReplacer.cpp \
     31        AST/DeclReplacer.hpp \
     32        AST/Eval.hpp \
    2333        AST/Expr.cpp \
     34        AST/Expr.hpp \
    2435        AST/ForallSubstitutionTable.cpp \
     36        AST/ForallSubstitutionTable.hpp \
     37        AST/ForallSubstitutor.hpp \
     38        AST/FunctionSpec.hpp \
     39        AST/Fwd.hpp \
    2540        AST/GenericSubstitution.cpp \
     41        AST/GenericSubstitution.hpp \
    2642        AST/Init.cpp \
     43        AST/Init.hpp \
     44        AST/Label.hpp \
    2745        AST/LinkageSpec.cpp \
     46        AST/LinkageSpec.hpp \
    2847        AST/Node.cpp \
     48        AST/Node.hpp \
     49        AST/ParseNode.hpp \
    2950        AST/Pass.cpp \
     51        AST/Pass.hpp \
     52        AST/Pass.impl.hpp \
     53        AST/Pass.proto.hpp \
    3054        AST/Print.cpp \
     55        AST/Print.hpp \
    3156        AST/Stmt.cpp \
     57        AST/Stmt.hpp \
     58        AST/StorageClasses.hpp \
    3259        AST/SymbolTable.cpp \
     60        AST/SymbolTable.hpp \
    3361        AST/Type.cpp \
     62        AST/Type.hpp \
    3463        AST/TypeEnvironment.cpp \
    35         AST/TypeSubstitution.cpp
     64        AST/TypeEnvironment.hpp \
     65        AST/TypeSubstitution.cpp \
     66        AST/TypeSubstitution.hpp \
     67        AST/Visitor.hpp
    3668
    3769SRC += $(SRC_AST)
  • src/CodeGen/module.mk

    r191a190 r49a980b  
    2020SRC_CODEGEN = \
    2121        CodeGen/CodeGenerator.cc \
     22        CodeGen/CodeGenerator.h \
    2223        CodeGen/FixMain.cc \
     24        CodeGen/FixMain.h \
    2325        CodeGen/GenType.cc \
    24         CodeGen/OperatorTable.cc
     26        CodeGen/GenType.h \
     27        CodeGen/OperatorTable.cc \
     28        CodeGen/OperatorTable.h \
     29        CodeGen/Options.h
    2530
    26 SRC += $(SRC_CODEGEN) CodeGen/Generate.cc CodeGen/FixNames.cc
     31SRC += $(SRC_CODEGEN) CodeGen/Generate.cc CodeGen/Generate.h CodeGen/FixNames.cc CodeGen/FixNames.h
    2732SRCDEMANGLE += $(SRC_CODEGEN)
  • src/CodeTools/module.mk

    r191a190 r49a980b  
    1515###############################################################################
    1616
    17 SRC += CodeTools/DeclStats.cc \
     17SRC += \
     18        CodeTools/DeclStats.cc \
     19        CodeTools/DeclStats.h \
    1820        CodeTools/ResolvProtoDump.cc \
    19         CodeTools/TrackLoc.cc
     21        CodeTools/ResolvProtoDump.h \
     22        CodeTools/TrackLoc.cc \
     23        CodeTools/TrackLoc.h
  • src/Common/module.mk

    r191a190 r49a980b  
    1717SRC_COMMON = \
    1818      Common/Assert.cc \
     19      Common/CodeLocation.h \
     20      Common/CompilerError.h \
     21      Common/Debug.h \
     22      Common/ErrorObjects.h \
    1923      Common/Eval.cc \
     24      Common/FilterCombos.h \
     25      Common/Indenter.h \
    2026      Common/PassVisitor.cc \
     27      Common/PassVisitor.h \
     28      Common/PassVisitor.impl.h \
     29      Common/PassVisitor.proto.h \
     30      Common/PersistentMap.h \
     31      Common/ScopedMap.h \
    2132      Common/SemanticError.cc \
     33      Common/SemanticError.h \
     34      Common/Stats.h \
     35      Common/Stats/Base.h \
    2236      Common/Stats/Counter.cc \
     37      Common/Stats/Counter.h \
    2338      Common/Stats/Heap.cc \
     39      Common/Stats/Heap.h \
    2440      Common/Stats/Stats.cc \
    2541      Common/Stats/Time.cc \
    26       Common/UniqueName.cc
     42      Common/Stats/Time.h \
     43      Common/UnimplementedError.h \
     44      Common/UniqueName.cc \
     45      Common/UniqueName.h \
     46      Common/utility.h \
     47      Common/VectorMap.h
    2748
    2849SRC += $(SRC_COMMON) Common/DebugMalloc.cc
  • src/Concurrency/module.mk

    r191a190 r49a980b  
    1515###############################################################################
    1616
    17 SRC += Concurrency/Keywords.cc Concurrency/Waitfor.cc
     17SRC += Concurrency/Keywords.cc Concurrency/Keywords.h Concurrency/Waitfor.cc Concurrency/Waitfor.h
    1818SRCDEMANGLE += Concurrency/Keywords.cc
    1919
  • src/ControlStruct/module.mk

    r191a190 r49a980b  
    1717SRC_CONTROLSTRUCT = \
    1818        ControlStruct/ForExprMutator.cc \
     19        ControlStruct/ForExprMutator.h \
    1920        ControlStruct/LabelFixer.cc \
     21        ControlStruct/LabelFixer.h \
    2022        ControlStruct/LabelGenerator.cc \
     23        ControlStruct/LabelGenerator.h \
    2124        ControlStruct/MLEMutator.cc \
    22         ControlStruct/Mutate.cc
     25        ControlStruct/MLEMutator.h \
     26        ControlStruct/Mutate.cc \
     27        ControlStruct/Mutate.h
    2328
    24 SRC += $(SRC_CONTROLSTRUCT) ControlStruct/ExceptTranslate.cc
     29SRC += $(SRC_CONTROLSTRUCT) ControlStruct/ExceptTranslate.cc ControlStruct/ExceptTranslate.h
    2530SRCDEMANGLE += $(SRC_CONTROLSTRUCT)
    2631
  • src/GenPoly/module.mk

    r191a190 r49a980b  
    1616
    1717SRC += GenPoly/Box.cc \
     18       GenPoly/Box.h \
     19       GenPoly/ErasableScopedMap.h \
     20       GenPoly/FindFunction.cc \
     21       GenPoly/FindFunction.h \
    1822       GenPoly/GenPoly.cc \
     23       GenPoly/GenPoly.h \
     24       GenPoly/InstantiateGeneric.cc \
     25       GenPoly/InstantiateGeneric.h \
     26       GenPoly/Lvalue.cc \
     27       GenPoly/Lvalue.h \
     28       GenPoly/ScopedSet.h \
    1929       GenPoly/ScrubTyVars.cc \
    20        GenPoly/Lvalue.cc \
     30       GenPoly/ScrubTyVars.h \
    2131       GenPoly/Specialize.cc \
    22        GenPoly/FindFunction.cc \
    23        GenPoly/InstantiateGeneric.cc
     32       GenPoly/Specialize.h
    2433
    25 SRCDEMANGLE += GenPoly/GenPoly.cc GenPoly/Lvalue.cc
     34SRCDEMANGLE += GenPoly/GenPoly.cc GenPoly/GenPoly.h GenPoly/Lvalue.cc GenPoly/Lvalue.h
    2635
  • src/InitTweak/module.mk

    r191a190 r49a980b  
    1515###############################################################################
    1616
    17 SRC += InitTweak/GenInit.cc \
     17SRC += \
     18        InitTweak/FixGlobalInit.cc \
     19        InitTweak/FixGlobalInit.h \
    1820        InitTweak/FixInit.cc \
    19         InitTweak/FixGlobalInit.cc \
    20         InitTweak/InitTweak.cc
     21        InitTweak/FixInit.h \
     22        InitTweak/GenInit.cc \
     23        InitTweak/GenInit.h \
     24        InitTweak/InitTweak.cc \
     25        InitTweak/InitTweak.h
    2126
    22 SRCDEMANGLE += InitTweak/GenInit.cc \
    23         InitTweak/InitTweak.cc
     27SRCDEMANGLE += \
     28        InitTweak/GenInit.cc \
     29        InitTweak/GenInit.h \
     30        InitTweak/InitTweak.cc \
     31        InitTweak/InitTweak.h
    2432
  • src/Makefile.am

    r191a190 r49a980b  
    2020
    2121SRC = main.cc \
     22      CompilationState.cc \
     23      CompilationState.h \
    2224      MakeLibCfa.cc \
    23       CompilationState.cc
     25        MakeLibCfa.h
    2426
    2527SRCDEMANGLE = CompilationState.cc
     
    6668___driver_cfa_cpp_SOURCES = $(SRC)
    6769___driver_cfa_cpp_LDADD = -ldl $(LIBPROFILER) $(LIBTCMALLOC)
     70EXTRA_DIST = include/cassert include/optional BasicTypes-gen.cc
    6871
    6972AM_CXXFLAGS = @HOST_FLAGS@ -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I./Parser -I$(srcdir)/Parser -I$(srcdir)/include -DYY_NO_INPUT -O3 -g -std=c++14 $(TCMALLOCFLAG)
  • src/Parser/module.mk

    r191a190 r49a980b  
    2323       Parser/ExpressionNode.cc \
    2424       Parser/InitializerNode.cc \
     25       Parser/lex.ll \
    2526       Parser/ParseNode.cc \
     27       Parser/ParseNode.h \
     28       Parser/parser.yy \
     29       Parser/ParserTypes.h \
     30       Parser/parserutility.cc \
     31       Parser/parserutility.h \
    2632       Parser/StatementNode.cc \
    2733       Parser/TypeData.cc \
     34       Parser/TypeData.h \
    2835       Parser/TypedefTable.cc \
    29        Parser/lex.ll \
    30        Parser/parser.yy \
    31        Parser/parserutility.cc
     36       Parser/TypedefTable.h
    3237
    3338MOSTLYCLEANFILES += Parser/lex.cc Parser/parser.cc Parser/parser.hh Parser/parser.output
  • src/ResolvExpr/CandidateFinder.cpp

    r191a190 r49a980b  
    10891089                }
    10901090
     1091                void postvisit( const ast::KeywordCastExpr * castExpr ) {
     1092                        const auto & loc = castExpr->location;
     1093                        assertf( castExpr->result, "Cast target should have been set in Validate." );
     1094                        auto ref = castExpr->result.strict_as<ast::ReferenceType>();
     1095                        auto inst = ref->base.strict_as<ast::StructInstType>();
     1096                        auto target = inst->base.get();
     1097
     1098                        CandidateFinder finder{ symtab, tenv };
     1099
     1100                        auto pick_alternatives = [target, this](CandidateList & found, bool expect_ref) {
     1101                                for(auto & cand : found) {
     1102                                        const ast::Type * expr = cand->expr->result.get();
     1103                                        if(expect_ref) {
     1104                                                auto res = dynamic_cast<const ast::ReferenceType*>(expr);
     1105                                                if(!res) { continue; }
     1106                                                expr = res->base.get();
     1107                                        }
     1108
     1109                                        if(auto insttype = dynamic_cast<const ast::TypeInstType*>(expr)) {
     1110                                                auto td = cand->env.lookup(insttype->name);
     1111                                                if(!td) { continue; }
     1112                                                expr = td->bound.get();
     1113                                        }
     1114
     1115                                        if(auto base = dynamic_cast<const ast::StructInstType*>(expr)) {
     1116                                                if(base->base == target) {
     1117                                                        candidates.push_back( std::move(cand) );
     1118                                                        reason.code = NoReason;
     1119                                                }
     1120                                        }
     1121                                }
     1122                        };
     1123
     1124                        try {
     1125                                // Attempt 1 : turn (thread&)X into ($thread&)X.__thrd
     1126                                // Clone is purely for memory management
     1127                                std::unique_ptr<const ast::Expr> tech1 { new ast::UntypedMemberExpr(loc, new ast::NameExpr(loc, castExpr->concrete_target.field), castExpr->arg) };
     1128
     1129                                // don't prune here, since it's guaranteed all alternatives will have the same type
     1130                                finder.find( tech1.get(), ResolvMode::withoutPrune() );
     1131                                pick_alternatives(finder.candidates, false);
     1132
     1133                                return;
     1134                        } catch(SemanticErrorException & ) {}
     1135
     1136                        // Fallback : turn (thread&)X into ($thread&)get_thread(X)
     1137                        std::unique_ptr<const ast::Expr> fallback { ast::UntypedExpr::createDeref(loc,  new ast::UntypedExpr(loc, new ast::NameExpr(loc, castExpr->concrete_target.getter), { castExpr->arg })) };
     1138                        // don't prune here, since it's guaranteed all alternatives will have the same type
     1139                        finder.find( fallback.get(), ResolvMode::withoutPrune() );
     1140
     1141                        pick_alternatives(finder.candidates, true);
     1142
     1143                        // Whatever happens here, we have no more fallbacks
     1144                }
     1145
    10911146                void postvisit( const ast::UntypedMemberExpr * memberExpr ) {
    10921147                        CandidateFinder aggFinder{ symtab, tenv };
  • src/ResolvExpr/module.mk

    r191a190 r49a980b  
    1919      ResolvExpr/Alternative.cc \
    2020      ResolvExpr/AlternativeFinder.cc \
     21      ResolvExpr/AlternativeFinder.h \
     22      ResolvExpr/Alternative.h \
    2123      ResolvExpr/Candidate.cpp \
    2224      ResolvExpr/CandidateFinder.cpp \
     25      ResolvExpr/CandidateFinder.hpp \
     26      ResolvExpr/Candidate.hpp \
    2327      ResolvExpr/CastCost.cc \
    2428      ResolvExpr/CommonType.cc \
    2529      ResolvExpr/ConversionCost.cc \
     30      ResolvExpr/ConversionCost.h \
     31      ResolvExpr/Cost.h \
    2632      ResolvExpr/CurrentObject.cc \
     33      ResolvExpr/CurrentObject.h \
    2734      ResolvExpr/ExplodedActual.cc \
     35      ResolvExpr/ExplodedActual.h \
    2836      ResolvExpr/ExplodedArg.cpp \
     37      ResolvExpr/ExplodedArg.hpp \
    2938      ResolvExpr/FindOpenVars.cc \
     39      ResolvExpr/FindOpenVars.h \
    3040      ResolvExpr/Occurs.cc \
    3141      ResolvExpr/PolyCost.cc \
     
    3343      ResolvExpr/PtrsCastable.cc \
    3444      ResolvExpr/RenameVars.cc \
     45      ResolvExpr/RenameVars.h \
    3546      ResolvExpr/ResolveAssertions.cc \
     47      ResolvExpr/ResolveAssertions.h \
    3648      ResolvExpr/Resolver.cc \
     49      ResolvExpr/Resolver.h \
    3750      ResolvExpr/ResolveTypeof.cc \
     51      ResolvExpr/ResolveTypeof.h \
     52      ResolvExpr/ResolvMode.h \
    3853      ResolvExpr/SatisfyAssertions.cpp \
     54      ResolvExpr/SatisfyAssertions.hpp \
    3955      ResolvExpr/SpecCost.cc \
    4056      ResolvExpr/TypeEnvironment.cc \
    41       ResolvExpr/Unify.cc
     57      ResolvExpr/TypeEnvironment.h \
     58      ResolvExpr/typeops.h \
     59      ResolvExpr/Unify.cc \
     60      ResolvExpr/Unify.h \
     61      ResolvExpr/WidenMode.h
    4262
    43 SRC += $(SRC_RESOLVEXPR) ResolvExpr/AlternativePrinter.cc
     63
     64SRC += $(SRC_RESOLVEXPR) ResolvExpr/AlternativePrinter.cc ResolvExpr/AlternativePrinter.h
    4465SRCDEMANGLE += $(SRC_RESOLVEXPR)
  • src/SymTab/module.mk

    r191a190 r49a980b  
    1717SRC_SYMTAB = \
    1818      SymTab/Autogen.cc \
     19      SymTab/Autogen.h \
    1920      SymTab/FixFunction.cc \
     21      SymTab/FixFunction.h \
    2022      SymTab/Indexer.cc \
     23      SymTab/Indexer.h \
    2124      SymTab/Mangler.cc \
    2225      SymTab/ManglerCommon.cc \
    23       SymTab/Validate.cc
     26      SymTab/Mangler.h \
     27      SymTab/Validate.cc \
     28      SymTab/Validate.h
    2429
    2530SRC += $(SRC_SYMTAB)
  • src/SynTree/Expression.cc

    r191a190 r49a980b  
    302302}
    303303
    304 KeywordCastExpr::KeywordCastExpr( Expression * arg, AggregateDecl::Aggregate target ) : Expression(), arg(arg), target( target ) {
    305 }
    306 
    307 KeywordCastExpr::KeywordCastExpr( const KeywordCastExpr & other ) : Expression( other ), arg( maybeClone( other.arg ) ), target( other.target ) {
    308 }
     304KeywordCastExpr::KeywordCastExpr( Expression * arg, AggregateDecl::Aggregate target ) : Expression(), arg(arg), target( target ) {}
     305KeywordCastExpr::KeywordCastExpr( Expression * arg, AggregateDecl::Aggregate target, const KeywordCastExpr::Concrete & concrete_target ) : Expression(), arg(arg), target( target ), concrete_target(concrete_target) {}
     306
     307KeywordCastExpr::KeywordCastExpr( const KeywordCastExpr & other ) : Expression( other ), arg( maybeClone( other.arg ) ), target( other.target ) {}
    309308
    310309KeywordCastExpr::~KeywordCastExpr() {
  • src/SynTree/Expression.h

    r191a190 r49a980b  
    248248
    249249        KeywordCastExpr( Expression * arg, AggregateDecl::Aggregate target );
     250        KeywordCastExpr( Expression * arg, AggregateDecl::Aggregate target, const Concrete & concrete_target );
    250251        KeywordCastExpr( const KeywordCastExpr & other );
    251252        virtual ~KeywordCastExpr();
  • src/SynTree/module.mk

    r191a190 r49a980b  
    2020      SynTree/ApplicationExpr.cc \
    2121      SynTree/ArrayType.cc \
     22      SynTree/Attribute.cc \
     23      SynTree/Attribute.h \
    2224      SynTree/AttrType.cc \
    23       SynTree/Attribute.cc \
     25      SynTree/BaseSyntaxNode.h \
    2426      SynTree/BasicType.cc \
    2527      SynTree/CommaExpr.cc \
    2628      SynTree/CompoundStmt.cc \
    2729      SynTree/Constant.cc \
     30      SynTree/Constant.h \
     31      SynTree/Declaration.cc \
     32      SynTree/Declaration.h \
     33      SynTree/DeclarationWithType.cc \
    2834      SynTree/DeclReplacer.cc \
     35      SynTree/DeclReplacer.h \
    2936      SynTree/DeclStmt.cc \
    30       SynTree/Declaration.cc \
    31       SynTree/DeclarationWithType.cc \
    3237      SynTree/Expression.cc \
     38      SynTree/Expression.h \
    3339      SynTree/FunctionDecl.cc \
    3440      SynTree/FunctionType.cc \
    3541      SynTree/Initializer.cc \
     42      SynTree/Initializer.h \
     43      SynTree/Label.h \
    3644      SynTree/LinkageSpec.cc \
     45      SynTree/LinkageSpec.h \
     46      SynTree/Mutator.h \
    3747      SynTree/NamedTypeDecl.cc \
    3848      SynTree/ObjectDecl.cc \
     
    4151      SynTree/ReferenceType.cc \
    4252      SynTree/Statement.cc \
     53      SynTree/Statement.h \
     54      SynTree/SynTree.h \
    4355      SynTree/TupleExpr.cc \
    4456      SynTree/TupleType.cc \
     
    4658      SynTree/TypeDecl.cc \
    4759      SynTree/TypeExpr.cc \
     60      SynTree/Type.h \
     61      SynTree/TypeofType.cc \
    4862      SynTree/TypeSubstitution.cc \
    49       SynTree/TypeofType.cc \
     63      SynTree/TypeSubstitution.h \
    5064      SynTree/VarArgsType.cc \
     65      SynTree/Visitor.h \
    5166      SynTree/VoidType.cc \
    5267      SynTree/ZeroOneType.cc
  • src/Tuples/module.mk

    r191a190 r49a980b  
    1515###############################################################################
    1616
    17 SRC += Tuples/TupleAssignment.cc Tuples/TupleExpansion.cc Tuples/Explode.cc \
    18         Tuples/Tuples.cc
    19 SRCDEMANGLE += Tuples/TupleAssignment.cc Tuples/TupleExpansion.cc Tuples/Explode.cc \
    20         Tuples/Tuples.cc
     17SRC_TUPLES = \
     18        Tuples/Explode.cc \
     19        Tuples/Explode.h \
     20        Tuples/TupleAssignment.cc \
     21        Tuples/TupleExpansion.cc \
     22        Tuples/Tuples.cc \
     23        Tuples/Tuples.h
     24
     25
     26SRC += $(SRC_TUPLES)
     27SRCDEMANGLE += $(SRC_TUPLES)
  • src/Validate/module.mk

    r191a190 r49a980b  
    1515###############################################################################
    1616
    17 SRC += Validate/HandleAttributes.cc Validate/FindSpecialDecls.cc
    18 SRCDEMANGLE += Validate/HandleAttributes.cc Validate/FindSpecialDecls.cc
     17SRC += Validate/HandleAttributes.cc Validate/HandleAttributes.h Validate/FindSpecialDecls.cc Validate/FindSpecialDecls.h
     18SRCDEMANGLE += Validate/HandleAttributes.cc Validate/HandleAttributes.h Validate/FindSpecialDecls.cc Validate/FindSpecialDecls.h
  • src/Virtual/module.mk

    r191a190 r49a980b  
    1515###############################################################################
    1616
    17 SRC += Virtual/ExpandCasts.cc
     17SRC += Virtual/ExpandCasts.cc Virtual/ExpandCasts.h
  • tests/.expect/castError.txt

    r191a190 r49a980b  
    33  Name: f
    44... to:
    5   char
    6 with resolved type:
    75  char Alternatives are:
    86Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of:
     
    119      ... returning nothing
    1210
    13       with resolved type:
    14         pointer to function
    15           accepting unspecified arguments
    16         ... returning nothing
    17 
    1811    ... to:
    19       char
    20     with resolved type:
    2112      char
    2213  (types:
     
    2718Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of:
    2819      Variable Expression: f: double
    29       with resolved type:
    30         double
    3120    ... to:
    32       char
    33     with resolved type:
    3421      char
    3522  (types:
     
    4027Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of:
    4128      Variable Expression: f: signed int
    42       with resolved type:
    43         signed int
    4429    ... to:
    45       char
    46     with resolved type:
    4730      char
    4831  (types:
     
    5639  Comma Expression:
    5740    constant expression (3 3: signed int)
    58     with resolved type:
    59       signed int
    6041    Name: v
    61 ... to: nothing
    62 with resolved type:
    63   void  Alternatives are:
     42... to: nothing Alternatives are:
    6443Cost ( 0, 0, 2, 0, 0, 0, 0 ): Generated Cast of:
    6544      Comma Expression:
    6645        constant expression (3 3: signed int)
    67         with resolved type:
    68           signed int
    6946        Variable Expression: v: unsigned char
    70         with resolved type:
    71           unsigned char
    72       with resolved type:
    73         unsigned char
    7447    ... to: nothing
    75     with resolved type:
    76       void
    7748  (types:
    7849    void
     
    8354      Comma Expression:
    8455        constant expression (3 3: signed int)
    85         with resolved type:
    86           signed int
    8756        Variable Expression: v: signed short int
    88         with resolved type:
    89           signed short int
    90       with resolved type:
    91         signed short int
    9257    ... to: nothing
    93     with resolved type:
    94       void
    9558  (types:
    9659    void
     
    10669    char
    10770
    108 with resolved type:
    109   instance of struct S with body 1
    110   ... with parameters
    111     char
    112 
  • tests/.expect/init1.txt

    r191a190 r49a980b  
    1111... to:
    1212  reference to signed int
    13 with resolved type:
    14   reference to signed int
    1513init1.cfa:97:1 error: No reasonable alternatives for expression Applying untyped:
    1614  Name: ?{}
     
    1816  Generated Cast of:
    1917    Variable Expression: _retval_f_py: pointer to signed int
    20     with resolved type:
    21       pointer to signed int
    2218  ... to:
    23     reference to pointer to signed int
    24   with resolved type:
    2519    reference to pointer to signed int
    2620  Name: px
     
    3024... to:
    3125  reference to float
    32 with resolved type:
    33   reference to float
    3426init1.cfa:107:1 error: No reasonable alternatives for expression Applying untyped:
    3527  Name: ?{}
     
    3729  Generated Cast of:
    3830    Variable Expression: _retval_f_py2: pointer to float
    39     with resolved type:
    40       pointer to float
    4131  ... to:
    42     reference to pointer to float
    43   with resolved type:
    4432    reference to pointer to float
    4533  Name: cpx
     
    4937... to:
    5038  reference to instance of type T (not function type)
    51 with resolved type:
    52   reference to instance of type T (not function type)
    5339init1.cfa:118:1 error: No reasonable alternatives for expression Applying untyped:
    5440  Name: ?{}
     
    5642  Generated Cast of:
    5743    Variable Expression: _retval_anycvt: pointer to instance of type T (not function type)
    58     with resolved type:
    59       pointer to instance of type T (not function type)
    6044  ... to:
    61     reference to pointer to instance of type T (not function type)
    62   with resolved type:
    6345    reference to pointer to instance of type T (not function type)
    6446  Name: s
  • tests/Makefile.am

    r191a190 r49a980b  
    6767avl_test_SOURCES = avltree/avl_test.cfa avltree/avl0.cfa avltree/avl1.cfa avltree/avl2.cfa avltree/avl3.cfa avltree/avl4.cfa avltree/avl-private.cfa
    6868# automake doesn't know we still need C/CPP rules so pretend like we have a C program
    69 _dummy_hack_SOURCES = .dummy_hack.c .dummy_hackxx.cpp
     69nodist__dummy_hack_SOURCES = .dummy_hack.c .dummy_hackxx.cpp
    7070
    7171#----------------------------------------------------------------------------------------------------------------
  • tests/errors/.expect/completeType.x64.txt

    r191a190 r49a980b  
    66    Name: x
    77
    8 ... to: nothing
    9 with resolved type:
    10   void  Alternatives are:
     8... to: nothing Alternatives are:
    119Cost ( 0, 1, 2, 0, 1, -1, 0 ): Generated Cast of:
    1210      Application of
     
    2220
    2321
    24         with resolved type:
    25           pointer to forall
    26             _90_4_DT: data type
    27             function
    28           ... with parameters
    29             intrinsic pointer to instance of type _90_4_DT (not function type)
    30           ... returning
    31             _retval__operator_deref: reference to instance of type _90_4_DT (not function type)
    32             ... with attributes:
    33               Attribute with name: unused
    34 
    35 
    3622      ... to arguments
    3723        Variable Expression: x: pointer to instance of struct A with body 0
    38         with resolved type:
    39           pointer to instance of struct A with body 0
    4024
    41       with resolved type:
    42         reference to instance of struct A with body 0
    4325    ... to: nothing
    44     with resolved type:
    45       void
    4626  (types:
    4727    void
     
    6343
    6444
    65         with resolved type:
    66           pointer to forall
    67             _90_4_DT: data type
    68             function
    69           ... with parameters
    70             intrinsic pointer to instance of type _90_4_DT (not function type)
    71           ... returning
    72             _retval__operator_deref: reference to instance of type _90_4_DT (not function type)
    73             ... with attributes:
    74               Attribute with name: unused
    75 
    76 
    7745      ... to arguments
    7846        Variable Expression: x: pointer to instance of struct B with body 1
    79         with resolved type:
    80           pointer to instance of struct B with body 1
    8147
    82       with resolved type:
    83         reference to instance of struct B with body 1
    8448    ... to: nothing
    85     with resolved type:
    86       void
    8749  (types:
    8850    void
     
    159121            ... returning nothing
    160122
    161             with resolved type:
    162               pointer to forall
    163                 _109_0_T: sized data type
    164                 ... with assertions
    165                   ?=?: pointer to function
    166                   ... with parameters
    167                     reference to instance of type _109_0_T (not function type)
    168                     instance of type _109_0_T (not function type)
    169                   ... returning
    170                     _retval__operator_assign: instance of type _109_0_T (not function type)
    171                     ... with attributes:
    172                       Attribute with name: unused
    173 
    174 
    175                   ?{}: pointer to function
    176                   ... with parameters
    177                     reference to instance of type _109_0_T (not function type)
    178                   ... returning nothing
    179 
    180                   ?{}: pointer to function
    181                   ... with parameters
    182                     reference to instance of type _109_0_T (not function type)
    183                     instance of type _109_0_T (not function type)
    184                   ... returning nothing
    185 
    186                   ^?{}: pointer to function
    187                   ... with parameters
    188                     reference to instance of type _109_0_T (not function type)
    189                   ... returning nothing
    190 
    191 
    192                 function
    193               ... with parameters
    194                 pointer to instance of type _109_0_T (not function type)
    195               ... returning nothing
    196 
    197123          ... to arguments
    198124            Variable Expression: z: pointer to instance of type T (not function type)
    199             with resolved type:
    200               pointer to instance of type T (not function type)
    201125
    202           with resolved type:
    203             void
    204126        (types:
    205127          void
  • tests/literals.cfa

    r191a190 r49a980b  
    1010// Created On       : Sat Sep  9 16:34:38 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 20 13:51:12 2020
    13 // Update Count     : 225
     12// Last Modified On : Sat Aug 29 10:57:56 2020
     13// Update Count     : 226
    1414//
    1515
     
    151151        -0X0123456789.0123456789P-09;  -0X0123456789.0123456789P-09f;  -0X0123456789.0123456789P-09l;  -0X0123456789.0123456789P-09F;  -0X0123456789.0123456789P-09L;
    152152
     153#if defined( __i386 ) || defined( __x86_64 )
    153154#if defined(__GNUC__) && __GNUC_PREREQ(7,0)                             // gcc version >= 7
    154155// floating with length, gcc f16/f128x unsupported and no prelude code for any _FloatXXx, so they work by conversion to long double
     
    194195        /* -0x123456789.0123456789P-09F16; */  -0x123456789.0123456789P-09F32;  -0x123456789.0123456789P-09F32x;  -0x123456789.0123456789P-09F64;  -0x123456789.0123456789P-09F64x;  -0x123456789.0123456789P-09W;  -0x123456789.0123456789P-09F128;  -0x123456789.0123456789P-09q;  /* -0x123456789.0123456789P-09q; */
    195196#endif // __GNUC_PREREQ(7,0)
     197#endif // __i386 ) || __x86_64
    196198
    197199#ifdef __CFA__
  • tests/pybin/tools.py

    r191a190 r49a980b  
    238238# helper function to check if a files contains only a specific string
    239239def file_contains_only(file, text) :
    240         with open(file) as f:
     240        with open(file, encoding="latin-1") as f: # use latin-1 so all chars mean something.
    241241                ff = f.read().strip()
    242242                result = ff == text.strip()
  • tests/raii/.expect/ctor-autogen-ERR1.txt

    r191a190 r49a980b  
    77        x: signed int
    88      ... returning nothing
    9 
    10       with resolved type:
    11         function
    12         ... with parameters
    13           _dst: reference to instance of struct Managed with body 1
    14           x: signed int
    15         ... returning nothing
    169
    1710      ... deleted by: ?{}: function
     
    3326
    3427
    35               with resolved type:
    36                 pointer to function
    37                 ... with parameters
    38                   intrinsic reference to signed int
    39                   intrinsic signed int
    40                 ... returning
    41                   _retval__operator_assign: signed int
    42                   ... with attributes:
    43                     Attribute with name: unused
    44 
    45 
    4628            ... to arguments
    4729              Generated Cast of:
     
    5133                  Generated Cast of:
    5234                    Variable Expression: m: reference to instance of struct Managed with body 1
    53                     with resolved type:
    54                       reference to instance of struct Managed with body 1
    5535                  ... to:
    5636                    instance of struct Managed with body 1
    57                   with resolved type:
    58                     instance of struct Managed with body 1
    59                 with resolved type:
    60                   signed int
    6137              ... to:
    62                 reference to signed int
    63               with resolved type:
    6438                reference to signed int
    6539              Generated Cast of:
    6640                constant expression (0 0: zero_t)
    67                 with resolved type:
    68                   zero_t
    6941              ... to:
    7042                signed int
    71               with resolved type:
    72                 signed int
    7343
    74             with resolved type:
    75               signed int
    7644            ... with environment:
    7745              Types:
     
    8250    Generated Cast of:
    8351      Variable Expression: x: instance of struct Managed with body 1
    84       with resolved type:
    85         instance of struct Managed with body 1
    8652    ... to:
    8753      reference to instance of struct Managed with body 1
    88     with resolved type:
    89       reference to instance of struct Managed with body 1
    9054    constant expression (123 123: signed int)
    91     with resolved type:
    92       signed int
    9355
    94   with resolved type:
    95     void
    9656... to: nothing
    97 with resolved type:
    98   void
  • tests/test.py

    r191a190 r49a980b  
    194194                if success(retcode):
    195195                        if settings.generating :
    196                                 # if we are ounly generating the output we still need to check that the test actually exists
     196                                # if we are only generating the output we still need to check that the test actually exists
    197197                                if no_rule(out_file, test.target()) :
    198198                                        retcode = 1
  • tests/warnings/.expect/self-assignment.txt

    r191a190 r49a980b  
    11warnings/self-assignment.cfa:29:1 warning: self assignment of expression: Generated Cast of:
    22  Variable Expression: j: signed int
    3   with resolved type:
    4     signed int
    53... to:
    6   reference to signed int
    7 with resolved type:
    84  reference to signed int
    95warnings/self-assignment.cfa:30:1 warning: self assignment of expression: Generated Cast of:
    106  Variable Expression: s: instance of struct S with body 1
    11   with resolved type:
    12     instance of struct S with body 1
    137... to:
    14   reference to instance of struct S with body 1
    15 with resolved type:
    168  reference to instance of struct S with body 1
    179warnings/self-assignment.cfa:31:1 warning: self assignment of expression: Generated Cast of:
     
    2012  ... from aggregate:
    2113    Variable Expression: s: instance of struct S with body 1
    22     with resolved type:
    23       instance of struct S with body 1
    24   with resolved type:
    25     signed int
    2614... to:
    27   reference to signed int
    28 with resolved type:
    2915  reference to signed int
    3016warnings/self-assignment.cfa:32:1 warning: self assignment of expression: Generated Cast of:
     
    3622    ... from aggregate:
    3723      Variable Expression: t: instance of struct T with body 1
    38       with resolved type:
    39         instance of struct T with body 1
    40     with resolved type:
    41       instance of struct S with body 1
    42   with resolved type:
    43     signed int
    4424... to:
    4525  reference to signed int
    46 with resolved type:
    47   reference to signed int
  • tools/Makefile.am

    r191a190 r49a980b  
    1818ACLOCAL_AMFLAGS  = -I automake
    1919
    20 AM_CFLAGS = -Wall -Wextra -O2 -g
     20EXTRA_DIST = build/distcc_hash build/push2dist.sh
    2121
    2222noinst_PROGRAMS = busy catchsig repeat watchdog
     23AM_CFLAGS = -Wall -Wextra -O2 -g
     24busy_LDFLAGS     = -pthread
    2325
    24 busy_SOURCES     = busy.c
    25 busy_LDFLAGS     = -pthread
    26 catchsig_SOURCES = catchsig.c
    27 repeat_SOURCES   = repeat.c
    28 watchdog_SOURCES = watchdog.c
     26nodist_busy_SOURCES     = busy.c
     27nodist_catchsig_SOURCES = catchsig.c
     28nodist_repeat_SOURCES   = repeat.c
     29nodist_watchdog_SOURCES = watchdog.c
  • tools/prettyprinter/Makefile.am

    r191a190 r49a980b  
    3030tools_prettyprinter_PROGRAMS = pretty
    3131tools_prettyprinterdir = ../
    32 pretty_SOURCES = ${SRC}
     32nodist_pretty_SOURCES = ${SRC}
    3333pretty_LDADD = ${LEXLIB} -ldl                   # yywrap
    3434pretty_CXXFLAGS = -Wno-deprecated -Wall -DYY_NO_INPUT -O2 -g -std=c++14
Note: See TracChangeset for help on using the changeset viewer.