01:26:55  * bnoordhuisquit (Ping timeout: 272 seconds)
01:57:07  * C-Manquit (Quit: Connection reset by beer)
02:35:24  <Slide-O-Mix>yeah, I did, just getting back to it...
03:29:05  * ranmanjoined
03:34:26  <ranman>is this v8 as in chromium v8? I'm hoping from the channel topic that it is indeed v8
03:34:54  <ranman>s/v8/'that v8'
05:14:55  * [[zz]]quit (Ping timeout: 246 seconds)
05:15:33  * xan_quit (Ping timeout: 276 seconds)
05:26:33  * xan_joined
05:28:06  * [[zz]]joined
07:01:50  * ranmanquit (Quit: ["Textual IRC Client: www.textualapp.com"])
07:02:20  * rendarjoined
07:20:32  * joshthecoderquit (Quit: Linkinus - http://linkinus.com)
08:20:35  * xan_quit (Ping timeout: 248 seconds)
08:31:31  * xan_joined
08:37:50  * xan_quit (Ping timeout: 245 seconds)
08:43:25  * xan_joined
10:23:58  * decoderquit (Ping timeout: 246 seconds)
10:24:58  * decoderjoined
10:42:16  * rendarquit (*.net *.split)
10:42:17  * tmcguirequit (*.net *.split)
10:42:17  * stalledquit (*.net *.split)
10:42:17  * mikegerwitzquit (*.net *.split)
10:42:17  * [[zz]]quit (*.net *.split)
10:42:19  * sanjoydquit (*.net *.split)
10:42:19  * RT|Chatzillaquit (*.net *.split)
10:42:20  * briancline_quit (*.net *.split)
10:46:08  * rendarjoined
10:46:08  * [[zz]]joined
10:46:08  * RT|Chatzillajoined
10:46:08  * sanjoydjoined
10:46:08  * tmcguirejoined
10:46:08  * stalledjoined
10:46:08  * mikegerwitzjoined
10:46:08  * briancline_joined
10:47:09  * C-Manjoined
11:46:13  <tmcguire>beginner question: are all built-in v8 functions really written in JavaScript? How does for example Object.freeze() work then, when it is all in JS, how is such a thing possible without calling native code?
11:50:01  <sanjoyd>tmcguire: check v8natives.js
11:50:21  <sanjoyd>It calls %PreventExtensions, and functions beginning with a % are implemented in runtimes.cc
11:51:56  * tmcguirechecks
11:54:41  <tmcguire>ah I see, thanks
11:55:00  <sanjoyd>np
11:55:18  <tmcguire>how does this work together with snapshots? the snapshots can't store the addresses of the functions in runtimes.cc, since they change at every startup due to address space randomization.
11:55:38  <tmcguire>I'm asking this since I'm investigating a problem in the QML engine of Qt5, which uses v8
11:56:03  <tmcguire>It freezes the global object, which takes 100ms here, and that is quite slow.
11:56:14  <tmcguire>QML adds some properties to the global object before freezing it.
11:56:39  <sanjoyd>tmcguire: there is this class called ExternalReference which helps with that.
11:56:48  <tmcguire>Now, if it would be possible to snapshot the state of v8 _after_ QML has changed the global object and frozen it, that would get rid of these 100ms
11:57:05  <sanjoyd>tmcguire: so you'll see ExternalReference(Runtime::kFoo, isolate()) in several places.
11:57:16  <tmcguire>ok, let me check ExternalReference...
11:57:26  <tmcguire>disclaimer: I know next to nothing about v8 yet
11:57:43  <sanjoyd>Basically, ExternalReferences get relocated when the snapshot is loaded.
11:57:53  <sanjoyd>All this under the AFAIK banner, btw.
11:58:08  <sanjoyd>So do take with a large grain of salt. :)
11:58:56  <tmcguire>thanks for the pointers, that gives me something to investigate
11:59:37  <tmcguire>the proper fix would of course be to make freezing the global object faster, but that would be too complex for me I figure
11:59:47  <tmcguire>v8 performs that a lot slower than other engines: http://jsperf.com/performance-frozen-object
12:30:47  <sanjoyd>tmcguire: I think this is because of the dictionary->set_requires_slow_elements
12:31:04  <sanjoyd>Probably because v8 needs to check each access or something, I'm not sure.
12:31:29  <sanjoyd>See 'MaybeObject* JSObject::PreventExtensions()'
12:32:12  <tmcguire>ah, and that is called from Object.freeze()
12:32:16  <sanjoyd>Yes.
12:33:40  <tmcguire>I don't yet understand what PreventExtensions() does even conceptually, way too deep for me at the moment.
12:33:55  <tmcguire>I found the dictionary of runtime functions though and looking into that
12:35:00  <tmcguire>There isn't some kind of documentation that describes the v8 internals, is there?
12:35:14  <sanjoyd>Yeah, but it is in C++. :)
12:36:32  <tmcguire>with many concepts quite unique to JS engines
12:39:15  <sanjoyd>tmcguire: AFAICT, PreventExtensions sets a readonly flag on the object and then makes sure adding elements to the object goes through a slower path which actually checks for that flag.
12:40:16  <sanjoyd>Moving that check to the faster path will slow down the fast path with the benefit of having faster frozen objects.
12:40:28  <sanjoyd>You should ask mraleph when he comes online.
12:41:24  <tmcguire>actually, the call to Object.freeze() itself is taking 100ms already, and now I know where to investigate :)
12:42:41  <sanjoyd>I blame JSObject::NormalizeElements
12:42:50  * tmcguirehas also found the interesting bits about external references
12:53:14  * bnoordhuisjoined
14:23:42  * TheJHjoined
15:40:43  * tmcguirequit (Quit: Bye!)
16:03:01  * RT|Chatzillaquit (Quit: ChatZilla 0.9.86.1 [Firefox 2.0.0.22pre/2009081014])
16:52:46  * AndreasMadsenjoined
17:05:05  * hdonquit (Remote host closed the connection)
17:16:11  * joshthecoderjoined
17:17:22  * AndreasMadsenquit (Remote host closed the connection)
17:17:54  * Raynosquit (Read error: Connection reset by peer)
17:17:56  * Alex_Gaynorquit (Remote host closed the connection)
17:19:28  * sanjoydquit (Remote host closed the connection)
17:59:31  * mralephjoined
18:06:20  * kcfjoined
18:13:04  * sanjoydjoined
18:14:27  * Alex_Gaynor_joined
18:25:08  * Raynosjoined
18:27:56  * C-Manquit (Quit: Connection reset by beer)
18:31:12  * C-Manjoined
18:32:24  * Alex_Gaynor_changed nick to Alex_Gaynor
18:32:24  * Alex_Gaynorquit (Changing host)
18:32:24  * Alex_Gaynorjoined
18:40:15  * sanjoyd_joined
18:45:33  * Raynosquit (Remote host closed the connection)
18:46:52  * kcfpart
18:59:41  * Alex_Gaynorquit (Read error: Connection reset by peer)
19:00:16  * sanjoyd_quit (Remote host closed the connection)
19:00:48  * sanjoydquit (Quit: Page closed)
19:06:11  * sanjoyd_joined
19:26:00  * Raynosjoined
19:33:25  * Alex_Gaynorjoined
19:40:11  * TheJHquit (Ping timeout: 265 seconds)
21:06:32  * rendarquit
23:04:26  * RT|Chatzillajoined