Commit Graph

583 Commits

Author SHA1 Message Date
rossberg@chromium.org
42552808ab Rename "global context" to "native context",
in anticipation of the upcoming lexical global scope.

Mostly automatised as:

for FILE in `egrep -ril "global[ _]?context" src test/cctest`
do
  echo $FILE
  sed "s/Global context/Native context/g" <$FILE >$FILE.0
  sed "s/global context/native context/g" <$FILE.0 >$FILE.1
  sed "s/global_context/native_context/g" <$FILE.1 >$FILE.2
  sed "s/GLOBAL_CONTEXT/NATIVE_CONTEXT/g" <$FILE.2 >$FILE.3
  sed "s/GlobalContext/NativeContext/g" <$FILE.3 >$FILE
  rm $FILE.[0-9]
done

R=mstarzinger@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10832342

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-17 09:03:08 +00:00
verwaest@chromium.org
d53de0590a Swapped transition array and descriptor array.
Now a map points to a transition array which contains the descriptor array. The descriptor array is now immutable. The next step is to share the descriptor array with all back-pointed maps as long as there is a single line of extension. Maps that require a descriptor array but don't need transitions will still need a pseudo-empty transition array to contain the descriptor array.

Review URL: https://chromiumcodereview.appspot.com/10816005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-13 08:43:16 +00:00
mstarzinger@chromium.org
6cfc3f4c18 Remove obsolete SLOT_ADDR macro usages.
R=yangguo@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10823254

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-09 12:25:03 +00:00
erik.corry@gmail.com
92f30d1df5 Improve load IC so it can call a native accessor even if the holder is
in dictionary mode.  Add a flag to all maps to indicate whether they are
used for dictionary (normalized) objects or fast mode objects.
Review URL: https://chromiumcodereview.appspot.com/10831153

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 14:25:19 +00:00
svenpanne@chromium.org
b5da7279b1 Introduced TypeFeedbackId and BailoutId types.
This is a refactoring-only CL which improves the typing of IDs associated with
AST nodes. The interesting parts are in utils.h and ast.h, the rest of the CL
basically follows mechanically.

Review URL: https://chromiumcodereview.appspot.com/10831172

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 14:13:09 +00:00
verwaest@chromium.org
1c7aa4d172 Set LastAdded to kNoneAdded in RawCopy.
This ensures it is properly initialized if no descriptors are later set.

Review URL: https://chromiumcodereview.appspot.com/10833033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12202 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-26 13:48:34 +00:00
verwaest@chromium.org
175440898e Limited the size of transition arrays so they never end up in the large object space.
Also renamed SizeOf on DescriptorArray to LengthOf for consistency.

Review URL: https://chromiumcodereview.appspot.com/10822011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12196 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-26 08:27:20 +00:00
sanjoy@chromium.org
693c7643d2 Optimize functions on a second thread.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10807024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-19 18:58:23 +00:00
verwaest@chromium.org
52bfb2a18e Moved lastadded from DescriptorArray to Map. Renamed kLastAdded to kEnumCache.
Review URL: https://chromiumcodereview.appspot.com/10802034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-19 14:45:19 +00:00
verwaest@chromium.org
b489d66649 Append to descriptors over map.
Review URL: https://chromiumcodereview.appspot.com/10800033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-19 10:01:52 +00:00
svenpanne@chromium.org
001cc2edac Don't use alloca.
It leads to compability hell, and the amount of memory we need is bounded,
anyway. Added a few more assertions on the way.

Review URL: https://chromiumcodereview.appspot.com/10808029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-19 07:32:58 +00:00
verwaest@chromium.org
f99dda8dab Let DescriptorArray::Append insert at proper position, avoiding need for resorting.
Using insertion-sort won't have too much of an overhead for the short arrays for bootstrapping (which are probably snapshot anyway).
CopyAppendCallbackDescriptors was extending and sorting the array in a loop. By using an append that inserts at the right position we do not need to resort in each iteration.

Additionally remove Sort and rename SortUnchecked to Sort. The IsSortedNoDuplicates check is moved into InitializeDescriptor.

Review URL: https://chromiumcodereview.appspot.com/10808011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-18 15:38:58 +00:00
yangguo@chromium.org
d340db9135 Insert missing write barrier in sliced string allocation.
BUG=v8:2237
TEST=test-heap/Regress2237

Review URL: https://chromiumcodereview.appspot.com/10781033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12127 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-18 13:39:53 +00:00
verwaest@chromium.org
d8c7a03a3a Grouping all map creation code.
- Now tunnel all descriptor changes through methods on the map
- Renamed CopyDropTransitions to regular Copy since we always "drop transitions" on copy anyway.
- Merged and moved elements transition map creation.

Review URL: https://chromiumcodereview.appspot.com/10780031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12105 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-17 13:50:19 +00:00
verwaest@chromium.org
11e5c9e281 Removed transitions from the accessor pair descriptors.
AccessorPair related transitions are now also stored as single map links, simplifying the code that handles transitions. AccessorPairs can now be shared between descriptor arrays, since they can only be mutated after another transition anyway; during which the pair is copied before writing.

Review URL: https://chromiumcodereview.appspot.com/10784014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12097 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-16 14:02:50 +00:00
verwaest@chromium.org
70a618307a Renamed ConvertDescriptorToFieldAndMapTransition to ConvertTransitionToMapTransition, and let it replace the transition in-place rather than copy the transition array.
Review URL: https://chromiumcodereview.appspot.com/10694155

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-12 16:36:10 +00:00
verwaest@chromium.org
812bc1db26 Couple the enumeration index of a property to the size of the descriptor array where it first appeared.
Review URL: https://chromiumcodereview.appspot.com/10692185

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-12 15:14:54 +00:00
verwaest@chromium.org
b008d99b11 Ensure that all descriptors have a valid enumeration index, and replace NextEnumIndex with LastAdded.
The LastAdded points to the descriptor that was last added to the array. From the descriptor we can deduce the NextEnumerationIndex. This allows us to quickly find the property that we are transitioning to, which is necessary for transition-intensive code, eg JSON parsing.

Review URL: https://chromiumcodereview.appspot.com/10695120

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-11 14:26:42 +00:00
verwaest@chromium.org
45419ee145 Swap bitfield3 and backpointer.
Bitfield3 now has its own field, while the backpointer shares the field with the descriptor array; which will become the transition array.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10692130

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-10 13:31:36 +00:00
verwaest@chromium.org
75407ae2b7 Moving prototype transitions into the header of the transition array.
Review URL: https://chromiumcodereview.appspot.com/10692026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-10 07:53:00 +00:00
rossberg@chromium.org
98db1a369d Implement proper module linking.
Specifically:

- In parser, check that all exports are defined.
- Move JSModule allocation from parser to scope resolution.
- Move JSModule linking from full codegen to scope resolution.
- Implement module accessors for exported value members.
- Allocate module contexts statically along with JSModules
  (to allow static linking), but chain them when module literal is evaluated.
- Make module contexts' extension slot refer to resp. JSModule
  (makes modules' ScopeInfo accessible from context).
- Some other tweaks to context handling in general.
- Make any code containing module literals (and thus embedding
  static references to JSModules) non-cacheable.

This enables accessing module instance objects as expected.
Import declarations are a separate feature and do not work yet.

R=mstarzinger@chromium.org
BUG=v8:1569
TEST=

Review URL: https://chromiumcodereview.appspot.com/10690043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-09 08:59:03 +00:00
danno@chromium.org
a0a1d06b35 Make room in Code flags to support compiled stubs.
R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10701106

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12008 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-06 22:08:27 +00:00
verwaest@chromium.org
6139bafd28 Also in ClearNonLiveTransitions we have to check if there still is a transition array before we access it.
This should never happen in the long run, but will happen when maps still have a back-pointer while the forward pointer (the transition) was overwritten.

Review URL: https://chromiumcodereview.appspot.com/10704109

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-06 10:02:15 +00:00
verwaest@chromium.org
d7a5b7d5e2 Separating transitions from descriptors.
In this design maps contain descriptor arrays, which in turn can contain transition arrays. If transitions are needed when no descriptor array is present, a descriptor array without real descriptors is inserted just so it can point at the transition array.

The transition array does not contain details about the field it transitions to. In order to weed out transitions to FIELDs from CONSTANT_FUNCTION (what used to be MAP_TRANSITION vs CONSTANT_TRANSITION), the transition needs to be followed and the details need to be looked up in the target map. CALLBACKS transitions are still easy to recognize since the transition targets are stored as an AccessorPair containing the maps, rather than the maps directly.

Currently AccessorPairs containing a transition and an accessor are shared between the descriptor array and the transition array. This simplifies lookup since we only have to look in one of both arrays. This will change in subsequent revisions, when descriptor arrays will become shared between multiple maps, since transitions cannot be shared.

Review URL: https://chromiumcodereview.appspot.com/10697015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-05 13:54:20 +00:00
svenpanne@chromium.org
f0e042e5e5 Removed superfluous cast.
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10696119

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11992 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-05 13:13:33 +00:00
rossberg@chromium.org
680797234c Further extend TypedArray support in d8:
- Add copy constructors.
- Add subarray methods.
- Make instanceof and constructor property work.
- Rename PixelArray to Uint8ClampedArray.

Also fix broken definition of assertInstanceof in MJSUnit test harness.

R=mstarzinger@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10558005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-28 16:29:53 +00:00
verwaest@chromium.org
68c944c265 In-place shrinking of descriptor arrays with non-live transitions.
Instead of overwriting non-live transitions with NULL_DESCRIPTORs, we remove them from the array by compacting the array (shifting live values to the left) and in-place trimming the array. If the final descriptor array contains no live values (only contained transitions which are now all cleared), we move bit_field3 back from the descriptor array to the map. The descriptor array itself will be collected in the next GC.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10575032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-25 13:10:54 +00:00
verwaest@chromium.org
41560e9f5f Separate stub types from property types.
Review URL: https://chromiumcodereview.appspot.com/10656018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-25 11:35:23 +00:00
mstarzinger@chromium.org
a760b82cab Enable lazy compilation for non-trivial outer contexts.
This changes the compiler to be more aggressive about lazy compilation
of closures with non-trivial outer context. Compilation can only be
triggered with a valid outer context now. One exception is the debugger,
which can request compilation of arbitrary shared code, but it ensures
to trigger compilation only at points where no context is needed.

This relands r11782, r11783, r11790 and a minor fix.

R=ulan@chromium.org
TEST=mjsunit/debug-script-breakpoints-nested

Review URL: https://chromiumcodereview.appspot.com/10543141

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 14:29:48 +00:00
verwaest@chromium.org
6568d73d97 Removing superfluous IsSmi check from DescriptorArray::IsEmpty.
DescriptorArray::IsEmpty is never called with a Smi.

Review URL: https://chromiumcodereview.appspot.com/10555024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-18 12:42:46 +00:00
verwaest@chromium.org
8aca22b1ef Implementing weak referencing elements transition maps.
Review URL: https://chromiumcodereview.appspot.com/10559032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-18 11:43:09 +00:00
erik.corry@gmail.com
045b2fbf20 Revert part of 11727 as it sometimes tanked V8 benchmark (raytrace) performance
for reasons that are not obvious.  Now we make objects into fast-case objects
when they are made prototypes for other objects, but we do not mark objects
that are already fast case with a bit that helps keep them in fast case.
Review URL: https://chromiumcodereview.appspot.com/10556004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-15 11:53:09 +00:00
fschneider@chromium.org
bb0a2ea766 Share optimized code for closures.
Each SharedFunctionInfo gets an optimized code map to store
one optimized code object per context. When allocating a new
closure we consult this map and check if there is optimized code
that can be shared.

This patch is based on an original patch
by Anton Muhin (http://codereview.chromium.org/6793013/).

BUG=v8:2087, v8:2094
TEST=test/mjsunit/compiler/optimized-closures.js
Review URL: https://chromiumcodereview.appspot.com/10103035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 14:06:22 +00:00
mstarzinger@chromium.org
9edaa1536b Revert r11782, r11783 and r11790 due to Webkit failures.
R=danno@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10536142

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11796 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-13 11:26:34 +00:00
mstarzinger@chromium.org
19ece2bec8 Enable lazy compilation for non-trivial outer contexts.
This changes the compiler to be more aggressive about lazy compilation
of closures with non-trivial outer context. Compilation can only be
triggered with a valid outer context now. One exception is the debugger,
which can request compilation of arbitrary shared code, but it ensures
to trigger compilation only at points where no context is needed.

R=ulan@chromium.org
TEST=mjsunit/debug-script-breakpoints-nested

Review URL: https://chromiumcodereview.appspot.com/10538102

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-12 15:57:50 +00:00
ulan@chromium.org
75a1fa91ef Reland r11425 "Re-enable optimization for hot functions that have optimization disabled due to many deopts."
Fix performance regressions introduced in r11425 by
- counting number of function deoptimizations instead of function optimizations,
- packing several counters into one field of shared function info.

BUG=v8:2040,121196
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10534063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-11 16:57:27 +00:00
danno@chromium.org
a1d9aca22f Fix EnsureCanContainElements to properly handle double values.
R=jkummerow@chromium.org
BUG=v8:2170
TEST=test/mjsunit/regress/regress-2170.js

Review URL: https://chromiumcodereview.appspot.com/10542084

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-11 08:41:48 +00:00
verwaest@chromium.org
2b574ef580 Promoting elements transitions to their own field.
This is a first step towards separating all transitions from the property descriptions. If we link the property descriptions from the transition object, this will in allow the descriptor array (property descriptions) to become immutable.

Review URL: https://chromiumcodereview.appspot.com/10444055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11750 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-11 06:59:56 +00:00
mstarzinger@chromium.org
81e8aa0016 Implement implicit instance checks for API accessors.
This allows to specify a constructor against which an implicit instance
check is performed for API accessors. If the receiver is incompatible,
an implicit TypeError is thrown and no callback is invoked.

R=svenpanne@chromium.org
BUG=v8:2075
TEST=cctest/test-api/InstanceCheckOn[*]

Review URL: https://chromiumcodereview.appspot.com/10442129

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-08 07:45:11 +00:00
erik.corry@gmail.com
657422c29a Use the syntax of a property addition as a hint for controlling the fast-mode vs. dictionary mode heursitics on objects.
Review URL: https://chromiumcodereview.appspot.com/10537050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-07 12:08:07 +00:00
erik.corry@gmail.com
911d447b96 Keep track of which maps are associated with prototype objects so we can tune the fast-case vs. hash map heuristics accordingly.
This is a reland of r11681 https://chromiumcodereview.appspot.com/10448011 , which was reverted because of layout test failures that were actually caused by the long-standing issue fixed in https://chromiumcodereview.appspot.com/10515006 (r11706).
Review URL: https://chromiumcodereview.appspot.com/10532021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11727 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-06 10:17:26 +00:00
verwaest@chromium.org
98c37e1f4c Merging ContentArray into DescriptorArray
Review URL: https://chromiumcodereview.appspot.com/10412030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-04 07:20:11 +00:00
verwaest@chromium.org
dd54b0acf7 ClearNonLiveTransitions indepedent of ContentArray
Review URL: https://chromiumcodereview.appspot.com/10387231

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11693 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-01 09:12:01 +00:00
erik.corry@gmail.com
b7b43e9af9 Revert r11681 https://chromiumcodereview.appspot.com/10448011
(Keep track of which maps are associated with prototype objects so we can tune the fast-case vs. hash map heuristics accordingly.).
Reverting because the dict-mode to fast case transformation loses the iteration order information.
Review URL: https://chromiumcodereview.appspot.com/10448097

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11685 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-31 09:27:39 +00:00
verwaest@chromium.org
75f35d3fe1 Decoupling MarkDescriptorArray as much as possible from the ContentArray.
Review URL: https://chromiumcodereview.appspot.com/10417030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-30 15:15:17 +00:00
erik.corry@gmail.com
8cf2af4392 Keep track of which maps are associated with prototype objects
so we can tune the fast-case vs. hash map heuristics accordingly.
Review URL: https://chromiumcodereview.appspot.com/10448011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-30 14:40:57 +00:00
danno@chromium.org
9910edbb9a Implement tracking and optimizations of packed arrays
R=jkummerow@chromium.org
TEST=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10170030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11636 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-23 14:24:29 +00:00
mstarzinger@chromium.org
4a7c70de23 Add zapping of Map contents in debug mode.
This zaps the contents of stale descriptor arrays and prototype
transition arrays before overwriting references to them. It should help
to discover accidental sharing early and is needed for the heap verifier
when map collection with incremental marking lands.

R=ulan@chromium.org
BUG=v8:1465

Review URL: https://chromiumcodereview.appspot.com/10383186

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11569 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-15 15:45:38 +00:00
mstarzinger@chromium.org
526b3f2cac Implement explicit back pointers in transition tree.
This makes back pointers in the map transition tree explicit by having
accurate back pointers throughout the lifetime of maps instead of
establishing and destroying back pointers before and after each marking
phase. This is a prerequisite for being able to clear map transitions
during incremental marking.

R=vegorov@chromium.org
BUG=v8:1465

Review URL: https://chromiumcodereview.appspot.com/10381053

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11528 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-09 07:29:18 +00:00
erik.corry@gmail.com
9889994c08 Fix function sorter from 11482 with correct fix. The sorter
was reverted from trunk 3.10.8.1, with this change we can
repush it.
Review URL: https://chromiumcodereview.appspot.com/10377043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-08 12:30:36 +00:00
erik.corry@gmail.com
f54484aff4 Fix assert in function sorter.
Review URL: https://chromiumcodereview.appspot.com/10364002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11497 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-03 14:09:26 +00:00
mstarzinger@chromium.org
c810016e77 Implement clearing of CompareICs.
This allows CompareICs to be cleared during garbage collection to avoid
cross-context garbage retention through maps stored in CompareIC stubs
for the KNOWN_OBJECTS state.

R=vegorov@chromium.org
BUG=v8:2102

Review URL: https://chromiumcodereview.appspot.com/10263008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-03 10:54:17 +00:00
danno@chromium.org
908e77a53a Ensure reload of elements pointer in StoreFastDoubleElement stub.
R=mstarzinger@chromium.org
TEST=test/mjsunit/regress/regress-125515.js
BUG=chromium:125515

Review URL: https://chromiumcodereview.appspot.com/10260014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-02 09:58:42 +00:00
ulan@chromium.org
8768af54b6 Revert r11425 because of V8 benchmark performance regression.
Original CL: https://chromiumcodereview.appspot.com/10202007 "Re-enable optimization for hot functions that have optimization disabled due to many deopts."

Review URL: https://chromiumcodereview.appspot.com/10265008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-30 11:54:34 +00:00
ulan@chromium.org
a139e38c0b Re-enable optimization for hot functions that have optimization disabled due to many deopts.
Use exponential backoff in order to avoid getting into optimization-deoptimization cycle.

BUG=v8:2040,121196

Review URL: https://chromiumcodereview.appspot.com/10202007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-24 14:05:07 +00:00
svenpanne@chromium.org
999fb73bc6 Tiny DescriptorArray cleanup.
Removed 2 useless functions, nuked a simple helper function with a single caller, and simplified things by changing a signature.

Review URL: https://chromiumcodereview.appspot.com/10066046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-17 07:16:19 +00:00
rossberg@chromium.org
ab26fb6b21 Implement rudimentary module linking.
Constructs the (generally cyclic) graph of module instance objects
and populates their exports. Any exports other than nested modules
are currently set to 'undefined' (but already present as properties).

Details:
- Added new type JSModule for instance objects: a JSObject carrying a context.
- Statically allocate instance objects for all module literals (in parser 8-}).
- Extend interfaces to record and unify concrete instance objects,
  and to support iteration over members.
- Introduce new runtime function for pushing module contexts.
- Generate code for allocating, initializing, and setting module contexts,
  and for populating instance objects from module literals.
  Currently, all non-module exports are still initialized with 'undefined'.
- Module aliases are resolved statically, so no special code is required.
- Make sure that code containing module constructs is never optimized
  (macrofy AST node construction flag setting while we're at it).
- Add test case checking linkage.

Baseline: http://codereview.chromium.org/9722043/

R=svenpanne@chromium.org,mstarzinger@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9844002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11336 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-16 14:43:27 +00:00
ulan@chromium.org
18068abd0e Change ASSERT(kind() == FUNCTION) to ASSERT_EQ(FUNCTION, kind()).
R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9958062

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11205 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-02 10:57:17 +00:00
jkummerow@chromium.org
b413f376c4 Move profiler_ticks to Code object, don't walk the stack when patching ICs
Review URL: https://chromiumcodereview.appspot.com/9866030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-27 12:19:50 +00:00
jkummerow@chromium.org
d71c60e086 Port count-based profiler to x64
Review URL: https://chromiumcodereview.appspot.com/9845019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-27 11:21:27 +00:00
ulan@chromium.org
59b06fd638 Reset function info counters after context disposal.
R=jkummerow@chromium.org
BUG=117767,V8:1902

Review URL: https://chromiumcodereview.appspot.com/9836091

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-26 13:08:08 +00:00
ulan@chromium.org
0b6a617779 Age inline caches after context disposal.
Review URL: https://chromiumcodereview.appspot.com/9837005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-23 13:33:11 +00:00
mmassi@chromium.org
c39c2089a7 First implementation of fast path for instantiation of array literals composed of doubles.
Review URL: https://chromiumcodereview.appspot.com/9814006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11114 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-23 10:14:51 +00:00
danno@chromium.org
9104cfd959 Use CopyElements for SetFastDoubleElementsCapacityAndLength
Review URL: https://chromiumcodereview.appspot.com/9663002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-16 13:59:59 +00:00
pfeldman@chromium.org
100bc51eae Debugger: add ability to set script source from within OnBeforeCompile.
Review URL: https://chromiumcodereview.appspot.com/9677043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-15 11:51:26 +00:00
yangguo@chromium.org
1c4edb8c44 Remove write barriers for raw smi accessors.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9702026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-14 16:16:46 +00:00
erik.corry@gmail.com
03cfc4363b Fix input and output to handle UTF16 surrogate pairs.
Review URL: https://chromiumcodereview.appspot.com/9600009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11007 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-12 12:35:28 +00:00
ulan@chromium.org
1767fef60b Implement date library functions in C++.
Developed together with Andreas Rossberg based on:
  https://chromiumcodereview.appspot.com/9117034/
  https://chromiumcodereview.appspot.com/9307083/

R=rossberg@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9572008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10983 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-09 12:07:29 +00:00
rossberg@chromium.org
13d31b6594 Implement caching scheme for Date fields.
This is based on https://chromiumcodereview.appspot.com/9117034/

Doesn't have much impact on its own, but is the basis for Ulan's CL https://chromiumcodereview.appspot.com/9117034/, which moves the logic to C++.

R=ulan@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9307083

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10982 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-09 11:19:55 +00:00
rossberg@chromium.org
8604da7f06 New class for Date objects: caches individual date components.
First step, cache slots not used yet.

R=ulan@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9117034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10981 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-09 11:11:55 +00:00
svenpanne@chromium.org
5033b9b6d1 Re-land CL 9466047.
Main change from the original CL: Call::ComputeTarget does not use IsProperty
anymore, because this would potentially need a holder, which we don't have
here. Using Map::LookupInDescriptors with a NULL holder is a bit fishy in
general, because one has to be *extremely* careful when using its LookupResult.

The original CL made Chrome's NetInternalsTest.netInternalsTourTabs browser test
fail, but it's a mystery how this could happen: We should never reach
Call::ComputeTarget via Call::RecordTypeFeedback with a CALLBACKS property,
because we never consider calls to them monomorphic, which is in turn because of
the stub cache leaving them in the pre-monomorphic state. Therefore, I don't
have a clue how to write a regression test for this...

As an additional tiny bonus, the --trace-opt output for deoptimizations has been
improved.

Review URL: https://chromiumcodereview.appspot.com/9584003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-02 14:03:59 +00:00
jkummerow@chromium.org
ea62dca70e Revert "Handle CALLBACKS correctly in IsProperty functions."
This reverts r10847.

Review URL: https://chromiumcodereview.appspot.com/9536010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-29 13:29:17 +00:00
svenpanne@chromium.org
18ba22168e Handle CALLBACKS correctly in IsProperty functions.
With transitions in AccessorPairs, it is not enough to look at the PropertyType
alone to decide whether we look at a property or not: For objects with
JavaScript accessors, we have to look into the AccessorPair itself and see if
one of its 2 parts is actually a JavaScript accessor. Therefore, a predicate
with a PropertyType argument alone doesn't make sense anymore, we might need the
associated value, too.

Things are complicated by the fact that the holder in a LookupResult can be
NULL, so we must be careful to retrieve its value only when it is really
needed. To achieve the needed call-by-name semantics, a new Entry is introduced,
which is basically a closure over a DescriptorArray and an index into this array
(C++0x to the rescue!). GCC is clever enough to inline this class, so we pay no
runtime penalty for this abstraction.

It's all a bit ugly, but this is caused by the current structure of Descriptor,
DescriptorArray and LookupResult: Things would be much easier if DescriptorArray
were, well, an array of Descriptors, and LookupResult were a 'Maybe Descriptor'
(in Haskell-terms).

Review URL: https://chromiumcodereview.appspot.com/9466047

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-28 07:16:50 +00:00
jkummerow@chromium.org
a19c50afb4 Profiler experiments: Fix debugger in the presence of self-optimization headers
Review URL: https://chromiumcodereview.appspot.com/9466012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-27 07:49:14 +00:00
mstarzinger@chromium.org
36a91e30f7 Fix redefining of attributes on aliased arguments.
This allows elements of the non-strict arguments object to be redefined
with custom attributes and still maintain an alias into the context.
Such a slow alias is maintained by placing a special marker into the
dictionary backing store of the arguments object.

R=rossberg@chromium.org
BUG=v8:1772
TEST=test262,mjsunit/object-define-property

Review URL: https://chromiumcodereview.appspot.com/9460004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10827 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-24 14:34:01 +00:00
fschneider@chromium.org
d1172448ad Make HashMap a template class to specify the allocation policy.
The old HashMap class had an explicit member to determine the allocation
policy. The template version matches the approach used already for
lists.

Cleanup some include dependencies and unnecessary forward declarations.

Cleanup some dead code from isolate.h and replace some HEAP macros
with GetHeap().
Review URL: https://chromiumcodereview.appspot.com/9372106

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-23 09:12:57 +00:00
jkummerow@chromium.org
0177aa62da Count ICs that have type information.
Hidden behind --type-info-threshold=X flag, usage dependent on experimental profiler.

Review URL: https://chromiumcodereview.appspot.com/9403009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-20 12:57:23 +00:00
fschneider@chromium.org
ca1610e302 Add missing checks for failure after AddElementsTransition.
Review URL: https://chromiumcodereview.appspot.com/9416058

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10742 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-17 16:02:20 +00:00
fschneider@chromium.org
0be449d684 Enable optimization of top-level code and generate deoptimization support lazily.
This change enables optimization of top-level and eval-code. For this to work, it adds
support for declaring global variables in optimized code.

At the same time it disables the eager generation of deoptimization support data
in the full code generator (originally introduced in
 r10040). This speeds up initial compilation and saves 
memory for functions that won't be optimized. It requires
 recompiling the function with deoptimization
 support when we decide to optimize it.

Review URL: https://chromiumcodereview.appspot.com/9187005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10700 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-14 14:14:51 +00:00
svenpanne@chromium.org
2a57257940 DescriptorArray::CopyFrom should always drop transitions for CALLBACKS.
Review URL: https://chromiumcodereview.appspot.com/9389005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10685 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-13 14:15:43 +00:00
danno@chromium.org
f0c4b87f34 Implement KeyedStoreICs to grow arrays on out-of-bound stores.
Supports growing non-COW JSArray by a single element if the backing store has room, and initial allocation of a backing store for the store to index zero of an empty array  to kPreallocatedArrayElements elements (e.g. the [] array literal).

Review URL: https://chromiumcodereview.appspot.com/9310117

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-10 12:36:05 +00:00
jkummerow@chromium.org
aa2e842134 Count-based profiling for primitive functions (hidden behind a flag)
Review URL: https://chromiumcodereview.appspot.com/9361026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-09 10:19:46 +00:00
jkummerow@chromium.org
d795b7c620 Collect AstNode type information
Review URL: https://chromiumcodereview.appspot.com/9221011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-08 09:56:33 +00:00
svenpanne@chromium.org
b34e202b20 Removed IsTransitionType predicate.
With the upcoming changes to CALLBACKS properties, a predicate on the transition
type alone doesn't make sense anymore: For CALLBACKS one has to look into the
property's value to decide, and there is even the possibility of having a an
accessor function *and* a transition in the same property.

I am not completely happy with some parts of this CL, because they contain
redundant code, but given the various representations we currently have for
property type/value pairs, I can see no easy way around that. Perhaps one can
improve this a bit in a different CL, the current diversity really, really hurts
productivity...

As a bonus, this CL includes a few minor things:

 * CaseClause::RecordTypeFeedback has been cleaned up and it handles the
   NULL_DESCRIPTOR case correctly now. Under some (very unlikely) circumstances,
   we previously missed some opportunities for monomorphic calls. In general, it
   is rather unfortunate that NULL_DESCRIPTOR "shines through", it is just a
   hack for the inability to remove a descriptor entry during GC, something
   callers shouldn't have to be aware of.

 * DescriptorArray::CopyInsert has been cleaned up a bit, preparing it for later
   CALLBACKS-related changes.

 * LookupResult::Print is now more informative for CONSTANT_TRANSITION.

Review URL: https://chromiumcodereview.appspot.com/9320066

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-03 13:37:13 +00:00
mstarzinger@chromium.org
74feaa6c3d Fix and adapt debugger for new call target caches.
R=yangguo@chromium.org
TEST=mjsunit/debug-stepout-scope

Review URL: https://chromiumcodereview.appspot.com/9297019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-27 16:09:20 +00:00
mstarzinger@chromium.org
8c12b6b743 Implement target cache for constructor calls.
This caches call targets of constructor calls by associating one element
caches with call sites. The type feedback oracle can use the recorded
valued to gather type information for monomorphic constructor call sites.

R=kmillikin@chromium.org,vegorov@chromium.org

Review URL: https://chromiumcodereview.appspot.com/8932004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-27 13:03:19 +00:00
danno@chromium.org
57525ef893 Store transitioned JSArray maps in global context
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9073007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10523 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-26 21:47:57 +00:00
vegorov@chromium.org
67d72eab45 When preparing heap for breakpoints make sure not to flush away non-optimized code for inlined functions.
Debug::PrepareForBreakPoints was not fully populating active_functions list.

R=erik.corry@gmail.com
TEST=test/mjsunit/regress/regress-debug-code-recompilation.js

Review URL: https://chromiumcodereview.appspot.com/9290013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-25 15:11:59 +00:00
rossberg@chromium.org
1a52ae7c1e Fix typos in JSObject::GetHeaderSize, which just worked by accident.
R=kmillikin@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9231025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-18 17:01:57 +00:00
erik.corry@gmail.com
40a433c9e0 Split NumberDictionary into a randomly seeded and an unseeded
version. We don't want to randomize the stub cache.
Review URL: http://codereview.chromium.org/9174023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-16 09:44:35 +00:00
svenpanne@chromium.org
73f2f5db68 Use a separate new type AccessorPair for JavaScript callbacks instead of a FixedArray of length 2
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 16:11:33 +00:00
erik.corry@gmail.com
dc9910f4a4 Minor cleanups of numeric seeded hashing patch.
Review URL: http://codereview.chromium.org/9155010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 13:24:18 +00:00
erik.corry@gmail.com
6178a8d42c Add seed to hash of numeric keyed properties. This is a commit of http://codereview.chromium.org/9148006/ for Fedor Indutny.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 12:58:41 +00:00
erik.corry@gmail.com
ea3a515d9d Fix the logic that should ensure that a string cannot have
a hash key of zero.
Review URL: http://codereview.chromium.org/9113006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-05 10:18:28 +00:00
erik.corry@gmail.com
81a0271004 Randomize the seed used for string hashing. This helps guard against
CPU-eating DOS attacks against node.js servers.  Based on code from
Bert Belder.  This version only solves the issue for those that compile
V8 themselves or those that do not use snapshots.  A snapshot-based
precompiled V8 will still have predictable string hash codes.
Review URL: http://codereview.chromium.org/9086006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10330 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 15:12:15 +00:00
danno@chromium.org
f648626eb9 Reland 10309: Ensure large Smi-only arrays don't transition to FAST_DOUBLE_ARRAY
TBR=jkummerow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-30 14:28:14 +00:00
danno@chromium.org
5d85a04472 Rollback 10309
TBR=jkummerow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10310 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-30 13:42:21 +00:00
danno@chromium.org
dff0e36d2d Ensure large Smi-only arrays don't transition to FAST_DOUBLE_ARRAY
BUG=v8:1849
TEST=test/mjsunit/regress/regress-1849.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10309 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-30 12:54:23 +00:00
mstarzinger@chromium.org
502039a6bd Fix invalid usage of StoreIC_ArrayLength optimization.
This introduces an additional check into the StoreIC_ArrayLength builtin
checking that the array still has fast properties. Redifinitions of the
length property that would cause it's type or attributes to change, will
switch to slow properties, thereby invalidating said optimization.

R=svenpanne@chromium.org
BUG=v8:1756
TEST=test262

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10254 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-14 12:46:32 +00:00
danno@chromium.org
ef54f5690f Support Smi->Double->HeapObject transitions in constructed Arrays.
Also several bugs with Smi/double elements handling and make Ensure* routines more flexible.

BUG=none
TEST=test/mjsunit/array-construct-transition.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-09 08:50:19 +00:00
erik.corry@gmail.com
c5c32e18ad More removal of write barriers and a rename to a less scary name.
Review URL: http://codereview.chromium.org/8816020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10186 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-07 08:43:18 +00:00
fschneider@chromium.org
066822a2cf Port to x64 and ARM and some refactoring of ia32.
Review URL: http://codereview.chromium.org/8111006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-06 12:11:08 +00:00
mstarzinger@chromium.org
e3eb71e991 Fix assertion while marking Harmony weak maps.
R=erik.corry@gmail.com
BUG=v8:1845
TEST=mjsunit/harmony/proxies-example-membrane

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-29 08:48:51 +00:00
keuchel@chromium.org
1e9a7267ab Introduce extended mode.
This CL introduces a third mode next to the non-strict
(henceforth called 'classic mode') and 'strict mode'
which is called 'extended mode' as in the current
ES.next specification drafts. The extended mode is based on
the 'strict mode' and adds new functionality to it. This
means that most of the semantics of these two modes
coincide.

The 'extended mode' is entered instead of the 'strict mode'
during parsing when using the 'strict mode' directive
"use strict" and when the the harmony-scoping flag is
active. This should be changed once it is fully specified how the 'extended mode' is entered.

This change introduces a new 3 valued enum LanguageMode
(see globals.h) corresponding to the modes which is mostly
used by the frontend code. This includes the following
components:
* (Pre)Parser
* Compiler
* SharedFunctionInfo, Scope and ScopeInfo
* runtime functions: StoreContextSlot,
  ResolvePossiblyDirectEval, InitializeVarGlobal,
  DeclareGlobals

The old enum StrictModeFlag is still used in the backend
when the distinction between the 'strict mode' and the 'extended mode' does not matter. This includes:
* SetProperty runtime function, Delete builtin
* StoreIC and KeyedStoreIC
* StubCache

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-24 15:17:04 +00:00
yangguo@chromium.org
2055f4195e Recommit introducing short external strings.
Review URL: http://codereview.chromium.org/8677006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-23 13:08:28 +00:00
yangguo@chromium.org
922aee5a02 Rolling back r10049 due to webkit failures.
Review URL: http://codereview.chromium.org/8681007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-23 10:41:12 +00:00
yangguo@chromium.org
21edc7c30b Introduce short external strings without pointer cache.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-23 09:58:58 +00:00
ulan@chromium.org
e951d38261 Set the code age field of SharedFunctionInfo correctly.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-22 19:46:00 +00:00
yangguo@chromium.org
0bd29a1af6 Fixing compiler warning on gcc 4.6.1.
BUG=v8:1831

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-18 09:10:19 +00:00
yangguo@chromium.org
5a82d78948 Add pointer cache field to external string for access in generated code.
TEST=test/mjsunit/string-externalize.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-17 17:05:12 +00:00
erik.corry@gmail.com
abd895a7cb Avoid write barrier when writing an external pointer to an internal field.
Review URL: http://codereview.chromium.org/8572003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9995 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-15 12:18:24 +00:00
danno@chromium.org
8bdb3ffbca ARM: Implement runtime function for array literal transitions.
Also simplify ia32 and x64 handing of the trace_elements_transition flag.

R=jkummerow@chromium.org
BUG=none
TEST=array-literal-transitions.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9979 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 14:49:16 +00:00
kmillikin@chromium.org
e49d533b50 Reapply "Add a level of indirection to exception handler addresses."
Original commit message:

Add a level of indirection to exception handler addresses.

To support deoptimization of exception handlers, the handler address in the
stack is converted to a pair of code object and an index into a separate
table of code offsets.  The index part is invariant under deoptimization.
The index is packed into the handler state field so that handler size does
not change.

R=vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9977 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 13:48:14 +00:00
kmillikin@chromium.org
66ff8828a0 Revert "Add a level of indirection to exception handler addresses."
This reverts r9975.  This change broke (at least) snapshots on x64.

TBR=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 13:13:35 +00:00
kmillikin@chromium.org
1635117db9 Add a level of indirection to exception handler addresses.
To support deoptimization of exception handlers, the handler address in the
stack is converted to a pair of code object and an index into a separate
table of code offsets.  The index part is invariant under deoptimization.
The index is packed into the handler state field so that handler size does
not change.

R=vegorov@chromium.org,fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9975 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 12:51:42 +00:00
svenpanne@chromium.org
b16e02e823 Made PropertyType handling even more explicit.
Replaced FIRST_PHANTOM_PROPERTY_TYPE by a predicate. Removed the (hopefully)
last default cases for switches on PropertyType. Benchmarks show that both
changes are performace-neutral.

Now every value of PropertyType should either be handled by an explicit case in
a switch or by an equality operator. Therefore, the C++ compiler should finally
be able to tell us which places to touch when changing PropertyType.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 12:47:15 +00:00
svenpanne@chromium.org
36b715b1bd Refactoring only: Make the handling of PropertyType more explicit.
Do not rely on 'default' clauses or 'if's when analysing a PropertyType, because
this makes it hard to find the relevant places when a new type is added. Note
that the detection of "phantom property types" is left untouched, because this
might have a performance impact, especially for the GC (to be investigated).

This is a preliminary step for introducing a new kind of map transition.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9900 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 08:42:13 +00:00
mstarzinger@chromium.org
79cadcc947 Fix Harmony sets and maps to allow null as key.
This changes the internal convention for marking deleted entries in hash
tables from null_value to the_hole_value, which is consistent with other
usages of the_hole.

R=rossberg@chromium.org,kmillikin@chromium.org
BUG=v8:1622
TEST=mjsunit/harmony/collections

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 14:17:05 +00:00
keuchel@chromium.org
7385fef2ca Cleanup ScopeInfo and SerializedScopeInfo.
Both classes have been merged into a single ScopeInfo
class that implements the functionality from both.

This CL does not adapt the broken gdb-jit interface.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 10:36:55 +00:00
kmillikin@chromium.org
0df252b38b Handlify the remaining CallStubCompiler functions.
Also, handlify functions for loading with interceptors and callbacks.
Remove some unneeded code.  Rename Foreign::address() because it
confusingly shadows HeapObject::address() which does something quite
different.

R=vegorov@chromium.org,ulan@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 12:37:29 +00:00
mstarzinger@chromium.org
622d35dc0e Implement Harmony sets and maps.
This implementation extends the internal ObjectHashTable to be able to
hold arbitrary objects (e.g. Smis, Strings, ...) as keys by applying
specialized hashing functions to primitive types. Equality of keys is
defined using the internal SameValue function.

R=rossberg@chromium.org
BUG=v8:1622
TEST=mjsunit/harmony/collections

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9777 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 14:14:56 +00:00
erik.corry@gmail.com
f6fef24118 Move some heap verification code in under the --verify-heap flag to speed
up debug mode tests.
Review URL: http://codereview.chromium.org/8381040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 13:27:46 +00:00
keuchel@chromium.org
c6464d500b Replace boolean indications of strict mode by an enum value.
Review URL: http://codereview.chromium.org/8344082

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 07:47:22 +00:00
vegorov@chromium.org
af876ee474 Avoid incremental marking write-barrier when constructing descriptor arrays.
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:32:38 +00:00
danno@chromium.org
f7563019c7 Add flag to trace element kind transitions
Currently only traces transitions from generated ia32 code.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 09:38:24 +00:00
danno@chromium.org
e5f23399b4 Support array literals with FAST_DOUBLE_ELEMENTS ElementsKind.
BUG=none
TEST=test/mjsunit/array-literal.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 11:36:55 +00:00
sgjesse@chromium.org
a58c963c67 Reapply "Support for precise stepping in functions compiled before debugging was started (step 2)"
This is reapplying r9501 with this single change which seemed to be causing most (all) of the failures for r9501.

--- a/src/debug.cc
+++ b/src/debug.cc
@@ -2230,6 +2230,7 @@ Debugger::Debugger(Isolate* isolate)
       compiling_natives_(false),
       is_loading_debugger_(false),
       never_unload_debugger_(false),
+      force_debugger_active_(true),
       message_handler_(NULL),
       debugger_unload_pending_(false),
       host_dispatch_handler_(NULL),

R=kmillikin@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9684 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 13:40:33 +00:00
fschneider@chromium.org
456e5e00c3 Fix assert by reordering the initialization of the arguments boilerplate.
If a GC happened during initialization (when allocating the elements array)
of the non_strict_arguments_boilerplate, heap verification would fail with the following assert:

ASSERT_EQ((map()->has_fast_elements() || map()->has_fast_smi_only_elements()),
            (elements()->map() == GetHeap()->fixed_array_map() ||
             elements()->map() == GetHeap()->fixed_cow_array_map()));

This was not harmful since the boilerplate was setup 
correctly immediatly afterwards.


Simplified the setup code by removing a call to GetElementsTransitionMap. It always return the same map as 
the input object in this case and is therefore unnecessary.


Added more assertions to verify well-formed non-strict
arguments backing store.

BUG=v8:1520
TEST=no more flaky tests with failing this assert.
 
Review URL: http://codereview.chromium.org/8336021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 11:32:57 +00:00
lrn@chromium.org
5152d2e0da Reimplement Function.prototype.bind.
Make instanceof work correctly.

BUG=v8:893

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 12:44:16 +00:00
yangguo@chromium.org
b095a94b85 Adding missing hole check to FixedDoubleArray::Initialize
Review URL: http://codereview.chromium.org/8281001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9615 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-13 16:36:20 +00:00
erik.corry@gmail.com
1cca5468aa Remove some asserts to speed up debug mode.
Review URL: http://codereview.chromium.org/8256012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-13 11:50:00 +00:00
danno@chromium.org
3b07abbdbe Activate smi-only optimizations for large array literals.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9553 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-10 08:31:06 +00:00
lrn@chromium.org
ebc0f85e40 Revert "Added ability to lock strings to prevent their representation or encoding from changing."
This reverts r9424.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9529 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-05 11:09:34 +00:00
mstarzinger@chromium.org
d8d7d2d33f Remove some obsolete GC-safe accessors.
R=yangguo@chromium.org
BUG=v8:1490

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-05 08:12:36 +00:00
mstarzinger@chromium.org
2fb58638a6 Fix verification of weak maps during initialization.
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-04 15:54:57 +00:00
lrn@chromium.org
8e31371d0e Move logic for hidden properties into the JSObject.
Previously, the logic using the hidden properties backing object was
spread accross use sites. Now it's all contained in JSObject, with
only simple accessors available.
Also change the backing object to be a StringDictionary rather than a JSObject.
There's still room for improvement by making a hash-table that don't
store property details as well.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-04 07:45:25 +00:00
sgjesse@chromium.org
08a85de703 Revert "Support for precise stepping in functions compiled before debugging was started (step 2)"
TBR=kmillikin@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-01 08:47:12 +00:00
sgjesse@chromium.org
b2ebc91f5c Reapply "Support for precise stepping in functions compiled before debugging was started (step 2)"
This is to get a clean run in the buildbot.

TBR=kmillikin@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-01 05:39:14 +00:00
sgjesse@chromium.org
083275715a Revert "Support for precise stepping in functions compiled before debugging was started (step 2)"
This reverts commits r9499, r9497 and r9489.

Then changed caused a number of failures.

TBR=kmillikin@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9500 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 13:27:38 +00:00
mstarzinger@chromium.org
b5be9fa83a Fix map modification in transition tree traversal.
While traversing the transition tree we build a work-list using the map
field of maps. Setting those map values with a write barrier causes
black-to-gray changes on maps which are currently not recognized as
such, hence their computed size might be off.

R=vegorov@chromium.org
BUG=v8:1672
TEST=cctest/test-decls/Present

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9498 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 13:03:48 +00:00
sgjesse@chromium.org
de7b222e36 Support for precise stepping in functions compiled before debugging was started (step 2)
This change will ensure that full code with debug break slots is compiled and activated for all functions which already have activation frames.

This additional handling is only for functions which have activations on the stack, and that activation is of the full code compiled without debug break slots. In that case the full code is recompiled with debug break slots. It is ensured that the full code is compiled generating the exact same instructions - except for the additional debug break slots - as before. The return address on the stack is then patched to continue execution in the new code.

Also fixed SortedListBSearch to actually use the passed comparision function.

R=svenpanne@chromium.org, kmillikin@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 08:39:56 +00:00
erik.corry@gmail.com
bbcafaa2d5 Make sure we don't flush the pregenerated stubs, since they need
to be always present, so that we can call them from other stubs
without trying to generate stubs while we are generating stubs.
Review URL: http://codereview.chromium.org/8052029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-28 10:32:12 +00:00
kmillikin@chromium.org
bcb781d76a Record function call targets, use them for inlining.
Introduce a version of the CallFunctionStub that records monomorphic
call targets in a one-element cache in the instruction stream.  Use
the cache for inlining attempts in the optimizing backend.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-27 11:42:02 +00:00
lrn@chromium.org
172c27a6ba Added ability to lock strings to prevent their representation or encoding from changing.
Use string locking to ensure consistent representation of source string during JSON parsing.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9424 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-26 11:14:41 +00:00
rossberg@chromium.org
3df2602037 Handle function proxies as getters/setters.
R=kmillikin@chromium.org
BUG=v8:1543
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 17:12:41 +00:00
rossberg@chromium.org
d938560d59 Implement identity hashes for proxies.
R=mstarzinger@chromium.org
BUG=v8:1543,v8:1565
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9396 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 13:54:53 +00:00
danno@chromium.org
f48c9f6557 Basic support for tracking smi-only arrays on ia32.
Activated by the flag --smi-only-arrays

Currently not crankshaft support, using flag on non-ia32 platforms will lead to write barrier misses and crashes.

BUG=none
TEST=elements_kind.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 11:30:04 +00:00
rossberg@chromium.org
e04d0b23a8 Make integer indexed properties ("elements") work for proxies.
Rehome some Object/JSReceiver/JSObject methods.

R=ricow@chromium.org,kmillikin@chromium.org
BUG=v8:1543
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 10:45:37 +00:00
rossberg@chromium.org
fdade92c20 Reorganize object type enum, such that proxies are no longer in the middle
of the range of proper JS objects.

Unfortunately, callable types no longer form a range now. However, there
are only two anyway. We put them at either end of the range of JS object
types so that certain compares can be combined.

R=erik.corry@gmail.com,kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 14:46:54 +00:00
fschneider@chromium.org
fdaadb78d6 Landing for miket@chromium.org: Add an optional source length field to the Extension constructor.
Original code review: http://codereview.chromium.org/7889046/
Review URL: http://codereview.chromium.org/7978028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 13:28:09 +00:00