Thanks for the additional info, Mads.
with this change I am a bit hazy on proper use of handles, returning handle
values (EscapeFrom vs. "return *handle").
Hopefully this version is close to correct.

Thanks!
Martin


http://codereview.chromium.org/6523052/diff/15001/src/ic.cc
File src/ic.cc (right):

http://codereview.chromium.org/6523052/diff/15001/src/ic.cc#newcode449
src/ic.cc:449: if (object->IsString() || object->IsNumber() ||
object->IsBoolean()) {
I don't understand why the object was double-wrapped in a handle. Based
on my understanding it is not necessary but if it was necessary I wonder
why the Handle<Object> object which arrives straight from the IC. I am
assuming GC will discover that object by walking the stack.

http://codereview.chromium.org/6523052/diff/15001/src/ic.cc#newcode541
src/ic.cc:541: Handle<JSFunction> function(JSFunction::cast(*result));
No HandleScope needed here, I believe ... the Handle will simply use the
one above (line 508).

http://codereview.chromium.org/6523052/diff/15001/src/ic.cc#newcode552
src/ic.cc:552: if (result->IsJSFunction()) return *result;
I am a bit hazy on using
"return handle.EscapeFrom(&scope)"
vs.
"return *handle;"
I saw both in the codebase...

http://codereview.chromium.org/6523052/diff/15001/src/ic.cc#newcode809
src/ic.cc:809: result = Handle<Object>(object_result);
Is there an established V8 pattern to export objects out of the nested
scope and Handle-ify it?

http://codereview.chromium.org/6523052/diff/15001/src/ic.cc#newcode821
src/ic.cc:821: return TypeError("property_not_function", object, key);
This sequence seemed cleaner, get rid of "answer" altogether.

http://codereview.chromium.org/6523052/

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

Reply via email to