Commit Graph

780 Commits

Author SHA1 Message Date
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
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
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
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
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
kaznacheev@chromium.org
0243bc875c Move serialized scope info from Code object to SharedFunctionInfo.
The scope info is now stored in a FixedArray referenced from SharedFunctionInfo.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-13 13:06:33 +00:00
ricow@chromium.org
328715cf50 Fix presubmit.
Review URL: http://codereview.chromium.org/2974008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-13 11:38:30 +00:00
ricow@chromium.org
ce28f58a03 Fix memory leaks in test-api.cc to make valgrind happy.
The memory leaks are all from the tests, not actually in V8.

I will put a nightly valgrind run on the fuzzer.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-13 11:31:47 +00:00
ager@chromium.org
ad5e73fb85 Fix preparsing from a source string that is not external.
This fixes issue 775.
Review URL: http://codereview.chromium.org/2959007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-13 10:29:31 +00:00
yurys@chromium.org
abaf8347a5 Allow to capture stack trace for uncaught exceptions
Review URL: http://codereview.chromium.org/2961003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-12 13:17:27 +00:00
erik.corry@gmail.com
8c767e02f9 ARM: Add support for the VFP mov literal instruction and mov
between single VFP registers.  Math.pow implementation has
been updated with the new instructions.  This is a commit
of http://codereview.chromium.org/2813046/show for Rodolph
Perfetta.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-08 12:38:02 +00:00
whesse@chromium.org
91ce5a4ffd Test for correct exception message in invalid preparse data test in test-api.cc
Review URL: http://codereview.chromium.org/2829049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-07 11:31:33 +00:00
whesse@chromium.org
f7c85755ba Prevent invalid pre-parsing data passed in through the API from crashing V8.
Review URL: http://codereview.chromium.org/2876046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5030 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-07 10:28:22 +00:00
ricow@chromium.org
eed4ed99c8 Add ES5 Object.isExtensible and Object.preventExtensions.
Review URL: http://codereview.chromium.org/2819034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5011 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-02 14:36:34 +00:00
lrn@chromium.org
04da7b90c9 X64: Added register holding Smi::FromInt(1).
Don't use r15 for anything any more.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5009 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-02 14:09:35 +00:00
podivilov@chromium.org
9added5953 Clear function breakpoints in Debug::HandleWeakDebugInfo callback.
When removing debug_info from SharedFunctionInfo, clear all breakpoints associated with that debug_info.
This is needed because function will live in heap until next gc, and therefore can be found
by Runtime::FindSharedFunctionInfoInScript.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4997 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-01 11:48:45 +00:00
sgjesse@chromium.org
ff6c4fe680 ARM: Special code for raising to the power of an integer
When calculating Math.pow where the exponent is a smi use a simple loop to calculate the result.

Added support for the vmov instruction moving from one doubleword extension register to another.

Added some Math.pow tests which partially covers what is in the Sputnik tests.
Review URL: http://codereview.chromium.org/2804033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4990 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-30 12:22:15 +00:00
sgjesse@chromium.org
fd5a7b37a2 ARM: Fix disassembly of double registers
Added a few disassembler tests for vadd, vsub, vmul and vdiv.
Review URL: http://codereview.chromium.org/2823036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4986 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-30 08:46:19 +00:00
lrn@chromium.org
0653689450 Fix Chromium issue 47824.
In rare cases a two-byte string was mistaken for an ascii-string.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-30 07:40:40 +00:00
vitalyr@chromium.org
6328df4fa2 Type info: fix three bit representation of smi type.
Review URL: http://codereview.chromium.org/2802022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-29 13:48:20 +00:00
sgjesse@chromium.org
65018d9123 ARM: Use the vsqrt instruction when available
vsqrt is used to calculate Math.sqrt(x), Math.pow(x, 0.5) and Math.pow(x, -0.5). Code size doesn't matter, as %_MathSqrt and %_MathPow are only called in one place each.
Review URL: http://codereview.chromium.org/2885002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4974 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-29 09:40:36 +00:00
yurys@chromium.org
7832dd1b97 Fix 15.2.3.4 es5conform test
TBR=mnaganov,sgjesse
Review URL: http://codereview.chromium.org/2832029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4959 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-28 09:25:09 +00:00
yurys@chromium.org
8896e45dec Object.getOwnPropertyNames should be free of duplicates
BUG=41243
Review URL: http://codereview.chromium.org/2825026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4958 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-28 08:31:31 +00:00
mikhail.naganov@gmail.com
e2dc1e3870 fixed
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-24 10:05:57 +00:00
mikhail.naganov@gmail.com
52a257499a Make SampleRateCalculator test resilient to float precision issues.
Tested with kSamplingIntervalMs values 2 and 4.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4933 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-24 08:57:24 +00:00
mikhail.naganov@gmail.com
b6e6ab6972 Heap profiler: perform a GC round before taking a snapshot
to get rid of global object loaded from a snapshot. This
eliminates the "double global object" issue. Thanks to Mads
for suggesting this!

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-22 14:58:08 +00:00
erik.corry@gmail.com
53340b2624 Add movw and movt support for ARMv7. This includes some code from
Zhang Kun.  For now we only emit movw and movt in places where no
relocation is needed.  Small performance boost (around 0.5%).
Also adds support for turning ALU operations (eor etc.) with
large immediates into mvn or movw followed by a register-based
ALU operation.
Review URL: http://codereview.chromium.org/2821014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-22 08:38:32 +00:00
sgjesse@chromium.org
685cae6021 API: Resolve linker issues with using V8 as a DLL
This changes the way the constants kJSObjectType, kFirstNonstringType and kProxyType are made available to the inlined part of the V8 API. This change to fixed constants resolves linker this linker error Windows

error LNK2001: unresolved external symbol "public: static int v8::internal::Internals::kJSObjectType" (?kJSObjectType@Internals@internal@v8@@2HA)

when linking against a V8 DLL.

This change also makes it possible to build all the C++ tests with ENABLE_DEBUGGER_SUPPORT not defined. Now C++ tests run ENABLE_DEBUGGER_SUPPORT not defined, and only the JavaScript tests which tests the debugger fails when ENABLE_DEBUGGER_SUPPORT is not defined.
Review URL: http://codereview.chromium.org/2820016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4898 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-18 10:52:59 +00:00
mikhail.naganov@gmail.com
93387f272e Heap profiler: add a missing link between a function closure and shared function info.
Review URL: http://codereview.chromium.org/2846012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4891 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-17 12:56:55 +00:00
podivilov@chromium.org
7808d45af5 Fix a bug when top level break points fall into the last function in script.
Review URL: http://codereview.chromium.org/2824007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4890 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-17 12:47:08 +00:00
podivilov@chromium.org
f5fdef253b Save actual break point location to script break point object.
Review URL: http://codereview.chromium.org/2864003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-16 14:50:07 +00:00
ager@chromium.org
2043956c54 Remove the comisd instruction from the ia32 and x64 assemblers. We
should always use ucomisd.

Add missing pop from floating-point stack in case of allocation failure.
Review URL: http://codereview.chromium.org/2831009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4878 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-16 12:32:34 +00:00
antonm@chromium.org
52975ae407 Remove old named property query API.
Review URL: http://codereview.chromium.org/2742007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-15 17:01:02 +00:00
mikhail.naganov@gmail.com
a4cc374d37 Fix HeapSnapshot test in the case when snapshotting is enabled.
TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4865 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-15 12:28:25 +00:00
mikhail.naganov@gmail.com
f213b096bc Heap profiler: publish API and add test.
Review URL: http://codereview.chromium.org/2822009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4864 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-15 11:44:07 +00:00
ager@chromium.org
31cb9f7090 Add external references used for regexp execution to the serializer.
Review URL: http://codereview.chromium.org/2838001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 21:03:59 +00:00
sgjesse@chromium.org
d3fc2db9f6 Fix Mac build of r4860
Build error:
test/cctest/test-api.cc: In function 'void ExternalArrayInfoTestHelper(v8::ExternalArrayType)':
test/cctest/test-api.cc:10069: warning: control may reach end of non-void function 'int ExternalArrayElementSize(v8::ExternalArrayType)' being inlined

TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/2826002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4861 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 13:19:16 +00:00
sgjesse@chromium.org
76e24831a6 API: Added functions to retreive information on indexed properties managed by the embedding layer
BUG=737
TEST=test-api/PixelArrayInfo, test-api/ExternalArrayInfo
Review URL: http://codereview.chromium.org/2818003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 13:09:27 +00:00
erik.corry@gmail.com
142de62819 ARM: Be more smart about switching instructions when immediates
don't fit in the instruction.  Use ubfx and sbfx more.
Review URL: http://codereview.chromium.org/2826001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 11:20:36 +00:00
ricow@chromium.org
407aaa9823 Only perform code flusing test if we actually do code flushing.
Puts a check into the code flushing test to only perform this if the
flush_code flag is set to true. 


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-11 08:52:36 +00:00
whesse@chromium.org
b93382d9ff Add test_b(Operand, imm8) to ia32 disassembler.
Review URL: http://codereview.chromium.org/2765001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4822 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 12:44:24 +00:00
sgjesse@chromium.org
634fb9152c More precise break points and stepping when debugging
Added support for more precise break points when debugging and stepping. To achieve that additional nop instructions are inserted where breaking would otherwise be impossible. The number of nop instructions inserted are sufficient to make place for patching with a call to a debug break code stub. On Intel that is 5 nop's for 32-bit and 13 for 64-bit. Om ARM 3 nop instructions (12 bytes) are required.

In order to avoid inserting nop's in to many places a simple ast checker have been added to check whether there are breakable code in a statement or expression. If it is possible to break in an expression no additional break enabeling code is inserted.

Added break locations to the true and false part of a conditional expression.

Added stepping tests to cover more constructs.

These changes are only in the full compiler.

Changed the default value for the option --debugger in teh d8 shell from true to false. The reason for this is that with --debugger turned on the full compiler will be used for all code in when running d8, which can be unexpeceted.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4820 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 12:04:49 +00:00
mikhail.naganov@gmail.com
a217c50ab2 Move token-related constants from CodeEntry to TokenEnumerator.
Review URL: http://codereview.chromium.org/2745002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4819 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 11:27:00 +00:00
sgjesse@chromium.org
c7ab2b6aa3 Remove the SetExternalStringDiposeCallback API
Changed the disposal of external string resources to call a virtual Dispose method on the resource. The default inplementation of Dispose deletes the object and will capture the delete operator matching the new operator used to allocate the object.
Review URL: http://codereview.chromium.org/2658008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 09:35:47 +00:00
ager@chromium.org
6dc72b690c Add an overloaded PreCompile method that takes a Handle<String>.
Code review URL: http://codereview.chromium.org/2633004/show


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 06:20:49 +00:00
ricow@chromium.org
316092c364 Flushing of code from functions that we expect not to use again.
This adds an additional step to full gc, removing code from functions
that are no longer in the compilation cache. The code is replaced with
a lazy compile version enabling us to recompile the function in case
we do actually need it again.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 15:39:10 +00:00
sgjesse@chromium.org
09acdc8446 Add an API to control the disposal of external string resources
A new callback have been added which - if set - will be called to dispose of external string resources passed from the embedder to the V8 engine.
Review URL: http://codereview.chromium.org/2645004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 08:49:07 +00:00
kaznacheev@chromium.org
ff61618c4b Extend CallIC to support non-constant names.
This speeds up constructs like this: 
var zz='replace'; '123'[zz]('3','4');

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4804 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 08:27:32 +00:00
antonm@chromium.org
12f6306420 First phase of migration to new named property query callbacks.
Eventually named property query callbacks will return attributes
(as an integer) or an empty handle if property is not intercepted.

To gradually migrate to this new API, USE_NEW_QUERY_CALLBACK
macro would control if old or new style API is used.

So the migration plan is:

1) introduce new API which should be explictily enabled;
2) switch to new API defining USE_NEW_QUERY_CALLBACK before
  include of <v8.h> (that would require changes to client code as well)
3) remove old API from v8
4) remove #define USE_NEW_QUERY_CALLBACK from clients.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4797 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-04 11:49:44 +00:00
lrn@chromium.org
d3d295efa7 Add optimized version of memcpy on ia32.
Only used in one place right now.
Still room for tweaking.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4796 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-04 11:30:55 +00:00
lrn@chromium.org
c3b4097f28 Fix bug in test case that made it fail to compile in non-debug mode.
Using ASSERT_EQ instead of CHECK_EQ means that a variable becomes unused.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-02 11:05:06 +00:00
lrn@chromium.org
5b7e77acea Fix bug that could cause a string to be incorrectly tagged as an array index.
We should only mark a string as an array index if we can store the entire value
of the number in the hash field. We sometimes failed to reject larger numbers.

Fixes http://code.google.com/p/v8/issues/detail?id=728

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-02 09:31:01 +00:00
mikhail.naganov@gmail.com
cdc09c5073 CPU profiler: sample call stack on profiling start.
This simplifies writing tests a lot, because it is now possible
to guarantee that certain function will present in a profile by
starting profiler from inside it.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-01 13:52:49 +00:00
mikhail.naganov@gmail.com
f939ccbc26 Unreviewed. Revert r4766, r4767.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4768 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-01 13:42:48 +00:00
mikhail.naganov@gmail.com
d32c918fb4 started adding test
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-01 13:35:44 +00:00
antonm@chromium.org
ebba43f37a Make intercepted properties retrievable only by getter to be not enumerable.
Currently if there is no query callback, V8 finds out intercepted properties'
attributes using getter: if getter returns not empty handle V8 treats
such a property as property with NONE attribues which means this property
is enumerable.

However, if there is no enumerator, this property cannot be enumerated.
Thus I think we should treat such properties as not enumerable.

Drawback of this approach is now one has to implement both query and enumerator
callbacks to implement enumerable intercepted properties.

BUG=725

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-28 11:54:58 +00:00
erik.corry@gmail.com
67c0ec6f17 Update and improve support for ARMv7 bitfield instructions.
This is a commit of http://codereview.chromium.org/2124022
for Rodolph Perfetta.  I changed the test in
test-assembler-arm.cc so it only runs if ARMv7 is supported.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 13:46:18 +00:00
vegorov@chromium.org
fc7c5f789a Cardmarking writebarrier.
Reapply r4715 with fixes reviewed in http://codereview.chromium.org/2276002.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 12:30:45 +00:00
antonm@chromium.org
3e88d0d2af Various refactorings in interceptor calling and loading.
1) do not push receiver early---that simplifies tail call preparation
on ia32/x64 and renders special cleanup unnecessary;
2) do not do second map check if interceptor's and cached holder
are the same;
3) do not push/pop receiver if receiver and holder registers are the same
(means that receiver is interceptor's holder);
4) do batch pushes on arm;
5) minor cosmetic improvements.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 14:04:37 +00:00
lrn@chromium.org
4afc3d3c4f X64: Make smi memory operations work directly on the embedded value.
Adds Operand-relative Operand constructor.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 10:02:07 +00:00
vegorov@chromium.org
e268fbdaba Revert r4715.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/2274001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 09:24:44 +00:00
sgjesse@chromium.org
22e4847fde ARM: Update the full compiler to handle all code
The full compiler is now complete on ARM as well. The syntax checker is still used to determine whether to use it for top level code or not during normal execution. When debugging is enabled all code will be compiled with the full compiler.

This change removes the temporary flag --force-full-compiler and now the flag --always-full-compiler enables the full compiler for all code on all platforms.

This also fixes building on Intel platform without debugger support (ENABLE_DEBUGGER_SUPPORT not defined) and adds full check for the full compiler for lazily compiled code.
Review URL: http://codereview.chromium.org/2163006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-25 14:08:17 +00:00
vegorov@chromium.org
675e711f1c Cardmarking writebarrier.
- New сardmarking write barrier handles large objects and normal objects in a similar fashion (no more additional space for pointer tracking is required, no conditional branches in WB code).
- Changes to enable oldspaces iteration without maps decoding:
-- layout change for FixedArrays: length is stored as a smis (initial patch by
Kevin Millikin)
-- layout change for SharedFunctionInfo: integer fields are stored as smi on
arm, ia32 and rearranged on x64.
-- layout change for String: meaning of LSB bit is fliped (1 now means hash not
computed); on x64 padding is added.
-- layout of maps is _not_ changed. Map space is currently iterated in a special
way.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-25 13:15:16 +00:00
antonm@chromium.org
897f7dedc1 Allow to define accessors on objects.
Currently one can only define accessors on object templates.  This patch
allows to create accessors on the fly.

These accessors could control access to elements as well.  This element
support is somewhat rudimentary and may require future work (for example,
we probably don't want to convert index into a string.)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-25 12:14:49 +00:00
ager@chromium.org
ab6055d85d Landing patch by tonyg@chromium.org:
Changing ScriptData API to serialize its internal representation to a
const char* array.

This decouples the API from the internal representation and avoids the need for
callers to serialize themselves.

As a side-effect, ScriptData::New() no longer assumes ownership of its input.
This shouldn't matter as typical usage patterns for the old API would have
required a copy prior to calling ScriptData::New().

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-25 06:38:19 +00:00
mikhail.naganov@gmail.com
decd0fed78 CPU profiler: make code events handling scalable.
I changed the implementation of a queue between the VM and processor
thread to be unbounded and lock-free, using Herb Sutter's example from
DDJ article: http://www.ddj.com/high-performance-computing/210604448
This had brought back profiling overhead to a minimum for the page
from Chromium's issue 16184.

BUG=714

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-22 05:27:19 +00:00
dimich@chromium.org
2c48283185 Include check for execution termination into bailout check.
This prevents re-entry into JS during stack unwinding caused by TerminateExecution().

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4705 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-21 20:52:19 +00:00
vegorov@chromium.org
2241d2af45 Reverting r4703.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/2073018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4704 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-21 17:37:47 +00:00
vegorov@chromium.org
8879691793 Cardmarking writebarrier.
Reapplication of r4685 (reviewed http://codereview.chromium.org/2101002) with minor modifications:

- Fix compilation problems on Win64.
- Improve heap verification pass: search for garbage pointers to new space not only in dirty regions but in all regions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-21 15:52:38 +00:00
yurys@chromium.org
f6a2ccf6b4 Provide debug event listener with access to the debuggee context. Also introduce new event listener setter that allows to set a callback that accepts single parameter encapsulating all debug event details so that additional information can later be passed to the listener without breaking compatibility with existing clients.
Review URL: http://codereview.chromium.org/2108024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4693 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-20 17:15:46 +00:00
ager@chromium.org
1d5eb6517f Reapply r4686: Complete version of full codegen for x64.
Already reviewed at: http://codereview.chromium.org/2078022/show

TBR=vegorov@chromium.org
Review URL: http://codereview.chromium.org/2137008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4689 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-20 14:33:02 +00:00
vegorov@chromium.org
955828e437 Reverting r4685, r4686, r4687
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/2071020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-20 14:02:51 +00:00
ager@chromium.org
355d3166e1 Complete the full codegenerator on x64.
Review URL: http://codereview.chromium.org/2078022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4686 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-20 13:50:09 +00:00
vegorov@chromium.org
b38a0a719a - Changes to enable oldspaces iteration without maps decoding:
-- layout change for FixedArrays: length is stored as a smis (initial patch by Kevin Millikin)
-- layout change for SharedFunctionInfo: integer fields are stored as smi on arm, ia32 and rearranged on x64.
-- layout change for String: meaning of LSB bit is fliped (1 now means hash not computed); on x64 padding is added.
-- layout of maps is _not_ changed. Map space is currently iterated in a special way.
- Cardmarking write barrier. New barrier handles large objects and normal objects in a similar fashion (no more additional space for pointer tracking is required, no conditional branches in WB code).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4685 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-20 13:10:38 +00:00
sgjesse@chromium.org
209711201d IA32: Use the full compiler when debugging
The full compiler will now be used for all code compiler when debugging is active. As the code generated by the full compiler is much simpler it will be easier to make debugging work better when using that code.

To ensure that all code debugged is from the full compiler all functions will have to be recompiled when starting debugging. Initialing debugging already turns off the code cache.
Review URL: http://codereview.chromium.org/2120009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-19 09:07:33 +00:00
mikhail.naganov@gmail.com
3d7ce8ac19 CPU profiler: add secure profiles by filtering out functions using security tokens.
As several pages can run in a single V8 instance, it is possible to
have functions from different security contexts intermixed in a single
CPU profile.  To avoid exposing function names from one page to
another, filtering is introduced.

The basic idea is that instead of capturing return addresses from
stack, we're now capturing JSFunction addresses (as we anyway work
only with JS stack frames.)  Each JSFunction can reach out for
context's security token. When providing a profile to a page, the
profile is filtered using the security token of caller page. Any
functions with different security tokens are filtered out (yes, we
only do fast path check for now) and their ticks are attributed to
their parents.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-18 14:19:33 +00:00
antonm@chromium.org
c7b2af37ba Use direct loop when filling small arrays.
r3995 (http://code.google.com/p/v8/source/detail?r=3995) introduce performance
regression for the case when arrat size is small (think new Array(4)).

It turns out that in those cases rep stos is slower than plain loop (apprently
due to ecx increment, but I didn't check this hypothesis.)  The next thing
to try could be direct jump into right place of long sequence of stos'es.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-17 14:14:34 +00:00
sgjesse@chromium.org
6d54362dbd Fixes bug with v8::StackTrace for non-zero script line offsets
Change by jaimeyap see http://codereview.chromium.org/1985004 for details.
Review URL: http://codereview.chromium.org/2049004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4623 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 06:24:01 +00:00
antonm@chromium.org
a83a88cd58 Moving more code to lookup an item from the native cache into code generator.
To bypass expensive invocation of JS functions from C++ and omit runtime
call overhead for searching the cache, more elaborate deferred code is generated.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-07 12:48:18 +00:00
ricow@chromium.org
aaf5662262 Use Int32Value() instead of ToNumber()->Value() in test-api.cc.
This problem was introduced in revision 4597.

ToNumber()->Value() used as an int will throw a compile waring on
windows since it returns a double.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 11:05:50 +00:00
serya@chromium.org
eaa95c523b Inlined load of string.length and array.length.
http://compute1.aar:9013/golem/r4583-v8-serya-length-inlined-vs-4583-v8.html

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 10:50:22 +00:00
whesse@chromium.org
1f13b58b97 Correct bug with left shift on X64 platform from change 4571 (http://code.google.com/p/v8/source/detail?r=4571). Speed up left shift with a constant left hand side on X64 platform. Add unit test for this bug. Remove unused failure target argument from MacroAssembler::SmiShiftLeft and MacroAssembler::SmiShiftLeftConstant.
Review URL: http://codereview.chromium.org/1934004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4598 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 08:15:15 +00:00
sgjesse@chromium.org
f5b5edf2a3 Adds C++ API for retrieving a stack trace without running JavaScript
This API is extensible, and parameterized with flags so that callers can specify what subset of information they want to capture for each stack frame. 

Patch by jaimeyap, see http://codereview.chromium.org/1694011 for details.
Review URL: http://codereview.chromium.org/2028001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 07:32:44 +00:00
floitschV8@gmail.com
7fc98eb1f4 Dtoa for fixed notation.
Review URL: http://codereview.chromium.org/1956005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 13:51:27 +00:00
floitschV8@gmail.com
92a9e30cd8 Revert r4591
Review URL: http://codereview.chromium.org/1968003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4592 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 10:33:27 +00:00
floitschV8@gmail.com
b441d246b3 Provide (non Gay) dtoa for fixed notation.
Review URL: http://codereview.chromium.org/1865001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4591 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 09:29:18 +00:00
antonm@chromium.org
6617fac3d4 Clean JS function results cache on each major GC.
We don't want to retain cached objects for too long.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4582 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 16:42:11 +00:00
serya@chromium.org
16d3811d50 Changing string length field type from int to SMI. It will make it be a regular field. Code generated in EmitNamedLoad could be patched for faster access to string.length.
Review URL: http://codereview.chromium.org/1706013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4581 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 14:49:50 +00:00
floitschV8@gmail.com
0aa67676f6 Switch to vectors instead of bare char* arrays.
Review URL: http://codereview.chromium.org/1732019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4546 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 12:15:02 +00:00
yurys@chromium.org
cf63fc5b9e Ensure v8 is initialized before initializing debug context
Review URL: http://codereview.chromium.org/1756018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4534 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 11:59:43 +00:00
vegorov@chromium.org
8c8b7f893d Fix api tests based on incorrect assumptions about GC behavior.
Review URL: http://codereview.chromium.org/1701018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4529 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 11:02:26 +00:00
yurys@chromium.org
9223815b6e Temporarily disable DebugContextIsPreservedBetweenAccesses which fails when snapshot=on
TBR=sgjesse
Review URL: http://codereview.chromium.org/1723018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4528 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 10:09:20 +00:00
yurys@chromium.org
9a9a268756 Fix test-debug: make sure debugger is unloaded before running next test
Review URL: http://codereview.chromium.org/1704015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 09:18:53 +00:00
yurys@chromium.org
0908fdc2f8 Don't unload debug context after it was requested through public API
Review URL: http://codereview.chromium.org/1731011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4524 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 08:23:20 +00:00
peter.rybin@gmail.com
6684b3c5d3 Rename Compare -> Comparator to resolve name conflict in v8::internal
Review URL: http://codereview.chromium.org/1737009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-27 21:20:02 +00:00
vegorov@chromium.org
cb27d09534 Fix bugs introduced by r4475:
- RelinkPageListInChunkOrder might relink unused pages into the middle of a sequence of used pages. Filler objects should be placed at the beginning of such unused pages otherwise generic iterators (e.g. HeapObjectIterator) would not handle them correctly. 
- ObjectAreaEnd() should not be used as an allocation limit for pages from FixedSpace. Pages in such spaces do not use top page_extra_ bytes of object area.

TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/1700005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4476 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-22 16:43:38 +00:00
vegorov@chromium.org
3fa49f8b91 Put empty pages discovered during sweeping to the end of the list of pages
instead of adding them to the free list.
Review URL: http://codereview.chromium.org/1683001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-22 14:42:21 +00:00
ricow@chromium.org
27f460b134 Change strlen to v8::internal::StrLength in liveedit tests (to fix compile error on windows 64)
Review URL: http://codereview.chromium.org/1610038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4447 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-20 10:41:38 +00:00
erik.corry@gmail.com
e1b3b92a2c Make not sucking at regexp the default
(remove V8_NATIVE_REGEXP flag, add
V8_INTERPRETED_REGEXP flag).
Review URL: http://codereview.chromium.org/1635001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-19 19:30:11 +00:00