Commit Graph

210 Commits

Author SHA1 Message Date
sgjesse@chromium.org
b0bc50aa85 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
2009-10-08 08:53:09 +00:00
sgjesse@chromium.org
cab2794e95 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
2009-10-08 07:09:46 +00:00
fschneider@chromium.org
6a949119eb 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
2009-10-07 14:55:41 +00:00
whesse@chromium.org
d9dd84d5e4 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
2009-10-06 13:59:56 +00:00
whesse@chromium.org
cc0c626d70 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
2009-10-06 13:11: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
sgjesse@chromium.org
f054b56eca Add pixel array handling in keyed IC's for x64 version.
Review URL: http://codereview.chromium.org/251041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-30 20:18:40 +00:00
kmillikin@chromium.org
2c2554ec3c Remove obsolete support for an experimental multipass compiler.
Review URL: http://codereview.chromium.org/255022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2996 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-30 13:24:24 +00:00
sgjesse@chromium.org
b1a5bf4c5d Change the functions named AllocateObjectInNewSpace to AllocateInNewSpace.
These functions just moves forward the new space allocation top, and in some situations they are used to reserve space for several objects.
Review URL: http://codereview.chromium.org/219030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-30 09:24:46 +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
kmillikin@chromium.org
928bfae405 Remove CallEval as a subclass of the Call AST node type. We were not
differentiating between Call and CallEval except in the code
generator, and the difference can be detected from a regular Call AST
node at code generation time.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2984 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-29 13:28:30 +00:00
sgjesse@chromium.org
6f83ad58cc Compile without debugger support in debug mode
This makes it possible to build V8 without JavaScript debugging support in debug mode.

BUG=http://code.google.com/p/v8/issues/detail?id=454
Review URL: http://codereview.chromium.org/242048

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

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

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

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

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

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

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

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

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2908 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-17 07:14:48 +00:00
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
lrn@chromium.org
88e732edbc Fix bug that errnoeously sets FPU exception.
This has only been caught on Win64 yet.

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


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

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

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

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

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

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

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

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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2869 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-10 12:55:27 +00:00
whesse@chromium.org
cf37189c65 Use SSE2 instructions when available on ia32 platform.
Review URL: http://codereview.chromium.org/197057

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

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

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

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

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

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


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

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

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

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-02 06:17:59 +00:00
whesse@chromium.org
f77d7aab55 X64: Fix bug introduced in revision 2779
Review URL: http://codereview.chromium.org/180040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2787 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-31 15:28:17 +00:00
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
94c0539052 Add allocation support to x64 macro assembler.
Factored out the allocation in new space from assembler code into the macro assembler for x64 as was recently done for ia32.

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

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

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

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

instead of

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

and pre-submit fixes as well.

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2768 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-27 07:24:03 +00:00
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
3fdbc0848c Reverting 2753.
Review URL: http://codereview.chromium.org/173349

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

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

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

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2705 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-18 09:47:45 +00:00