Commit Graph

3147 Commits

Author SHA1 Message Date
antonm@chromium.org
0c77912aaf Return length passed instead of receiver to allow chained assignments like
foo = a.length = 7

BUG=crbug.com/36854

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3979 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 16:12:39 +00:00
ager@chromium.org
b299c61976 Add missing error message for calling functions on incompatible receivers.
Review URL: http://codereview.chromium.org/660178

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3978 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 15:46:57 +00:00
antonm@chromium.org
3051ba1a5b Faster filling of arrays of holes.
Review URL: http://codereview.chromium.org/661105

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3977 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 15:19:13 +00:00
bak@chromium.org
4766a592ce - Pushed source code for functions into old space.
- Renamed TryFlattenIfNotFlat to TryFlatten.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 14:37:33 +00:00
fschneider@chromium.org
1d330492af Make another small virtual frame function inlined.
Move a constructor to the platform-independent -inl.h file.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3975 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 14:02:29 +00:00
ricow@chromium.org
46440e6f77 Moved initialization of xmm3 making sure it is initialized on all paths in GeneratePow - solves the sputnik failure on mac.
Review URL: http://codereview.chromium.org/661177

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 12:28:25 +00:00
bak@chromium.org
0e0594dcbc Removed space to please lint.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3972 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 12:00:10 +00:00
kasperl@chromium.org
4abae7a728 Add an explicit API entry to notify V8 that one or more
contexts have been disposed. 
Review URL: http://codereview.chromium.org/661173

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 11:51:33 +00:00
bak@chromium.org
0adf83b10d - Moved the computation of old space limits to after the mandatory scavenge.
This reduces the number of mark sweep operations.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3969 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 11:48:18 +00:00
ricow@chromium.org
def4980625 Changed GeneratePow ensure xmm1 is loaded with y before making the test for NaN
Review URL: http://codereview.chromium.org/660172

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3966 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 11:09:06 +00:00
ricow@chromium.org
496868722f Added fast support for Math.pow. This simply calculates the result using the
same method as the old powi version in runtime.cc and also checks if
the exponent is 0.5 or -0.5 in which case we calculate the square root or 
reciprocal value of the square root.


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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3962 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 09:32:48 +00:00
ager@chromium.org
0f907ff018 Add test of internal fields on global objects. This test currently
fails on the partial snapshots branch.
Review URL: http://codereview.chromium.org/660169

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3961 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 09:23:15 +00:00
kasperl@chromium.org
57f47e704f Add information about time spent in external callback to
traces produces with --trace-gc.
Review URL: http://codereview.chromium.org/661170

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3960 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 08:27:20 +00:00
ager@chromium.org
d2061c07c8 Fix presubmit error.
TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/661090

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3957 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 18:26:36 +00:00
ager@chromium.org
4a9d4b7bd5 Fix the mac debug build. Apparently g++ on Mac cannot figure out that there
is a return in each branch of an if-else.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3956 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 18:19:12 +00:00
whesse@chromium.org
a3a3a1f0be Change KeyedStoreIC interface to take value, key, and receiver in registers.
Review URL: http://codereview.chromium.org/608031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3955 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 18:04:25 +00:00
oleg@chromium.org
a6940ef0a8 Optimize three Number2Integer functions in runtime.cc: remove the check that was already done in JavaScript, add simpler code in case we are getting a SMI
result.

Code review: http://codereview.chromium.org/660084


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 16:46:37 +00:00
sgjesse@chromium.org
05ae9effa3 Revert r3952
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/660086

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 15:43:27 +00:00
sgjesse@chromium.org
8398287070 Refactor the code cache to handle large number of properties on the global object.
A separate object type for the code cache have been added. This object has two different code caches. The first one (default_cache) is a fixed array organized in the same way as the as the code cache was before. The second cache (global_access_cache) is for code stubs to access the global object. This cache is organized as a hash table taking the property name and code flags as the key.

The reason for separating the global access stubs into a hash table representation is that the number of these is not bounded in the same was as the other types.

BUG=613
Review URL: http://codereview.chromium.org/652119

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3952 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 14:24:44 +00:00
serya@chromium.org
164daeda7a Adding 'static const' for arg numbers used with CallCFunction.
Review URL: http://codereview.chromium.org/660078

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 13:06:05 +00:00
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
sgjesse@chromium.org
dfb73e9508 Remove inheritance of chromium flags
Review URL: http://codereview.chromium.org/570022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-24 08:30:12 +00:00
sgjesse@chromium.org
7f11d46363 Add the ability to compile with profiler guided optimizations on Windows
It is now possible to experiment with profiler guided optimizations when building V8. First build an instrumented sample shell:

  > scons pgo=instrument sample=shell

Then run the JavaScript code to optimize for using that sample shell. Finally build an optimized sample shell.

  > scons pgo=optimize sample=shell

Currently this does not work when building V8 as a DLL due to scons deleting v8.exp prior to the pgo=optimize step.

Due to a bug in Visual Studio (seen in version 2008) the function MessageDispatchHelperThread::Run() in debug.cc needs to be empty for this to work.
Review URL: http://codereview.chromium.org/652114

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3934 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-23 15:22:48 +00:00
serya@chromium.org
b1e705aa8c Typo fixed.
Review URL: http://codereview.chromium.org/650047

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3933 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-23 12:52:29 +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
ricow@chromium.org
27eaf97350 Added test for bug 619 - we should move this to object-define-property when the bug has been corrected.
Review URL: http://codereview.chromium.org/651028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3918 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 13:27:43 +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