Changeset 4386


Ignore:
Timestamp:
Jan 1, 2015, 4:34:33 PM (5 years ago)
Author:
cameron
Message:

Add support for ScriptExtensions? and Block properties

Location:
icGREP/icgrep-devel/icgrep
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/compiler.cpp

    r4385 r4386  
    2727#include "UCD/precompiled_gc.h"
    2828#include "UCD/precompiled_sc.h"
     29#include "UCD/precompiled_scx.h"
     30#include "UCD/precompiled_blk.h"
    2931
    3032#include "resolve_properties.cpp"
     
    156158    install_property_gc_fn_ptrs(pablo_compiler);
    157159    install_property_sc_fn_ptrs(pablo_compiler);
     160    install_property_scx_fn_ptrs(pablo_compiler);
     161    install_property_blk_fn_ptrs(pablo_compiler);
    158162
    159163    LLVM_Gen_RetVal retVal = pablo_compiler.compile(main);
  • icGREP/icgrep-devel/icgrep/resolve_properties.cpp

    r4385 r4386  
    8989                else if (theprop == UCD::scx) {
    9090                    // Script extension property identified
    91                     throw std::runtime_error("Script extensions property identified, aborting\n");
     91                    int valcode = dynamic_cast<UCD::EnumeratedPropertyObject *> (UCD::property_object_table[UCD::sc])->GetPropertyValueEnumCode(v);                   
     92                    if (valcode > 0) {
     93                        name->setName("__get_scx_" + UCD::SC_ns::enum_names[valcode]);
     94                    }
     95                }
     96                else if (theprop == UCD::blk) {
     97                    // Block property identified
     98                    int valcode = dynamic_cast<UCD::EnumeratedPropertyObject *> (UCD::property_object_table[UCD::blk])->GetPropertyValueEnumCode(v);                   
     99                    if (valcode > 0) {
     100                        name->setName("__get_blk_" + UCD::BLK_ns::enum_names[valcode]);
     101                    }
    92102                }
    93103                else {
    94                     throw std::runtime_error("other property identified, aborting\n");
     104                    throw std::runtime_error("Property " + UCD::property_full_name[theprop] + " recognized, but not supported in icgrep 1.0");
    95105                }
    96106            }
Note: See TracChangeset for help on using the changeset viewer.