I added a TODO about map sharing to heap.cc. We probably will want to cache
maps
keyed by prototype and handler. But as we discussed off-line, before seeing
some
real code it is difficult to tell what the best strategy is.
http://codereview.chromium.org/6932068/diff/1/include/v8.h
File include/v8.h (right):
http://codereview.chromium.org/6932068/diff/1/include/v8.h#newcode3670
include/v8.h:3670: static const int kJSObjectType = 0xa2;
On 2011/05/13 08:08:30, Kevin Millikin wrote:
Wow, that's brittle.
Indeed, I honestly was shocked when I saw it.
http://codereview.chromium.org/6932068/diff/1/src/objects.cc
File src/objects.cc (right):
http://codereview.chromium.org/6932068/diff/1/src/objects.cc#newcode136
src/objects.cc:136: if (IsSmi()) {
On 2011/05/13 08:08:30, Kevin Millikin wrote:
Not your code, but this looks clumsy. Isn't
Isolate* isolate = Isolate::Current();
Context* global_context = isolate->context()->global_context();
holder = ...
the same but better?
I guess so. I simplified that code.
http://codereview.chromium.org/6932068/diff/1/src/proxy.js
File src/proxy.js (right):
http://codereview.chromium.org/6932068/diff/1/src/proxy.js#newcode64
src/proxy.js:64: if (type != "object" && type != "function") proto =
$Object.prototype
On 2011/05/13 08:08:30, Kevin Millikin wrote:
You should write this as if (!IS_SPEC_OBJECT(proto)).
Done.
http://codereview.chromium.org/6932068/diff/1/src/runtime.cc
File src/runtime.cc (right):
http://codereview.chromium.org/6932068/diff/1/src/runtime.cc#newcode592
src/runtime.cc:592: HandleScope scope(isolate);
On 2011/05/13 08:08:30, Kevin Millikin wrote:
We can remove this HandleScope and call the Heap:: instead of Factor::
version
of the allocation function.
Done.
http://codereview.chromium.org/6932068/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev