Permalink
Browse files

Merge branch 'feature/dynamic-runtime' into unborn

  • Loading branch information...
2 parents 59effdf + 6ffba39 commit 800f401842fd32c14b5f7734eea0e436fe1ea688 @wolfwood wolfwood committed Oct 9, 2011
Showing with 11,263 additions and 11 deletions.
  1. +507 −0 app/d/dynhello/console.d
  2. +38 −0 app/d/dynhello/dsss.conf
  3. +46 −0 app/d/dynhello/hello.d
  4. +1 −1 app/d/hello/dsss.conf
  5. +2 −2 app/d/init/dsss.conf
  6. +1 −1 app/d/posix/dsss.conf
  7. +1 −1 app/d/xsh/dsss.conf
  8. +5 −0 build.sh
  9. +13 −0 reembed.sh
  10. +12 −0 runtimes/dyndrt/Makefile
  11. +265 −0 runtimes/dyndrt/apply.d
  12. +360 −0 runtimes/dyndrt/array.d
  13. +345 −0 runtimes/dyndrt/assocarray.d
  14. +283 −0 runtimes/dyndrt/binding/c.d
  15. +32 −0 runtimes/dyndrt/classinvariant.d
  16. +39 −0 runtimes/dyndrt/common.d
  17. +58 −0 runtimes/dyndrt/core/error.d
  18. +112 −0 runtimes/dyndrt/core/exception.d
  19. +1,622 −0 runtimes/dyndrt/core/unicode.d
  20. +252 −0 runtimes/dyndrt/core/util.d
  21. +925 −0 runtimes/dyndrt/data/iterable.d
  22. +162 −0 runtimes/dyndrt/dstatic.d
  23. +43 −0 runtimes/dyndrt/error.d
  24. +430 −0 runtimes/dyndrt/exception.d
  25. +229 −0 runtimes/dyndrt/gc.d
  26. +29 −0 runtimes/dyndrt/ldc/cstdarg.d
  27. +628 −0 runtimes/dyndrt/lifetime.d
  28. +162 −0 runtimes/dyndrt/main.d
  29. +73 −0 runtimes/dyndrt/moduleinfo.d
  30. +68 −0 runtimes/dyndrt/monitor.d
  31. +148 −0 runtimes/dyndrt/object.d
  32. +579 −0 runtimes/dyndrt/precision.d
  33. +85 −0 runtimes/dyndrt/switchstmt.d
  34. +725 −0 runtimes/dyndrt/synch/atomic.d
  35. +89 −0 runtimes/dyndrt/typeinfo.d
  36. +202 −0 runtimes/dyndrt/typeinfos/ti_array.d
  37. +20 −0 runtimes/dyndrt/typeinfos/ti_array_bool.d
  38. +12 −0 runtimes/dyndrt/typeinfos/ti_array_byte.d
  39. +90 −0 runtimes/dyndrt/typeinfos/ti_array_cdouble.d
  40. +92 −0 runtimes/dyndrt/typeinfos/ti_array_cfloat.d
  41. +12 −0 runtimes/dyndrt/typeinfos/ti_array_char.d
  42. +95 −0 runtimes/dyndrt/typeinfos/ti_array_creal.d
  43. +12 −0 runtimes/dyndrt/typeinfos/ti_array_dchar.d
  44. +91 −0 runtimes/dyndrt/typeinfos/ti_array_double.d
  45. +91 −0 runtimes/dyndrt/typeinfos/ti_array_float.d
  46. +20 −0 runtimes/dyndrt/typeinfos/ti_array_idouble.d
  47. +20 −0 runtimes/dyndrt/typeinfos/ti_array_ifloat.d
  48. +12 −0 runtimes/dyndrt/typeinfos/ti_array_int.d
  49. +20 −0 runtimes/dyndrt/typeinfos/ti_array_ireal.d
  50. +12 −0 runtimes/dyndrt/typeinfos/ti_array_long.d
  51. +96 −0 runtimes/dyndrt/typeinfos/ti_array_object.d
  52. +93 −0 runtimes/dyndrt/typeinfos/ti_array_real.d
  53. +12 −0 runtimes/dyndrt/typeinfos/ti_array_short.d
  54. +12 −0 runtimes/dyndrt/typeinfos/ti_array_ubyte.d
  55. +12 −0 runtimes/dyndrt/typeinfos/ti_array_uint.d
  56. +12 −0 runtimes/dyndrt/typeinfos/ti_array_ulong.d
  57. +12 −0 runtimes/dyndrt/typeinfos/ti_array_ushort.d
  58. +20 −0 runtimes/dyndrt/typeinfos/ti_array_void.d
  59. +12 −0 runtimes/dyndrt/typeinfos/ti_array_wchar.d
  60. +42 −0 runtimes/dyndrt/typeinfos/ti_assocarray.d
  61. +40 −0 runtimes/dyndrt/typeinfos/ti_byte.d
  62. +65 −0 runtimes/dyndrt/typeinfos/ti_cdouble.d
  63. +70 −0 runtimes/dyndrt/typeinfos/ti_cfloat.d
  64. +45 −0 runtimes/dyndrt/typeinfos/ti_char.d
  65. +72 −0 runtimes/dyndrt/typeinfos/ti_creal.d
  66. +47 −0 runtimes/dyndrt/typeinfos/ti_dchar.d
  67. +40 −0 runtimes/dyndrt/typeinfos/ti_delegate.d
  68. +74 −0 runtimes/dyndrt/typeinfos/ti_double.d
  69. +14 −0 runtimes/dyndrt/typeinfos/ti_enum.d
  70. +70 −0 runtimes/dyndrt/typeinfos/ti_float.d
  71. +32 −0 runtimes/dyndrt/typeinfos/ti_function.d
  72. +16 −0 runtimes/dyndrt/typeinfos/ti_idouble.d
  73. +16 −0 runtimes/dyndrt/typeinfos/ti_ifloat.d
  74. +44 −0 runtimes/dyndrt/typeinfos/ti_int.d
  75. +71 −0 runtimes/dyndrt/typeinfos/ti_interface.d
  76. +17 −0 runtimes/dyndrt/typeinfos/ti_ireal.d
  77. +44 −0 runtimes/dyndrt/typeinfos/ti_long.d
  78. +57 −0 runtimes/dyndrt/typeinfos/ti_object.d
  79. +51 −0 runtimes/dyndrt/typeinfos/ti_ptr.d
  80. +61 −0 runtimes/dyndrt/typeinfos/ti_real.d
  81. +38 −0 runtimes/dyndrt/typeinfos/ti_short.d
  82. +98 −0 runtimes/dyndrt/typeinfos/ti_staticarray.d
  83. +106 −0 runtimes/dyndrt/typeinfos/ti_struct.d
  84. +60 −0 runtimes/dyndrt/typeinfos/ti_tuple.d
  85. +63 −0 runtimes/dyndrt/typeinfos/ti_typedef.d
  86. +44 −0 runtimes/dyndrt/typeinfos/ti_ubyte.d
  87. +45 −0 runtimes/dyndrt/typeinfos/ti_uint.d
  88. +45 −0 runtimes/dyndrt/typeinfos/ti_ulong.d
  89. +38 −0 runtimes/dyndrt/typeinfos/ti_ushort.d
  90. +42 −0 runtimes/dyndrt/typeinfos/ti_void.d
  91. +44 −0 runtimes/dyndrt/typeinfos/ti_wchar.d
  92. +25 −0 runtimes/dyndrt/types.d
  93. +17 −0 runtimes/dyndrt/unwind.d
  94. +122 −0 runtimes/dyndrt/util.d
  95. +10 −0 runtimes/dyndrt/vararg.d
  96. +1 −0 runtimes/mindrt/Makefile
  97. +10 −6 runtimes/mindrt/entry.d
  98. +11 −0 runtimes/mindrt/entry2.d
  99. +5 −0 runtimes/mindrt/libd.d
Oops, something went wrong.
@@ -0,0 +1,38 @@
+name = xomb
+
+CC = x86_64-pc-elf-gcc
+CFLAGS = -nostdlib -nodefaultlibs -g -DUSE_ASSERT -mcmodel=kernel
+
+[*]
+buildflags=-dc=ldc-xomb
+
+[hello.d]
+
+buildflags=-dc=ldc-xomb -I../../.. -I../../../runtimes -I../../../runtimes/mindrt
+
+prebuild= \
+\
+mkdir -p dsss_imports;\
+mkdir -p dsss_objs;\
+mkdir -p dsss_objs/G;\
+mkdir -p dsss_objs/O;\
+
+target = hello
+
+# we will need some post build foo to link to the runtime
+
+postbuild = \
+\
+echo ; \
+echo Creating Application Executable; \
+echo '--> hello';\
+ld -nostdlib -nodefaultlibs -T../../build/elf.ld -o hello `ls dsss_objs/O/*.o` ../../../runtimes/mindrt/drt0.a ../../../runtimes/mindrt/libd.a ../../../runtimes/dyndrt/dyndrt.a;\
+\
+echo ;\
+echo Creating App Symbol File; \
+echo '--> hello.sym';\
+../../../build/mkldsym.sh hello hello.sym; \
+\
+echo ;\
+echo Copying;\
+cp hello ../../../build/root/binaries/dynhello
@@ -0,0 +1,46 @@
+/* xsh.d
+
+ XOmB Native Shell
+
+*/
+
+module hello;
+
+import console;
+
+// requied by entry.
+import libos.keyboard;
+import libos.libdeepmajik.threadscheduler;
+
+void main(char[][] argv) {
+ Console.backcolor = Color.Black;
+ Console.forecolor = Color.Green;
+
+ char[] string = "\nHello, and Welcome to XOmB\n";
+
+ foreach(str; argv){
+ string ~= str;
+ string ~= "\n";
+ }
+
+
+ string ~= "-=-=-=-=-=-=-=-\n\n";
+
+ Console.backcolor = Color.Black;
+ Console.forecolor = Color.LightGray;
+
+
+ Console.putString(string ~ "\n");
+
+
+ char[][char[]] dictionary;
+
+ dictionary["foo"] = "bar";
+ dictionary["zig"] = "zag";
+ dictionary["a"] = "b";
+ dictionary["c"] = "d";
+
+ foreach (word; dictionary.keys){
+ Console.putString(word ~ " " ~ dictionary[word] ~"\n");
+ }
+}
@@ -26,7 +26,7 @@ postbuild = \
echo ; \
echo Creating Application Executable; \
echo '--> hello';\
-ld -nostdlib -nodefaultlibs -T../../build/elf.ld -o hello `ls dsss_objs/O/*.o` ../../../runtimes/mindrt/mindrt.a ../../../runtimes/mindrt/drt0.a ../../../runtimes/mindrt/libd.a;\
+ld -nostdlib -nodefaultlibs -T../../build/elf.ld -o hello `ls dsss_objs/O/*.o` ../../../runtimes/mindrt/drt0.a ../../../runtimes/mindrt/mindrt.a ../../../runtimes/mindrt/libd.a;\
\
echo ;\
echo Creating App Symbol File; \
@@ -26,8 +26,8 @@ postbuild = \
echo ; \
echo Creating Application Executable; \
echo '--> init';\
-ld -nostdlib -nodefaultlibs -T../../build/flat.ld -o init `ls dsss_objs/O/*.o` ../../../runtimes/mindrt/mindrt.a ../../../runtimes/mindrt/drt0.a;\
-ld -nostdlib -nodefaultlibs -T../../build/skinny-elf.ld -o init-elf `ls dsss_objs/O/*.o` ../../../runtimes/mindrt/mindrt.a ../../../runtimes/mindrt/drt0.a;\
+ld -nostdlib -nodefaultlibs -T../../build/flat.ld -o init `ls dsss_objs/O/*.o` ../../../runtimes/mindrt/drt0.a ../../../runtimes/mindrt/mindrt.a;\
+ld -nostdlib -nodefaultlibs -T../../build/skinny-elf.ld -o init-elf `ls dsss_objs/O/*.o` ../../../runtimes/mindrt/drt0.a ../../../runtimes/mindrt/mindrt.a;\
\
echo ;\
echo Copying;\
@@ -27,7 +27,7 @@ postbuild = \
echo ; \
echo Creating Application Executable; \
echo '--> posix';\
-ld -nostdlib -nodefaultlibs -T../../build/elf.ld -o posix `ls dsss_objs/O/*.o` ../../../runtimes/mindrt/mindrt.a ../../../runtimes/mindrt/drt0.a;\
+ld -nostdlib -nodefaultlibs -T../../build/elf.ld -o posix `ls dsss_objs/O/*.o` ../../../runtimes/mindrt/drt0.a ../../../runtimes/mindrt/mindrt.a;\
\
echo ;\
echo Creating App Symbol File; \
View
@@ -27,7 +27,7 @@ postbuild = \
echo ; \
echo Creating Application Executable; \
echo '--> xsh';\
-ld -nostdlib -nodefaultlibs -T../../build/elf.ld -o xsh `ls dsss_objs/O/*.o` ../../../runtimes/mindrt/mindrt.a ../../../runtimes/mindrt/drt0.a ../../../runtimes/mindrt/libd.a;\
+ld -nostdlib -nodefaultlibs -T../../build/elf.ld -o xsh `ls dsss_objs/O/*.o` ../../../runtimes/mindrt/drt0.a ../../../runtimes/mindrt/mindrt.a ../../../runtimes/mindrt/libd.a;\
\
echo ;\
echo Creating App Symbol File; \
View
@@ -8,6 +8,11 @@ rm -r dsss* *.a
make || exit
cd ../..
+cd runtimes/dyndrt
+rm -r dsss* *.a
+make || exit
+cd ../..
+
cd user/c
make || exit
cd ../..
View
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+cd app/d/init
+dsss clean
+rm dsss.last
+dsss build || exit
+cd ../../..
+
+
+cd build
+./buildiso.sh
+
+bochs -q
@@ -0,0 +1,12 @@
+DFLAGS = -I../. -I../../. -O2 -release -od=dsss_objs/O -oq -d-version=PlatformXOmB
+
+dyndrt.a: *.d typeinfos/*.d binding/*.d core/*.d data/*.d synch/*.d
+ mkdir -p dsss_objs/G;
+ mkdir -p dsss_objs/O;
+ ldc -nodefaultlib ${DFLAGS} -c *.d
+ ldc -nodefaultlib ${DFLAGS} -c typeinfos/*.d
+ ldc -nodefaultlib ${DFLAGS} -c binding/*.d core/*.d data/*.d synch/*.d
+ ar rcs $@ dsss_objs/O/*.o
+
+clean:
+ rm dyndrt.a
Oops, something went wrong.

0 comments on commit 800f401

Please sign in to comment.