Commit Graph

948 Commits

Author SHA1 Message Date
fschneider@chromium.org
a07146c0cb Support for post-fix count operations (x++, x--) where x is a global
variable for the top-level compiler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-02 10:22:22 +00:00
erik.corry@gmail.com
dbd7f20d2d Introduce a switch for the new snapshot code and switch
it on by default.  Includes bug fixes for new snapshots.
Review URL: http://codereview.chromium.org/342054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3184 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-30 10:23:12 +00:00
fschneider@chromium.org
07cd399b5c Support for calls on named and keyed properties in the fast compiler of the form:
o.x() and o[expr]()

other changes:
- Fix missing relocation info for StoreIC on global object.
- Generate only one common return sequence instead of always appending 
  "return <undefined>" at the end of each function: The first JS 
  return-statement will generate the common return sequence. All
  other return-statements will generate a unconditional branch to the common
  return sequence.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3183 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-30 10:22:31 +00:00
antonm@chromium.org
6da43b7e4d Add a test which verifies that weak reference callbacks cannot be invoked while scavenging.
BUG=25819

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-29 23:06:59 +00:00
sgjesse@chromium.org
be769f6a24 Reverting 3159, 3151 and 3150
TBR=christian.plesner.hansen@gmail.com
Review URL: http://codereview.chromium.org/343035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-29 13:17:11 +00:00
erik.corry@gmail.com
55212d2e1d ARM still not quite right with new serialization code.
Review URL: http://codereview.chromium.org/339043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 14:28:20 +00:00
lrn@chromium.org
0aecc29024 Issue 485: Fix leak of builtins object through call and apply functions.
Review URL: http://codereview.chromium.org/345007


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3164 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 13:51:30 +00:00
sgjesse@chromium.org
6768703d24 Derive string size constants
* The maximum length of short and medium sized strings is now derived from other constants.
* Remove the redundant String part of their names.
Review URL: http://codereview.chromium.org/347002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 13:10:36 +00:00
erik.corry@gmail.com
97de363ef5 * Fix new snapshot code on ARM.
Review URL: http://codereview.chromium.org/344011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 12:37:54 +00:00
christian.plesner.hansen@gmail.com
b5dd1e3a82 Marking test as expected to flake.
Review URL: http://codereview.chromium.org/343016


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3160 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 12:23:35 +00:00
mikhail.naganov@gmail.com
492dc0643f Fix crbug/24815. Changes affect profiler "lazy" mode used for V8 in Chromium.
- don't engage the processing thread of CPU profiling until the first time profiling is resumed, this saves us a thread allocation for the majority of users;
- don't log shared libraries addresses: this is useless for JS-only profiling, and also consumes time on startup.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3154 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 09:13:11 +00:00
fschneider@chromium.org
64e1d3205f Support for property access (named, keyed) in the fast compiler.
The generated code is similar to the existing code, but we never
inline any IC code in the fast compiler.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3152 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 16:11:12 +00:00
christian.plesner.hansen@gmail.com
895f1d22e5 Implemented specialized stubs for API getters. This includes a number
of individual changes:

  - Added infrastructure for custom stub caching.
  - Push the code object onto the stack in exit calls instead of a
    debug/non-debug marker.
  - Remove the DEBUG_EXIT frame type.
  - Add a new exit stub generator for API getters.


Committed: http://code.google.com/p/v8/source/detail?r=3130
Review URL: http://codereview.chromium.org/330017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 15:38:49 +00:00
sgjesse@chromium.org
c19d944bed Landing http://codereview.chromium.org/339026
TBR=lrn@chromium.org
Review URL: http://codereview.chromium.org/334044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 14:40:50 +00:00
lrn@chromium.org
c433b4db20 Fix bug in test on Windows.
Review URL: http://codereview.chromium.org/335044


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 13:26:22 +00:00
lrn@chromium.org
89253d33c2 Fixed problem with test on big-endian-float ARM.
Review URL: http://codereview.chromium.org/338044


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 12:26:21 +00:00
erik.corry@gmail.com
fb2317b63b New snapshot framework. Doesn't work on ARM yet (code targets
are different).  Is able to deserialize the whole heap and run
some stuff.  Not available as the primary snapshot system yet.
Review URL: http://codereview.chromium.org/335009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 11:54:01 +00:00
lrn@chromium.org
59e7be2c03 Windows: Change test to not assume ebp is frame-pointer.
Review URL: http://codereview.chromium.org/329007


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 08:50:24 +00:00
lrn@chromium.org
b92a05942e Change NaN-test to only check for QNaNs, and API to only introduce QNaNs.
Review URL: http://codereview.chromium.org/339002


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 08:13:59 +00:00
christian.plesner.hansen@gmail.com
2880be71ea Reverted 3130-3131 since they don't work on mac.
Review URL: http://codereview.chromium.org/335027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3133 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-26 15:16:42 +00:00
christian.plesner.hansen@gmail.com
d59f47a2d5 Fixed release test build breakage.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3131 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-26 14:33:13 +00:00
christian.plesner.hansen@gmail.com
53b93464d1 Implemented specialized stubs for API getters. This includes a number
of individual changes:

  - Added infrastructure for custom stub caching.
  - Push the code object onto the stack in exit calls instead of a
    debug/non-debug marker.
  - Remove the DEBUG_EXIT frame type.
  - Add a new exit stub generator for API getters.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3130 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-26 13:54:47 +00:00
fschneider@chromium.org
9445079c51 Support for object literals in fast compiler.
I also added more unit tests for literals.

Right now, the fast compiler produces code very similar to
the existing code generator. We may consider different ways to 
further compact the generated code for top-level code.

ARM always goes through a runtime function to initialize computed
properties in an object literal whereas IA32 and x64 use StoreIC.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3129 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-26 13:21:48 +00:00
sgjesse@chromium.org
7a509f2101 Fix issue with running some constructors having only this.x = ... assignments.
If we had compiled the comment instead of the code it would have worked.

BUG=483
TEST=mjsunit/regress/regress-483.js
Review URL: http://codereview.chromium.org/332007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-23 12:18:47 +00:00
kbr@chromium.org
ef95097334 Stop throwing exceptions for out-of-range accesses to CanvasArrays.
This is per resolution in the WebGL working group to make these types
match the WebIDL IndexSetter and IndexGetter semantics, which are
still being defined but will very likely not throw.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-23 09:19:17 +00:00
lrn@chromium.org
6f1d641fb6 X64/Win64: Alternative implementation of fmod in general.
Review URL: http://codereview.chromium.org/303034


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-23 09:18:19 +00:00
erik.corry@gmail.com
d50fbb634e Fix bug that meant that dependent tests were never reported as
failing (though they could still crash).
(Cache the result of the test in the output object, not in the
test object which is reused from the prerequisite to the dependent.)
Review URL: http://codereview.chromium.org/321001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3115 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-22 19:09:09 +00:00
kbr@chromium.org
d5f00cf6cc Add optimized ICs for new CanvasArray types introduced in WebGL
specification under development. This is a follow-on CL to
http://codereview.chromium.org/293023 .

Based on review feedback, defined the behavior of storing NaN and
+/-Infinity into external arrays of integer types as storing 0. Added
test cases. Added fucomi instruction to assembler. Fixed bug in
KeyedLoadIC::GenerateExternalArray when allocation of HeapNumber
failed. Fixed bug in encoding of 16-bit immediate arithmetic
instructions in 64-bit port.

Removed raising of exceptions for negative array indices passed to
external arrays and associated tests. Based on current discussion in
WebGL working group, will probably end up removing the exception
throwing altogether.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-22 14:49:00 +00:00
kmillikin@chromium.org
bb2f8c038c The runtime function DeclareGlobals is not called from JavaScript.
Add it to the exclusions list in the fuzz-natives test.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-22 11:32:12 +00:00
kmillikin@chromium.org
fbc0eaa13d Added support for array literals to the toplevel compiler. They are
currently compiled the same as with the optimizing compiler: they are
cloned from a boilerplate object and the boilerplate objects are
lazily constructed.

Also changed argument pushing on ARM to use stm (store multiple),
which required changing the order of arguments to the runtime
functions DeclareGlobals and NewClosure.  They were only used from
generated code.

Finally, changed the toplevel code generator so that stack pops to
discard a temporary became addition to the stack pointer on ia32 and
x64.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-22 10:07:45 +00:00
peter.rybin@gmail.com
d8f7b36624 Add "Version" command
Review URL: http://codereview.chromium.org/274080


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3108 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-21 17:07:43 +00:00
ager@chromium.org
9ee631338e Allow resource constraints to specify the max committed new space size
when using snapshots.

The alignment of new space has to match the alignment in the snapshot,
but the max committed amount of memory does not.

For now, we assume that the default semispace size is always used in a
snapshot.
Review URL: http://codereview.chromium.org/300036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-21 15:03:34 +00:00
kmillikin@chromium.org
61363d83ba Add support for global variable references in toplevel code. We use
the normal named load IC mechanism for now.  Generated code is similar
to the case for global variable assignments.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3101 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-21 09:38:21 +00:00
kbr@chromium.org
46e6297e3e Added infrastructure for optimizing new CanvasArray types in WebGL
specification under development. The optimizations are patterned after
those previously done for CanvasPixelArray. This CL adds all of the
necessary framework but continues to use the generic KeyedLoadIC and
KeyedStoreIC code, to create a baseline for benchmarking purposes. The
next CL will add the optimized ICs to ic-ia32.cc and ic-x64.cc.

These new CanvasArray types have different semantics than
CanvasPixelArray; out-of-range values are clamped via C cast
semantics, which is cheaper than the clamping behavior specified by
CanvasPixelArray. Out-of-range indices raise exceptions instead of
being silently ignored.

As part of this work, pulled FloatingPointHelper::AllocateHeapNumber
up to MacroAssembler on ia32 and x64 platforms. Slightly refactored
KeyedLoadIC and KeyedStoreIC. Fixed encoding for fistp_d on x64 and
added a few more instructions that are needed for the new ICs. The
test cases in test-api.cc have been verified by hand to exercise all
of the generated code paths in the forthcoming specialized ICs.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-20 15:26:17 +00:00
kmillikin@chromium.org
4dfd44479d Added support for assignments to global variables in the toplevel code
generator.  We use the normal store IC mechanism with the global
object as the receiver.  The following code is generated for 'x=true'
at toplevel.

======== IA32:

27  mov eax,0xf5d06161          ;; object: 0xf5d06161 <true>
32  mov ecx,0xf5d09c35          ;; object: 0xf5d09c35 <String[1]: x>
37  push [esi+0x17]
40  call StoreIC_Initialize  (0xf5ce75c0)    ;; code: STORE_IC, UNINITIALIZED
45  mov [esp],eax

======== X64:

25  movq rax,0x7f867a7b6199    ;; object: 0x7f867a7b6199 <true>
35  movq rcx,0x7f867a7bae71    ;; object: 0x7f867a7bae71 <String[1]: x>
45  push [rsi+0x2f]
49  call StoreIC_Initialize  (0x7f8655929ac0)    ;; code: STORE_IC, UNINITIALIZED
54  movq [rsp],rax

======== ARM:

32  e59f0054       ldr r0, [pc, #+84]          ;; object: 0xf5b78161 <true>
36  e59f2054       ldr r2, [pc, #+84]          ;; object: 0xf5b7bc35 <String[1]: x>
40  e598c017       ldr ip, [r8, #+23]
44  e52dc004       str ip, [sp, #-4]!
48  e1a0e00f       mov lr, pc
52  e59ff048       ldr pc, [pc, #+72]          ;; debug: statement 0
                                               ;; code: STORE_IC, UNINITIALIZED
56  e58d0000       str r0, [sp, #+0]

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3095 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-20 13:37:26 +00:00
sgjesse@chromium.org
a637f45385 Fix issue 475
The check for arguments in registers in one of the three versions of GenericBinaryOpStub::GenerateCall was plain wrong.

BUG=475
TEST=mjsunit/regress/regress-475.js
Review URL: http://codereview.chromium.org/307002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-20 12:13:31 +00:00
ager@chromium.org
390fd2a3b8 Add an API to V8 to get simple heap statistics.
Review URL: http://codereview.chromium.org/261037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-20 07:51:49 +00:00
peter.rybin@gmail.com
3b955790a0 Redo "running" field in debug-delay.js and support "suspend" command
It also fixes "backtrace" command so that it didn't give away random stack if we are running

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3077 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-15 20:06:08 +00:00
iposva@chromium.org
e0b8ab8815 - Add String::Concat(Handle<String> left, Handle<String> right) to the V8 API.
This is the first step to address http://crbug.com/23131 by creating
a series of V8 ConsStrings as more data arrives from the server.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-14 15:26:38 +00:00
antonm@chromium.org
1f8399bdda Partially revert r2761.
Do not create handles for values of internal fields---this operation is performance
critical and plain pointers are safe.

Appy the same approach to External wrapping and unwrapping.

Plus some minor refactorings.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3064 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-14 14:32:39 +00:00
fschneider@chromium.org
d0dc31afab New mjsunit tests for the new compiler infrastructure. They
are in a separate subdirectory called 'compiler' in the mjsunit directory.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3061 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-14 10:24:50 +00:00
christian.plesner.hansen@gmail.com
d6409e35a2 Implement ES5 Array.isArray
Patch by Jan de Mooij <jandemooij@gmail.com>
Review at http://codereview.chromium.org/271072


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-14 09:42:13 +00:00
yurys@chromium.org
a2549c96e8 Check that constructor is a FunctionMirror before calling .name(), otherwise we may end up calling name method on a mirror object that doesn't have it.
Review URL: http://codereview.chromium.org/271053

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

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


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


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

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


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

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


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


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

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

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


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

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


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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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


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


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


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


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

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


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

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

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

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

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

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

Used the constant kInstrSize instead of sizeof(Instr).

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

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

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


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

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

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


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

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

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

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

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

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

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

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

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

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

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

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


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

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


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

We need to clean this stuff up.

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

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

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

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

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

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

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

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

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

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

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

The code seems to work on all of our tests.

TBR=lrn@chromium.org

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

Minor cleanups.

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

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

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

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

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

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

TBR=ager

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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


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

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

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

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

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


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

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


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

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


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

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

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


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

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


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

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

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

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

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


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

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

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

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

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

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

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

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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 11:07:05 +00:00