Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: <neha1@us...> - 2012-06-26 18:34:37
|
Revision: 13205 http://swig.svn.sourceforge.net/swig/?rev=13205&view=rev Author: neha1 Date: 2012-06-26 18:34:31 +0000 (Tue, 26 Jun 2012) Log Message: ----------- Fixed marshalling for input argument. Modified Paths: -------------- branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx Modified: branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx =================================================================== --- branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx 2012-06-26 18:34:05 UTC (rev 13204) +++ branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx 2012-06-26 18:34:31 UTC (rev 13205) @@ -92,7 +92,11 @@ SwigType *pt = Getattr(p, "type"); String *ln = Getattr(p, "lname"); String *arg = NewString(""); - Printf(arg, "argv[%d]", i); + if(IsSetterMethod(n)) + Printv(arg, "value",0); + else + Printf(arg, "argv[%d]", i); + if ((tm = Getattr(p, "tmap:in"))) // Get typemap for this argument { Replaceall(tm, "$input", arg); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <neha1@us...> - 2012-07-09 16:54:45
|
Revision: 13277 http://swig.svn.sourceforge.net/swig/?rev=13277&view=rev Author: neha1 Date: 2012-07-09 16:54:36 +0000 (Mon, 09 Jul 2012) Log Message: ----------- Implemented code generator for enums. From: Neha Narang <narangneha03@...> Modified Paths: -------------- branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx Modified: branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx =================================================================== --- branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx 2012-07-09 16:54:06 UTC (rev 13276) +++ branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx 2012-07-09 16:54:36 UTC (rev 13277) @@ -207,25 +207,28 @@ int swig::JSCEmitter::enterVariable(Node *n) { current_getter = NULL_STR; current_setter = NULL_STR; - current_propertyname = Getattr(n, "name"); + current_propertyname = Swig_scopename_last(Getattr(n, "name")); return SWIG_OK; } int swig::JSCEmitter::exitVariable(Node *n) { + Template t_variable(getTemplate("variabledecl")); t_variable.replace("${setname}", current_setter) .replace("${getname}", current_getter) .replace("${propertyname}", current_propertyname); - if (GetFlag(n, "ismember")) { - if (Equal(Getattr(n, "storage"), "static")) { - Printv(js_class_static_variables_code, t_variable.str(), 0); + + if (GetFlag(n, "ismember")) { + if (Equal(Getattr(n, "storage"),"static")||(Equal(Getattr(n, "nodeType"),"enumitem"))) { + + Printv(js_class_static_variables_code, t_variable.str(), 0); } else { Printv(js_class_variables_code, t_variable.str(), 0); } - } else { + }else { Printv(js_global_variables_code, t_variable.str(), 0); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <neha1@us...> - 2012-07-09 16:55:52
|
Revision: 13279 http://swig.svn.sourceforge.net/swig/?rev=13279&view=rev Author: neha1 Date: 2012-07-09 16:55:46 +0000 (Mon, 09 Jul 2012) Log Message: ----------- Implemented code generator for namespaces. From: Neha Narang <narangneha03@...> Modified Paths: -------------- branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx Modified: branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx =================================================================== --- branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx 2012-07-09 16:55:17 UTC (rev 13278) +++ branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx 2012-07-09 16:55:46 UTC (rev 13279) @@ -180,7 +180,7 @@ } int swig::JSCEmitter::enterFunction(Node *n) { - current_functionname = Getattr(n, "name"); + current_functionname = (Getattr(n, "sym:name")); return SWIG_OK; } @@ -213,7 +213,6 @@ int swig::JSCEmitter::exitVariable(Node *n) { - Template t_variable(getTemplate("variabledecl")); t_variable.replace("${setname}", current_setter) .replace("${getname}", current_getter) @@ -236,8 +235,8 @@ } int swig::JSCEmitter::enterClass(Node *n) { - current_classname = Getattr(n, "name"); - + + current_classname = Swig_scopename_last(Getattr(n, "classtype")); js_class_variables_code = NewString(""); js_class_functions_code = NewString(""); js_class_static_variables_code = NewString(""); @@ -245,13 +244,18 @@ js_ctor_wrappers = NewString(""); js_ctor_dispatcher_code = NewString(""); + + return SWIG_OK; } -int swig::JSCEmitter::exitClass(Node *) { +int swig::JSCEmitter::exitClass(Node *n) { + Template t_class(getTemplate("classdefn")); - t_class.replace("${classname}", current_classname) + String *mangled_name = Swig_name_mangle(Getattr(n, "name")); + + t_class.replace("${classname}", mangled_name) .replace("${jsclassvariables}", js_class_variables_code) .replace("${jsclassfunctions}", js_class_functions_code) .replace("${jsstaticclassfunctions}", js_class_static_functions_code) @@ -266,25 +270,27 @@ /* adds the main constructor wrapper function */ Template t_mainctor(getTemplate("mainctordefn")); - t_mainctor.replace("${classname}", current_classname) - .replace("${type}", current_classname) + + t_mainctor.replace("${classname}", mangled_name) .replace("${DISPATCH_CASES}", js_ctor_dispatcher_code); Wrapper_pretty_print(t_mainctor.str(), f_wrappers); /* adds the dtor wrapper */ Template t_dtor(getTemplate("destructordefn")); - t_dtor.replace("${classname}", current_classname) - .replace("${type}", current_classname); + t_dtor.replace("${classname}", mangled_name) + .replace("${type}", Getattr(n,"classtype")); Wrapper_pretty_print(t_dtor.str(), f_wrappers); /* adds a class template statement to initializer function */ Template t_classtemplate(getTemplate("create_class_template")); - t_classtemplate.replace("${classname}", current_classname); + t_classtemplate.replace("${classname}", mangled_name); Wrapper_pretty_print(t_classtemplate.str(), js_initializer_code); /* adds a class registration statement to initializer function */ Template t_registerclass(getTemplate("register_class")); t_registerclass.replace("${classname}", current_classname); + t_registerclass.replace("${classname_mangled}", mangled_name); + Wrapper_pretty_print(t_registerclass.str(), js_initializer_code); /* clean up all DOHs */ @@ -305,9 +311,12 @@ } int swig::JSCEmitter::emitCtor(Node *n) { + Template t_ctor(getTemplate("ctordefn")); + + String *mangled_name = Swig_name_mangle(Getattr(n, "name")); - String *name = Getattr(n, "wrap:name"); + String *name = (Getattr(n, "wrap:name")); String *overname = Getattr(n, "sym:overname"); String *wrap_name = Swig_name_wrapper(name); Setattr(n, "wrap:name", wrap_name); @@ -321,9 +330,9 @@ int num_args = emit_num_arguments(params); String *action = emit_action(n); marshalInputArgs(params, current_wrapper, Ctor, true); + Printv(current_wrapper->code, action, "\n", 0); - - t_ctor.replace("${classname}", current_classname) + t_ctor.replace("${classname}", mangled_name) .replace("${overloadext}", overname) .replace("${LOCALS}", current_wrapper->locals) .replace("${CODE}", current_wrapper->code); @@ -334,13 +343,12 @@ Printf(argcount, "%d", num_args); Template t_ctor_case(getTemplate("ctor_dispatch_case")); - t_ctor_case.replace("${classname}", current_classname) + t_ctor_case.replace("${classname}", mangled_name) .replace("${overloadext}", overname) .replace("${argcount}", argcount); Printv(js_ctor_dispatcher_code, t_ctor_case.str(), 0); - Delete(argcount); - + return SWIG_OK; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <neha1@us...> - 2012-07-09 17:16:08
|
Revision: 13302 http://swig.svn.sourceforge.net/swig/?rev=13302&view=rev Author: neha1 Date: 2012-07-09 17:16:02 +0000 (Mon, 09 Jul 2012) Log Message: ----------- Bug fix in input marshalling function. From: Oliver Buchtala <oliver.buchtala@...> Modified Paths: -------------- branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx Modified: branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx =================================================================== --- branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx 2012-07-09 17:15:22 UTC (rev 13301) +++ branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx 2012-07-09 17:16:02 UTC (rev 13302) @@ -64,14 +64,14 @@ throw "Illegal state."; } - if ((tm = Getattr(p, "tmap:in"))) // Get typemap for this argument + tm = Getattr(p, "tmap:in"); // Get typemap for this argument + if ( tm != NULL ) { Replaceall(tm, "$input", arg); Setattr(p, "emit:input", arg); Printf(wrapper->code, "%s\n", tm); } else { Swig_warning(WARN_TYPEMAP_IN_UNDEF, input_file, line_number, "Unable to use type %s as a function argument.\n", SwigType_str(pt, 0)); - p = nextSibling(p); } Delete(arg); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <neha1@us...> - 2012-07-23 16:01:27
|
Revision: 13368 http://swig.svn.sourceforge.net/swig/?rev=13368&view=rev Author: neha1 Date: 2012-07-23 16:01:14 +0000 (Mon, 23 Jul 2012) Log Message: ----------- Fixed error revealed by abstract_typedef2. From: Oliver Buchtala <oliver.buchtala@...> Modified Paths: -------------- branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx Modified: branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx =================================================================== --- branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx 2012-07-23 16:00:49 UTC (rev 13367) +++ branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx 2012-07-23 16:01:14 UTC (rev 13368) @@ -289,7 +289,7 @@ int swig::JSCEmitter::enterClass(Node *n) { - current_classname = Swig_scopename_last(Getattr(n, "name")); + current_classname = Getattr(n, "sym:name"); current_classname_mangled = SwigType_manglestr(Getattr(n, "name")); current_classtype = NewString(Getattr(n, "classtype")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <neha1@us...> - 2012-07-30 18:04:23
|
Revision: 13439 http://swig.svn.sourceforge.net/swig/?rev=13439&view=rev Author: neha1 Date: 2012-07-30 18:04:17 +0000 (Mon, 30 Jul 2012) Log Message: ----------- Fixed marshalling for class example From: Neha Narang <narangneha03@...> Modified Paths: -------------- branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx Modified: branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx =================================================================== --- branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx 2012-07-30 18:03:44 UTC (rev 13438) +++ branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx 2012-07-30 18:04:17 UTC (rev 13439) @@ -60,7 +60,7 @@ } break; case Ctor: - Printf(arg, "argv[%d]"); + Printf(arg, "argv[%d]",i); break; default: throw "Illegal state."; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <neha1@us...> - 2012-07-30 18:17:29
|
Revision: 13459 http://swig.svn.sourceforge.net/swig/?rev=13459&view=rev Author: neha1 Date: 2012-07-30 18:17:23 +0000 (Mon, 30 Jul 2012) Log Message: ----------- Fixed output marshaller to reflect feature:new. From: Oliver Buchtala <oliver.buchtala@...> Modified Paths: -------------- branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx Modified: branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx =================================================================== --- branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx 2012-07-30 18:16:51 UTC (rev 13458) +++ branches/gsoc2012-javascript/Source/Modules/javascript_jsc.cxx 2012-07-30 18:17:23 UTC (rev 13459) @@ -71,6 +71,13 @@ { Replaceall(tm, "$input", arg); Setattr(p, "emit:input", arg); + + if (Getattr(p, "wrap:disown") || (Getattr(p, "tmap:in:disown"))) { + Replaceall(tm, "$disown", "SWIG_POINTER_DISOWN"); + } else { + Replaceall(tm, "$disown", "0"); + } + Printf(wrapper->code, "%s\n", tm); } else { Swig_warning(WARN_TYPEMAP_IN_UNDEF, input_file, line_number, "Unable to use type %s as a function argument.\n", SwigType_str(pt, 0)); @@ -95,6 +102,13 @@ Replaceall(tm, "$result", "jsresult"); // TODO: May not be the correct way Replaceall(tm, "$objecttype", Swig_scopename_last(SwigType_str(SwigType_strip_qualifiers(type), 0))); + + if (GetFlag(n, "feature:new")) { + Replaceall(tm, "$owner", "SWIG_POINTER_OWN"); + } else { + Replaceall(tm, "$owner", "0"); + } + Printf(wrapper->code, "%s", tm); if (Len(tm)) Printf(wrapper->code, "\n"); @@ -155,10 +169,13 @@ // write the swig banner Swig_banner(f_wrap_cpp); + SwigType_emit_type_table(f_runtime, f_wrappers); + Printv(f_wrap_cpp, f_runtime, "\n", 0); Printv(f_wrap_cpp, f_header, "\n", 0); Printv(f_wrap_cpp, f_wrappers, "\n", 0); + emitNamespaces(); // compose the initializer function using a template @@ -311,6 +328,9 @@ int JSCEmitter::exitClass(Node *n) { String *mangled_name = SwigType_manglestr(Getattr(n, "name")); + SwigType *type = Copy(Getattr(n, "classtypeobj")); + SwigType_add_pointer(type); + String *mangled_type = SwigType_manglestr(type); Template t_class_tables(getTemplate("JS_class_tables")); t_class_tables.replace("${classname_mangled}", mangled_name) @@ -344,6 +364,10 @@ t_classtemplate.replace("${classname_mangled}", mangled_name) .replace("${base_classname}", base_name_mangled); Wrapper_pretty_print(t_classtemplate.str(), initializer_code); + + String *clientdata = NewString(""); + Printv(clientdata, mangled_name, "_classRef", 0); + SwigType_remember_clientdata(type, clientdata); /* adds a class registration statement to initializer function */ Template t_registerclass(getTemplate("JS_register_class")); @@ -359,6 +383,8 @@ Delete(class_static_functions_code); Delete(ctor_wrappers); Delete(mangled_name); + Delete(type); + Delete(mangled_type); Delete(ctor_dispatcher_code); class_variables_code = 0; current_class_functions = 0; @@ -441,7 +467,7 @@ Wrapper_add_local(current_wrapper, "jsresult", "JSValueRef jsresult"); String *action = emit_action(n); - marshalInputArgs(params, current_wrapper, Getter, is_member); + marshalInputArgs(params, current_wrapper, Getter, is_member, is_static); marshalOutput(n, action, current_wrapper); t_getter.replace("${getname}", wrap_name) @@ -468,7 +494,7 @@ Wrapper_add_local(current_wrapper, "jsresult", "JSValueRef jsresult"); String *action = emit_action(n); - marshalInputArgs(params, current_wrapper, Setter, is_member); + marshalInputArgs(params, current_wrapper, Setter, is_member, is_static); marshalOutput(n, action, current_wrapper); t_setter.replace("${setname}", wrap_name) @@ -550,7 +576,7 @@ Wrapper_add_local(current_wrapper, "jsresult", "JSValueRef jsresult"); String *action = emit_action(n); - marshalInputArgs(params, current_wrapper, Function, is_member); + marshalInputArgs(params, current_wrapper, Function, is_member, is_static); marshalOutput(n, action, current_wrapper); t_function.replace("${functionname}", wrap_name) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |