Jump to content


  • Content Count

  • Joined

  • Last visited

About whizzter

  • Rank

Contact Methods

  • Website URL
  • Twitter

Profile Information

  • Gender
  • Location
    Stockholm, Sweden
  1. WebGL will call out to C/C++ code and will just use the underlying buffer regardless of if your JavaScript code sees it as Uint32Array or Int32Array so no copies will be made. Buffers are just flat slabs of bytes and can be viewed in different ways. If buffers are created or copied depends on what constructor you use(see the page you linked), if you use the typed array directly (as with regular arrays) you get a copy BUT if you use the underlying buffer object instead then you're instead given a view. The example below should show the difference in usage (you can test it in chrome,firefox
  2. Int32Array,Uint32Array,Float32Array,etc are all backed by a slab of bytes in memory (you can create an Uint32Array object that refers to the same memory as another Int32Array). OpenGL (that WebGL is ultimately based on and mostly implemented upon with the exception of libangle) is also a C api meaning that it doesn't really care about the type of data and will just consume it. If you fed data you've written through a Float32Array you'd get errornous results (or more probably nothing since GL is a tad bad at reporting errors). In machine representation however Int32 and Uint32 are identica
  3. Hi, fun to see you here (You should follow me back on twitter so we can banter away on progress ) Depends on what "the only limitation" means, i looked at the dopple code around the time i made the first posts and again now and looking at resolve.js you seem to be doing type deductions on the syntax tree. Now this kind of system will work fine for generating fast code if you allow one type at each point in the code and in fact most research has shown that this is true for most code JS written even for the web and for games i'd expect this to be even more true so in that way what dopple d
  4. Thanks for completing it. Looked at the dopple compiler now and i can see what your comment refers to as writing C, i started on something similar for an earlier iteration but abandoned it when i realized that it'd be a chore to get even one of my small jam games ported. What i'm working on however is built around the ES specification to be compatible as far as possible with a global analysis to find optimizations rather than to force the code to any certain mould. objects, gc, prototypes, array length semantics, function closures all there. The main limitations for this compiler is the
  5. Hi all, I've been working on a JS->C compiler prototype for my thesis to help making more advanced JS games mainly for iOS without having to compromise performance due to JIT compilers not being allowed. However, to achieve really good performance this compiler has deviated a little bit from standard code semantics so I've made a small survey that i'd hope as many of you as possible would fill in so i'll have an idea of how useful it'd be in practice. If you don't understand some parts of the questions, don't worry as those are usually error prone situations and just answer the best you
  • Create New...