Commit Graph

2223 Commits

Author SHA1 Message Date
antonm@chromium.org
5a2aa8ee8e Fix a lint error.
Review URL: http://codereview.chromium.org/235052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2982 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-29 07:30:37 +00:00
antonm@chromium.org
d9e23dc786 Put method declations under #ifdef DEBUG in header (as they are in objects-inl.h).
Review URL: http://codereview.chromium.org/251015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2981 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-28 23:21:58 +00:00
vitalyr@chromium.org
00c15b7c8b API: added a few missing HandleScope-s.
Review URL: http://codereview.chromium.org/245024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2980 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-28 14:32:48 +00:00
whesse@chromium.org
5e90dba910 Rename JumpToBuiltin to JumpToRuntime. Add comment to ResolveBuiltin.
Review URL: http://codereview.chromium.org/218025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2979 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-28 13:53:43 +00:00
erik.corry@gmail.com
0c8f8de902 Fix the last memory leak demonstrated by the test program in
http://code.google.com/p/v8/issues/detail?id=444
Review URL: http://codereview.chromium.org/243027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2978 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-28 13:53:03 +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
kmillikin@chromium.org
f0ba671344 Move the per-ast-node statement position to only statement node types.
It was not currently being used for expressions or declarations and
always had the default initial value.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-28 12:01:05 +00:00
whesse@chromium.org
94d57588fc Fix unused variable warning in serialize.cc
Review URL: http://codereview.chromium.org/243025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2975 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-28 11:22:08 +00:00
ager@chromium.org
c08b11db2d Land change by Alexander Botero-Lowry to fix profiler sampling on
FreeBSD in 64-bit mode.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2974 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-28 11:16:23 +00:00
ager@chromium.org
3da53e3e5c Add missing null check to Context::GetCalling().
Review URL: http://codereview.chromium.org/248017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-28 10:21:08 +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
antonm@chromium.org
228f4aee13 Add another method that allows to lookup for a real named property not only
in prototype chain, but in the object itself.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2969 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-25 12:29:24 +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
sgjesse@chromium.org
196990cea1 Fix lint error.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/230002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-23 14:06:14 +00:00
ager@chromium.org
28772fbc57 Reverting 2950.
It causes test shell test failures.
Review URL: http://codereview.chromium.org/222004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2961 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-23 13:32:11 +00:00
sgjesse@chromium.org
ab34189c30 Handle array construction in native code (x64 version).
Ported the handle array construction in native code to x64. See http://codereview.chromium.org/193125 for details.

Please take a closer look of my use of the macro assembler Smi abstractions.
Review URL: http://codereview.chromium.org/209048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2960 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-23 13:04:07 +00:00
erik.corry@gmail.com
9839092874 * Remove non-Open Source code from Douglas Crockford.
* Be more var-correct in JS files.
* Rename some JS variables to reflect the fact that they are instance
  variables on the global intrinsics object.
* Missing optimization in StringCharAt.
Review URL: http://codereview.chromium.org/215052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2959 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-23 12:32:24 +00:00
sgjesse@chromium.org
cf46d30de9 Handle array construction in native code (ARM version).
Ported the handle array construction in native code to ARM. See http://codereview.chromium.org/193125 for details. 
Review URL: http://codereview.chromium.org/217014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2956 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-23 09:05:12 +00:00
ager@chromium.org
2d3edc621c Prepare push to trunk containing fix for uninitialized memory bug.
Now working on version 1.3.14.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2955 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-23 08:13:19 +00:00
ager@chromium.org
69a877c2d7 Initialize the can_continue_ field in the TryCatch constructor.
Review URL: http://codereview.chromium.org/227001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-23 07:55:48 +00:00
mikhail.naganov@gmail.com
89831f8735 Heap profiler: consider Function instances separately, similar to Arrays and Objects.
Review URL: http://codereview.chromium.org/209066

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-22 10:02:42 +00:00
christian.plesner.hansen@gmail.com
21346ff4a3 Prepare to push to trunk. Now working on 1.3.13.
Review URL: http://codereview.chromium.org/210040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2947 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-22 08:40:44 +00:00
whesse@chromium.org
b026021215 Stop "cooking" targets of jumps and calls in code objects. Do not convert jump and call targets to absolute pointers to Code objects during GC, heap verification, and serialization.
Review URL: http://codereview.chromium.org/203070

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2941 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-21 10:35:47 +00:00
sgjesse@chromium.org
7febdab868 Minor changes to the native array construct code
Named a constant and added an assert to get notified when related constants
change.

Removed reloading of the Array function when Array is called as a constructor as
the Array function is preserved in edi.

This - unlike r2908 and r2909 - both compiles and passes the tests.
Review URL: http://codereview.chromium.org/209012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2940 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-21 07:28:04 +00:00
mikhail.naganov@gmail.com
3a9303852c Eliminate recursion in ZoneSplayTree traversal.
Convert the code to be similar with JS version. Recursive traversal is dangerous as it can cause stack exhaustion on deep trees.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-21 07:12:38 +00:00
mikhail.naganov@gmail.com
ef246011e7 Fix Windows build. My mistake for not trying it our prior to submitting.
Kudos to William Hesse for alarming me.

TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-18 13:23:58 +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
whesse@chromium.org
0e63056cf5 Fix --heap-stats option on X64
Review URL: http://codereview.chromium.org/210020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-18 12:02:36 +00:00
whesse@chromium.org
4ac11e3b15 Don't convert jump and call targets to code object pointers when (de)serializing.
Review URL: http://codereview.chromium.org/207012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2932 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-18 10:50:08 +00:00
ager@chromium.org
576ae4c115 Land change by Jan de Mooij to change the toString behavior of
|function|.toString() for builtin functions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-17 11:11:01 +00:00
christian.plesner.hansen@gmail.com
b58abab2df Lint fix
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2912 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-17 10:35:52 +00:00
christian.plesner.hansen@gmail.com
87dab2f5cd Add Object::IsDirty function in the API.
Review URL: http://codereview.chromium.org/209013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-17 08:58:06 +00:00
sgjesse@chromium.org
a0462f3af8 Reverting 2909,2908
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2910 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-17 07:58:49 +00:00
sgjesse@chromium.org
03db75e768 Fix compile error.
Why even compile simple changes?

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2909 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-17 07:24:44 +00:00
sgjesse@chromium.org
8524ee521c Minor changes to the native array construct code.
Named a constant and added an assert to get notified when related constants change.

Removed reloading of the Array function when Array is called as a constructor as the Array function is preserved in edi.
Review URL: http://codereview.chromium.org/207010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2908 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-17 07:14:48 +00:00
mikhail.naganov@gmail.com
bc59334ee0 Argh, one more place to fix.
TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2907 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-16 20:36:08 +00:00
mikhail.naganov@gmail.com
016166ee14 Fix Windows build. I'm wondering, how does gcc accept such code?
TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-16 20:15:03 +00:00
mikhail.naganov@gmail.com
e30d461ee4 Fix variables names.
TBR=kasperl@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2905 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-16 19:44:04 +00:00
mikhail.naganov@gmail.com
3b1818dbab Fix ARM build (gcc 3.3 failed to resolve types correctly) and constants names.
TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2904 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-16 14:54:59 +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
erik.corry@gmail.com
fb2897bcf9 Clean up the ifdefs on ARM.
Ensure that we use ARMv5 instructions on ARMv6 and ARMv7 CPUs.
Review URL: http://codereview.chromium.org/206012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2898 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-16 08:48:17 +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
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
ager@chromium.org
8a3bce2fa1 Prepare push to trunk. Now working on version 1.3.12.
Review URL: http://codereview.chromium.org/204020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2889 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-15 11:48:18 +00:00
whesse@chromium.org
e58287a1bb Use GetCodeFromTargetAddress everywhere, uniformly.
Review URL: http://codereview.chromium.org/193111

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-15 11:39:47 +00:00
lrn@chromium.org
91ecc77e5f X64: Abstract indexing by a smi to the macro assembler.
Review URL: http://codereview.chromium.org/196118


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2887 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-15 11:35:23 +00:00
ager@chromium.org
cc0d071633 Incorporate dtoa change from upstream to avoid potential buffer
overrun.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-15 10:48:11 +00:00
lrn@chromium.org
88e732edbc Fix bug that errnoeously sets FPU exception.
This has only been caught on Win64 yet.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2881 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-14 12:20:13 +00:00
sgjesse@chromium.org
7721fdc7d9 Fix lint error.
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/203052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2880 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-14 09:00:21 +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
ager@chromium.org
6f88ca6393 Fix cut and paste error in memory tracking. MapSpace -> CellSpace.
Review URL: http://codereview.chromium.org/194100

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2878 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-14 06:39:54 +00:00
whesse@chromium.org
4c59284fcc Fix lint error
Review URL: http://codereview.chromium.org/200096

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-11 14:11:33 +00:00
whesse@chromium.org
996f1d4ee3 Rename a constant to kCallTargetAddressOffset
Review URL: http://codereview.chromium.org/192075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-11 12:41:27 +00:00
sgjesse@chromium.org
3dd74076d1 Control profiling/debugger support from build script.
The SCons build now has the options profilingsupport and debuggersupport for controlling the setting of the defines ENABLE_LOGGIGN_AND_PROFILING and ENABLE_DEBUGGER_SUPPORT. By default both are set to true.

The changes to the XCode project have not been tested.
Review URL: http://codereview.chromium.org/195061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-11 12:26:15 +00:00
ager@chromium.org
4052dcd392 Fix lint issue.
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/203017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-10 13:56:12 +00:00
ager@chromium.org
2fbadf73b3 Fix IA32 build.
TBR=lrn@chromium.org
Review URL: http://codereview.chromium.org/201078

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-10 13:27:00 +00:00
sgjesse@chromium.org
9d2d9c596c Implement code patcher for x64.
Use the code patcher for the patching of the JS return sequence used by the debugger.

Added explicit instruction cache flushing in a code patching section which did not have it for completeness, even though it is not required on Intel processors.
Review URL: http://codereview.chromium.org/203016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-10 12:59:01 +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
whesse@chromium.org
cf37189c65 Use SSE2 instructions when available on ia32 platform.
Review URL: http://codereview.chromium.org/197057

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-10 07:13:01 +00:00
christian.plesner.hansen@gmail.com
9f7fabeb68 Fix crash during error reporting during bootstrapping.
Instead of crashing or reporting a fatal v8 error if an error occurs
during context initialization we now survive and return an empty
handle.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-10 06:52:46 +00:00
ager@chromium.org
39a3c9c61b Prepare push to trunk. Now working on version 1.3.11.
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/201069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2865 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 19:03:20 +00:00
sgjesse@chromium.org
7c9195caf9 Fix ARM compilation error.
Removed implementation of function which was no longer member of class Debug.

TBR=lrn@chromium.org
Review URL: http://codereview.chromium.org/199063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2864 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 18:05:46 +00:00
sgjesse@chromium.org
bcff52624d Cleaned up some debugger stuff on ia32 and x64.
Got rid of the debug break on return entry code which did not add anything. It just jumped directly to the debug break on return code.

Removed the CodePatcher class on x64 as it was not implemented.

Added instruction cache flush to where the return sequence was patched on x64.

Added some missing ENABLE_DEBUGGER_SUPPORT #ifdef/#endif.
Review URL: http://codereview.chromium.org/193057

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 17:45:21 +00:00
sgjesse@chromium.org
f4d3ff1ac3 Find the correct function for script break points
The algorithm for finding the inner-most function containing a script break point was not correct when the script only contained one function. In that case the script function and not the actual function in the script could be returned depending on the order of the objects in the heap.

TEST=cctest/test-debug/ScriptBreakPointReload
BUG=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 15:16:26 +00:00
ager@chromium.org
e2d7d656b0 Increase max semi-space size.
Review URL: http://codereview.chromium.org/200059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2861 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 14:50:00 +00:00
kasperl@chromium.org
00c3a0deaa Fix x64 port by using 32 pages per chunk.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/195038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 12:08:40 +00:00
mikhail.naganov@gmail.com
0411b14ffa Heap profiler: account primitive string objects as being constructed using 'String'.
Also:
- move constructor name getter near similar class name getter method;
- if the constructor is not present, use 'Object', as for class name, this eliminates a special case.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 11:46:09 +00:00
ager@chromium.org
4e3a1143cc Minor change to idle notification handling: perform a scavenge
followed by shrinking of new space earlier.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2858 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 11:21:54 +00:00
ager@chromium.org
0e56caa33b Fix typo.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 11:06:22 +00:00
ager@chromium.org
84c2072c56 Reduce the chunk size from 64 pages to 16 pages per chunk.
This reduces the initial V8 memory usage by roughly 2MB.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 10:56:13 +00:00
ager@chromium.org
7f29be6d2e Fix presubmit.
TBR=yurys@chromium.org
Review URL: http://codereview.chromium.org/197056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 09:58:00 +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
ager@chromium.org
2bc682e3f3 Do not use left-over space after new space alignment for other spaces.
Doing so makes the max new space size influence the initial total size
of the heap.

This change reduces the initial memory use of V8 by over 6MB.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2851 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 08:45:32 +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
sgjesse@chromium.org
e6b926f19d Set the svn:eol-style property on new file.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/201059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 07:57:12 +00:00
ager@chromium.org
e5095880cb Add MAP_FIXED to Uncommit calls to see if that has an effect on GMail
memory usage in Chromium 64-bit Linux.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 07:51:51 +00:00
sgjesse@chromium.org
3546e91bbc Refactor the register to name mapping in the ARM simulator.
Review URL: http://codereview.chromium.org/195024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 07:01:20 +00:00
whesse@chromium.org
07e6f6f619 Fix lint error
Review URL: http://codereview.chromium.org/196042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-08 12:51:08 +00:00
lrn@chromium.org
8f60f1a46f Win64 - Allow returning two values from a runtime function.
(Not yet fully functional)

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-08 11:52:05 +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
whesse@chromium.org
2edebc2c9c Remove special CheckEquals function for intptr_t on X64 platform.
Review URL: http://codereview.chromium.org/190004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-08 08:49:54 +00:00
kasperl@chromium.org
def729b6ad Change to limit the amount of space we waste due to fragmentation
in old space. Before this change we would compute the fragmentation 
limit before the GC, but that means that we take all the garbage 
into account - and consequently we almost never hit the limit (because 
we have a lot of garbage).

This change changes the policy to compact on the *next* GC if we
determine that we have too much fragmentation after doing a GC.
We'll do a GC if we've wasted more than 1MB and more than 15% of
the old space size.

This can be further improved by computing whether or not to compact
during the marking phase.
Review URL: http://codereview.chromium.org/202008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-08 07:35:23 +00:00
christian.plesner.hansen@gmail.com
223973ef9b Modifies readline() to behave in the same way as it does in TraceMonkey.
Author: abdulla <abdulla.kamar@gmail.com>
Review URL: http://codereview.chromium.org/173262


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-07 12:37:56 +00:00
sgjesse@chromium.org
f7c799f0a2 Allign Intel macro assemblers with changes to ARM macro assembler.
Removed bogus ASSERTs from Intel macro assemblers.

Added a debug mode generated code assert to allocation code.
Review URL: http://codereview.chromium.org/199044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2837 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-07 12:24:10 +00:00
sgjesse@chromium.org
fe8a5ac59a Move common enums for macro assemblers.
All macro-assembler-*.cc used a number of common enums. Moved these to macro-assembler.h.

Removed unused enum ExitJSFlag from ARM macro assembler.
Review URL: http://codereview.chromium.org/202004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2836 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-07 12:07:40 +00:00
sgjesse@chromium.org
b8b7832a61 Last step in allocating objects in generated code on ARM.
Port specialized constructor code for constructing simple objects to ARM.

See http://codereview.chromium.org/173470 for description.
Review URL: http://codereview.chromium.org/196024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-07 10:31:02 +00:00
sgjesse@chromium.org
92eb226c99 Fix lint error.
TBR=erik.corry@chromium.org
Review URL: http://codereview.chromium.org/193039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2833 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-07 10:08:03 +00:00
sgjesse@chromium.org
2192a315a4 Second step in allocating objects in generated code on ARM.
Objects which require an additional fixed array to be allocated now have this allocated in generated code as well. Added allocation flags to the macro assembler new space allocation routines.

Changed the ia32 and x64 macro assemblers to take allocation flags to the allocation routines instead of boolean flag.
Review URL: http://codereview.chromium.org/201015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-07 09:44:29 +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
fa0034ccbc Fixing presubmit error
TBR=christian.plesner.hansen@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2827 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-04 19:38:04 +00:00
christian.plesner.hansen
d2624cc6d6 Fixed error in d8's write() function
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-04 15:36:53 +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
christian.plesner.hansen@gmail.com
cf2a0fa068 Fixed serializer issue.
Review URL: http://codereview.chromium.org/194023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2824 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-04 11:05:16 +00:00
lrn@chromium.org
2364f20cc5 X64 RegExp - fix RegExp on WIN64.
Use the correct ifdef to detect Win64 (_WIN64, not __MSVC__).

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-04 11:00:07 +00:00
christian.plesner.hansen@gmail.com
56d8401ce5 Modifies write() so that NULs are allowed within a string.
This is required by the mandelbrot test in the language shootout.

Patch by abdulla <abdulla.kamar@gmail.com>.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2821 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-04 07:49:02 +00:00
christian.plesner.hansen@gmail.com
d03c277f5e Changed saved context stack to using direct pointers. Before we would
create a new persistent handle to hold the context to save when
entering another context, now we use a stack of direct pointers that
the gc knows about.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2820 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-04 07:34:25 +00:00
ager@chromium.org
5b3ce10995 Fix lint issue.
Review URL: http://codereview.chromium.org/197006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2819 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-03 07:23:22 +00:00
sgjesse@chromium.org
8150609edb Fix the debugger in the ARM simulator.
The debugger in the ARM simulator is now working again.

Added a help command and a command to print all registers. Made the printobject command print something in release builds.
Review URL: http://codereview.chromium.org/191004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2818 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-02 14:46:40 +00:00
ager@chromium.org
cb62d5c7b2 Fix LargeObjectSpace::Verify to allow external strings in large object
space.

This can happen if a very big sequential string gets externalized.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-02 14:25:05 +00:00
sgjesse@chromium.org
376537c12a First step in allocating objects in generated code on ARM.
Re-apply http://codereview.chromium.org/175045 with the single change that the line

  mov(scratch, Operand(new_space_allocation_top));

have been added to MacroAssembler::UndoAllocationInNewSpace after the #endif. Without this change the top was not reset.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-02 11:13:44 +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
mikhail.naganov@gmail.com
85cc5f2097 Fixed cast in platform-macos.cc
TBR=whesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-02 09:04:55 +00:00
lrn@chromium.org
54f8947d44 Added possibility of miscompiled regexp to verfifier.
Review URL: http://codereview.chromium.org/188005


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-02 08:36:26 +00:00
mikhail.naganov@gmail.com
c8d358aa91 Fix issue 434: make OS::LogSharedLibraryAddresses work on x64 Mac.
Also, enable tick processor to process 64-bit profiler logs on Mac.

BUG=http://code.google.com/p/v8/issues/detail?id=434

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2810 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-02 08:18:27 +00:00
ager@chromium.org
ea58f9f097 Prepare push to trunk. Now working on version 1.3.10.
Review URL: http://codereview.chromium.org/184007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2809 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-02 08:05:38 +00:00
lrn@chromium.org
de33b1d03d X64: Added missing optimization of unary negate.
Review URL: http://codereview.chromium.org/174214


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2808 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-02 07:49:53 +00:00
lrn@chromium.org
23e84069c8 RegExp: Remove unnecessary function from ARM specific code and convert condition to assertion.
Review URL: http://codereview.chromium.org/178034


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2807 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-02 07:34:51 +00:00
mikhail.naganov@gmail.com
4339205dd2 Add code creation logging for construct stubs.
Otherwise, tick processor reports unknown code deletes / moves for them.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-02 06:55:49 +00:00
sgjesse@chromium.org
07e1bb76c7 Port specialized constructor code for constructing simple objects to x64.
See http://codereview.chromium.org/173470 for description. The x64 implementation follows the ia32 except it uses some additional registers to avoid spilling to the stack. Also tweaked the ia32 version a bit.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-02 06:17:59 +00:00
sgjesse@chromium.org
33a8bdad62 Reverting 2797.
Review URL: http://codereview.chromium.org/176060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2799 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-01 15:23:35 +00:00
whesse@chromium.org
2c0d50dde5 Add a integer static type cast to make MacOS compiler happy. TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/181033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2798 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-01 14:31:25 +00:00
sgjesse@chromium.org
00a2afeaa6 First step in allocating objects in generated code on ARM
This change moves the allocation of new objects into generated code. The allocation will bail out into the runtime system if the number of properties to allocate for the object exceeds the number of in-object properties.
Review URL: http://codereview.chromium.org/175045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2797 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-01 14:18:27 +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
whesse@chromium.org
0f20431c36 X64: Use sahf instruction only on processors that support it.
Review URL: http://codereview.chromium.org/183028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2793 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-01 11:32:20 +00:00
sgjesse@chromium.org
6cdd89b165 hange bad choice for scratch register for native code counters on ARM
This caused running with native code counters on ARM to crash.
Review URL: http://codereview.chromium.org/181031



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2792 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-01 11:26:48 +00:00
whesse@chromium.org
970874ad62 X64: Obey WIN64 ABI more exactly, in WIN64 build.
Review URL: http://codereview.chromium.org/182027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-01 10:40:00 +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
sgjesse@chromium.org
62e9956c91 Move object allocation in new space to macro assembler
Currently allocation in generated code on ARM is only used for allocating heap numbers. This change factors this out for use in upcomming changes.
Review URL: http://codereview.chromium.org/173625

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-01 07:36:46 +00:00
whesse@chromium.org
f77d7aab55 X64: Fix bug introduced in revision 2779
Review URL: http://codereview.chromium.org/180040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2787 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-31 15:28:17 +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
erik.corry@gmail.com
fcf8293df2 Move stack check into AllocateStackSlots so the load delay can be
interleaved with other instructions.  Reorder the stack check
slightly to avoid some load delay. The end result is almost
imperceptible.
Review URL: http://codereview.chromium.org/181019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-31 10:38:00 +00:00
erik.corry@gmail.com
369214c159 Use a root array register for constant loads and stack guards on x64.
This only wins us around 1% in performance, but it makes the code more
compact.  We don't currently have a way to represent in the virtual
frame that a slot contains a value from the root array.  Adding this
would probably make the code more compact.
Review URL: http://codereview.chromium.org/174639

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2783 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-31 08:57:36 +00:00
sgjesse@chromium.org
5ce6842dd9 Don't use the same descriptor array in several maps.
Make a copy of the descriptor array when copying a map with pre-allocated properties. The garbage collector assumes that no two maps point to the same descriptor array.

A simple reduction is missing.

BUG=http://crbug.com/20330
TEST=none
Review URL: http://codereview.chromium.org/177018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2780 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-28 11:10:33 +00:00
whesse@chromium.org
b01a7395c4 X64: Add inline cache load of normal field (slow case objects).
Review URL: http://codereview.chromium.org/180020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2779 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-28 11:08:16 +00:00
sgjesse@chromium.org
94c0539052 Add allocation support to x64 macro assembler.
Factored out the allocation in new space from assembler code into the macro assembler for x64 as was recently done for ia32.

Added set property svn:eol-style to native for all x64 files.
Review URL: http://codereview.chromium.org/173568

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-28 06:18:36 +00:00
whesse@chromium.org
231f0b9656 X64: Activate Probes for Megamorphic StoreIC on 64-bit platform.
Review URL: http://codereview.chromium.org/174609

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2777 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-27 15:46:03 +00:00
ager@chromium.org
7331301703 Port apply with arguments optimization to x64.
Review URL: http://codereview.chromium.org/173566

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2776 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-27 14:58:50 +00:00
whesse@chromium.org
536a1b5d81 X64: Activate the IC stub for prototype lookups.
Review URL: http://codereview.chromium.org/174606

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-27 14:11:20 +00:00
whesse@chromium.org
069e734d82 Fix lint error.
Review URL: http://codereview.chromium.org/174602

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-27 11:48:37 +00:00
whesse@chromium.org
ced7756402 Use Arguments object in C builtins, instead of __argc__ and __argv__.
Fix a stack-offset constant.  Make Windows 64-bit stack 16-byte aligned.
Review URL: http://codereview.chromium.org/173563

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-27 11:24:43 +00:00
sgjesse@chromium.org
a4eed24c26 Add allocation support to ia32 macro assembler.
Factored out the allocation in new space from assembler code into the macro assembler. To support the current allocation patterns a number of different functions where required.

This is change is identical to http://codereview.chromium.org/174524 (committed in r2768 and reverted in r2769) except that line 710 in macro-assembler-ia32.cc is

  cmp(result_end, Operand::StaticVariable(new_space_allocation_limit));

instead of

  cmp(result, Operand::StaticVariable(new_space_allocation_limit));

and pre-submit fixes as well.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-27 09:08:16 +00:00
whesse@chromium.org
48d1e49262 Use stack frame marker constants to mark arguments adaptor frame.
Review URL: http://codereview.chromium.org/174522

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2770 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-27 07:44:37 +00:00
sgjesse@chromium.org
a6973777bb Reverting 2768.
Review URL: http://codereview.chromium.org/173561

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-27 07:41:31 +00:00
sgjesse@chromium.org
1c46ee8c10 Add allocation support to ia32 macro assembler.
Factored out the allocation in new space from assembler code into the macro assembler. To support the current allocation patterns a number of different functions where required.
Review URL: http://codereview.chromium.org/174524

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2768 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-27 07:24:03 +00:00
erik.corry@gmail.com
d6afd05b16 2nd try at fixing invalid Smi issue on 64 bits.
Review URL: http://codereview.chromium.org/174520

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 13:21:38 +00:00
ager@chromium.org
56ad3bf123 Remove shrinking of new space on compaction and only do it on idle
notifications.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2765 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 12:51:43 +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
erik.corry@gmail.com
ba9efd26b7 Avoid triggering assert on 64 bit version.
Review URL: http://codereview.chromium.org/174519

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2763 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 12:22:34 +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
christian.plesner.hansen@gmail.com
af6c6a5533 Api inlining. Made some core functionality available in the api and
made inline versions of some hot functions.  Changed api to use
internal Object pointers rather than void pointers.

Speeds up getElementById by ~7%.
Review URL: http://codereview.chromium.org/173348

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 10:33:11 +00:00
erik.corry@gmail.com
a29d4e6762 * Make stack/preemption guard faster on ARM by putting stack
limit in the roots array.
Review URL: http://codereview.chromium.org/174517

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 10:27:32 +00:00
ager@chromium.org
e7cc9fbce5 Prepare push to trunk. Now working on version 1.3.9.
Review URL: http://codereview.chromium.org/174516

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 08:19:55 +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
46a9b8f26b Make ARM simulator compile on Windows.
Remove suspicious line from ARM simulator, which caused a compiler warning on Windows.
Review URL: http://codereview.chromium.org/173464

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 08:11:46 +00:00
whesse@chromium.org
046b4020f7 X64: Small changes to let WIN64 platform compile.
Review URL: http://codereview.chromium.org/174394

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 06:29:53 +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
ager@chromium.org
c9827717f1 Prepare push to trunk. Now working on version 1.3.8.
Review URL: http://codereview.chromium.org/173340

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-25 06:53:36 +00:00
mike@belshe.com
6f3c50460a Update the Idle collector to do a full GC
after being idle for some time.

Remove the default argument from CollectAllGarbage.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-25 02:54:39 +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
whesse@chromium.org
1dfac258a3 Change some integer types to make the x64 Win32 platform happier.
Review URL: http://codereview.chromium.org/173115

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-24 11:56:29 +00:00
ager@chromium.org
ed05df0053 Shrink new space on compacting collections.
Review URL: http://codereview.chromium.org/174219

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-21 13:14:53 +00:00
sgjesse@chromium.org
cba1ae7db2 Prepare to push to trunk. We are now working on version 1.3.7.
Review URL: http://codereview.chromium.org/173189

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-21 10:48:31 +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
88588df8c5 Fix a GC issue.
When descriptor arrays where allocated with the initial map the handling of allocation failures was not correct. This could cause the map returned could possible have been collected.
Review URL: http://codereview.chromium.org/173188

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2736 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-21 08:44:21 +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
94a3009b04 Go back to doubling the size when growing new space.
Our memory tests show little improvement by only growing by 50%.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 08:12:30 +00:00
whesse@chromium.org
cd4d95bc1c Fix build error
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2727 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 08:08:18 +00:00
ager@chromium.org
756abb6e83 Land patch by agl@chromium.org to hopefully fix build failure on
Ubuntu with GCC 4.4.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 07:41:46 +00:00
feng@chromium.org
855c654b25 Add LowMemoryNotification to the API on Android platform.
Android system provides a unique feature that it sends a notification to the
browser in low memory condition, and the browser cleans up cache and frees
resources. Forcing a GC in low memory condition can free DOM objects and also
can shrink the old spaces.

This patch addresses the last comment in 
http://codereview.chromium.org/173016/show

	
Mads Ager 2009/08/19 17:24:23 
I would prefer to not use the flags to signal that a compacting collection is
requested.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 00:07:19 +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
sgjesse@chromium.org
8cc5048ac4 Prepare to push to trunk. We are now working on version 1.3.6.
Review URL: http://codereview.chromium.org/173054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 12:46:48 +00:00
sgjesse@chromium.org
b7eb0762b8 Fix lint error.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/173056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2720 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 12:44:45 +00:00
sgjesse@chromium.org
b8a73f0650 Fix uninitialized members.
Make sure that the DummyScope top level scope used for pre-parsing have all members initialized. The type of this scope is set to global scope as it is a top level scope. Also ensure that the "naked" Scope constructor can only be used by sub-classes of Scope.

The bug of missing initiaalization of members in the DummyScope was found by Valgrind.
Review URL: http://codereview.chromium.org/173052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2719 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 12:06:16 +00:00
ager@chromium.org
469259cd88 Reapply the semispace growth policy change in isolation.
Additionally fix NewSpace capacity bug by removing the duplicated
capacity and maximum capacity book keeping.  The capacity and maximum
capacity of NewSpace is the capacity and maximum capacity of one of
it's semispaces.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 10:36:19 +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
ager@chromium.org
f68b81b084 Put back the reduction of semispace sizes as an isolated change.
The growth policy change is next.
Review URL: http://codereview.chromium.org/173050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 08:48:17 +00:00
ager@chromium.org
5e0a513e29 Temporarily revert the reduction of semispace sizes and the growth
policy change.

I will put the changes back one at a time so we can see the effect of
them in isolation.  Also, there is a bug in the growth policy change
that I will fix before putting it back again.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2712 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 08:12:12 +00:00
sgjesse@chromium.org
b9f39307be Create a set of x64 Visual studio project files and corresponding solution.
These files will make it possible to start working with the 64-bit version on Windows.

The GUID's of the x64 project files are the same as their ia32 counterparts, but that does not matter as they will never be used in the same solution.

Added a temporary #error when building 64-bit version on Windows.
Review URL: http://codereview.chromium.org/171111

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2711 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 07:32:48 +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
feng@chromium.org
03a39152b9 Fix IA32 build when not using native regexp compiler.
Review URL: http://codereview.chromium.org/173003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-18 17:26:51 +00:00
whesse@chromium.org
e9365fb39b Increase new space size and limits on 64-bit platforms.
Review URL: http://codereview.chromium.org/171105

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2707 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-18 11:26:14 +00:00
whesse@chromium.org
5b8d422524 Remove one of the GCs performed by the --gc-greedy flag. The GC performed by CEntryStub before the first call to C, when --gc-greedy is set, caused a bug in calling API callbacks.
Review URL: http://codereview.chromium.org/171104

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-18 10:52:14 +00:00
ager@chromium.org
1656dd639a Fix regression caused by the generation of a shift stub during
snapshot creation in a better way.

Encode whether or not the stub should use sse3 instructions in the
minor key of the stub.  The stubs generated during snapshot creation
will have sse3 disabled, but they will not be found when sse3 is
enabled.  Therefore they will only affect the code generated as part
of the snapshot.
Review URL: http://codereview.chromium.org/172086

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2705 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-18 09:47:45 +00:00
ager@chromium.org
b3f8ce7ce4 Fix regression caused by context creation optimization r2681.
The issue is that a shift operation is used when creating the
snapshot.  This means that the shift binary operation stub is
generated at snapshot time without sse3 instructions.

The fix is to use division instead.
 
TBR=erik.corry@gmail.com

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2704 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-18 09:14:19 +00:00
feng@chromium.org
1c70072f7f Streamline the scanner for external two byte string input.
Review URL: http://codereview.chromium.org/165403

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-18 07:14:02 +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
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
whesse@chromium.org
a82bd0507c X64: Remove compound smi+overflow test using cmov.
Review URL: http://codereview.chromium.org/165525

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 09:07:40 +00:00
whesse@chromium.org
ab041ee4ed X64: Do not use an AllocateWithoutSpill register if it is invalid. Abandoned in favor of approach in http://codereview.chromium.org/165525/show (Issue 165526)
Review URL: http://codereview.chromium.org/164480

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2693 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 08:02:07 +00:00
deanm@chromium.org
903599a2fc Fix strict aliasing crash on x64.
Review URL: http://codereview.chromium.org/164498


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2692 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-14 17:19:51 +00:00
lrn@chromium.org
925433d241 Fix unsafe cast in RegExpStack
Review URL: http://codereview.chromium.org/164552


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-14 12:20:33 +00:00
sgjesse@chromium.org
409993be38 Refactor SetFunctionInfo to reduce long argument list take 2.
It now includes the change to ARM and x64 architectures as well.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2689 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-14 11:35:10 +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
sgjesse@chromium.org
7b05678316 Refactor SetFunctionInfo to reduce long argument list.
Review URL: http://codereview.chromium.org/165527

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2687 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-14 11:05:42 +00:00
feng@chromium.org
f04005b576 Revert http://code.google.com/p/v8/source/detail?r=2670
Now we can pass '--expose_gc' to V8 in the layout test controller. This is probably a better option.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2686 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 22:13:45 +00:00
bak@chromium.org
f1f776f947 Changed Heap::Shrink to free as many pages as possible.
As a benefit, this eliminates an ifdef ARDROID.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2685 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 14:58:35 +00:00
whesse@chromium.org
9373ca76ed erikcorry: Remember to put objects back in fast case after adding functions.
P.S. for reasons unknown the original change (2681), also by erikcorry,
was attributed to Bill.
Review URL: http://codereview.chromium.org/164479

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2684 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 14:04:49 +00:00
whesse@chromium.org
d0d03d9980 Avoid map transitions and multiple backing arrays for builtin prototypes
while adding functions and other properties.  This gives around 2% on
context-create, more if we don't GC on every new context.  Also fix
accounting bug in cell space.
Review URL: http://codereview.chromium.org/165449

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 12:35:59 +00:00
whesse@chromium.org
5a3998c1f4 X64: Change testl to testb if mask fits in 1 byte. Shortens smi test.
Review URL: http://codereview.chromium.org/164472

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 12:35:09 +00:00
ager@chromium.org
c540fc7de6 Prepare push to trunk to get JSON parser fix into Chromium.
Now working on version 1.3.5.
Review URL: http://codereview.chromium.org/164474

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 12:21:11 +00:00
bak@chromium.org
6d98b0ba66 Changed semi space Grow to be rounded to OS page size.
Review URL: http://codereview.chromium.org/164469

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 12:13:50 +00:00
bak@chromium.org
bd5b5e52fc - Added simple memory reduction behavior for IdleNotification.
- This also include a one line change approved by lrh.
     http://codereview.chromium.org/164469

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2677 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 12:03:42 +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
bak@chromium.org
7f18bef0d2 Added idle notification to the API.
The implementation is still empty.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 09:35:51 +00:00
whesse@chromium.org
d7474a61a8 X64: Add an SHL optimization, fix a floating-point bug, fix xchg rax,r8 and printing of test ?ax, imm in disassembler.
Review URL: http://codereview.chromium.org/164399

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 08:00:04 +00:00
whesse@chromium.org
d35c815e94 Move some arrays into functions so they don't get cloned on each new context.
Review URL: http://codereview.chromium.org/164396

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2672 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 07:36:28 +00:00
christian.plesner.hansen@gmail.com
0b60fe88da Add a readline() command to d8. This reads a single line, stripping
the new-line at the end. This is the other half of what is required to
make the Debian Language Shootout code work correctly:
http://code.google.com/p/v8/issues/detail?id=353


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2671 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 07:07:41 +00:00
feng@chromium.org
de8c403f1c Revert my previous change r2654.
It has a similar impact on page cycler performance because now GC is randomly counted in page load time.

http://code.google.com/p/v8/source/detail?r=2654

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-12 21:30:13 +00:00
christian.plesner.hansen@gmail.com
896f875d76 Prepare to push to trunk. We are now working on version 1.3.4.
Review URL: http://codereview.chromium.org/165383

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2668 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-12 14:02:09 +00:00
bak@chromium.org
d7449ddebf - Reduced the maximum capacity of a semi space from 8MB to 4MB.
- Changed the semi space growth policy from doubling to increasing by 50%.
This slows down V8BenchmarkSuite with 1.32% but reduces the memory footprint with 8MB per V8 instance.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2667 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-12 13:54:43 +00:00
christian.plesner.hansen@gmail.com
395206b1df Add a write() command to d8. This is the same as the print() command, with the
exception that it does not add a new-line to the end. This half of what is
required to make the Debian Language Shootout code work correctly:
http://code.google.com/p/v8/issues/detail?id=354

BUG=354


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-12 11:52:22 +00:00
christian.plesner.hansen@gmail.com
8cc083d523 Fixed broken build.
Review URL: http://codereview.chromium.org/164395

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-12 11:08:10 +00:00
christian.plesner.hansen@gmail.com
ba974ace1b Add api call to determine whether a string can be externalized.
Review URL: http://codereview.chromium.org/164393

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-12 10:27:35 +00:00
whesse@chromium.org
2596299f1e X64: Remove optimization of SHR by constant, due to unfixed bug.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2663 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-11 15:30:09 +00:00
ager@chromium.org
f39651cbcd Land change to notify valgrind when we modify code on x86. This does
not seem to impact performance and makes it a lot easier for people
embedding V8 to run their application under valgrind.

If we observe a negative performance impact, we will need to revise
this again.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2662 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-11 15:23:06 +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
kmillikin@chromium.org
29b12aba42 Change the location set size from kPointerSize to kBitsPerPointer.
This was leftover from an old code review and not yet submitted.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-11 11:47:41 +00:00
kmillikin@chromium.org
d1f846cb2b Remove much of the register allocation overhead from ARM. When
registers are required for calls, explicitly construct a Result with
the needed register rather than allocating it.  For returns from
calls, let the return value in r0 be implicit rather than explicitly
allocated.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-11 11:46:27 +00:00
whesse@chromium.org
9024b946e7 X64: Add special inlining for subtracting a constant smi.
Review URL: http://codereview.chromium.org/164252

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2658 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-10 14:35:20 +00:00
kmillikin@chromium.org
6e63b28b2a Factored out common Instruction code in the CFG builder that depends only
on the number of operands.

Tinkered with instruction printing to align operands and not include
so many parentheses.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-10 13:00:05 +00:00
kmillikin@chromium.org
2bdd9d7c2e "Port" (count >= 0) assertion in VirtualFrame::Drop to ia32 and x64.
Review URL: http://codereview.chromium.org/164251

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2656 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-10 11:54:25 +00:00
kmillikin@chromium.org
a53c70c788 Eliminate most of the jump target jumping, branching, and binding
overhead on the ARM platform.

Because virtual frames are always in memory, there is no work to be
done for control flow except in the case of breaking or continuing
when there is extra statement state on the stack.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2655 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-10 11:13:34 +00:00
feng@chromium.org
1005fa3fbc Avoid calling GC in Context::New on Android devices.
Review URL: http://codereview.chromium.org/164153

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2654 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 18:17:01 +00:00
kmillikin@chromium.org
e8f54a6073 Added support for property loads to the CFG builder and fast-mode
compiler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 13:32:39 +00:00
whesse@chromium.org
e73bfe98a4 Implement inline constructors for X64. Fix ia32 inline constructors a little. Fix a bug of a non-constant length between a call and its fixup.
Review URL: http://codereview.chromium.org/164144

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2652 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 12:52:32 +00:00
lrn@chromium.org
6ad8b09efb X64: Implement fast charCodeAt.
Review URL: http://codereview.chromium.org/164135


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2648 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 11:16:26 +00:00
kmillikin@chromium.org
216eaff31a Factor out some platform-independent code into the shared cfg.cc.
Review URL: http://codereview.chromium.org/165127

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 10:55:19 +00:00
kmillikin@chromium.org
2851185938 Rename: ExpressionBuilder => ExpressionCfgBuilder, StatementBuilder =>
StatementCfgBuilder.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 10:35:48 +00:00
kmillikin@chromium.org
90772fa427 Change the SpilledScope scope and ...AndSpill functions on ARM so that
they do nothing.  The frame is currently always spilled, so they were
not doing anything useful.

The call sites have been left alone to mark where spills will
eventually be needed if we begin doing register allocation on ARM.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2644 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 08:18:31 +00:00
kmillikin@chromium.org
9edc69c72f Add support for (some) assignment expressions to the CFG builder and
fast-mode compiler.

1. We avoid generating a useless temporary for assignments with
nontrivial right-hand sides.  Instead of translating id = expr into:

...
tmp = <last expr instruction>
id = tmp

we generate directly

...
id = <last expr instruction>

by passing a data destination ('hint') down the AST.  The semantics is
to use the destination as a result location if a temp is needed.  It
may be ignored.  NULL indicates I don't care and you should generate a
temp.

2. We correctly handle assignments as subexpressions.  When building
the CFG for an expression we accumulate the assigned variables and we
emit a move to a fresh temporary if a value in a variable is in
jeopardy of being overwritten.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2643 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 07:15:31 +00:00
kasperl@chromium.org
bcbef79a11 Convert global objects to global receivers before invoking
JavaScript functions on them.
Review URL: http://codereview.chromium.org/165122

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2642 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 07:15:16 +00:00
mikhail.naganov@gmail.com
b290c323a9 Fix presubmit errors.
TBR=whesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2641 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 20:35:33 +00:00
whesse@chromium.org
d3eeaf1757 X64: Implement tickprocessor sampling on 64-bit MacOS. This issue on codereview has been accidentally reused from an earlier issue by a process mistake.
Review URL: http://codereview.chromium.org/151004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2640 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 15:47:58 +00:00
whesse@chromium.org
863582bad4 Make sure use of eax in inlined sin and cos is safe.
Review URL: http://codereview.chromium.org/164061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2639 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 14:42:38 +00:00
whesse@chromium.org
384a6f299e X64: Implement inline trigonometric operations.
Review URL: http://codereview.chromium.org/164056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 14:42:10 +00:00
kmillikin@chromium.org
cde1262754 M regexp-macro-assembler-ia32.cc
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2637 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 13:57:34 +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
5ae761cc15 Irregexp-ia32 internal call strategy changed.
Review URL: http://codereview.chromium.org/164053


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2635 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 12:51:04 +00:00
whesse@chromium.org
7bd88e829f X64: Optimize MOD operator by a constant power of 2.
Review URL: http://codereview.chromium.org/164054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2634 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 11:51:23 +00:00
kmillikin@chromium.org
6a19a8f5fd Fix the debugger in multipass mode by introducing phantom instructions
marking statement boundaries.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2633 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 11:14:48 +00:00
lrn@chromium.org
6f21761ea8 X64: Fix bug in boolean conversion of empty string.
Review URL: http://codereview.chromium.org/165043


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 10:22:38 +00:00
kmillikin@chromium.org
98b93c739d Added support for expression statements to the CFG builder and
fast-mode compiler.

This will generate a compiler temporary for complex expressions and
then immediately throw it away, so a better approach (to be
implemented later) is to pass to the expression builder whether an
expression is in an effect or value context.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 07:51:44 +00:00
whesse@chromium.org
23507e34db X64: Make megamorphic and normal calls use stub cache and stub code.
Review URL: http://codereview.chromium.org/162009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2629 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 07:42:04 +00:00
kmillikin@chromium.org
23fbd8fe3f Add support to the CFG builder for non-short-circuited binary
expressions.  Add compilation support in fast mode (optimized for
compilation time and code size).

This breaks one debugger test each on ARM and IA32 (expectedly).
Review URL: http://codereview.chromium.org/160584

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2628 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-05 12:52:31 +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
mikhail.naganov@gmail.com
ed09a3bf0b Fix issue 417: incorrect %t placeholder expansion.
BUG=http://code.google.com/p/v8/issues/detail?id=417
TEST=none

Verified on Linux, Mac, and Windows.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-05 08:53:02 +00:00
sgjesse@chromium.org
02ac252907 Prepare to push to trunk. We are now working on version 1.3.3.
Review URL: http://codereview.chromium.org/159910

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2623 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-05 08:27:54 +00:00
sgjesse@chromium.org
fd956f70a5 Fix Windows build.
TBP=mnaganov
Review URL: http://codereview.chromium.org/160632

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-05 07:35:05 +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
f2faaa5c34 X64: Add missing pop when calling handler with Out-of-memory exception.
Review URL: http://codereview.chromium.org/160520

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-04 13:46:58 +00:00
lrn@chromium.org
4fa5fc4f7e X64: double stack size, to be able to have the same number of stack frames as in ia32.
Review URL: http://codereview.chromium.org/159852


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2617 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-04 12:30:21 +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
lrn@chromium.org
e05ea61528 X64: Fix bug in RandomPositiveSmi (doesn't save rsi before calling C-code).
Review URL: http://codereview.chromium.org/160519


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2614 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-04 08:23:37 +00:00
lrn@chromium.org
0e11fbcd79 Removed unsafe optimization in RecordWrite.
Optimization was only unsafe if new-space was in the low half of memory and an object could be
located in the top half at an addressed that only differ from a new-space address by the high
bit.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2608 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-03 13:17:34 +00:00
lrn@chromium.org
fd8b376989 X64: Reenabled RSet.
Review URL: http://codereview.chromium.org/160453


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2607 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-03 11:05:26 +00:00
sgjesse@chromium.org
8c9b30af83 Removed some comments which did not make any sense.
Review URL: http://codereview.chromium.org/159783

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-03 10:59:00 +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
kmillikin@chromium.org
67a61e96c7 Restructure to support recursive invocation of the CFG builder. Add
support for stack-allocated variables when run with multipass.

There is no liveness analysis and they are currently always allocated
to memory.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2604 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-03 07:55:48 +00:00
iposva@chromium.org
3d070f1f0c - Fix a style violation which was flagged by gcc: while loop without body
- Restructured the entire function because:
  During the simple style fix I discovered that this whole routine was
  hard to read due to a general lack of comments. While adding comments I
  realized that the function was also skipping entries if there were two
  consecutive entries in the maps file.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2603 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-01 06:11:53 +00:00
whesse@chromium.org
78ec956610 Add missing file to last changelist, for NaN Dates.
Review URL: http://codereview.chromium.org/159700

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 13:24:40 +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
kmillikin@chromium.org
e2ae01b6ef Add virtual destructors to address a gcc warning.
TBR=plesner@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 11:34:47 +00:00
kmillikin@chromium.org
b092d55890 Enable --trace when --multipass is on. Bugfix in bailout condition.
All V8 and (ia32) mozilla tests pass with --multipass on, failures now
count as regressions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2598 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 11:27:14 +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
kmillikin@chromium.org
3a472fada8 Basic infrastructure for fast two-pass compilation. A CFG is
generated in one-pass from the source AST, code is generated from the
CFG.  Enabled by the flag --multipass and disabled by default.

Rudimentary and currently only supports literal expressions and return
statements.  There are some other known limitations (e.g., missing
support for tracing).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 11:06:17 +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
sgjesse@chromium.org
219df901a2 Prepare push to trunk. We are now working towards version 1.3.2.
Review URL: http://codereview.chromium.org/160391

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 14:18:09 +00:00
lrn@chromium.org
67936a7b16 X64: Fix lint problem and add missing stub function.
Review URL: http://codereview.chromium.org/160387


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 12:09:51 +00:00
kmillikin@chromium.org
1a39e07003 Another name change for consistency's sake. NODE_LIST -> AST_NODE_LIST.
Review URL: http://codereview.chromium.org/159633

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2587 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 12:09:05 +00:00
kmillikin@chromium.org
a48fd5916e Change the overly-general class named Node to the more specific
AstNode in case we ever want to have some other kind of node.

Split the NODE_LIST macro-generating macro so that we can iterate
concrete subclasses of Statement and concrete subclasses of Expression
separately.
Review URL: http://codereview.chromium.org/159632

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2586 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 11:53:29 +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
sgjesse@chromium.org
cffc051177 Avoid dictionary expansion during bootstrapping.
Allocate the code stubs dictionary and non monomorphic cache dictionary with an initial size which avoids these dictionaries to be expanded during bootstrapping. This gets rid of 9 dictionary expansions during bootstrapping.

Preallocate the dictionary when normalizing an object to a size sufficient for holding the number of properties which is expected to be added to the object. This is used when ceating an object from an object literal boilerplate where multiple properties are known to be added.  This gets rid of 10 dictionary expansions during bootstrapping.

There are now 3 dictionary expansions left during bootstrapping.
Review URL: http://codereview.chromium.org/160382

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 09:13:48 +00:00
whesse@chromium.org
027f8d11c7 X64: Change wording of comments.
Review URL: http://codereview.chromium.org/160381

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2583 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 08:11:25 +00:00
sgjesse@chromium.org
d8563e4d1e Allocate global object as a normalized object.
The global object is now allocated and initialized as a normalized object.
Review URL: http://codereview.chromium.org/159587

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2582 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 07:33:05 +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
sgjesse@chromium.org
e13c319f7c Harden message handling in the debugger agent.
This defect have been reported by the Coverity Prevent static analysis tool.
Review URL: http://codereview.chromium.org/160327

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 07:02:23 +00:00
christian.plesner.hansen@gmail.com
98425a31f1 Speed up CalledAsConstructor.
Changed CalledAsConstructor to process the raw runtime stack directly,
rather than using a StackFrameIterator.  Using an interator turns out
to be quite expensive and the vast majority of the work done is not
relevant to deciding if we've been called as a constructor.

This speeds up getElementById by ~13%.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 12:50:20 +00:00
antonm@chromium.org
0d2c81584b Compile precanned answers for the case of failed interceptor for some combinations.
Review URL: http://codereview.chromium.org/140069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 12:34:21 +00:00
yurys@chromium.org
cd16b5be95 Use JSFunction::IsBuiltin() for checking if a function is a builtin one
Review URL: http://codereview.chromium.org/160323

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 11:55:26 +00:00
mikhail.naganov@gmail.com
e97554ed10 Add generic V8 API functions for controlling profiling aspects.
As we'll have several aspects of heap profiling, it is more handy to control them using binary flags than by individual functions. CPU profiling represent just a particular aspect to control, so {Pause,Resume}Profiler and IsProfilerPaused are only left for compatibility.

For now, PROFILER_FLAG_HEAP_STATS and PROFILER_FLAG_JS_CONSTRUCTOR are equivalent, but later will be split.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 11:23:36 +00:00
kasperl@chromium.org
84d8e51df4 Change the check for builtin functions to not be based on identity,
which seems shaky in the presence of multiple builtin objects.
Review URL: http://codereview.chromium.org/159583

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 09:51:41 +00:00
sgjesse@chromium.org
69a90ee916 Add missing case in AST printer.
Review URL: http://codereview.chromium.org/159580

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2572 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 08:46:28 +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
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
8a82d61722 - getc returns an int.
Review URL: http://codereview.chromium.org/159538

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 21:10:13 +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
mikhail.naganov@gmail.com
ee340a52ff X64: Fixes to enable C/C++ functions processing in profiler.
- rewrote Linux version of LogSharedLibraryAddresses to work correctly with 64-bit libs;
 - fixed address length restriction in JS tickprofiler script.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 15:37:05 +00:00
antonm@chromium.org
4354661a49 Get rid of unnecessary handle management when invoking interceptors.
Review URL: http://codereview.chromium.org/155682

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2562 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 14:46:06 +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
b357dc043e More X64 inline cache implementation.
Review URL: http://codereview.chromium.org/160268

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 13:44:17 +00:00
kasperl@chromium.org
f68b31403c Change custom NaN check to use isnan to fix pixel array
failures on ARM hardware.
Review URL: http://codereview.chromium.org/160269

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 12:50:58 +00:00
kasperl@chromium.org
516d47c73b Fix pixel array support for x64 and make the fast Array functions
that use JSARRAY_HAS_FAST_ELEMENTS_CHECK a bit safer in the presence
of pixel arrays.
Review URL: http://codereview.chromium.org/159500

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 12:46:08 +00:00
sgjesse@chromium.org
422b02717e Change the updating of the counters for global stub use to be consistent. Now counters are updated when they are sure to count to avoid decrementing them when there is a miss.
Review URL: http://codereview.chromium.org/160265

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2554 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 11:42:18 +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
lrn@chromium.org
25eb44253f X64: Fixed bug de-tagging of smis in multiplication code.
Moved some dummy function implementations to from ic-x64.cc to stub-cache-x64.cc (where they belong)

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2546 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 08:22:48 +00:00
whesse@chromium.org
65580ea35e X64: Fix buggy expression in disassembler. Fixes Issue 408: http://code.google.com/p/v8/issues/detail?id=408
Review URL: http://codereview.chromium.org/160174

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-27 18:51:46 +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
668497b26a Handlified some stack trace code
Fixed some failing sputnik tests by handlifying some code that would
otherwise break on gc.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-27 13:26:43 +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
9b25131b4f X64: Add mov rax,(mem64) to disassembler.
Review URL: http://codereview.chromium.org/159397

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-27 10:39:46 +00:00
whesse@chromium.org
8558fde3a5 Make X64 implementation update Store ic stubs. Remove comment that talks about "below" on the stack meaning closer to the top.
Review URL: http://codereview.chromium.org/159402

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2539 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-27 10:39:21 +00:00
vitalyr@chromium.org
57e8217c10 Stub Cache: speed up load callback accessor by allocating data handle on stack.
Review URL: http://codereview.chromium.org/160041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-27 09:54:59 +00:00
kasperl@chromium.org
ef0fb2e6fb Prepare to push version 1.3.0 to trunk.
Review URL: http://codereview.chromium.org/160157

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2536 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-27 08:27:28 +00:00
iposva@chromium.org
d573e3b39d Landing patch for Timur Iskhodzhanov.
Reviewed at http://codereview.chromium.org/160099

The original MacOSMutex constructor makes data race detectors a little
bit crazy. Also, the new version is simpler and easier to understand.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-27 05:31:30 +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
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
1309d6df08 Fix typo in last change
Review URL: http://codereview.chromium.org/160009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2528 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-23 13:05:36 +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
4196711d2e Call the (fatal) V8 out of memory handler if we cannot allocate enough
memory from the OS to deserialize the initial heap snapshot at
startup.

This catches the failure to startup earlier, and avoids dereferencing
the encoding of an allocation failure.

BUG=16359

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-23 12:56:45 +00:00
kmillikin@chromium.org
270c0e8b8f Change a few style issues (dead code, unitialized members) flagged by
Coverity Prevent.  All are benign.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-23 12:51:49 +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
whesse@chromium.org
f751483255 Correct sense of test for generic keyed load with a symbol as key.
Review URL: http://codereview.chromium.org/155922

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2523 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-22 14:40:04 +00:00
kmillikin@chromium.org
e8ae83eec3 Remove a few occurrences of the CHECK_FAILED macro in the parser.
There's no reason to check if we've failed when (a) we know we have
and (b) we've got a perfectly good NULL just lying around anyway.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-22 12:33:16 +00:00
kmillikin@chromium.org
dc30b11fbc Fix some defects identifies by Coverity Prevent. All are false
positives, but I've restructured the code to be more explicit.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-22 11:29:38 +00:00
kmillikin@chromium.org
1cbe7a240a Fix two deallocation bugs identified by Coverity Prevent.
1. The tables array allocated in the CompilationSubCache constructor
   was never deallocated.  Fixed by adding destructor.

2. The buffer allocated in one of the constructors of the
   NoAllocationStringAllocator was never deallocated.  It seems that
   this class sometimes owns the buffer (if it allocated one itself)
   and sometimes doesn't (if it was passed one).  Simple fix is to
   remove the offending constructor which was never used anyway.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-22 10:23:19 +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
be562ee794 X64: Add StoreField inline cache stub.
Review URL: http://codereview.chromium.org/155915

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-22 09:11:33 +00:00
iposva@chromium.org
a109c08c78 - Remove unneeded include of ucontext.h as it is deprecated on Snow Leopard.
- Avoid calculating shared library addresses if profiling is not enabled.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-21 17:25:07 +00:00
whesse@chromium.org
ff242173c3 Make stub cache hash work on X64 platform. Stub cache now works.
Switch arguments of 32-bit arithmetic instructions so they are consistent
with 64-bit arithmetic instructions (all on X64 platforms).
Review URL: http://codereview.chromium.org/155849

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2516 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-21 13:30:46 +00:00
whesse@chromium.org
8ff3dc5280 X64: Implement inline caches for loads
Review URL: http://codereview.chromium.org/159131

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-21 11:06:24 +00:00
whesse@chromium.org
46b8d84659 X64: Fix compiler complaint
Review URL: http://codereview.chromium.org/159079

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2514 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-20 20:17:27 +00:00
whesse@chromium.org
ca6cd9b4b2 X64: Add instructions to disassembler. Skip hanging test-api test.
Review URL: http://codereview.chromium.org/155771

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-20 14:57:09 +00:00
whesse@chromium.org
7f886c8582 X64: Enable more of LoadIC, disable individual stub types.
Review URL: http://codereview.chromium.org/155763

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2512 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-20 14:33:59 +00:00
kmillikin@chromium.org
7c8a166b91 Fix another site where a stack-allocated character was treated as a
one-element character array.  This was safe at this site but
potentially confusing.

BUG=17103

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-20 12:28:02 +00:00
kmillikin@chromium.org
2126c36279 Change RegExpMacroAssemblerIA32::CaseInsensitiveCompareUC16 so that it
does not use stack-allocated character as a one-element character
array.

The use at this site was actually safe (Ecma262Canonicalize will only
write to the first character of the array), but not obviously so.

BUG=17103

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-20 10:54:00 +00:00
mikhail.naganov@gmail.com
ec526df16f Heap profiling: add logging of heap memory stats (capacity, used) under 'log-gc' flag.
Also changed time reporting to system time to be able to get synchronized with other memory (e.g. DOM) size status.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-20 09:38:44 +00:00
ager@chromium.org
ab59ea5a16 I will lint my code before submitting...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 16:34:58 +00:00
ager@chromium.org
6d641a8131 Add missing handle scope in internal field code.
TBR=kasperl@chromium.org
Review URL: http://codereview.chromium.org/155691

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 16:00:42 +00:00
whesse@chromium.org
39c9dd5ab1 X64: Add inline caching to calls of global functions
Review URL: http://codereview.chromium.org/155688

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 12:58:12 +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
kasperl@chromium.org
21f44e8fd2 Make sure we don't crash if NewProxy returns an empty handle (only
happens when out of memory).
Review URL: http://codereview.chromium.org/155685

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 11:16:10 +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
kasperl@chromium.org
4f2cc4104e Patch by Vitaly Repeshko. Improve performance of internal fields
operations by adding a fast-case check for JS_OBJECT_TYPE in
JSObject::GetHeaderSize().
Review URL: http://codereview.chromium.org/155684

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2497 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 09:16:23 +00:00
whesse@chromium.org
f8e622a620 Added inline caching for calls to a field to X64. Changed a use of Array::kHeaderSize to FixedArray::kHeaderSize on all platforms.
Review URL: http://codereview.chromium.org/149798

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 08:55:01 +00:00
kasperl@chromium.org
38f5a84701 Avoid more static variables in inline functions.
Review URL: http://codereview.chromium.org/149799

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 08:22:07 +00:00
kasperl@chromium.org
124ef540c0 Patch by Mark Mentovai. Don't put static variables inline.
Original review: http://codereview.chromium.org/149768

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 05:37:09 +00:00
kasperl@chromium.org
94c4760225 Revert r2486, r2487, and r2488 until I get the chance to fix
the performance issue with number dictionaries.

TBR=kmillikin@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 04:57:17 +00:00
bak@chromium.org
752a8fbaba Changed the dictionary code to use original hash value when starting linear scan.
This is necessary for hash codes for string where the array index is encoded.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 14:59:28 +00:00
bak@chromium.org
78ffa1df4d Added two spaces to make presubmit.py happy.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 13:25:45 +00:00
bak@chromium.org
e0047e4331 Changed hash table to use more of the hash value when probing.
Review URL: http://codereview.chromium.org/155350

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 12:56:50 +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
a1cf7d6e3d X64: Enable inline caching for calls, with some stubs stubbed out.
Review URL: http://codereview.chromium.org/149674

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 08:38:52 +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
whesse@chromium.org
10605879f6 Disable inline caching on X64 separately for loads, stores, and calls, while they are being implemented and tested one-by-one.
Review URL: http://codereview.chromium.org/149673

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-15 12:30:28 +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
antonm@chromium.org
f12bdb27aa Improved version of LookupForRead (tnx to Kasper) + some faster paths.
1) add no GC check;
2) do not use recursion;

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-15 08:07:31 +00:00
mikhail.naganov@gmail.com
36b69749a5 Add heap log processing script originally written by Kevin.
Also, add user time into heap sample begin events to make '--log-gc' flag alone sufficient for producing heap logs (previously, samples times were extracted from scavenge events which are only logged with '--log' flag).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-15 07:09:48 +00:00
feng@chromium.org
9b58a0c856 Adjust kPagesPerChunk to 16 instead of 64 on Android.
Renamed some macros to ANDROID.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 22:38:06 +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
73710e057a Implement shared libraries logging on Mac OS X, added required support in Tick Processor.
Review URL: http://codereview.chromium.org/155437

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 05:01:06 +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
ager@chromium.org
44be312091 Put the work-around for http://crbug.com/16276 into the ARM port as
well.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 23:15:04 +00:00
feng@chromium.org
d52990b2e2 Add a trace_gc_verbose flag.
The flag is only turned on when --trace_gc is one. It prints out used and available bytes in each space. To enable it, ENABLE_LOGGING_AND_PROFILING must be defined.

This is a mini version of --heap_stats, but don't need DEBUG macro to be turned on.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 21:24:54 +00:00
feng@chromium.org
3e4c457d1c Add ENABLE_DEBUGGER_SUPPPORT around 4 functions, set complation cache generation
to 1 for ARM.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2448 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 21:23:21 +00:00
feng@chromium.org
0b70c7e16e Hook up the log facility of Android platform.
Review URL: http://codereview.chromium.org/155443

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2447 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 21:22:50 +00:00
iposva@chromium.org
1ea35a858f - Added missing braces in an if statement as a drive-by-edit.
- Removed executable bits from Xcode project file.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 15:00:35 +00:00
kasperl@chromium.org
f188ed8183 Prepare to push version 1.2.14 to trunk.
Review URL: http://codereview.chromium.org/149533

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 13:49:57 +00:00
kasperl@chromium.org
df43ae3993 Revert r2431. I don't think this is it.
Review URL: http://codereview.chromium.org/155419

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 13:36:38 +00:00
kasperl@chromium.org
067b3af8b7 Attempt at work-around for http://crbug.com/16276 by explicitly checking
for global objects in the assembly code for dictionary loads.
Review URL: http://codereview.chromium.org/155418

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2435 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 13:24:32 +00:00
deanm@chromium.org
e9f42cde46 Small cleanup to Utf8::CalculateValue:
- Don't duplicate kMaxXByteChar constants.
  - Don't compare signed and unsigned integers.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 11:17:51 +00:00
antonm@chromium.org
d067f8903a Convert object to fast mode after creation. That enables more optimizations.
Review URL: http://codereview.chromium.org/155405

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 10:10:28 +00:00
kasperl@chromium.org
55a8088bd8 Add support for tracking down leak of the hole value.
Review URL: http://codereview.chromium.org/149522

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 09:17:04 +00:00
kasperl@chromium.org
e0c01db960 Try to work around http://crbug.com/16276 until we can
find the cause of the problem.
Review URL: http://codereview.chromium.org/149521

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 08:31:30 +00:00
ager@chromium.org
55050383e1 Port the function prototype load stub to ARM.
Review URL: http://codereview.chromium.org/155373

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-10 23:26:33 +00:00
ager@chromium.org
00cdc3f1a3 Remove the descriptor stream abstractions.
The abstractions have led to bugs because it looks like descriptor
streams are GC safe but they are not.

I have moved the descriptor stream helper functions to descriptor
arrays and I find most of the code just as readable now as it was
before.
Review URL: http://codereview.chromium.org/149458

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-10 19:25:18 +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
kasperl@chromium.org
875dbe6584 Re-enable ICs for loads and calls that skips a global object during
lookup through the prototype chain.
Review URL: http://codereview.chromium.org/155344

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-10 09:40:47 +00:00
mikhail.naganov@gmail.com
15754c6f1c Fixed issue 401: os.system() hangs on Mac OS X.
Fixed by falling back to using 'waitpid' instead of 'waitid'.

BUG=http://code.google.com/p/v8/issues/detail?id=401

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2424 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-10 08:36:37 +00:00
kmillikin@chromium.org
726c29c0be Skip the write barrier for global property cell writes. The heap
verification code was refactored to avoid verifying that property
cells have correct remembered sets.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2423 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 14:34:08 +00:00
whesse@chromium.org
b019600dce X64: Let debugger patch JSReturn with a debug break.
Review URL: http://codereview.chromium.org/155286

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 13:30:27 +00:00
kmillikin@chromium.org
e0ac466589 During a scavenge, instead of sweeping remembered-set bits for global
property cells, sweep the cell values themselves.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 13:28:22 +00:00
kasperl@chromium.org
13acf24a2b Don't have too many holders. Reviewed offline by Kevin Millikin.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 12:23:08 +00:00
kmillikin@chromium.org
525601be88 Fix free list construction for global property cells on x64.
Review URL: http://codereview.chromium.org/155287

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 12:20:04 +00:00
kmillikin@chromium.org
fd9aab6ee7 Fix too-long line.
TBR=kasperl@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 12:13:51 +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
kmillikin@chromium.org
266ce3fdb0 Fix x64 build.
Review URL: http://codereview.chromium.org/149385

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 11:46:12 +00:00
kasperl@chromium.org
98f1a228c6 Allow access through the global proxy to use ICs.
Review URL: http://codereview.chromium.org/155283

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 11:17:57 +00:00
kmillikin@chromium.org
d0c35af612 Create a new paged heap space for global property cells. The new
space is similar to map space in that it has fixed-size objects.  A
common superclass for a space with fixed size objects is used for the
map space and cell space.

Allocate all cells in cell space.  Handle it during all GCs.  Modify
the free-list node representation (so that the size is not at a fixed
offset in all cells) to allow two-pointer free-list nodes.  Clean up
some stuff in the MC collector.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2411 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 11:13:08 +00:00
lrn@chromium.org
e3bb851efb X64: Fix bug in left-shift.
Also changed a few other places that looked suspicious in the same way.
Added more info to failing test case and rewrote incorrect uses of mjsunit "fail" function.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2409 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 08:00:12 +00:00
kasperl@chromium.org
b8eb6189be Prepare to push version 1.2.13 to trunk.
TBR=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/149381

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 05:44:19 +00:00
lrn@chromium.org
b360ef238d X64: Fix recently introduced bug in movq with 64-bit literal.
Review URL: http://codereview.chromium.org/155223


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 05:43:34 +00:00
ager@chromium.org
68f5664689 Address review comments.
Only jump over 'else' part of a conditional if it is actually
generated.  Update a comment to more correctly reflect what is going
on.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 04:22:05 +00:00
iposva@chromium.org
05b7b265cb - Update comments and fix a small glitch in the ARM disassembler.
- Fix the use of OS::ActivationFrameAlignment() when running with
  the simulator.
Review URL: http://codereview.chromium.org/155109

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 22:13:42 +00:00
ager@chromium.org
13bf328e19 Fix crash bug in ARM codegenerator by adding another special case for
generating code after a call to LoadConditionAndSpill.

This crash is hit on www.rightmove.co.uk when using the ARM
codegenerator.
Review URL: http://codereview.chromium.org/149351

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 22:05:06 +00:00
ager@chromium.org
0be6a72cc1 Fix crash in arm conditional expression code generation.
Review URL: http://codereview.chromium.org/155234

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 19:43:22 +00:00
erik.corry@gmail.com
8f73ae0325 * Move almost all roots into an array ready for use by a constant-pool
register on ARM.
* Make some compile-time loops into run-time loops for compactness.
Review URL: http://codereview.chromium.org/149324

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 19:12:58 +00:00
whesse@chromium.org
bf656d2ae1 Fix an X64 problem with builtin fixups. Remove an assert from fixups that is no longer true on all platforms.
Review URL: http://codereview.chromium.org/149332

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 16:19:13 +00:00
lrn@chromium.org
bef7669209 X64: Fix bug in for-in iteration.
Review URL: http://codereview.chromium.org/155213


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2396 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 15:43:31 +00:00
bak@chromium.org
be6dd7a490 Fixed and exposure to the_hole from Runtime_KeyedGetProperty.
Added regression test that fails with previous revisions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 11:51:43 +00:00