Commit Graph

3333 Commits

Author SHA1 Message Date
vitalyr@chromium.org
945673574e Improve string runtime compare performance for flat strings.
Review URL: http://codereview.chromium.org/650058

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 12:49:23 +00:00
lrn@chromium.org
024faf1105 Fix test for overflow in memory allocation Failure payload.
It bailed out too early, and could give a DEBUG assertion failure due
to right shift being artihmetic. Changed values to unsigned to be safe.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3948 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 12:28:35 +00:00
serya@chromium.org
2c872c26fd AllignFrame/CallCFuntion moved from regexp-macro-assembler-ia32 to macro-assembler-ia32 (like in x64 version).
Review URL: http://codereview.chromium.org/657080

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3947 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 12:18:55 +00:00
ager@chromium.org
fc382f0ffa Revert pax change as it does not work with older versions of scons.
Review URL: http://codereview.chromium.org/661071

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3946 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 08:27:07 +00:00
peter.rybin@gmail.com
4b6b2dc9c6 Implement BlindReference object and provide couple of liveedit-specific structures
Review URL: http://codereview.chromium.org/650127

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3943 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-24 19:59:09 +00:00
vitalyr@chromium.org
e76f06a1e2 Fix miss in smi check when doing fast api call.
BUG=http://crbug.com/36604

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-24 19:26:10 +00:00
vitalyr@chromium.org
3d76502914 Fix uninitialized memory read in CallOptimization.
BUG=http://crbug.com/36602

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3941 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-24 19:14:21 +00:00
ager@chromium.org
be1ea81cbf Land change to allow building on Gentoo Hardened Linux.
Codereview URL: http://codereview.chromium.org/659002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3940 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-24 18:50:56 +00:00
sgjesse@chromium.org
6ceb6d95fc Don't treat this as a trivial expression.
This caused some regressions in Chromium.

BUG=http://crbug.com/36604
Review URL: http://codereview.chromium.org/652228

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-24 14:02:20 +00:00
serya@chromium.org
43d074985a Review URL: http://codereview.chromium.org/652118
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-24 08:33:51 +00:00
whesse@chromium.org
ce1f6b2a3c Add comment to generated code that says which code generator compiled it.
Review URL: http://codereview.chromium.org/652110

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3932 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-23 12:40:36 +00:00
lrn@chromium.org
3135110af8 IA32: Native access to TranscendentalCache for sin/cos.
Review URL: http://codereview.chromium.org/652041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3929 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-23 10:29:02 +00:00
fschneider@chromium.org
2883c03037 Prepare push to trunk. Now working on 2.1.3.
Review URL: http://codereview.chromium.org/654003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3928 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-23 10:22:07 +00:00
fschneider@chromium.org
d955c20beb Fix reliability crash caused by wrong assert.
These two asserts in ComputeEntryFrame are wrong since the
virtual frame already knows how to deal with the number type
information of copy elements: We do not store type 
information with copy elements. Instead the backing element
contains the type information.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3927 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-22 15:42:23 +00:00
whesse@chromium.org
2074e4847d Add integer casts to make v8 compile without warnings on 64-bit Visual Studio
Review URL: http://codereview.chromium.org/650140

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3925 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-22 11:42:46 +00:00
whesse@chromium.org
df9544d598 Declare register names as constants in assembler-x64.h. Fix for issue 615.
Review URL: http://codereview.chromium.org/650136

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3924 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-22 11:41:52 +00:00
sgjesse@chromium.org
38f2363df6 Consistently return failure if the stub cache cannot deliver a code object
Some functions of the stub cache returned undefined if a code stub could not be generated. However the clients of these functions only cehcks for failure. Now all these functions return a failire object if no code stub can be made available
Review URL: http://codereview.chromium.org/652039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3923 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-22 10:04:22 +00:00
vitalyr@chromium.org
91a2fb7ace Land patch by Oleg Eterevsky (oleg@chromium.org).
Original review: http://codereview.chromium.org/646010/show

Change the implementation of lastIndexOf method of String. Convert the
strings in question to Vector<char> or Vector<uc16> and execute simple
search algorithm on them.

The difference in speed on 500k character string is about 10x.

TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 17:11:47 +00:00
whesse@chromium.org
d931c9b70a Improve stores to global variables.
Review URL: http://codereview.chromium.org/650028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 15:04:16 +00:00
kmillikin@chromium.org
a9202fc45d Begin using a list of bailouts instead of a singleton in the fast code generator.
A list of bailout descriptions is kept in the CompilationInfo
structure that is shared between the primary and secondary code
generators.  The primary adds a description to the list for each
bailout position.

Responsibility for binding labels is moved from the primary to the
secondary code generator. All the labels still target the start of the
secondary code and the compilation state of the primary is still
ignored.

Move the compilation mode flag to the CompilationInfo.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 14:52:39 +00:00
yurys@chromium.org
a47746d209 Add maxStrinLength argument to debugger requests
Review URL: http://codereview.chromium.org/647022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 14:33:08 +00:00
vitalyr@chromium.org
c03db75853 Some string optimizations:
* Inlined checks for strings and regexps.
 * Rewrote split for the non-regexp case.
 * Implemented one-char case for lastIndexOf.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 13:07:37 +00:00
ricow@chromium.org
24011207c6 Removed asserts on attributes when setting elements. Will file a bug on not handling elements correctly when using Object.defineProperty
Review URL: http://codereview.chromium.org/651025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 12:16:00 +00:00
ager@chromium.org
469d694d5b Add missing break in GetPropertyWithFailedAccessCheck. This break has
been missing for a long time but the fallthrough to the default case
used to break.  Now the default case should be unreachable and the
fallthrough therefore causes assertion failures.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 12:10:46 +00:00
kmillikin@chromium.org
49a336e5be Reorder code in fast-codegen-ia32.cc.
Reorder code so that helper functions and simple accessors come before
all the visit function.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3912 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 11:39:12 +00:00
whesse@chromium.org
d2dd02152c Improve load of global variables.
Review URL: http://codereview.chromium.org/651019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 10:05:33 +00:00
fschneider@chromium.org
ec86513519 Make class BitField able to use 32 bits of a uint32.
Although algorithmically correct, the compiler would not allow to instantiate
a BitField that uses all 32 bits without warnings about a too large shift
count. As a consequence we were limited to 31 bit values when using BitField.

This happened when instantiating a bitfield BitField<T, shift, size> with 
[shift=0, size=32] or [shift=31, size=1] or more general any 
[shift=X, size=32-X]

As side-effect of the new implementation the compiler now warns if we ever
try instantiating a bitfield with size 0.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3910 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 10:02:04 +00:00
fschneider@chromium.org
62d62cb8e2 Fix missing includes.
TBR=kmillikin@chromium.org, 
Review URL: http://codereview.chromium.org/650025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3909 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 09:59:47 +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
kmillikin@chromium.org
e1041c9f9c Introduce 'trivial' expressions, use them for this property assignments.
Add a (currently) syntactic predicate to AST expression nodes telling
whether they are 'trivial'.  Trivial expressions have no side effects,
do not require storage to be allocated for them, and can be evaluated
out of order (because their value does not change between when they
are visited by the code generator as expressions in the AST and when
it is consumed).

Mark 'this' and literals as trivial.  Allow them to be pushed on the
virtual frame.  Make use of them to push 'this' more lazily in this
property assignments.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 09:01:31 +00:00
ager@chromium.org
d316336162 Prepare push to trunk. Now working on version 2.1.2.
Review URL: http://codereview.chromium.org/651016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 08:19:20 +00:00
antonm@chromium.org
f70dd176a6 Make setting length on arrays faster.
Review URL: http://codereview.chromium.org/647013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 17:30:32 +00:00
ager@chromium.org
806c15e4b5 Remove the LookupResult IsValid method because it is confusing.
Replaced IsValid by IsPropertyOrTransition and used IsProperty in most
of the places where IsValid was used before.  Most of the time when
inspecting a lookup result we really want to know if there is a real
property present.  Only for stores are we interested in transitions.

BUG=http://crbug.com/20104
TEST=cctest/test-api/NamedInterceptorMapTransitionRead
Review URL: http://codereview.chromium.org/647015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3901 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 15:10:35 +00:00
ricow@chromium.org
0d6fe0a44f Added access check to SetNormalizedProperty which is used from runtime DefineOrRedefineDataProperty.
Review URL: http://codereview.chromium.org/647010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3900 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 13:13:21 +00:00
kmillikin@chromium.org
e5584e45e2 Refactor assignments in the ia32 code generator.
Change compilation of assignment expressions in the ia32 code
generator to no longer use the Reference helper class.  This gives us
more explicit control over which subexpressions are evaluated and
when.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3899 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 13:02:17 +00:00
sgjesse@chromium.org
17e80e76e7 Add a test case for issue 618
Review URL: http://codereview.chromium.org/647014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3898 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 13:01:58 +00:00
whesse@chromium.org
b9a250d2e6 Fix error in compound assignment to keyed load by making platform-independent full compiler code platform dependent, add test of compound assignments.
Review URL: http://codereview.chromium.org/646009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3897 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 12:59:41 +00:00
mikhail.naganov@gmail.com
b740dea517 Kill some unused code.
It doesn't mean I'm participating in some fixit, just spotted some
code which doesn't have usages and decided to remove it.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3896 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 12:47:17 +00:00
whesse@chromium.org
70c7e513af Change KeyedLoadIC interface on ia32 to take receiver and name in registers.
Review URL: http://codereview.chromium.org/601080

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3895 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 10:09:54 +00:00
sgjesse@chromium.org
97d842fa1e Fix issues with commit r3839
Fix broken condition.
Fixe some style issues.
Re-enabel part of a test which was turned off.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 09:41:47 +00:00
sgjesse@chromium.org
ecf4b9fc76 Refactor the check for generating inline constructors
Moved all the logic to a function on SharedFunctionInfo (including the flag check) to make things more readable.

Changed the check for setter to do a lookup for a named setter for each of the properties assigned in the constructor.

Added tests using accessors and interseptors set through the API.

Added fast case objects to the mjsunit test.

TEST=test/mjsunit/setter-on-constructor-prototype.js
TEST=test/cctest/test-api/SetterOnConstructorPrototype
TEST=test/cctest/test-api/InterceptorOnConstructorPrototype
Review URL: http://codereview.chromium.org/619006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3893 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 09:07:03 +00:00
peter.rybin@gmail.com
95ae024771 Fix lint errors
Review URL: http://codereview.chromium.org/626002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3892 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 20:57:05 +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
kmillikin@chromium.org
68246ec4a9 Remove a generated mov and jmp.
Remove a move and jump from the fast-path code in the speculative
backend. Ultimately, this code belongs to the bailout and not the
fast path.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3890 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 14:18:47 +00:00
mikhail.naganov@gmail.com
39e63f0aec Implement tagging of profiler log event blocks.
This change allows to associate integer tags with blocks of profiler
log events, and repeat calls to 'ResumeProfiler' / 'PauseProfiler' in
order to establsh nested (not necessary properly nested) blocks. By
supporting this, we will be able to match WebInspector's CPU profiler
abilities in DevTools.

I also refactored some testing code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3889 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 13:23:46 +00:00
whesse@chromium.org
1b526cc700 Remove obsolete bug TODO
Review URL: http://codereview.chromium.org/618006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 13:16:53 +00:00
antonm@chromium.org
a346644121 Adding checks for the cases when array grows too big.
Review URL: http://codereview.chromium.org/601092

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3887 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 13:04:30 +00:00
sgjesse@chromium.org
1684b2d9ac Remove duplicate function from runtime.
Review URL: http://codereview.chromium.org/620003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3886 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 11:26:00 +00:00
antonm@chromium.org
be21c71584 Introduce Array.splice builtin.
Review URL: http://codereview.chromium.org/618002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3885 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 10:54:49 +00:00
kmillikin@chromium.org
3c0d77f32e Fix stack corruption when calling non-function.
Fix for issue 603.

Revision r3484 removed the property name from the call stack for
call ICs.  When a non-function was called via a call IC and
Function.prototype.call, an extra value was left on the stack that the
caller could not know to clean up.

Fix is to change the JS builtin used for calling non-functions.  It
now gets the callee as receiver, rather than iterating stack frames
and finding it on the expression stack of its JS caller.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 08:26:50 +00:00
antonm@chromium.org
a48a7bf6ff Add class name into FunctionTemplateInfo debug printing.
Review URL: http://codereview.chromium.org/608015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3881 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 07:14:43 +00:00
antonm@chromium.org
087fedeae8 Normalize the object before updating getter/setter info.
BUG=612

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3880 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 06:53:19 +00:00
sgjesse@chromium.org
1c2b2ac9c6 Fix construction of simple objects with setters on prototype
Simple objects which are constructed without calling the actual constructor function did not take setters defined on prototype chain of the new object into account.

Constructing objects this way is now not done if there are setters involved on the prototype chain of the new object.

This only fixes the case where the setter is found when the first object from a constructor is created. If the prototype chain is changed new objects will on take any change to setters into account.

TEST=test/mjsunit/setter-on-constructor-prototype.js
Review URL: http://codereview.chromium.org/606062

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 06:28:33 +00:00
vitalyr@chromium.org
ad9ea637be Don't externalize fresh strings.
With the current API the embedder has to extrenalize a string each
time a string is encountered to avoid the cost of repeated character
copying/conversion. The issue here is that the externalization cost
itself is non-negligible (both in time and space) and should not be
paid for a rarely used string. This change is an attempt to predict a
string's usage frequency based on its freshness. A string is
considered fresh if it was recently allocated in the new space.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3878 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 18:56:07 +00:00
mikhail.naganov@gmail.com
e61996bf3f Fix the build after previous commit.
TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 15:29:35 +00:00
mikhail.naganov@gmail.com
dcef87af66 Enable passing of script data via script creation methods.
Patch by Andrey Kosyakov <caseq@chromium.org>
Original issue http://codereview.chromium.org/606053

TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 15:15:31 +00:00
ager@chromium.org
a9e174f8ea Make sure that the inline_new flag guards all the optimizations for
constructors that only contain simple this assignments.

Make sure that constructors with declarations are not treated as
constructors with only simple this property assignments.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 15:14:34 +00:00
antonm@chromium.org
8bc68937a7 Port keyed interceptor stubs to ARM and x64.
Review URL: http://codereview.chromium.org/600123

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 14:13:21 +00:00
fschneider@chromium.org
fc67ad346a Pass the complete number type information into the GenericBinaryOpStub.
Currently we only pass a boolean parameter indicating whether
the input operands to the GenericBinaryOpStub are guaranteed
to be numbers or not. 

Instead we pass the complete number type as a parameters. This 
allows to use more precise type information for code generation
in the stub.

Also make the computation of the result type more precise and correct on both ia32 and x64.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 13:03:16 +00:00
mikhail.naganov@gmail.com
8f3ae5b60a Fix regression in cctest/test-log/EquivalenceOfLoggingAndTraversal
TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 13:01:05 +00:00
antonm@chromium.org
ea1b4f0eb1 Introduce builtin for Array.slice function.
Review URL: http://codereview.chromium.org/604059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 12:14:23 +00:00
mikhail.naganov@gmail.com
899bef8226 Use binary search in GetScriptLineNumber.
Patch by Ilya Tikhonovsky <loislo@chromium.org>
Original issue http://codereview.chromium.org/593108

TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 12:08:10 +00:00
ager@chromium.org
69b96e608a Land thumb2 assembler update.
Review URL: http://codereview.chromium.org/596065

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3869 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 11:40:56 +00:00
sgjesse@chromium.org
58207806fe Fix inline NumberToString
Glitch in pre-commit cleanup.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 11:16:10 +00:00
ager@chromium.org
51b5df388c Port arguments object allocation in generated code to ARM and x64.
BUG=v8:611
Review URL: http://codereview.chromium.org/605024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 10:50:56 +00:00
yurys@chromium.org
0630b1fd9f Object.getOwnPropertyNames should return string names for indexed properties
Land original change by pfeldman: http://codereview.chromium.org/596117
Review URL: http://codereview.chromium.org/596124

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 10:08:39 +00:00
sgjesse@chromium.org
6093d0dbf5 Inline NumberToString
NumberToString in runtime JavaScript is inlined through a call to a stub. Currently the stub only checks the number string cache and only if the number is a smi. Code is shared with the inlining of number string cache lookup when adding a smi to a string.
Review URL: http://codereview.chromium.org/604062

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3865 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 09:41:11 +00:00
ager@chromium.org
7f422b2a35 Remove caching of ToBoolean on the global context. This was used for
API operations but the API C++ code no longer performs a call to the
JavaScript code for ToBoolean.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3864 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 09:24:14 +00:00
kmillikin@chromium.org
edfc3c31b3 Remove printf committed by mistake
Review URL: http://codereview.chromium.org/600126

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 07:54:28 +00:00
fschneider@chromium.org
82341d28b3 Fix arm build.
Change the function declarations in the arm virtual frame header 
file to match the other platform.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 14:47:03 +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
mikhail.naganov@gmail.com
d3ce4347d9 Add GetScriptOrigin and GetScriptLineNumber functions for Timeline panel.
Patch by Ilya Tikhonovsky <loislo@chromium.org>.
Original issue: http://codereview.chromium.org/565007

TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 14:19:15 +00:00
antonm@chromium.org
e02a5aa602 Introduce builtin for Array.unshift function.
Review URL: http://codereview.chromium.org/600124

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 13:25:06 +00:00
kmillikin@chromium.org
a2bb215611 Change the interface of CallStubCompiler::CompileCallInterceptor.
Move responsibility for a typecast into the caller so that it can be
locally verified to succeed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3858 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 13:20:49 +00:00
antonm@chromium.org
3d4d5e9e34 Refactoring various pieces of post interceptor caching.
Review URL: http://codereview.chromium.org/596096

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 12:32:27 +00:00
whesse@chromium.org
58b04396bf Change CallIC interface on ARM. Remove name from the stack, and pass it in register r2.
Review URL: http://codereview.chromium.org/598065

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 12:26:07 +00:00
whesse@chromium.org
4507ca1523 Simplify compilation of CallIC interceptor stub.
Review URL: http://codereview.chromium.org/604054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 11:52:18 +00:00
antonm@chromium.org
01b1176e08 Introduce builtin for Array.shift function.
Review URL: http://codereview.chromium.org/606017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 09:17:38 +00:00
yurys@chromium.org
f5eb70e411 Land 598061(Process //@ scriptURL=url comment for scripts that don't have name set)
Review URL: http://codereview.chromium.org/596088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 17:17:13 +00:00
kmillikin@chromium.org
61ce433d82 Change interface to CodeGenerator::LoadFromSlot.
Change the interface to LoadFromSlot, LoadFromSlotCheckForArguments,
and LoadFromGlobalSlotCheckExtensions in the ia32 classic code
generator.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 16:39:07 +00:00
whesse@chromium.org
077d785842 Fix CallIC stub for CallInterceptor on ARM
Review URL: http://codereview.chromium.org/593080

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 16:01:38 +00:00
antonm@chromium.org
62a9497787 Compile very thin code to access objects on which indexed interceptor is set.
Review URL: http://codereview.chromium.org/603028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 14:21:18 +00:00
sgjesse@chromium.org
f937e7daa5 Fix array allocation in generated code on x64
The porting of array allocation in generated code from ia32 to x64 wrongly assumed that a smi contained the actual number times 2. Removed the constant times_half_pointer_size, as it will probably not be needed.
Review URL: http://codereview.chromium.org/596084

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 13:49:57 +00:00
lrn@chromium.org
2e6ab729ef Added optimization for div/mod by constant power of 2.
Review URL: http://codereview.chromium.org/597059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 13:37:10 +00:00
sgjesse@chromium.org
e60efbff28 Optimize string plus smi
When adding a string with a smi value the number string cache is checked in generated code. If the there is a string value in the number string cache the resulting string is produced in generated code.
Review URL: http://codereview.chromium.org/596082

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 11:55:04 +00:00
sgjesse@chromium.org
46020b3169 Probe the symbol table for two character strings in native code
All two character string results from adding two strings and from sub string used to be handled in the runtime system as a lookup in the symbol table was done before allocating a new string. The native code for string add and sub string now probes the symbol cache for two character strings to avoid the runtime call. If the result string is not found in the symbol table within a fixed number of probes a new string is just allocated. Newly allocated two character strings are not added to the symbol table immediately.
Review URL: http://codereview.chromium.org/598062

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 11:43:00 +00:00
whesse@chromium.org
c7fe99d3ff Change LoadIC interface on ia32 to take arguments in registers.
Review URL: http://codereview.chromium.org/573009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 10:32:24 +00:00
kmillikin@chromium.org
85c24cee57 Change the interface of CodeGenerator::InstantiateBoilerplate.
Begin changing the interface of the virtual-frame-based code generator
to avoid pushing short-lived temporaries on the frame.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 10:28:40 +00:00
fschneider@chromium.org
4a2c81d3b0 Add last use data flow information to the fast code generator.
This change add simple local live variable information to 
the fast code generator.  It supports only AST nodes that 
are accepted by the syntax checker.

Each variable use points to a variable definition structure
which contains the last use of the definition.

To determine whether a variable is live after a certain point
we can check whether its last use occurs later in the evaluation
order defined by the AST labeling number.

The new information is currently only printed out together with
the IR and not yet used for code generation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3839 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 10:16:30 +00:00
whesse@chromium.org
4831b79421 Port change in CallIC interface to x64 platform. Name of called function is now passed in rcx.
Review URL: http://codereview.chromium.org/596036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 08:53:13 +00:00
ager@chromium.org
4c929953b4 Port FastCloneShallowArrayStub to ARM and x64.
Review URL: http://codereview.chromium.org/597022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-11 12:28:49 +00:00
ager@chromium.org
51a7ecc1f7 Fix problem with GenericBinaryOperationStub::GenerateCall for a Smi
left operand.  For non-commutative operations the right operand could
be overwritten with the Smi left operand.

We need better testing of all of these cases.  We will add more test
cases as a separate commit.
Review URL: http://codereview.chromium.org/598059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-11 12:26:08 +00:00
kmillikin@chromium.org
9b47ae91d1 Simple type tracking in the fast code generator.
Initial implementation of ad hoc must-be-smi tracking in the fast code
generator.  Type information is used to avoid the write barrier for
smi property stores and to avoid the smi check for the inputs/output
of bitwise OR.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3833 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-11 08:41:19 +00:00
ager@chromium.org
638cb4f91d Always load the JavaScript builtins code entry from the JavaScript
function instead of baking in the address of the first one that we see
in code.

This removes the need for fixups processing and makes the stubs safe
when there is no natives cache and therefore multiple versions of the
builtin functions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-11 08:05:33 +00:00
mikhail.naganov@gmail.com
4f7b9e4da3 Report code stubs to OProfile.
Patch from Dineel D Sule <dsule@codeaurora.org>.
Original issue: http://codereview.chromium.org/600019

TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-10 17:50:16 +00:00
whesse@chromium.org
9344612bef Change StoreIC interface on ARM platform
Review URL: http://codereview.chromium.org/554152

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3830 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-10 15:06:08 +00:00
antonm@chromium.org
5ecfd4bfe9 Refactor prototype setting code and expose SetPrototype to public V8 API.
Review URL: http://codereview.chromium.org/598020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-10 14:44:15 +00:00
kmillikin@chromium.org
b04a26dc31 Harden global variable accesses in the fast code generator.
Explicitly check that global variables do not have accessors or
interceptors in the fast code generator syntax checker.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3828 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-10 13:46:15 +00:00
antonm@chromium.org
a9664cbd0d Making lint happy.
Review URL: http://codereview.chromium.org/593014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3827 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-10 11:48:53 +00:00
kmillikin@chromium.org
30cf88af6b Restrict the syntax that we aggressively optimize.
Do not use the speculative compiler for functions with other than one
statement in the body, and do not use it if subexpressions can have
side effects.  Bailing out to the beginning of the full code is not
sound if side effects have already occurred.

Add tests that would fail without the restrictions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-10 09:18:55 +00:00
vitalyr@chromium.org
d1d56d9891 ia32: Fuse map and type checks in call ICs for API functions.
This uses the fact that if a map stayed the same then the object
still passes the type check. A new builtin is added to handle the
API call in this case.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-09 16:14:14 +00:00
whesse@chromium.org
ad83e411e1 Eliminate unused function KeyedStoreIC::GenerateExtendStorage, and unused parameter from StubCompiler::GenerateStoreField.
Review URL: http://codereview.chromium.org/575022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3824 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-09 15:18:37 +00:00
whesse@chromium.org
c00dcbe5f2 Fix error introduced in version 3820. Add optimization suggested by the error.
Review URL: http://codereview.chromium.org/597006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-09 14:19:23 +00:00
kmillikin@chromium.org
9b5c312bfc Initial implementation of fast path operation for bitwise OR.
Support a binary operation (bitwise OR) so long as it's not nested in
the left subexpression.  This ensures that the expression stack never
has height greater than two and so can be kept fully in registers.

The bounded expression stack height and the absence of any side
effects on the fast path allows us to still bailout out to the very
beginning of the function if any of our fast-path checks fail.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3822 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-09 13:44:43 +00:00
lrn@chromium.org
96127b68e5 Ported ia32 optimization of revision 3487 to x64.
Review URL: http://codereview.chromium.org/597005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3821 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-09 13:10:32 +00:00
whesse@chromium.org
503bbeb8c4 Change GenerateLoadStringLength to have two scratch registers on all platforms. This is needed so that the LoadIC can pass the receiver in a register, and not have it overwritten, and also simplifies the code.
Review URL: http://codereview.chromium.org/596011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3820 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-09 13:06:37 +00:00
kmillikin@chromium.org
0d6b85b812 Added helper functions for fixed register allocation.
Added helper functions to the fast code generator for temporary, ad hoc
fixed register allocation.  Also inlined some helper functions that had only
one call site to simplify the code generator API for now.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3818 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-09 10:18:51 +00:00
whesse@chromium.org
f449fded97 Eliminate *IC::Generate() function on all platforms.
Review URL: http://codereview.chromium.org/583008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-08 16:08:26 +00:00
fschneider@chromium.org
4acaded36c Eliminate unnecessary depencencies in some header files.
1. Eliminate unnecessary include of register-allocator-inl.h in frame-element.h.
2. Move functions register-allocator.h to the -inl.h file if they use other inline functions.
3. Add missing includes that resulted from the above changes.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-08 14:33:34 +00:00
erik.corry@gmail.com
e7fbf99b17 Optimize concat for one argument (two if you count 'this').
Review URL: http://codereview.chromium.org/584006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-08 14:00:50 +00:00
serya@chromium.org
862909e762 Review URL: http://codereview.chromium.org/561049
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-08 13:44:49 +00:00
fschneider@chromium.org
8c29d246af Move class declaration of Comment from codegen-inl.h to codegen.h
-inl.h files should only contains small inline functions and
no class declarations. Implementation moved to codegen.cc since
it's not a performance critical class (only used in DEBUG mode).
 
Review URL: http://codereview.chromium.org/585004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-08 08:54:27 +00:00
fschneider@chromium.org
2f0f6face1 Fast compiler: Load globals variables directly from property cells.
This is a first step towards loading globals directly from property cells instead
of going through a load IC.

This change supports only properties with the DontDelete attribute since
we are only able to bailout into the generic code generated by the secondary 
code generator the beginning of a function. The resulting fast-case code is 
specialized for a specific context. When invoked with a different global object, 
it will always bailout to the secondary code.

When loading a property that does not exist at compile-time or a property
that is deleteable we still generate the generic load IC.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3808 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-05 13:57:18 +00:00
mikhail.naganov@gmail.com
19c1675b94 Fix test failures in debug mode w/snapshots. It turns out that not
all stubs have valid major_keys, and this is OK. So I've added
a check to avoid termination in debug mode.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3807 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-05 13:07:00 +00:00
lrn@chromium.org
dd85270967 ARM native string addition.
Review URL: http://codereview.chromium.org/571005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-05 12:00:42 +00:00
sgjesse@chromium.org
2618422ed5 ARMv7 ubfx support
Patch from Kun Zhang <zhangk@codeaurora.org>, see http://codereview.chromium.org/569015.
Review URL: http://codereview.chromium.org/573027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3804 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-05 08:46:41 +00:00
ricow@chromium.org
f119ecbc7a Added checked convert of object to DefineOrRedefineAccessorProperty.
Review URL: http://codereview.chromium.org/570040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3803 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-05 07:19:09 +00:00
mikhail.naganov@gmail.com
e51a05f338 Fix issue 597: builtins and stubs are missing in profiler log when using snapshots.
After this fix, profiles of non-snapshotted VMs are now equivalent to
profiles of snapshotted VMs (having that --log-snapshot-positions is used,
and mksnapshot's log is given to the tick processor script.)

BUG=597

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-04 21:34:03 +00:00
sgjesse@chromium.org
9b4312fd76 Fixed random style violations.
Review URL: http://codereview.chromium.org/574009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-04 21:32:02 +00:00
sgjesse@chromium.org
4bf7a6c037 Fixed another presubmit error
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/572011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-04 20:43:59 +00:00
sgjesse@chromium.org
a6a7c75ae0 MIPS port initial commit
This is the first step in the MIPS port of V8. It adds assembler, disassembler and simulator for the MIPS32 architecture.

Contains stubbed out implementation of all the compiler/code generator infrastructure to make it all build.

Patch by Alexandre Rames from Sigma Designs Inc.

This is the landing of http://codereview.chromium.org/543161.
Review URL: http://codereview.chromium.org/561072

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3799 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-04 20:36:58 +00:00
ricow@chromium.org
a28143c77c Added extra tests to the DefineOrRedefineAccessorProperty and
DefineOrRedefineDataProperty to avoid invalid input.

Added tests to object-define-property.js to test that it does not crash 
on invalid input. 


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3798 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-04 19:43:56 +00:00
mikhail.naganov@gmail.com
8150a16b62 Apply r3795 to bleeding_edge.
TBR=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3797 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-04 15:35:42 +00:00
sgjesse@chromium.org
3fdc489658 Fix presubmit errors.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/570024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3796 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-04 15:21:05 +00:00
ricow@chromium.org
4f179b09ba Added IsProperty() check to result in DefineOrRedefineAccessor - if no check
this causes the debug check to fails since type() asserts that the 
lookup_type != NOT_FOUND. This does not change any functionality since we 
explicitly checked if it was one of the three types that we need to delete.
Also changed defineProperties in v8natives to actually return the object
being defined (as specified by spec)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3794 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-04 11:28:03 +00:00
lrn@chromium.org
f0ef4d7bac ARM: Implement native substring copying.
Review URL: http://codereview.chromium.org/552186

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3793 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-04 09:11:43 +00:00
erik.corry@gmail.com
14a640274c Revert last change (temporarily using only the full compiler).
TBR=ager

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-03 20:39:34 +00:00
erik.corry@gmail.com
bb717f7d9d Activate full compiler. This is a test which will be reverted.
TBR=ager

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3790 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-03 20:31:49 +00:00
kmillikin@chromium.org
c174657e9e Incorporate the arguments to the code generator constructors and their
MakeCode functions in the CompilationInfo structure.  This makes it
easier to add new arguments and makes all arguments uniformly
available to the various backends.
Review URL: http://codereview.chromium.org/566008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-03 16:12:55 +00:00
lrn@chromium.org
18c6134e1a Updated JSON.stringify to newest version of ES5.
Review URL: http://codereview.chromium.org/562034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3787 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-03 13:17:39 +00:00
ricow@chromium.org
f74a08d8ee Added Object.defineProperty + needed internal functionality:
DefineOwnProperty (changed to allow for redefinition of existing property)
  SameValue
  Extra info on propertydescriptor
  GetProperty
  HasProperty

Currently the DefineOrRedefineAccessorProperty deletes the existing
property on the object if it is a dataproperty (FIELD or NORMAL) and
adds a new one. This can potentially be optimized.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3786 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-03 13:10:03 +00:00
leonclarke@gmail.com
04c4d90868 DebugBreak shouldn't be used when ENABLE_DEBUGGER_SUPPORT isn't defined.
Review URL: http://codereview.chromium.org/568017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-03 11:54:57 +00:00
ager@chromium.org
76e7d7522a Use MemOperand directly to load argv on arm.
Review URL: http://codereview.chromium.org/570003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3783 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-03 11:43:54 +00:00
sgjesse@chromium.org
f239b9b7d4 Prepare to push to trunk. We are now vorking on version 2.1.1.
Review URL: http://codereview.chromium.org/564033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3779 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-03 09:15:58 +00:00
whesse@chromium.org
b57ca72b90 Fix build error on Win32, fix spelling of DebugerStatementStub.
Review URL: http://codereview.chromium.org/570001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-03 08:33:19 +00:00
ager@chromium.org
dc49c566a4 Use the virtual-frame based optimizing compiler for split-compilation
bailouts.  For now the virtual-frame state at entry of a function is
hard-coded when using the virtual-frame based compiler as the
secondary compiler.

Setup frame pointer correctly on function entry on ARM in
fast-codegen-arm.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3776 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-03 07:58:47 +00:00
serya@chromium.org
0045327b7d Review URL: http://codereview.chromium.org/555164
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-02 18:35:53 +00:00
ager@chromium.org
c4bd2aa054 Add missing access checks to Object.getOwnPropertyNames.
Makes webkit layout test: http/tests/security/cross-frame-access-enumeration.html fail.
Review URL: http://codereview.chromium.org/561019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-02 13:48:54 +00:00
whesse@chromium.org
c9c504770a Remove explicit Result arguments to IC calls on ARM.
Review URL: http://codereview.chromium.org/568016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-02 13:40:53 +00:00
sgjesse@chromium.org
10910394e6 Handle insertion order for simple constructors
When functions only have simple assignments of the form this.x = ... the object is created in generated code without actually calling the constructor. In this case the initial map for the function already contains the properties assigned in the constructor. The field descriptors in this initial map now has an enumeration index assigned to make property enumeration order the insertion order. The insertion order here is the order of the this.x assignments in the code.

BUG=http://crbug.com/3867
TEST=test/mjsunit/regress/regress-crbug-3867.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3768 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-02 13:33:29 +00:00
sgjesse@chromium.org
8b5387506c Remove some unused code on ARM
Review URL: http://codereview.chromium.org/563008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-02 11:36:37 +00:00
antonm@chromium.org
3ec70cab81 Port caching of lookup followups for interceptors to ARM
Review URL: http://codereview.chromium.org/551191

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-02 11:32:17 +00:00
whesse@chromium.org
7556a16cd2 Change StoreIC interface on x64 to pass receiver in rdx, not on stack.
Review URL: http://codereview.chromium.org/558069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3765 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-02 09:20:19 +00:00
lrn@chromium.org
29229e9b8c Fix a bug that Math.round() returns incorrect results for huge integers.
Review URL: http://codereview.chromium.org/567011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-02 09:14:22 +00:00
kasperl@chromium.org
325d3ef224 Remember to update the write barrier when storing into
the context in the full compiler.

Clobber all input registers in the RecordWrite code
when the debug-code flag is set.
Review URL: http://codereview.chromium.org/569008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-02 07:58:09 +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
kasperl@chromium.org
6c605d1fe0 Revert r3758.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3759 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 15:27:51 +00:00
kasperl@chromium.org
5e96a8ca4b Temporarily allocate all function contexts in old space and
force the system to use the full compiler to momentarily get 
better test coverage.

This change will be reverted once the unit tests have finished
running.
Review URL: http://codereview.chromium.org/552257

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 15:16:26 +00:00
kasperl@chromium.org
ae4fd1e54f Avoid using RecordWrite with the context (esi, rsi, cp) as
one of the arguments since this may clobber the register.
Review URL: http://codereview.chromium.org/556101

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 13:20:43 +00:00
ager@chromium.org
05e8784136 Allow the optimizing compiler to use an existing macro assembler.
This is the first towards using the optimizing compiler for split
compilation bailouts.
Review URL: http://codereview.chromium.org/557079

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 13:07:53 +00:00
yurys@chromium.org
2a8034c8f6 Correctly set eval_from_shared value when new function is created by "new Function(...)". At the moment it's set to the native script where the Function is defined(v8natives.js) which doesn't make much sense for the user when he tries to debug his code. Moreover, it causes an exception in JSONProtocolSerializer.prototype.serialize_.
Related Chromium bug: http://crbug.com/29062
Review URL: http://codereview.chromium.org/551227

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 12:56:56 +00:00
whesse@chromium.org
d450fe1ed3 Remove StoreIC::Generate, and inline StoreIC::GenerateInitialize.
Review URL: http://codereview.chromium.org/558067

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 11:07:41 +00:00
yurys@chromium.org
4963f13f22 Show user script source line that caused exception intead of a line in a native script. When an error is reported as one happened in a native script it's hard to track the original cause. See chromium issue: http://crbug.com/25305
Review URL: http://codereview.chromium.org/555170

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 10:34:57 +00:00
lrn@chromium.org
f03e42b133 Added validating JSON parser mode to parser.
Review URL: http://codereview.chromium.org/549207

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3752 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 10:31:55 +00:00
whesse@chromium.org
866eac3057 StoreIC interface changed on ia32 to take receiver in edx, not on stack.
Review URL: http://codereview.chromium.org/555162

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3750 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 08:35:38 +00:00
kmillikin@chromium.org
5536273594 Add fast code generator visitor.
It does not yet emit code so there is a flag --print-ir to print the
AST as seen by the code generator.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 15:29:33 +00:00
serya@chromium.org
9239bbdd91 Removing redundant stub for runtime native calls.
Review URL: http://codereview.chromium.org/543207

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 12:41:11 +00:00
kmillikin@chromium.org
8588518851 Introduce a stack-allocated structure to encapsulate compile-time information.
Use it to hold the possible shared function info, the possible
receiver, and the compilation loop nesting depth.  Remove loop nesting
from FunctionLiteral AST nodes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 11:55:40 +00:00
kasperl@chromium.org
048fe9b980 RFC: Try to be much more careful with where we skip the write barrier by:
1. Avoid using SKIP_WRITE_BARRIER when we don't have to (smis).
  2. Check and document the remaining uses of SKIP_WRITE_BARRIER.
  3. Only allow GetWriteBarrierMode when in an AssertNoAllocation scope.

The only functional change should be in DeepCopyBoilerplate where we
no longer use the write barrier mode (because of allocations). I'm
running benchmarks to see if this has a measurable impact on performance.
Review URL: http://codereview.chromium.org/558041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 11:46:55 +00:00
sgjesse@chromium.org
2498d5cb7b Fix debug build breakage from r3740
TBR=lrn@chromium.org
Review URL: http://codereview.chromium.org/555161

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3742 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 11:34:37 +00:00
sgjesse@chromium.org
0528427a1b Change to src/x64/assembler-x64.h missing from r3740
TBR=lrn@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3741 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 10:56:26 +00:00
sgjesse@chromium.org
8ced9b99be Port direct call from JavaScript to native RegExp to x64
Code tested on both Linux and Windows.

Added a bit more abstraction to calling a C function from generated code.

Minor tweaks to the ia32 version.
Review URL: http://codereview.chromium.org/548179

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 10:33:27 +00:00
kmillikin@chromium.org
e7528c4ac6 Propagate receiver from initial call site to code generator.
When doing lazy compilation of methods, allow the code generator to know the
(initial) receiver at the (initial) call site.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3739 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 09:52:51 +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
whesse@chromium.org
e9263697cb Remove some unneeded restorations of a register in StoreIC.
Review URL: http://codereview.chromium.org/548181

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 14:01:14 +00:00
ager@chromium.org
fa4954a42b Remove unsafe and unneeded logging during deserialization.
Review URL: http://codereview.chromium.org/558018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3736 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 13:05:29 +00:00
kaznacheev@chromium.org
432caaf14e Use registers to pass arguments to GenericBinaryOpStub (x64).
This is a port to x64 of the following CLs:

http://codereview.chromium.org/554062 (use registers at all)
http://codereview.chromium.org/555098 (use registers for MUL, DIV and virtual frames)
http://codereview.chromium.org/556019 (optimize register order)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 12:45:14 +00:00
whesse@chromium.org
8999064435 Move a line, in codegen-*.cc. Make formatting of ic-*.cc uniform.
Review URL: http://codereview.chromium.org/552210

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 12:41:27 +00:00
sgjesse@chromium.org
ef4b110620 Fix typo.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/554114

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3731 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 10:46:58 +00:00
kasperl@chromium.org
7db4279d22 Add missing break.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/548178

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3730 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 09:08:01 +00:00
kasperl@chromium.org
0b13c6be28 Strengthen a few assertions and add zapping of allocated
memory blocks filling them out with recognizable non-zero
bit pattern in debug mode.
Review URL: http://codereview.chromium.org/558016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 08:46:56 +00:00
ager@chromium.org
9879490308 Implement SUB and BIT_NOT unary operations in full codegenerator.
This change depends on landing the BIT_NOT unary op stub on arm. That
change is out for review.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3727 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 08:15:00 +00:00
ager@chromium.org
ed224fc1dc Port bit not unary op stub to ARM.
Review URL: http://codereview.chromium.org/552188

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 08:14:19 +00:00
kasperl@chromium.org
25c6b59b1e Make sure to initialize all fields in the special maps
created during bootstrapping. Without this change we 
risk having weird flags set on the map for the null
value (among others), which can lead to crashes.
Review URL: http://codereview.chromium.org/552195

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 20:14:46 +00:00
leonclarke@gmail.com
eaa845804e Get it to compile when ENABLE_LOGGING_AND_PROFILING isn't defined.
I think it currently is defined on all platforms except Android.
Review URL: http://codereview.chromium.org/554101

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 17:10:28 +00:00
sgjesse@chromium.org
5fe8bd9919 Fix 64-bit build on Windows and Visual Studio project files
64-bit version now builds on Windows again in both release and debug mode.

The Visual Studio project files have been updated so that all three configurations work (32-bit, 64-bit and 32-bit with ARM simulator). They all convert from Visual Studio 2005 to Visual Studio 2008.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 16:18:58 +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
whesse@chromium.org
62f3e48d2d Refactor Reference so that SetValue and GetValue pop the reference state.
Review URL: http://codereview.chromium.org/487017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3720 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 14:07:12 +00:00
ricow@chromium.org
80d71c6406 Changed JSObject::DefineGetterSetter to also set the right attributes
when an existing accessor is redefined (a configurable accessor can
potentially be redefined as a non-configurable (i.e., DONT_DELETE)).


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3719 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 13:53:19 +00:00
ricow@chromium.org
7985bf73c8 Set iIsExtensible to true as default in the map.
Review URL: http://codereview.chromium.org/556041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 13:51:04 +00:00
ager@chromium.org
68f537d2b1 Port code to load an integer directly from a heap number from ia32 to x64.
For now, this is a direct port from ia32, so there is probably still
stuff that can be improved here.
Review URL: http://codereview.chromium.org/555131

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 13:34:29 +00:00
kmillikin@chromium.org
f866a574ae Enable references and assignments to lookup slots in the toplevel code
generator.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 12:14:26 +00:00
whesse@chromium.org
93f5cb2cd4 Move heap numbers directly to VFP3 registers in comparison stub.
Review URL: http://codereview.chromium.org/556020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 12:13:32 +00:00
erik.corry@gmail.com
10fdd6509b Add counters for the different code generators.
Review URL: http://codereview.chromium.org/552184

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 11:08:32 +00:00
erik.corry@gmail.com
90045ddd5e Another step on the way to context snapshots. We can now refer to
objects in the startup heap from a partial snapshot.  This happens
through the partial snapshot cache.  A startup snapshot and a
partial snapshot are created together so that the startup snapshot
contains the partial snapshot cache entries needed.
Review URL: http://codereview.chromium.org/548149

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 08:25:48 +00:00
kmillikin@chromium.org
97e3aae5ef Refactoring and small optimization of the smi code for binary op stubs
on ia32.

1. Operate on the values in edx,eax when possible (all operations
except DIV and MOD).  This saves moving them on entry and when falling
out to the non-smi code.

2. Do not perform ADD and SUB before the smi check of their inputs.
This saves undoing the operation in the case that we fall through to
the non-smi case due to non-smi inputs (probably common?), and we can
avoid emitting the smi check code twice (code size reduction).

3. Don't perform OR twice (once to smi check the inputs and once to
smi check the result).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3712 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-26 14:43:40 +00:00
ager@chromium.org
400b62a1f7 Implement unary addition in the full (non-optimizing) code generator.
Review URL: http://codereview.chromium.org/555099

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3711 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-26 13:57:11 +00:00
sgjesse@chromium.org
cf78ed05ee Don't pass the "at start" parameter to native RegExp
As the start index is already passed it is easy to calculate the "at start" boolean in generated code. Also as direct entry has been implemented this needs to be done in generated code anyway, and therefore might as well be moved to the generated code for RegExp. The "at start" value is now calcualted as a local variable on the native RegExp frame based on the value of the start index argument.

The x64 version have been tested on both Linux and 64-bit Windows Vista.

For ARM I have tested cctest/test-regexp on ARM hardware, but the rest of the tests have only been run on the ARM simulator.
Review URL: http://codereview.chromium.org/554078

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-26 11:08:42 +00:00
kaznacheev@chromium.org
c33dfa5a1d Support register arguments in more cases.
1. MUL and DIV on SMIs.
2. When calling GenericBinaryOpStub from a virtual frame.
3. When generating code for a loop counter.
Overall performance gain is about 0.6%.
Review URL: http://codereview.chromium.org/555098

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3708 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-26 10:27:27 +00:00
erik.corry@gmail.com
2f0ad64db9 Increase young generation size on Android.
Review URL: http://codereview.chromium.org/556018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3705 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-26 10:03:44 +00:00
whesse@chromium.org
439ab839ba Load HeapNumbers directly into floating-point registers in BinaryOpSlowCase.
Review URL: http://codereview.chromium.org/549147

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-26 09:31:40 +00:00
antonm@chromium.org
29af9c54a4 Merge ObjectIterator::has_next and ObjectIterator::next methods.
This reduces chances of improper usage, see http://code.google.com/p/v8/issues/detail?id=586
for more details.

BUG=586

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-25 22:53:18 +00:00
kaznacheev@chromium.org
921540510c Fixing style issues in codegen-ia32.*
See Kevin's comments for http://codereview.chromium.org/554062.
Review URL: http://codereview.chromium.org/543193

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-25 17:47:53 +00:00
kaznacheev@chromium.org
e138669a1f Fixing an assertion fail introduced in 3692.
Also fixing some formatting issues.
Review URL: http://codereview.chromium.org/556002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-25 17:03:34 +00:00
ager@chromium.org
dc08ccebaa Actually land the platform-solaris.cc file for solaris support.
Review URL: http://codereview.chromium.org/545125


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3693 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-25 16:48:53 +00:00
kaznacheev@chromium.org
36477ee160 Use registers to pass arguments to GenericBinaryOpStub.
Currently arguments are never passed on registers (due to the way ArgsInRegistersSupported is written) and
if they were, the stub would break in several places because registers are not preserved properly in the
course of execution. This CL makes use of registers more often (than never) and makes sure that registers are
handler properly.
A peformance gain is small (0.2-0.3%) but stable.
This CL was extracted from the one sent out earlier (http://codereview.chromium.org/551093).

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3692 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-25 16:00:03 +00:00
lrn@chromium.org
bfcbc10c7d Fix bug in character-set merging. Add test case.
See Chromium bug 32637.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3689 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-25 12:56:49 +00:00
ager@chromium.org
cd51fcd35f Land patch to add Solaris platform support.
Patch by Erich Ocean and Ryan Dahl.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-25 12:37:31 +00:00
whesse@chromium.org
f88e7e82b7 Add vstr and vldr floating point load and store to ARM assembler, disassembler, and simulator.
Review URL: http://codereview.chromium.org/545155

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3687 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-25 11:54:10 +00:00
lrn@chromium.org
76774115c0 Ported SubStringStub to X64.
Review URL: http://codereview.chromium.org/555049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-25 08:55:08 +00:00
kasperl@chromium.org
4f087f279d Change the candidate version on bleeding_edge from 2.0.7 to
2.1.0. This means that the next version pushed to trunk will
be the first version in the 2.1.x series. 
Review URL: http://codereview.chromium.org/551139

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3682 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-25 08:28:39 +00:00
fschneider@chromium.org
4d3a5968a5 Inline smi code in count operations in the full code generator.
We now test for a smi before calling ToNumber and inline
the smi increment/decrement for ++ and --. There only a small
increase in code size but loops in top-level code are
becoming much faster as a result.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-22 14:07:25 +00:00
antonm@chromium.org
c7445d9284 Make KeyedLoadIC::generic_stub go into slow case if receiver has an indexed interceptor.
BUG=589,27967.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-22 13:56:12 +00:00
mikhail.naganov@gmail.com
40fd97c87d A follow-up to fix 553: really report function object moves.
As an afterthought, I realized that I put function objects moves
reporting into a method that deals with only code object moves.  I've
looked up that function objects are allocated in old pointer space and
new space, so I moved logging to the corresponding VM methods.

BUG=553

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-22 09:42:24 +00:00
sgjesse@chromium.org
69915136fa Add support for two byte strings in direct call to RegExp
The stub for calling RegExp directly now also handles two byte strings.

Support for flat cons strings added for both ascii and two byte.

Some code code simplifications and added a few constants.
Review URL: http://codereview.chromium.org/545151

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-22 08:31:33 +00:00
peter.rybin@gmail.com
b400427e10 Fix disable_break parameter
Review URL: http://codereview.chromium.org/552068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-21 17:41:17 +00:00
mikhail.naganov@gmail.com
999e3fca90 Fix issue 553: function frame is skipped in profile when compare stub is called.
The problem appeared due to a fact that stubs doesn't create a stack
frame, reusing the stack frame of the caller function. When building
stack traces, the current function is retrieved from PC, and its
callees are retrieved by traversing the stack backwards. Thus, for
stubs, the stub itself was discovered via PC, and then stub's caller's
caller was retrieved from stack.

To fix this problem, a pointer to JSFunction object is now captured
from the topmost stack frame, and is saved into stack trace log
record. Then a simple heuristics is applied whether a referred
function should be added to decoded stack, or not, to avoid reporting
the same function twice (from PC and from the pointer.)

BUG=553
TEST=added to mjsunit/tools/tickprocessor

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-21 16:42:41 +00:00
antonm@chromium.org
d587851d7f Fix map compact implementation.
Always invoke HeapObjectIterator::has_next() before invoking HeapObjectIterator::next().
This is necessary as ::has_next() has an important side-effect of going to the next
page when current page is exhausted.

And to find if pointers are encodable use more precise data---top of map space, not a number
of pages, as pages might stay in map space due to chunking.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3672 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-21 14:22:28 +00:00
erik.corry@gmail.com
3feb7e801f Fix Android build.
Review URL: http://codereview.chromium.org/545153

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3671 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-21 13:59:15 +00:00
lrn@chromium.org
9c6335929b Implement inline string compare on ARM.
Backport optimizations from x64 version to ia32.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-21 12:10:56 +00:00
erik.corry@gmail.com
399be5ee13 Revert previous change that activated the full (non-optimizing)
compiler for all code.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3669 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-21 11:28:11 +00:00
erik.corry@gmail.com
c8b3127fcc Enable full (non-optimizing) compiler for testing purposes.
I will revert when the bots have picked this one up.
Review URL: http://codereview.chromium.org/549118

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3668 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-21 11:15:02 +00:00
erik.corry@gmail.com
c80cba3bcc Add the for statement back into the set of things the
non-optimizing compiler can cope with.  By default it bails out
to the old compiler on encountering a for loop (for performance)
but with this change the --always-fast-compiler flag will enable
functions with for loops to be compiled in the non-optimizing
compiler.  Also enables the non-optimizing compiler on functions
that can be lazily compiled (again only with the flag).
Review URL: http://codereview.chromium.org/552065

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3667 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-21 08:31:16 +00:00
whesse@chromium.org
04e9399694 Fix V8 issue 580: Arithmetic on some integer constants gives wrong anwers.
Review URL: http://codereview.chromium.org/545134

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-20 17:01:34 +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
fschneider@chromium.org
c757fa4604 Refactor GenericBinaryOperation and its helper functions to always return a Result.
This is a preparation step for including number type information
in the virtual frame. We need a common place where we can update
the number type information of the result of a binary operation
since we should not modify the state of the virtual frame elements
directly.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-20 16:13:53 +00:00
kmillikin@chromium.org
6ad58b53f4 Rename the toplevel code generator from "Fast" to "Full". It was
always ambiguous whether it tried to generate fast code, or generate
it quickly.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-20 15:51:03 +00:00
vitalyr@chromium.org
80c81d96d4 Fix issue 582: preserve construct stub on first allocation in case we can't optimize it.
BUG=582
TEST=cctest/test-api/NativeFunctionConstructCall

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-20 14:43:12 +00:00
kmillikin@chromium.org
453d0a136b Add the unary operators ADD and SUB to the code generator selector.
Review URL: http://codereview.chromium.org/548069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3658 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-20 09:55:32 +00:00
antonm@chromium.org
7baf8bdee6 Temporary disable map compact functionality.
TBD=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 23:03:37 +00:00
antonm@chromium.org
6619154580 A simple test for map compact.
Review URL: http://codereview.chromium.org/543113

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3655 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 16:34:37 +00:00
sgjesse@chromium.org
f9b80f139c Add conditional counter update to IA-32
Review URL: http://codereview.chromium.org/554001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3652 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 14:17:34 +00:00
sgjesse@chromium.org
67f9e191f9 Fix some usage of "this" in builtins
The implementation of Object.prototype.valueOf and Object.prototype.toString now calls ToObject on "this" as mandated by the spec.
Review URL: http://codereview.chromium.org/542112

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3651 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 14:15:47 +00:00
antonm@chromium.org
73390e61ca Make tests pass.
TBR=kmillikin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3648 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 13:26:40 +00:00
antonm@chromium.org
d89bc5322a Fix a build.
Some tests still fail.

TBR=ager@chromium.org


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 13:15:52 +00:00
ricow@chromium.org
4667efc0df Added Extensible property to objects and made methods for extracting and setting it.
Also added one method to runtime to get the extensible value
Additionally, added a check on the number of arguments in the start of GetOwnProperty.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 12:56:36 +00:00
kmillikin@chromium.org
3e8539d873 First step of refactoring expression contexts in the toplevel code
generator.

Contexts are no longer stored in the AST but in the code generator's
state.  This means that the running the code generator selector is not
required to use the toplevel code generator (for instance, if we
already know that we can and should use it).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 12:41:02 +00:00
lrn@chromium.org
712d108ebf X64: Fix bug that reads from rax instead of correct register.
Crashes if rax doesn't point to readable memory.
Recent change made rax contain garbage due to write-barrier computation.
(The fact that it hasn't crashed before highly suggests that the line does nothing.)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3644 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 12:27:04 +00:00
vitalyr@chromium.org
ca564dcd54 Fixed issue 582: set the right construct stub for native functions.
TEST=cctest/test-api/NativeFunctionConstructCall
BUG=582

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3643 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 10:32:20 +00:00
kmillikin@chromium.org
6f91d1bfd6 Add missing break in continue.
TBR=fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3640 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 23:18:09 +00:00
kmillikin@chromium.org
35c85237f0 Fix a bug in the short-circuit logical operations in the toplevel
code generator.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3636 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 16:23:24 +00:00
mikhail.naganov@gmail.com
37d3972429 Fix issue 571: display descriptive names for code objects from snapshot.
As this is only needed for internal profiling (not for DevTools),
the following approach had been chosen:

 - during snapshot creation, positions of serialized objects inside
   a snapshot are logged;

 - then during V8 initialization, positions of deserealized objects
   are logged;

 - those positions are used for retrieving code objects names from
   snapshot creation log, which needs to be supplied to tick processor
   script.

Positions logging is controlled with the new flag: --log_snapshot_positions.
This flag is turned off by default, and this adds no startup penalty.

To plug this fix to Golem, the following actions are needed:

 - logs created using 'mksnapshot' need to be stored along with VM images;

 - tick processor script needs to be run with '--snapshot-log=...' cmdline
   argument.

BUG=571

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3635 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 16:04:25 +00:00
peter.rybin@gmail.com
5d60fa7ac8 Implement issue 549 Make V8 call DebugMessageDispatchHandler with Locker locked
Review URL: http://codereview.chromium.org/505025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3634 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 15:48:41 +00:00
sgjesse@chromium.org
8707b36233 Fix GC bug
The patching of the receiver added in r3616 was not GC-safe and could leave a failure object in place of the receiver if allocation of the wrapper JS object failed.
Review URL: http://codereview.chromium.org/546068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3633 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 14:13:58 +00:00
sgjesse@chromium.org
ef0743abd7 Trace command in ARM simulator debugger
The ARM simulator debugger now has a 'trace' command which is used to toggle the trace of executed instructions.
Review URL: http://codereview.chromium.org/548068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 14:11:37 +00:00
kmillikin@chromium.org
5e2122c0b1 Fix some of my earlier typos.
TBR=fschneider@chromium.org
Review URL: http://codereview.chromium.org/543106

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 14:09:36 +00:00
kmillikin@chromium.org
9095abb776 Introduce 'top-of-stack caching' to the toplevel code generator by
allowing the value of the rightmost subexpressions to be evaluated
into an accumulator register (eg, eax, rax, or r0) rather than onto
the stack.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 14:04:55 +00:00
lrn@chromium.org
55177a2644 X64 implementation of native ascii string compare.
Review URL: http://codereview.chromium.org/545108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3627 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 11:22:03 +00:00
lrn@chromium.org
eee6c6405e RegExp bitmap test for word character.
Review URL: http://codereview.chromium.org/547024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 09:49:50 +00:00
erik.corry@gmail.com
a5ac66628d Small optimization of ARM compare stub. Reverse all references to
left and right sides of the comparison to reflect reality.  Don't
check explicitly for NaNs when using VFP3 since the compare
operation can signal this case with the v flag.  Use cmp instead
of tst in the fast compilers since tst leaves the v flag unchanged
and thus can only work by accident on non-equality comparisons.
Review URL: http://codereview.chromium.org/551048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 08:36:06 +00:00
peter.rybin@gmail.com
6d7ce68102 Make debugger unloading deferred operation
This CL should make debugger handler setting an asynchronous operation for real.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3624 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 22:40:57 +00:00
peter.rybin@gmail.com
ec86bea132 Implement issue 554 Add "ProcessDebuggerRequests" call to Debug Agent API
Review URL: http://codereview.chromium.org/549057

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3623 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 21:14:56 +00:00
peter.rybin@gmail.com
ccd760ae5d Add diagnostic print to debug agent if it fails to open port
Review URL: http://codereview.chromium.org/549061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 18:11:12 +00:00
mikhail.naganov@gmail.com
a3c0f20035 Submit Object.getOwnPropertyNames patch by Pavel Feldman. See http://codereview.chromium.org/549050.
Add copyright to regression test to fix build broken by r3619.

TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3620 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 15:34:32 +00:00
erik.corry@gmail.com
4a90166dde Implement enough of the partial snapshots that we can deserialize
a single string.
Review URL: http://codereview.chromium.org/536077

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 14:20:31 +00:00
vitalyr@chromium.org
8207788047 Fix ARM build.
TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 13:43:28 +00:00
sgjesse@chromium.org
562f90d375 Ensure correct boxing of values when calling functions on them
When a function is called with a value type as the receiver this is now boxed as an object.

This is a low-impact solution where the receiver is only boxed when required. For IC calls to the V8 builtins values are not boxed and as most of the functions on String.prototype, Number.prototype and Boolean.prototype are sitting there most IC calls on values will not need any boxing of the receiver.

For calls which are not IC calls but calls through the CallFunctionStub a flag is used to determine whether the receiver might be a value and only when that is the case will the receiver be boxed.

No changtes to Function.call and Function.apply - they already boxed values. According to the ES5 spec the receiver should not be boxed for these functions, but current browsers have not adopted that change yet.

BUG=223
TEST=test/mjsunit/value-wrapper.js
TEST=test/mjsunit/regress/regress-crbug-3184.js
Review URL: http://codereview.chromium.org/542087

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3617 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 13:42:32 +00:00
vitalyr@chromium.org
bd06358b93 Optimized calling of C++ builtins (and HandleApiCall
in particular).

  * Called function is passed on the stack instead of
    using a static variable.

  * Builtins that don't need the called function don't
    get it.

  * Made is_construct statically known to HandleApiCall
    by setting custom construct stub for API functions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3613 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 12:25:24 +00:00
fschneider@chromium.org
1cc579ff4e Fix issue 541 and some refactoring of the top-level compiler.
* Refactor VisitProperty to use the platform-specific methods for emitting the IC calls.
* Refactor recording of source positions in the top-level compiler.
* Correct the recorded source positions for assignments and property loads.
* Fix bug on x64 where source positions were not recorded before a calling a call-IC.
* Correct some inconsistencies between IA-32 and X64 top-level code generator.

We now pass all regression tests with 
--always-fast-compiler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3612 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 12:00:59 +00:00
fschneider@chromium.org
d234b0e2ad Fix bug in keyed load stub for strings.
Instead of returning the empty string when indexing
a string out of bounds we now correctly return undefined.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3611 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 12:00:21 +00:00
fschneider@chromium.org
acf74b04a7 Fix a problem when compiling built-ins with the top-level compiler.
Replace runtime call to NumberAdd with call to binary op stub.

Until now the top-level compiler always called a runtime function
for count operations. 

In some places we expected in the JS builtins smis as arguments.
If we perform a count operation before all smis would get converted into
heap numbers by the runtime number add function and result in a runtime 
assert.

Also: Add missing debugger information in the top-level compiler for 
do-while loops.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-14 17:22:59 +00:00
fschneider@chromium.org
102950693b Push to trunk. Now working on 2.0.7.
Review URL: http://codereview.chromium.org/548041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3607 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-14 15:09:43 +00:00
erik.corry@gmail.com
bc334df1a8 * Improve the interface to the memory-reservation functionality.
* Add a test case that generates a serialization of a single flat string.
Review URL: http://codereview.chromium.org/542073

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-14 14:46:31 +00:00
ager@chromium.org
41475c17ff Fix crash when using Object.getOwnPropertyDescriptor on an API defined
callback property.

Return undefined for Object.getOwnPropertyDescriptor on an API defined
callback properties for now.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-14 14:32:19 +00:00
ager@chromium.org
bdf58eda27 Change return type of MapSpace::NeedsCompaction from int to bool.
Fixes compiler warnings on Windows.

TBR=antonm@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3604 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-14 12:51:38 +00:00
ricow@chromium.org
8cf3521acb Removed check on element in case it is undefined in ArrayIndexOf - according to spec this is OK.
Review URL: http://codereview.chromium.org/545056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3603 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-14 12:05:48 +00:00
ager@chromium.org
bfb111b9ed Fix Date.prototype.toISOString for NaN dates and add milliseconds for
compatibility with Safari.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-14 08:55:15 +00:00
antonm@chromium.org
51a0cf8a71 Compact map space when doing mark-sweep if after collection size of map space would
drop below threshold.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 19:16:07 +00:00
kmillikin@chromium.org
9dec8f3c74 Remove an inlined ASSERT made obsolete by r3598.
Review URL: http://codereview.chromium.org/549035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 16:21:06 +00:00
kmillikin@chromium.org
ede65c19a1 Remove a pair of problematic uses of the Reference utility class from
the code generators.

These uses broke the rules of the class because it was safe to do so,
but there was no real reason to do it that way.
Review URL: http://codereview.chromium.org/543041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3598 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 16:01:15 +00:00
ager@chromium.org
9f60238c35 Revert r3583 which seems to degrade performance.
Review URL: http://codereview.chromium.org/536042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 13:26:31 +00:00
fschneider@chromium.org
3dd2420511 Fix bug in top-level code generator with global receiver.
We did not correcty pass the global receiver object in some cases. 
This change fixes this bug on all three platforms.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 12:13:37 +00:00
ricow@chromium.org
19e49e1740 Enabled es5conform tests for new array methods and corrected errors that was discovered by enabling these.
Added new es5 methods:
GetOwnPropertyDescriptor
GetOwnProperty
FromPropertyDescriptor

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 12:10:57 +00:00
kmillikin@chromium.org
39b9f57f19 Cleanup the handling of control flow in the toplevel code generator.
Do abstract the setting and restoring of 'argument' state into a
function that takes arguments.

Do not set the argument state in the code generator unless it
represents arguments to a recursive call to Visit.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3594 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 11:29:08 +00:00
ager@chromium.org
4ed9eb18ea Fix bug in the ARM port of FastNewContextStub. Load the function from
the stack instead of popping it - it is needed by the slow case.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 10:27:54 +00:00
ager@chromium.org
bac8b21ff0 Port FastNewContextStub to x64 and arm.
BUG=551
Review URL: http://codereview.chromium.org/541027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3592 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 08:16:02 +00:00
sgjesse@chromium.org
0d01d17b98 Fix ARM thumb/debug build
Landing http://codereview.chromium.org/548007

TBR=piman@chromium.org
Review URL: http://codereview.chromium.org/549033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3591 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 07:45:53 +00:00
antonm@chromium.org
4377037336 Reverting temporary reverts 3586 and 3588 back.
TBR=kasperl@chromium.org



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 23:42:36 +00:00
antonm@chromium.org
fada07aecc Temporary backing out r3536 to see impact on DOM benchmarks.
TBR=kasperl@chromium.org



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 19:36:09 +00:00
fschneider@chromium.org
fdba189730 Fix a problem with const initialization in the top-level code generator.
When initializing the special local variable containing the reference to the enclosing 
function in named functions we now (correctly) emit an INIT_CONST instead of INIT_VAR,
and we correctly bail out in the top-level code generator.

Also part of this change is adding missing statement position information 
for some statements in the top-level code generator.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3587 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 17:22:57 +00:00
antonm@chromium.org
6cabd63572 Temporary backing out r3538 to see impact on DOM benchmarks.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3586 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 16:57:18 +00:00
erik.corry@gmail.com
612d9b82f0 Add some interfaces to the GC that allow us to reserve space. This is needed
for partial snapshots.  After reserving space we can be sure that allocations
will happen linearly (no GCs and no free-list allocation).  This change also
contains the start of the partial snapshot support, which, however is not yet
completed or tested.
Review URL: http://codereview.chromium.org/545026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 15:16:23 +00:00
ager@chromium.org
b63f5cf4d9 Reapply the parts of revision 3545 that did not work because of broken
fixups code on ARM.
Review URL: http://codereview.chromium.org/545025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3583 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 11:56:19 +00:00
ager@chromium.org
61a1c089e4 Change the ARM fixup code to handle the use of the following
instruction sequence for jumps:

  mov(ip, Operand(target, rmode), LeaveCC, cond);
  bx(ip, cond)

Changed a JS call in the compare stub to a tail call to avoid GC
problems where the pushed return address is not updated on GC.
Review URL: http://codereview.chromium.org/549022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3582 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 11:54:19 +00:00
kmillikin@chromium.org
c891a7a683 Fix lint error. I must have been following the Standard ML style
guide.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3581 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 09:58:50 +00:00
kmillikin@chromium.org
f0b8c2d97a Some cleanup of the toplevel code generator:
* Rename the operation of filling a context with a value.  Formerly it
  was 'Move', now it's 'Apply' so as to avoid confusion with various
  other Moves (eg, in the toplevel codegen, in the macro assemblers).

* Use the abstraction Drop rather than math on the stack pointer.

* Add a predicate on AST expression nodes to abstract a repeated test
  whether we should us a regular (named) IC or a keyed IC.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 08:48:26 +00:00
ager@chromium.org
55b73d9415 Fix variable name when build with oprofile agent.
BUG=572
Review URL: http://codereview.chromium.org/549020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 08:31:00 +00:00
ager@chromium.org
c1cafb7cf1 Port FastNewClosureStub introduced for ia32 in r3477 to x64 and arm.
BUG=552
Review URL: http://codereview.chromium.org/543010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 07:16:49 +00:00
sgjesse@chromium.org
658ca2f174 Add missing instructions to the IA-32 disasembler
Added newly added instructions to test-disasem-ia32.cc and implemented the missi
ng ones in the disasembler.

Added some asserts to 8-bit instructions which only work with eax, ebx, ecx and
edx (al, bl, cl and dl).

Removed the loope instruction.
Review URL: http://codereview.chromium.org/548002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-11 15:19:53 +00:00
fschneider@chromium.org
c860533020 Added two missing instructions to disassembler.
The subb and the loop instructions are also added to the IA-32 disassembler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3576 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-11 12:59:17 +00:00
christian.plesner.hansen@gmail.com
41e1d6a6a5 Added ScriptData::HasError.
Review URL: http://codereview.chromium.org/542010


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-11 12:13:24 +00:00
ager@chromium.org
35fae75f01 Fix wrong assert in compare stub minor key computation.
TBR=erik.corry
Review URL: http://codereview.chromium.org/536010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-11 07:35:32 +00:00
sgjesse@chromium.org
8c2620112c Fixed wrong cmov operand order
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/518082

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3572 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-08 14:17:26 +00:00
erik.corry@gmail.com
1670dce1bf Fix same Windows compiler error in another place.
Review URL: http://codereview.chromium.org/518081

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3571 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-08 13:48:27 +00:00
erik.corry@gmail.com
a5247c039c Fix Windows build.
Review URL: http://codereview.chromium.org/527031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3570 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-08 12:42:58 +00:00
sgjesse@chromium.org
91cfb3730a Add generated code for ascii string comparison
Careted a stub for string comparison and used part of the code from that to inline string comparison in the compare stub.
Review URL: http://codereview.chromium.org/525115

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3569 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-08 11:58:15 +00:00
lrn@chromium.org
2cb1f8271f Fix potential length-miscalculation in %StringBuilderConcat.
Review URL: http://codereview.chromium.org/521074


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3568 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-08 11:27:37 +00:00
erik.corry@gmail.com
dcd89af437 Lint, schmlint!
Review URL: http://codereview.chromium.org/525114

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3567 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-08 10:41:25 +00:00
erik.corry@gmail.com
eb6b3f601a Speed up compares with characters ie single-character strings.
Make use of it when we know that something can't be a NaN.
Review URL: http://codereview.chromium.org/524059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-08 09:54:11 +00:00
ager@chromium.org
d73f2efcf3 Inline a number of simple date computations.
The minifier has been updated to have better recognition of regular
expressions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3565 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-08 07:49:07 +00:00
lrn@chromium.org
46504c1557 Attempt to make \b\w+ faster. Slight performance increase on, e.g., string unpacking.
Review URL: http://codereview.chromium.org/507051


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 19:01:23 +00:00
lrn@chromium.org
40d6cbca89 Forgot patch to make it compiler on Linux.
Review URL: http://codereview.chromium.org/525087


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3562 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 14:04:56 +00:00
sgjesse@chromium.org
db64cd9a75 Fix wrong asserts from r3554
Review URL: http://codereview.chromium.org/523128

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3561 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 13:17:37 +00:00
lrn@chromium.org
dddadf9f7e Fixed potential length miscalculations by limiting max size of arrays and strings.
Review URL: http://codereview.chromium.org/525064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 13:17:18 +00:00
fschneider@chromium.org
c4416d628d Fix runtime function StringCharAt where an argument was not checked.
Review URL: http://codereview.chromium.org/523126

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3559 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 12:31:45 +00:00
kasperl@chromium.org
3321d06ccd Make String.prototype.replace a tiny bit faster by avoiding
ToString conversions for strings.
Review URL: http://codereview.chromium.org/518059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3558 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 12:18:56 +00:00
fschneider@chromium.org
714dfeaece Fix x64 and arm build.
Review URL: http://codereview.chromium.org/524058

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 11:38:43 +00:00
fschneider@chromium.org
903301248e Improve keyed loads on strings by using a new stub.
Instead of going through a runtime function for keyed loads
on strings we invoke a separate specialized stub that
assumes string as receiver type and the key to be a number.

The stub calls a JS builtin function to return the corresponding one-character string.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 10:25:20 +00:00
ricow@chromium.org
33079fb851 Added ES5 15.2.3.2 Object.getPrototypeOf.
Review URL: http://codereview.chromium.org/523124

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3555 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 10:01:24 +00:00
sgjesse@chromium.org
3d36c712aa Use generated code to create sub strings.
Added a stub to allocate and fill a string object with a substring from another string.

Use the rep movs instruction to copy the string data as it turned out to be the fastest way.

While preparing this I experimented with some SSE2 instructions, so the instructions movdqa and movdqu are still in the IA-32 assembler even though they are not used.
Review URL: http://codereview.chromium.org/525085

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3554 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 09:59:37 +00:00
kasperl@chromium.org
060711ab37 Improve the performance of String.prototype.concat and the slow-case
for compare operations.
Review URL: http://codereview.chromium.org/521054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3553 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 09:40:50 +00:00
kasperl@chromium.org
ba9b59d51f Quick fix to ARM fixup issue introduced in r3545. The fixup code
seems somewhat broken on ARM, but this solves the issue for now.
I'll look into the code patching tomorrow.
Review URL: http://codereview.chromium.org/525068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3546 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-06 15:50:34 +00:00
kasperl@chromium.org
1fdbaa1d10 Improve performance of Array.prototype.join and String.prototype.substring
by tweaking the JavaScript implementation of these functions.
Review URL: http://codereview.chromium.org/519061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-06 14:40:21 +00:00
sgjesse@chromium.org
99fbea324b Make the direct call to native RegExp work
Single glitch in r3542 which caused the direct call to native regexp code to always bail out to the runtime system.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-06 12:21:28 +00:00
bak@chromium.org
1f3eba4470 - Adjust the number to string cache based on the max semispace size.
Flushed at compacting mark sweep.
- Simplified FindEntry by eliminating the counter.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-06 11:19:28 +00:00
sgjesse@chromium.org
429f3cf9f2 Direct call to native RegExp code from JavaScript.
Calls to RegExp no longer have to be via a call to the runtime system. A new stub have been added which can handle this call in generated code. The stub checks all the parameters and creates RegExp entry frame in the same way as it is created by the runtime system. Bailout to the runtime system is done whenever an uncommon situation is encountered or when the static data used is not initialized. After running the native RegExp code the last match info is updated like in the runtime system.

Currently only ASCII strings are handled.

Added another argument to the RegExp entry frame. It indicated whether the call is direct from JavaScript code or through the runtime system. This information is used when RegExp execution is interrupted. If an interruption happens when RegExp code is called directly a retry is issued causing the interruption to be handled via the runtime system. The reason for this is that the direct call to RegExp code does not support garbage collection.
Review URL: http://codereview.chromium.org/521028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-06 11:09:30 +00:00
kasperl@chromium.org
8618b9846b Update the result size for ResolvePossiblyDirectEval from 1 to 2
following the change submitted in r3533.
Review URL: http://codereview.chromium.org/525063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-06 09:22:36 +00:00
bak@chromium.org
0ba452b5c6 - Fixed a bug in the array concat implementation causing the elements in the result to be lost.
Review URL: http://codereview.chromium.org/523055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-05 12:33:55 +00:00
fschneider@chromium.org
e06c581232 Use cmov instructions to avoid some conditional branches in stub code.
This change improves the ConstructStub and the ArgumentsAccessStub slightly
by using the cmov instruction (if available) to eliminate a 
conditional branch. It only applies to the IA-32 and X64 platforms.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3537 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-05 12:02:18 +00:00
bak@chromium.org
9f0997f9bf Added rehashing of hash tables when there are too many deleted elements.
Review URL: http://codereview.chromium.org/525024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3536 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-05 11:38:36 +00:00
kmillikin@chromium.org
b74ab45077 Simplify checking during allocation when Heap::always_allocate() is
true.  The rules are:

1. Heap::AllocateRaw can normally handle allocation requests in new
   space even when always_allocate() is true.  It properly retries
   failed allocation in the second 'retry' space.

2. Heap::Allocate can normally handle allocation requests in new
   space.

3. We only need to check always_allocate() when explicitly requesting
   allocation in new space via Heap::new_space().AllocateRaw().

4. The exception to these rules is fixed arrays with size such that
   MaxObjectSizeInPagedSpace < size <= MaxObjectSizeInNewSpace (ie,
   those that will be allocated in new space and promoted to large
   object space).  They cannot be allocated in new space via
   Heap::Allocate or Heap::AllocateRaw, because the retry logic does
   not know to allocate extra remembered set bits when retrying in
   large object space.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-05 11:30:05 +00:00
kmillikin@chromium.org
a1bf879720 More cleanup of slot handling in the nonoptimizing code generator.
Rename CreateSlotOperand so that it's clear it can emit code.  Use it
where possible.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3534 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-05 11:29:27 +00:00
kasperl@chromium.org
15fe7a8ad6 Make the ResolvePossiblyDirectEval faster by avoiding the
stack traversal code.
Review URL: http://codereview.chromium.org/523051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-05 09:38:02 +00:00
kmillikin@chromium.org
b74daccff0 Style cleanup of switches over Slot::Type in the nonoptimizing code
generator.

The Slot::Type enumeration has four values.  It should never be
necessary to use a default to handle the case of a value out of range
of the enumeration.  Doing so silences a useful warning when one of
the enumeration values is actually forgotten or when a new enumeration
value is added.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3532 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-05 09:11:10 +00:00
fschneider@chromium.org
1902b76227 Improve count operation in top-level compiler on ARM.
Save one instruction by using stm instead of push.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-04 14:15:47 +00:00
fschneider@chromium.org
637a21952f Added general pre- and postfix count operations to top-level compiler.
Until now we only supported postfix operations on global variables.
This change add generic count operations to the top-level compiler.

I tried to re-use code from the code generator used for assignment expressions
where possible.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-04 13:56:31 +00:00
kasperl@chromium.org
88ba93d9db Remove unused function and function declaration.
Review URL: http://codereview.chromium.org/523036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3529 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-04 11:24:03 +00:00
fschneider@chromium.org
fd03f6c153 Faster handling of string indexing using [] with a SMI index.
Instead of falling back to calling GetObjectProperty we call GetCharAt
directly if the object is a string and the key in a SMI.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3528 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-28 13:01:03 +00:00
kasperl@chromium.org
e56e84bff6 Second attempt at fixing issue 559.
Review URL: http://codereview.chromium.org/519007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-28 09:21:23 +00:00
kasperl@chromium.org
09805c6962 Land http://codereview.chromium.org/509029 (slightly simplified).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-28 08:19:23 +00:00
fschneider@chromium.org
f7ef880041 Use a loop in generated code to allocate stack slots for function with many local variables.
If a function contains more than a certain number of locals (IA32: 9, X64: 6, ARM: 4) 
a loop for initializing the locals with 'undefined' is more compact. 
For less locals we unroll that loop by emitting a sequence of push instructions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-23 15:06:21 +00:00
bak@chromium.org
c3fa79ab2b - Reordered the instructions in the inlined allocation code to space dependent instructions.
- Replaced the or instruction with lea. 

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-23 13:27:58 +00:00
kmillikin@chromium.org
c114f17efa When promoting objects during a copying collection, promote all
non-large objects that cannot contain non-map-word pointers to other
heap objects into the old data space.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3519 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 13:34:02 +00:00
kasperl@chromium.org
afabb5a9bc Make the FastCloneShallowArrayStub a bit prettier.
TBR=fschneider@chromium.org
Review URL: http://codereview.chromium.org/507069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 13:10:24 +00:00
ager@chromium.org
2409b4b7ba Revert r3514 and r3515. The new cache is too large for some tests
that attempt to run with a small heap.  Additionally, it can
potentially keep a lot of string data alive and it is never flushed.
Can we make it grow dynamically if used so that we can still start the
VM with a small heap size?
Review URL: http://codereview.chromium.org/503081

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 13:07:27 +00:00
fschneider@chromium.org
735aee05f0 Use one runtime call for creating object/array literals in
the code generator.

The runtime function checks if it needs to create a boilerplate
object or if it can clone from an existing boilerplate.

This is already done in the top-level compiler. 

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3516 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 12:41:45 +00:00
kasperl@chromium.org
f034c31bb2 Fix linto.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 12:39:56 +00:00
bak@chromium.org
6742d62c30 - Increased size of number string cache.
- Change the instruction order for inlined allocation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3514 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 11:35:05 +00:00
kasperl@chromium.org
6ca5876419 Add fast case stub for BIT_NOT.
Review URL: http://codereview.chromium.org/503079

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 10:16:27 +00:00
ager@chromium.org
af6971d883 Check for undefined in the binary operation stub when convertion to
int32 for bitops.  undefined converts to zero in ToInt32 conversions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3512 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 09:48:55 +00:00
kasperl@chromium.org
8d6a8e2451 Very experimental fix for issue 555.
Review URL: http://codereview.chromium.org/508006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-21 15:09:26 +00:00
erik.corry@gmail.com
14975f3dd0 Optimize implementation of Math.floor a little by special casing
the comparison it uses in the code generator.  Use Math.floor for
date operations.
Review URL: http://codereview.chromium.org/509007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-21 15:04:00 +00:00
ager@chromium.org
fc26307487 Remove complicated Math.sin and Math.cos optimizations that do not buy
us much.
Review URL: http://codereview.chromium.org/509006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-21 13:30:10 +00:00
ager@chromium.org
827575b0e9 Optimize sine and cosine by checking up front if the fsin or fcos
operation can throw an exception.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-21 12:08:59 +00:00
kasperl@chromium.org
9c627d6ba3 The number of heap slots stored in a scope includes the
fixed contexts slots. Take this into account when using
the new, fast context creation path to avoid allocating
too many slots (wasteful).
Review URL: http://codereview.chromium.org/501148

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3505 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-21 10:24:11 +00:00
erik.corry@gmail.com
73fcafd650 Bring back the fisttp instruction on machines with SSE3, but check the
input so we don't have to check the exception flags afterwards.
Review URL: http://codereview.chromium.org/509001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-21 08:32:20 +00:00
kmillikin@chromium.org
e1b13fc351 Disallow garbage collection at another site in the LoadCallback ICs.
MacroAssembler::PopHandleScope emits a runtime call (through a stub),
which should not be allowed to perform a GC but return a failure
instead.

BUG=30790
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-20 08:40:13 +00:00
peter.rybin@gmail.com
d3e63a319b Reapply "wait for connection" feature implementation
Review URL: http://codereview.chromium.org/491079


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3500 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 20:30:29 +00:00
kasperl@chromium.org
64e443768e Recommit r3494 after fixing stupid mistake where the deferred code stub didn't know it was reversed.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 13:47:58 +00:00
lrn@chromium.org
9b0a967cae Fast-codegen: Adding support for try/catch and throw.
Still no support for lookup-variables, so we bailout if using the catch variable.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3498 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 13:38:28 +00:00
antonm@chromium.org
f8b9e6dd5b Force mark sweep instead of compcation if size of map space is too big to allow forward pointers encoding.
Review URL: http://codereview.chromium.org/507025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3497 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 13:38:09 +00:00
kasperl@chromium.org
12866185ea Revert r3495 - some weird corner case is broken.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 13:14:37 +00:00
kasperl@chromium.org
0b4e755047 Improve code generated for left shifts where the left side
is a constant by avoiding a few checks.
Review URL: http://codereview.chromium.org/504057

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 13:07:02 +00:00
kasperl@chromium.org
56a6b0cdff Convert the rest of the sar(xxx, kSmiTagSize) to SmiUntag(xxx).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 11:20:25 +00:00
kasperl@chromium.org
546b99b79f Refactor smi tagging and untagging on IA-32.
Review URL: http://codereview.chromium.org/501113

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 11:13:33 +00:00
erik.corry@gmail.com
0553c7feb9 Optimize bitops with non-Smi inputs. Instead of converting both inputs
to floating point and then converting back we convert directly to a
32 bit integer.  In addition the bit twiddling implementation of float-
to-integer conversion has been ported from ARM.  Testing has shown that
this runs faster than the x87 or SSE3 rounding instructions.  This change
is IA32 only.  There may be a smaller benefit from doing the same on x64.
Review URL: http://codereview.chromium.org/506052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 09:33:24 +00:00
sgjesse@chromium.org
c7c821fdfb Prepare push to trunk. We are now working on version 2.0.6
Review URL: http://codereview.chromium.org/504056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 08:21:21 +00:00
bak@chromium.org
93bbe2acdc added else
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 06:58:45 +00:00
bak@chromium.org
07742f5672 -Inlined double variant of compare iff one of the sides is a constant smi and it is not a for loop condition.
Review URL: http://codereview.chromium.org/507040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 06:38:12 +00:00
iposva@chromium.org
13febb2585 - Handle HeapNumbers in deferred code instead of jumping to stub
for DeferredInlineBinaryOperations.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 01:43:50 +00:00
kasperl@chromium.org
914d4f801d Optimize the allocation of small, non-nested literal
arrays and argument objects on IA-32.
Review URL: http://codereview.chromium.org/503042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3485 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 15:35:15 +00:00
kmillikin@chromium.org
6af6a82ae3 Streamline the calling convention of the call ICs by passing the
property name in a register rather than on the stack below the
receiver and arguments.

Implemented only for IA32, passing the name in the ecx register to
match the calling convention of the load ICs.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3484 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 10:23:20 +00:00
kasperl@chromium.org
a3aa9e96ef Don't bother callling into the ProducerHeapProfile methods
if logging producers is turned off.
Review URL: http://codereview.chromium.org/500092

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 09:16:44 +00:00
kasperl@chromium.org
f4251cc42c Enable fast allocation of context objects on IA-32.
Review URL: http://codereview.chromium.org/507035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 08:53:19 +00:00
sgjesse@chromium.org
44b7c59eb5 Extend the maximum size map space
On 32-bit the maps are now aligned on a 32-byte boundary in order to encode more maps during compacting GC. The actual size of a map on 32-bit is 28 bytes making this change waste 4 bytes per map.

On 64-bit the encoding for compacting GC is now using more than 32-bits and the maps here are still pointer size aligned. The actual size of a map on 64-bit is 48 bytes and this change does not intruduce any waste.

My choice of 16 bits for kMapPageIndexBits for 64-bit should give the same maximum number of pages (8K) for map space. As maps on 64-bit are larger than on 32-bit the total number of maps on 64-bit will be smaller than on 32-bit. We could consider raising this to 17 or 18.

I moved the kPageSizeBits to globals.h as the calculation of the encoding really depended on this.

There are still an #ifdef/#endif in objects.h and this constant could be moved to globaks.h as well, but I kept it together with the related constants.

All the tests run in debug mode with additional options --gc-global --always-compact as well (except for a few tests on which also fails before this change when run with --gc-global --always-compact).

BUG=http://code.google.com/p/v8/issues/detail?id=524
BUG=http://crbug.com/29428
TEST=test/mjsunit/regress/regress-524.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 08:53:18 +00:00
kasperl@chromium.org
51aa605e62 Fix ARM and x64 tests in debug mode after r3477.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/500090

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3480 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 07:35:12 +00:00
iposva@chromium.org
1fa340ff9c - Fix x64 build.
Review URL: http://codereview.chromium.org/500089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 07:18:05 +00:00
iposva@chromium.org
4380812b39 - Undo unfortunate renaming of StaticType.
Review URL: http://codereview.chromium.org/506050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3478 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 06:21:50 +00:00
kasperl@chromium.org
b1721d4c3e Improve performance of allocating closures for nested
functions by allocating them in new space without
entering the runtime system.
Review URL: http://codereview.chromium.org/506037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-16 15:43:20 +00:00
kmillikin@chromium.org
e7fd8bb56e Prepare push to trunk. We are now working on version 2.0.5.
Review URL: http://codereview.chromium.org/502031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-16 15:23:25 +00:00
lrn@chromium.org
482d434f4d Fast codegen: Implement with.
Review URL: http://codereview.chromium.org/491077


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-16 09:51:07 +00:00
yurys@chromium.org
e88df5b792 Ignore debug break events when bootstrapper is active. Collecting debug data when the context is not yet setup may lead to subtle errors like in the following Chromium bug: http://crbug.com/28933
Review URL: http://codereview.chromium.org/497006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3465 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-15 09:17:15 +00:00
kasperl@chromium.org
f0b00d7f02 Do a fast check for undefined values when comparing.
Review URL: http://codereview.chromium.org/496008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-14 12:18:20 +00:00
lrn@chromium.org
9ff5f9daed Fast-codegen: Implementing try/finally on top of nesting context.
Review URL: http://codereview.chromium.org/492002


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-14 11:09:25 +00:00
kasperl@chromium.org
4839eb611f Try to make the contextuality check in the IC code faster
by checking if the receiver is a global object before diving
into traversing reloc info.
Review URL: http://codereview.chromium.org/491075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-14 09:54:13 +00:00
sgjesse@chromium.org
f74429b917 Reverted r3457
Caused compilation errors in cctests and on ARM platform.

TBR=peter.rybin@gmail.com
Review URL: http://codereview.chromium.org/491074

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-14 07:51:59 +00:00
peter.rybin@gmail.com
a8cab84e04 Implement "wait for connection" feature
Review URL: http://codereview.chromium.org/489005


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3457 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-13 21:15:02 +00:00
fschneider@chromium.org
4c9874195d Fix lint error.
TBR=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/491063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-11 22:48:14 +00:00
fschneider@chromium.org
c25151faa6 Adding compound assignments to the top-level compiler.
Review URL: http://codereview.chromium.org/486008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-11 16:09:16 +00:00
erik.corry@gmail.com
a4ad7b8bf3 Give the binary op stubs better names to make profiles more informative.
Review URL: http://codereview.chromium.org/488017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-11 10:40:01 +00:00
iposva@chromium.org
fe952d7237 - Ensure the stack trace limit is not negative.
- Enable fuzzing of the CollectStackTrace runtime call.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 18:33:34 +00:00
ager@chromium.org
483828660d Reapply keyed load cache probing in generated code. I introduced a
bug just before committing which broke snapshot builds.  The code is
nearly identical to the previous submit.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 15:10:50 +00:00
lrn@chromium.org
aef02ccccb Fast codegen: Working break and continue.
Started framework for all intra-functional outward control transfers,
including handling of try/finally.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3448 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 14:06:08 +00:00
kmillikin@chromium.org
b4e7472028 Disible the toplevel compiler for code containing for loops.
Review URL: http://codereview.chromium.org/492003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3447 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 13:12:13 +00:00
ager@chromium.org
1a6893cda9 Revert keyed load cache probing in generated code.
Crashes on Windows.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3446 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 12:52:28 +00:00
ager@chromium.org
87496c61aa Probe keyed load cache in generic keyed load stub.
Only implemented on ia32 and x64 for now.  The generic keyed load stub
on arm is falling behind and it is time to fix that, but that will be
a separate change.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3445 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 09:21:23 +00:00
lrn@chromium.org
5e2295574c Fix extra slash typo in comment.
Review URL: http://codereview.chromium.org/487007


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3444 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 08:33:09 +00:00
lrn@chromium.org
c773148bb9 Fix Win64 build problem.
Review URL: http://codereview.chromium.org/475003


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3442 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 16:40:54 +00:00
kmillikin@chromium.org
1d57c13b8c Fix arm and x64 build.
The ApiGetterEntryStub is not implemented on arm or x64, but the
platform-specific implementations need to change to match the change
to the platform-independent signatures.

TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 15:34:57 +00:00
kmillikin@chromium.org
0672938b88 Fix a crash caused by garbage collection during generation of a
callback load (or keyed load) IC.

The problem was that the IC code calls a stub, which can allocate and
thus trigger a GC if the stub is not already generated.  Problem is
solved by adding the ability to "try" to call a stub, trying to
generate the stub code if necessary but signaling an allocation
failure if generating the code is not possible.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 14:54:34 +00:00
vitalyr@chromium.org
41eb2f22d0 External string table.
Instead of weak handles external strings use a separate table.  This
table uses 5 times less memory than weak handles.  Moreover, since we
don't have to follow the weak handle callback protocol we can collect
the strings faster and even on scavenge collections.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3439 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 14:32:45 +00:00
erik.corry@gmail.com
67f6ea675f Add Object.create from ECMAScript5. Supports value, writable, enumerable, get
and set.  Doesn't support configurable yet.  See
http://code.google.com/p/v8/issues/detail?id=460
Review URL: http://codereview.chromium.org/463040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 13:56:58 +00:00
fschneider@chromium.org
4dee8d81bd Create literal boilerplate as part of cloning in the top-level compiler.
When generating code for object and array literals we performed
the check if the a boilerplate already exists in generated code.

In the top-level compiler we now do this check in a new runtime
function. This makes the generated code more compact for top-level code.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 13:06:08 +00:00
erik.corry@gmail.com
264c055b2f Create the framework for adding a thumb2 backend for ARM. See http://codereview.chromium.org/464070
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 12:56:42 +00:00
erik.corry@gmail.com
593c388b39 Fix for bug 512 from Subrato De, CodeAurora.
Review URL: http://codereview.chromium.org/464016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3435 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 11:14:45 +00:00
sgjesse@chromium.org
584cc1732c Perform string add in generated code on X64 platform
This is a port of the IA-32 version from r3400 (http://code.google.com/p/v8/source/detail?r=3400). In the X64 version the additional registers are used to avoid loading the instance type and arguments several times.
Review URL: http://codereview.chromium.org/460109

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 09:35:41 +00:00
erik.corry@gmail.com
db87b6011b Fix subtle bug in Math.min and Math.max with non-Smi zero.
See http://codereview.chromium.org/470001
From sra.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-08 10:18:28 +00:00
lrn@chromium.org
5bbb1d7bd6 Fix for issue 545: don't reuse this VariableProxy.
Review URL: http://codereview.chromium.org/464069


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-08 09:43:51 +00:00
fschneider@chromium.org
2c9b2ab78a Adding ThisFunction expression to top-level compiler.
Review URL: http://codereview.chromium.org/466056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-07 15:10:39 +00:00
kmillikin@chromium.org
0bf2822266 The toplevel code generator assumed that declarations did not shadow
parameters.  This could case the initial value to be lost or worse, a
crash.

Fix by handling the case of a declaration shadowing both
stack-allocated parameters and those in the arguments object.

This is related to V8 issue 540.
http://code.google.com/p/v8/issues/detail?id=540

BUG=29565
Review URL: http://codereview.chromium.org/469006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-07 13:31:47 +00:00
erik.corry@gmail.com
d4787a1855 Performance improvement for Math.max and Math.min
Patch from sra.
http://codereview.chromium.org/470001


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-07 08:38:20 +00:00
christian.plesner.hansen@gmail.com
873b25ba47 Fixed operator precedence bug in heap stat recording.
Review URL: http://codereview.chromium.org/465055


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 14:35:33 +00:00
fschneider@chromium.org
7a3a043eb2 Refactor code for generating assignments in the fast compiler.
1. Refactor the structure of VisitAssignment: The existing code is not ideal 
to be extended with support for compound assignments.

2. Reuse common code for keyed property assigments: Now variables rewritten 
to a property (.arguments access) are treated like normal keyed property
assignments. This allows us to remove some code duplication.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 14:30:27 +00:00
sgjesse@chromium.org
a5aedaea96 Remove passing of argc in r0 when calling builtins on ARM as it is not used
Review URL: http://codereview.chromium.org/466031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 12:17:02 +00:00
kmillikin@chromium.org
7266bd0b9a Fix issue 540 by handling the case that a declaration is in the
arguments object.

See http://code.google.com/p/v8/issues/detail?id=540
Review URL: http://codereview.chromium.org/460070

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 11:59:09 +00:00
sgjesse@chromium.org
f2ad9083ce Prepare push to trunk. Now working on 2.0.4.
Review URL: http://codereview.chromium.org/462034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 11:50:27 +00:00
sgjesse@chromium.org
eabf5c89a9 Add alignment check to object allocated in generated code for x64 and ARM
Review URL: http://codereview.chromium.org/460068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 10:22:41 +00:00
christian.plesner.hansen@gmail.com
cbce986ff0 Changed recording of heap stats on OOM to store data directly in local
variables rather than in a stack-allocated struct.  The struct field
values turned out not to be available in minidumps.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 10:18:30 +00:00
sgjesse@chromium.org
96e70f6b93 String check for binary add on x64 and ARM
The checking for strings when performing binary add was missing on x64 and ARM. This is a prerequisite for adding string add in generated code for these two platforms.
Review URL: http://codereview.chromium.org/465028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 09:58:05 +00:00
sgjesse@chromium.org
f95746cbee Better handling of allocation alignment in generated code
Calculate the aligned size of strings when allocating from generated code using kObjectAlignmentMask

Add native code assert to make sure allocation from generated code keeps alignment.
Review URL: http://codereview.chromium.org/462025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 07:43:40 +00:00
ager@chromium.org
2707fc2eb8 Fix Windows build.
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/466018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3410 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 11:34:45 +00:00
ager@chromium.org
f568fc6d13 Move for-in cache validity check to generated code.
Review URL: http://codereview.chromium.org/464002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 10:24:16 +00:00
christian.plesner.hansen@gmail.com
1d9eac1b7c Added recording of heap and global handle stats in a stack-allocated
struct on fatal out of memory.  This should cause the information to
be included in minidumps so we can get a better idea of the state of
v8 on OOMs.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 10:16:37 +00:00
sgjesse@chromium.org
2cfb4941a1 Move function nan_value to POSIX platform file
Strictly speaking NAN from math.h is not in a POSIX standard but in C99. However it seems that all our POSIX platforms have it.
Review URL: http://codereview.chromium.org/464015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 09:29:21 +00:00
sgjesse@chromium.org
14066c0e0e Check return code from fwrite
BUG=http://code.google.com/p/v8/issues/detail?id=453
TEST=none
Review URL: http://codereview.chromium.org/458016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 08:48:32 +00:00
mikhail.naganov@gmail.com
d84d47961a When executing 'profile' request, delegate to api function, not to internal one.
Review URL: http://codereview.chromium.org/466006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 08:44:33 +00:00
sgjesse@chromium.org
6437fc86cc Add missing function CpuFeaturesImpliedByPlatform to OpenBSD platform file
Review URL: http://codereview.chromium.org/465025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 08:23:10 +00:00
sgjesse@chromium.org
53fbd5932a Perform string add in generated code on IA-32 platforms
This adds a code stub which can do most of what Heap::AllocateConsString can do. It bails out if the result cannot fit in new space or if the result is a short (flat) string and one argument is an ascii string and the other a two byte string. It also bails out if adding two one character strings as Heap::AllocateConsString has special handling of this utilizing the symbol table. The stub is used both for the binary add operation and for StringAdd calls from runtime JavaScript files. Extended the string add test to cover all sizes of flat result stings.
Review URL: http://codereview.chromium.org/442024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 07:56:21 +00:00
kbr@chromium.org
73ebe80bda Fixed register usage in 64-bit version of
KeyedLoadIC::GenerateExternalArray which was causing it to go to the
slow case all the time.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-02 19:26:16 +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
sgjesse@chromium.org
9487ef7b9b Fix adding short external ascii strings
BUG=http://code.google.com/p/v8/issues/detail?id=536
TEST=cctest/test-strings/ExternalShortStringAdd
Review URL: http://codereview.chromium.org/466001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-02 12:58:10 +00:00
sgjesse@chromium.org
508e54d465 Fix debug build
Missed out on reflecting changes to Script object layout in objects-debug.cc.

Also fixed http://codereview.chromium.org/450034/diff/2006/2010.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3394 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-01 15:52:02 +00:00
sgjesse@chromium.org
fc713930ed Remove the last context dependent reference from the Script object
For scripts originating from a call to eval the Script object used to hold a reference to the function from where the eval was called together with the code offset within that function of the eval call. This is used by the stack trace and is part of the debugger protocol. In order to avoid storing the function the script, the position within the script and the name of the function calling eval is stored instead. This avoids holding context dependent objects in the script object.

The calculation of the position of the eval in the script holding the eval is now done when the eval script is compiled as it is not possible to postpone this unless a reference is kept to the generated code for the function calling eval.

BUG=http://code.google.com/p/v8/issues/detail?id=528
TEST=cctest/test-api/Regress528
Review URL: http://codereview.chromium.org/450034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-01 14:36:45 +00:00
erik.corry@gmail.com
a0e12a3124 Fix toLocaleString-related breakage on buildbot.
TBR=ager
Review URL: http://codereview.chromium.org/449055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-01 14:19:23 +00:00
erik.corry@gmail.com
f9e150b78b Speed up join on arrays.
Review URL: http://codereview.chromium.org/457021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-01 12:54:36 +00:00
ager@chromium.org
a8db297d14 Remove some of the cache validity checks for for-in enumeration. We
can check for these cases before caching the property names instead.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-01 10:25:29 +00:00
ager@chromium.org
0ee41eec90 Fix megamorphic load regression on ARM caused by the string
length/hash change.
Review URL: http://codereview.chromium.org/454018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3388 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-01 09:54:47 +00:00
fschneider@chromium.org
5debbc3693 Move CPU-specific constants from debug.h into the platform-specific directories.
The constant for the return sequence length (JSReturnSequenceLength) was
defined in debug.h. Since this constant are also needed outside the debugger code
I moved them into assembler-xxx.h. Otherwise compiling with debuggersupport=off
would fail on ARM.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-30 15:09:49 +00:00
mikhail.naganov@gmail.com
dd38c22699 Add pause / resume profiling commands to debugger protocol.
This allows to profile "unresponsive" web pages in the same way
as it is possible to break into them with the debugger.

BUG=http://code.google.com/p/chromium/issues/detail?id=28689

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3382 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-30 14:56:20 +00:00
fschneider@chromium.org
c76856c292 Introduce flag for using the fast compiler where possible.
We use the fast compiler only for top-level code right now.
When always_fast_compiler is set to true, we compile with
the fast compiler whereever possible.

By default this flag is set to false. 

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-30 13:35:59 +00:00
kasperl@chromium.org
402e356e82 Clear the compilation cache just before starting to do mark-sweep
garbage collections when receiving idle notifications. This allows
us to get rid of source code strings and generated code in the
heap that would otherwise be kept around in idle V8 instances.
Review URL: http://codereview.chromium.org/450007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-30 07:57:32 +00:00
sgjesse@chromium.org
6d163d9fd0 Remove usage of JSArray in Script object
Storing a JSArray in the Script object could cause an indirect reference from the compilation cache to a global object to be created. Now the line ends are only stored as a FixedArrya and when that is needed in JavaScript a JSArray copy is created. Changed some of the JavaScript code to cache the line ends in a local variable for better performance.

BUG=http://code.google.com/p/v8/issues/detail?id=528
TEST=test/test-api/Bug528
Review URL: http://codereview.chromium.org/434117

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3374 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-27 14:10:48 +00:00
sgjesse@chromium.org
5764362d6f Add test to expose bug 528
BUG=http://code.google.com/p/v8/issues/detail?id=528
TEST=cctest/test-api/Bug528
Review URL: http://codereview.chromium.org/443021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-27 07:57:45 +00:00
fschneider@chromium.org
3a21aafa7c Added fast compiler support for calling JS runtime functions.
Also added a simple test that invokes a JS runtime function
in top-level code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-27 00:28:06 +00:00
fschneider@chromium.org
1c90793581 Fix bug in the fast compiler's object literal code
Fixes issue 526:

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

The object literals code in the fast compiler returned an incorrect result 
when getter or setters are defined together with computed properties.

Added a regression test that captures the most reduced version of this
problem. 

Also added a test for object literals with getters/setters and 
prototype properties.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-26 21:13:20 +00:00
lrn@chromium.org
eded148caf Fast-codegen: Arguments object working on all platforms.
This time it's true.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3369 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-26 10:28:32 +00:00
kbr@chromium.org
c135f2de07 Fixed incorrect instruction usage in KeyedLoadIC for byte and word
external array types. Added regression test based on real-world
failing code and verified that it would have caught this error.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 20:29:11 +00:00
ager@chromium.org
7a6ebbdd6d Do not crash if a V8 extension fails to compile or throws an exception
when the code is run.

Instead, return an empty context handle so the failure to create a
context can be handled.

BUG=http://crbug.com/28486
Review URL: http://codereview.chromium.org/442005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3364 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 16:46:56 +00:00
mikhail.naganov@gmail.com
2af151ee63 Include getters and setters callbacks invocations in CPU profiler log.
Logging getters and setters from DOM API is extremely useful for web
developers as setting (and getting!) several properties can cause
page relayouts which take significant time.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3363 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 16:39:18 +00:00
antonm@chromium.org
93d6199de0 When processing global vars initialization account for the case of splitted
global object (using hidden prototypes):

1) setters might be not on the global object itself, but on its prototypes;
2) if property on one of prototypes is readonly, we could shadow it.
Review URL: http://codereview.chromium.org/434035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 15:45:37 +00:00
erik.corry@gmail.com
c5052399e4 Fix 64 bit build. TBR=ager.
Review URL: http://codereview.chromium.org/442003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 13:27:15 +00:00
erik.corry@gmail.com
10e183d353 Make heap serialization nondestructive.
Review URL: http://codereview.chromium.org/441017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3360 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 12:55:33 +00:00
erik.corry@gmail.com
059b9bbc5e Update with a hopefully complete list of macros
used by gcc to indicate ARM architectures.
Review URL: http://codereview.chromium.org/440017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3359 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 11:23:48 +00:00
mikhail.naganov@gmail.com
3267107040 Change 'debugger-auto-break' flag status.
I think we can promote this flag to stable status and enable it by default.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3357 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 10:11:34 +00:00
erik.corry@gmail.com
b0b5dbadbd Fix bug 516 by recognizing yet another gcc macro that
indicates ARMv6.
Review URL: http://codereview.chromium.org/437056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3356 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 09:55:49 +00:00
lrn@chromium.org
d4d2277e2e Fast-compiler: Add stack limit checks to back edges of while, do-while and for.
A few other tweaks.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 09:05:30 +00:00
sgjesse@chromium.org
8dbedbb30e Added an ASSERT to code from r3350
Review URL: http://codereview.chromium.org/441014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 08:14:23 +00:00
sgjesse@chromium.org
4bc5aee624 Fix compilation error in r3350
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/435021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3352 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-24 14:45:27 +00:00
sgjesse@chromium.org
eb4d261e24 Remove the different length string types
The different length string types was used to encode the string length and the hash in one field. This is now split into two fields one for length and one for hash. The hash field still encodes the array index of the string if it has one. If an array index is encoded in the hash field the string length is added to the top bits of the hash field to avoid a hash value of zero.

On 32-bit this causes an additional 4 bytes to be used for all string objects. On 64-bit this will be half on average dur to pointer alignment.
Review URL: http://codereview.chromium.org/436001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-24 14:10:06 +00:00
ager@chromium.org
56074f783a Prepare push to trunk. Now working on version 2.0.3.
Review URL: http://codereview.chromium.org/435018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3349 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-24 13:30:15 +00:00
ager@chromium.org
6ce4b10608 Re-enable all declarations in fast top-level compiler.
Disable fast top-level compiler for now because of issues 525 and 526.

Add regression test for issue 525.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-24 12:23:29 +00:00
mikhail.naganov@gmail.com
9d440fdd36 Store API callback entry address prior to entering a callback.
Callback entry address is stored in VMState and is later retrieved by
profiler stack sampler. This makes possible relating API entry to JS
stack, and this is simpler than trying to unwind native stack.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-23 14:43:00 +00:00
mikhail.naganov@gmail.com
c2f12a7293 Reimplement logging of API callbacks entry points in an easier way.
Now they are logging during "LogCompiledFunctions" cycle. API functions
are detected by examining SFI's "function_data" field.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-23 09:19:24 +00:00
ager@chromium.org
1fe8655fbc Change the signature for StrNDup to match the implementation. This
mismatch causes problems if attempting to build d8 with readline
support.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3342 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-20 13:08:44 +00:00
mikhail.naganov@gmail.com
72d7453dc2 Fix issue 520: wrap Logger calls into LOG macro
BUG=520

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-20 12:38:59 +00:00
mikhail.naganov@gmail.com
a9d7c378d8 Add logging of callbacks in prof-lazy mode.
This is needed to show calls to DOM in CPU profiles. I can think
of a better approach like adding specific functions into V8 API
for explicitly providing callback names and modifying bindings codegen
appropriately. My plan is as follows:
 - submit this CL;
 - implement anything I need to process log data and display DOM
   calls in profiles;
 - think again about adding specific functions and modifying bindings
   codegen.

BUG=http://code.google.com/p/chromium/issues/detail?id=27613

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3340 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-20 12:15:46 +00:00
ager@chromium.org
11ba1bd163 Prepare push to trunk. Now working on version 2.0.2.
Review URL: http://codereview.chromium.org/421003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-20 12:03:44 +00:00
ager@chromium.org
157e4f993b Disable the fast top-level compiler for non-global declarations.
Reintroduce the bailout that was put in in revision 3224.

It causes interactive ui test failures in Chromium.

TBR=fschneider@chromium.org
Review URL: http://codereview.chromium.org/421002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3337 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-20 11:45:18 +00:00
erik.corry@gmail.com
43e8d5fa7f Some optimizations for packer.js.
Review URL: http://codereview.chromium.org/409007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3336 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-20 10:11:45 +00:00
fschneider@chromium.org
d9d18b30f5 Implement IS_OBJECT and IS_FUNCTION as inlined runtime functions.
Summary:
This change fixes a performance regression introduced by the special
handling of regular expressions in typeof expressions.
As a result we regain ~8% speedup on 3d-raytrace and ~13% on boyer
(vs bleeding edge)

Description:
The macros IS_OBJECT and IS_FUNCTION are frequently used in the 
JS runtime functions. 
By introducing new inlined runtime functions %_IsFunction and %_IsObject
we avoid invoking the more expensive %_ClassOf function plus comparing
its result to a string. 


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-19 07:41:32 +00:00
ager@chromium.org
3cf9ce4736 Fix crash in string replace with regexp. If the suffix of the subject
string is larger than 2047 chars we will encode the slice as two Smis
instead of one.  The calculation of the max size of the string builder
did not take this into account.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3334 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-18 18:48:04 +00:00
ager@chromium.org
981480c3bd Prepare push of version 2.0.0 to trunk. Now working on version 2.0.1.
Review URL: http://codereview.chromium.org/405018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3332 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-18 12:24:46 +00:00
erik.corry@gmail.com
446b1f4443 Correct dumb assert.
Review URL: http://codereview.chromium.org/402048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-18 12:14:21 +00:00
ager@chromium.org
ce20b5b461 Fixed bug in pixel array inline cache on x64. The value was not
zero-extended as it should be.  Therefore, the index into the pixel
array could influence the value on reads.

BUG=http://code.google.com/p/chromium/issues/detail?id=26337
Review URL: http://codereview.chromium.org/399067

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-18 11:36:29 +00:00
erik.corry@gmail.com
701c00f8b4 Accelerate charCodeAt on ARM.
Review URL: http://codereview.chromium.org/402012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3327 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-18 10:20:24 +00:00
sgjesse@chromium.org
d55d3ce89a Add DebugMessageDispatchHandler
A callback on the debugger thread when a message is received. Allows the 
embedding application to wake up the main thread in order to handle the 
message. Useful when the embedding application is idle and sitting in a 
select() call.

Patch by Ryan Dahl <coldredlemur@gmail.com>

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3326 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-18 08:59:28 +00:00
kasperl@chromium.org
d5c355e367 Make sure to retry SetHiddenPropertiesObject if it
returns a failure.
Review URL: http://codereview.chromium.org/402034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-18 00:09:28 +00:00
lrn@chromium.org
1bc9a21e9a Sorry, this should have gone to http://codereview.chromium.org/391014
I added some tests and swapped the lhs and rhs of the && operator in v8natives.js as requested.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-17 13:54:05 +00:00
antonm@chromium.org
9a545949a4 Restore invariant (next of first deallocated must point to the head) before calling into weak
callbacks.

Otherwise if callback allocates a new handle, it could orphan some global handles (with disastorous
consequences if those global handles are cached).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-17 13:50:07 +00:00
erik.corry@gmail.com
41749529dd Speed up charCodeAt on very large cons strings, by insisting on
flattening the strings and not trying too hard to traverse a big
cons tree from generated code.
Review URL: http://codereview.chromium.org/402008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3317 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-17 10:28:04 +00:00
sgjesse@chromium.org
63925e5013 Add missing case for shr in IA-32 disassembler
Review URL: http://codereview.chromium.org/397024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3316 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-17 10:24:27 +00:00
sgjesse@chromium.org
459e4c6b0c Changes to Intel shift functions
Change name of shifts picking the shift count from cl to sal_cl, shl_cl and shr_cl.

Add special encoding of shift by one for shr which was missing it.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3314 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-17 08:35:43 +00:00
fschneider@chromium.org
53bee811ad Re-enable using push instructions for syncing the virtual frame.
This change fixes the problem with the original version of this approach
(r3032) that may lead to a corrupted stack if we would invoke spilling during 
syncing a large SMI constant (unsafe SMIs) in the virtual frame.

The new code for storing unsafe SMI constants does not use an extra temporary 
register. This prevents the compiler from ever having to spill during a 
virutal frame sync operation.

For storing a large SMI constant we previously generated:

  mov ecx, (large_smi & 0x0000ffff)
  xor ecx, (large_smi & 0xffff0000)
  push ecx

we now generate:

  push (large_smi & 0x0000ffff)
  or   [esp], (large_smi & 0xffff0000)

Not using a temporary register avoids spilling within an nvocation 
of VirtualFrame::SyncRange.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3313 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-16 23:11:19 +00:00
yurys@chromium.org
9bafc32932 Step next should respect do/while condition block.
Condition block of do/while statements is a valid break location so it should have its own position. The block is represented by a regular Expression node so we cannot store the position in it, instead the position is stored in a separate field in DoWhileStatement AST node.

BUG=514
Review URL: http://codereview.chromium.org/385136

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3312 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-16 21:59:31 +00:00
yurys@chromium.org
b6ce7ce8a3 Fix some presubmit errors.
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/400001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-16 16:58:09 +00:00
yurys@chromium.org
0a384a708d Skip debugger frames when looking for calling context.
BUG=509

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3310 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-16 14:41:55 +00:00
erik.corry@gmail.com
cc3896dfac Fix bug 503: undefined <= undefined should return false on ARM.
Review URL: http://codereview.chromium.org/399001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3309 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-16 14:12:27 +00:00
erik.corry@gmail.com
64941f1cf9 * Remove old snapshot implementation
Review URL: http://codereview.chromium.org/394007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3307 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-16 12:08:40 +00:00
fschneider@chromium.org
5820f951c1 Improve the allocation and initialization of locals on IA32 in the top-level compiler.
This optimization is already done on x64 and ARM. 

Until now we used a push immediate for each local variable on IA32:

  push $undefined
  push $undefined
  ...

to initialize each local variable. This change does:

  mov eax, $undefined
  push eax
  push eax
  ...



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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3304 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-13 13:59:07 +00:00
lrn@chromium.org
4af20283a2 Disable "arguments" implementation. It was too optimistic in its assumptions.
Review URL: http://codereview.chromium.org/393010


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3302 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-13 13:12:57 +00:00
erik.corry@gmail.com
df4f52347b Allow a platform to indicate that some CPU features are always
available.  We use this to ensure that snapshots on MacOSX can
use SSE2 instructions.  Also clean up and assertify the
handling of things we can't do when we are generating a
snapshot.  Fix a bug in the new serialization tests where
they activated Snapshot::enable() too late after code had been
generated that assumed no snapshots.
Review URL: http://codereview.chromium.org/391051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-13 12:32:57 +00:00
fschneider@chromium.org
1560b89888 Top-level compiler: Re-allow non-lazily compiled function literals.
This change re-allows non-lazy compiled function literals for top-level compilation.

There was a problem on ARM exposed through this change which was fixed as part of r3289
in fast-codegen-arm.cc (Threading and Threading2 tests failed)

It occurred before r3289 when we allocate a local context at the beginning of a function. The
code for the stack check was split up in an unintended way (load of stack check limit into r2, 
and use of r2 in the actual stack check code).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-13 10:02:32 +00:00
fschneider@chromium.org
cfed6e1e8e Fixes bug in the top-level compiler with the write barrier for assignments to context slots:
The test for a SMI before the write barrier tested the wrong register:
r0 = target context address
r1 = value to be written

This change fixes the SMI test and tests r1 instead of r0.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3299 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-13 09:51:49 +00:00
fschneider@chromium.org
b27f0c8d08 Cleanup and fix generated comments in the top-level compiler.
Review URL: http://codereview.chromium.org/384087

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-13 09:42:18 +00:00
yurys@chromium.org
ff3e84539c Remove trailing whitespace from objects.h
TBR=vitalyr
Review URL: http://codereview.chromium.org/387037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3295 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-12 16:52:48 +00:00
yurys@chromium.org
cc0ce24331 Make accessors for hidden properties object not touch interceptors.
Interceptors cannot provide a meaningful result for hidden_symbol anyway and some of them crash on empty property name.


Related Chromium issue: http://code.google.com/p/chromium/issues/detail?id=27385

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3294 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-12 16:34:52 +00:00
erik.corry@gmail.com
407816af39 Fix some style issues in the ARM code.
Also move a function into the macro assembler.
Fix some *& placement errors that had accumulated.
Review URL: http://codereview.chromium.org/385069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3293 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-12 13:55:21 +00:00
erik.corry@gmail.com
0d94d7c785 Add vfp support on ARM. Patch from John Jozwiak.
Review URL: http://codereview.chromium.org/348019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-12 13:04:02 +00:00
lrn@chromium.org
1151b496bf Fast-codegen: Added support for arguments in functions.
Functions using "arguments" have their arguments object created on entry.
Also added support for variables rewritten into argument object property access.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3289 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-12 11:38:01 +00:00
kbr@chromium.org
ffda5f5ff5 Fixed bug in x64 port of KeyedStoreIC::GenerateExternalArray where it
was always falling through to the runtime. Re-examined both load and
store ICs and verified they are now in sync with the 32-bit port.

Ran tests and benchmarks.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3286 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-11 23:06:11 +00:00
christian.plesner.hansen@gmail.com
d5ca1178cb Fixed a few cases where allocators did not respect always_allocate,
potentially leading to bogus FatalProcessOutOfMemory situations.  Also
fixed a few cases where callers relied on getting a NewSpace object
back (to avoid write barrier overhead) which they can't when
always_allocate is in effect.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-11 15:25:51 +00:00
erik.corry@gmail.com
6d91ffdafe Fix thinko in fix for issue 484.
Review URL: http://codereview.chromium.org/391016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3284 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-11 14:32:14 +00:00
erik.corry@gmail.com
2d30963d1d Log the stubs found in the snapshot so the profiler can give
a sensible output.
Review URL: http://codereview.chromium.org/385039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3281 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-11 12:35:50 +00:00
christian.plesner.hansen@gmail.com
5d4d5944dd Remove special-case for arguments.toString to match ES5
Patch by Jan de Mooij <jandemooij@gmail.com>
Review: http://codereview.chromium.org/273073

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-11 11:28:37 +00:00
lrn@chromium.org
d53f05e3e2 Fix warnings on Win64.
Set warning level to /W3 and change implicit conversions from size_t
to int. Most "fixes" are simply manifesting the implicit casts or using
a special strlen replacement that returns int.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-11 09:50:06 +00:00
erik.corry@gmail.com
78a8f5973d Restore info needed to register profile ticks in functions from
the snapshot.  Still needed: info to register profile ticks in
stubs.
Review URL: http://codereview.chromium.org/385035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3272 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-11 09:19:39 +00:00
ager@chromium.org
2252cc1bc9 Fix inline constructor code bailout.
Remove variable that is currently unused.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3267 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-11 09:00:09 +00:00
yurys@chromium.org
cd9660f77c All hidden properties of an object are stored in a value of a regular property with empty name. This property may confuse user if returned among regular properties. It should not be exposed directly by ObjectMirror. Should we want an access to these properties from debugger we need to implement an explicit method for that.
Current patch filters the hidden_symbol from property names returned to ObjectMirror.

See http://crbug.com/26491

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-10 16:13:21 +00:00
ager@chromium.org
963d72ff57 Revert r3032 that uses push instead of 'sub esp, size'. This change
leads to stack corruption in 32-bit version of V8.

See http://code.google.com/p/chromium/issues/detail?id=27227 for a
reproducible case.

Since this is only an issue on 32-bit V8 I think this has got
something to do with the UnsafeSmi handling that we do on ia32.  I'm
reverting for now so we can push a fix, but we should track down the
issue and create a regression test for this.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-10 14:58:16 +00:00
sgjesse@chromium.org
851b9b2f73 Remove sliced string string type
As a first step to reduce the complexity of the string hierachy the sliced string type is removed. Whenever a sub-string is created it is allocated as a fresh flat string.
Review URL: http://codereview.chromium.org/385004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-10 13:23:05 +00:00
lrn@chromium.org
c1efaa01fe Reapply 3246 and 3247 after fixing valgrind warning.
Review URL: http://codereview.chromium.org/386001


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-10 10:23:23 +00:00
fschneider@chromium.org
091c7a2306 Fixed bug in while-loops that caused an assertion to fail.
We forgot resetting true-/false-label to NULL after evaluating the 
condition expression in dowhile- and while-loops. 
This change fixes this.

This causes an assertion to fail in VisitIfStatement whenever there is an 
if-statement after a while-loop before. e.g. like in:

  var i=0, j=0;
  while(j<5) { j++; }
  if (i ==0 ) { j++; }




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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3255 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-10 09:57:13 +00:00
erik.corry@gmail.com
95d550578c Revert 3245 and 3246 because they cause valgrind failures.
TBR=lrn
Review URL: http://codereview.chromium.org/372059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3254 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 17:05:51 +00:00
fschneider@chromium.org
5ba34775c7 Temporarily de-activate while-loops in the top-level compiler because
it makes some debug tests fail.

TBR=christian.plesner.hansen@gmail.com
Review URL: http://codereview.chromium.org/371069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3253 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 15:31:15 +00:00
erik.corry@gmail.com
526f83d6b9 Fix small memory leak in new serialization code.
Review URL: http://codereview.chromium.org/371068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 13:30:50 +00:00
fschneider@chromium.org
cff817d70b Revert change r3240-3241 because it causes ARM tests to fail.
(non-lazily compiled function literals)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3251 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 13:30:35 +00:00
lrn@chromium.org
5b1faade55 Fast-compiler: Added trivial implementations of while and do/while.
Review URL: http://codereview.chromium.org/372055


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3250 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 13:22:38 +00:00
erik.corry@gmail.com
9065114928 http://codereview.chromium.org/371067 thanks to Jan de Mooij
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3249 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 13:21:14 +00:00
ager@chromium.org
a29255e334 Inline common case of one capture when using replace with a regexp and
a function.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3248 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 13:17:50 +00:00
lrn@chromium.org
8ad022d544 Fix lint issue.
Review URL: http://codereview.chromium.org/379005


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 12:18:25 +00:00
lrn@chromium.org
cf0d74554c Remove unnecessary buffer doubling and content copying.
Review URL: http://codereview.chromium.org/377006


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3246 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 11:52:18 +00:00
fschneider@chromium.org
be8e9c0b1c Fix SVN merge problem in the top-level compiler.
(Remove bailout on non-global declarations again)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3245 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 10:30:33 +00:00
erik.corry@gmail.com
b068a9f755 * Fix regexp benchmark regression where we were doing work to
make standard regexps like \s and . case independent.
* Make use of the fact that the subject string is ASCII only
when making character classes case independent.
* Avoid spending time making large ideogram or punctuation
ranges case independent when there is no case mapping anyway.
Review URL: http://codereview.chromium.org/378024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3243 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 10:01:23 +00:00
whesse@chromium.org
493c9f072c Enable writes and reads of context slots in fast compiler.
Review URL: http://codereview.chromium.org/360054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 09:56:57 +00:00
fschneider@chromium.org
0afb1e1697 Add function literals that always require non-lazy compilation to the top-level compiler.
Review URL: http://codereview.chromium.org/371064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3241 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-09 09:43:24 +00:00
erik.corry@gmail.com
eec580cf5d Fix missing () on function call causing warning on some versions
of gcc.
Review URL: http://codereview.chromium.org/371020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3239 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-06 14:06:35 +00:00
erik.corry@gmail.com
6a3921fc0e Keep natives source code in external strings instead of putting
it in regular flat strings that are part of the snapshot.
After this change we don't need libraries-empty.cc any more.  In
this change libraries-empty.cc is just a the same as libraries.cc
and the scons build builds it but does not use it.  We can move
in stages to a situation where it is not generated at all for all
the build systems that we have.
Review URL: http://codereview.chromium.org/360050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3238 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-06 13:48:33 +00:00
christian.plesner.hansen@gmail.com
321bed24f6 Fixed problem where popping a handle scope after calling an accessor
would clobber the register holding the result.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3237 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-06 11:35:47 +00:00
erik.corry@gmail.com
57c919e414 Fix bug 486, Cyrillic character ranges in case independent regexps.
http://code.google.com/p/v8/issues/detail?id=486
Review URL: http://codereview.chromium.org/361033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-06 11:15:20 +00:00
fschneider@chromium.org
9a7c403bbb Add support for all declarations in the top-level compiler:
Until now we only handled global declarations. This change
adds declarations of local variables, consts and functions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3234 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 17:33:50 +00:00
kmillikin@chromium.org
8595cbb0d3 Remove an unused enumeration value.
Review URL: http://codereview.chromium.org/366030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3233 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 17:25:50 +00:00
kmillikin@chromium.org
16303936de Fix a bad commit due to an svn merge error.
Review URL: http://codereview.chromium.org/368007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 16:21:27 +00:00
kmillikin@chromium.org
debb5f8b48 Change the special handling of typeof comparisons to strings for
regular expressions to be consistent with typeof in other contexts.
Typeof regular expressions should now be 'function' in all contexts.

In the JS natives, IS_FUNCTION, IS_OBJECT, and IS_REGEXP return the
same answers as before.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 16:08:48 +00:00
christian.plesner.hansen@gmail.com
930ab041a8 Made iteration of global handles more efficient on scavenges.
Review URL: http://codereview.chromium.org/355041


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 15:12:36 +00:00
sgjesse@chromium.org
41d6cae46d Fix issue 493: Infinite loop when debug break is set when entering function.apply.
In the generated code for function.apply there was a loop checking the stack limit for interruption. This loop would call into the runtime system to handle interuption and keep running until there was no interruption. However if the interuption was debug break the runtime system would never clear the interruption as debug break is prevented in builtins are prevented and the assumption here was that returning with the debug break flag set would move execution forward.

Renamed initial_jslimit and initial_climit to real_jslimit and real_climit. Renamed a few external references related to the stack limit as well.

Exposed the real stack limit to generated code to make the stack check when entering function.apply use the real stack limit and not the stack limit which is changed to signal interruption.

Added the real stack limit to the roots array.

BUG=http://code.google.com/p/v8/issues/detail?id=493
TEST=cctest/test-debug/DebugBreakFunctionApply
Review URL: http://codereview.chromium.org/345048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 13:59:40 +00:00
ager@chromium.org
b5a19c1036 Rework the way we handle the fact that the ARM simulator uses a
separate JS stack.

In exception handling, we need to be able to compare addresses into
the JavaScript portion of the stack with the address of a C++ handler
on the stack.  Since the stacks are separate on the simulator, we need
a JavaScript stack address corresponding to a C++ try catch handler in
order to perform valid address comparisons.

On the simulator, we now link the C++ try catch handlers indirectly
through the JS stack and use the JS stack indirection address for
comparisons.

      JS                    C++
                           
                           handler
 [C++ address]   <------    next_
                \
                 \
                  \---->   handler
 [C++ address]   <------    next_


On actual hardware the C++ try catch handlers continue to be directly
linked.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 13:27:21 +00:00
whesse@chromium.org
ec7034e65b Make "typeof this" return object in fast compiler.
Review URL: http://codereview.chromium.org/366028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3227 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 12:45:53 +00:00
ager@chromium.org
f39fbb206e Fix case where we treat an unaliased call to eval as an aliased call
to eval.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3225 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 11:19:37 +00:00
kmillikin@chromium.org
efd20687c9 In the toplevel code generator, support local context allocation
provided that none of the parameters need to be copied into the
context.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 10:38:26 +00:00
lrn@chromium.org
e8db709be1 Removed (now) unused Token-lookup code.
Review URL: http://codereview.chromium.org/361026


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3223 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 10:24:20 +00:00
whesse@chromium.org
c1e7dd83a4 Implement typeof in fast compiler.
Review URL: http://codereview.chromium.org/354027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 10:15:25 +00:00
lrn@chromium.org
273e860cc1 Changed keyword token recognition to be done inline in the identifier scanner.
Review URL: http://codereview.chromium.org/360048


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3221 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 10:11:38 +00:00
fschneider@chromium.org
877db0f539 Add support for debugger statement to top-level compiler.
Review URL: http://codereview.chromium.org/366004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 19:04:29 +00:00
kmillikin@chromium.org
0bf546f243 Fix a bug where if a non-lazily-compiled function is a candidate for
toplevel compilation and the toplevel compiler cannot handle the
function, we would erroneously signal a stack overflow instead of
falling back on the optimizing compiler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3219 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 18:39:44 +00:00
kmillikin@chromium.org
0ce4eab1b2 Obey the flag --lazy in the toplevel code generator.
There were two separate implementations of the function
'BuildBoilerplate' that is used to compile function declarations and
function literals.  The implementations did not do exactly the same
thing.  In particular, one ignored the flag --lazy.

Combine the two implementations.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 17:59:24 +00:00
sgjesse@chromium.org
392ee5d1a8 Fix ARM debug build
TBR=fschneider@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3216 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 15:24:11 +00:00
sgjesse@chromium.org
77a71c90c7 Fix issue 491: constantpool dump violates ARM debugger assertion for return point
The generation of the return sequence is now protected from having the constant pool emitted inside of it in both compilers.

BUG=http://code.google.com/p/v8/issues/detail?id=491
TEST=test/mjsunit/regress/regress-491.js
Review URL: http://codereview.chromium.org/362003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 14:45:50 +00:00
fschneider@chromium.org
3db5a2e981 Fix compilation error in debug build for IA-32 and ARM.
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/361005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3214 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 14:33:37 +00:00
fschneider@chromium.org
ff0d885b95 Emitting the common return sequence in the top-level compiler in one function for each platform.
I factored out the code for emitting the return sequence since we had this code duplicated in the top-level compiler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3213 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 14:11:39 +00:00
kmillikin@chromium.org
34dee0319c Remove the typeof state threaded through the code generator. It was
used to signal that an expression was the immediate subexpression of
typeof, or (?) in the arm of a conditional expression itself in the
typeof state.

It was inconsistently consulted.  It was not used for property loads,
but only for slot loads.  This means that we matched the Webkit JSC
(not Spidermonkey) behavior for:

typeof(true ? x : y)  // throws ReferenceError

and we matched the SpiderMonkey behavior (not JSC) for:

with ({}) { typeof(true ? x : y) }  // ==> "undefined"

Now we are expected to match the JSC behavior in all cases.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3212 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 13:56:41 +00:00
sgjesse@chromium.org
54ec6c031a Fix xssue 492: ARM debug crash: mozilla/ecma/FunctionObjects/15.3.1.1-3
When the number of parameters times 4 (kPointerSize) to a function cannot be encoded in 12 bits the return sequence gets one more instruction. Changed the assertion to check for this case.

BUG=http://code.google.com/p/v8/issues/detail?id=492
TEST=test/mjsunit/regress/regress-492.js
Review URL: http://codereview.chromium.org/354028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3211 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 10:04:22 +00:00
christian.plesner.hansen@gmail.com
a1b2f47600 Reverting 3174. Aka reapplying 3150, 3151 and 3159. Aka api accessor
ics.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3209 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-04 08:51:48 +00:00
erik.corry@gmail.com
b9d37517d2 * Do a GC in mksnapshot to get rid of some extraneous junk.
* Make snapshot more compact by coding the tag and the space
in one byte.  Contract some common sequences to one byte.
* Use back references only within one page.  Index from the
start of the space otherwise.
* Serialize Smis as raw data rather than int-encoding them.
This takes a little more space but is faster.
Review URL: http://codereview.chromium.org/341079

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3208 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-03 21:00:43 +00:00
fschneider@chromium.org
6d425b70f6 Insert call to CodeForFunctionPosition in the ARM code generator.
(== SetFunctionPosition in the top-level compiler)

IA32 and X64 already do this at the beginning of CodeGenerator::gencode

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3207 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-03 16:08:35 +00:00
kmillikin@chromium.org
3eb69a34fa Begin using the top-level code generator for code that is inside
directly-applied function literals that are themselves compiled with
the top-level code generator.

The choice is guarded by a test that the function is anonymous (thus
not expected to be recursive) and not in a loop.

A compilation hint is set in the shared function info and used to make
the choice.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3206 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-03 14:48:59 +00:00
kmillikin@chromium.org
85fc0d688a Fix a latent bug in the top-level compilation of function calls.
Calls to a non-global variable would go through the "call to a global"
path, rather than the "call to an arbitrary (other) expression" path.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-03 12:47:19 +00:00
christian.plesner.hansen@gmail.com
850487401d Added TryCatch::ReThrow method.
Review URL: http://codereview.chromium.org/342078


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3201 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-03 08:53:34 +00:00
whesse@chromium.org
84542872f6 Commiting changelist issue 348039 outside the codereview tool. Add comparisons to fast compiler
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3200 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-02 15:01:06 +00:00
kmillikin@chromium.org
1affb78938 Add support for for loops to the toplevel code generator.
Review URL: http://codereview.chromium.org/340059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3199 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-02 14:12:48 +00:00
kmillikin@chromium.org
aa3b00a25a Add support for initialization block assignments in the toplevel code
generator, mimicing the behavior of the optimizing compiler.

Initialization blocks can only contain (thus begin and end) with a
property assignment in toplevel code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-02 13:30:24 +00:00
sgjesse@chromium.org
b4c11d0816 Don't use string slices when processing RexExp replace (re-apply r3153)
Re-apply r3153 with a fix for issue 490. Except for the change in line 1756 and the added test this change is identical to http://codereview.chromium.org/342015.

BUG=490
TEST=test/mjsunit/regress/regress-490.js
Review URL: http://codereview.chromium.org/341064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-02 12:21:43 +00:00
fschneider@chromium.org
e38cd233c3 Support for function calls on an arbitrary expression that returns
a function in the top-level compiler.

e.g.

function f() { return (function() { return true; }) }
f()()


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3196 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-02 12:04:35 +00:00
kmillikin@chromium.org
b710d66f39 Refactor the somewhat complicated code generation for assignments into
a platform-independent structure and a few platform-specific helpers
to do the heavy lifting.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3195 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-02 11:01:47 +00:00
fschneider@chromium.org
a07146c0cb Support for post-fix count operations (x++, x--) where x is a global
variable for the top-level compiler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-02 10:22:22 +00:00
whesse@chromium.org
e09c4f20c5 Add unary not operator to fast compiler.
Review URL: http://codereview.chromium.org/343057

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-02 10:17:12 +00:00
whesse@chromium.org
e4f5b74dd1 Add conditional expressions (ternary choice operator) to fast compiler.
Review URL: http://codereview.chromium.org/340058

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3192 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-02 08:44:19 +00:00
peter.rybin@gmail.com
9200f3ba9e Report function source position via JSON protocol
Review URL: http://codereview.chromium.org/341024


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-30 16:38:37 +00:00
kmillikin@chromium.org
20f780fdbc Implement new support for if statements in top-level code.
Review URL: http://codereview.chromium.org/346022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-30 15:34:09 +00:00
kmillikin@chromium.org
ab3e85eeb4 Initial implementation of top-level compilation of expressions in test
context.  Test contexts are used for the left subexpressions of
short-circuited boolean operators.  The right subexpressions inherit
their expression context from the binary op expression.

Compilation of short-circuited operations in effect and test context
is straightforward:

effect(e0 || e1) =
 test(e0, L0, L1)
 L1: effect(e1)
 L0:

test(e0 || e1, L0, L1) =
 test(e0, L0, L2)
 L2: test(e1, L0, L1)

Because the value of the first subexpression may be needed as the
value of the whole expression in a value context, we introduce a
hybrid value/test contest (the value is needed if true, but not if
false).

value(e0 || e1) =
 value/test(e0, L0, L1)
 L1: value(e1)
 L0:

The compilation of value/test and test/value (introduced by boolean
AND) is:

value/test(e0 || e1, L0, L1) =
 value/test(e0, L0, L2)
 L2: value/test(e1, L0, L1)

test/value(e0 || e1, L0, L1) =
 test(e0, L0, L2)
 L2: test/value(e1, L0, L1)

Boolean AND is the dual.  The AST nodes themselves (not their parents)
are responsible for producing the proper result (effect, value, or
control flow) depending on their context.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-30 14:06:48 +00:00
whesse@chromium.org
b7c0b738c7 Add void operator to fast compiler.
Review URL: http://codereview.chromium.org/342055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3186 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-30 11:32:42 +00:00
erik.corry@gmail.com
f57f128aba Fix new snapshot compilation on ARM.
Review URL: http://codereview.chromium.org/349001

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

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

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


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3183 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-30 10:22:31 +00:00
kmillikin@chromium.org
2181c96d61 Fix thinko in assertion.
TBR=whesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3182 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-30 09:57:08 +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
fschneider@chromium.org
143b4b87b4 Support for property assignment in the fast compiler.
The code for .result = (b.y = 99) where b is a global variable is:

  push [esi+0x17]
  mov ecx,0xf5c229ad          ;; object: 0xf5c229ad <String[1]: b>
  call LoadIC_Initialize
  nop
  mov [esp],eax
  mov eax,0xc6
  mov ecx,0xf5c25c41          ;; object: 0xf5c25c41 <String[1]: y>
  call StoreIC_Initialize
  nop
  mov [esp],eax
  pop [ebp+0xf4]

There is still some room for improvement in the generated code.

Other changes:
 - Replaced switch-statement in FastCodeGenerator::VisitProperty with DropAndMove(...)
 - Do not emit nop after IC calls on ARM.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-30 07:56:38 +00:00
sgjesse@chromium.org
4c9c50bfd3 Prepare to push to trunk. We are now working on 1.3.19
Review URL: http://codereview.chromium.org/348010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-29 14:33:51 +00:00
kmillikin@chromium.org
b1defd51cb Rename the Location type tags to be consistent with our current naming
scheme for enumerations (eg, EFFECT => kEffect).

Remove the ability to move from one Location to another, which should
never be necessary.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-29 13:17:11 +00:00
kmillikin@chromium.org
c612751095 Fix x64 build.
TBR=whesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-29 12:19:20 +00:00
whesse@chromium.org
05d6294e98 Add binary operations to fast compiler.
Review URL: http://codereview.chromium.org/342019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3172 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-29 11:55:03 +00:00
kmillikin@chromium.org
9ad7a66f98 Rename the kinds of locations to be consistent with the (codegen)
context of the expressions they label.  Introduce an "unintialized"
location to catch failure to assign any location at all.

Changed the object literal initialization on ARM to use a Store IC in
the same cases where it did on the other platforms.  This was required
because the location of the literal property name is given an
"unitialized" location.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3171 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-29 10:35:29 +00:00
sgjesse@chromium.org
9b6a1cca5d Reverting 3153
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/341031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3170 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-29 07:31:23 +00:00
ager@chromium.org
88275efb91 Prepare push to trunk. Now working on version 1.3.18.
Review URL: http://codereview.chromium.org/338063

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3164 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 13:51:30 +00:00
kmillikin@chromium.org
6a83cb0ced In the toplevel compiler, shift the responsibility of assigning a
location to an Expression AST node from the node's parent to the node
itself.

This allows an inherited code generation context from a parent node to
be passed arbitrarily far down the tree (eg, the subexpression of a
unary not is in the same context as the unary expression itself, the
then and else subexpressions of the ternary operator are in the same
context as the whole expression, and so forth).

We do not yet take advantage of this in the backend (eg, the right
subexpression of short-circuited OR is still compiled by using the
parent's destination location, rather than the subexpression's
itself).

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 12:37:54 +00:00
christian.plesner.hansen@gmail.com
583c47ae76 Changed accessor ICs to using direct calls.
Review URL: http://codereview.chromium.org/343015


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 12:14:20 +00:00
ager@chromium.org
aea684ede4 Add fast check for NaN in NumberCompare slow case.
Review URL: http://codereview.chromium.org/344010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3158 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 10:19:56 +00:00
fschneider@chromium.org
a84ba0e15c Fix missing recording of source position for property access in fast compiler.
Review URL: http://codereview.chromium.org/341002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3157 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 10:14:32 +00:00
whesse@chromium.org
0bd21aa0f9 Factor out a commonly used code sequence to DropAndMove(Location, Register)
Review URL: http://codereview.chromium.org/337060

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3154 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-28 09:13:11 +00:00
sgjesse@chromium.org
abbc6b9147 Don't use string slices when processing RexExp replace.
String slices from RegExp replace results is now encoded in either one or two smis. Substrings are not used any more.

If the existing one smi encoding cannot hold the start/length information two smis are used the first having the negative length and the second having the start.

This is in preparation for removing string slices.
Review URL: http://codereview.chromium.org/342015

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


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3152 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 16:11:12 +00:00
christian.plesner.hansen@gmail.com
d05c23dbd0 Fixed build error on x64.
Review URL: http://codereview.chromium.org/339027


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

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


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 15:38:49 +00:00
whesse@chromium.org
29914b6be7 Remove --check-stack flag from V8.
Review URL: http://codereview.chromium.org/338017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 14:56:50 +00:00
whesse@chromium.org
299a491d7a Add VisitCallNew to fast compiler.
Review URL: http://codereview.chromium.org/334041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 14:52:55 +00:00
kmillikin@chromium.org
a73bbe605e Make it more pleasant to work with expression locations in the
top-level code generator backend.  Introduce function to move one
location to another (source cannot be nowhere); to move registers,
slots, and literals into a location; and to move a location to a
register or slot.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 13:38:57 +00:00
erik.corry@gmail.com
3615957055 Start using snapshot VM configuration in internal benchmark
graphing tool.  Fix nonportable fopen call in new snapshot code.
Review URL: http://codereview.chromium.org/340002

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 11:54:01 +00:00
whesse@chromium.org
0695df6eaa Add fucomip instruction to disassembler. Fix some other floating point instructions.
Review URL: http://codereview.chromium.org/316010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 10:47:01 +00:00
sgjesse@chromium.org
a332c465db Fix x64 breakage in r3136.
Make sure that the return value is moved to rax. The line added back was accidently removed in r3136.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 10:40:43 +00:00
kmillikin@chromium.org
42b28e8120 Fix x64 DEBUG build.
TBR=lrn@chromium.org

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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 08:50:24 +00:00
kmillikin@chromium.org
76e1e22f15 Eliminate the constant location used for literals in the AST.
Literals now have a location of temporary by default and are
responsible for moving themselves into their location like all other
expressions.

The constant location turned out not to allow us to avoid checking
subexpressions in AST interior nodes, and it turned out to require
checking after some normal calls to Visit (like for the arguments to a
call).  With this change do not have to check after a call to Visit
that we got our result in the expected location.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 08:48:01 +00:00
sgjesse@chromium.org
c84af6828b Port optimization of calls to GenericBinaryStub to x64.
See description of the change in the ia32 changelist at http://codereview.chromium.org/246075.

Minor changes to the ia32 version using variables for the registers to pass parameters in (edx and eax) to make the parameter set up code easier to read.
Review URL: http://codereview.chromium.org/335005

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 08:13:59 +00:00
ager@chromium.org
e9909cbf25 Apply patch by Timur Iskhodzhanov to add valgrind notifications on
code modification to the x64 build.  The same notifications are
already in place in the ia32 build.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3133 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-26 15:16:42 +00:00
fschneider@chromium.org
dcee14979f Generate more compact XOR on 64-bit architecture when using xor to zero out registers.
When using xor to zero a 64-bit register, generate 32-bit instruction instead.
(according to Intel 64-bit mode coding guidelines) 

previous code for zeroing RAX:
  xor rax, rax  

==>

new code for zeroing RAX: 
  xor eax, eax

The 32-bit operand form has the same semantics: It also zeroes the upper 
32-bit of rax and its encoding uses 1 byte less.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3132 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-26 14:38:22 +00:00
christian.plesner.hansen@gmail.com
53b93464d1 Implemented specialized stubs for API getters. This includes a number
of individual changes:

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

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

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3129 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-26 13:21:48 +00:00
antonm@chromium.org
a531c281fd 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
2009-10-26 12:54:41 +00:00
sgjesse@chromium.org
ac280c223b 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
2009-10-26 12:26:42 +00:00
mikhail.naganov@gmail.com
6d6c4fa696 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
2009-10-26 11:59:55 +00:00
antonm@chromium.org
0d1c5c2c1f 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
2009-10-26 11:35:07 +00:00
mikhail.naganov@gmail.com
5379d81745 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
2009-10-26 10:51:30 +00:00
sgjesse@chromium.org
8a1fdd3598 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
2009-10-23 12:54:48 +00:00
sgjesse@chromium.org
b0dfb371d6 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
2009-10-23 12:47:44 +00:00
sgjesse@chromium.org
7a509f2101 Fix issue with running some constructors having only this.x = ... assignments.
If we had compiled the comment instead of the code it would have worked.

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

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

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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-23 09:18:19 +00:00
kbr@chromium.org
38e2b5c97b 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
2009-10-22 15:21:00 +00:00
kbr@chromium.org
d5f00cf6cc Add optimized ICs for new CanvasArray types introduced in WebGL
specification under development. This is a follow-on CL to
http://codereview.chromium.org/293023 .

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-22 14:49:00 +00:00
whesse@chromium.org
719b032a9a 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
2009-10-22 11:21:29 +00:00
kmillikin@chromium.org
fbc0eaa13d Added support for array literals to the toplevel compiler. They are
currently compiled the same as with the optimizing compiler: they are
cloned from a boilerplate object and the boilerplate objects are
lazily constructed.

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-22 10:07:45 +00:00
fschneider@chromium.org
ee9d2d6cee 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
2009-10-22 09:29:03 +00:00
peter.rybin@gmail.com
d8f7b36624 Add "Version" command
Review URL: http://codereview.chromium.org/274080


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3108 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-21 17:07:43 +00:00
kmillikin@chromium.org
0fa8be43f8 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
2009-10-21 15:37:14 +00:00
ager@chromium.org
9ee631338e Allow resource constraints to specify the max committed new space size
when using snapshots.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-21 15:03:34 +00:00
mikhail.naganov@gmail.com
765e134b92 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
2009-10-21 13:04:53 +00:00
mikhail.naganov@gmail.com
9da793a257 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
2009-10-21 12:39:45 +00:00
antonm@chromium.org
4c7620dc79 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
2009-10-21 12:14:50 +00:00
fschneider@chromium.org
8b33cb7133 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
2009-10-21 11:56:05 +00:00
kmillikin@chromium.org
61363d83ba Add support for global variable references in toplevel code. We use
the normal named load IC mechanism for now.  Generated code is similar
to the case for global variable assignments.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3101 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-21 09:38:21 +00:00
whesse@chromium.org
2a63594602 Commit fucomip change 197037 http://codereview.chromium.org/197037/show
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-21 09:24:25 +00:00
fschneider@chromium.org
88371e63f6 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
2009-10-21 09:17:39 +00:00
mikhail.naganov@gmail.com
cd2065be00 applied patch
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3098 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-20 23:25:05 +00:00
kbr@chromium.org
361e4bf8a9 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
2009-10-20 17:44:21 +00:00
kbr@chromium.org
46e6297e3e Added infrastructure for optimizing new CanvasArray types in WebGL
specification under development. The optimizations are patterned after
those previously done for CanvasPixelArray. This CL adds all of the
necessary framework but continues to use the generic KeyedLoadIC and
KeyedStoreIC code, to create a baseline for benchmarking purposes. The
next CL will add the optimized ICs to ic-ia32.cc and ic-x64.cc.

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

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

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

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

======== IA32:

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

======== X64:

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

======== ARM:

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-20 12:13:31 +00:00
kmillikin@chromium.org
03c4ad1e9a 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
2009-10-20 09:12:53 +00:00
antonm@chromium.org
99445fc211 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
2009-10-20 09:10:26 +00:00
ager@chromium.org
390fd2a3b8 Add an API to V8 to get simple heap statistics.
Review URL: http://codereview.chromium.org/261037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-20 07:51:49 +00:00
kmillikin@chromium.org
846688f825 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
2009-10-19 10:36:42 +00:00
kmillikin@chromium.org
7324ec0f83 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
2009-10-19 07:54:39 +00:00
antonm@chromium.org
42257793ab Fix mac x64 build.
BUG=472



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-16 15:00:45 +00:00
antonm@chromium.org
5560d27764 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
2009-10-16 12:51:18 +00:00
antonm@chromium.org
5e4ad0254c 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
2009-10-16 12:11:59 +00:00
christian.plesner.hansen@gmail.com
4293f8eb8e 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
2009-10-16 11:33:39 +00:00
kmillikin@chromium.org
0f5210e9dd 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
2009-10-16 09:46:09 +00:00
whesse@chromium.org
dac210d3e9 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
2009-10-16 09:31:03 +00:00
peter.rybin@gmail.com
3b955790a0 Redo "running" field in debug-delay.js and support "suspend" command
It also fixes "backtrace" command so that it didn't give away random stack if we are running

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3077 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-15 20:06:08 +00:00
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
fschneider@chromium.org
1cc731ab0d 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
2009-10-15 15:27:37 +00:00
kmillikin@chromium.org
6f5ed57683 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
2009-10-15 15:01:36 +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
whesse@chromium.org
99050519c4 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
2009-10-15 11:52:53 +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
2d6169bf7e 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
2009-10-15 08:22:24 +00:00
mikhail.naganov@gmail.com
efb8cee324 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
2009-10-15 07:50:23 +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
iposva@chromium.org
e0b8ab8815 - Add String::Concat(Handle<String> left, Handle<String> right) to the V8 API.
This is the first step to address http://crbug.com/23131 by creating
a series of V8 ConsStrings as more data arrives from the server.

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

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

Appy the same approach to External wrapping and unwrapping.

Plus some minor refactorings.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3064 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-14 14:32:39 +00:00
fschneider@chromium.org
8d47ca4ed2 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
2009-10-14 13:12:38 +00:00
vitalyr@chromium.org
a9880bde4d 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
2009-10-14 11:19:55 +00:00
christian.plesner.hansen@gmail.com
d6409e35a2 Implement ES5 Array.isArray
Patch by Jan de Mooij <jandemooij@gmail.com>
Review at http://codereview.chromium.org/271072


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-14 09:42:13 +00:00
lrn@chromium.org
c8b0f822ee 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
2009-10-14 09:26:16 +00:00
mikhail.naganov@gmail.com
a7c0c6e5c4 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
2009-10-13 15:17:24 +00:00
yurys@chromium.org
a2549c96e8 Check that constructor is a FunctionMirror before calling .name(), otherwise we may end up calling name method on a mirror object that doesn't have it.
Review URL: http://codereview.chromium.org/271053

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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-13 10:56:13 +00:00
kmillikin@chromium.org
ac731896da 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
2009-10-13 09:37:17 +00:00
erik.corry@gmail.com
4ddc771c99 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
2009-10-13 08:58:24 +00:00
christian.plesner.hansen@gmail.com
f1354a299e Add trim, trimLeft and trimRight methods to String
Based on a recent patch for Webkit.
trim is defined in ES 5 section 15.5.4.20.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-13 08:13:45 +00:00
kmillikin@chromium.org
a563800b4c 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
2009-10-12 15:06:28 +00:00
kmillikin@chromium.org
b6a215700e 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
2009-10-12 14:00:11 +00:00
kmillikin@chromium.org
586f94f292 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
2009-10-12 13:14:06 +00:00
whesse@chromium.org
c67291155b 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
2009-10-12 12:42:20 +00:00
lrn@chromium.org
5767628039 Removed 31-bit smis.
Review URL: http://codereview.chromium.org/267049


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-12 11:19:20 +00:00
ager@chromium.org
947992185a 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
2009-10-09 08:21:56 +00:00
sgjesse@chromium.org
8222bf3ba7 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
2009-10-08 15:10:14 +00:00
sgjesse@chromium.org
8105ae3106 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
2009-10-08 14:27:46 +00:00
sgjesse@chromium.org
b9e7112d44 Add support for comisd and cmov in IA-32 disassembler.
Review URL: http://codereview.chromium.org/266014

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

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


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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-08 12:36:12 +00:00
kmillikin@chromium.org
7efd193326 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
2009-10-08 11:49:58 +00:00
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
sgjesse@chromium.org
61650a0ece 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
2009-10-07 13:42:24 +00:00
whesse@chromium.org
8d2a9df504 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
2009-10-07 12:47:49 +00:00
mikhail.naganov@gmail.com
572a050102 Fix a crash in Logger::LogCompiledFunctions due to a presence of scripts with disposed source.
When starting JS profiling under Chromium, a map from function addresses to function names is created. During it, for sourceful scripts, an attempt to access script source is made. This can cause a crash, if a source is an external string, which already has been disposed. We had a similar problem in the past with DebugGetLoadedScripts.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-07 12:20:02 +00:00
sgjesse@chromium.org
8bc96eca76 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
2009-10-07 07:24:51 +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
mike@belshe.com
5191c81dff Remove the high-priority flag from IdleNotification() since
it is a strange API and unused anyway.

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

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

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3015 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-02 18:49:23 +00:00
mike@belshe.com
bec08c35ca The error cases were returning false instead of true.
So if the caller does something like:
while(!IdleNotification())
it could spin forever if v8 were not initialized.

I'd like to further remove the is_high_priority flag,
because it is not in use. Mads - is there any reason
not to remove it?


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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3012 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-02 13:43:16 +00:00
erik.corry@gmail.com
8cf140259d Align the stack correctly on ARM on calls to fp operation helpers.
Review URL: http://codereview.chromium.org/259013

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3009 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-02 12:47:15 +00:00
whesse@chromium.org
5ec767d037 Ensure V8 is initialized before locking and unlocking threads.
Review URL: http://codereview.chromium.org/242123

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3008 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-02 11:39:56 +00:00
kmillikin@chromium.org
0437bfcfbb Remove unused flag --print-cfg.
Review URL: http://codereview.chromium.org/257030

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3004 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-01 09:29:38 +00:00
sgjesse@chromium.org
786ec6a66f Fix style violation.
TBR=christian.plesner.hansen@gmail.com
Review URL: http://codereview.chromium.org/257017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3003 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-01 07:29:54 +00:00
sgjesse@chromium.org
226b3de18e Fix lint errors.
TBR=christian.plesner.hansen@gmail.com
Review URL: http://codereview.chromium.org/249056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3002 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-01 06:27:29 +00:00
iposva@chromium.org
52d87249cb Based on a patch submitted by Jens Alfke:
Tag Mac OS X VM regions allocated by V8. This has no effect other than making
it possible to identify V8 allocations in the vmmap(1) memory profiling tool,
to get a better idea of an embedder's/Chrome's memory usage.
CRBUG=23455
TEST=Tested by running vmmap(1) and looking for "Memory tag=255" in the output.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-30 22:21:10 +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
antonm@chromium.org
0db55a9456 Do not flatten the string, but just write it out.
In DOM bindings in many cases the string would be externalized immediately.  For other cases
I am going to add explicit flattening.  Overall, it looks like if user wants to flat string
before writing, it should be an explicit method invocation (going to add TryFlattenIfNotFlat
into public V8 API).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-30 14:25:21 +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
christian.plesner.hansen@gmail.com
87fbbd5dfc Changed structure of accessor arguments passing to allow accessor
callbacks to be called directly from native code.

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


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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-30 09:49:36 +00:00
sgjesse@chromium.org
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
antonm@chromium.org
5a2aa8ee8e Fix a lint error.
Review URL: http://codereview.chromium.org/235052

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

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

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

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

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

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

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

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

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

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-28 07:12:39 +00:00
antonm@chromium.org
228f4aee13 Add another method that allows to lookup for a real named property not only
in prototype chain, but in the object itself.

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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2968 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-25 10:36:00 +00:00
sgjesse@chromium.org
196990cea1 Fix lint error.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/230002

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

TBR=sgjesse@chromium.org

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-18 12:05:18 +00:00
whesse@chromium.org
0e63056cf5 Fix --heap-stats option on X64
Review URL: http://codereview.chromium.org/210020

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2899 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-16 11:17:57 +00:00
erik.corry@gmail.com
fb2897bcf9 Clean up the ifdefs on ARM.
Ensure that we use ARMv5 instructions on ARMv6 and ARMv7 CPUs.
Review URL: http://codereview.chromium.org/206012

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


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


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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2890 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-15 11:51:40 +00:00
ager@chromium.org
8a3bce2fa1 Prepare push to trunk. Now working on version 1.3.12.
Review URL: http://codereview.chromium.org/204020

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

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


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

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

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

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


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

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

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

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

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

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

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

Used the constant kInstrSize instead of sizeof(Instr).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-14 06:57:24 +00:00
ager@chromium.org
6f88ca6393 Fix cut and paste error in memory tracking. MapSpace -> CellSpace.
Review URL: http://codereview.chromium.org/194100

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

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

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

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

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

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

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

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

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

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


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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 08:40:59 +00:00
sgjesse@chromium.org
e6b926f19d Set the svn:eol-style property on new file.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/201059

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

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

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

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

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

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


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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-08 10:20:28 +00:00
whesse@chromium.org
2edebc2c9c Remove special CheckEquals function for intptr_t on X64 platform.
Review URL: http://codereview.chromium.org/190004

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

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

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

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


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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2837 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-07 12:24:10 +00:00