Commit Graph

520 Commits

Author SHA1 Message Date
yangguo@chromium.org
7fc1751821 Make kAsciiDataHintTag have correct semantics for all both 1 and 2 byte string types.
BUG=

Review URL: https://chromiumcodereview.appspot.com/11360251
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12966 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-15 10:29:11 +00:00
jkummerow@chromium.org
1c086d1202 Lattice-based representation inference, powered by left/right specific type feedback for BinaryOps and comparisons
Review URL: https://chromiumcodereview.appspot.com/10837165

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12961 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-14 15:59:45 +00:00
svenpanne@chromium.org
673924413f Re-land rev. 12849 and 12868 (Heavy cleanup of the external pointer API + related fix).
Review URL: https://codereview.chromium.org/11365224

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12945 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-13 12:27:03 +00:00
yangguo@chromium.org
827f8919f4 Reverting r12937.
R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-13 10:36:20 +00:00
yangguo@chromium.org
ce884e13e3 Make kAsciiDataHintTag have correct semantics for all both 1 and 2 byte string types.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-12 14:57:59 +00:00
rossberg@chromium.org
92e783bc28 Minor cleanup and optimisation of element methods.
R=verwaest@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11365175

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12927 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-12 11:08:34 +00:00
svenpanne@chromium.org
09666b60b8 Rollback of r12868, r12849 on bleeding_edge.
Fixed visibility attribute for GetPointerFromInternalField

Heavy cleanup of the external pointer API.

Review URL: https://codereview.chromium.org/11359125

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-09 10:07:54 +00:00
rossberg@chromium.org
fbc6e0d883 Object.observe: generate change records for indexed properties.
Details:
- Extend ElementAccessors with GetAttributes method.
- Add HasLocalElement, Get[Local]ElementAttribute methods to JSReceiver/JSObject.
- Otherwise, mirror implementation for named properties.

Cannot correctly handle the cases yet where an accessor is redefined or deleted.

Also fixed handling of object info table.

(Based on CL https://codereview.chromium.org/11362115/)

R=verwaest@chromium.org,mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11365111

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12900 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 12:58:08 +00:00
yangguo@chromium.org
943c10bb87 Rename kAsciiStringTag to kOneByteStringTag
This is just a rename. After commit, I'll begin with the semantic changes.
Until those are complete, kOneByteStringTag will have the same meaning as
kAsciiStringTag.

BUG=

Review URL: https://chromiumcodereview.appspot.com/11293168
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12897 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 12:14:29 +00:00
mstarzinger@chromium.org
a31889e2de Fix slack tracking when instance prototype changes.
This fixes a corner case when the instance prototype of a function is
changed while inobject slack tracking is still in progress. This caused
the intial map to be unrelated for functions with the same shared info
and hence the shared construct stub is no longer generic enough to work
for all those functions.

R=danno@chromium.org
BUG=chromium:157019
TEST=mjsunit/regress/regress-crbug-157019

Review URL: https://codereview.chromium.org/11293059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12896 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-08 11:56:44 +00:00
rossberg@chromium.org
e059e64c98 Object.observe: include oldValue in change records,
plus more accurate distinction of different change types.

Required handlifying more code.

Also fixed a handlification bug in JSProxy::GetElementAttributeWithHandler.

R=verwaest@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11362115

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-07 14:14:50 +00:00
mstarzinger@chromium.org
c54fc70f13 Store Object.observe state per-isolate rather than per-context
This requires adding a new JSObject to the strong root list and populating it from
object-observe.js. The main other change is that we now directly use ObjectHashTable
from JS rather than using WeakMap, since using the latter would end up leaking whichever
Context initialized that observation state.

Added a test via the API showing that different contexts all end up working on the same state.

Review URL: https://codereview.chromium.org/11274014
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-06 16:47:15 +00:00
rossberg@chromium.org
beaccd74cb Object.observe: implement map bit and functions to access it.
R=danno@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11276028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-06 12:30:22 +00:00
svenpanne@chromium.org
f3807ca17b Heavy cleanup of the external pointer API.
Added highly efficient Object::SetAlignedPointerInInternalField and
Object::GetAlignedPointerFromInternalField functions for 2-byte-aligned
pointers. Their non-aligned counterparts Object::GetPointerFromInternalField and
Object::SetPointerInInternalField are now deprecated utility functions.

External is now a true Value again, with New/Value/Cast using a JSObject with an
internal field containing a Foreign. External::Wrap, and External::Unwrap are now
deprecated utility functions.

Added Context::GetEmbedderData and Context::SetEmbedderData. Deprecated
Context::GetData and Context::SetData, these are now only wrappers to access
internal field 0.

Added highly efficient Context::SetAlignedPointerInEmbedderData and
Context::GetAlignedPointerFromEmbedderData functions for 2-byte-aligned
pointers.

Review URL: https://codereview.chromium.org/11190050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 10:25:32 +00:00
mstarzinger@chromium.org
8133d85955 Fix test failures in r12813.
R=yangguo@chromium.org
BUG=v8:1490

Review URL: https://codereview.chromium.org/11264035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12818 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 13:54:10 +00:00
mstarzinger@chromium.org
b55988625d Get rid of obsolete unchecked accessors.
R=yangguo@chromium.org
BUG=v8:1490

Review URL: https://codereview.chromium.org/11271020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 11:52:37 +00:00
yangguo@chromium.org
3c5e899378 Fix two-char hash to use correct fallback for zero hashes.
R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-22 10:38:40 +00:00
verwaest@chromium.org
a0c9856bce Get the target field index when transitioning.
Review URL: https://chromiumcodereview.appspot.com/11194080

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 10:48:18 +00:00
verwaest@chromium.org
b61933ba10 Eagerly follow transitions to existing maps while json parsing.
Review URL: https://chromiumcodereview.appspot.com/11184006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12747 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-17 14:09:42 +00:00
verwaest@chromium.org
72424b3987 Move DescriptorArray into the map.
Review URL: https://chromiumcodereview.appspot.com/11188031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-17 13:04:49 +00:00
mvstanton@chromium.org
b3c0ed8245 Enable --verify-heap in release mode
R=mstarzinger@chromium.org
BUG=v8:2120

Review URL: https://codereview.chromium.org/11118018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 11:41:14 +00:00
verwaest@chromium.org
ad6a21c0d0 Remove descriptors pointer.
Secondary changes:
- don't transfer ownership back on CNLT
- turned debugging checks back into ASSERT

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12699 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-11 12:01:19 +00:00
verwaest@chromium.org
e5620d5a58 Also use binary search to search through valid entries.
Review URL: https://chromiumcodereview.appspot.com/11028056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-10 14:48:07 +00:00
yangguo@chromium.org
681eda652d Fast path for symbol lookup in JSON.parse.
R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12598 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-24 14:23:46 +00:00
verwaest@chromium.org
8b57f2694b Reduce space usage of simple transitions and descriptors holders.
Review URL: https://chromiumcodereview.appspot.com/10915260

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-19 09:54:10 +00:00
verwaest@chromium.org
5bf15c5d6c Preallocate space in descriptor arrays.
Review URL: https://chromiumcodereview.appspot.com/10916336

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-18 13:25:12 +00:00
verwaest@chromium.org
204d22a583 Moving the WhitenessWitness back to DescriptorArray.
TransitionArrays never allocate while being created.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12519 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 15:10:31 +00:00
verwaest@chromium.org
ebd3241b05 Sharing of descriptor arrays.
This CL adds multiple things:
Transition arrays do not directly point at their descriptor array anymore, but rather do so via an indirect pointer (a JSGlobalPropertyCell).

An ownership bit is added to maps indicating whether it owns its own descriptor array or not.

Maps owning a descriptor array can pass on ownership if a transition from that map is generated; but only if the descriptor array stays exactly the same; or if a descriptor is added.

Maps that don't have ownership get ownership back if their direct child to which ownership was passed is cleared in ClearNonLiveTransitions.

To detect which descriptors in an array are valid, each map knows its own NumberOfOwnDescriptors. Since the descriptors are sorted in order of addition, if we search and find a descriptor with index bigger than this number, it is not valid for the given map.

We currently still build up an enumeration cache (although this may disappear). The enumeration cache is always built for the entire descriptor array, even if not all descriptors are owned by the map. Once a descriptor array has an enumeration cache for a given map; this invariant will always be true, even if the descriptor array was extended. The extended array will inherit the enumeration cache from the smaller descriptor array. If a map with more descriptors needs an enumeration cache, it's EnumLength will still be set to invalid, so it will have to recompute the enumeration cache. This new cache will also be valid for smaller maps since they have their own enumlength; and use this to loop over the cache. If the EnumLength is still invalid, but there is already a cache present that is big enough; we just initialize the EnumLength field for the map.

When we apply ClearNonLiveTransitions and descriptor ownership is passed back to a parent map, the descriptor array is trimmed in-place and resorted. At the same time, the enumeration cache is trimmed in-place.

Only transition arrays contain descriptor arrays. If we transition to a map and pass ownership of the descriptor array along, the child map will not store the descriptor array it owns. Rather its parent will keep the pointer. So for every leaf-map, we find the descriptor array by following the back pointer, reading out the transition array, and fetching the descriptor array from the JSGlobalPropertyCell. If a map has a transition array, we fetch it from there. If a map has undefined as its back-pointer and has no transition array; it is considered to have an empty descriptor array.

When we modify properties, we cannot share the descriptor array. To accommodate this, the child map will get its own transition array; even if there are not necessarily any transitions leaving from the child map. This is necessary since it's the only way to store its own descriptor array.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-12 16:43:57 +00:00
yangguo@chromium.org
6a9e4048aa Introduce new API to expose external string resource regardless of encoding.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-12 11:29:50 +00:00
yangguo@chromium.org
266cca47fc Add more checks for native callback results.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-10 13:38:21 +00:00
rossberg@chromium.org
ccc827a6f8 Allocate block-scoped global bindings to global context.
- The global object has a reference to the current global scope chain.
  Running a script adds to the chain if it contains global lexical declarations.
- Scripts are executed relative to a global, not a native context.
- Harmony let and const bindings are allocated to the innermost global context;
  var and function still live on the global object.
  (Lexical bindings are not reflected on the global object at all,
  but that will probably change later using accessors, as for modules.)
- Compilation of scripts now needs a (global) context (previously only eval did).
- The global scope chain represents one logical scope, so collision tests take
  the chain into account.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-28 11:25:08 +00:00
ulan@chromium.org
b588b0949f Disallow updates to ic_with_type_info_count with negative values.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12386 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 15:17:14 +00:00
verwaest@chromium.org
efb53e1499 Make order of addition the primary order of descriptor arrays.
The order by name is maintained as secondary order by using unused bits in the property details.

This is preliminary work towards sharing descriptors arrays.

The change allows us
- to get rid of the LastAdded bits in the map, binding it to the number of valid descriptors for the given map
- to avoid resorting by enumeration index to create the cache
- (maybe in the future, depending on performance) to get rid of the enumeration cache altogether.

Although generally the number_of_descriptors equals the NumberOfOwnDescriptors in the current version, this is preliminary work towards sharing    descriptors, where maps may have more descriptors than are valid for the map.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12385 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 13:47:34 +00:00
rossberg@chromium.org
cd585f26ab Introduce global contexts to represent lexical global scope(s).
They are yet unused; actual allocation of global lexical bindings in these contexts is implemented in a separate follow-up CL.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 09:40:26 +00:00
danno@chromium.org
3544e2e875 Disable speculative LICM when it may lead to unnecessary deopts
BUG=v8:2250
R=vegorov@chromium.org
TEST=tests/mjsunit/regress/regress-2250.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-23 21:08:58 +00:00
rossberg@chromium.org
55e6227817 Rename JSGlobalProxy::context to native_context,
for clarity and consistency with GlobalObject::native_context.

R=svenpanne@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-20 11:35:50 +00:00
rossberg@chromium.org
984d0b0925 Rename Context::global to Context::global_object,
in preparation for global lexical scope.

R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-17 12:59:00 +00:00
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