Commit Graph

4085 Commits

Author SHA1 Message Date
ricow@chromium.org
e084e56129 Implement Function.prototype.bind (ES5 15.3.4.5).
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
2010-07-23 10:08:55 +00:00
whesse@chromium.org
8bb47c1939 Use static type information when creating the inlined code for comparison operators.
Review URL: http://codereview.chromium.org/3017025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5123 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-23 09:05:46 +00:00
ager@chromium.org
7d5038a3a4 Fixed a couple of issues with store inlining on arm.
Spill and merge virtual frames explicitly in the deferred code.

Account for the fact that the inlined write barrier size depends on
the size of the new space masks.

Review URL: http://codereview.chromium.org/3018015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-23 08:47:15 +00:00
whesse@chromium.org
9deeec0b08 Change asserts to STATIC_ASSERT if they can be checked at compilation time. Just in the codegen-xxx.cc files on all platforms.
Review URL: http://codereview.chromium.org/3017018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5121 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-23 08:25:48 +00:00
antonm@chromium.org
b8b12b2722 Properly propagate failures from helper methods.
Otherwise failures are not reported and callback may fail to setup.

Review URL: http://codereview.chromium.org/3035017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-22 13:39:18 +00:00
ager@chromium.org
63503a3fc7 Add ARM_LINK_FLAGS when build d8 with arch=arm to make
cross-compiling d8 easier.

Review URL: http://codereview.chromium.org/3062002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-22 12:57:48 +00:00
serya@chromium.org
bcf9989187 Fix d8 build error on a fresh checkout.
Review URL: http://codereview.chromium.org/2809069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-22 12:55:14 +00:00
ager@chromium.org
afa73d3907 Fix Win64 build.
TBR=ricow@chromium.org
Review URL: http://codereview.chromium.org/3017024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-22 09:01:00 +00:00
ager@chromium.org
a36bf8f017 Port inlined in-object property stores to ARM.
Review URL: http://codereview.chromium.org/2878043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-22 08:17:40 +00:00
ager@chromium.org
dc45fcb232 Port inline in-object property stores from ia32 to x64.
Review URL: http://codereview.chromium.org/3008017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5115 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-22 06:31:49 +00:00
kaznacheev@chromium.org
3377349a51 Support object literal map caching for literals with keys that are array indices.
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
2010-07-22 06:28:47 +00:00
whesse@chromium.org
8105e9baa3 Remove VirtualFrame::CallStoreIC(void) and CallCommonStoreIC from virtual-frame-x64.cc. Make implementations of CallStoreIC(key, is_contextual) and CallKeyedStoreIC() the same on x64 and ia32. Make ia32 and x64 implementations more alike by moving some functions and changing comments.
Review URL: http://codereview.chromium.org/3060002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-21 15:16:01 +00:00
whesse@chromium.org
9174700dca Add EmitKeyedStore and EmitKeyedPropertyAssignment to x64. Removal of Reference class from VisitAssignment complete on all platforms.
Review URL: http://codereview.chromium.org/3028015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-21 11:52:57 +00:00
fschneider@chromium.org
08c753d087 Prepare push to trunk. Now working on version 2.3.3.
Review URL: http://codereview.chromium.org/3053006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-21 10:53:38 +00:00
whesse@chromium.org
fe02d5e25f Add EmitNamedStore and CallStoreIC(name, is_contextual) to x64 platform.
Review URL: http://codereview.chromium.org/3050008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5108 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-21 10:31:52 +00:00
whesse@chromium.org
6612b98dcf Add EmitSlotAssignment to x64 platform.
Review URL: http://codereview.chromium.org/2878042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-21 08:50:57 +00:00
ager@chromium.org
74f9789f61 Landing for Rodolph Perfetta.
Add support for saturation instruction (ARMv6 or above).
The byte array clamping code has been updated accordingly.

Review URL: http://codereview.chromium.org/3036008/show

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-21 07:42:51 +00:00
ager@chromium.org
c9c7f8834e Inline in-object property stores on ia32 when in loop and not in top-level code.
Review URL: http://codereview.chromium.org/3046006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5105 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-21 06:59:34 +00:00
whesse@chromium.org
54f68eacbf Stop pushing arguments onto the stack in CompareStub until just before calling runtime.
This is a fixed version of change 5097, which had the problem that LoadFloatOperands tried to load the arguments from the stack.
Review URL: http://codereview.chromium.org/3040010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5103 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-20 12:41:43 +00:00
vegorov@chromium.org
f32e2b7093 Output time spent in code flushing in GC NVP trace.
Add support for flushcode scope and cumulative stats into gc-nvp-trace-processor.

Review URL: http://codereview.chromium.org/3054003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5102 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-20 10:59:00 +00:00
ricow@chromium.org
6f69731a23 Update inheritance hierarchy in Objects.h to better reflect the actual hierarchy.
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
2010-07-20 07:14:19 +00:00
ager@chromium.org
ec70b5c085 Update Code::NUMBER_OF_KINDS to include binary op ICs.
Review URL: http://codereview.chromium.org/3027013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-20 06:23:36 +00:00
ager@chromium.org
adc2ff755d Land for Victor Wang.
Add direct_dependent_settings for v8 dll so targets that depend on v8
has USING_V8_SHARED defined.

Review URL: http://codereview.chromium.org/2946014/show

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-20 05:51:10 +00:00
whesse@chromium.org
24ca3eddd7 Revert 5097 on ia32 platform until problem is diagnosed.
Review URL: http://codereview.chromium.org/3018009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5098 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-19 14:26:51 +00:00
whesse@chromium.org
96a7cc4a38 Delay the pushing of arguments until just before calling runtime in CompareStub.
This will allow jumps to runtime that skip useless tests.
Review URL: http://codereview.chromium.org/3016004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5097 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-19 13:35:41 +00:00
antonm@chromium.org
793d0a92b9 Add a check that weak object handle is not in NEAR_DEATH state after weak callback invocation.
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
2010-07-19 13:26:25 +00:00
whesse@chromium.org
9991a4b226 Fix issue 785. For-in now works on strings: for (var i in "asdf") now works
all the time, not just the first time it is run.
Review URL: http://codereview.chromium.org/3037008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5095 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-19 12:45:21 +00:00
ager@chromium.org
2a877bfc95 Landing for pmehta.
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
2010-07-19 10:02:11 +00:00
ager@chromium.org
35a80e1624 Landing for hans@chromium.org.
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
2010-07-19 09:51:33 +00:00
ricow@chromium.org
aec9ce891e Prepare push to trunk. Now working on version 2.3.2.
Review URL: http://codereview.chromium.org/2811055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5090 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-19 07:33:05 +00:00
ricow@chromium.org
5caa11dafb Reorder SharedFunctionInfo setup in lazy compile, quick fix for crbug.com/49099
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
2010-07-19 06:29:30 +00:00
ricow@chromium.org
4957326521 Refactor type checks in v8natives.js and runtime.js.
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
2010-07-16 11:21:08 +00:00
serya@chromium.org
931bf1d63d StringDictionary::FindEntry optimized for symbol strings.
Review URL: http://codereview.chromium.org/3020003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-16 10:07:57 +00:00
whesse@chromium.org
1f85eccb24 Fix compilation errors on X64. Error from r5080 is constructor Operand(register) with too few arguments, while constructing a dummy return value in unreachable code to avoid compiler errors. Also added explicit cast from intptr_t to int in profile-generator.cc to avoid compiler warnings, introduced in r5078.
Review URL: http://codereview.chromium.org/3030002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-16 08:20:39 +00:00
mikhail.naganov@gmail.com
f2cf990de2 Fix TestHeapEntryIdsAndGC test. The assert was wrong.
TBR=ager@chromium.org

Review URL: http://codereview.chromium.org/2861051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-15 15:41:05 +00:00
mikhail.naganov@gmail.com
3471e873ab Fix presubmit errors in test-heap-profiler.cc
I tried adding CheckNonEqualsHelper for int64_t, but this causes
another avalanche of function resolving ambuguities. So, I ended
up fooling linter.

TBR=ager@chromium.org

Review URL: http://codereview.chromium.org/3024001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-15 15:01:42 +00:00
whesse@chromium.org
5794e68f76 Remove unnecessary formatting differences between ia32 and x64 code generators. Mainly just typographical changes.
Review URL: http://codereview.chromium.org/3023001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5080 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-15 14:31:49 +00:00
mikhail.naganov@gmail.com
522faec553 Fix compile errors on Linux x64 and Windows.
Will fix test-heap-profiler in the next change.

TBR=ager@chromium.org

Review URL: http://codereview.chromium.org/2877019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-15 14:28:52 +00:00
mikhail.naganov@gmail.com
c98ac6e82c Heap profiler: implement diffing of snapshots.
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
2010-07-15 13:21:50 +00:00
whesse@chromium.org
dd06f4f102 Avoid a smi check when comparing an unknown to a constant smi for equality on ia32 and x64 platforms.
Review URL: http://codereview.chromium.org/2897013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5077 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-15 10:34:08 +00:00
whesse@chromium.org
ee1598ad90 Fix compilation and linking with V8_INTERPRETED_REGEXP flag.
Review URL: http://codereview.chromium.org/2836051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-15 10:31:30 +00:00
ager@chromium.org
c93971ba20 Prepare push to trunk. Now working on version 2.3.1.
Review URL: http://codereview.chromium.org/2805081

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5073 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-15 08:50:01 +00:00
ricow@chromium.org
f5f0b80363 Implement ES5 Object.seal and Object.isSealed.
This change adds the ES5 Object.seal 15.2.3.8 and Object.isSealed 15.2.3.11 methods.

Review URL: http://codereview.chromium.org/2993006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5072 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-15 07:51:14 +00:00
serya@chromium.org
1b9391be7a Fix GenerateNegativeLookup to work with non-symbols as a dictionary key.
Review URL: http://codereview.chromium.org/2928009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-15 06:17:45 +00:00
whesse@chromium.org
cb1eedd269 Fix error in x64 fast smi loops, change 4998.
Review URL: http://codereview.chromium.org/2925012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5069 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-14 13:22:47 +00:00
ricow@chromium.org
e2fab5fd9f Fix bug in Object.isFrozen which always classifies non-extensible objects as frozen.
Since out internal representation of a property descriptor does not have configurable and writable 
attributes Object.isFrozen returns true whenever an object is not extensible.
This change makes use of the right method calls on our internal representation (isWritable() and 
isConfigurable()). Tests added directly to the mjsunit test.


Review URL: http://codereview.chromium.org/2904015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-14 13:15:43 +00:00
kaznacheev@chromium.org
db23321704 Create a separate class to encapsulate ScopeInfo serialization.
The static ScopeInfo members moved into this class.
The new class is named ScopeInfoObject which I am not proud of,
better ideas are very welcome.

Also got rid of the sentinels in the serialized scope info which saves 3 words per function
and is not slower.
 
Review URL: http://codereview.chromium.org/2908009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-14 11:18:09 +00:00
ricow@chromium.org
3bc97b7d34 Remove check for heap allocated locals from code flushing.
Since bleeding edge revision 5056 we no longer need to check that
there are no heap allocated locals in the scope info, since these will
be preserved after the scope info was moved to the SharedFunctionInfo
class.


Review URL: http://codereview.chromium.org/2931016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-14 09:45:08 +00:00
mikhail.naganov@gmail.com
84ffa5610b Debugger: introduce parametrized debug break, the parameter is passed
back to EventListener to be able to dynamically specify behavior
on asynchronously enforced VM breakouts.

Review URL: http://codereview.chromium.org/2962007/show

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-14 08:23:35 +00:00
ager@chromium.org
6744793c90 Landing for Rodolph Perfetta.
Allow compareStub on ARM to take register in reverse order optionally.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/2850046/show

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5059 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-13 20:54:06 +00:00