yangguo@chromium.org
3077e8aa2f
Generated code for substring slices in ia32.
...
Review URL: http://codereview.chromium.org/7744052
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9064 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 08:22:41 +00:00
svenpanne@chromium.org
4084e698c3
Fixed a bug in the chaining of fixup position
...
The ARM and MIPS assemblers had a bug where they did not handle the last element
in the list of code positions correctly during the fixup of offsets for forward
jumps. This happened when the first instruction contained a forward jump to a
label, and that label was used in a forward jump later, too.
Unified the code for Assembler::next on ARM and MIPS while we were there.
Added test cases, even for ia32/x64, which seem to be correct, even I don't
fully understand why... %-}
BUG=v8:1644
Review URL: http://codereview.chromium.org/7786001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 07:36:31 +00:00
yangguo@chromium.org
d74cceb2bc
Removing bogus check introduced in r9027.
...
Review URL: http://codereview.chromium.org/7781013
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 14:04:01 +00:00
yangguo@chromium.org
a2f1431aff
MIPS: Fix an invalid stack-check in the simulator.
...
This fixes mjsunit regress-1132.
BUG=
TEST=
Review URL: http://codereview.chromium.org/7781002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9059 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 13:29:55 +00:00
yangguo@chromium.org
596daba583
Fix for a possible bug in RegExp stack guard.
...
Review URL: http://codereview.chromium.org/7744051
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9058 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 13:04:33 +00:00
jkummerow@chromium.org
5262061eac
Convert a bunch of ASSERTs to STATIC_ASSERTs
...
making our debug binaries ever so slightly faster
Review URL: http://codereview.chromium.org/7776010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 13:02:35 +00:00
fschneider@chromium.org
a846d482dd
Revert r9047 to fix broken build.
...
I need some more time to properly fix the problem.
TBR=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/7781008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 12:19:43 +00:00
yangguo@chromium.org
054b737ea5
MIPS: Fixed a RecordWrite call in the FullCodeGenerator.
...
This caused an occasional failure in the Threading2 cctest running in debug mode with --always-opt.
BUG=
TEST=
Review URL: http://codereview.chromium.org/7779007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 11:56:48 +00:00
lrn@chromium.org
5c32722581
Make built-in functions not rely on callback functions .call method.
...
In builtin code, we can't rely on Function.prototype.call being unmolested.
Review URL: http://codereview.chromium.org/7776008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 11:44:54 +00:00
yangguo@chromium.org
2ade6a5a2e
Small fix for STATIC_ASSERT.
...
Review URL: http://codereview.chromium.org/7776007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 11:41:23 +00:00
fschneider@chromium.org
8ab5b50f1b
Introduce support for local function declarations in Hydrogen.
...
Review URL: http://codereview.chromium.org/7782001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 10:50:47 +00:00
jkummerow@chromium.org
1befe0bbbb
Remove unnecessary break-after-return in switch statement
...
BUG=v8:1642
Review URL: http://codereview.chromium.org/7781007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 10:47:00 +00:00
ricow@chromium.org
e7032b8c48
Prepare push to trunk. Now working on version 3.5.10.
...
Review URL: http://codereview.chromium.org/7782002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 10:15:47 +00:00
yangguo@chromium.org
55849e95d7
MIPS: port Tentative implementation of string slices (hidden under the flag --string-slices).
...
Ported r9027 (e9a3514)
BUG=
TEST=
Review URL: http://codereview.chromium.org/7736010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 09:36:58 +00:00
jkummerow@chromium.org
a549ddf49d
Fix warnings reported by MSVS for shared library build
...
TEST=compiles without warnings (esp. the shared-lib build with Visual Studio)
Review URL: http://codereview.chromium.org/7745053
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 09:14:59 +00:00
vegorov@chromium.org
9e2db4c0f0
MIPS: Fix KeyedStoreStubCompiler::GenerateStoreFastDoubleElement()
...
Test regress-91013.js (to ensure that the stored value was returned) passed on mips
without this fix, since the input value (in value_reg, a0) also happens to be in
mips return value register v0 at the time of call.
But it is fragile to depend on that behavior, so an explicit move from a0 to v0
is warranted. This fix puts that move in the delay slot of the Ret().
Patch by Paul Lind.
BUG=
TEST=
Review URL: http://codereview.chromium.org/7779006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 09:10:27 +00:00
fschneider@chromium.org
fa2ff742ed
Adjust unit test to avoid flakyness when running with the ARM simulator.
...
In some cases the assert that the test function is not optimized fails
because the function may be optimized already after the second invocation.
(e.g. when running slow in debug mode)
Review URL: http://codereview.chromium.org/7778009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 08:46:35 +00:00
yangguo@chromium.org
ab03dff745
Commenting register usage in MIPS.
...
Review URL: http://codereview.chromium.org/7775007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9033 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 08:41:39 +00:00
fschneider@chromium.org
a2deb8af0b
Landing: MIPS: Fixed a bug in a special case of MacroAssembler::Ext.
...
Original code review: http://codereview.chromium.org/7777005/
Review URL: http://codereview.chromium.org/7778007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9032 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 07:13:06 +00:00
fschneider@chromium.org
a58b9ba90b
Remove code handling parameters rewritten to properties (aka synthetic properties).
...
After merging the new arguments branch, there is no need for this code anymore.
TEST=all tests pass
Review URL: http://codereview.chromium.org/7753030
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 07:07:39 +00:00
lrn@chromium.org
cd3588d582
Make (some) functions called from builtin functions use the callback's global as receiver.
...
Changes GetGlobalReceiver() to GetDefaultReceiver(func) that returns undefined
for strict and native functions, and the function's context's global proxy
for "normal" functions.
BUG=v8:1547
TEST=cctest/api-test/ForeignFunctionReceiver
Review URL: http://codereview.chromium.org/7741042
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9030 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 13:53:00 +00:00
yangguo@chromium.org
daf8135ba6
Fixed regression introduced in r9027.
...
Review URL: http://codereview.chromium.org/7741041
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 13:40:25 +00:00
mstarzinger@chromium.org
fbe1690def
Only count uniquely named native scripts for debug.
...
The debugger exposes all native script which might include duplicates
having the same name. This is triggered by debug-script in stress mode
on the gc branch.
R=sgjesse@chromium.org
BUG=v8:1641
TEST=mjsunit/debug-script
Review URL: http://codereview.chromium.org/7740050
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 13:23:25 +00:00
yangguo@chromium.org
77141f78ff
Tentative implementation of string slices (hidden under the flag --string-slices).
...
TEST=test/mjsunit/string-slices.js
Review URL: http://codereview.chromium.org/7477045
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 13:03:30 +00:00
yangguo@chromium.org
92b9bdfec5
Fixed regression introduced in r9023.
...
Review URL: http://codereview.chromium.org/7740049
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 11:56:12 +00:00
jkummerow@chromium.org
b2bc11a602
Add a bunch of compile-time flags to the gyp build (and top-level Makefile)
...
Review URL: http://codereview.chromium.org/7748018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9025 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 11:23:51 +00:00
yangguo@chromium.org
ec7b679a8d
Changed the order of arguments in the check as suggested to issue 1275.
...
BUG=v8:1275
Review URL: http://codereview.chromium.org/7740046
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 08:45:47 +00:00
yangguo@chromium.org
d727ba855c
Changed some jumps to short jumps in IA32 generated code.
...
Review URL: http://codereview.chromium.org/7745022
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 08:22:13 +00:00
svenpanne@chromium.org
a5001de29c
Centralize code for freeing LargeObjectChunks, fixing an uncommit bug.
...
Due to heavy copy-n-paste, the handling of guard pages was inconsistent and we
didn't uncommit exactly the region we previously committed. Furthermore, the LOG
calls weren't consistent, either.
Review URL: http://codereview.chromium.org/7744025
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9021 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 07:44:36 +00:00
fschneider@chromium.org
3cdff159ea
Landing: MIPS: Remove gp and sp from callee-saved register list.
...
Original code review: http://codereview.chromium.org/7740018/
Review URL: http://codereview.chromium.org/7744050
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 07:24:30 +00:00
jkummerow@chromium.org
dda2889ba1
Refactor .gyp files:
...
common.gypi now contains global target defaults and is included by all .gyp files;
standalone.gypi contains definitions for stand-alone v8 builds.
This fixes d8 for the ARM simulator.
TEST=compiles and tests pass on all platforms
Review URL: http://codereview.chromium.org/7740020
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 14:50:09 +00:00
lrn@chromium.org
2f2f90610e
Changed computation of func.caller to skip some built-in functions.
...
Now skips built-in functions called from other built-in functions,
so only the initally called built-in function is exposed.
Review URL: http://codereview.chromium.org/7740021
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 13:38:58 +00:00
svenpanne@chromium.org
3d88d16f47
Two tiny refactorings: Removed a bit of copy-n-paste. Moved LargeObjectChunk::Free from header to implementation, it does a syscall, anyway.
...
Review URL: http://codereview.chromium.org/7744023
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9017 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 13:35:15 +00:00
lrn@chromium.org
893b8320b8
Added access check to Runtime_GetPrototype.
...
BUG=93759
Review URL: http://codereview.chromium.org/7701023
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9016 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 13:22:55 +00:00
fschneider@chromium.org
2b024e3d5d
Land two MIPS changes contributed by Paul Lind.
...
1. Issue 7744014: MIPS: Fixed and optimized MacroAssembler::Trunc_uw_d, Cvt_d_uw, Ext, Ins. (http://codereview.chromium.org/7744014/ )
2. Issue 7740019: MIPS: Fix for function argument access in non-strict mode. (http://codereview.chromium.org/7740019/ )
Review URL: http://codereview.chromium.org/7741016
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9014 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 12:12:25 +00:00
svenpanne@chromium.org
a546e4a8dd
Fixed bool <-> Executability confusion and improved typing a bit.
...
Passing a value of type Executability to a function expecting a bool worked only
by accident (because of the order of values in the enum). But using boolean
parameters is often a bad idea, anyway, so we use Executability directly.
Just another example why implicit type conversions in C++ are a bad idea... :-P
Review URL: http://codereview.chromium.org/7753001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9013 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 10:55:44 +00:00
lrn@chromium.org
0946ce67d3
Make FromPropertyDescriptor not trigger inherited setters.
...
Review URL: http://codereview.chromium.org/7745017
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 09:07:43 +00:00
ricow@chromium.org
d9eccf2beb
Prepare push to trunk. Now working on version 3.5.9.
...
Review URL: http://codereview.chromium.org/7714033
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9007 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-24 11:53:59 +00:00
yangguo@chromium.org
02e70b799b
Fixed the shared library build of D8 that was broken by r9005.
...
Review URL: http://codereview.chromium.org/7701024
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-24 10:48:48 +00:00
yangguo@chromium.org
1afbe92a0e
Fixed minor bug in D8 related to mapping counters to a file.
...
Review URL: http://codereview.chromium.org/7717022
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-24 09:47:10 +00:00
yangguo@chromium.org
2d538fe6a6
removed executable bit in those files.
...
Review URL: http://codereview.chromium.org/7710019
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9003 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 13:57:37 +00:00
lrn@chromium.org
13dd915a2a
Fix typo in assert.
...
Also remove the requirement to have an AssertNoAllocation object when getting the flat content. We actually do allow allocation, it's just GC's we don't allow.
Review URL: http://codereview.chromium.org/7710018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 13:23:30 +00:00
mikhail.naganov@gmail.com
2e1e5fc09c
Heap profiler: for objects of class "Object", try to lookup name
...
from the constructor function. This works well for binding objects,
and this matches DevTools' algorithm for name assignment.
R=sgjesse@chromium.org
BUG=none
TEST=test-heap-profiler/GetConstructorName
Review URL: http://codereview.chromium.org/7709026
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 12:24:54 +00:00
lrn@chromium.org
9eb7d4a53c
Replace ToAsciiVector and ToUC16Vector with single function that returns a tagged value.
...
The tag tells whether the content is ASCII or UC16, or even if the string wasn't flat.
BUG: v8:1633
Review URL: http://codereview.chromium.org/7709024
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 12:22:12 +00:00
erik.corry@gmail.com
bf4222fb29
Fix ARM build for gcc-4.6.
...
This is based on Peter Varga's work in http://codereview.chromium.org/7708004/
but with a different solution for the Operand(0) int/pointer ambiguity.
Review URL: http://codereview.chromium.org/7706030
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8998 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 12:00:09 +00:00
fschneider@chromium.org
701146a3d7
Perform range analysis after GVN.
...
This eliminate redundant HChange instructions and allows range information of
converted values propagated across control-flow splits.
It fixes the performance regression on code like:
if (x > 1) {
y = x - 1;
}
where we should eliminate the overflow check on the sub inside the if-statement.
Review URL: http://codereview.chromium.org/7709025
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8997 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 11:19:08 +00:00
yangguo@chromium.org
011b136ee0
Slight API change enabling opting out from null termination in String::Write*().
...
BUG=v8:1537
TEST=cctest test-api/StringWrite
Review URL: http://codereview.chromium.org/7706002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8996 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 11:11:12 +00:00
fschneider@chromium.org
99b4d756fc
Insert representation changes before doing range analysis and fix a bug in Range::Copy.
...
This improves our static type information by calculating the result type
of conversions (HChange) during range analysis. It allows e.g. to eliminate
the write barrier in the following example where it was not possible before:
function f(x) {
var y = x + 1;
if (y > 0 && y < 100) {
a[0] = y;
}
}
* Fix bug in Range::Copy. The minus-zero flags has to be preserved by default.
Review URL: http://codereview.chromium.org/7634022
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 07:34:45 +00:00
vitalyr@chromium.org
633e615b89
Improve memory usage of receiver type feedback.
...
Some AST nodes (Property, Call, etc.) store either a list of receiver
types or a monomorphic receiver type. This patch merges the two fields
using a small pointer list. GetMonomorphicReceiverType() is now a
purely convenience function returning the first and only recorded
type.
This saves about 500K (of about 39M) on average when compiling V8
benchmark as measured by a simple patch adding a zone allocation
counter (https://gist.github.com/1149397 ).
R=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/7655017
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 14:23:37 +00:00
yangguo@chromium.org
107d1b5e65
Inserted a missing string encoding check in lastIndexOf.
...
Review URL: http://codereview.chromium.org/7685005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8992 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 13:55:25 +00:00