platform/upstream/v8.git
14 years agoSupport for object literals in fast compiler.
fschneider@chromium.org [Mon, 26 Oct 2009 13:21:48 +0000 (13:21 +0000)]
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

14 years agoAllocate global handles in chunks.
antonm@chromium.org [Mon, 26 Oct 2009 12:54:41 +0000 (12:54 +0000)]
Allocate global handles in chunks.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3128 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoHandle the list of code-stub types using macro expansion.
sgjesse@chromium.org [Mon, 26 Oct 2009 12:26:42 +0000 (12:26 +0000)]
Handle the list of code-stub types using macro expansion.

As the list of code-stubs is used in two places it is now handled through a macro to keep this in sync. As some code-stubs is only used on ARM the list have been split into two parts to indicate this and get rid of dummy implementation on ia32 and x64 platforms.

BUG=484
Review URL: http://codereview.chromium.org/335025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3127 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix retainer profile test regression
mikhail.naganov@gmail.com [Mon, 26 Oct 2009 11:59:55 +0000 (11:59 +0000)]
Fix retainer profile test regression

TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3126 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoMake V8::LowMemoryNotification GC for all platforms.
antonm@chromium.org [Mon, 26 Oct 2009 11:35:07 +0000 (11:35 +0000)]
Make V8::LowMemoryNotification GC for all platforms.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3125 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoHeap profiler improvements.
mikhail.naganov@gmail.com [Mon, 26 Oct 2009 10:51:30 +0000 (10:51 +0000)]
Heap profiler improvements.

- account code objects in retainers profile;
- differentiate between function boilerplates and closures;
- simplify code;

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3124 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoRemove a check which was not needed
sgjesse@chromium.org [Fri, 23 Oct 2009 12:54:48 +0000 (12:54 +0000)]
Remove a check which was not needed
Review URL: http://codereview.chromium.org/326011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3123 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoUse RtlCaptureContext instead of inline assembly to capture execution context on...
sgjesse@chromium.org [Fri, 23 Oct 2009 12:47:44 +0000 (12:47 +0000)]
Use RtlCaptureContext instead of inline assembly to capture execution context on Windows

Inline assembly is not available in Visual C++ 64-bit version so use RtlCaptureContext to capture execution context. RtlCaptureContext is not available on Windows 2000 so this change removes Windows 2000 support. If this turns up causing trouble we can revert to only use RtlCaptureContext in 64-bit and inline assembly in 32-bit.
Review URL: http://codereview.chromium.org/335008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix issue with running some constructors having only this.x = ... assignments.
sgjesse@chromium.org [Fri, 23 Oct 2009 12:18:47 +0000 (12:18 +0000)]
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

14 years agoX64/Win64: Fix bug in returning ObjectPair.
lrn@chromium.org [Fri, 23 Oct 2009 10:53:20 +0000 (10:53 +0000)]
X64/Win64: Fix bug in returning ObjectPair.
Used the registers to test for failure before loading the result from the stack.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoSimple toplevel code generator support for short-circuited boolean OR
kmillikin@chromium.org [Fri, 23 Oct 2009 10:42:14 +0000 (10:42 +0000)]
Simple toplevel code generator support for short-circuited boolean OR
in a non-test (ie, value or effect) context.  (It is implicitly not in
a test context because the code generator does not support expressions
in a test context yet.)

Compilation is essentially the same as in the optimized code
generator.  The expression (e0 || e1) is compiled as if it were
(let (temp = e0) temp ? temp : e1).

On ia32 and x64 a single shared ToBoolean stub is used to convert a
value to a flag.  The inlined checks assumed by the stub are reordered
to compare to undefined (the common case in toplevel code?) first.  On
ARM a call to the runtime is used.  In the interest of code size no
checks are yet inlined on ARM.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoStop throwing exceptions for out-of-range accesses to CanvasArrays.
kbr@chromium.org [Fri, 23 Oct 2009 09:19:17 +0000 (09:19 +0000)]
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

14 years agoX64/Win64: Alternative implementation of fmod in general.
lrn@chromium.org [Fri, 23 Oct 2009 09:18:19 +0000 (09:18 +0000)]
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

14 years agoFix bug that meant that dependent tests were never reported as
erik.corry@gmail.com [Thu, 22 Oct 2009 19:09:09 +0000 (19:09 +0000)]
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

14 years agoFix lint errors.
kbr@chromium.org [Thu, 22 Oct 2009 15:21:00 +0000 (15:21 +0000)]
Fix lint errors.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3114 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdd optimized ICs for new CanvasArray types introduced in WebGL
kbr@chromium.org [Thu, 22 Oct 2009 14:49:00 +0000 (14:49 +0000)]
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

14 years agoThe runtime function DeclareGlobals is not called from JavaScript.
kmillikin@chromium.org [Thu, 22 Oct 2009 11:32:12 +0000 (11:32 +0000)]
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

14 years agoAdd --trace flag to fast compiler.
whesse@chromium.org [Thu, 22 Oct 2009 11:21:29 +0000 (11:21 +0000)]
Add --trace flag to fast compiler.
Review URL: http://codereview.chromium.org/306026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdded support for array literals to the toplevel compiler. They are
kmillikin@chromium.org [Thu, 22 Oct 2009 10:07:45 +0000 (10:07 +0000)]
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

14 years agoFast compiler support for regexp literals.
fschneider@chromium.org [Thu, 22 Oct 2009 09:29:03 +0000 (09:29 +0000)]
Fast compiler support for regexp literals.

For .result = /abc.*/g we generate the following IA-32 code:

   ...
   mov ebx,[edi+0x17]
   mov eax,[ebx+0xb]
   cmp eax, 0xf5d0e135         ;; object: 0xf5d0e135 <undefined>
   jnz done
   push ebx
   push 0x2
   push 0xf5d13805             ;; object: 0xf5d13805 <String[5]: abc.*>
   push 0xf5d13815             ;; object: 0xf5d13815 <String[1]: g>
   call RuntimeStub_MaterializeRegExpLiteral
 done:
   push eax
   pop [ebp+0xf4]
   ...

This is very similar to the code previously generated except we do not
generate deferred code for the case where we call the runtime.

On ARM we use the stm instruction to make pushing the arguments more compact.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdd "Version" command
peter.rybin@gmail.com [Wed, 21 Oct 2009 17:07:43 +0000 (17:07 +0000)]
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

14 years agoFix lint error.
kmillikin@chromium.org [Wed, 21 Oct 2009 15:37:14 +0000 (15:37 +0000)]
Fix lint error.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAllow resource constraints to specify the max committed new space size
ager@chromium.org [Wed, 21 Oct 2009 15:03:34 +0000 (15:03 +0000)]
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

14 years agoHeap profiler: guard calls to Producer profile.
mikhail.naganov@gmail.com [Wed, 21 Oct 2009 13:04:53 +0000 (13:04 +0000)]
Heap profiler: guard calls to Producer profile.

Patch by Steve Block.

TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3105 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoHeap profiler: use Heap::CommittedMemory to report the "total" memory size.
mikhail.naganov@gmail.com [Wed, 21 Oct 2009 12:39:45 +0000 (12:39 +0000)]
Heap profiler: use Heap::CommittedMemory to report the "total" memory size.

This is the second change to eliminate reporting >100% VM memory usage.

BUG=http://crbug/23623

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoUse WriteToFlat instead of to C strings methods as WriteToFlat performs notably
antonm@chromium.org [Wed, 21 Oct 2009 12:14:50 +0000 (12:14 +0000)]
Use WriteToFlat instead of to C strings methods as WriteToFlat performs notably
better for various kinds of strings.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3103 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoSupport empty statements in the fast compiler.
fschneider@chromium.org [Wed, 21 Oct 2009 11:56:05 +0000 (11:56 +0000)]
Support empty statements in the fast compiler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3102 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdd support for global variable references in toplevel code. We use
kmillikin@chromium.org [Wed, 21 Oct 2009 09:38:21 +0000 (09:38 +0000)]
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

14 years agoCommit fucomip change 197037 http://codereview.chromium.org/197037/show
whesse@chromium.org [Wed, 21 Oct 2009 09:24:25 +0000 (09:24 +0000)]
Commit fucomip change 197037 codereview.chromium.org/197037/show

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdding declaration of global variables and functions in new compiler.
fschneider@chromium.org [Wed, 21 Oct 2009 09:17:39 +0000 (09:17 +0000)]
Adding declaration of global variables and functions in new compiler.
Adding calls to global functions to the new compiler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoapplied patch
mikhail.naganov@gmail.com [Tue, 20 Oct 2009 23:25:05 +0000 (23:25 +0000)]
applied patch

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3098 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix buildbot breakage. Neglected to run tests with --verify-heap and
kbr@chromium.org [Tue, 20 Oct 2009 17:44:21 +0000 (17:44 +0000)]
Fix buildbot breakage. Neglected to run tests with --verify-heap and
missed case statements for heap verification and printing needed by
http://codereview.chromium.org/293023 .

tbr=plesner

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3097 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdded infrastructure for optimizing new CanvasArray types in WebGL
kbr@chromium.org [Tue, 20 Oct 2009 15:26:17 +0000 (15:26 +0000)]
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

14 years agoAdded support for assignments to global variables in the toplevel code
kmillikin@chromium.org [Tue, 20 Oct 2009 13:37:26 +0000 (13:37 +0000)]
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

14 years agoFix issue 475
sgjesse@chromium.org [Tue, 20 Oct 2009 12:13:31 +0000 (12:13 +0000)]
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

14 years agoA simple change to enable empty top-level function bodies in the
kmillikin@chromium.org [Tue, 20 Oct 2009 09:12:53 +0000 (09:12 +0000)]
A simple change to enable empty top-level function bodies in the
fast-mode compiler.  Support was already present, but disabled.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3091 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoVerify correctness of external string only if slow asserts are enabled.
antonm@chromium.org [Tue, 20 Oct 2009 09:10:26 +0000 (09:10 +0000)]
Verify correctness of external string only if slow asserts are enabled.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3090 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdd an API to V8 to get simple heap statistics.
ager@chromium.org [Tue, 20 Oct 2009 07:51:49 +0000 (07:51 +0000)]
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

14 years agoRecognize in the fast-mode code generator when a subexpression is a
kmillikin@chromium.org [Mon, 19 Oct 2009 10:36:42 +0000 (10:36 +0000)]
Recognize in the fast-mode code generator when a subexpression is a
constant known at compile time.  Do not ever use the stack to
materialize (non-function-argument) constants.  Currently, constants
are only the non-materialized, non-function literals in the AST.

It is a known issue that there is no test coverage for the cases of
assigning a non-literal to a variable and returning a literal.  Those
code paths are unreachable and tests will be added when they become
reachable.

For the code '.result = true', we had previously on ia32:

27  push 0xf5c28161             ;; object: 0xf5c28161 <true>
32  pop [ebp+0xf4]

Now:

27  mov eax,0xf5c26161          ;; object: 0xf5c26161 <true>
32  mov [ebp+0xf4],eax

======== We had previously on x64:

25  movq r10,0x7fb8c2f78199    ;; object: 0x7fb8c2f78199 <true>
35  push r10
37  pop [rbp-0x18]

Now:

25  movq r10,0x7fb131386199    ;; object: 0x7fb131386199 <true>
35  movq [rbp-0x18],r10

The generated code for ARM did not include the extra memory traffic.
It was already eliminated by the ARM assembler's push/pop elimination.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoRemove unused 'unsafe smi' code on x64.
kmillikin@chromium.org [Mon, 19 Oct 2009 07:54:39 +0000 (07:54 +0000)]
Remove unused 'unsafe smi' code on x64.
Review URL: http://codereview.chromium.org/293003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix mac x64 build.
antonm@chromium.org [Fri, 16 Oct 2009 15:00:45 +0000 (15:00 +0000)]
Fix mac x64 build.

BUG=472

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoMove implementation of Integer::NewFromUnsigned into api.cc.
antonm@chromium.org [Fri, 16 Oct 2009 12:51:18 +0000 (12:51 +0000)]
Move implementation of Integer::NewFromUnsigned into api.cc.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoDo not do post GC processing for scavenges.
antonm@chromium.org [Fri, 16 Oct 2009 12:11:59 +0000 (12:11 +0000)]
Do not do post GC processing for scavenges.

Typically there is no or few global handles to delete (only manually deleted, but those might be
reused).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoPreparing to push to trunk. Now working on 1.3.17.
christian.plesner.hansen@gmail.com [Fri, 16 Oct 2009 11:33:39 +0000 (11:33 +0000)]
Preparing to push to trunk.  Now working on 1.3.17.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoRemove dependency on V8_TARGET_ARCH in v8.h
lrn@chromium.org [Fri, 16 Oct 2009 10:29:10 +0000 (10:29 +0000)]
Remove dependency on V8_TARGET_ARCH in v8.h

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3080 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoDo not visit slots in the top-level code generator's backend.
kmillikin@chromium.org [Fri, 16 Oct 2009 09:46:09 +0000 (09:46 +0000)]
Do not visit slots in the top-level code generator's backend.

Slots appear only indirectly in the AST (through variables linked to
variable proxies).  Slots are shared among variable references, so
putting compilation-time state on them is potentially a source of
bugs.  Avoid it for now.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoRemove stray debugging code with no effect or explanation from RelocIterator.
whesse@chromium.org [Fri, 16 Oct 2009 09:31:03 +0000 (09:31 +0000)]
Remove stray debugging code with no effect or explanation from RelocIterator.
Review URL: http://codereview.chromium.org/287003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoRedo "running" field in debug-delay.js and support "suspend" command
peter.rybin@gmail.com [Thu, 15 Oct 2009 20:06:08 +0000 (20:06 +0000)]
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

14 years agoAdded first support for tracking locations of expressions in the
kmillikin@chromium.org [Thu, 15 Oct 2009 16:42:22 +0000 (16:42 +0000)]
Added first support for tracking locations of expressions in the
fast-mode code generator.

AST expression nodes are annotated with a location when doing the
initial syntactic check of the AST.  In the current implementation,
expression locations are 'temporary' (ie, allocated to the stack) or
'nowhere' (ie, the expression's value is not needed though it must be
evaluated for side effects).

For the assignment '.result = true' on IA32, we had before (with the
true value already on top of the stack):

32  mov eax,[esp]
35  mov [ebp+0xf4],eax
38  pop eax

Now:

32  pop [ebp+0xf4]

======== On x64, before:

37  movq rax,[rsp]
41  movq [rbp-0x18],rax
45  pop rax

Now:

37  pop [rbp-0x18]

======== On ARM, before (with the true value in register ip):

36  str ip, [sp, #-4]!
40  ldr ip, [sp, #+0]
44  str ip, [fp, #-12]
48  add sp, sp, #4

Now:

36  str ip, [fp, #-12]

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoRecord statement positions for the debugger in the fast code generator.
fschneider@chromium.org [Thu, 15 Oct 2009 15:27:37 +0000 (15:27 +0000)]
Record statement positions for the debugger in the fast code generator.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoUntangle some #include dependencies.
kmillikin@chromium.org [Thu, 15 Oct 2009 15:01:36 +0000 (15:01 +0000)]
Untangle some #include dependencies.

"jsregexp.h" and "jump-target.h" required "macro-assembler.h" to
always be included first.  Instead the include of "macro-assembler.h"
has moved into those header files.

"dateparser-inl.h" required "dateparser.h" to always be included
first.  Instead the include of "dateparser.h" has moved into
"dateparser-inl.h".

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoInitial port of top-level code generator to ARM. For the constant
kmillikin@chromium.org [Thu, 15 Oct 2009 12:42:16 +0000 (12:42 +0000)]
Initial port of top-level code generator to ARM.  For the constant
true at the top level we generate:

  0  stmdb sp!, {r1, r8, fp, lr}
  4  add fp, sp, #8
  8  ldr ip, [r10, #+4]
 12  ldr r2, [r10, #+0]
 16  str ip, [sp, #-4]!
 20  add lr, pc, #4
 24  cmp sp, r2
 28  ldrcc pc, [pc, #+68]        ;; code: STUB, StackCheck, minor: 0
 32  ldr ip, [pc, #+68]          ;; object: 0xf5bc4161 <true>
 36  str ip, [sp, #-4]!
 40  ldr ip, [sp, #+0]
 44  str ip, [fp, #-12]
 48  add sp, sp, #4
 52  ldr ip, [fp, #-12]
 56  str ip, [sp, #-4]!
 60  ldr r0, [sp], #+4
 64  mov sp, fp                  ;; js return
 68  ldmia sp!, {fp, lr}
 72  add sp, sp, #4
 76  bx lr
 80  ldr r0, [r10, #+4]
 84  mov sp, fp                  ;; js return
 88  ldmia sp!, {fp, lr}
 92  add sp, sp, #4
 96  bx lr
100  constant pool begin
104  constant
108  constant

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3073 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix X64 build in the case that debugger support is disabled. Change function name...
whesse@chromium.org [Thu, 15 Oct 2009 11:52:53 +0000 (11:52 +0000)]
Fix X64 build in the case that debugger support is disabled.  Change function name from IsCallInstruction to IsPatchedReturnSequence on all platforms.
Review URL: http://codereview.chromium.org/267116

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3072 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoPort the initial fast code generator to x64. For the constant true in
kmillikin@chromium.org [Thu, 15 Oct 2009 11:21:26 +0000 (11:21 +0000)]
Port the initial fast code generator to x64.  For the constant true in
top-level code we generate:

 0  push rbp
 1  movq rbp,rsp
 4  push rsi
 5  push rdi
 6  push [r13+0x8]
10  cmpq rsp,[r13+0x0]
14  jnc 25  (0x7ff2c378ff19)
20  call 0x7ff2c377d260     ;; code: STUB, StackCheck, minor: 0
25  movq r10,0x7ff2e8608199    ;; object: 0x7ff2e8608199 <true>
35  push r10
37  movq rax,[rsp]
41  movq [rbp-0x18],rax
45  pop rax
46  push [rbp-0x18]
50  pop rax
51  movq rsp,rbp      ;; js return
54  pop rbp
55  ret 0x8
58  int3
59  int3
60  int3
61  int3
62  int3
63  int3
64  movq rax,[r13+0x8]
68  movq rsp,rbp      ;; js return
71  pop rbp
72  ret 0x8
75  int3
76  int3
77  int3
78  int3
79  int3
80  int3

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFormat the long lists of sources in the SConscript file to be one per
kmillikin@chromium.org [Thu, 15 Oct 2009 08:22:24 +0000 (08:22 +0000)]
Format the long lists of sources in the SConscript file to be one per
line.  This is to make it easier to add and remove sources without
having to reformat line breaks.  It also enables sorting with M-x
sort-lines (in emacs) or the like.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdd initial semi-working producers profile.
mikhail.naganov@gmail.com [Thu, 15 Oct 2009 07:50:23 +0000 (07:50 +0000)]
Add initial semi-working producers profile.

Turned on with '--log-producers' flag, also needs '--noinline-new' (this is temporarily), '--log-code', '--log-gc'. Not all allocations are traced (I'm investigating.)

Stacks are stored using weak handles. Thus, when an object is collected, its allocation stack is deleted.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3069 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix GYP-based builds of V8.
kmillikin@chromium.org [Wed, 14 Oct 2009 19:47:22 +0000 (19:47 +0000)]
Fix GYP-based builds of V8.

TBR=iposva@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoInitial infrastructure for fast compilation of top-level code. The
kmillikin@chromium.org [Wed, 14 Oct 2009 19:30:50 +0000 (19:30 +0000)]
Initial infrastructure for fast compilation of top-level code.  The
fast code generator is optimized for compilation time and code size.

Currently it is only implemented on IA32.  It is potentially triggered
for any code in the global scope (including code eval'd in the global
scope).  It performs a syntactic check and chooses to compile in fast
mode if the AST contains only supported constructs and matches some
other constraints.

Initially supported constructs are

* ExpressionStatement,
* ReturnStatement,
* VariableProxy (variable references) to parameters and
    stack-allocated locals,
* Assignment with lhs a parameter or stack-allocated local, and
* Literal

This allows compilation of literals at the top level and not much
else.

All intermediate values are allocated to temporaries and the stack is
used for all temporaries.  The extra memory traffic is a known issue.

The code generated for 'true' is:

 0  push ebp
 1  mov ebp,esp
 3  push esi
 4  push edi
 5  push 0xf5cca135             ;; object: 0xf5cca135 <undefined>
10  cmp esp,[0x8277efc]
16  jnc 27  (0xf5cbbb1b)
22  call 0xf5cac960             ;; code: STUB, StackCheck, minor: 0
27  push 0xf5cca161             ;; object: 0xf5cca161 <true>
32  mov eax,[esp]
35  mov [ebp+0xf4],eax
38  pop eax
39  mov eax,[ebp+0xf4]
42  mov esp,ebp                 ;; js return
44  pop ebp
45  ret 0x4
48  mov eax,0xf5cca135          ;; object: 0xf5cca135 <undefined>
53  mov esp,ebp                 ;; js return
55  pop ebp
56  ret 0x4

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years ago- Add String::Concat(Handle<String> left, Handle<String> right) to the V8 API.
iposva@chromium.org [Wed, 14 Oct 2009 15:26:38 +0000 (15:26 +0000)]
- 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

14 years agoAdd comment to compilation-cache.cc explaining choice of 5 generations.
whesse@chromium.org [Wed, 14 Oct 2009 15:01:25 +0000 (15:01 +0000)]
Add comment to compilation-cache.cc explaining choice of 5 generations.
Review URL: http://codereview.chromium.org/267092

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3065 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoPartially revert r2761.
antonm@chromium.org [Wed, 14 Oct 2009 14:32:39 +0000 (14:32 +0000)]
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

14 years agoFixed use of 'overwrite' flag for unary minus expressions.
fschneider@chromium.org [Wed, 14 Oct 2009 13:12:38 +0000 (13:12 +0000)]
Fixed use of 'overwrite' flag for unary minus expressions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoSkip access checks for hidden properties.
vitalyr@chromium.org [Wed, 14 Oct 2009 11:19:55 +0000 (11:19 +0000)]
Skip access checks for hidden properties.

Hidden properties are used like internal fields which do not have
access checks. The checks can cause problems because there may be no
current context. See http://crbug.com/24200.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoNew mjsunit tests for the new compiler infrastructure. They
fschneider@chromium.org [Wed, 14 Oct 2009 10:24:50 +0000 (10:24 +0000)]
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

14 years agoImplement ES5 Array.isArray
christian.plesner.hansen@gmail.com [Wed, 14 Oct 2009 09:42:13 +0000 (09:42 +0000)]
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

14 years agoFix overflow in failure "requested size" field.
lrn@chromium.org [Wed, 14 Oct 2009 09:26:16 +0000 (09:26 +0000)]
Fix overflow in failure "requested size" field.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3059 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoA follow-up to r3009: add parentheses around one more anonymous function.
mikhail.naganov@gmail.com [Tue, 13 Oct 2009 15:17:24 +0000 (15:17 +0000)]
A follow-up to r3009: add parentheses around one more anonymous function.

TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3058 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoCheck that constructor is a FunctionMirror before calling .name(), otherwise we may...
yurys@chromium.org [Tue, 13 Oct 2009 14:28:09 +0000 (14:28 +0000)]
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

14 years agoX64: Fix bugs affecting Win64.
lrn@chromium.org [Tue, 13 Oct 2009 10:56:13 +0000 (10:56 +0000)]
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

14 years agoRemove a redundant field in the FunctionLiteral class. The boolean
kmillikin@chromium.org [Tue, 13 Oct 2009 09:37:17 +0000 (09:37 +0000)]
Remove a redundant field in the FunctionLiteral class.  The boolean
contains_array_literal_ implies materialized_literal_count_ > 0, and
we appear not to need to know about array literals specifically.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoUse the USE_ARM_EABI macro consistently rather than the gcc-specific
erik.corry@gmail.com [Tue, 13 Oct 2009 08:58:24 +0000 (08:58 +0000)]
Use the USE_ARM_EABI macro consistently rather than the gcc-specific
__ARM_EABI__ macro to determine the ABI on ARM.
Review URL: http://codereview.chromium.org/274016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFixed trim test failure.
christian.plesner.hansen@gmail.com [Tue, 13 Oct 2009 08:29:19 +0000 (08:29 +0000)]
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

14 years agoAdd trim, trimLeft and trimRight methods to String
christian.plesner.hansen@gmail.com [Tue, 13 Oct 2009 08:13:45 +0000 (08:13 +0000)]
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

14 years agoInitial implementation of printing the AST as a JSON string. This
kmillikin@chromium.org [Mon, 12 Oct 2009 15:06:28 +0000 (15:06 +0000)]
Initial implementation of printing the AST as a JSON string.  This
implementation is not yet complete (it prints only the node name for
some AST constructs) and does not serialize everything needed to
reconstitute the AST.

It is motivated by a desire to prototype source-to-source
transformations in JavaScript itself (or anything else that can grok
JSON), but it should have other uses too.

Feedback is welcome.
Review URL: http://codereview.chromium.org/131101

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdd a pair of missing breaks to a switch statement.
kmillikin@chromium.org [Mon, 12 Oct 2009 14:00:11 +0000 (14:00 +0000)]
Add a pair of missing breaks to a switch statement.
Review URL: http://codereview.chromium.org/267050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoChange sscanf to atoi in test-debug.cc to make lint happy.
whesse@chromium.org [Mon, 12 Oct 2009 13:55:06 +0000 (13:55 +0000)]
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

14 years agoSplit the AST LoopStatement type into separate types for do/while,
kmillikin@chromium.org [Mon, 12 Oct 2009 13:14:06 +0000 (13:14 +0000)]
Split the AST LoopStatement type into separate types for do/while,
while, and for loops.

Previously they were distinguished by a type field, which required
runtime asserts to avoid invalid nodes (since not all loop types have
the same internal structure).  Now they C++ type system is used to
require well-formed loop ASTs.

Because they do not share compilation code, we had very large
functions in the code generators that merely did a runtime dispatch to
a specific implementation based on the type.
Review URL: http://codereview.chromium.org/269049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoChanges to comments only, fixing errors and grammar.
whesse@chromium.org [Mon, 12 Oct 2009 12:42:20 +0000 (12:42 +0000)]
Changes to comments only, fixing errors and grammar.
Review URL: http://codereview.chromium.org/269050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoRemoved 31-bit smis.
lrn@chromium.org [Mon, 12 Oct 2009 11:19:20 +0000 (11:19 +0000)]
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

14 years ago- Update Xcode project.
iposva@chromium.org [Sat, 10 Oct 2009 00:38:44 +0000 (00:38 +0000)]
- Update Xcode project.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoMake cctest test-debug.cc more accurate
peter.rybin@gmail.com [Fri, 9 Oct 2009 16:27:47 +0000 (16:27 +0000)]
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

14 years agoAdd missing null check in Context::GetCurrent.
ager@chromium.org [Fri, 9 Oct 2009 08:21:56 +0000 (08:21 +0000)]
Add missing null check in Context::GetCurrent.
Review URL: http://codereview.chromium.org/272007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoGet rid of JSExitStub which is no longer used anywhere.
sgjesse@chromium.org [Thu, 8 Oct 2009 15:10:14 +0000 (15:10 +0000)]
Get rid of JSExitStub which is no longer used anywhere.
Review URL: http://codereview.chromium.org/268016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoOptimize calls to GenericBinaryStub.
sgjesse@chromium.org [Thu, 8 Oct 2009 14:27:46 +0000 (14:27 +0000)]
Optimize calls to GenericBinaryStub.

The calls to GenericBinaryStub can now pass the arguments in registers instead of on the stack. It is supported for ADD, SUB, MUL and DIV. The convention in GenericBinaryStub is not changed so the left operand is passed in edx and the right one in eax. When the stub contains smi code arguments are always passed on the stack as the smi code has to have left and right operands on eax and ebx, so moving from edx,eax to eax,ebx is not worth it and the smi code also trashes the registers so if arguments where passed in registers they would have to be saved on the stack anyway.

Added flags to disable the use of certain Intel CPU features to make it easier to test different code paths.
Review URL: http://codereview.chromium.org/246075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3041 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdd support for comisd and cmov in IA-32 disassembler.
sgjesse@chromium.org [Thu, 8 Oct 2009 13:28:46 +0000 (13:28 +0000)]
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

14 years agoX64: Fix incompatability with previous revision.
lrn@chromium.org [Thu, 8 Oct 2009 13:09:28 +0000 (13:09 +0000)]
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

14 years agoIntroduce v8::Integer::NewFromUnsigned method.
antonm@chromium.org [Thu, 8 Oct 2009 12:54:29 +0000 (12:54 +0000)]
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

14 years agoX64: Convert smis to holding 32 bits of payload.
lrn@chromium.org [Thu, 8 Oct 2009 12:36:12 +0000 (12:36 +0000)]
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

14 years agoGuard the debug check at the start of every JS function with
kmillikin@chromium.org [Thu, 8 Oct 2009 11:49:58 +0000 (11:49 +0000)]
Guard the debug check at the start of every JS function with
--debug-code so it is not normally compiled in debug builds.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoGet rid of unused label varaible.
sgjesse@chromium.org [Thu, 8 Oct 2009 08:53:09 +0000 (08:53 +0000)]
Get rid of unused label  varaible.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix a file name in the Visual Studio project files.
sgjesse@chromium.org [Thu, 8 Oct 2009 07:10:10 +0000 (07:10 +0000)]
Fix a file name in the Visual Studio project files.
Review URL: http://codereview.chromium.org/266004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoChange clamping 0..255 instruction sequence for pixel array code.
sgjesse@chromium.org [Thu, 8 Oct 2009 07:09:46 +0000 (07:09 +0000)]
Change clamping 0..255 instruction sequence for pixel array code.

The subb instruction added to the IA-32 assembler is not used as dec_b ended up being used instead.

There is a mesurable difference.
Review URL: http://codereview.chromium.org/246076

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3033 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdded command line flag --sync_with_push (default: true) to
fschneider@chromium.org [Wed, 7 Oct 2009 14:55:41 +0000 (14:55 +0000)]
Added command line flag --sync_with_push (default: true) to
emit 'push' instead of 'sub esp, xxx' followed by 'mov' instructions
Reduces generated code size by 10-15% on several benchmarks.
Done on ia32 and x64 (no sync operation in the virtual frame on ARM
architecture)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3032 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoPrepare push to trunk. Now working on version 1.3.16.
sgjesse@chromium.org [Wed, 7 Oct 2009 13:42:24 +0000 (13:42 +0000)]
Prepare push to trunk. Now working on version 1.3.16.
Review URL: http://codereview.chromium.org/267004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoDouble the CodeRange on X64 to 512 MB.
whesse@chromium.org [Wed, 7 Oct 2009 12:47:49 +0000 (12:47 +0000)]
Double the CodeRange on X64 to 512 MB.
Review URL: http://codereview.chromium.org/265006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoFix a crash in Logger::LogCompiledFunctions due to a presence of scripts with dispose...
mikhail.naganov@gmail.com [Wed, 7 Oct 2009 12:20:02 +0000 (12:20 +0000)]
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

14 years agoAdd missing newline to ChangeLog.
sgjesse@chromium.org [Wed, 7 Oct 2009 09:15:34 +0000 (09:15 +0000)]
Add missing newline to ChangeLog.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoPrepare push to trunk. Now working on version 1.3.15.
sgjesse@chromium.org [Wed, 7 Oct 2009 07:24:51 +0000 (07:24 +0000)]
Prepare push to trunk. Now working on version 1.3.15.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoClean up fixups of calls to builtins. Fix lint error.
whesse@chromium.org [Tue, 6 Oct 2009 13:59:56 +0000 (13:59 +0000)]
Clean up fixups of calls to builtins.  Fix lint error.
Review URL: http://codereview.chromium.org/259057

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

14 years agoAdd near calls (32-bit displacement) to Code objects on X64 platform.
whesse@chromium.org [Tue, 6 Oct 2009 13:11:05 +0000 (13:11 +0000)]
Add near calls (32-bit displacement) to Code objects on X64 platform.
Review URL: http://codereview.chromium.org/200095

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3021 ce2b1a6d-e550-0410-aec6-3dcde31c8c00