and the value can share a register. We need to remove this aliasing
before modifying the registers.
I haven't managed to generate a stand-alon test case for this
yet. I'll do that as a separate change. This was found while loading
Wave.
Review URL: http://codereview.chromium.org/3039025
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5127 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Please note that we do not implement correctly the setting of caller
and arguments on the returned objects, since we already have these
properties on function objects (and they are non-configurable).
Also corrects indention in DefineOwnProperty.
Review URL: http://codereview.chromium.org/3046010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5124 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
The caching code used to require that all keys in the literal were symbol strings
in order to be able to cache object literal maps.
Relaxed this requirement to allow array indices as well (as in { "1": "one", two: "two" }).
Changed the way 'number_of_properties' is calculated so that redundant property slots are not
allocated for array indices.
Review URL: http://codereview.chromium.org/2858064
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5114 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
We do not have a GlobalContext class.
We do, however, have a SerializedScopeInfo class that inherits FixedArray.
Starting comment is also slightly misleading, since not all objects in the hierarchy is described in objects.h (e.g., Context is described in contexts.h).
Review URL: http://codereview.chromium.org/2811057
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5101 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
If object enters NEAR_DEATH state, it must be explicitly cleared and/or disposed, otherwise
it would retain JS object forever. Note as well that parameter is reset to NULL on first
invocation so weak handle callback would be in hard situation.
Review URL: http://codereview.chromium.org/3011009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Changed a static cast from static_cast<int> to static_cast<size_t>
that previously introduced a signed/unsigned comparison issue in the
main allocator for V8 (MemoryAllocator::AllocateRawMemory) that could
be used to bypass the V8 allocation limitations or trigger integer
overflows.
Review URL: http://codereview.chromium.org/3027006/show
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
TYPE_CHECK in v8.h should assign to volatile qualified null-pointer.
Unless the pointer is volatile qualified, Clang will warn that LLVM
removes the assignment during optimization. This is not a problem as
that code should never execute, but the warning is treated as an error
when building Chromium, and thus stops the build.
Code review URL: http://codereview.chromium.org/3005010/show
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This fixes issue 49099 (http://crbug.com/49099) that makes chromium
crash if a gc is triggered by setting the scopeinfo in CompileLazy. If
this gc triggers code flushing the compiled function could be flushed,
causing the ASSERT(shared->is_compiled()) to fail. By reordering the
two methods we make sure that no allocation happens before the end of
the method.
Review URL: http://codereview.chromium.org/3035006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This includes adding a new inline IsSpecObject method to the code
generator. The old approach was somehow ineffecient since we would
call both IsObject, IsUndetectable and IsFunction to determine if
something was an object according to the spec. This change introduces
a new macro that determines if something is an object according to the
spec (and this does not include null).
This change also corrects a few places where undetectable objects was
not allowed even when they should be (priorly they would use only
IS_SPEC_OBJECT_OR_NULL, which would return false on an undetectable
object, the new IS_SPEC_OBJECT returns true on an undetectable object.
Review URL: http://codereview.chromium.org/2877018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
To trace objects between snapshots, an external map of object tags is
maintained. After the first heap snapshot has been taken, the map is
updated by reporting object moves from the GC. If no snapshots were
taken, there is no overhead (except for flag checking).
I considered graph comparison algorithms that doesn't require using
object tags, but they are all of a high computational complexity, and
will still fail to detect object moves properly, even for trivial
cases, so using tags looks like unavoidable.
Review URL: http://codereview.chromium.org/3020002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00