Commits

Anonymous committed 51a36d5

Fixed typo in out of memory.

Comments (0)

Files changed (6)

         if (seq->free == 0) {                                           \
             seq = AR_REALLOCTE(seq, Ar##tp##Seq,                        \
                                sizeof(ArAstNode *)*(seq->count*2));     \
-            if (!seq) arana_out_of_meory(ps->AI, ps->CF);               \
+            if (!seq) arana_out_of_memory(ps->AI, ps->CF);               \
             seq->free = seq->count;                                     \
             seq->count *= 2;                                            \
         }                                                               \
     return result;
 }
 
+static Ar_size_t
+arana_compiler_get_stack_size(AR_SIG, ArCodeUnit *unit)
+{
+    return 0;
+}
+
 static ArCode *
 arana_compiler_make_code(COMPILER_SIG)
 {
     code->filename = compiler->unit->filename;
     code->vars = arana_compiler_make_localtuple(AR_ISIG, compiler->unit->vars);
     code->ops = compiler->unit->ops;
+    code->stack_size = arana_compiler_get_stack_size(AR_SIG, compiler->unit);
     return code;
 }
 
     AR consts;
     AR vars;
     struct _ArOp *ops;
+    AR_size_t stack_size;
 } ArCode;
 
 typedef struct _ArCodeUnit {
 }
 
 void
-arana_out_of_meory(AR_SIG)
+arana_out_of_memory(AR_SIG)
 {
     AR_RAISE(AI->_out_of_memory_error);
 }
                                           AR message);
 AR_API_FUNC(AR) arana_stop_iteration_error_new(AR_SIG);
 AR_API_FUNC(AR) arana_io_error_new(AR_SIG, AR message);
-AR_API_FUNC(void) arana_out_of_meory(AR_SIG);
+AR_API_FUNC(void) arana_out_of_memory(AR_SIG);
 
 AR_API_DATA(ArObjectType) ArErrorType;
 AR_API_DATA(ArObjectType) ArInternalErrorType;
         arana_traceback_push(AR_ISIG, __FILE__, __LINE__, __func__);    \
         arana_error_jump(AR_ISIG);                                      \
     } while(0)
-#define AR_RAISE_OOM() arana_out_of_meory(AR_ISIG)
+#define AR_RAISE_OOM() arana_out_of_memory(AR_ISIG)
 #define AR_CALL(x, a) arana_call(AR_ISIG, x, a)
 #define AR_CALL_METHODA(o, m, a) arana_call_method(AR_ISIG, o, m, a)
 #define AR_CALL_METHOD(o, m, ...) AR_CALL_METHODA(o, m, AR_TUPLE_PACK(__VA_ARGS__))