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

Side by Side Diff: src/elements.cc

Issue 2481363009: Revert of Compiling an array literal should be context-independent. (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « src/elements.h ('k') | test/inspector/debugger/get-possible-breakpoints-array-literal.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/elements.h" 5 #include "src/elements.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/conversions.h" 8 #include "src/conversions.h"
9 #include "src/factory.h" 9 #include "src/factory.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 // intentionally to avoid ArrayConcat() builtin performance degradation. 966 // intentionally to avoid ArrayConcat() builtin performance degradation.
967 // 967 //
968 // Details: The idea is that allocations actually happen only in case of 968 // Details: The idea is that allocations actually happen only in case of
969 // copying from object with fast double elements to object with object 969 // copying from object with fast double elements to object with object
970 // elements. In all the other cases there are no allocations performed and 970 // elements. In all the other cases there are no allocations performed and
971 // handle creation causes noticeable performance degradation of the builtin. 971 // handle creation causes noticeable performance degradation of the builtin.
972 Subclass::CopyElementsImpl(from, from_start, *to, from_kind, to_start, 972 Subclass::CopyElementsImpl(from, from_start, *to, from_kind, to_start,
973 packed_size, copy_size); 973 packed_size, copy_size);
974 } 974 }
975 975
976 void CopyElements(Handle<FixedArrayBase> source, ElementsKind source_kind,
977 Handle<FixedArrayBase> destination, int size) {
978 Subclass::CopyElementsImpl(*source, 0, *destination, source_kind, 0,
979 kPackedSizeNotKnown, size);
980 }
981
982 Handle<SeededNumberDictionary> Normalize(Handle<JSObject> object) final { 976 Handle<SeededNumberDictionary> Normalize(Handle<JSObject> object) final {
983 return Subclass::NormalizeImpl(object, handle(object->elements())); 977 return Subclass::NormalizeImpl(object, handle(object->elements()));
984 } 978 }
985 979
986 static Handle<SeededNumberDictionary> NormalizeImpl( 980 static Handle<SeededNumberDictionary> NormalizeImpl(
987 Handle<JSObject> object, Handle<FixedArrayBase> elements) { 981 Handle<JSObject> object, Handle<FixedArrayBase> elements) {
988 UNREACHABLE(); 982 UNREACHABLE();
989 return Handle<SeededNumberDictionary>(); 983 return Handle<SeededNumberDictionary>();
990 } 984 }
991 985
(...skipping 2749 matching lines...) Expand 10 before | Expand all | Expand 10 after
3741 insertion_index += len; 3735 insertion_index += len;
3742 } 3736 }
3743 3737
3744 DCHECK_EQ(insertion_index, result_len); 3738 DCHECK_EQ(insertion_index, result_len);
3745 return result_array; 3739 return result_array;
3746 } 3740 }
3747 3741
3748 ElementsAccessor** ElementsAccessor::elements_accessors_ = NULL; 3742 ElementsAccessor** ElementsAccessor::elements_accessors_ = NULL;
3749 } // namespace internal 3743 } // namespace internal
3750 } // namespace v8 3744 } // namespace v8
OLDNEW
« no previous file with comments | « src/elements.h ('k') | test/inspector/debugger/get-possible-breakpoints-array-literal.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698