X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/b92ceddb344ea82a067100ab116ff59d7f7c96f3..b120443db34edddcdb016b2f9218355b2dd8ced6:/todo.txt diff --git a/todo.txt b/todo.txt index be2776a..e9a1dd8 100644 --- a/todo.txt +++ b/todo.txt @@ -1,10 +1,121 @@ +lol unicode identifier support (native and \u) -object literal compilation should use numerify strings support unions (right now 0-1 fields parsed as struct) -\\\n escapes in strings aren't handled in the console look into what String is, and whether to bridge it -the console frontend's error handling, well, doesn't -setup a default hook mechanism for ffi_call passthrough +think about bridging NSNumber with Number prototype some JS callbacks don't use exception pointers at all... a newline needs to not be allowed after a unary * finish implementing default xml namespace statement +encode newlines in history for later replay (psql uses ^A) + +consider replacing regex literals with constructors + https://bugzilla.mozilla.org/show_bug.cgi?id=98409 +numerification needs to use specific precision values + https://bugzilla.mozilla.org/show_bug.cgi?id=5856 +consider a mode where unicode string content is saved + https://bugzilla.mozilla.org/show_bug.cgi?id=274152 + +NSDictionaries that have NSNumber keys don't getProperty +errors in another process aren't displayed; to fix this, parse errors should get converted to exceptions and thrown +CYPoolTry/Catch now carefully save the exception after it /no longer needs the exception/... uhh... wtf? +throw CYJSError should probably be replaced with CYThrow() across the board +figure out what to do about global context refs: I really really want to retain the bastards +the concept of NULL pooling is entirely incorrect and sad... bad... evil... need to work on this... really +NSArray's .toString() and .toLocaleString() fail hard, as Array.prototype.to*String are Array-specific +applyOnMainThread, when done at console, loops the cyonifier +special work needs to be done to correctly handle the "arguments" symbol: Declare("arguments", ...Special) +at the Program level I seem to be eating away all of the var statements +function pointers are ?; note that blocks are currently block_P = '?' +I should probably attempt to use the auto_ flag somehow to not do contexts_ push when compiling +Object_callAsFunction_toCYON should be implemented + +[NSString stringWithString:""] crashes, on linux, not on mac +GS #defines should be _finline + +replace procmod g+s with gdb's macosx_get_task_for_pid_rights +non-local return prologue is not being Replace()d: multipass compiler! +interpretation of documentation comments should be compiler-only and off by default +don't ever generate $ CYWith, in particular for CYLet... use CYFunctionExpression + +semi-colon insertion warnings should mark after the previous token, not on the current one: makes a /lot/ more sense +new for pools should take a reference, not a pointer + +output errors during Trampoline to some kind of log file + +there is a reinterpret_cast<> that I replaced with an old-style cast on the output of dladdr + +why do I never deallocate ffi closures? + +make a reference holder for namearrays +rename names to accumulator when it is a name accumulator, and retake names for subset +I believe calls to mutableCopy will leak memory +consider pointerTo instead of toPointer +store the last exception in a variable +should WebUndefined be @undefined? + +if something is a function, it should be output differently +evaluate usages of CYTry in ObjectiveC/Library for CYObjectiveTry +verify name targets of "incorrect number of arguments to" +maybe support __objc_{yes,no} intrinisic primitives + +support new objective-c subscript notation: + id key = ...; + id value = object[key]; + -> id value = [object objectForKeyedSubscript:key]; + object[key] = newValue; + -> [object setObject:newValue forKeyedSubscript:key]; +and: + NSUInteger idx = ...; + id value = object[idx]; + -> id value = [object objectAtIndexedSubscript:idx]; + object[idx] = newValue; + -> [object setObject:newValue atIndexedSubscript:idx]; + +use JSObjectMakeError to build exception objects +replace cy$getProperty's return value with JSValueRef +flatten compound expressions made up of compound expressions + +cy# {{5,6};6;{7;{8;5}}} +got: {5,6;6;{7;8,5}} +wanted: 5,6,6,7,8,5 + +cy# for each (var i = 9 in [1, 2]) system.print(i); +got: {i=9;(function(e,t){for(t in e){i=e[t];system.print(i)}})([1,2])} +wanted: i=9,function(e,t){for(t in e)i=e[t],system.print(i)}([1,2]) + +with is being translated in a manner that doesn't handle variables +cy# function b() { for each (var t in a) {} } +function b(){var e,t,n;with({t:a,n:undefined})for(n in t)e=t[n]} + +[[self description] cy$toCYON:] seems like a poor implementation of toCYON +implement cy$toJSON:inContext: for NSDictionary and NSArray + +the non-local transform used for let is ludicrous... :( :( + +cy# function q(e) { } +function q(e){var e} + +CYCompound needs to be able to replace itself away without causing multiple Replace +fat arrows are currently output with too much verbosity + +CYJSString <- wrap JavaScript strings and provide them back to Objective-C +ruby blocks need to return their last thing +Objective-C strings might should be cyonified using double-quotes + +apparently you can have random escape sequences in strings, like \! +cycript -p with processes that have spaces doesn't work +CYDriver uses std::istream, but it should use std::streambuf +the mechanism I used to autodetect readline is horrible: use autoconf + +constant flags on types are encoded using something horribly wrong +http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html +http://gcc.gnu.org/onlinedocs/gcc/Type-encoding.html +http://gcc.gnu.org/onlinedocs/gcc/Legacy-type-encoding.html + +using .withName from the grammar is a horrible hack that makes other uses impossible + +blocks should be allowed to return blocks/functions: ModifiedType needs to go + instead, TypedParameterList should be folded into a TypeModifier with the other types + +LT_INIT([pic-only]) doesn't work, because the default is only used if unset, and it has a default setting... +even when using --pic-only, libtool insists on building every file twice... with the same fucking arguments