Commit Graph

6121 Commits

Author SHA1 Message Date
svenpanne@chromium.org
4e049d4619 Include more information when printing phi nodes.
Still a bit cryptic, but people interested in phi nodes should know what they're doing... ;-)
Review URL: http://codereview.chromium.org/7824004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 14:59:47 +00:00
yangguo@chromium.org
00c1153887 Changed printing of immediate result in d8's interactive shell.
BUG=v8:371

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 14:02:35 +00:00
keuchel@chromium.org
d434d3158c Detect conflicting variable bindings in harmony mode.
BUG=
TEST=mjsunit/harmony/block-conflicts.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9102 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 12:31:18 +00:00
lrn@chromium.org
fdc7f60f42 Make functions on the built-in object non-writable.
Review URL: http://codereview.chromium.org/7736018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 11:57:02 +00:00
yangguo@chromium.org
86a62d0da3 Added check for trailing whitespaces and corrected existing violations.
Review URL: http://codereview.chromium.org/7826007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 11:28:10 +00:00
ricow@chromium.org
4e94cd8b08 Make arguments and caller always be null on native functions (fixes issue 1548 and issue 1643).
With this change we follow Firefox, Safari has a slightly different approach where the property is just not there (at least according to GetOwnProperty). 
Review URL: http://codereview.chromium.org/7792054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 11:09:11 +00:00
svenpanne@chromium.org
d02dfb301d Tiny change flags cleanups.
Introduced a getter for change flags, making a related helper function private.

Do not print a '*' at the end of hydrogen instruction mnemonics with side
effects, this is subsumed by the 'changes' info.
Review URL: http://codereview.chromium.org/7827009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 11:06:03 +00:00
vegorov@chromium.org
e833f91eb3 Do constant function check earlier in TryCallApply and ensure correct environment for deopt.
R=kmillikin@chromium.org
BUG=v8:1650
TEST=test/mjsunit/regress/regress-1650.js
Review URL: http://codereview.chromium.org/7812033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9091 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 10:33:59 +00:00
kmillikin@chromium.org
690efb3a04 Fix deoptimization data printing.
Remove a spurious newline.

R=whesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9090 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 08:00:40 +00:00
lrn@chromium.org
1b4cb57c52 Cleanup of messages.js.
Lock down some otherwise modifiable objects that don't need it.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 07:39:22 +00:00
yangguo@chromium.org
d586e9c504 MIPS: port ARM: Fix context save/restore for VFP registers.
This commit was missed/skipped earlier for some reason.

Ported r8357 (d78dae4)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 07:35:33 +00:00
jkummerow@chromium.org
c657d440ba MIPS: port ARM: Changed the handling of compiletime CPU feature detection
Another port of an older arm commit, which was not upstreamed at the time.

Ported r7754 (ef678641)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-31 15:34:33 +00:00
jkummerow@chromium.org
6c9ce544cc MIPS: Convert a bunch of ASSERTs to STATIC_ASSERTs
Ported r9057 (f6c548d)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-31 15:22:43 +00:00
fschneider@chromium.org
ffc6c7e56b Introduce local function declarations in Crankshaft and fix issue 1647.
We have to emit code for declarations later into the body block
(and not into the start block) so that the environment contains
the correct values.

In order to capture the environment effect of the declarations
that generate code (function declarations) I inserted a separate
AST id and a HSimulate after the declarations are visited.

Also fixes handling deopt in named function expressions:
BUG=v8:1647
TEST=test/mjsunit/regress/regress-fundecl.js, test/mjsunit/regress/regress-1647.js
Review URL: http://codereview.chromium.org/7776009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-31 13:26:08 +00:00
keuchel@chromium.org
227e679ce9 MIPS: port Temporal dead zone behaviour for let bindings.
Ported r9070 (1cfdac01)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9080 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-31 10:01:43 +00:00
yangguo@chromium.org
ea1879f1d5 Prepare push to trunk. Now working on version 3.6.0.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-31 07:59:23 +00:00
yangguo@chromium.org
90c6c826ba MIPS: port Fix for a possible bug in RegExp stack guard.
Ported r9058 (43f127bd)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-31 07:32:47 +00:00
mikhail.naganov@gmail.com
4f3a8bd137 Return v8::True or v8::False instead of using Boolean::New.
BUG=None
TEST=None

R=mnaganov@chromium.org

Signed-off-by: Thiago Farina <tfarina@chromium.org>

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9073 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 18:45:48 +00:00
yangguo@chromium.org
3c04a9d71d MIPS: Added ASSERTs to BranchShort to detect bad use of 'at' register.
Make sure 'at' and an immediate operand can't be used together in cases
where 'at' would be overwritten by li.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9072 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 16:15:48 +00:00
yangguo@chromium.org
65daf10c23 MIPS: Fix implementation of string slices.
Bug on mips using at register innapropriately, use different reg as temp.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 16:13:02 +00:00
keuchel@chromium.org
42388ad5c7 Temporal dead zone behaviour for let bindings.
BUG=
TEST=mjsunit/harmony/block-let-semantics.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 11:23:57 +00:00
mstarzinger@chromium.org
c6e42e1bfa Fix initial prototype of WeakMap function.
The bootstrapper accidentally overwrote the constructor property of the Object
prototype because it used initial_object_prototype() as prototype for WeakMap.
Unfortunately this is not possible for experimental natives because they are
installed after the snapshot initialization finished.

R=erik.corry@gmail.com
TEST=mjsunit/mirror-object,mjsunit/harmony/weakmaps

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 09:35:20 +00:00
yangguo@chromium.org
4cc8ca359a Fixing presubmit issue.
Review URL: http://codereview.chromium.org/7792034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 09:05:40 +00:00
yangguo@chromium.org
d5a0b00bde Fixing compile error introducted by a typo in r9064.
Review URL: http://codereview.chromium.org/7790022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9065 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 08:41:54 +00:00
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
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
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
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
svenpanne@chromium.org
4b930daf1a Ensure that the current isolate is initialized in the API function Context::GetEntered.
r8833 introduced a regression in our API semantics, showing up in e.g.
Chrome 12, which is fixed by this patch.
Review URL: http://codereview.chromium.org/7686005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8987 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 13:04:14 +00:00
lrn@chromium.org
41426bde56 Fix bug introduced by earlier "cleanup".
TEST=message/replacement-marker-as-argument

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 12:54:03 +00:00
rossberg@chromium.org
1a717259f4 Prepare push to trunk. Working version now 3.5.8.
Review URL: http://codereview.chromium.org/7697017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8980 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 10:55:48 +00:00
lrn@chromium.org
d2626be5d9 Prune some internal objects' prototypes.
Review URL: http://codereview.chromium.org/7703005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8979 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 09:51:56 +00:00
mstarzinger@chromium.org
d4a6b4ac5b Make instruction for write barrier smaller.
R=yangguo@chromium.org
BUG=v8:1495

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8978 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 09:10:47 +00:00
keuchel@chromium.org
a367058c6a MIPS: port Parse harmony let declarations.
Port r8944 (a5a36f4)

Original commit message:
Implementation of the harmony block scoped let bindings as proposed here:
http://wiki.ecmascript.org/doku.php?id=harmony:block_scoped_bindings
Changes to the syntax are explained there. They are active under the
harmony_block_scoping_ flag in the parser.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8977 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 09:05:28 +00:00
whesse@chromium.org
d3880a19bc MIPS: port Clean up the nesting stack in the full code generator.
Port 8972 (6a896b3)

Original commit message:
Remove unused methods, introduce named constants, and attempt to add some
sanity to naming.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 09:00:27 +00:00
lrn@chromium.org
d8a123169b Make regexp flag parsing stricter.
BUG=v8:1628
TEST=mjsunit/regress/regress-219

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-19 11:02:41 +00:00
kmillikin@chromium.org
dc917453b3 Clean up the nesting stack in the full code generator.
Remove unused methods, introduce named constants, and attempt to add some
sanity to naming.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8972 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-19 09:54:08 +00:00
ricow@chromium.org
025c05dc25 Remove trailing whitespaces from *.js files.
This is a whitespace removal only change
Review URL: http://codereview.chromium.org/7687001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-19 05:24:39 +00:00
lrn@chromium.org
7939f9acf2 Make scanner handle invalid unicode escapes in identifiers correctly.
I.e., don't just convert \u to u in identifiers (like in strings and regexps).

Also make the scanning of RegExp flags not interpret the escapes.

(Fix and reapply of r8942)

BUG=v8:1620
TEST=mjsunit/regress/regress-1620

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8969 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-18 12:47:23 +00:00
jkummerow@chromium.org
c50094bda3 Fix another handful of memory leaks
TEST=valgrind reports 0 bytes definitely lost for cctest/test-api/RunTwoIsolatesOnSingleThread

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8968 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-18 12:33:40 +00:00
jkummerow@chromium.org
e4d43b7306 Fix three ~Isolate() related memory leaks
BUG=93253
TEST=running valgrind on cctest/test-api/RunTwoIsolatesOnSingleThread reports fewer leaks than before

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8967 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-18 12:14:12 +00:00
danno@chromium.org
4c460099a0 Unify GetElement handlers in ElementsAccessor
BUG=none
TEST=external-arrays.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8966 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-18 09:51:08 +00:00
danno@chromium.org
a8b4b4f42a Remove redundant implementation of UnionOfKeys
R=svenpanne@chromium.org
BUG=none
TEST=external-arrays.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8965 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-18 09:20:32 +00:00
ricow@chromium.org
d9c1984fe3 Use InternalArray in Object.defineProperties to avoid issues with overwriten properties on Array.prototype
TEST=mjsunit/regress/regress-1625
BUG=v8:1625
Review URL: http://codereview.chromium.org/7631039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-18 08:39:06 +00:00
danno@chromium.org
edd691960f Implement UnionOfKeys for NonStrictArguments
BUG=none
TEST=cctest/test-api/IndexedInterceptorNonStrictArgsWithIndexedAccessor

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 16:15:30 +00:00
danno@chromium.org
5d634be405 Prepare push to trunk. Now working on version 3.5.7.
R=ricow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8957 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 13:55:05 +00:00
keuchel@chromium.org
16be5abdec Initialize harmony block scoping field in scanner.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8955 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 11:17:59 +00:00
vegorov@chromium.org
4b94137323 Fix GC unsafe place in JSProxy::DeletePropertyWithHandler.
Review URL: http://codereview.chromium.org/7670023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8952 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 09:51:20 +00:00
danno@chromium.org
080b25063f Bugs in x64 ICs introduced by array length refactor.
BUG=chromium:93044
TEST=external-array.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8951 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 09:39:03 +00:00
mstarzinger@chromium.org
ca049c7b58 fix compilation with gcc 4.6
* src/bootstrapper.cc (Genesis::InitializeExperimentalGlobal): Remove
  assigned-but-unused var.

BUG=
TEST=passes test suite, modulo http://code.google.com/p/v8/issues/detail?id=1621

Review URL: http://codereview.chromium.org/7658014
Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 09:22:58 +00:00
jkummerow@chromium.org
9f9959182d Fix memory leaks in ~Zone and ~Isolate
TEST=chromium valgrind bots

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 08:48:54 +00:00
erik.corry@gmail.com
1e2d65780e Fix compilation on Linux 2.6.9 and older.
Review URL: http://codereview.chromium.org/7655016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8948 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 08:24:36 +00:00
ricow@chromium.org
7f36b52540 Revert 8942 "Make scanner not accept invalid unicode escapes in identifiers"
This is causing webkit failures, reverting until we figure out if this is a V8 regression or wrong test expectations.
Review URL: http://codereview.chromium.org/7669017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8947 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 08:22:41 +00:00
vegorov@chromium.org
bdfceace53 Fix potentially GC unsafe place in JSObject::DeleteElementWithInterceptor.
Review URL: http://codereview.chromium.org/7660012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8946 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 15:51:49 +00:00
keuchel@chromium.org
a6cf884bcd Presubmit fix.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8945 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 15:15:34 +00:00
keuchel@chromium.org
c6c504f8b6 Parse harmony let declarations.
Implementation of the harmony block scoped let bindings as proposed here:
http://wiki.ecmascript.org/doku.php?id=harmony:block_scoped_bindings

Changes to the syntax are explained there. They are active under the
harmony_block_scoping_ flag in the parser.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 14:24:12 +00:00
jkummerow@chromium.org
9295a3a0bb Use immediates when possible for HBoundsCheck and HLoadKeyedFastElement
Review URL: http://codereview.chromium.org/7608020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8943 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 13:32:27 +00:00
lrn@chromium.org
7d17c8d5d3 Make scanner not accept invalid unicode escapes in identifiers.
BUG=v8:1620
TEST=mjsunit/regress/regress-1620

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 13:31:08 +00:00
mstarzinger@chromium.org
d640d8d913 Fix issue with prototype of WeakMap constructor.
The WeakMap constructor didn't have a unique prototype, so it shared one with
Object. All WeakMap functions (including "get" and "set") were installed on
that prototype.

R=rossberg@chromium.org
BUG=v8:1617
TEST=mjsunit/harmony/weakmaps

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8941 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 12:09:47 +00:00
danno@chromium.org
fc17bd3795 Fix live-object-list to work with isolates.
TEST: Build v8 with live-object-list enabled.

Review URL: http://codereview.chromium.org/7398025
Patch from Alexander Miller <Alexander.Miller@palm.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8940 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 11:47:06 +00:00
rossberg@chromium.org
b1ae597808 MIPS: port Implement Harmony semantics for typeof null (behind a flag).
Port r8876 (2aeeae7)

Original commit message:
Harmony is intended to make typeof null === "null". This may
break existing programs. Implementing it will allow us to run
some tests on the actual web.

BUG=
TEST=

Review URL: http://codereview.chromium.org/7650009
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 10:08:50 +00:00
svenpanne@chromium.org
af112fda75 Refactored DirectCEntryStub::GenerateCall a bit to make it clearer what's going on and added an ASSERT.
Review URL: http://codereview.chromium.org/7640016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 09:58:34 +00:00
kmillikin@chromium.org
06b8e73b99 MIPS: port Simplify handling of exits from with and catch.
Ported r8922 (5ea2fb5)

Original commit message:
Remove the try/finally used for with and catch. Instead of using
try/finally to handle break and continue from with or catch,
statically track nesting dept and clean up when compiling break or
continue.
And instead of using try/finally to handle throw to handler in a frame
whose pc is inside a with or catch, store the context that the handler
should run in in the handler itself.

BUG=
TEST=

Review URL: http://codereview.chromium.org/7648026
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 08:48:45 +00:00
cira@chromium.org
24e6d48d9b Return error not null for date time format.
BUG=v8:1602
TEST=new (new v8Locale().createDateTimeFormat()).getWeekdays should return Error not a Null.
Review URL: http://codereview.chromium.org/7647027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-15 22:29:03 +00:00
ricow@chromium.org
685c5c1fb8 Add FIXED_DOUBLE_ARRAY_TYPE to INSTANCE_TYPE_LIST_ALL in objects.h
Leaving this out can cause crashes when running with --heap-stats (but this is only used when reporting heap statistics, so this is not a stability issue).
Review URL: http://codereview.chromium.org/7647018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8932 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-15 12:55:18 +00:00
whesse@chromium.org
90561038c1 Prepare push to trunk. Now working on version 3.5.6.
Review URL: http://codereview.chromium.org/7645020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8931 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-15 10:39:51 +00:00
danno@chromium.org
96f198a4dc Change AddElementsToFixedArray to work on FixedArrayBase rather than JSObject
In the process, make ElementsAccessors work internally more seamlessly with FixedArrayBase.

R=svenpanne@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-12 14:52:03 +00:00
danno@chromium.org
48f411a225 Change JSObject elements to be of type FixedArrayBase
R=kmillikin@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8927 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-12 13:54:27 +00:00
kmillikin@chromium.org
91553bbacd Simplify handling of exits from with and catch.
Remove the try/finally used for with and catch.  Instead of using
try/finally to handle break and continue from with or catch,
statically track nesting dept and clean up when compiling break or
continue.

And instead of using try/finally to handle throw to handler in a frame
whose pc is inside a with or catch, store the context that the handler
should run in in the handler itself.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-12 10:52:49 +00:00
fschneider@chromium.org
6549163a55 Add roundsd instruction to ia32 and use it in optimized Math.floor.
It is available platforms that have SSE 4.1 and allows us to handle
negative numbers without deoptimization. Before we would deoptimize
on negative inputs to Math.floor. x64 already uses this instruction.

* Change Math.floor unit test to make sure every test case gets
optimized by changing the source code for each test case.

* Fix HIR debug printing for some instructions.
Review URL: http://codereview.chromium.org/7628017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-12 10:13:40 +00:00
mikhail.naganov@gmail.com
58824435d1 Pick the namespace alias 'i' from v8.h.
These files already include v8.h so they don't need to define the
namespace alias again.

Signed-off-by: Thiago Farina <tfarina@chromium.org>

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-12 09:49:55 +00:00
svenpanne@chromium.org
808748b44d Do not use deprecated ARM instructions in DirectCEntryStub::GenerateCall.
Non-ancient versions of the ARM-ARM explicitly deprecate most uses of the PC
within instructions and older ARM implementations have a non-predictable offset
(8 or 12) for some of these deprecated uses. Avoiding the deprecated instruction
costs us one additional instruction in DirectCEntryStub::GenerateCall, but this
should not cause any significant performance degradation.

The deoptimizer still uses the PC in a stm instruction, but it is a bit unclear
what to do about that, so simply a comment has been added to reconsider this in
the future.
Review URL: http://codereview.chromium.org/7633014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8916 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-12 08:45:17 +00:00
keuchel@chromium.org
3c7ca304fe Preliminary code for block scopes and block contexts.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 16:29:28 +00:00
yangguo@chromium.org
431b51aca7 Rollback of r8903
Review URL: http://codereview.chromium.org/7620012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8909 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 16:11:07 +00:00
yangguo@chromium.org
189be860aa Quick fix to issue 1593
BUG=v8:1593

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 15:18:55 +00:00
danno@chromium.org
d5d7185578 Create a common base class for Fixed-, FixedDouble- and ExternalArrays.
Also unify Crankshaft code to load array length.

BUG=v8:1493
TEST=external-arrays.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8901 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 14:00:16 +00:00
svenpanne@chromium.org
3c13926936 Output missing comments after the last disassembled instruction.
Review URL: http://codereview.chromium.org/7623014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8900 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 13:59:29 +00:00
svenpanne@chromium.org
bb81895595 Fixed printing of deoptimization input data without --print-code-verbose.
Review URL: http://codereview.chromium.org/7617008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8898 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 13:56:09 +00:00
svenpanne@chromium.org
93808ce651 Removed some arbitrary size restrictions when disassembling generated code.
We output line-by-line now, this avoids hitting StringBuffer ASSERTs when
disassembling huge code objects.
Review URL: http://codereview.chromium.org/7622006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8897 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 12:52:37 +00:00
fschneider@chromium.org
384615f2a4 Remove unused code from runtime profiler.
Review URL: http://codereview.chromium.org/7617003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8887 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 08:26:01 +00:00
svenpanne@chromium.org
06bea35f7f Simplify and optimize ToBoolean handling.
Changing our builtin JavaScript code slightly, we can make sure that we never
see internal objects as arguments for ToBoolean at runtime. Removing that case
from the stub generator and crankshaft makes things a lot easier.

Heap numbers can never be undetectable (only strings and spec objects can), so
we can leave out a useless test.

Try to re-use a non-null register value when returning 'true' in some cases.

Removed special handling of the 'handle all' case, it will very probably never
happen in real code and only makes things more complicated.

Improved naming of the ToBoolean stubs a bit, reflecting the order in which
cases are handled in the code itself.
Review URL: http://codereview.chromium.org/7497063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8886 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 07:22:16 +00:00
antonm@chromium.org
48e6274cc3 Allows not API functions as inputs for CreationConext method.
Review URL: http://codereview.chromium.org/7552034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8885 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 06:40:14 +00:00
vitalyr@chromium.org
a107387dde Fix fun.apply(receiver, arguments) optimization.
R=kmillikin@chromium.org
BUG=v8:1592
TEST=mjsunit/regress/regress-1592.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8884 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-10 16:05:17 +00:00
fschneider@chromium.org
e63fdc619d Fix x64 build.
TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/7604034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-10 13:11:14 +00:00
fschneider@chromium.org
f17bd8ca51 Fix three bugs with handling negative zero in the optimizing compiler.
* Bug fix for range analysis (contributed by Andy Wingo). Ranges of
double values have to include negative zero. Original code review:
 http://codereview.chromium.org/7514040/

* Fix a bug in optimized Math.round on ARM. When emitting minus-zero checks
we previously return a wrong result because of incorrect register assignment.

* Fix performance problem in IA32 and x64. Refine the checks
for minus zero and avoid unnecessary deoptimizations on Math.floor.

* Improve mjsunit test for Math.round to make sure we also
 get the optimized version of the code for each test case.
Review URL: http://codereview.chromium.org/7604028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-10 12:32:43 +00:00
rossberg@chromium.org
bd18514972 Implement Harmony semantics for typeof null (behind a flag).
Harmony is intended to make typeof null === "null". This may
break existing programs. Implementing it will allow us to run
some tests on the actual web.

R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-10 12:12:06 +00:00
kmillikin@chromium.org
f14dfd7aa8 Prepare push to trunk. Now working on version 3.5.5.
R=danno@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-10 11:22:23 +00:00
danno@chromium.org
ff13ab4575 Refactor UnionOfKeys into ElementsAccessor
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-10 10:51:01 +00:00
mstarzinger@chromium.org
c68d205c08 ARM: Fix deoptimizer for two-word call sites.
R=svenpanne@chromium.org,kmillikin@chromium.org
BUG=v8:1584

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-10 08:03:22 +00:00
vitalyr@chromium.org
df91f6b396 Simpler (and a bit faster) keyword matcher.
Replaced the keyword matching state machine with a switch on the first char followed up by inlined char comparisons.

R=lrn@chromium.org
TEST=cctest/test-parsing/ScanKeywords

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-09 13:32:53 +00:00
kmillikin@chromium.org
7adb10a48e Fix a bug in named getter/setter compilation.
Because these are function literals that have an associated name, we were
compiling them as if they were named function expressions.  This is
incorrect, the property name should not be in scope.

R=vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-09 12:43:08 +00:00
lrn@chromium.org
2f826c2b89 Added fast detection of one character tokens.
Reduced size of first-character table for keyword scanner.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-09 11:28:09 +00:00
svenpanne@chromium.org
399728afc5 Fixed extremely important, mission-critical presubmit warnings...
Review URL: http://codereview.chromium.org/7600019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-09 08:16:32 +00:00
svenpanne@chromium.org
79276ec132 Implement type recording for ToBoolean on ARM.
Review URL: http://codereview.chromium.org/7491054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-09 07:59:00 +00:00
kmillikin@chromium.org
d941053dbe Revert "Revert "Fix a bug in scope analysis.""
Reapply r8838 with a fix for the issue of function names.

Because function names can be added/changed/removed through the API,
remember whether the function is anonymous when initially parsed and use
that information when compiling.

R=vegorov@chromium.org
BUG=1583
TEST=regress-1583

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8858 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-08 16:14:46 +00:00
jkummerow@chromium.org
8e62a1c72c Remove orphaned file src/shell.h
This has nothing to do with the sample shell.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-08 14:31:47 +00:00
yangguo@chromium.org
b301cab837 Added two whitespaces to match correct indentation.
Review URL: http://codereview.chromium.org/7585033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-08 09:53:28 +00:00
yangguo@chromium.org
76aad1a07b Fixed a known issue in D8 (read file), enabled D8 shared library build on Windows.
Review URL: http://codereview.chromium.org/7586001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-08 09:34:18 +00:00
whesse@chromium.org
528a3301b8 Fix compilation error on X64 and ARM. Error was introduced in r8851.
Clean up TranslationIterator and DeoptimizationInputDataPrint, so they will work with alignment padding in the Translation info.

BUG=
TEST=v8 compiles on X64 and ARM platforms.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8852 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-08 07:34:54 +00:00
whesse@chromium.org
92e7656c4d Clean up TranslationIterator and DeoptimizationInputDataPrint.
Without this refactoring, they break when we add alignment padding in the Translation info.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8851 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-08 07:17:01 +00:00
lrn@chromium.org
e9bc76c499 Avoid infinite recursion for unterminated non-ASCII JSON string literals.
BUG=91787
TEST=mjsunit/regress/regress-91787

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 12:55:29 +00:00
vitalyr@chromium.org
3ae6f64b0d Remove TLS load in regexp code.
Spotted while reviewing Yang's patch.

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 12:31:37 +00:00
keuchel@chromium.org
c14b08658e Fix DebugEvaluate crash within a catch in a function without local context.
BUG=v8:1586
TEST=mjsunit/regress/regress-1586.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 12:00:57 +00:00
vitalyr@chromium.org
5b63bc1fe8 Static state cleanup: add more consts.
R=vegorov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 11:32:46 +00:00
lrn@chromium.org
61ae1be609 Fix bug in scanner.
Checking for end-of-comment truncated to byte before comparing to '*'.

BUG=v8:1546
TEST=mjsunit/regress/regress-1546

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 11:21:04 +00:00
jkummerow@chromium.org
1a849d2754 Make GYP build usable for day-to-day work (second attempt)
- Introduce a global Makefile that triggers GYP-based building
- Some fixes to .gyp[i] files to make everything work
- tools/test-wrapper-gypbuild.py as a temporary solution for easy testing

Original review URL: http://codereview.chromium.org/7383006/

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 09:44:30 +00:00
kmillikin@chromium.org
3e28347d55 Revert "Fix a bug in scope analysis."
This reverts commit revision 8838.

TBR=ricow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8839 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 09:20:08 +00:00
kmillikin@chromium.org
b625ce2b6b Fix a bug in scope analysis.
When recompiling code (e.g., when optimizing) we could incorrectly hoist
some function expressions.  This leads to incorrect results or a crash.  The
root cause was that functions were not correctly categorized as expression
or declaration at parse time.

This requires some extra hoops to prevent the print name "anonymous" for
functions created by 'new Function' from establishing a binding.

R=vegorov@chromium.org,kasperl@chromium.org
BUG=1583
TEST=regress-1583

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 08:28:11 +00:00