smparkes-johnson 1.1.2.3 → 1.1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -256,6 +256,9 @@ VALUE convert_to_ruby(JohnsonRuntime* runtime, jsval js)
256
256
  JRETURN_RUBY(Qnil);
257
257
 
258
258
  case JSTYPE_FUNCTION:
259
+ #if JS_HAS_XML_SUPPORT
260
+ case JSTYPE_XML:
261
+ #endif JS_HAS_XML_SUPPORT
259
262
  case JSTYPE_OBJECT: {
260
263
  if (OBJECT_TO_JSVAL(runtime->global) == js)
261
264
  // global gets special treatment, since the Prelude might not be loaded
data/lib/johnson.rb CHANGED
@@ -14,7 +14,7 @@ require "johnson/visitors"
14
14
  require "johnson/nodes"
15
15
 
16
16
  module Johnson
17
- VERSION = "1.1.2.3"
17
+ VERSION = "1.1.2.4"
18
18
 
19
19
  def self.version
20
20
  VERSION
@@ -230,11 +230,8 @@ struct JSObject {
230
230
 
231
231
  #define STOBJ_GET_PROTO(obj) \
232
232
  JSVAL_TO_OBJECT((obj)->fslots[JSSLOT_PROTO])
233
- #define _STOBJ_SET_PROTO(obj,proto) \
234
- (void)(STOBJ_NULLSAFE_SET_DELEGATE(proto), \
235
- (obj)->fslots[JSSLOT_PROTO] = OBJECT_TO_JSVAL(proto))
236
233
  #define STOBJ_SET_PROTO(obj,proto) \
237
- (void)(((obj!=proto)||(abort(),10)),STOBJ_NULLSAFE_SET_DELEGATE(proto), \
234
+ (void)(STOBJ_NULLSAFE_SET_DELEGATE(proto), \
238
235
  (obj)->fslots[JSSLOT_PROTO] = OBJECT_TO_JSVAL(proto))
239
236
  #define STOBJ_CLEAR_PROTO(obj) \
240
237
  ((obj)->fslots[JSSLOT_PROTO] = JSVAL_NULL)
@@ -880,34 +880,25 @@ JSCompiler::compileScript(JSContext *cx, JSObject *scopeChain, JSStackFrame *cal
880
880
  if (tt == TOK_EOF)
881
881
  break;
882
882
  JS_ASSERT(tt == TOK_ERROR);
883
- // fprintf(stderr,"1\n");
884
883
  goto out;
885
884
  }
886
885
 
887
886
  pn = Statement(cx, &jsc.tokenStream, &cg);
888
- if (!pn) {
889
- // fprintf(stderr,"2\n");
887
+ if (!pn)
890
888
  goto out;
891
- }
892
889
  JS_ASSERT(!cg.blockNode);
893
890
 
894
- if (!js_FoldConstants(cx, pn, &cg)) {
895
- // fprintf(stderr,"3\n");
891
+ if (!js_FoldConstants(cx, pn, &cg))
896
892
  goto out;
897
- }
898
893
 
899
894
  if (cg.functionList) {
900
- if (!jsc.analyzeFunctions(cg.functionList, cg.flags)) {
901
- // fprintf(stderr,"4\n");
895
+ if (!jsc.analyzeFunctions(cg.functionList, cg.flags))
902
896
  goto out;
903
- }
904
897
  cg.functionList = NULL;
905
898
  }
906
899
 
907
- if (!js_EmitTree(cx, &cg, pn)) {
908
- // fprintf(stderr,"5\n");
900
+ if (!js_EmitTree(cx, &cg, pn))
909
901
  goto out;
910
- }
911
902
  #if JS_HAS_XML_SUPPORT
912
903
  if (PN_TYPE(pn) != TOK_SEMI ||
913
904
  !pn->pn_kid ||
@@ -918,8 +909,6 @@ JSCompiler::compileScript(JSContext *cx, JSObject *scopeChain, JSStackFrame *cal
918
909
  RecycleTree(pn, &cg);
919
910
  }
920
911
 
921
- // fprintf(stderr,"a\n");
922
-
923
912
  #if JS_HAS_XML_SUPPORT
924
913
  /*
925
914
  * Prevent XML data theft via <script src="http://victim.com/foo.xml">.
@@ -934,7 +923,6 @@ JSCompiler::compileScript(JSContext *cx, JSObject *scopeChain, JSStackFrame *cal
934
923
  }
935
924
  #endif
936
925
 
937
- // fprintf(stderr,"b\n");
938
926
  /*
939
927
  * Global variables and regexps share the index space with locals. Due to
940
928
  * incremental code generation we need to patch the bytecode to adjust the
@@ -983,7 +971,6 @@ JSCompiler::compileScript(JSContext *cx, JSObject *scopeChain, JSStackFrame *cal
983
971
  before = sbrk(0);
984
972
  #endif
985
973
 
986
- // fprintf(stderr,"c\n");
987
974
  /*
988
975
  * Nowadays the threaded interpreter needs a stop instruction, so we
989
976
  * do have to emit that here.
@@ -4380,10 +4367,8 @@ Statement(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)
4380
4367
  #if JS_HAS_GETTER_SETTER
4381
4368
  if (tt == TOK_NAME) {
4382
4369
  tt = CheckGetterOrSetter(cx, ts, TOK_FUNCTION);
4383
- if (tt == TOK_ERROR) {
4384
- // fprintf(stderr,"aa");
4370
+ if (tt == TOK_ERROR)
4385
4371
  return NULL;
4386
- }
4387
4372
  }
4388
4373
  #endif
4389
4374
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smparkes-johnson
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2.3
4
+ version: 1.1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Barnette
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2009-11-02 00:00:00 -08:00
15
+ date: 2009-11-18 00:00:00 -08:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency