Hi,

On Fri, 12 Aug 2011 05:35:49 -0700 (PDT), ~flow <[email protected]> wrote:

> i had a look at the nodejs source (0.4.10; includes v8 sources) but was 
> unable to locate the definition of console.log(). does anyone have a pointer 
> for me? searching for (case-insensitive) log\(.*\{$ didn't turn out anything 
> of interest.

console.log is defined in lib/console.js,
but it just passes string to the stream.

You should look Buffer::Utf8Write in src/node_buffer.cc
It converts JS's string (UCS-2) to byte array (UTF-8) 
using v8::String::WriteUtf8().

https://github.com/joyent/node/blob/v0.4.10/src/node_buffer.cc#L471


> 
> -- 
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users


-- 
{
  name: "Koichi Kobayashi",
  mail: "[email protected]",
  blog: "http://d.hatena.ne.jp/koichik/";,
  twitter: "@koichik"
}

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to