Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Unified Diff: src/builtins.cc

Issue 10387130: Always transition empty FAST_DOUBLE_ARRAYs on push (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-128018.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
diff --git a/src/builtins.cc b/src/builtins.cc
index 6d1c6a978599a96720b6e259469681ddf3c70f7e..5d4b2b410190ba375e7db8ae394d8f3b5b55394c 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -413,13 +413,13 @@ static inline MaybeObject* EnsureJSArrayWithWritableFastElements(
Map* map = elms->map();
if (map == heap->fixed_array_map()) {
if (array->HasFastElements()) return elms;
+ if (array->HasFastDoubleElements()) {
+ ASSERT(elms == heap->empty_fixed_array());
+ MaybeObject* maybe_transition =
+ array->TransitionElementsKind(FAST_ELEMENTS);
+ if (maybe_transition->IsFailure()) return maybe_transition;
Michael Starzinger 2012/05/15 15:38:13 At this point we know that the array has FAST_ELEM
+ }
if (args == NULL) {
Michael Starzinger 2012/05/15 15:38:13 Can we merge that into line 415 like the following
- if (array->HasFastDoubleElements()) {
- ASSERT(elms == heap->empty_fixed_array());
- MaybeObject* maybe_transition =
- array->TransitionElementsKind(FAST_ELEMENTS);
- if (maybe_transition->IsFailure()) return maybe_transition;
- }
return elms;
}
} else if (map == heap->fixed_cow_array_map()) {
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-128018.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698