Commit Graph

108 Commits

Author SHA1 Message Date
whesse@chromium.org
fc83faa8fd Move inlined function declarations and support from codegen.* to runtime.*.
Review URL: http://codereview.chromium.org/3293002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-14 14:52:53 +00:00
whesse@chromium.org
990992a857 Remove CodeGenerator::PatchInlineRuntimeEntry and replace its single use in test-log-stack-tracer.cc with an alternative implementation.
Review URL: http://codereview.chromium.org/3311002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-01 13:13:31 +00:00
whesse@chromium.org
a18f9d1114 Remove dependence of code-stubs on codegen, the virtual frame code generator. Move some functions used by code-stubs and full-codegen from codegen to macro-assembler.
Review URL: http://codereview.chromium.org/3169049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-30 11:48:07 +00:00
serya@chromium.org
71548e969b Using array index hash code for string-to-number conversion.
Review URL: http://codereview.chromium.org/3141022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-27 11:47:12 +00:00
sgjesse@chromium.org
be5763fc4d Cleanup the way the debugger stores live registers when entering at a break
The live registers are now only stored to the expression stack with the non pointer values being stored as smis (on the 32-bit platforms these values are assumed to be 31-bit max).

This makes the CEntryStub entry/exit code much simpler, and there is no longer any need for a mode (debug or normal) on it.

Fix a missing live register when breaking at ARM keyed load.
Review URL: http://codereview.chromium.org/3141047

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5358 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-27 07:08:03 +00:00
lrn@chromium.org
0210df5848 Use Copy-on-write arrays for cached regexp results.
Review URL: http://codereview.chromium.org/3158020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5310 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-20 09:37:22 +00:00
vitalyr@chromium.org
3202df6c69 Copy-on-write arrays.
Object model changes
----------------------------------------
New fixed_cow_array_map is used for the elements array of a JSObject
to mark it as COW. The JSObject's map and other fields are not
affected. The JSObject's map still has the "fast elements" bit set. It
means we can do only the receiver map check in keyed loads and the
receiver and the elements map checks in keyed stores. So introducing
COW arrays doesn't hurt performance of these operations. But note that
the elements map check is necessary in all mutating operations because
the "has fast elements" bit now means "has fast elements for reading".
EnsureWritableFastElements can be used in runtime functions to perform
the necessary lazy copying.

Generated code changes
----------------------------------------
Generic keyed load is updated to only do the receiver map check (this
could have been done earlier). FastCloneShallowArrayStub now has two
modes: clone elements and use COW elements. AssertFastElements macro
is added to check the elements when necessary. The custom call IC
generators for Array.prototype.{push,pop} are updated to avoid going
to the slow case (and patching the IC) when calling the builtin should
work.

COW enablement
----------------------------------------
Currently we only put shallow and simple literal arrays in the COW
mode. This is done by the parser.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5275 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-16 16:06:46 +00:00
sgjesse@chromium.org
e61bd7bd26 ARM: backend opt for ToBoolean: JIT code generation for ToBool
Upgraded the CodeGenerator::ToBoolean() function in the ARM backend to use complete JIT code generation and not make runtime calls to ToBool (when VFP is enabled). 

This change also includes the vcmp VFP instruction that supports a constant 0.0 as the second operand. 

Patch by Subrato K De <subratokde@codeaurora.org>



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5267 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-16 07:52:49 +00:00
sgjesse@chromium.org
8e0cd6db8a Handle overwriting valueOf on String objects correctly when adding
This adds a check to the fast case string add to ensure that the String object still have the default valueOf function. The default valueOf is sitting on a hidden prototype of String.prototype.

Before using the fast case valueOf the object is checked for a local valueOf property. For slow case objects this check always reports true (the dictionary is not probed, so valueOf might be there) and for fast case objects the descriptor array is checked for the valueOf symbol (just liniar scan). After that the prototype is checked for beeing the initial value of String.prototype. If this all pass (that is the default valueOf is still in place) this result is cached on the map making the check fast the next time.

This is only implemented in the optimizing compiler, as the two usages of %_IsStringWrapperSafeForDefaultValueOf is never hit by the full compiler.

I will port to x64 and ARM when this has been reviewed for ia32.

I will remove the performance counters prior to final commit.

BUG=http://code.google.com/p/v8/issues/detail?id=760
TEST=test/mjsunit/regress/regress-760-1.js
TEST=test/mjsunit/regress/regress-760-2.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-12 13:43:08 +00:00
erik.corry@gmail.com
751ec5d099 IA32: Avoid going into stubs or runtime code for bitops even if the
inputs are heap numbers or the result is a heap number (only with
SSE2).  Make it possible for a deferred code object to work without
spilling all registers.
Review URL: http://codereview.chromium.org/3054047

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-09 13:12:02 +00:00
lrn@chromium.org
53e22e386c Create a new RegExp object for every evaluation of a RegExp literal.
Changes necessary to following ES5 semantics and matching Safari - in ES3
the same RegExp object was generated by each evaluation of the RegExp literal.
Fixes bug 704.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-06 13:04:27 +00:00
ricow@chromium.org
4957326521 Refactor type checks in v8natives.js and runtime.js.
This includes adding a new inline IsSpecObject method to the code
generator.  The old approach was somehow ineffecient since we would
call both IsObject, IsUndetectable and IsFunction to determine if
something was an object according to the spec. This change introduces
a new macro that determines if something is an object according to the
spec (and this does not include null). 

This change also corrects a few places where undetectable objects was
not allowed even when they should be (priorly they would use only
IS_SPEC_OBJECT_OR_NULL, which would return false on an undetectable
object, the new IS_SPEC_OBJECT returns true on an undetectable object.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-16 11:21:08 +00:00
ager@chromium.org
6744793c90 Landing for Rodolph Perfetta.
Allow compareStub on ARM to take register in reverse order optionally.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/2850046/show

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5059 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-13 20:54:06 +00:00
lrn@chromium.org
90e9e99b3c RegExp replace with empty string optimization by Sandholm.
Review URL: http://codereview.chromium.org/2809048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5021 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-05 12:49:00 +00:00
erik.corry@gmail.com
8da222b010 Specialize GenericUnaryStub so that it knows whether it needs to
take negative zero into account.
Review URL: http://codereview.chromium.org/2850043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-05 11:03:16 +00:00
erik.corry@gmail.com
73256b05af Fix jump targets on ARM to merge virtual frames (really this time).
Use the jump targets to move the first deferred code to not flush
registers in the inlined case (KeyedLoad).
Review URL: http://codereview.chromium.org/2249002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 13:48:52 +00:00
vitalyr@chromium.org
ad0e38909f Custom call IC-s for String.prototype.{charAt,charCodeAt}.
These string methods can be composed from two basic blocks: charCodeAt
and fromCharCode, both of which have fast cases for certain types of
inputs. In this patch these two blocks are refactored to allow
generating the fast cases without having to jump around the slow
cases. In the slow cases since they can now be invoked both from
inline runtime functions and from IC stubs we either have to
save/restore state of the current frame or enter/leave a new internal
frame. This is handled by new RuntimeCallHelper interface. Its
implementation for virtual frame is based on FrameRegisterState class
extracted from DeferredCode class.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 14:23:19 +00:00
sgjesse@chromium.org
19d98493fc Add complete implementation of full compiler for the ia32 architecture
This makes the full compiler handle all constructs on ia32. However the syntax checker for the full compiler is still the same so for both normal operation and with the flag --always-full-compiler the coverage of the full compiler will be the same.

This is on preparation for improving the debugger break point experience where the plan is to only use code from full code generator when debugging JavaScript.

Runs all tests on all three platforms in release and debug mode. The tests also run with both the following flags to the test runner

  --special-command="@ --nofull-compiler"
  --special-command="@ --always-full-compiler"

The changes to the x64 and ARM architectures are mainly structural due to the change to EmitVariableAssignment to handle initialization of const variables.
Review URL: http://codereview.chromium.org/1989012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4676 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-19 07:32:32 +00:00
erik.corry@gmail.com
fa7c92eaf5 First step towards making JumpTarget work on ARM. Instead
of having a list of virtual frame pointers in the jump
target we have one virtual frame, which is the frame that
all have to merge to to branch to that frame.  The virtual
frame in the JumpTarget is inside the JumpTarget, rather than
being an allocated object that is pointed to.  Unfortunately
this means that the JumpTarget class has to be able to see
the size of a VirtualFrame object to compile, which in turn
lead to a major reorganization of related .h files.  The
actual change of functionality in this change is intended
to be minimal (we now assert that the virtual frames match
when using JumpTarget instead of just assuming that they do).
Review URL: http://codereview.chromium.org/1961004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 11:32:25 +00:00
antonm@chromium.org
55e32d2f3b Introduce faster swapping primitives.
Keyed store stub sits high in sorting profiles.

Swapping allows to save us additional type checks as we could both read and
write elmenets (on fast path) without them.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 15:14:39 +00:00
sgjesse@chromium.org
daf1ea3970 Avoid constant pool blocking for too long
The generation of the deferred code for named property load where the load was inlined did a constant pool blocking for the whole deferred code. Having large numbers of this type of deferred code generated one ofter the other effectively blocked the constant pool for all the deferred code causing 

Removed the BeforeGenerate/AfterGenerate for the deferred code and made macro assembler StartBlockConstPool/EndBlockConstPool non-public. Re-introduced BlockConstPoolFor instead to use with BlockConstPoolScope to block some more instructions cross function calls.

Also handle the use of native code counters for inlined named property load.
Review URL: http://codereview.chromium.org/1787005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-27 09:09:51 +00:00
sgjesse@chromium.org
931f0a031a Changed inlined property load detection on ARM
Instaed of having a nop after all non-inlined calls to load IC use a different nop (mov r1, r1 instead of mov r0, r0) to detect an inlined load IC.

Added more infrastructure to the deferred code handling to make it possbile to block constant pool emitting in a deferred code block, including the branch instruction ending the deferred code block.

Addressed a couple of comments to http://codereview.chromium.org/1715003, including adding an assert to make sure that the patching of an ldr instruction is always possible.
Review URL: http://codereview.chromium.org/1758003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4480 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-23 07:42:45 +00:00
sgjesse@chromium.org
09aa20da08 Ensure stack alignment in ARM port
In the CEntryStub keep track of the actual skew from the correct alignment to ensure proper alignment before calling the runtime. Add checks to test the expected skew when running on hardware.

Use the PrepareCallCFunction/CallCFunction in a few other places.

Add check to the ARM simulator for correct alignment.

Add option --sim-stack-alignment to set the stack alignment in the simulator. Currntly only values 4 and 8 makes sense. 8 is the default to make snapshots generated with the simulator work on hardware requiring 8 byte stack alignment.
Review URL: http://codereview.chromium.org/1530043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-15 09:34:47 +00:00
antonm@chromium.org
a713b27428 Introduce fast native caches and use it in String.search.
Review URL: http://codereview.chromium.org/1563005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-14 14:46:15 +00:00
lrn@chromium.org
285d5bc48a Native construction of RegExp result objects, with in-object index and input.
Avoid cloning using CloneRegExpResult for results that are just arrays.
Made a more direct path for string.match with string argument.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4395 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-13 09:31:03 +00:00
antonm@chromium.org
400b1be449 Faster invocation of custom comparator function.
Review URL: http://codereview.chromium.org/1623004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-12 07:05:24 +00:00
erik.corry@gmail.com
fbefa72f81 Simple register allocation for ARM. Only top of expression
stack for now.  Next step is probably fixing the binary
op stubs so they can take swapped registers and fixing
the deferred code so it doesn't insist that all registers
except the two operands are flushed.  Generates slightly
worse code sometimes because the peephole push-pop
elimination gets confused when we don't use the same
register all the time (the old code used r0 always).
Review URL: http://codereview.chromium.org/1604002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4368 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-08 22:30:30 +00:00
whesse@chromium.org
c33886c9b7 Change Math.random() to return 32 bits of random goodness, instead of 30 random bits. Math.random now allocates a HeapNumber inline, and calls a C funciton directly to put the random bits into it.
Review URL: http://codereview.chromium.org/1599019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-07 08:18:51 +00:00
vitalyr@chromium.org
f1a47d2bbd Inline %_ArgumentsLength.
This makes usage of cmov unnecessary.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-30 13:55:03 +00:00
vitalyr@chromium.org
6fbad6e230 Simplify passing of AccessorInfo to interceptors:
* Use slots on the native stack when possible instead of Relocatable.
 * Got rid of a gap in AccessorInfo fields.
 * Added test for non-cacheable post-interceptor lookup.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4288 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 17:08:22 +00:00
fschneider@chromium.org
0737ec8dcb Rename NumberInfo to TypeInfo.
Since we add more type (StringType, PrimitiveType) the name
NumberInfo does not make sense anymore.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 12:44:15 +00:00
sgjesse@chromium.org
6a63910650 Re-apply "Inline floating point compare"
This re-applies r4220 and r4233, which was reverted in r4254 due to a bug. This bug has now been fixed, with the only change being line 2884 changed from

  __ SmiTag(left_side->reg());

to

  __ SmiTag(operand->reg());

Added a regression test.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4261 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 12:04:34 +00:00
kmillikin@chromium.org
c0c1ebcaa4 Revert "Inline floating point compare"
This reverts svn revisons r4220 and r4233.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4254 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-24 14:26:14 +00:00
sgjesse@chromium.org
0c6a3f4864 Fix GetName and Print for CompareStub
Review URL: http://codereview.chromium.org/1108006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4233 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 14:59:36 +00:00
sgjesse@chromium.org
9240342ad6 Inline floating point compare
Inline floating point compare instead of calling the stub when the following conditions are met:
  * Code is in a loop
  * Compare is not a for loop condition
  * Compare is not an equal comparison

This inlined code handles heap number to heap number and heap number to smi compare. It can also handle smi to smi compare, but whenever there is a chance of comparing two smis the smi compare is inlined before the inlined floating point compare. Support for non SSE2 hardware is included.

A new set of variants of the compare stub without the floating point comparison code is called if the inline comapre fails due to the operands not beeing heap numbers or smis.

The virtual frame has been extended with a branch taking two live results to be carried through to the destination. This makes this change much simpler as the inlined code have two live results in registers and a number of bailouts.

CompareStub::GetName needs to be updated as well. I will do that as a separate change.

Also inlined equality check if both operands can't be NaN. This can only provide positive equals if it is the same object.
Review URL: http://codereview.chromium.org/1117011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 12:36:31 +00:00
iposva@chromium.org
a1ec99c05d - Remove function boilerplate objects and use SharedFunctionInfos in
their place.
- Add one field to the SharedFunctionInfo to remember the number of
  literals used in this function.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4211 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 06:04:44 +00:00
sgjesse@chromium.org
ef2e46d1cc Use bit fields to calculate compare stub minor key
Review URL: http://codereview.chromium.org/1081010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4208 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-22 14:31:28 +00:00
sgjesse@chromium.org
e5f27966dc Add fuzzing support for inline runtime functions
The inline runtime functions are now included in the fuzzing of the natives. The chack for the expected number of arguments passed have been moved to the parser which will generate a syntax error if a runtime function (either C++ or inline) is called with a different number of arguments than expected.
Review URL: http://codereview.chromium.org/573056

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

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

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

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

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

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

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

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

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

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

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

Patch by Alexandre Rames from Sigma Designs Inc.

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

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3776 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-03 07:58:47 +00:00
serya@chromium.org
0045327b7d Review URL: http://codereview.chromium.org/555164
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-02 18:35:53 +00:00
serya@chromium.org
9239bbdd91 Removing redundant stub for runtime native calls.
Review URL: http://codereview.chromium.org/543207

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

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

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

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

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

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

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

Currently only ASCII strings are handled.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-06 11:09:30 +00:00