00:14:25  * c4miloquit (Remote host closed the connection)
00:18:22  * c4milojoined
01:39:18  * c4miloquit (Remote host closed the connection)
02:01:11  * C-Manquit (Quit: Connection reset by beer)
03:39:29  * joshthecoder_joined
03:39:49  * joshthecoderquit (*.net *.split)
05:59:09  * TheJHjoined
06:12:50  * TheJHquit (Ping timeout: 255 seconds)
07:22:50  * bnoordhuisjoined
07:26:07  * [[zz]]quit (Ping timeout: 246 seconds)
07:39:27  * [[zz]]joined
07:48:46  * bnoordhuisquit (Ping timeout: 256 seconds)
08:03:28  * [[zz]]quit (Ping timeout: 245 seconds)
08:08:09  * [[zz]]joined
08:55:17  * bnoordhuisjoined
09:00:10  * bnoordhuisquit (Ping timeout: 256 seconds)
09:27:23  * RT|Chatzillajoined
10:10:10  * Net147joined
10:23:25  * C-Manjoined
10:27:27  * bnoordhuisjoined
10:36:32  * bnoordhuisquit (Ping timeout: 272 seconds)
10:55:41  * cha0squit (Quit: Viva La Revoluci´┐Żn!)
10:56:06  * cha0sjoined
10:56:06  * cha0squit (Changing host)
10:56:07  * cha0sjoined
11:04:49  * xan_quit (Ping timeout: 240 seconds)
11:10:23  * xan_joined
11:17:40  * seventhjoined
11:18:56  * bnoordhuisjoined
12:02:13  * bnoordhuisquit (Ping timeout: 245 seconds)
12:28:17  * bnoordhuisjoined
12:36:34  * bnoordhuisquit (Ping timeout: 252 seconds)
12:51:57  * [sqrts]benjoined
12:52:01  <[sqrts]ben>Hi guys.
12:52:30  <[sqrts]ben>I tried to change some of the implementation in v8, specifically right now I changed the way charCodeAt should work
12:52:52  <[sqrts]ben>sorry, charAt
12:53:10  <[sqrts]ben>therefore, I changed the call from string.js to from %_StringCharAt to %StringCharAt and defined the function accordingly in runtime.h and runtime.cc
12:53:41  <[sqrts]ben>however, I get errors when starting up Chromium, stating that the v8/i18n extension could not be loaded
12:53:44  <[sqrts]ben>Any hints? :)
12:54:14  <guor>I'd assume that v8/i18n uses some of the stuff you changed...
12:54:22  <guor>it's a separate project
12:55:10  <[sqrts]ben>The interesting fact is that I build in logging
12:55:30  <[sqrts]ben>essentially, I just to a log message to the linux console when "my" stringCharAt is called
12:55:39  <[sqrts]ben>however, this is never triggered
12:55:48  <[sqrts]ben>although its the first statement in my code
12:56:03  <guor>also, String.prototype.charAt is being inlined in crankshaft, so maybe you need to turn off crankshaft
12:56:43  <[sqrts]ben>as far as i gathered from the code, one can "choose" which method to call?
12:56:51  <[sqrts]ben>so %StringCharAt is the runtime.cc code
12:57:04  <[sqrts]ben>whereas %_StringCharAt is the inline code?
12:57:19  <guor>yes, and %_StringCharAt is inlined, but it may bail out to runtime code if somethings are unexpected
12:57:26  <guor>like GC, or wrong types, etc.
12:57:37  <[sqrts]ben>for StringCharAt, in the default code, there is no fallback
12:57:43  <[sqrts]ben>at least not in my older checkout
12:57:49  <[sqrts]ben>it's normally purely inline
12:57:53  <[sqrts]ben>I changed the definition though
12:58:00  * bnoordhuisjoined
12:58:10  <guor>look at StringCharAtGenerator
12:58:14  <guor>in code-stubs.h
12:58:23  <guor>that generates the code
12:58:27  <guor>there is a GenerateFast
12:58:31  <guor>and a GenerateSlow
12:58:33  <[sqrts]ben>yeah
12:58:38  <guor>the slow part calls out to runtime
12:59:52  <guor>the safest way imo to always redirect to runtime code is to add a line at the top of GenerateFast to jump to the call_runtime_ label
13:00:00  <guor>so that the inlined code always bails out to runtime code
13:00:01  <[sqrts]ben>but there is no runtime function
13:00:09  <[sqrts]ben>at least not Runtime_StringCharAt
13:00:15  <[sqrts]ben>except for the one I defined :x
13:00:28  <[sqrts]ben>that is what I don't quite get :)
13:00:48  <guor>no, because charAt is chaining charCodeAt and charFromCode
13:02:09  <[sqrts]ben>Mh, wo which function is actually responsible to handle that fallthrough case?
13:02:21  <guor>the StringCharAtGenerator basically delegates to StringCharCodeAtGenerator and StringCharFromCodeGenerator
13:02:54  <guor>both delegated generators do their thing, when it bails out, it returns from runtime after it gets the result
13:03:37  <guor>what you actually want to do is do two things:
13:03:57  <guor>first, change string.js to not point at %_StringCharAt, but to a custom %StringCharAt
13:04:20  <guor>and in hydrogen.cc, remove the inlining of String.prototype.charAt
13:05:08  <[sqrts]ben>ok
13:05:19  <guor>it's in HOptimizedGraphBuilder::TryInlineBuiltinMethodCall
13:05:39  <[sqrts]ben>just remove the case in hydrogen?
13:07:49  <guor>yup
13:07:52  <[sqrts]ben>Ok, so it would that worked
13:07:54  <guor>it would fall through to default
13:07:57  <[sqrts]ben>and charAt still returns stuff ;-)
13:08:39  <guor>so your logging confirms that it works?
13:09:16  <[sqrts]ben>not yet
13:09:28  <[sqrts]ben>Now i only removed the optimized part
13:09:36  <[sqrts]ben>not the custom %String..
13:09:44  <[sqrts]ben>gnah
13:09:47  <[sqrts]ben>still kills me :(
13:10:09  <[sqrts]ben>is there anything else I need to change to add the runtime function?
13:10:23  <[sqrts]ben>apart from runtime.h
13:10:34  <guor>and you added Runtime_StringCharAt, right?
13:10:39  <[sqrts]ben>yeah
13:10:55  <[sqrts]ben>and added it to INLINE_RUNTIME_FUNCTION_LIST as well
13:11:08  <[sqrts]ben>and removed it from INLINE_FUNCTION_LIST
13:11:26  <guor>uh.... just add it to RUNTIME_FUNCTION_LIST
13:11:38  <guor>it's not inline
13:11:50  <[sqrts]ben>mh okay
13:12:12  <guor>what happens if you start d8 with --allow-natives-syntax and call %StringCharAt directly?
13:12:42  <[sqrts]ben>.. compiling ;-) just a sec
13:25:47  <[sqrts]ben>needed to remove some more calls to the %_ version
13:25:54  <[sqrts]ben>and to code that is now no longer used
13:25:57  <[sqrts]ben>*compiling*
13:26:49  <[sqrts]ben>a, that seems to work :-)
13:30:36  <guor>:)
13:30:51  <[sqrts]ben>not that my code does what it should
13:30:52  <[sqrts]ben>but well :D
13:31:03  <[sqrts]ben>at least it's called :P
13:31:12  <guor>at least the plumbing works :)
13:33:30  <[sqrts]ben>yeah
13:40:18  * Net147quit (Quit: HydraIRC -> http://www.hydrairc.com <- Chicks dig it)
13:48:27  <[sqrts]ben>thank you very much for the hints
13:48:38  <[sqrts]ben>still trying to get my stuff to work though ;)
13:52:48  <guor>np
14:05:07  <[sqrts]ben>well
14:05:19  <[sqrts]ben>the only problem is an illegal access triggered by the devtools
14:06:18  <[sqrts]ben>from my understanding of the ECMA definition, charAt should return either the matching character
14:06:28  <[sqrts]ben>or an empty string, right?
14:15:29  * [sqrts]benquit (Ping timeout: 248 seconds)
14:16:33  * c4milojoined
14:18:13  * c4miloquit (Remote host closed the connection)
14:33:51  * heathquit (Remote host closed the connection)
14:42:38  <guor>uh. i guess.
14:42:56  <guor>illegal access points to some invalid type assumptions in runtime.cc
14:43:21  * heathjoined
14:43:22  <guor>you can set a breakpoint in v8::internal::Isolate::ThrowIllegalOperation to catch it
14:43:31  <guor>and see what the cause is
14:45:29  * heathquit (Client Quit)
14:46:50  * heathjoined
14:50:29  * mralephquit (Quit: Leaving.)
14:52:37  * c4milojoined
15:10:02  * TheJHjoined
15:37:13  * RT|Chatzillaquit (Quit: ChatZilla 0.9.86.1 [Firefox 2.0.0.22pre/2009081014])
15:50:26  * guorquit (Read error: Connection timed out)
17:04:33  * bnoordhuisquit (Ping timeout: 248 seconds)
17:56:39  * guorjoined
18:03:29  * stalledquit (Ping timeout: 255 seconds)
18:10:02  * stalledjoined
18:14:30  * bnoordhuisjoined
19:05:44  * bnoordhuisquit (Ping timeout: 272 seconds)
19:24:54  * TheJHquit (*.net *.split)
19:31:51  * TheJHjoined
19:54:45  * seventhquit (Remote host closed the connection)
20:11:41  * bnoordhuisjoined
20:16:23  * bnoordhuisquit (Ping timeout: 256 seconds)
20:53:31  * c4miloquit (Remote host closed the connection)
20:54:15  * c4milojoined
21:02:44  * c4miloquit (Remote host closed the connection)
21:03:57  * c4milojoined
21:04:40  * c4miloquit (Read error: Connection reset by peer)
21:04:42  * c4milo_joined
21:13:26  * c4milo_quit (Remote host closed the connection)
21:13:57  * c4milojoined
21:14:08  * c4miloquit (Remote host closed the connection)
21:14:15  * c4milojoined
21:15:59  * xan_quit (Quit: leaving)
22:44:46  * c4miloquit (Remote host closed the connection)
22:50:16  * c4milojoined
23:48:06  * TheJHquit (Ping timeout: 252 seconds)