src/Opcodes.cpp
changeset 256 3c184218462d
parent 247 7721042bdb67
child 263 ba85a47ee414
     1.1 --- a/src/Opcodes.cpp	Tue Jan 01 20:08:34 2013 -0800
     1.2 +++ b/src/Opcodes.cpp	Sun Jan 06 13:52:21 2013 -0800
     1.3 @@ -25,6 +25,7 @@
     1.4  #include "Strings.h"
     1.5  #include "CompactBuffer.h"
     1.6  #include "Structures.h"
     1.7 +#include "Modules.h"
     1.8  #include "Heap-inl.h"
     1.9  
    1.10  using namespace ke;
    1.11 @@ -304,6 +305,19 @@
    1.12              break;
    1.13            }
    1.14  
    1.15 +          case OP_IMPORT:
    1.16 +          {
    1.17 +            unsigned index = READ_UINT32(pc);
    1.18 +            FixedArray *path = code->module()->importPathAt(index);
    1.19 +            fprintf(fp, " ; ");
    1.20 +            for (unsigned i = 0; i < path->length(); i++) {
    1.21 +                fprintf(fp, "%s", String::cast(path->at(i))->chars());
    1.22 +                if (i != path->length() - 1)
    1.23 +                    fprintf(fp, ".");
    1.24 +            }
    1.25 +            break;
    1.26 +          }
    1.27 +
    1.28            default:
    1.29              // Unknown opcode!
    1.30              assert(false);