Commit Graph

344 Commits

Author SHA1 Message Date
kmillikin@chromium.org
d0fcbb4ece Simplify include dependencies.
Try to make sure that accessors.h, data-flow.h, list-inl.h, and
scopeinfo.h are included only where needed, but without introducing
implicit dependencies.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 08:23:58 +00:00
sgjesse@chromium.org
01707c7106 ARM: Changed the handling of compiletime CPU feature detection
Always use CpuFeaturesImpliedByCompiler() when selecting CPU features. This checks both for CAN_USE_ARMV7_INSTRUCTIONS and CAN_USE_VFP_INSTRUCTIONS and for GCC preprocessor symbols. This will support using the CAN_USE_XXX for a simulator build used for generating a snapshot followed by a crosscompile using -march= and -mfpu= for selecting the (minimal) target device CPU features. The snapshot will use instructions based on the CAN_USE_XXX whereas the target will at least use features based on both CAN_USE_XXX and -march= and -mfpu=, but will try runtime CPU feature detection a well looking for somethis better.

Remove the compiler based CPU feature detection from the OS::CpuFeaturesImpliedByPlatform() as it did not belong there. Also was already in the CpuFeaturesImpliedByCompiler().

Add the variable 'v8_can_use_vfp_instructions' to the GYP file which can be used to turn on CAN_USE_VFP_INSTRUCTIONS when building V8. I did not add any -mfpu= cflags for this, as there are several options here (e.g. vfp and neon).

R=erik.corry@gmail.com, karlklose@chromium.org

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 06:51:59 +00:00
ager@chromium.org
4f8dc51e34 Make component=shared_library gyp build work for Linux.
Review URL: http://codereview.chromium.org/6902128

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-02 15:06:49 +00:00
mikhail.naganov@gmail.com
ec58c05f4e Add support for startup data (snapshot) compression.
This is for mobile platforms where application footprint size is
important. To avoid including compression libraries into V8, we assume
that the host machine have them (true for Linux), and rely on embedder
to provide decompressed data.

Currently, only snapshot data can be comressed. It is also possible to
compress libraries sources, but it is more involved and will be
addressed in another CL.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7724 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 12:08:33 +00:00
ager@chromium.org
5fd4fa2a9e Introduce experimental natives that are enabled by a runtime flag.
Clean up the use of js2c. We generated two identical files.

R=sgjesse@chromium.org,rossberg@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-15 12:31:03 +00:00
ager@chromium.org
02bf484bb5 Fix v8.gyp.
R=kmillikin@chromium.org
BUG=
TEST=
TBR=

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7546 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 15:02:38 +00:00
vitalyr@chromium.org
7a74560fcc Fast TLS support on mac.
Review URL: http://codereview.chromium.org/6724028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7377 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-27 18:40:48 +00:00
vitalyr@chromium.org
963a75cc09 Fast TLS support.
This patch adds common infrastructure for fast TLS support and
implementation on win32. More implementations will be added soon.

Fast TLS is controlled by V8_FAST_TLS define which is enabled by
default in our gyp and scons builds. The scons build has
fasttls={on,off} option so that we can see the effects of slow TLS
when needed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-27 16:14:20 +00:00
sgjesse@chromium.org
b05152a2a4 Make V8 build with the chromium shared library build
Fix the shell to not use functions from the v8::internal namespace when building with V8 in a shared library.

Remove the v8_preparser library. The dependencies for this target needs to be resolved after isolates have landed.
Review URL: http://codereview.chromium.org/6696067

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7337 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-24 10:54:23 +00:00
vitalyr@chromium.org
1dc8f7edb3 Store HValue uses in a custom small list structure.
This saves about 700K of zone allocation when compiling the V8
benchmark suite.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7330 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-23 14:44:19 +00:00
sgjesse@chromium.org
63867eea60 Rename memory.h to v8memory.h
This is to avoid name collision with system include file named memory.h causing problems on some platforms.
Review URL: http://codereview.chromium.org/6716020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-22 11:50:39 +00:00
vitalyr@chromium.org
7976ca2cbc Merge isolates to bleeding_edge.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 20:35:07 +00:00
vitalyr@chromium.org
76e226f832 Revert r7268: it borked the history.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 19:41:05 +00:00
vitalyr@chromium.org
6ff7fdebd3 Merge isolates to bleeding_edge.
Review URL: http://codereview.chromium.org/6685088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 18:49:56 +00:00
whesse@chromium.org
3245a23de0 ARM: Port new version of ParallelMove's GapResolver to ARM. Fix error in vstr(DoubleRegister, MemOperand), where it was implemented as a vldr, in r6830.
Review URL: http://codereview.chromium.org/6311010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6839 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-17 15:25:38 +00:00
mikhail.naganov@gmail.com
efe7129277 removed
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-11 12:25:41 +00:00
fschneider@chromium.org
17da434b29 Remove instruction summaries.
Instead of constructing a temporary container for all LOperands of each
instruction, the register works directly on the LIR instructions that
 provide an abstract interface for input/output/temp operands.

This saves allocation of zone memory and speeds up LIR construction,
but makes iterating over all uses in the register allocator slightly
more expensive because environment uses are stored in a linked list of
environments. We can fix this by using a flat representation of LOperands.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 13:28:23 +00:00
whesse@chromium.org
6c650cf1c2 Disable MSVC warning that default array initializers now work properly.
Review URL: http://codereview.chromium.org/6272017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 11:25:30 +00:00
whesse@chromium.org
136db7b861 Port new version of ParallelMove's LGapResolver to X64.
Review URL: http://codereview.chromium.org/6366003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 10:10:36 +00:00
sgjesse@chromium.org
198bcbaa13 Adding build script changes to support LiveObjectList functionality.
Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 08:38:01 +00:00
kmillikin@chromium.org
437914da90 Change the algorithm and generated code for parallel moves on IA32.
Instead of spilling and then immediately restoring eax to resolve
memory to memory moves, the gap move resolver now tracks registers
that are known to be free and uses one if available.  If not it spills
but restores lazily when the spilled value is needed or at the end of
the algorithm.

Instead of using esi for resolving cycles and assuming it is free to
overwrite because it can be rematerialized, the gap move resolver now
resolves cycles using swaps, possibly using a free register as above.

The algorithm is also changed to be simpler: a recursive depth-first
traversal of the move dependence graph.  It uses a list of moves to be
performed (because it mutates the moves themselves), but does not use
any auxiliary structure other than the control stack.  It does not
build up a separate list of scheduled moves to be interpreted by the
code generate, but emits code on the fly.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-17 11:25:36 +00:00
whesse@chromium.org
5d3432b530 Add source file lithium-codegen-x64.cc. Add class declarations to lithium-codegen-x64.h.
Review URL: http://codereview.chromium.org/6135008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 12:24:18 +00:00
whesse@chromium.org
7c94bf13b9 Create platform-independent lithium files, move LGapResolver and LGapNode there
Review URL: http://codereview.chromium.org/6121001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6221 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 11:49:22 +00:00
whesse@chromium.org
3055ca216d Add private members to lithium classes on X64. Add implementation file lithium-x64.cc.
Review URL: http://codereview.chromium.org/6015014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6178 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 12:31:31 +00:00
sgjesse@chromium.org
f95f295dcb Add use_system_v8 option to gyp (off by default),
as discussed in http://groups.google.com/group/v8-users/browse_thread/thread/33a69c51d8023ced

This will make it easier for Linux distributions
to ship with system-provided V8 library.

Patch by Pawel Hajdan, Jr. <phajdan.jr@chromium.org>

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6153 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 12:14:10 +00:00
sgjesse@chromium.org
716e6282e9 Refactoring out object printing functions into objects-printer.cc.
Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-22 13:04:47 +00:00
sgjesse@chromium.org
e21d76a0e3 1. Added support for object printing for release mode using the
objectprint=on (defaults to off) option (which defines OBJECT_PRINT).
2. Added the ability to print objects to a specified file instead of
   just stdout.
3. Added a use_verbose_printer flag (true by default) to allow some
   object printouts to be less verbose when the flag is false.
4. Fixed a bug in VSNPrintF() where it can potentially write into an
   empty char vector.

Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6080 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 10:38:19 +00:00
ager@chromium.org
02382a6d57 Fix 'Optimizations' typo in gyp file.
BUG=http://code.google.com/p/v8/issues/detail?id=998
Review URL: http://codereview.chromium.org/5970001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6059 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 07:52:20 +00:00
sgjesse@chromium.org
d9c202752e Initial attempt to add support for using gyp to build V8 itself
This is based on the structore used in chromium with a script wrapping the call to gyp itself and the default processing of common.gypi.

It is possible to build all our targets on Intel Linux for all architectures (ia32, x64 and ARM simulator). When this is committed I wil take a look at Windows.

See the README.txt file in the changelist for the current way of using it.
Review URL: http://codereview.chromium.org/5701001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-14 08:16:39 +00:00
lrn@chromium.org
79a311cd19 Add gyp target to build preparser as stand-alone library.
Likely only works on Linux yet.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5965 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-10 12:58:18 +00:00
ricow@chromium.org
b6a9cc1c1c Fix arm gyp files, lithium files where not added.
Review URL: http://codereview.chromium.org/5558009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 15:47:17 +00:00
kasperl@chromium.org
90b3370374 Update V8 to version 3.0 (re-land r5920).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 11:31:57 +00:00
kasperl@chromium.org
51b494d096 Revert r5920. Will re-land shortly.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 11:01:02 +00:00
kasperl@chromium.org
e5860bd6a8 Update V8 to version 3.0.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 09:11:56 +00:00
lrn@chromium.org
0c60c88c2c Working stand-alone preparser.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5885 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-24 09:57:06 +00:00
lrn@chromium.org
3dda6c496f Added files to gyp-config.
Review URL: http://codereview.chromium.org/5276004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5878 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-23 12:11:07 +00:00
floitschV8@gmail.com
1fafbe760d Remove Gay's dtoa from sources.
Farewell.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-22 14:42:07 +00:00
floitschV8@gmail.com
7ac932c088 Add bignum fall-back when the fast dtoa doesn't succeed. This removes Gay's dtoa for the double->string direction. We still need it for the string->double direction.
Review URL: http://codereview.chromium.org/3468003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-17 13:20:44 +00:00
ager@chromium.org
a24d627598 Extract extensions to a separate directory.
Remove extensions from the external reference table. They should never
be part of the serialized code.

Create extensions/experimental subdirectory for experimental
extensions not officially supported by V8.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-17 12:28:30 +00:00
floitschV8@gmail.com
0c200bec48 Remove bignum-dtoa.{cc, h} from gyp file.
Review URL: http://codereview.chromium.org/4673002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5788 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-08 15:37:11 +00:00
floitschV8@gmail.com
808d00f8ef Bignum implementation of Strtod.
This removes the dependency on Gay's strtod.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-08 11:49:47 +00:00
lrn@chromium.org
f386f97476 Move part of scanner.* into scanner-base.* for reuse in preparser scanner.
Make checks.h not depend on flags.h or global.h (or anything else except
include/v8stdint.h). Only checks.cc has the dependencies (so another
implementation of checks.cc can be provided by the preparser).
Now files depending on checks.h (using ASSERT macros) can include it
directly without depending on all of v8.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-05 13:33:40 +00:00
ager@chromium.org
08da2bd6fb Remove vm-state.cc from build files. Forgot to do that when
removing the file from the repository.
Review URL: http://codereview.chromium.org/3950001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-20 06:47:49 +00:00
floitschV8@gmail.com
f5ea94da69 Simplify powers-of-ten cache.
The existing cache was build to support changes to fast-dtoa. This complicated the cache. Since the cached numbers are now in a .cc file they can be shared with other parts of v8.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-07 13:02:36 +00:00
floitschV8@gmail.com
caf6856ade Move gay_strtod outside conversions.cc.
This is the first part of removing calls to gay's strtod. Future CLs will
get rid of calls to gay_strtod entirely.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-07 08:54:10 +00:00
lrn@chromium.org
2c85faf1ae Refactored string search code.
Made string search state explicit for repreated calls (a StringSearch class).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-29 10:57:23 +00:00
whesse@chromium.org
82309445ad Move code stub implementations from codegen-[platform].cc files to new code-stub-[platform].cc files, and declarations to new code-stub-[platform].h files.
Remaining work is to do the same for platform-independent code stub declarations, and to remove all dependencies on codegen header files from code stub files.
Review URL: http://codereview.chromium.org/3195022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-25 09:44:44 +00:00
kasperl@chromium.org
7b51dc7edb Cleanup the AST code by removing unused parts and get rid of the
flow graph code completely. Add new AST node for null compares
and use it to make the full codegens better at generating code
for null comparisons.
Review URL: http://codereview.chromium.org/3146037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-24 07:26:49 +00:00
ager@chromium.org
3e936b547a Remove experimental fast-codegen. We are no longer working on this
approach.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-13 09:07:09 +00:00
vegorov@chromium.org
7e167a9585 Add object-visiting.cc into GYP/XCode/MSVC project files.
Review URL: http://codereview.chromium.org/3166008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5248 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-11 15:18:01 +00:00
lrn@chromium.org
abcf1012c6 Allow compiling with strict aliasing enabled on GCC 4.4.
Patch by Jay Freeman.
Fixes issue 463.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5237 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-11 10:52:34 +00:00
ager@chromium.org
adc2ff755d Land for Victor Wang.
Add direct_dependent_settings for v8 dll so targets that depend on v8
has USING_V8_SHARED defined.

Review URL: http://codereview.chromium.org/2946014/show

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-20 05:51:10 +00:00
ager@chromium.org
a835641dee Landing for victorw@chromium.org.
Fix issues so v8 could be built as a DLL.

-. get rid of all the compiler warning by moving dllexport/dllimport
to the individual members for classes which have inline members.

-. update v8 gyp to build v8.dll for chromium multi-dll version (win
and component==shared_library)

Note: most of the code are contributed by sjesse.

Code review URL: http://codereview.chromium.org/2882009/show

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-02 07:39:42 +00:00
mikhail.naganov@gmail.com
decd0fed78 CPU profiler: make code events handling scalable.
I changed the implementation of a queue between the VM and processor
thread to be unbounded and lock-free, using Herb Sutter's example from
DDJ article: http://www.ddj.com/high-performance-computing/210604448
This had brought back profiling overhead to a minimum for the page
from Chromium's issue 16184.

BUG=714

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-22 05:27:19 +00:00
mark@chromium.org
e9b5d7855b Allow build-time selection between ia32 and x86_64 in the GYP/Xcode Mac
Chromium build.

v8.gyp no longer sets any V8_TARGET_ARCH_* macro on the Mac. Instead, the
proper V8_TARGET_ARCH_* macro will be set by src/globals.h in the same way as
the V8_HOST_ARCH_* macro when it detects that no target macro is currently
defined. The Mac build will attempt to compile all ia32 and x86_64 .cc files.
#ifdef guards in each of these target-specific source files prevent their
compilation when the associated target is not selected. For completeness,
these #ifdef guards are also provided for the arm and mips .cc files.

BUG=706
TEST=x86_64 Mac GYP/Xcode-based Chromium build (still depends on other changes)
Review URL: http://codereview.chromium.org/2133003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-17 15:41:35 +00:00
erik.corry@gmail.com
fa7c92eaf5 First step towards making JumpTarget work on ARM. Instead
of having a list of virtual frame pointers in the jump
target we have one virtual frame, which is the frame that
all have to merge to to branch to that frame.  The virtual
frame in the JumpTarget is inside the JumpTarget, rather than
being an allocated object that is pointed to.  Unfortunately
this means that the JumpTarget class has to be able to see
the size of a VirtualFrame object to compile, which in turn
lead to a major reorganization of related .h files.  The
actual change of functionality in this change is intended
to be minimal (we now assert that the virtual frames match
when using JumpTarget instead of just assuming that they do).
Review URL: http://codereview.chromium.org/1961004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 11:32:25 +00:00
floitschV8@gmail.com
7fc98eb1f4 Dtoa for fixed notation.
Review URL: http://codereview.chromium.org/1956005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 13:51:27 +00:00
floitschV8@gmail.com
92a9e30cd8 Revert r4591
Review URL: http://codereview.chromium.org/1968003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4592 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 10:33:27 +00:00
floitschV8@gmail.com
b441d246b3 Provide (non Gay) dtoa for fixed notation.
Review URL: http://codereview.chromium.org/1865001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4591 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 09:29:18 +00:00
sgjesse@chromium.org
da52a841a3 Add a V8 specific target architecture to the GYP file
The V8 GYP file now uses its own target architecture. It default to the standard target_arch, but can be set to a separate value. E.g. using

  export GYP_DEFINES="target_arch=ia32 v8_target_arch=arm"

makes it possible to have the V8 ARM simulator be used in a IA32 build.

Added some checking of supported host/target architecture combinations.
Review URL: http://codereview.chromium.org/1790001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 10:59:14 +00:00
erik.corry@gmail.com
e1b3b92a2c Make not sucking at regexp the default
(remove V8_NATIVE_REGEXP flag, add
V8_INTERPRETED_REGEXP flag).
Review URL: http://codereview.chromium.org/1635001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-19 19:30:11 +00:00
mikhail.naganov@gmail.com
c007fd4d15 merged
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-14 18:48:05 +00:00
mikhail.naganov@gmail.com
d4e436d0ad Try to fix WebKit bot: add 'circular-queue.h' and 'circular-queue-inl.h' to v8.gyp
TBR=ricow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-12 07:52:40 +00:00
mikhail.naganov@gmail.com
6f3f2f1c42 Allow new CPU profiling subsystem to coexist nicely with the old one.
This is to make possible enabling usage of the new profiling subsystem
in Chromium without much hassle. The idea is pretty simple: unless the
new profiling API is used, all works as usual, as soon as Chromium
starts to use the new API, it will work too.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4382 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-12 07:23:43 +00:00
ricow@chromium.org
88be99e9c0 Fix the gyp file to include the ENABLE_VMSTATE_TRACKING
Review URL: http://codereview.chromium.org/1564021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4369 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-09 07:29:58 +00:00
mikhail.naganov@gmail.com
c520e28dcb Make VM state tracking to be independent of logging and profiling.
Also pull out VMState into its own set of source files.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-08 13:37:39 +00:00
erik.corry@gmail.com
77fb69b6dc Committing http://codereview.chromium.org/1543003 for pvalchev and sprewell
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-06 09:27:09 +00:00
whesse@chromium.org
75003d7e76 Change a TypeInfo function from inline to non-inline, reducing stack usage during code compilation.
Review URL: http://codereview.chromium.org/1369003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4297 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-26 11:34:00 +00:00
kmillikin@chromium.org
70bbac9c56 Move flow graph and helper classes to their own file.
The FlowGraph, FlowGraphBuilder, and flow graph node classes are moved
to src/flow-graph.cc.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4287 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 16:22:48 +00:00
erik.corry@gmail.com
6a8398cffa Fix my fast-codegen.cc gyp file stupidity.
Review URL: http://codereview.chromium.org/1207007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4277 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 13:56:29 +00:00
erik.corry@gmail.com
d20232096f Gyp causing me gyp.
Review URL: http://codereview.chromium.org/1323003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4274 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 13:31:19 +00:00
erik.corry@gmail.com
f5523ecc6a Split the virtual frame into heavy and light versions.
The heavy version is for x86 and x64.  The light version
is for ARM and MIPS.  Remove the elements_ array from the
virtual frame in the light version.  More simplifications
to come, followed by light register allocation.
Review URL: http://codereview.chromium.org/1164002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4272 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 13:18:00 +00:00
fschneider@chromium.org
0737ec8dcb Rename NumberInfo to TypeInfo.
Since we add more type (StringType, PrimitiveType) the name
NumberInfo does not make sense anymore.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 12:44:15 +00:00
fschneider@chromium.org
51495beb78 Store type information with constants.
Instead of testing the value of a constant frame element to determine
the type we compute its type information at construction time.

This speeds up querying the type information during code generation.

This change also adds support for Integer32 constants and sets 
the type information accordingly.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4256 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-24 15:29:41 +00:00
kasperl@chromium.org
7d6a3b433f Merge the partial_snapshots branch back into bleeding_edge. For
now, the custom call generator stuff is disabled.
Review URL: http://codereview.chromium.org/1094014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 11:40:38 +00:00
floitschV8@gmail.com
05beab6b1f Rename files containing underscores.
Review URL: http://codereview.chromium.org/1102002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4191 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-19 12:15:24 +00:00
mikhail.naganov@gmail.com
9582645a02 Add basic C++ implementation of CPU profiler.
Review URL: http://codereview.chromium.org/1079006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-19 09:46:53 +00:00
floitschV8@gmail.com
9e84308722 Rename grisu to fast-dtoa. Get rid of template.
Review URL: http://codereview.chromium.org/1032007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4181 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 13:19:59 +00:00
floitschV8@gmail.com
74b4ad0e69 Fix arm compilation. DiyFp multiplications are now in a separate procedure.
Review URL: http://codereview.chromium.org/971006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4171 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 15:57:26 +00:00
mikhail.naganov@gmail.com
d2188658ca Re-apply r4159 now with working test on x64
TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4164 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 13:15:42 +00:00
fschneider@chromium.org
9f318feb93 Revert r4159 because of x64 test failures.
Review URL: http://codereview.chromium.org/1049003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 13:04:07 +00:00
mikhail.naganov@gmail.com
ce9298029d Implement circular queues for the C++ version of CPU profiler.
Circular queues serve as a transport for communicating between
VM, stack sampler and analyzer threads. Logging requirements
for VM and stack sampler are completely different, that's why
I introduced two different versions of CQs.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 12:25:10 +00:00
mikhail.naganov@gmail.com
12d252eb81 Start migrating profiles processing to C++.
Adding code for maintaining (address -> name) mapping and building
call trees.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4131 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-15 14:11:19 +00:00
floitschV8@gmail.com
8814064337 Fast double-to-ascii conversion.
Review URL: http://codereview.chromium.org/866002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 14:49:35 +00:00
floitschV8@gmail.com
088afd03a6 Revert grisu commits.
Review URL: http://codereview.chromium.org/804005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-10 21:26:32 +00:00
floitschV8@gmail.com
c5eea7fee2 Fast algorithm for double->string conversion.
Review URL: http://codereview.chromium.org/619005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4090 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-10 20:49:14 +00:00
kmillikin@chromium.org
bce8d2ebae Remove unneeded variable usage analysis.
A variable usage analysis pass was run on toplevel and lazily-compiled
code but never used.  Remove this pass and the data structures it
builds.

The representation of variable usage for Variables has been changed
from a struct containing a (weighted) count of reads and writes to a
simple flag.  VariableProxies are always used, as before.  The unused
"object uses" is removed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-08 13:01:24 +00:00
peter.rybin@gmail.com
77d63cc29e Basic implementation of liveedit feature
Review URL: http://codereview.chromium.org/652027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-05 22:08:58 +00:00
fschneider@chromium.org
893637a057 Inlining a few virtual frame functions.
Introducing a virtual-frame-inl.h file containing some platform-independent
virtual frame function which are small enough to be inlined.

Removed unnecessary #include of virtual-frame.h from register-allocator-inl.h
and added the necessary explicit includes in a number of files.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3962 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 09:32:48 +00:00
sgjesse@chromium.org
dfb73e9508 Remove inheritance of chromium flags
Review URL: http://codereview.chromium.org/570022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-24 08:30:12 +00:00
fschneider@chromium.org
226769d8bf Temporarily move the ia32 fast code generator into the platform-specific directory.
This allows us to make changes to one platform without affecting the others.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3907 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 09:17:37 +00:00
peter.rybin@gmail.com
3849f08ade Add central bridge for liveedit support
Review URL: http://codereview.chromium.org/607004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3891 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 20:37:08 +00:00
fschneider@chromium.org
dbe99e405a Introduce number type information in the virtual frame.
Each frame element gets a new attribute with number type information. A frame element can be: 

- smi 
- heap number 
- number (i.e. either of the above) 
- or something else. 

The type information is propagated along with all virtual frame operations. 
Results popped from the frame carry the number information with them.

Two optimizations in the code generator make use of the new 
information: 
- GenericBinaryOpSyub omits map checks if input operands are numbers. 
- Boolean conversion for numbers: Emit inline code for converting a number (smi or heap number) to boolean. Do not emit call to ToBoolean stub in this case.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3861 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 14:24:38 +00:00
kmillikin@chromium.org
41865cd677 Implement simple fast-path code for functions containing this property stores and global variables.
Code is specialized to the initial receiver.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 17:01:58 +00:00
fschneider@chromium.org
88f6734ddb Add a pass for the fast compiler to label expression nodes.
This change adds a post-order numbering to AST nodes that
are relevant for the fast code generator. It is only invoked
together with the fast compiler. 

Also changed the ast printer to print the  numbering for 
testing purposes if it is present.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 09:42:13 +00:00
kmillikin@chromium.org
2b62886dab Refactor the selection of code generator and add the possibility of a
simpler backend for non-toplevel code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 15:23:48 +00:00
kmillikin@chromium.org
1405258621 Rename the fast-codegen* files to full-codegen*.
Review URL: http://codereview.chromium.org/549109

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3662 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-20 16:28:21 +00:00
sgjesse@chromium.org
caf177c688 Fix ARM cross compiles generated from gyp.
Landing of http://codereview.chromium.org/549018.

TBR=piman@chromium.org


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 07:35:31 +00:00
sgjesse@chromium.org
209035c996 Initial OpenBSD support
Patch by Peter Valchev <pvalchev@gmail.com>.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-02 13:38:50 +00:00
ager@chromium.org
f6a5d4221f Land gyp change to remove -Os from C++ flags if it exists on Linux.
Review URL: http://codereview.chromium.org/439014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3347 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-24 11:08:06 +00:00
sgjesse@chromium.org
8f53c139d3 Enable mksnapshot on ARM when cross-compiling using gyp
Review URL: http://codereview.chromium.org/351019



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3235 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-06 07:50:31 +00:00
kmillikin@chromium.org
d92fa03eca Move the Location class into the AST Expression class as a member.
Since it is (currently) only an enum, change it to an enum (for now).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3181 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-30 08:36:46 +00:00
kmillikin@chromium.org
339e49c0b2 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
2009-10-15 16:42:22 +00:00
kmillikin@chromium.org
11d9e7ff51 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
2009-10-15 12:42:16 +00:00
kmillikin@chromium.org
d664dfaf4b 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
2009-10-15 11:21:26 +00:00
kmillikin@chromium.org
0bcb8adfbf 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
2009-10-14 19:47:22 +00:00
kmillikin@chromium.org
f74e723599 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
2009-10-14 19:30:50 +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
ager@chromium.org
4c256c0691 Land gyp file change for gcc 4.4.
Review URL: http://codereview.chromium.org/230001.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2965 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-23 14:32:45 +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
mark@chromium.org
1b812fb3b4 Remove explicit include of Chromium's common.gypi from v8.gyp.
Explicit includes of common.gypi are being deprecated.  Chromium will include
the .gypi files that it needs by asking GYP to force-include them into each
.gyp file that it loads.  See http://codereview.chromium.org/206006.
Review URL: http://codereview.chromium.org/193114

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2895 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-15 18:03:12 +00:00
sgjesse@chromium.org
f2f69625a0 Add definition of ENABLE_DEBUGGER_SUPPORT to v8 gyp file.
This reflects the change in r2875 (http://code.google.com/p/v8/source/detail?r=2875) where ENABLE_DEBUGGER_SUPPORT is not longer defined automatcally in v8.h.
Review URL: http://codereview.chromium.org/196120

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 10:33:11 +00:00
mark@chromium.org
dfcfacf1f9 Enable -fstrict-aliasing in the GYP build of V8 for the Mac in Release mode.
-fstrict-aliasing is enabled by mainline gcc at -O2 and higher, but in Apple
gcc, it must be enabled explicitly.  This results in a 1.5% improvement in V8
benchmark scores.

This also removes the -fno-exceptions and -fno-rtti settings from v8.gyp for
the Mac, and removes -fno-rtti from v8.gyp for Linux, because these settings
have become part of Chromium's common.gypi, included here, as of r23304 at the
latest.  The settings in v8.gyp have become redundant.
Review URL: http://codereview.chromium.org/174154

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 19:12:59 +00:00
mark@chromium.org
b77e2354cc Don't use -fomit-frame-pointer to build Mac V8. The Chrome crash reporting
system can't currently process stacks produced by gcc -fomit-frame-pointer
properly.  The drawback outweighs the 2% performance improvement.  Once
the crash reporting system is able to handle this optimization, it should be
revisited.
Review URL: http://codereview.chromium.org/173123

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 14:48:52 +00:00
kasperl@chromium.org
43da36aa08 Experimental change to omit frame pointers from V8 on Mac
built through the v8.gyp file. The optimization flags for
Mac and Linux (both gcc-based) builds are now much closer.
Review URL: http://codereview.chromium.org/173117

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2731 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 11:37:56 +00:00
kasperl@chromium.org
6d11b96067 Try compiling V8 for Mac with -O3 when using the v8.gyp file.
Review URL: http://codereview.chromium.org/174138

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2730 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 11:13:51 +00:00
lrn@chromium.org
166cf2e4ad Fix typo in v8.gyp
Review URL: http://codereview.chromium.org/164555


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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 11:06:17 +00:00
mikhail.naganov@gmail.com
340bb1092d Remove the rest of references to jsregexp-inl.h
TBR=kasperl@chromium.org

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 07:55:07 +00:00
deanm@chromium.org
1a2938dcc8 Add x64 to the gyp build.
Review URL: http://codereview.chromium.org/159502


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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 05:37:09 +00:00
kasperl@chromium.org
a6e5a0268b Revert r2478. Avoiding dead code stripping for mksnapshot
wasn't enough.

TBR=iposva@chromium.org
Review URL: http://codereview.chromium.org/155678

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 05:00:38 +00:00
kasperl@chromium.org
ca340d1e1b Patch by Mark Mentovai: Disable dead code stripping for mksnapshot on
Mac OS to work around code generation issue; see the issue details on
http://code.google.com/p/v8/issues/detail?id=404.

Original review: http://codereview.chromium.org/155591


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2478 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 06:55:39 +00:00
deanm@chromium.org
686718541b Fix problems with including parser.h from the Windows platform SDK instead of v8 by making sure that the v8 include path comes first.
Review URL: http://codereview.chromium.org/149383


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2410 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 10:52:54 +00:00
kasperl@chromium.org
1dbb07fecc Re-add v8_shell target to v8.gyp. Patch by Joel Stanley.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 05:25:08 +00:00
deanm@chromium.org
d60d7bc9c4 Fix missing include directories in v8.gyp.
Review URL: http://codereview.chromium.org/149331


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2395 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 15:36:12 +00:00
deanm@chromium.org
54dd175cac Correct the location of libraries-empty.cc in v8.gyp.
Review URL: http://codereview.chromium.org/155220


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2394 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 15:29:16 +00:00
deanm@chromium.org
0bda9493b8 Correct the location of snapshot.cc in v8.gyp.
Review URL: http://codereview.chromium.org/155219


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 15:22:44 +00:00
deanm@chromium.org
00b9b2e5e4 Cleanup v8.gyp. This also drops a bunch of unused targets (the shell, d8,
etc).

There are now two gyp variables to control whether we build snapshots and which
target we are building for.  This allows you to easily cross-compile for arm and
disable snapshots.

Patch by Joel Stanley.

Original review: http://codereview.chromium.org/149243

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 14:56:56 +00:00
lrn@chromium.org
72de7ab74e Separate native and interpreted regexp by compile time flag, not runtime.
Clean-up of RegExp code.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 08:11:19 +00:00
antonm@chromium.org
ecfd1f1017 Attempt to reduce performance penalty for logging and profiling
Review URL: http://codereview.chromium.org/125141

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-24 13:09:34 +00:00
kasperl@chromium.org
be11c4e979 Patch by Craig Schlenter. See http://codereview.chromium.org/118153
Change stack alignment on linux to 16 bytes to keep gcc 4.4 happy. 
This fixes the mksnapshot segfault without requiring -fno-tree-vectorize
which just avoided the problem by not generating code with movdqa.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 06:20:30 +00:00
mikhail.naganov@gmail.com
e48095b87c Implement a dynamically growing memory log buffer with an upper limit.
The goal of this change is to allow longer profiling sessions and preserve memory when profiler isn't started. The buffer starts with 64K and grows until it reaches the upper limit, which is currently set to 50MB --- according to my evaluations, this is enough for at least 20 minutes of GMail profiling. As we're planning to introduce compression for the profiler log, this time boundary will be significantly increased soon.

To make possible unit testing of the new component, I've factored out Logger's utility classes into a separate source file: log-utils.h/cc. Log and LogMessageBuilder are moved there from log.cc without any semantical changes.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-28 07:08:09 +00:00
ager@chromium.org
0582ee5da5 Land patch from Craig Schlenter to make V8 build and run when compiled
with -O3 on gcc 4.4.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-22 06:52:02 +00:00
ager@chromium.org
af59c3d68f Reapply revision 1949. Stupid error.
Add virtual destructor to jump targets to make compiler happy.
Review URL: http://codereview.chromium.org/113396

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1951 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 12:18:25 +00:00
ager@chromium.org
c9eda02def Revert revision 1949.
Review URL: http://codereview.chromium.org/115350

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 11:55:18 +00:00
ager@chromium.org
f4778b007f Reduce the memory used by frame elements from two words to one by
encoding the values in one word and by using an indirection table for
handles.

This reduces compilation time by roughly 10% and we should be able to make the slow case equality checking of frame elements faster as well.
Review URL: http://codereview.chromium.org/115347

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 11:43:09 +00:00
deanm@chromium.org
2b56660a8b Introduce two separate classes of processor detection:
- TARGET, the architecture we will generate code for.
  This is brought it from the build system.
- HOST, the architecture our C++ compiler is building for.
  This is detected automatically based on compiler defines.

This adds macros for 32 or 64 bit, and cleans up some
include conditionals, etc.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1864 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 12:06:20 +00:00
sgjesse@chromium.org
a470847226 Added better version information
The current version is now held in src/version.cc in a number of defines which needs to be modified when changing version.

The following defines make up the version information:

  MAJOR_VERSION
  MINOR_VERSION
  BUILD_NUMBER
  PATCH_LEVEL
  CANDIDATE_VERSION

The first four are numbers and the fifth is a boolean. Besides these five the define

  SONAME

can be used to set a specific soname when building the a shared library (see below). This will most likely be used on stable branches where binary compatibility is ensured between different versions. This define is a string.

This version information is now read by the SCons build to support setting the soname for a Linux shared library. This requires passing the option soname=on to the SCons build.

When soname=on is specified the soname for the shared library can be set in two different ways. Either it will be the full versioned library name (e.g. libv8-1.2.2.so) or a specific soname defined in src/version.cc. Whenever a shared library is build with an soname the filename of the library will hold the full version name (e.g. libv8-1.2.2.so).

I did not update the xcode project with the new files.

BUG=151
Review URL: http://codereview.chromium.org/100104

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-30 09:29:15 +00:00
lrn@chromium.org
976a9025e4 Fix .gyp file and avoid adding -m32 on 32 bit systems.
Fix SConstruct to only add -m32 if the compiler needs it.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1820 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 15:20:37 +00:00
ager@chromium.org
e3e50f7070 Add gyp file to v8 repository.
Gyp is used to generate project files used to build chromium.  Moving
the v8.gyp file to the v8 repository makes it easier to have V8 and
the v8.gyp file synchronized (so a DEPS update in chromium gets the
right v8.gyp file associated with that revision of V8).

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



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1795 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 09:04:39 +00:00