search for: getsecond

Displaying 8 results from an estimated 8 matches for "getsecond".

2009 Feb 18
0
[LLVMdev] Parametric polymorphism
...to do it properly. C++ templates are a great example of > why *NOT* to do specialization within the high-level language. > But specialization (in the C++ template sense) is also a great example of why it's needed in the host language, as is overloading. > > The generated code for getSecond() needs to know the size of T in > order to calculate the correct offset into the record. However, > we still don't need to generate a bazillion specialized copies; > we can simply pass the size of T as an argument: > > void getSecond(int sizeT, void* pair, void* result) { >...
2009 Feb 18
2
[LLVMdev] Parametric polymorphism
...ns. The second problem with C++ templates is that every template instantiation always generates completely new code, even when it doesn't need to. Consider the following two functions: struct PairPtr<T> { T* first, T* second }; struct Pair<T> { T first, T second }; T* getSecondPtr<T>(PairPtr<T>* pair) { return pair->second; } T getSecond<T>(Pair<T>* pair) { return pair->second; } The generated code for getSecondPtr() is the same for every T. There is absolutely no need to generate a bazillion specialized copies. Notice that the .Net val...
2009 Feb 18
2
[LLVMdev] Parametric polymorphism
> I think the problem is deeper than that, in that LLVM has no official > concept of a subtype, so I don't see how the idea of polymorphism > could be defined in it. Parametric polymorphism is different from subtype polymorphism; you can have one without the other. Parametric polymorphism just means that you can use type variables (like T) in the IR, which are later instantiated to
2007 Apr 13
0
[961] branches/wxruby2/wxwidgets_282/swig: Move wxDateTime typemap into shared file, map to core Time class instead
...min, s, 0); +} + +%typemap(out) wxDateTime& { + VALUE y = INT2NUM($1->GetYear()); + VALUE mon = INT2NUM($1->GetMonth() + 1); + VALUE d = INT2NUM($1->GetDay()); + VALUE h = INT2NUM($1->GetHour()); + VALUE min = INT2NUM($1->GetMinute()); + VALUE s = INT2NUM($1->GetSecond()); + + VALUE cTime = rb_iv_get(rb_cObject, "Time"); + // $result = rb_funcall(cDateTime, rb_intern("new"), 6, y, mon, d, h, min, s); + $result = rb_funcall(cTime, rb_intern("local"), 6, y, mon, d, h, min, s); +} + +// Need to have this to over-ride the de...
2007 Jun 25
0
[1072] trunk/wxruby2/swig/shared/datetime.i: Add typemap for DateTime::WeekDay; plug mem leak with wxDateTime arg
..."cx"> VALUE y = INT2NUM($1->GetYear()); </span><span class="cx"> VALUE mon = INT2NUM($1->GetMonth() + 1); </span><span class="lines">@@ -29,11 +31,14 @@ </span><span class="cx"> VALUE s = INT2NUM($1->GetSecond()); </span><span class="cx"> </span><span class="cx"> VALUE cTime = rb_iv_get(rb_cObject, "Time"); </span><del>- // $result = rb_funcall(cDateTime, rb_intern("new"), 6, y, mon, d, h, min, s); </del><ins...
2009 Feb 18
2
[LLVMdev] Parametric polymorphism
...example > of why it's needed in the host language, as is overloading. There's no reason why specialization -has- to be done by llvm. Idiotic languages like C++ can do it themselves, badly, if they want. ;-) I want llvm to do it for me because it can do a better job. ;-) >> void getSecond(int sizeT, void* pair, void* result) { >> return memcpy(result, ((char*) pair) + sizeT, sizeT); >> } > > Of course, that only works for POD types, so you still need a > different instantiation for std::string, std::vector, ... Every llvm type is a POD type. It's eithe...
2005 Jul 06
16
Autocompletion not working in Konqueror
I''ve just had a look again at the autocompletion demo that Thomas put up at http://script.aculo.us/demos/ajax/autocompleter Unfortunately, in Konqueror (3.4.1) it doesn''t work at all. Not even an error is triggered. It does work nicely in Firefox. How about Safari? I don''t have the time right now to track this down systematically (maybe latter), but just from
2007 Nov 27
0
12 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h libswfdec/swfdec_load_object_as.c libswfdec/swfdec_load_object.c libswfdec/swfdec_load_object.h
...ot;, "getHours", false], + ["_global.Date.prototype", "getMilliseconds", false], + ["_global.Date.prototype", "getMinutes", false], + ["_global.Date.prototype", "getMonth", false], + ["_global.Date.prototype", "getSeconds", false], + ["_global.Date.prototype", "getTime", false], + ["_global.Date.prototype", "getTimezoneOffset", false], + ["_global.Date.prototype", "getUTCDate", false], + ["_global.Date.prototype", "getUTCDay",...