Commit Graph

906 Commits

Author SHA1 Message Date
yurys@chromium.org
a2549c96e8 Check that constructor is a FunctionMirror before calling .name(), otherwise we may end up calling name method on a mirror object that doesn't have it.
Review URL: http://codereview.chromium.org/271053

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-13 14:28:09 +00:00
lrn@chromium.org
292323b355 X64: Fix bugs affecting Win64.
Increase stack space on Win64 sample and cctest executables.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-13 10:56:13 +00:00
christian.plesner.hansen@gmail.com
cd3a47b6d2 Fixed trim test failure.
Review URL: http://codereview.chromium.org/273033


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-13 08:29:19 +00:00
christian.plesner.hansen@gmail.com
f1354a299e Add trim, trimLeft and trimRight methods to String
Based on a recent patch for Webkit.
trim is defined in ES 5 section 15.5.4.20.

Author: Jan de Mooij <jandemooij@gmail.com>


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-13 08:13:45 +00:00
whesse@chromium.org
3aaa04a1c2 Change sscanf to atoi in test-debug.cc to make lint happy.
Review URL: http://codereview.chromium.org/264033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-12 13:55:06 +00:00
lrn@chromium.org
5767628039 Removed 31-bit smis.
Review URL: http://codereview.chromium.org/267049


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-12 11:19:20 +00:00
peter.rybin@gmail.com
de3e260e38 Make cctest test-debug.cc more accurate
Review URL: http://codereview.chromium.org/243036


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-09 16:27:47 +00:00
sgjesse@chromium.org
b9e7112d44 Add support for comisd and cmov in IA-32 disassembler.
Review URL: http://codereview.chromium.org/266014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3040 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-08 13:28:46 +00:00
lrn@chromium.org
830ba4e764 X64: Fix incompatability with previous revision.
And fix bug in debug-mode of 32-bit smi.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-08 13:09:28 +00:00
antonm@chromium.org
82a231412d Introduce v8::Integer::NewFromUnsigned method.
Review URL: http://codereview.chromium.org/251100

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-08 12:54:29 +00:00
lrn@chromium.org
aed6a37c10 X64: Convert smis to holding 32 bits of payload.
Review URL: http://codereview.chromium.org/196139


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-08 12:36:12 +00:00
mikhail.naganov@gmail.com
572a050102 Fix a crash in Logger::LogCompiledFunctions due to a presence of scripts with disposed source.
When starting JS profiling under Chromium, a map from function addresses to function names is created. During it, for sourceful scripts, an attempt to access script source is made. This can cause a crash, if a source is an external string, which already has been disposed. We had a similar problem in the past with DebugGetLoadedScripts.

BUG=http://crbug.com/23768
TEST=test-log/Issue23768

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-07 12:20:02 +00:00
mike@belshe.com
83e621d331 Fix test error for IdleNotification() return code check.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-06 00:35:46 +00:00
mike@belshe.com
5191c81dff Remove the high-priority flag from IdleNotification() since
it is a strange API and unused anyway.

When we roll this to Chrome, we'll need a small chrome patch
to fix Chrome's usage of the API.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-06 00:06:17 +00:00
whesse@chromium.org
35cf7a24ff Recommit coderanges putting code objects within a 2 GB range, reserving only a 256 MB range of virtual memory for the code range.
Review URL: http://codereview.chromium.org/243087

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-05 11:16:25 +00:00
whesse@chromium.org
bd1378eb20 Revert revisions 3013, 3014, and 3016. We need a better solution.
Review URL: http://codereview.chromium.org/251088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3017 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-05 10:50:55 +00:00
whesse@chromium.org
423de4d776 Add CHECK_INT64_EQ function to avoid operand size ambiguities.
Review URL: http://codereview.chromium.org/256048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3016 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-03 13:46:22 +00:00
antonm@chromium.org
359ad56264 Fast fix to make tree green.
Review URL: http://codereview.chromium.org/256041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3015 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-02 18:49:23 +00:00
antonm@chromium.org
8925e8af0a Add a method to convert unsigned C integer into V8 Integer.
Review URL: http://codereview.chromium.org/260002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3013 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-02 15:51:07 +00:00
christian.plesner.hansen@gmail.com
2c51696fc3 Changed Object.keys to return strings for element indices.
Review URL: http://codereview.chromium.org/246077


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3012 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-02 13:43:16 +00:00
erik.corry@gmail.com
4b19c36068 When allocation is forced because we already did two GCs we need to force GCs
even if we are attempting to allocate in young space.  There were a few cases
where this wasn't done.  Also misc. changes to make diagnosis of errors like
this one easier.
Review URL: http://codereview.chromium.org/251072

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-02 13:35:37 +00:00
ager@chromium.org
e9acdc7a00 Follow the spec in disallowing function declarations without a name. We
used to allow these for compatibility, but both Safari and Firefox now
disallow them.
Review URL: http://codereview.chromium.org/242124

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3009 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-02 12:47:15 +00:00
whesse@chromium.org
1350d0cfb9 Revert change r3004, issue http://codereview.chromium.org/244022, because Linux 64-bit Chrome crashes with more than 10 tabs. Linux may not like 10 processes, each reserving 2 GB of virtual address space.
Review URL: http://codereview.chromium.org/246064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-01 15:18:05 +00:00
erik.corry@gmail.com
f2de3fd6d2 Fix the stack limits setting API so it is usable.
Review URL: http://codereview.chromium.org/242074

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-01 10:33:05 +00:00
whesse@chromium.org
48e6d4706f Allocate all executable code within a 2 GB code range.
Review URL: http://codereview.chromium.org/244022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3004 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-01 09:29:38 +00:00
kmillikin@chromium.org
fb038bf146 Two changes, one a refactoring and one that affects V8's JS semantics.
1. Change the AST node type CallNew to be a subclass of Expression
   rather than Call.  It's not really a call but it just happens to
   have the same fields.

2. Change our error reporting for invalid left-hand sides in for-in
   statements, pre- and postfix count expressions, and assignments.
   Before we signaled a syntax error at compile time *unless* the LHS
   was a function call or 'new' expression, in which case we signaled
   a reference error at runtime.  Now we signal a reference error at
   runtime in all cases.  This matches the JSC behavior in Safari 4.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-30 09:49:36 +00:00
sgjesse@chromium.org
70821329a5 Return the original value when assigning to a pixel array.
After fast-case assignment to a pixel array the original value assigned is now returned. Before the un-tagged smi value was returned causing crashes.

BUG=22913
TEST=cctest/test-api/PixelArray
Review URL: http://codereview.chromium.org/248033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-29 14:56:24 +00:00
erik.corry@gmail.com
ae882b44e7 * Fix memory leaks caused by thread local data being lost.
* Rename some instance variables and accessors to fit code style.
* Don't overwrite existing thread ID.
Review URL: http://codereview.chromium.org/251014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2977 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-28 12:25:21 +00:00
mikhail.naganov@gmail.com
1ef8754597 Heap profiler: correctly determine equivalence of objects having self-refs.
Review URL: http://codereview.chromium.org/242031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2972 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-28 09:05:06 +00:00
mikhail.naganov@gmail.com
f1a89f3379 Heap profiler: aggregate retainers count of equivalent clusters.
Also perform some refactoring.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-28 07:12:39 +00:00
christian.plesner.hansen@gmail.com
319097f255 Fixed some cctest flakiness on mac.
Review URL: http://codereview.chromium.org/242003


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2968 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-25 10:36:00 +00:00
mikhail.naganov@gmail.com
9b4c950963 Heap profiler: count the number of back references for objects.
Also, perform some refactoring to reuse common code between constructor and retainer profiles.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-18 12:05:18 +00:00
ager@chromium.org
fbc89caf3f Remove failure expectation for mozilla test that now passes.
TBR=christian.plesner.hansen
Review URL: http://codereview.chromium.org/213005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-17 11:56:58 +00:00
mikhail.naganov@gmail.com
abc0bd46f6 Add initial version of retainers heap profile.
The profile is taken together with constructors profile. In theory, it
should represent a complete heap graph. However, this takes a lot of memory,
so it is reduced to a more compact, but still useful form. Namely:

 - objects are aggregated by their constructors, except for Array and Object
   instances, that are too hetereogeneous;

 - for Arrays and Objects, initially every instance is concerned, but then
   they are grouped together based on their retainer graph paths similarity (e.g.
   if two objects has the same retainer, they are considered equal);

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-16 13:41:24 +00:00
sgjesse@chromium.org
40471b41da Fix GC bug and ARM simulator timeout.
In the Runtime_DebugGetPropertyDetails the raw object pointers from a LookupResult could be used after a GC might have happened. Fixed the bug and restructured the code to make it less likely for changes to the code to re-introduce the bug.

Skipped a long running test from the ARM simulator in debug mode (and renamed the test).
Review URL: http://codereview.chromium.org/204039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-16 13:09:26 +00:00
whesse@chromium.org
412a146825 X64: Ensure that unary subtraction returns a zero-extended smi, if it returns a smi.
Review URL: http://codereview.chromium.org/195101

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2900 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-16 12:40:15 +00:00
sgjesse@chromium.org
677c043fee Handle array construction on native code.
The construction of arrays when using the the Array function either as a constructor or a normal function is now handled fully in generated code in most cases. Only when Array is called with one argument which is either negative or abowe JSObject::kInitialMaxFastElementArray (which is currently 1000) or if the allocated object cannot fit in the room left in new space is the runtime system entered.

Two new native code built-in functions are added one for normal invocation and one for the construct call. The existing C++ builtin is renamed, but kept. When the normal invocation cannot be handled in generated code the C++ builtin is called. When the construct invocation cannot be handled in native code the generic construct stub is called (which will end up in the C++ builtin through a construct trampoline).

One thing that might be changed is preserving esi (constructor function) during the handling of a construct call. We know precisily what function we where calling anyway and can just reload it. This could remove the parameter construct_call to ArrayNativeCode and remove the handling of this from that function.

The X64 and ARM implementations are not part of this changelist.
Review URL: http://codereview.chromium.org/193125

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2899 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-16 11:17:57 +00:00
christian.plesner.hansen@gmail.com
5c3fd26620 [ES5] Made properties of the arguments array enumerable.
Review URL: http://codereview.chromium.org/200141


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2897 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-16 08:25:54 +00:00
christian.plesner.hansen@gmail.com
0c5b0dbed0 Fixed typo in mozilla expectations file.
Review URL: http://codereview.chromium.org/206014


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-15 14:36:29 +00:00
christian.plesner.hansen@gmail.com
c209d82788 Fixed mozilla test expectations.
Review URL: http://codereview.chromium.org/196121


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2893 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-15 14:02:31 +00:00
christian.plesner.hansen@gmail.com
6519951e06 Added test suite adapter for es5conform.
Review URL: http://codereview.chromium.org/193112


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2892 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-15 13:30:46 +00:00
christian.plesner.hansen@gmail.com
77ff957f58 Implemented Object.keys.
Review URL: http://codereview.chromium.org/201114


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2890 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-15 11:51:40 +00:00
christian.plesner.hansen@gmail.com
681e67b775 Make 'hidden' the default visibility for gcc. Add build option,
visibility=[hidden|default], that controls visibility and make
'hidden' the default.  Export a few variables that had been forgotten.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2884 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-15 11:11:09 +00:00
sgjesse@chromium.org
34d6ff7606 Implemented missing pieces of the debugger for ARM.
The main piece of this change was to add support for break on return for ARM. On ARM the normal js function return consist of the following code sequence.

  mov sp, fp
  ldmia sp!, {fp, lr}
  add sp, sp, #4
  bx lr

to a call to the debug break return entry code using the following code sequence

  mov lr, pc
  ldr pc, [pc, #-4]
  <debug break return entry code entry point address>
  bktp 0

The values of Assembler::kPatchReturnSequenceLength and Assembler::kPatchReturnSequenceLength are somewhat misleading, but they fit the current use in the debugger. Also Assembler::kPatchReturnSequenceLength is used in the IC code as well (for something which is not related to return sequences at all). I will change that in a separate changelist.

For the debugger to work also added recording of the return sequence in the relocation info and handling of source position recording when a function ends with a return statement.

Used the constant kInstrSize instead of sizeof(Instr).

Passes all debugger tests on both simulator and hardware (only release mode tested on hardware).
Review URL: http://codereview.chromium.org/199075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-14 06:57:24 +00:00
lrn@chromium.org
158dcbc39d X64: Extract all smi operations into MacroAssembler macros.
First step in changing Smi representation.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2869 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-10 12:55:27 +00:00
erik.corry@gmail.com
adaab82197 Compile fixes for ARM and miscellaneous spolling.
Review URL: http://codereview.chromium.org/199056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 09:35:34 +00:00
christian.plesner.hansen@gmail.com
d391c5491e Made function prototype property DontEnum for compatibility with
Safari.  Fixed const error in api.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2852 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 09:30:33 +00:00
yurys@chromium.org
bbc3c97c2c Support stepping out for recursive functions.Simply flooding JS function from the calling stack frame with one shot breakpoints is not enough to support step out action in all cases since the function on top of the stack may be turn recursive and we may end up flooding itself. To overcome this a pointer to the stack frame where the debugger should be invoked after stepping out is strored in the debugger.Chromium bug:http://code.google.com/p/chromium/issues/detail?id=17967
Review URL: http://codereview.chromium.org/200041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 08:40:59 +00:00
yurys@chromium.org
ae062d5df1 Added new scope type ScopeIterator::ScopeTypeCatch for with generated from catch blocks.
Removed a false assertion in ScopeIterator that assumed context extension to never be a JSContextExtensionObject.

The context extension object in a 'with' context is JSContextExtensionObject iff the 'with' statement is generated from a catch block in order to extend its local scope with a variable holding exception object. This is how we differentiate 'catch' scope from 'with' scope.

Chrome bug:
http://code.google.com/p/chromium/issues/detail?id=17229
Review URL: http://codereview.chromium.org/202005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-08 10:20:28 +00:00
kasperl@chromium.org
6621a43833 Add regression test case for http://crbug.com/18639 which
was fixed in r2642.
Review URL: http://codereview.chromium.org/192037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-08 07:22:35 +00:00
sgjesse@chromium.org
e26c1c8d52 Use more socket ports in debugger agent test.
This is an attempth to address the flakiness of the test cctest/test-debug/DebuggerAgent on the Mac build-bot.
Review URL: http://codereview.chromium.org/200037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2839 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-07 13:24:43 +00:00
yurys@chromium.org
ab54e95377 Support stepping in functions called using CallFunction stub. When Debug::PrepareStep is called to prepare 'step in' and current code target is CallFunction stub, the debugger will find function being called on the expression stack and flood it with one shot breakpoints.
BreakLocationIterator changed to treat 'debugger;' statements as a possible break location. Since 'debugger;' statement should always invoke debugger it is hanled in a special way.

Related Chromium issue:
http://code.google.com/p/chromium/issues/detail?id=17978
Review URL: http://codereview.chromium.org/195015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2830 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-07 07:20:05 +00:00
mikhail.naganov@gmail.com
65dcf75c2c Linux profiler: check whether signal handler is called in the VM thread.
I have several Chromium's core files having SIGPROF signal handler called in the context of an arbitrary thread, causing a crash. This change introduces checking of current thread in the signal handler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-04 11:16:51 +00:00
lrn@chromium.org
643d5cde71 Marked Mozilla Date test as flaky.
Seems to err in a few cases, depending on the current time.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2822 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-04 08:09:58 +00:00
ager@chromium.org
d7dcf8d633 Add verification flags to debug mjsunit test runs.
Review URL: http://codereview.chromium.org/186006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-02 12:40:00 +00:00
lrn@chromium.org
11ef516137 ARM RegExp fix bug 432.
Review URL: http://codereview.chromium.org/186005


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-02 09:10:49 +00:00
ager@chromium.org
74241d5116 Change ASSERT to CHECK in test-heap. Use int instead of intptr_t to
make MacOS compiler happier.

We need to clean this stuff up.

TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/182044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-01 15:51:51 +00:00
ager@chromium.org
41722bc6bc Change cache test to only test for correct behavior on collisions and
not the exact value.

On MacOS, there is a difference in the last decimal digit from the
other platforms.

TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/180062

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-01 15:40:19 +00:00
ager@chromium.org
876049ba16 Change a cast to make MacOS compiler happy.
We need to find a nicer way to handle these.

TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/182043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-01 15:28:31 +00:00
ager@chromium.org
d8af3528dd Fix the handling of termination exceptions thrown when creating error
objects in the runtime system.
Review URL: http://codereview.chromium.org/179062

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2796 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-01 13:55:45 +00:00
whesse@chromium.org
13d59a069d Add explicit integer type-casts to make WIN64 build without errors.
Review URL: http://codereview.chromium.org/178054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2795 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-01 13:08:16 +00:00
erik.corry@gmail.com
09f65846d0 Use more sane inputs to get more consistent answers from
transcendental functions.
Review URL: http://codereview.chromium.org/173644

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2794 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-01 11:47:08 +00:00
erik.corry@gmail.com
be70d6fc4d Cache the results of slow math operations on machines that don't
have hardware fpu instructions to execute them.
Review URL: http://codereview.chromium.org/179059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2790 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-01 09:03:58 +00:00
ager@chromium.org
90abdd285a Mark native regexp macro assembler tests as flaky on ARM until Lasse
can look at them.

The code seems to work on all of our tests.

TBR=lrn@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2788 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-31 16:24:44 +00:00
ager@chromium.org
3fe0bc0436 Remove asserts that do not hold when lazily compiling extension code.
Add checks for the use of eval and with in natives files to the js2c
script.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2786 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-31 15:02:54 +00:00
lrn@chromium.org
9230ad29eb ARM native regexps.
Review URL: http://codereview.chromium.org/173567


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-31 12:40:37 +00:00
sgjesse@chromium.org
dba8b2f99a Added 64-bit Windows build through SCons.
The SCons build now supports building for 64-bit Windows. This still requires that the SCons build is passed an env parameter containing the PATH and LIB for the 64-bit build as SCons autodetects the 32-bit environment.

Lowered the warning level for the 64-bit build temporarily.

Added a verbose option to SCons to display the startup banner for the Microsoft Visual C++ tools.
Review URL: http://codereview.chromium.org/174605

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-27 13:12:28 +00:00
sgjesse@chromium.org
717394492d Generate specialized constructor code for constructing simple objects.
For objects which only have simple assignments of the form this.x = ...; a
specialized constructor stub is now generated. This generated code allocates the
object and fills in the initial properties directly. If this fails for some
reason code continues in the generic constructor stub which in turn might pass
control to the runtime system.

Added counter to see how many objects are constructed using a specialized stub.

The specialized stub is only implemented for ia32 architecture in this change.
For x64 and ARM the generic construct stub is used.

This is change is identical to http://codereview.chromium.org/174392 (committed in r2753 and reverted in r2754) except that a few parts have already been committed from http://codereview.chromium.org/173469 (committed in r2762).
Review URL: http://codereview.chromium.org/173470

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 12:22:44 +00:00
sgjesse@chromium.org
681440e273 Handle pre-allocated properties when copying map.
When copying a map always set the descriptor array to describe the pre-allocated properties, even when descriptors are to be dropped.

Added a test which otherwise failed with an assert on ARM in debug mode. The reason for it only surfasing on ARM is that the NewObject runtime function is always used for allocating new JSObjects on ARM.

This change includes a few parts of http://codereview.chromium.org/174392 needed to trigger the error.
Review URL: http://codereview.chromium.org/173469

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 11:03:07 +00:00
ager@chromium.org
11b317d94f Only pass idle notifications on from the API if V8 has been
initialized.

Minor cleanups.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 08:13:27 +00:00
sgjesse@chromium.org
3fdbc0848c Reverting 2753.
Review URL: http://codereview.chromium.org/173349

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-25 15:00:07 +00:00
sgjesse@chromium.org
53531ed48a Generate specialized constructor code for constructing simple objects.
For objects which only have simple assignments of the form this.x = ...; a specialized constructor stub is now generated. This generated code allocates the object and fills in the initial properties directly. If this fails for some reason code continues in the generic constructor stub which in turn might pass control to the runtime system.

Added counter to see how many objects are constructed using a specialized stub.

The specialized stub is only implemented for ia32 architecture in this change. For x64 and ARM the generic construct stub is used.
Review URL: http://codereview.chromium.org/174392

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-25 12:23:58 +00:00
mike@belshe.com
f736ed3ff8 Forgot to change API signature for V8 tests.
BUG=none
TEST=none

TBR=ager

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2749 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-25 03:18:40 +00:00
ager@chromium.org
050d1297fa Allow test to timeout. The time to run the test is close to the
timeout limit so it sometimes times out.

TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/173271

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2747 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-24 16:25:23 +00:00
ager@chromium.org
4cd3d7afe8 Revert change 2745 because of assertion failures in debug mode.
TBR=yurys@chromium.org
Review URL: http://codereview.chromium.org/173268

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-24 16:08:44 +00:00
yurys@chromium.org
b295a51e7e Allow stepping in functions called using CallFunction stub. When Debug::PrepareStep is called to prepare 'step in' and current code target is CallFunction stub, the debugger will find function being called on the expression stack and flood it with one shot breakpoints.Related Chromium issue: http://code.google.com/p/chromium/issues/detail?id=17978
Review URL: http://codereview.chromium.org/159703

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-24 15:21:49 +00:00
erik.corry@gmail.com
038f9074bc Reapply ARM root array change to reduce const pool size
by using r10 to point to a list of common root objects.
This time we also disable a debugger test on ARM that
has never worked, but with this change sometimes
crashes.
Review URL: http://codereview.chromium.org/174317

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-24 11:57:57 +00:00
ager@chromium.org
781898e91a Reduce the amount of dates tested in date-parse test. The test occasionally times out on ARM hardware.
Review URL: http://codereview.chromium.org/174316

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2741 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-24 09:08:12 +00:00
ager@chromium.org
fdf70d37fa Land change to bail out from post garbage collection processing if
another post gc processing was trigger because of weak callbacks.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-21 08:52:24 +00:00
sgjesse@chromium.org
77204cb36f Fix an ASSERT in the scanner.
The assert when performing a push back on a two byte string was wrong.

Added a small regression test.
Review URL: http://codereview.chromium.org/173116

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-21 06:30:59 +00:00
ager@chromium.org
282240a54b Fix mozilla test expectations. Generating a huge error message can
not time out of the 64-bit version because of the larger heap.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 11:45:18 +00:00
ager@chromium.org
1f404c8c9f Fix a test that test out of memory situations. On the 64-bit port the
test did not actually run out of memory which the test treats as an
error.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 10:32:11 +00:00
antonm@chromium.org
8b42f23dec Do not allow GlobalHandles::Create to reuse destoryed nodes (ones from free list)
while performing GlobalHandles::PostGarbageCollectionProcessing as those might be already deleted (in C++ sense).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2724 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 20:32:51 +00:00
ager@chromium.org
0efbd40baf Add support for forceful termination of JavaScript execution.
The termination is achieved by throwing an exception that is uncatchable by JavaScript exception handlers.
Review URL: http://codereview.chromium.org/174056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 15:14:11 +00:00
whesse@chromium.org
4e25c1cc9c Speed up mjsunit/div-mod.js test, to avoid timeouts.
Review URL: http://codereview.chromium.org/171108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 11:34:06 +00:00
lrn@chromium.org
fdf31f7f5e X64: Implement debugger hooks.
Debugger is now fully functional.
Fix difference in emitting statement positions to match ia32.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 10:18:30 +00:00
sgjesse@chromium.org
4e03645dc4 Analyze functions for assignment to this properties.
During parsing functions are analyzed for statements of the form this.x = ...;. These assignments are categorized in two types: simple and non simple. The simple ones are where the right hand side is known to be either a constant or an argument to the function. If a function only contains statements of this type the property names are collected and for the simple assignments the index of the argument or the constant value assigned are stored as well.

When the initial map for a function is created and the function consists of only this type of assignemnts the initial map is created with a descriptor array describing these properties which will be known to always exist in an object created from the function.

The information on this property assignments is not collected during pre-parsing so if compiling using pre-parse data these optimization hints are not available.

Next step will be to use the information collected for the simple assignments to generate constructor code which will create and initialize the object from this information without calling the code for the function.
Review URL: http://codereview.chromium.org/172088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 07:30:20 +00:00
whesse@chromium.org
f20c7be069 Fix errors in test-heap.cc and test-decls.cc. Adjust cctest.status.
Review URL: http://codereview.chromium.org/172089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2708 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-18 12:43:36 +00:00
feng@chromium.org
33fb11c12f Revert commit 2701 per Erik Corry's request.
Original CL:

http://codereview.chromium.org/171041
Review URL: http://codereview.chromium.org/171089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-18 00:12:26 +00:00
whesse@chromium.org
349dc04a5d Use root array to load roots in generated ARM code.
This cuts down on code size and reloc work.
Review URL: http://codereview.chromium.org/171041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2701 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 14:31:49 +00:00
christian.plesner.hansen@gmail.com
e64bf9ad6c Added API for getting object mirrors
Added Debug::GetMirror call to get a mirror for a given object.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2700 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 14:26:48 +00:00
mikhail.naganov@gmail.com
d87f83c5f8 Fix issue 427: JS tick processor now works out-of-the-box for Chromium on Windows.
MSVS names '.map' file using only module's name, so both 'a.exe' and 'a.dll' will have 'a.map' file. To distinguish an originating module, we're now checking for image base which is always 00400000 for .exe files, and not 00400000 for .dlls.

Verified that windows-tick-processor can now process logs from Chromium using .map file generated for 'chrome.dll', an that it still works for V8's 'shell.exe'.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2699 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 13:45:03 +00:00
christian.plesner.hansen@gmail.com
11e7f2a30b Added API call to get the stack trace for an exception
Added TryCatch::StackTrace that gets the stack trace for the thrown
exception.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 13:34:41 +00:00
christian.plesner.hansen@gmail.com
570788b115 Context-independent script compilation.
Added Script::New calls that create a new context-independent
(boilerplate) script which can be executed in any context, unlike the
current scripts which bind the context in which they're compiled.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 11:41:00 +00:00
christian.plesner.hansen@gmail.com
04a6340227 RegExp tweaks
Fixed bug where regexps were not callable across contexts since the
callable test used object identity on the regexp constructor.  Changed
typeof RegExp from 'object' to 'function' for compatibility.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 10:19:00 +00:00
mikhail.naganov@gmail.com
910b5ef31a Fix issue 420: accept truncated log files.
http://code.google.com/p/v8/issues/detail?id=420

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 09:31:58 +00:00
lrn@chromium.org
4254388c14 X64: Implement RegExp natively.
Review URL: http://codereview.chromium.org/165443


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-14 11:24:32 +00:00
christian.plesner.hansen@gmail.com
061834200a Fixed issue 19212
Fixed a bug in json parsing.  Refactored compilation code a bit to
make it more obvious what's going on.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 10:25:35 +00:00
whesse@chromium.org
6a8a7d580e X64: Implement remaining constant smi optimizations. Enable mozilla tests that now pass.
Review URL: http://codereview.chromium.org/164317

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-11 12:49:27 +00:00
vitalyr@chromium.org
d6fcda0044 API: added function to find instance of template in prototype chain.
Also inlined Object::IsInstanceOf.

This new function is intended to be used to speed up DOM bindings.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2636 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 13:35:21 +00:00
lrn@chromium.org
30fa78f1f7 Fix bug in X64 RSet code. Optimize IA32 version.
Review URL: http://codereview.chromium.org/162001


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-05 11:08:24 +00:00
whesse@chromium.org
2f7f0f6ea5 X64: Enable specialized stubs for length property.
Review URL: http://codereview.chromium.org/160582

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2620 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-04 14:18:03 +00:00
mikhail.naganov@gmail.com
5470f9b132 Add an ability to initiate GC through V8 API.
I'm planning to use it in DevTools heap profiler. It is a common scenario in debugging memory leaks to enforce GC, then perform an operation, then enforce GC again to check for non-collected (that is, leaked) objects. Using the existing GC extension isn't possible because it doesn't exposed in the normal operation mode of Chromium.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-04 14:14:01 +00:00
whesse@chromium.org
ff05b349e5 X64: Set mozilla.status to reflect actual status of X64 tests.
Review URL: http://codereview.chromium.org/160518

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-04 10:22:36 +00:00
whesse@chromium.org
3703231636 Add safe handling of NaN to Posix platform-dependent time functions.
Review URL: http://codereview.chromium.org/160580

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2615 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-04 09:41:18 +00:00
whesse@chromium.org
118d5e171b Fix debug printing of pointers, and a keyed store with smi index error, in X64
Review URL: http://codereview.chromium.org/160452

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-03 10:53:45 +00:00
whesse@chromium.org
2679ad1118 Guard local time posix functions from NaN value of invalid dates.
Review URL: http://codereview.chromium.org/160451

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 13:17:59 +00:00
mikhail.naganov@gmail.com
33f54fa6e2 X64: enable stack sampling in profiler.
Added necessary code to initialize Top::js_entry_sp value.
Renamed 'test-log-ia32' test to 'test-log-stack-tracer' and enabled it in 64-bit version.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 11:07:05 +00:00
whesse@chromium.org
ddbe148b68 X64: Add fix of issue 392 to X64
Review URL: http://codereview.chromium.org/160393

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2594 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 08:04:41 +00:00
kmillikin@chromium.org
d8e35a098f Fix broken test compilation.
TBR=kasperl@chromium.org
Review URL: http://codereview.chromium.org/160389

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 12:25:24 +00:00
lrn@chromium.org
dc8ca16931 X64: Added inline keyed load/store and a bunch of other missing functions.
Review URL: http://codereview.chromium.org/160272


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 09:18:14 +00:00
whesse@chromium.org
79b52509d3 X64: Fix error in division & modulus, adjust mjsunit test status, fix lint error in objects.h
Review URL: http://codereview.chromium.org/159584

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2581 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 07:31:54 +00:00
mikhail.naganov@gmail.com
9e8216ef22 Introduce first approximation of constructor heap profile for JS objects.
It is activated with '--log-gc' flag.

JS object size is calculated as its size + size of 'properties' and 'elements' arrays, if they are non-empty. This doesn't take maps, strings, heap numbers, and other shared objects into account.

As Soeren suggested, I've moved ZoneSplayTree from jsregexp to zone, and removed now empty jsregexp-inl header file.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2570 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 08:10:19 +00:00
yurys@chromium.org
87f515564b * Mark debug-stepin-builtin test as failing on x64
* Change copyright year of the new test file to 2009

TBR=kasperl
Review URL: http://codereview.chromium.org/160318

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2569 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 06:58:00 +00:00
yurys@chromium.org
cda6146266 Don't step in function.call/apply if the function is builtin one.
Chromium bug: http://code.google.com/p/chromium/issues/detail?id=17886
Review URL: http://codereview.chromium.org/159508

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2568 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 06:34:30 +00:00
iposva@chromium.org
9a5a3fd6a5 - Clamp double values as doubles to get a free NaN check and
to handle infinity properly.

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



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2564 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 18:11:12 +00:00
whesse@chromium.org
1ed7462166 X64: Fix bug that showed up in mjsunit/invalid-lhs.js
Review URL: http://codereview.chromium.org/159506

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2561 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 14:11:09 +00:00
whesse@chromium.org
281fbcc917 X64: Add passing date tests to the mjsunit X64 test status
Review URL: http://codereview.chromium.org/159501

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2559 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 13:29:11 +00:00
kasperl@chromium.org
c41447f216 There's seems to be an issue with 0/0 on ARM, which I'll
continue to investigate. For now, use NaN instead of computing
it ourselves.

TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/160267

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 10:51:54 +00:00
kasperl@chromium.org
91a6039ffa Fix lint issues. TBR=mikhail.naganov@gmail.com
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 09:10:29 +00:00
kasperl@chromium.org
b2fc0598c1 Fix lint issues. TBR=iposva@chromium.org
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 09:05:05 +00:00
iposva@chromium.org
1ce28eda0b - Expose CanvasPixelArray functionality directly in JavaScript
indexed property accesses.
- The IC stubs have not been updated to handle these directly, but
  at least we do not have to leave the VM to access bytes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2549 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 08:43:51 +00:00
mikhail.naganov@gmail.com
60bdcf9e01 Fix issue 410: test-log/ProfLazyMode flakinness under Linux.
I found two causes of flakinness:
 - SIGPROF signal isn't delivered to a process;
 - Profiler thread (the one that retrieves tick events from
   the queue and writes to log) doesn't get a CPU;
Both are fixed.

The script from bug description with run count increased to 200 runs without any test failures.

OS X and Windows are unaffected because they don't use signals mechanism.

BUG=http://code.google.com/p/v8/issues/detail?id=410
TEST=see bug description

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2547 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 08:34:55 +00:00
whesse@chromium.org
72ac6f619a X64: Add inline cache stub for storing to globals.
Review URL: http://codereview.chromium.org/160160

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-27 15:02:35 +00:00
christian.plesner.hansen@gmail.com
c1581cd5bd Added Error.captureStackTrace function.
Added utility function for capturing stack traces so that efficient
stack trace collection works for custom errors too, not just built-in
ones.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-27 12:01:32 +00:00
whesse@chromium.org
500e10b648 Add inline caching for keyed loads and stores. Remove extra parentheses from some files.
Review URL: http://codereview.chromium.org/159266

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2534 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-24 11:22:35 +00:00
yurys@chromium.org
080ebefb15 Remove trailing whitespace in test-debug.cc
Review URL: http://codereview.chromium.org/160095

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-24 07:39:53 +00:00
yurys@chromium.org
161d38c614 Debugger should not stop in its own code and in code of built-in functions since it may confuse user.Debug break handler checks whether current function is a built-in or a debugger one and just resumes execution if it is.
CallCheckStackGuardState is no longer called in loop in the RegExp code as it hangs if debug break flag is not reset after calling Execution::HandleStackGuardInterrupt.
Review URL: http://codereview.chromium.org/160001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-24 06:14:23 +00:00
whesse@chromium.org
18c6337a2c Fix an error in a keyed lookup stub - HeapNumbers treated as strings.
Review URL: http://codereview.chromium.org/155924

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-23 13:01:17 +00:00
kmillikin@chromium.org
1ca19c383d Fix ARM compiler crash in short-circuited boolean expressions.
We did not handle the case where the left-hand-side expression was
fully compiled to control flow.  There were also some assertions for
unary and binary expressions that crashed debug builds when the
expression was fully compiled to control flow.

Regression test added.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2524 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-23 11:40:14 +00:00
ager@chromium.org
2183309385 Introduce a external allocation limit.
If V8 is holding on to a lot of external memory, we attempt to clean
it up even if we do not get an allocation failure.  Since tiny V8
objects can hold on to a lot of external memory, we might run out of
external memory while waiting for a normal allocation failure.
Review URL: http://codereview.chromium.org/155916

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2519 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-22 10:01:25 +00:00
whesse@chromium.org
76833936b7 Make Array::kHeaderSize protected, and only use kHeaderSize of its subclasses.
Many X64 bugs have been due to the difference between (unaligned) Array::kHeaderSize and (aligned) FixedArray::kHeaderSize.
Review URL: http://codereview.chromium.org/155687

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 12:12:24 +00:00
antonm@chromium.org
3c6c399381 Introduce faster utilty methods for storing and retrieving native pointers
in internal fields.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2498 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 10:35:15 +00:00
whesse@chromium.org
263acb4d02 X64: Implement inline cache of monomorphic constant function call. Mark a debugger test on X64 as failing.
Review URL: http://codereview.chromium.org/155631

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2485 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 12:49:14 +00:00
whesse@chromium.org
e21d0b510c Allow a slow test, array-splice, to timeout on ARM.
Review URL: http://codereview.chromium.org/155500

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2484 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 12:09:05 +00:00
antonm@chromium.org
6f30c0e7ec Some more test for load and call stubs.
Review URL: http://codereview.chromium.org/149749

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 10:57:17 +00:00
yurys@chromium.org
20e4b1dbc5 Reapply http://codereview.chromium.org/149542 now that issue with Mac builder is fixed(http://codereview.chromium.org/155591)
Review URL: http://codereview.chromium.org/149746

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 07:07:51 +00:00
yurys@chromium.org
12d5143551 Reverting 2458 to see if it makes Builder Webkit Mac (V8-Latest) happy.
Review URL: http://codereview.chromium.org/149672

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-15 09:45:06 +00:00
kmillikin@chromium.org
6443cb99f7 Fix issue 345 by avoiding duplicates in the list of escaping labels
from a try...catch...finally statement.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2466 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-15 08:57:25 +00:00
yurys@chromium.org
cc6be014dc Support stepping into getters and setters.
Related Chromium bug:
http://code.google.com/p/chromium/issues/detail?id=16427

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 16:55:32 +00:00
whesse@chromium.org
894af58c82 Change tests status for x64, make test runner pass --arch flag to Scons, add to x64 disassembler. Copied from http://codereview.chromium.org/155346 so it can be committed.
Review URL: http://codereview.chromium.org/149608

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 11:39:45 +00:00
mikhail.naganov@gmail.com
e0b829b1a5 TickProcessor: more accurate mapping of statically compiled code on Linux.
'nm' is now called with an option to report function code sizes. Static code entries are restricted to the sizes reported, and the remaining unnamed code is attributed to a library as a whole. This makes reports more accurate, as some functions are tiny, but has chunks of unnamed code behind them.

This change doesn't affect reporting on Windows, as in .map files function code sizes aren't specified.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 09:47:44 +00:00
kasperl@chromium.org
0eb595eb51 Add regression test case for http://crbug.com/16276. Crashes
in both debug and release mode before r2435, but not after.
Review URL: http://codereview.chromium.org/155491

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 09:31:48 +00:00
kasperl@chromium.org
19f31a77e7 Update test expectations because we've decided to allow RegExps
to be called as functions. See http://codereview.chromium.org/155453.

TBR=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/155488

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2453 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 06:40:40 +00:00
ager@chromium.org
7a80be473d Firefox and Safari both allow calling regular expression objects as
functions (as an alias for calling the exec method).  For
compatibility make call_regexp the default and remove the flag.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 23:41:17 +00:00
yurys@chromium.org
9461c4b176 Disable debug-stepin-function-call.js test on ARM.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/155348

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-10 12:12:23 +00:00
yurys@chromium.org
0da86e1250 Fix an issue with debugger 'step in' when calling function has local variables.Corresponding Chromium bug:http://code.google.com/p/chromium/issues/detail?id=15824
Review URL: http://codereview.chromium.org/149326

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-10 09:57:53 +00:00
lrn@chromium.org
4b9eb18644 X64: Added failure entries in test expectations.
Review URL: http://codereview.chromium.org/149389


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 14:04:37 +00:00
erik.corry@gmail.com
97f319d989 Get peep-hole optimizer working on ARM by not emitting
debug info at places where the debugger can't stop.
This fixes the ARM version after
http://codereview.chromium.org/14170
Reformat debug-backtrace.js test.
Review URL: http://codereview.chromium.org/155285

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 11:59:58 +00:00
lrn@chromium.org
b3e8f5ef49 X64: Fixed more bad smi operations.
Review URL: http://codereview.chromium.org/155281


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 11:46:30 +00:00