[webkit-dev] about the class of "jscell" and "jsvalueptr"

Zoltan Herczeg zherczeg at inf.u-szeged.hu
Mon Mar 23 03:27:29 PDT 2009


Hi,

JSCell is a small memory block, which is maintaned by the garbage
collector. It is 32 byte on 32 bit machines and 64 byte in 64 bit machines
(see JavaScriptCore/runtime/collector.cpp).

JSValuePtr is the basic data type structure of JavaScript. It can be a
pointer to a JSCell or an immediate value (integer number, boolean, null,
undefined).

JSCell is an internal representation (may changed in the future), while
JSValuePtr is a high-level class with many helper/utility functions.

JSValuePtr has a toString method. It is a high level function, not
designed for debug purposes, but you can use it if the conversion does not
throw any exceptions.

Zoltan

> Hi all
> Now I am learning at the JavaScriptCore, and I encounter some problems,
> Could you help me?
> 1. What data is stored in "JSCell", and how to print the data?
> 2. <input type="text" ID="text1" value="Hello World"> , if there is a js
> function, as follow:
> function test(){ alert(text1.value); }
> Is the value stored in the "JSValuePtr"?
>  
> Could you introduce the "JSCell" and "JSValuePtr" for me?
> thank you & best regards
> zzh




More information about the webkit-dev mailing list