Commit Graph

4456 Commits

Author SHA1 Message Date
karlklose@chromium.org
d2d81743c9 Disable DivI and ModI again until the bug with SafepointWithRegistersAndDoubles is solved.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6330 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 15:08:44 +00:00
whesse@chromium.org
2810c2c044 X64 Crankshaft: Add DoParallelMove to x64
Review URL: http://codereview.chromium.org/6290004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6329 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 15:07:44 +00:00
ager@chromium.org
fd3edaf074 Fix name of the toString method on error objects. Bug caught by layout tests.
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/6258004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 14:51:19 +00:00
lrn@chromium.org
2b4767b584 X64: Fix allocated register name table.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 14:03:05 +00:00
lrn@chromium.org
9f5c1bfba1 X64 Crnakshaft: Added GeneratePrologue implementation.
Review URL: http://codereview.chromium.org/6326003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6324 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 13:16:48 +00:00
ager@chromium.org
c1306244a6 Make the 'name' property on error prototypes read-only and dont-delete
to avoid leaking of error objects to accessor methods when formatting
error messages internally.

Also, do not call overwritten toString methods on error objects when
formatting messages internally.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6322 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 12:51:04 +00:00
kmillikin@chromium.org
199846b786 Move class LGapResolver to the platform specific backend implementation files.
This change is in preparation for introducing platform-specific strategies
for resolving parallel moves.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6321 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 12:50:03 +00:00
ricow@chromium.org
8a3bd712ad Fix win64 build by using int instead of size_t for position in StringBuilder
Review URL: http://codereview.chromium.org/6353002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6313 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 11:54:38 +00:00
karlklose@chromium.org
0e26f42bc1 ARM: Implement DoModI stub in the lithium code generator.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6312 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 11:48:43 +00:00
ricow@chromium.org
7954752479 Implement DoStackCheck in x64 crankshaft
Review URL: http://codereview.chromium.org/6257002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 11:35:02 +00:00
whesse@chromium.org
962d7019aa Speed up FastAsciiArrayJoin on ia32 by improving hand-written assembly code.
Review URL: http://codereview.chromium.org/6148007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6310 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 10:57:49 +00:00
lrn@chromium.org
3800b24f69 Don't lazily compile functions that are immediately receded by '('.
We heuristically expect those functions to be called immediately.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6309 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 10:50:13 +00:00
lrn@chromium.org
2cccc4009f Fix bug when the scanner does a pushback at the end of input.
We don't advance the input cursor past the end of input, so we shouldn't
decrease it when we pushback the kEndOfInput marker.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 10:49:18 +00:00
ricow@chromium.org
463d722a8b Fix presubmit
Review URL: http://codereview.chromium.org/6326002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6307 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 10:33:41 +00:00
ricow@chromium.org
5e557d3624 Add implementations of some more x64 lithium methods.
This puts us very close to being able to compile the empty function.

This changes only has a small number of 64 bit specific assembler instructions.

The remaining changes are much more platform specific and will go in another change.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 10:27:25 +00:00
fschneider@chromium.org
9b7525fa3e Fix number of result operands for LThrow.
This instruction does not produce a result. We don't need a result
LOperand for it.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6305 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 09:45:30 +00:00
karlklose@chromium.org
da03f275d2 ARM: Implement DoDivI in the lithium code generator.
This change provides fast code for a few special cases and calls the GenericBinaryOpStub for the rest.

It also changes the register allocation in the generation of lithium instructions to use fixed registers that are compatible with the generic stub. This allocation can be change once we use a more flexible implementation.

Finally, this change provides infrastructure to save double registers at safepoints, which is need to call the stub in deferred code.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6304 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-14 08:49:52 +00:00
podivilov@chromium.org
3a167b1fbe Add function for setting breakpoint by scriptId and position to debugger script
Review URL: http://codereview.chromium.org/6301001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6302 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 17:32:10 +00:00
antonm@chromium.org
8805509f28 Wrap external pointers more carefully.
On 32-bit platforms any pointer with 0 as LSB can be wrapped into Smi.  However, on 64-bit
platforms it's currently not the case as x64 Smis must have 0s in lower 32 bit word.
Even worse, macroassembler Move instruction will try to fetch integer value from Smi
and will shift by 32 bits to the right rendering stored pointer incorrect.

BUG=v8:1037

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 15:56:33 +00:00
vitalyr@chromium.org
ac9b035a45 Expose receiver check type in call type feedback.
This a preparatory step to support fast function calls on primitive
values. Not really used yet in hydrogen.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 14:16:08 +00:00
ricow@chromium.org
4ea3e060bb Fix the xcode build by not including x64 specific code when generating
32 bit code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6299 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 14:10:26 +00:00
ager@chromium.org
0ec74d5829 Landing for Rodolph Perfetta.
Implementing Math.floor and Math.sqrt for crankshaft.

BUG=none
TEST=none

Code review URL: http://codereview.chromium.org/6250002/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 12:21:47 +00:00
lrn@chromium.org
ba023c5405 X64 Crankshaft: Ported lots of boilerplate code.
Small tweaks to make X64 compliant.
A few UNIMPLEMENTED left, but most empty functions call Abort to bail out.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6297 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 10:04:02 +00:00
ager@chromium.org
0b047d7981 Landing for cira@chromium.org
Adding gyp file for all of the experimental extensions (currently i18n-extension only).
Embedder should define icu_src_path to point to their copy of ICU library.

Code review URL: http://codereview.chromium.org/6246003/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6296 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 09:44:23 +00:00
sgjesse@chromium.org
33006e3d70 Revert r6284 and r6283 as they caused the fuzzer tests to fail.
Review URL: http://codereview.chromium.org/6295002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 08:24:19 +00:00
ager@chromium.org
48acf77389 Do not allow accessors to intercept getting/setting properties on
error objects under construction and string conversions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6291 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 06:56:54 +00:00
vitalyr@chromium.org
9e204dd5df Simplify CheckPrototypeMaps.
This instruction only depends on the prototype and the holder and can
completely ignore the receiver and its map.

This change also fixes a small bug on arm where a cell was loaded
instead of the prototype from new space.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6290 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-13 00:34:08 +00:00
fschneider@chromium.org
ad58227fcf Use hydrogen accessor in a few more places to save space in the lithium IR.
Review URL: http://codereview.chromium.org/6207007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6288 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-12 15:46:39 +00:00
sandholm@chromium.org
5be396cb30 Optimize JSON stringify for arrays.
Review URL: http://codereview.chromium.org/6164004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6286 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-12 14:16:19 +00:00
vitalyr@chromium.org
e2f8c938c3 Allow arguments in safepoints with registers.
This should enable calling runtime functions with arguments from
deferred lithium code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-12 14:14:14 +00:00
sgjesse@chromium.org
855ffcd15b Fix bug in r6283
Make sure that arguments are pushed only once before calling runtime

TEST=11 sputnik tests
Review URL: http://codereview.chromium.org/6151009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6284 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-12 14:00:19 +00:00
sgjesse@chromium.org
1db3db1784 IA32: Refactor to avoid duplicate code.
Review URL: http://codereview.chromium.org/6226006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6283 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-12 12:52:15 +00:00
erik.corry@gmail.com
7846721d96 Fixes needed to compile on gcc-4.4.1 on ARM. It is still necessary
to add -fno-strict-aliasing.
Review URL: http://codereview.chromium.org/6123007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6281 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-12 11:56:41 +00:00
sgjesse@chromium.org
6a4df3791e IA32: Remove an invalid assert
Review URL: http://codereview.chromium.org/6129005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6280 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-12 11:53:30 +00:00
ager@chromium.org
0b9336ac8b Landing for Martin Maly.
Fix CalculateEmitStore HashMap use. 

The hash maps are setup to store strings or smis but instead Literal is being in them. It seems to only work by accident. 


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-12 09:29:20 +00:00
sgjesse@chromium.org
8f54606109 ARM: Always use the overflow flag to check for NaNs participating in a floating point compare.
Looks as if we don't need to use the vcmpe instruction instead of the vcmp, as the overflow FPSCR bit suits our purpose. If we at some point need vcmpe lte's implement it as a separate instruction.
Review URL: http://codereview.chromium.org/6197003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6277 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-12 07:47:13 +00:00
whesse@chromium.org
b6ebcd58c6 Crankshaft: Move LEnvironment and LPointerMap classes to platform-independent lithium.h. Move WriteTranslation method from LEnvironment class to LCodeGen class.
Review URL: http://codereview.chromium.org/6142011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6276 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 15:51:08 +00:00
fschneider@chromium.org
b85538bc16 Introduce two more template parameter for Lithium instructions for input and temp operands.
Each LInstruction is now a subclass of LTemplateInstruction<R, I, T>

where R is number of outputs, I number of inputs and T number of temps.

This change only actually uses the parameter I for input operands. 
Since the parameter T for temps is 0, it incurs no extra cost. 

A separate change will introduce using the temps parameter.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6275 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 15:47:34 +00:00
peter.rybin@gmail.com
7c468e53c4 Add fine-grained diff implementation to LiveEdit engine.
BUG=1013
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6274 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 14:55:47 +00:00
fschneider@chromium.org
c1d4d89a31 Remove unused Temp() function form LChunkBuilder.
Review URL: http://codereview.chromium.org/6217003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 14:38:13 +00:00
karlklose@chromium.org
43b0399505 Implement DoApplyArguments.
ARM: Implement DoApplyArguments in the lithium code generator.

This patch also introduces an optional SafepointGenerator argument to InvokeFunction, InvokeCode and InvokeProloque.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6272 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 14:11:03 +00:00
ager@chromium.org
59c158e43f ARM: Implement ClassOf in the lithium arm backend.
Review URL: http://codereview.chromium.org/6201004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 14:01:53 +00:00
kmillikin@chromium.org
a7c743d3ac Reuse the gap move resolver.
Rather than allocating a fresh gap move resolver for every parallel
move, use a single one per Lithium code generator.  This avoids always
reallocating the temporary zone-allocated lists used by the gap move
resolver.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6270 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 13:50:12 +00:00
vitalyr@chromium.org
404fbb5b0b SSE2 truncating double-to-i.
Review URL: http://codereview.chromium.org/6049008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 13:48:49 +00:00
sgjesse@chromium.org
c4550bc6d5 ARM: Add instructions VFPCompareAndSetFlags and VFPCompareAndLoadFlags to macro assembler
Also removed the SBit from the vcmp instruction as it is not part of the instruction.
Review URL: http://codereview.chromium.org/6117003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 12:45:25 +00:00
mikhail.naganov@gmail.com
ecc00e7800 Visit all roots in the UnreachableObjectsFilter.
If an object is only referenced from DOM wrappers, it can only
be seen if all roots are visited.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6267 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 12:38:19 +00:00
mikhail.naganov@gmail.com
6f72caf92d Add reporting of JS heap size limit to GetHeapStatistics.
I found it useful to know inside the heap profiler to avoid
crashes due to heap overflow.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 12:36:09 +00:00
ager@chromium.org
a314fa4581 ARM: Add deferred stack overflow checks to goto code generation in ARM
lithium when needed.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 12:24:18 +00:00
fschneider@chromium.org
6b00bdf2f2 Fix ARM debug build by moving an assert.
Review URL: http://codereview.chromium.org/6127005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 12:20:22 +00:00
fschneider@chromium.org
9cace6b5f0 Use HIR accessor for CheckPrototypeMaps to remove the duplicate members in lithium.
Review URL: http://codereview.chromium.org/6221003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 12:10:11 +00:00
ager@chromium.org
b3d4ea357c ARM: use existing transcendental cache stub for tagged inputs.
Review URL: http://codereview.chromium.org/6167004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6261 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 11:54:37 +00:00
erik.corry@gmail.com
544d941b09 Fix lint
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 11:47:30 +00:00
erik.corry@gmail.com
ff8ed6b7b6 Fix Solaris build. Patch from Ryan Dahl. See http://codereview.chromium.org/5968004/
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 11:44:16 +00:00
fschneider@chromium.org
b9f5ab9ef1 Remove duplicate members from some LIR instruction by using the HIR accessors.
Remove unused LOperands from keyed-loads. We do not have multiple representations
for load instructions anymore.

Correct number of output operands as for a couple of instructions form 1 to 0
because they do not produce a result (e.g. PushArgument)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6258 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 11:41:01 +00:00
whesse@chromium.org
14cb39e543 X64 Crankshaft: Add LTemplatedInstruction and some derived classes to lithium-x64.cc.
Review URL: http://codereview.chromium.org/6128008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 11:33:52 +00:00
antonm@chromium.org
a0bc9eb040 Add more bailouts for Array.slice over arguments.
Unfortunately, arguments is pretty much the normal JS object.  For now
I am adding more sanity checks (in hope that typically arguments
list is rather short.)  However it probably requires more systematic
treatment, for example, we could optimistically copy elements until
we meet first hole and in this case resort to JS builtin.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6256 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-11 11:23:40 +00:00
sgjesse@chromium.org
bb0e35929f Fix presubmit error - really
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/6205003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6254 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-10 21:10:51 +00:00
sgjesse@chromium.org
d04c75c685 Fix presubmit error
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/6206003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6253 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-10 21:03:48 +00:00
sgjesse@chromium.org
bd208976d7 Update the bits reserved for the gap size in the depotimization table
On ARM the a constant pool can be emitted during the gap code generation which leads to larger gap code size

BUG=v8:1018
Review URL: http://codereview.chromium.org/6125004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-10 19:43:38 +00:00
kmillikin@chromium.org
32254e5324 Change the hydrogen timing data to include zone allocation.
Review URL: http://codereview.chromium.org/6190002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6249 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-10 14:16:47 +00:00
ager@chromium.org
cd4ae721e2 ARM: Implement delete operation in lithium codegen.
I'm using the post call generator for the macro assembler
InvokeBuiltin call to be consistent with the ia32 version. It only
generates one call, but using the post call generator it should be
easier to catch if we change that at some point.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-10 12:24:19 +00:00
fschneider@chromium.org
f89ce8159a Split LInstruction into multiple variant to make our LIR more compact.
This change introduces LTemplateInstruction which is a specialized version
of LInstruction and takes one template parameter to indicate whether the
instruction produces a result operand.

All instruction that do not have a result inherit from LTemplateInstruction<0>.
Instructions that have a result operand from LTemplateInstruction<1>

All the Define* function only operate on instructions with a result.

For this to work I also refactored the places where we do 

  LInstruction* result = new Lxyy

into

  Lxyz* result = new Lxyz 



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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6245 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-10 12:19:15 +00:00
sandholm@chromium.org
c260e4f731 Simplify Join and speedup joining arrays of numbers.
Review URL: http://codereview.chromium.org/6173004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6243 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-10 11:44:54 +00:00
whesse@chromium.org
a139094016 Crankshaft: Move LParallelMove to lithium.h, add LGap to lithium-x64.h.
Review URL: http://codereview.chromium.org/6132002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-10 11:31:21 +00:00
kmillikin@chromium.org
3d4395bab4 Prepare push to trunk. Now working on version 3.0.8.
Review URL: http://codereview.chromium.org/6152002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6237 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-10 08:05:34 +00:00
ager@chromium.org
5e3381c9c7 Landing for Martyn Capewell.
ARM: Fix comparison of NaN values.

Enables the cumulative exception flag when comparing values, and uses it to
detect NaN results.

BUG=1023
TEST=none

Code review URL: http://codereview.chromium.org/6142004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-10 08:04:30 +00:00
sandholm@chromium.org
6dd671d6c2 Make better use of the %_FastAsciiArrayJoin function.
Review URL: http://codereview.chromium.org/6100005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6235 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-10 08:00:48 +00:00
ager@chromium.org
d9e5078bbc Landing for Martin Maly.
Implement DoCallKeyed for arm lithium compiler.

Code review URL: http://codereview.chromium.org/6139002


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6234 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-10 07:59:13 +00:00
ricow@chromium.org
cd6bd8c4fa Revert 6220 (generic descriptor support in Object.defineOwnProperty)
This change caused a webkit failure in http/tests/security/xss-DENIED-defineProperty.html.

 I will look into this and reapply when I find a solution.




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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-10 07:20:54 +00:00
sgjesse@chromium.org
dae44fd3ee ARM: Fix lithium codegeneration of TypeofIs
The previous implementation was incomplete and wrong.

TBR=karlklose@chromium.org
Review URL: http://codereview.chromium.org/6113003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 14:27:32 +00:00
sgjesse@chromium.org
97621e7e32 ARM: Implement lithium codegen for DoTypeof, DoTypeofIs and DoSmiUntag
Review URL: http://codereview.chromium.org/6174001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6227 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 13:44:05 +00:00
sandholm@chromium.org
ba4f9faec5 Aviod double checking IS_STRING when joining arrays.
Review URL: http://codereview.chromium.org/5977013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6226 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 13:21:34 +00:00
lrn@chromium.org
90fd0ee897 Change interpretation of malformed \c? escapes in RegExp to match JSC.
Review URL: http://codereview.chromium.org/6171001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6225 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 12:35:42 +00:00
karlklose@chromium.org
e74b0ae7db ARM: Support DoCallGlobal in lithium code generator.
BUG=
TEST=

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6221 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 11:49:22 +00:00
ricow@chromium.org
08cd803827 Landing for Peter Hallam
First cut at bug 992 

Fixes JS portion of DefineOwnProperty when there is 
an existing property and the new descriptor is generic. 

Makes code follow spec steps more closely. 

Fixes typo for check for unchanged enumerable in step 6. 

Adds regression test. 

Codereview url: http://codereview.chromium.org/6035014/




git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 11:49:09 +00:00
ricow@chromium.org
b02ff71824 Fix win64 build (int conversion)
Review URL: http://codereview.chromium.org/6083014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6219 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 10:51:44 +00:00
sgjesse@chromium.org
426f13e084 Fix GC issue in instanceof stub
The the call of the builtin in InstanceofStub was not correctly protected with an internal frame leading to the return address being handled as a pointer during GC.

Marked the Instanceof stub as allowing stub calls (the RecordWriteStub was removed some days ago).

This issue was not caught by the assertion designed for this when debug mode is run with --debug-code (which out tests always does) as generating code for Abort set the allow stub calls flag to true. This has been fixed by restoring the allow stub calls flag correctly.
Review URL: http://codereview.chromium.org/6097010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 10:37:26 +00:00
fschneider@chromium.org
bfecc95694 Revert r6194: Clean up code for type feedback a bit.
This causes a big performance regression. I'll investigate.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 10:36:27 +00:00
kmillikin@chromium.org
12b34fa927 Move IsArgumentsMarker from class MaybeObject to Object.
Since we never need to ask it of a MaybeObject, put it with the other
oddball testers in class Object for consistency.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6216 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 10:06:28 +00:00
whesse@chromium.org
f39ff5c679 X64 Crankshaft: Implement some methods in LInstruction, update mjsunit test expectations.
Review URL: http://codereview.chromium.org/6118002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 09:47:16 +00:00
sgjesse@chromium.org
a6c5fa6993 ARM implementations of LoadElements, LoadKeyedFastElement, StoreNamedField, StoreKeyedFastElement.
BUG=none
TEST=none

Patch by Martyn Capewell from ARM Ltd.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6214 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-07 07:33:46 +00:00
karlklose@chromium.org
1eb68a859f Fix presubmit (r6209).
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6213 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 16:20:45 +00:00
fschneider@chromium.org
5fbaece14c Use a separate marker value to allocate the arguments object on deoptimzation.
Before we used the hole value for this purpose, but this does not work once we
start using the hole value for other purposes in the optimizing compiler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6210 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 15:53:56 +00:00
karlklose@chromium.org
d4bbad8e4e ARM: Support DoCheckInstanceType in lithium codegenerator.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6209 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 15:25:03 +00:00
kmillikin@chromium.org
8945e02d86 Fix disassembly comment for CallFunctionStub.
The comment was printing the entire minor key but labeling it with 'argc'.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6208 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 14:13:40 +00:00
karlklose@chromium.org
1152cab095 Use hydrogen accessor instead of copying members.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6206 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 14:02:46 +00:00
lrn@chromium.org
a50e69bda5 Avoid calling inherited setters when creating object literals and their boilerplates.
Fix issue 1015.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6205 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 14:00:50 +00:00
kmillikin@chromium.org
dde853a4ad Small change to stack checks in unoptimized code.
The stack checks include a loop nesting depth encoded in the code stream
after the call to the stack check stub.  Change the code to jump around this
instruction as well as the call when the stack check is OK.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 13:48:12 +00:00
whesse@chromium.org
2655060546 Fix errors in x64 crankshaft port, add failing tests to test expectations.
Review URL: http://codereview.chromium.org/6104004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6203 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 13:29:22 +00:00
sgjesse@chromium.org
7cc0667457 Fixed some tabs left in d8.js
TBR=mark.lam@palm.com
Review URL: http://codereview.chromium.org/6029011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6202 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 13:27:10 +00:00
sgjesse@chromium.org
2957881a26 Misc debugger enhancements and bug fixes.
1. Added gdb style debugger commands (and their shortcuts) for d8.
These include:
- s[tep] : step into the current statement.
- s[tep]i[n]: step into the current statement with the minimum step.
- n[ext] : step to the next statement.
- fin[ish] : step out of the current function.
- cond : setting conditions on breakpoints.
- d[elete] : deletes breakpoints.
- en[able]|dis[able]: enables/disables breakpoints including
exception breakpoints.
- ignore : ignores a breakpoint for a specified period.
- inf[o] ar[gs] : info on arguments of the current function.
- inf[o] lo[cals] : info on local vars of the current function.
- inf[o] br[eakpoints] : info on breakpoints.
- l[ist] : similar to source, but allows the user to continually
dump subsequent lines of source code either in the
forward or backward direction.
- quit / exit / disconnect : terminates the remote debugger
session.

NOTE: Active breakpoints will automatically be disabled when
the remote debugger detaches. This allows v8 to continue to
run without worrying about a loss of a debugger session.

2. Added support for breaking the debugger by simply typing ENTER.
The break command is now optional.

3. Once the debugger is broken, the user can now just type ENTER
to repeat the last command. This is useful to functionality that
needs to be invoked repeatedly e.g. step, list.

4. Added more verbose descriptions in d8's help.

5. Fixed a line and column number offset bug in the listing of breakpoint
line and column numbers.

6. Added a gc command to allow GCs to be requested from the debugger
interface. The plumbing for requesting different types of GCs is
there, but the underlying implementation currently only triggers a
full mark-compact GC. The command also returns the before and after
sizes of the heap.

7. Added trace json, and flags commands that are not published in help.
trace json is used for tracing the debugger packets send from and
received by d8. flags is for setting v8 flags. These are useful for
people debugging v8 itself, but not necessarily users of v8.

8. Added the ability to enable and disable break on all / uncaught
exceptions in to d8.

9. Added a fix to prevent the Debugger Agent from being re-instantiated
if one already exists.

10. Added the ability to filter results of the script command by matching
text or numbers on the results.

11. Added v8 flags to enable/disable the sending of debugger BeforeCompile,
AfterCompile, and ScriptCollected events.

12. Fixed some undefined value bugs that resulted in v8 or the debugger
failing.

13. Added a few minor WEBOS__ customizations (analogous to ANDROID
customizations).

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

Review URL: http://codereview.chromium.org/5980006
Review URL: http://codereview.chromium.org/6086010


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6200 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 13:14:32 +00:00
danno@chromium.org
90445b33a4 Implement DoFunctionLiteral on ARM.
Review URL: http://codereview.chromium.org/6112001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6199 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 12:53:59 +00:00
sgjesse@chromium.org
2b7596a516 Instanceof slow case bind is incorrect.
Currently, the bind for the slow label is after the pushing of the
args registers which renders the args pushing dead code because there
is a Ret preceeding it. The comments also imply that the arg pushing
should be part of the InvokeBuiltins tail call.

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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 12:41:41 +00:00
sgjesse@chromium.org
68ddff5f90 ARM: Change a number of lithium instruction operands to be in registers
Using operands which could possible be in stack slots would require a load instruction anyway, so having the register allocator putting them into registers seems most logical.
Review URL: http://codereview.chromium.org/6046014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6196 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 12:21:06 +00:00
sgjesse@chromium.org
7c0c72eb2c ARM: Fix a bug in the lithium arguments support
Got the comparison wrong and fortot to actually set the flags.
Review URL: http://codereview.chromium.org/6085010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6195 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 10:56:23 +00:00
fschneider@chromium.org
35533bee36 Clean up code for type feedback a bit.
Remove unused functions and parameters and remove the parts of the
code that mention the old GenericBinaryOpStub. It is not used together
with Crankshaft and replaced with TypeRecordingBinaryOpStub.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 10:10:26 +00:00
ager@chromium.org
af09d94ecd ARM: support regexp literals in lithium-codegen-arm. Also, update
comment on the AllocateInNewSpace macroassembler method.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6192 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 08:56:29 +00:00
kmillikin@chromium.org
9a096e643a Fix an bug in deoptimization after polymorphic calls in effect contexts.
For polymorphic calls (also loads and stores) we construct a type switch
graph that has a basic block merging all the variants.  There is an
environment simulation before the goto at the end of all the predecessor
blocks.  This simulation is used to define the environment on entry to the
successor block, and captures the return value of the call.  In effect
contexts, this value should not be present in the environment.

The fix is to use the AST context to decide whether to have this value in
the join node's environment at all.

BUG=1014

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 07:38:19 +00:00
sgjesse@chromium.org
c26bd162f8 ARM: support arguments access in lithium-codegen-arm.
Review URL: http://codereview.chromium.org/5989013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-06 07:28:51 +00:00
whesse@chromium.org
0ba1623995 Add deoptimization support to full-codegen-x64.cc (insert PrepareForBailout in many places.)
Review URL: http://codereview.chromium.org/6031014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 17:09:24 +00:00
sgjesse@chromium.org
9bc3a16af0 Fix bug in instanceof stub
If the instanceof stub was requested to deliver true/false objects as the result instead of 0/1 then 0/1 was actually returned if the builtin INSTANCE_OF ended up being called. This is now fixed.

BUG=v8:1020
TEST=test/mjsunit/regress/regress-1020.js
Review URL: http://codereview.chromium.org/6014013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 14:19:12 +00:00
sgjesse@chromium.org
3c2c1d2113 Revert r6180 as it caused test failures
TBR=ricow@chromium.org
Review URL: http://codereview.chromium.org/6080009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6183 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 14:03:38 +00:00
sandholm@chromium.org
e90249bde1 Avoid double checking for IS_NUMBER by calling NonNumToNum instead of ToNumber
when the argument is known not to be a number.  
Review URL: http://codereview.chromium.org/6061008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6181 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 13:52:00 +00:00
sgjesse@chromium.org
8669f630c0 Misc debugger enhancements and bug fixes.
1. Added gdb style debugger commands (and their shortcuts) for d8.
These include:
- s[tep] : step into the current statement.
- s[tep]i[n]: step into the current statement with the minimum step.
- n[ext] : step to the next statement.
- fin[ish] : step out of the current function.
- cond : setting conditions on breakpoints.
- d[elete] : deletes breakpoints.
- en[able]|dis[able]: enables/disables breakpoints including
exception breakpoints.
- ignore : ignores a breakpoint for a specified period.
- inf[o] ar[gs] : info on arguments of the current function.
- inf[o] lo[cals] : info on local vars of the current function.
- inf[o] br[eakpoints] : info on breakpoints.
- l[ist] : similar to source, but allows the user to continually
dump subsequent lines of source code either in the
forward or backward direction.
- quit / exit / disconnect : terminates the remote debugger
session.

NOTE: Active breakpoints will automatically be disabled when
the remote debugger detaches. This allows v8 to continue to
run without worrying about a loss of a debugger session.

2. Added support for breaking the debugger by simply typing ENTER.
The break command is now optional.

3. Once the debugger is broken, the user can now just type ENTER
to repeat the last command. This is useful to functionality that
needs to be invoked repeatedly e.g. step, list.

4. Added more verbose descriptions in d8's help.

5. Fixed a line and column number offset bug in the listing of breakpoint
line and column numbers.

6. Added a gc command to allow GCs to be requested from the debugger
interface. The plumbing for requesting different types of GCs is
there, but the underlying implementation currently only triggers a
full mark-compact GC. The command also returns the before and after
sizes of the heap.

7. Added trace json, and flags commands that are not published in help.
trace json is used for tracing the debugger packets send from and
received by d8. flags is for setting v8 flags. These are useful for
people debugging v8 itself, but not necessarily users of v8.

8. Added the ability to enable and disable break on all / uncaught
exceptions in to d8.

9. Added a fix to prevent the Debugger Agent from being re-instantiated
if one already exists.

10. Added the ability to filter results of the script command by matching
text or numbers on the results.

11. Added v8 flags to enable/disable the sending of debugger BeforeCompile,
AfterCompile, and ScriptCollected events.

12. Fixed some undefined value bugs that resulted in v8 or the debugger
failing.

13. Added a few minor WEBOS__ customizations (analogous to ANDROID
customizations).

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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 13:47:53 +00:00
sgjesse@chromium.org
344e534bde Change a static_cast to BitCast
Hopefuly this will make the Win32 builder happy

TBR=ricow@chromium.org
Review URL: http://codereview.chromium.org/6038007

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6178 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 12:31:31 +00:00
whesse@chromium.org
7cdd2f6494 Add partially-implemented TypeRecordingBinaryOpStub to x64 platform.
Review URL: http://codereview.chromium.org/6084010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6177 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 12:28:47 +00:00
sgjesse@chromium.org
f5fb75ce09 Fix comparison bug on ARM.
Retrieves the result of VFP comparison from the VFP status register.

BUG=none
TEST=none

Patch by Martyn Capewell from ARM Ltd.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 12:06:32 +00:00
sgjesse@chromium.org
0cd558a355 Fix the build breakge on x64 and ARM after r6173
The instanceof changes was not fully ported to x64 and ARM.
Review URL: http://codereview.chromium.org/6031013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6175 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 12:01:53 +00:00
fschneider@chromium.org
83c7c699eb Do not transform a/b into a * (1/b) in the parser for integer constants.
Strength reduction should be performed at a later stage. This
change avoid going to a double representation the case of
integer division.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 11:25:42 +00:00
sgjesse@chromium.org
7311e10fdb Optimize instanceof further
If the instance of is performed against what is beliwed to be a constant global function inline the instance of check and have the call to the instanceof stub in deferred code. The inlined check will be patched by the instanceof stub when called from deferred code. This is indicated by the lithium instruction LInstanceOfKnownGlobal.

To help the patching the delta from the return address to the patch site is placed just below the return address in the edi slot of the pushad/popad ares. This is safe because the edi register (which is pushed last) is a temporary for the lithium instruction.

As the instanceof stub can call other JavaScript an additional marking for saving all double registers have been added.

Also tweaked the instanceof stub to produce true/false objects instead of 0/1 for the case with deferred code.
Review URL: http://codereview.chromium.org/5990005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 11:17:37 +00:00
lrn@chromium.org
034f37efb5 Prepare push to trunk. Now working on version 3.0.7.
Review URL: http://codereview.chromium.org/6006011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6167 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 09:11:20 +00:00
danno@chromium.org
498841c743 Implement ARM lithium support for ObjectLiteral.
Review URL: http://codereview.chromium.org/6099006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6166 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 09:04:06 +00:00
danno@chromium.org
d44f3a0223 Implement Lithium ARM support for ArrayLiteral.
TBR=kasperl@chromium.org
Review URL: http://codereview.chromium.org/5988008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 14:48:25 +00:00
sgjesse@chromium.org
806368bc92 Fix presumbit error
TBR=karlklose@chromium.org
Review URL: http://codereview.chromium.org/6046012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6164 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 14:35:34 +00:00
fschneider@chromium.org
5bd44d212a Remove unused policy from register allocator.
DefineSameAsAny is never used and currently does exactly the 
same as DefineSameAsFirst.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6163 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 14:35:01 +00:00
sgjesse@chromium.org
71d863e5de Set a fixed scratch register for ARM code generation
r9 is now set as a fixed scratch register for ARM code generation. removed some unneeded allocation of temporary registers and use the scratch register instead.
Review URL: http://codereview.chromium.org/5976014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 14:32:54 +00:00
ricow@chromium.org
aa396c5779 Allow getters and setters on JSArray elements.
This fixes bug 900 

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6158 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 13:59:34 +00:00
sgjesse@chromium.org
394f240e99 Fix the Mac OS debug build
Review URL: http://codereview.chromium.org/6046010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6157 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 13:23:33 +00:00
karlklose@chromium.org
20c858d514 First part of lithium ARM port.
Implement LoadNamedField, CallConstantFunction, CmpMapAndBranch, JSArrayLength, BoundsCheck, IsNull, CallFunction, and CallStub in the ARM lithium codegenerator.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6155 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 13:02:51 +00:00
lrn@chromium.org
e7ecb74b8a Don't let JSON parsed objects hit inherited setters.
Review URL: http://codereview.chromium.org/6101001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6154 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 12:19:55 +00:00
sgjesse@chromium.org
9af48317d5 Fix Windows compilation
Use strncpy_s instaad of strncpy to avoid warning.
Review URL: http://codereview.chromium.org/6056006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6151 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 12:11:01 +00:00
lrn@chromium.org
351f80adee Fix compile-problem in (currently) unused stand-alone preparser function.
Allow object initializers to define getters using string and number literals.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 12:07:16 +00:00
vegorov@chromium.org
4dc3282556 Add constraints verification to LAllocator::MarkAsCall().
Review URL: http://codereview.chromium.org/6069012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 11:36:20 +00:00
sgjesse@chromium.org
4c258dc0dd Fix presubmit error
TBR=ricow@chromium.org
Review URL: http://codereview.chromium.org/6093006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 11:28:17 +00:00
lrn@chromium.org
59aea66dfa Fix bug that happens when the first non-ASCII character of a literal is at a power-of-two position.
Review URL: http://codereview.chromium.org/6044009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 11:25:59 +00:00
sgjesse@chromium.org
d5b94e9704 Addresses some performance regression in the GenericBinaryOpStub on ARM following Crankshaft introduction.
BUG=none
TEST=none

Patch by Rodolph Perfetta from ARM Ltd.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 11:02:58 +00:00
sgjesse@chromium.org
1dc835a53a Avoid using std::string in Max OS platform file.
Review URL: http://codereview.chromium.org/6001012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 11:02:39 +00:00
sgjesse@chromium.org
b85ac2465f Fix presubmit error
TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/6008010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 10:25:06 +00:00
whesse@chromium.org
7fa57552fa Cleanup of x64 code. Rearrange functions in ic-x64.cc to match order in ic-ia32.cc. Remove unused declarations, and move a constant to assembler-x64.h.
Review URL: http://codereview.chromium.org/6020012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 09:50:35 +00:00
sgjesse@chromium.org
c89021d162 Added labelled thread names to help with some debugging activity. Right now,
the only platform that it works on is linux (using the prctl API to set the
names of the threads). Other platforms are setup to build properly if the
flag is set, but their thread names are not currently set.

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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 09:09:50 +00:00
whesse@chromium.org
c28bde775c Reorder the functions in stub-cache-x64.cc, so they are in the same order as in stub-cache-ia32.cc.
Review URL: http://codereview.chromium.org/6085006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 09:02:53 +00:00
vegorov@chromium.org
1cf6f3a26c Move first_artificial_register_ initialization to the right place.
Review URL: http://codereview.chromium.org/6009010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6139 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-03 19:16:29 +00:00
vegorov@chromium.org
11d1188e83 Remember required register kind when creating artificial virtual register.
Review URL: http://codereview.chromium.org/6065010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-03 17:02:15 +00:00
kmillikin@chromium.org
c1fd8bcf60 Fix a bug in deoptimization environments.
The function HEnvironment::SetExpressionStackAt did not update the
environment's history.  This function is used to patch the bailout
environment for count operations and global function calls.

Reorganize class HEnvironment to make it fit V8's style a bit better
and to try to add some sanity to which C++ functions are intended to
be inlined.

Remove the flag --trace-environment which merely duplicated data in
the hydrogen.cfg file except without enough context to be useful.

BUG=1004

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-03 16:57:46 +00:00
whesse@chromium.org
3d7d258339 Remove RecordWriteStub from X64 and ARM platforms.
Review URL: http://codereview.chromium.org/5986014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-03 14:59:12 +00:00
sgjesse@chromium.org
04bf6c5c61 Use the macro assembler Set instead of explicit xor for clearing registers.
Review URL: http://codereview.chromium.org/6015011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-03 11:39:22 +00:00
sandholm@chromium.org
cdf948c33d Simplify ScanJsonString.
Review URL: http://codereview.chromium.org/6009009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6134 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-03 10:51:34 +00:00
lrn@chromium.org
b9bd4952a7 Changed uncast -1 in unsigned context to use constant kSentinel.
Review URL: http://codereview.chromium.org/5993006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6133 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-03 10:28:39 +00:00
fschneider@chromium.org
c8c04008df Prepare push to trunk. Now working on 3.0.6.
Review URL: http://codereview.chromium.org/6005011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6129 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-03 10:02:17 +00:00
sgjesse@chromium.org
cbfcef150a Added context sensitive prompt for remote debugger. It now shows "> "
when the debuggee is running, and "dbg> " when the debuggee is stopped.

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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6126 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-03 07:56:30 +00:00
fschneider@chromium.org
0a128e5ae7 Optimize array-length and fast element loads.
1. Separating out the instance-type check from the array-length operation.

2. I also changed the bounds-check on keyed loads to use the length property
for JS arrays (like we do for array stores).

The new pattern should use less registers and allow more checks to be eliminated.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6125 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-30 19:30:42 +00:00
vitalyr@chromium.org
24e560fe11 Don't emit a write barrier when storing a known old space value.
Review URL: http://codereview.chromium.org/6072009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-25 14:14:16 +00:00
vitalyr@chromium.org
da8c3550bf Force inlining of BodyVisitorBase::IteratePointers.
Review URL: http://codereview.chromium.org/6042007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-24 14:44:15 +00:00
peter.rybin@gmail.com
fba2ef6c0f Fix variable conflict in nested for statement
Review URL: http://codereview.chromium.org/5961011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-24 02:44:35 +00:00
karlklose@chromium.org
16800adf57 Fix inlining of instanceof stub for ARM (r6093).
Review URL: http://codereview.chromium.org/6055006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-23 16:33:30 +00:00
lrn@chromium.org
c9928c0595 Change scanner buffers to not use utf-8.
Make preparser keep its symbol text itself instead of relying on the scanner.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6115 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-22 20:14:19 +00:00
vitalyr@chromium.org
4e32d5ad1a Fix win64 build.
Review URL: http://codereview.chromium.org/6050005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6114 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-22 16:07:59 +00:00
antonm@chromium.org
0071bf92f6 Do not turn source array elements into writable if doing Array.slice.
Array.slice doesn't mutate original array, so it's fine with read only data.
Plus nuke unnecessary cast.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-22 15:45:48 +00:00
vitalyr@chromium.org
c5916f552f Support load function prototype in hydrogen/lithium.
Review URL: http://codereview.chromium.org/6009005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-22 15:43:32 +00:00
sandholm@chromium.org
37567c42da Introduce NUMBER_IS_FINITE macro to avoid ToNumber() conversion.
Review URL: http://codereview.chromium.org/5977006

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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-22 13:04:47 +00:00
vitalyr@chromium.org
52d2ce3b5a Clean up is-ASCII checks.
Review URL: http://codereview.chromium.org/5963003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-22 11:31:18 +00:00
whesse@chromium.org
4330070e32 Use Assembler::Set() to assign constants to registers in more places. Commit of http://codereview.chromium.org/6016007/ .
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-22 09:55:19 +00:00
erik.corry@gmail.com
92d163e156 Fix a couple of cast errors for gcc-3.4.3. Patch by Ryan Dahl. http://codereview.chromium.org/5976006/
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6103 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-22 09:49:26 +00:00
whesse@chromium.org
1c63e53675 Fix assert error in r6083 by allowing stub calls from TranscendentalCacheStub.
Review URL: http://codereview.chromium.org/6021004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-21 15:10:45 +00:00
ager@chromium.org
a609cf61c5 Avoid decoding overhead when allocating ascii strings.
The assumption is that most utf8 strings allocated are actually ascii
and that if they are not we will encounter a non-ascii char pretty
quickly.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-21 13:24:23 +00:00
whesse@chromium.org
bc5fb1a148 Prepare push to trunk. Now working on version 3.0.5.
Review URL: http://codereview.chromium.org/6056003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6095 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-21 12:05:32 +00:00
kmillikin@chromium.org
7171df741a Fix for issue 1007.
The Hydrogen environment only tracks values for stack-allocated variables.
It is a precondition of HEnvironment::Lookup(variable) that variable is
stack-allocated.  The check was missing at one call site.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-21 11:21:04 +00:00
karlklose@chromium.org
16837c1f33 Implement inlining of instanceof tests on ARM.
TBR=sgjesse

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-21 10:52:50 +00:00
vegorov@chromium.org
640243a975 Fix leak of a global handle in Debug::Load().
Bootstrapper::CreateEnvironment() returns a global handle to the created context so there is no need to create another one explicitly.

BUG=v8:1006

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-21 10:51:50 +00:00
mikhail.naganov@gmail.com
a968ed0470 Implement HeapIterator that skips over unreachable objects.
I'm using it when creating heap snapshots. I decided that it will
be more convenient to have it as a separate piece of code, instead
of embedding into the snapshot generator.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6091 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-21 10:49:40 +00:00
whesse@chromium.org
8df57d740d Ensure that the SSE2 TranscendentalCache stub calls GC if it runs out of memory in new space. Previously, it would just use an alternate algorithm, that did not cache the result.
Review URL: http://codereview.chromium.org/5996001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6090 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-21 10:25:51 +00:00
lrn@chromium.org
5741575327 Tweak quicksort loop to reduce number of compares slightly.
Review URL: http://codereview.chromium.org/6039002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 14:57:51 +00:00
whesse@chromium.org
da934d1f26 Fix error in r6083
Review URL: http://codereview.chromium.org/6026004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 14:42:05 +00:00
antonm@chromium.org
ae476ecd6c Teach C++ ArraySlice builtin to deal with arguments object.
Array.prototype.slice.call(arguments, ...) idiom is pretty common (up to 97% of invocations
in GMail), so we'd better handle it efficiently too.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6085 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 14:41:41 +00:00
vitalyr@chromium.org
c35cd839ae Allow 4 more fast properties for objects.
Review URL: http://codereview.chromium.org/6016003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 14:20:43 +00:00
whesse@chromium.org
5656d64ece Add untagged double versions of Math.sin and Math.cos. Merge classes TranscendentalCacheStub and TranscendentalCacheSSE2Stub.
Review URL: http://codereview.chromium.org/5996002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 13:52:14 +00:00
fschneider@chromium.org
7cc61e6973 Fix GVN for polymorphic loads.
They must not be hoisted above the compare-map-and-branch.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 13:18:47 +00:00
sandholm@chromium.org
a496150a9e Minor optimization in regexp parse.
Review URL: http://codereview.chromium.org/6014002

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

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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6080 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 10:38:19 +00:00
lrn@chromium.org
c91f5606d0 Fix smi-comparison to use correct macros in X64-SwapElements.
Review URL: http://codereview.chromium.org/5967002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 09:38:56 +00:00
erik.corry@gmail.com
e24362b50f Remove the atomic/thread safe stuff from the chunk table, since we don't
use cross thread synchronization in Crankshaft.
Review URL: http://codereview.chromium.org/5979001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 14:50:24 +00:00
vitalyr@chromium.org
b2dbea6c60 Extend code printing:
o Add --print-unopt-code to print unoptimized code before printing
  optimized code based on it. This is useful to see the states of ICs
  and the effects of code patching.

o Use debug function names in disassembly output.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 14:16:00 +00:00
fschneider@chromium.org
6cc0310a72 Mark map-transition stores as map-changing instructions.
This prevents code motion from hoisting map-checks across such stores
which may result in unnecessary deoptimizations.

In the following example program we would move a map-check from the inner loop out before the outer loop which is not desirable:

function f() {
  var o = {};
  var j = 0;
  o.a = 1;
  do {
    o.b = 6;  // Map transition
    for (var i=0; i<10; i++) {
       o.a = o.b + i;
    }
  } while(++j < 1) {}
}

for (var i = 0; i < 1000000; i++) f();


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 13:44:19 +00:00
ager@chromium.org
06ac3b18a0 When setting property on a context extension object do not inherit the
attributes from an existing property on a prototype object.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 13:04:53 +00:00
sgjesse@chromium.org
648fcd906e Adding Date::ResetCache() API so that the cache values in the Date object
can be reset to allow DST / timezone changes to be re-cached and reflected
in the Date object.

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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 12:45:27 +00:00
vitalyr@chromium.org
8ff6c23c84 Allow rapid socket reuse on POSIX platforms.
Review URL: http://codereview.chromium.org/5990001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 12:31:42 +00:00
sandholm@chromium.org
578e70a552 Improve regexp split, replace and test.
Review URL: http://codereview.chromium.org/5959002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6065 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 11:57:10 +00:00
whesse@chromium.org
83b28cd1fc Avoid comparing a pointer-to-member to NULL, even though C++ is supposed to support it.
Review URL: http://codereview.chromium.org/5988001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6064 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 11:52:10 +00:00
lrn@chromium.org
9f1bcdf8ac Change quicksort pivot from random to median-of-three.
Tweak quicksort bailout parameter to minimize time.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 10:06:11 +00:00
erik.corry@gmail.com
7b6d7f5ba4 Add a couple of missing includes.
Review URL: http://codereview.chromium.org/5899001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 08:58:04 +00:00
ager@chromium.org
0cb7623801 Prepare push to trunk. Now working on version 3.0.4.
Also fix files because of missing prepare for push of version 3.0.2
which was pushed directly.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 08:24:54 +00:00
vitalyr@chromium.org
2ba48c0a45 Support loading constant functions in hydrogen.
Review URL: http://codereview.chromium.org/5878004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 22:30:53 +00:00
fschneider@chromium.org
73737fcdb6 Fix bugs in the range analysis for integers.
The overflow conditions were not correctly detected for 
certain add, sub and mul instructions.

I replaced the previous code by using 64-bit arithmetic
to correctly identify overflows for *, + and -.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 18:01:36 +00:00
vitalyr@chromium.org
5e86c6c752 Use near labels in write barrier code.
Review URL: http://codereview.chromium.org/5939003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 17:45:26 +00:00
vitalyr@chromium.org
3dd300df48 Emit better code when pushing a constant.
Review URL: http://codereview.chromium.org/5884003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 16:56:45 +00:00
ager@chromium.org
6e30a77ab5 A number of instructions use GVN but do not provide a comparison
function for the data. This leads to wrong results where operations
are wrongly assumed to have the same value as a previous (different)
operation.

Provide the data comparison functions.

BUG=995

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 15:40:02 +00:00
kmillikin@chromium.org
4f231f59b4 Fix an issue discovered in regress-969.
When running with 10 stress runs we get polymorphic stores.  This revealed
an incorrect bailout ID for the state following a polymorphic store.  The ID
should be the internal ID of the assignment side-effect, not the ID of the
end of the expression.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 14:18:41 +00:00
ricow@chromium.org
a362f1d0f7 Add flag for running with a non standard number of stress-runs.
This allows easy testing with more than 5/2 stress runs in
release/debug and will allow us to have a nightly run with e.g., 10
stress runs in debug mode.



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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 13:24:23 +00:00
kmillikin@chromium.org
4a6ef3ee28 Fix issue 977, occasional failure of the DeltaBlue benchmark.
Before, when we deoptimized after a branch we jumped to before the branch
was taken in the unoptimized code with a token value that indicated when
edge to take.  There was a lot of machinery to track this value through the
short-circuit logical operations and logical negation, and to handle it
properly at inline function return sites.  There was also machinery to
prevent incorrectly seeing this environment with the extra value never
actually materialized in the unoptimized code.

Instead, now we deoptimize directly to one of the targets of the branch.
Much but not yet all of the extra machinery has been removed or simplified.
The cost is that branching control structures (the looping statements, if
statements, conditional expressions, and the short-circuit binary logical
operations) need extra AST IDs to identify the branch targets.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 13:13:36 +00:00
ager@chromium.org
1b67320800 Perform more aggressive time to NaN conversions. Our internal date
methods rely on the time values passed in being within a certain range
- not significantly larger than the the ECMA 262 specified time
range. When creating a time, always make it NaN if there is no way
that it can be within range even after UTC conversion.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 13:02:09 +00:00
lrn@chromium.org
b20f0968fa Change DefaultString and DefaultNumber to match the spec required behavior.
Previously it did two reads of the .toString and .valueOf properties where
only one was allowed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 12:49:55 +00:00
mikhail.naganov@gmail.com
75d5ad65c4 Fix presubmit errors
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 12:26:04 +00:00
ricow@chromium.org
357afa385b Change Object.defineProperty to accept undefined as getters and setters and to correctly accept overriding an accessor with a data property.
In the past we only accepted functions as argument for setting an
accessor. Since one should be able to set an accessor to undefined
this had to be changed to take either.

In addition, we did not lookup properties in the prototype chain,
causing us to call the setter of an existing accessor up the prototype
chain when trying to replace an existing accessor (that was not local)
with a data property.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 12:21:08 +00:00
mikhail.naganov@gmail.com
e521db4afa Make V8 compilable with profiling support turned off.
BUG=990

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 12:14:56 +00:00
fschneider@chromium.org
cdc7d3908e Fix a SEGV in the register allocator.
This occasionally caused the regress-806 unit test to crash.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 12:01:22 +00:00
sgjesse@chromium.org
d559d8c6c0 IA32: Optimize instanceof
The instanceoff stub now supports arguments in registers and checks for null,
smi and string values without going to runtime.

Needs porting to X64 and ARM.
Review URL: http://codereview.chromium.org/5828004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 08:58:42 +00:00
peter.rybin@gmail.com
e9c989b8fa Fix evaluate with context debug protocol
Review URL: http://codereview.chromium.org/5866002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 19:55:51 +00:00
vegorov@chromium.org
ed59e77256 Fix several register allocation issues revealed by fuzzer:
- LIsObject had incorrect contraint for value input;
- Temporaries had incorrect lifetime intervals;
- Live ranges for live_out values was not covering the whole block.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 18:13:02 +00:00
vitalyr@chromium.org
7a3fd2aa52 Deoptimize non-smi switch cases if they are reached.
This way if the type oracle says an unreachable clause has a non-smi
type, we can still emit optimized code instead of doing an early
bailout.

This change depends of Florian's r5970.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 17:11:11 +00:00
kmillikin@chromium.org
bccab25564 Fix compilation on x64.
TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 16:37:17 +00:00
kmillikin@chromium.org
ace6290452 Fix issue 974.
When entering a finally block in unoptimized code, we unconditionally
save the accumulator register in the stack in case it holds a return
value or an exception.  In the case of a break, continue, or falling
off the end of the try or catch block, this value is unpredictable and
not necessarily safe for GC.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 16:14:29 +00:00
fschneider@chromium.org
c03c71a937 Emit a load of the elements array only before the first store.
This avoid emitting the load for empty and constant array literals.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 16:12:55 +00:00
whesse@chromium.org
564d65958f Mark TranscendentalCacheSSE2Stub as allowing internal stub calls. Mark pextrd instruction as requiring SSE 4.1.
Review URL: http://codereview.chromium.org/5901001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6033 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 16:10:13 +00:00
ager@chromium.org
06a684d353 Fix deoptimization from %_MathPow. Do not prepare the stack for a C
call and then bailout without performing the call.

In order to not duplicate code, convert both heap number and smi to a
double in an xmm register if possible. Then setup the stack and call
the C function.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6032 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 15:25:53 +00:00
vegorov@chromium.org
655b30858d Fix issue 982.
When splitting at the beginning of a use interval assign coinciding position to the split child instead of leaving it to parent.

BUG=v8:982

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 14:35:46 +00:00
fschneider@chromium.org
b93a0f5d9a Second attempt: Improve our type feedback by recogizining never-executed IC calls for binary operations.
This is an improved version of my earlier change r5970. It avoids degrading the
non-optimized code.

Initially we emit a conditional branch that is either always- or never-taken
after a smi-check (depending on whether we test for smi for for non-smi)
Since test-eax always sets the carry-flag to 0 we use jump-if-carry and
jump-if-not-carry.

The first invocation of the stub patches a jc with a jz and
jnc with a jnz-instruction so that the code looks exactly as it was
without patching. The only difference is the test- or nop-instruction
after the IC-call.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6030 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 13:56:41 +00:00
erik.corry@gmail.com
2996dca6aa Support %_IsObject in Crankshaft.
Review URL: http://codereview.chromium.org/5806001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 12:32:19 +00:00
kmillikin@chromium.org
eb7b4e347e Fix issue 979.
The issue is caused when deoptimizing to an internal AST ID in a
postfix increment or decrement operation on variable.  This could
happen for a global variable.  In that case, the optimized code was
not properly simulating an extra stack slot in the unoptimized code to
hold the original value.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6025 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 11:47:05 +00:00
karlklose@chromium.org
5f962f2eb2 Add array bound checks to code generated for SwapElements. This fixes a bug that lead to a segfault when an array was modified while it was sorted.
Review URL: http://codereview.chromium.org/5686006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 09:52:58 +00:00
lrn@chromium.org
f118f44130 Fix regression in JSON serialization of RegExps.
Tweaks to the serialization.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 09:31:05 +00:00
erik.corry@gmail.com
d25755eeea Add some missing includes and other minor changes intended to keep
the distance between bleeding edge and the gc branch minimal.
Review URL: http://codereview.chromium.org/5788002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6016 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 08:07:27 +00:00
vitalyr@chromium.org
57e072298f Merge math function ids and custom call generator ids.
Two old id types are replaced by builtin function ids. We can use
these in the code generators to emit custom code for the selected
functions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6013 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-14 18:53:48 +00:00
erik.corry@gmail.com
5b55e1ad9a API: Correct documentation of String::WriteUtf8, String::Write
and String::WriteAscii and add test.  Correct implementation of
String::Write, fixing bug 975 (the patch in that bug was not
used, however).
Review URL: http://codereview.chromium.org/5718005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6011 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-14 13:21:46 +00:00
whesse@chromium.org
c23c244add Reapply change 5989, adding untagged double calls to Math.pow, with problem in generated code for TranscendentalCacheSSE2Stub (unguarded SSE 4.1 code) fixed.
Review URL: http://codereview.chromium.org/5726008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-14 13:21:29 +00:00
whesse@chromium.org
ce1473b257 Postpone interrupts during marking garbage collection. This allows the check for C stack overflow to function correctly.
Review URL: http://codereview.chromium.org/5685010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-14 11:48:42 +00:00
kmillikin@chromium.org
4c02d3cd4c Fix assignment compilation bug on ARM and x64.
SVN revision 5993 ported changes to the unoptimizing compiler from
ia32 to ARM and x64.  A call to AstContext::Plug was moved out of
FullCodeGenerator::EmitVariableAssignment and into the callers.  One
call site was missed in both ports.

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-14 08:16:39 +00:00
peter.rybin@gmail.com
8c3e13cad8 Introduce additional context to evaluate operations
Review URL: http://codereview.chromium.org/5733001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5997 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-14 00:07:44 +00:00
kmillikin@chromium.org
3fe2325d6b Prepare push to trunk. Now working on version 3.0.2.
Review URL: http://codereview.chromium.org/5763002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-13 17:50:29 +00:00
kmillikin@chromium.org
645ba163d3 Fix ARM and x64 compilation.
Fix compilation on ARM and x64 due to a change in the architecture-shared
API of the nonoptimizing code generator.  Also added new PrepareForBailout
to ARM (they are not yet fully implemented on x64).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-13 17:49:55 +00:00
whesse@chromium.org
fdf44a4bc7 Revert change 5989, which causes failures in some benchmarks.
Review URL: http://codereview.chromium.org/5804003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5991 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-13 16:34:59 +00:00
kmillikin@chromium.org
49f4c39d6d Deoptimize to the proper target after assignment side effects.
This fixes V8 issue 989.

Before, assignments used the AST ID of the assignment expression to
mark the side effect of the store, which became a target for
deoptimization bailout for code after the assignment.  In effect
contexts this environment included the value of the assignment, which
was unexpected by the unoptimized code.

Now we introduce a new assignment ID for AST node types that include
an assignment (Assignment, CountOperation, and ForInStatement) and use
it for the side effect of the store.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5990 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-13 16:29:47 +00:00
whesse@chromium.org
1a008f28d5 Allow optimizing compiler to compute Math.log using untagged doubles.
Review URL: http://codereview.chromium.org/5741003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5989 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-13 14:37:19 +00:00
whesse@chromium.org
8f89006381 Align builtins-{arch}.cc on ia32 and x64 platforms by moving functions and editing.
Review URL: http://codereview.chromium.org/5781004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5984 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-13 12:24:29 +00:00
ager@chromium.org
f1b702b8ae Landing for cira.
Adding experimental JavaScript internationalization API to V8 as an
extension.  This CL implements Locale object only.

Each embeder has to decide whether to include this extension or not by
editing their build rules.

See ecmascript strawman document for details on i18n
API. http://wiki.ecmascript.org/doku.php?id=strawman:i18n_api

TEST=WebKit CL (in progress) will have layout tests for extension.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5983 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-13 12:23:32 +00:00
sandholm@chromium.org
425a221b02 Optimizing BuildResultFromMatchInfo, StringReplace and StringSplit.
Review URL: http://codereview.chromium.org/5708006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5982 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-13 12:19:10 +00:00
ager@chromium.org
1e494335bb Make idle notification cleanup less aggressive. Do not clean up on
idle notifications after the one that causes the mark-compact
collection unless four or more garbage collections (scavenges) have
occurred.

The embedder should stop sending idle notifications once V8 returns
true from the IdleNotification call. This change is being defensive so
it will not hurt as badly if embedders continue to send idle
notifications.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5981 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-13 12:14:30 +00:00
fschneider@chromium.org
edba069919 Revert 5973 as well (related to previous commit)
TBR=lrn@chromium.org, 
Review URL: http://codereview.chromium.org/5754004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5979 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-13 10:49:00 +00:00
mikhail.naganov@gmail.com
5cf643aa42 New heap profiler: add support for progress reporting and control.
As taking a snapshot of a large heap takes noticeable time, it's
good to be able to monitor and control it.

The change itself is small, big code deletes and additions are in
fact moves. The only significant change is simplification of
approximated retained sizes calculation algorithm.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5978 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-13 10:42:06 +00:00
fschneider@chromium.org
b1a2cc1e48 Revert r5970 and r5975.
Review URL: http://codereview.chromium.org/5717005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5977 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-13 10:41:50 +00:00
erik.corry@gmail.com
9977abb42a Fix incorrect assumption about young/old space allocation in
JSON stringify (introduced in r5951).
Review URL: http://codereview.chromium.org/5746005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-13 10:09:09 +00:00
fschneider@chromium.org
b50b98421c Land Vitaly's change to fix compare IC performance.
Original change: http://codereview.chromium.org/5733004/

When we have inlined smi code can transition to heap number state before going to the generic state. Without inlined smi code the behaviour is unchanged.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5975 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-13 10:05:19 +00:00
lrn@chromium.org
94bb378ee5 Make RegExp character class match JSC.
See http://trac.webkit.org/changeset/73594

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5974 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-13 08:33:32 +00:00
mikhail.naganov@gmail.com
72f5bcb3aa Fix x64 build after r5970, the same way as for ARM.
TBR=fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-10 16:33:36 +00:00
karlklose@chromium.org
efe2514eb3 Fix bug that disabled optimization when profiling.
Review URL: http://codereview.chromium.org/5720003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5972 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-10 14:49:24 +00:00
fschneider@chromium.org
ac54854fda Fix long line.
Review URL: http://codereview.chromium.org/5680005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-10 14:35:40 +00:00
fschneider@chromium.org
b16df72475 Improve our type feedback by recogizining never-executed IC calls for binary operations.
In the case of inlined smi code in non-optimzied code we could not 
distinguish between the smi-only case and the case that the operation was
never executed.

With this change the first execution of a binary operation always jumps
to the stub which in turn patches the smi-check into the correct
conditional branch, so that we benefit from inlined smi code after the
first invocation.

A nop instruction after the call to the BinaryOpIC indicates that no
smi code was inlined. A "test eax" instruction says that there was smi
code inlined and encodes the delta to the patch site and the condition
code of the branch at the patch site to restore the original jump.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5970 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-10 14:33:20 +00:00
vegorov@chromium.org
65f98b1e7a Fix issue 962.
SplitBetween (formely known as Split with 3 arguments) should select split position from [start, end] instead of [start, end[. This should also improve allocation quality (remove certain redundant move patterns).

Also some minor renaming and refactoring to make register allocator code more readable.

BUG=v8:962
TEST=test/mjsunit/regress/regress-962.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5969 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-10 14:25:10 +00:00
erik.corry@gmail.com
38343f79fa Increase the size of the max object that can be new space allocated.
This is neutral on in-browser SunSpider, but beneficial on other
things, and is likely to lower memory use by collecting earlier.
Review URL: http://codereview.chromium.org/5753003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5968 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-10 14:11:17 +00:00
ager@chromium.org
48d884de48 ARM: Fix heap number allocation in lithium-codegen-arm that assumed
that ip can be used as a scratch register. This is not true because
ip is already used for something else in AllocateInNewSpace in the
macro assembler.

Explicitly allocate a temp register for use in the heap number
allocation instead.
Review URL: http://codereview.chromium.org/5788001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5967 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-10 14:10:54 +00:00
lrn@chromium.org
c0c3deb721 Ensure that default value is explicitly initialized in DefineOwnProperty.
TBR: kmillikin

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5965 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-10 12:58:18 +00:00
ager@chromium.org
5e80d5df5d ARM: Fix missing SetCC in crankshaft code emitted when running with
the --debug-code flag.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-10 12:12:06 +00:00
karlklose@chromium.org
f2ec8be178 Fix a bug that caused the runtime profiler to sample huge amounts of stack frames in programs with recursively called optimized functions.
Review URL: http://codereview.chromium.org/5786001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5961 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-10 12:00:26 +00:00
lrn@chromium.org
c0df3f0a23 Fix issue 965.
Review URL: http://codereview.chromium.org/5773002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5960 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-10 11:27:15 +00:00
ricow@chromium.org
ec30a6985e Fix presubmit
Review URL: http://codereview.chromium.org/5772003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5959 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-10 11:02:09 +00:00