proc_local.js 869 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. var RTL$ = {
  2. extend: function extend(methods){
  3. function Type(){
  4. for(var m in methods)
  5. this[m] = methods[m];
  6. }
  7. Type.prototype = this.prototype;
  8. var result = methods.init;
  9. result.prototype = new Type(); // inherit this.prototype
  10. result.prototype.constructor = result; // to see constructor name in diagnostic
  11. result.extend = extend;
  12. return result;
  13. }
  14. };
  15. var m = function (){
  16. function p1(arg1/*INTEGER*/){
  17. var T1 = RTL$.extend({
  18. init: function T1(){
  19. this.field1 = 0;
  20. }
  21. });
  22. var i1 = 0;var j1 = 0;
  23. var t1 = new T1();
  24. function p2(arg2/*BOOLEAN*/){
  25. var T2 = RTL$.extend({
  26. init: function T2(){
  27. this.field2 = false;
  28. }
  29. });
  30. var b = false;
  31. var t2 = new T2();
  32. b = arg2;
  33. t1.field1 = i1;
  34. t2.field2 = b;
  35. }
  36. p2(true);
  37. p2(false);
  38. }
  39. }();