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

Side by Side Diff: src/elements.cc

Issue 2479123002: Compiling an array literal should be context-independent. (Closed)
Patch Set: rebase 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
976 Handle<SeededNumberDictionary> Normalize(Handle<JSObject> object) final { 982 Handle<SeededNumberDictionary> Normalize(Handle<JSObject> object) final {
977 return Subclass::NormalizeImpl(object, handle(object->elements())); 983 return Subclass::NormalizeImpl(object, handle(object->elements()));
978 } 984 }
979 985
980 static Handle<SeededNumberDictionary> NormalizeImpl( 986 static Handle<SeededNumberDictionary> NormalizeImpl(
981 Handle<JSObject> object, Handle<FixedArrayBase> elements) { 987 Handle<JSObject> object, Handle<FixedArrayBase> elements) {
982 UNREACHABLE(); 988 UNREACHABLE();
983 return Handle<SeededNumberDictionary>(); 989 return Handle<SeededNumberDictionary>();
984 } 990 }
985 991
(...skipping 2749 matching lines...) Expand 10 before | Expand all | Expand 10 after
3735 insertion_index += len; 3741 insertion_index += len;
3736 } 3742 }
3737 3743
3738 DCHECK_EQ(insertion_index, result_len); 3744 DCHECK_EQ(insertion_index, result_len);
3739 return result_array; 3745 return result_array;
3740 } 3746 }
3741 3747
3742 ElementsAccessor** ElementsAccessor::elements_accessors_ = NULL; 3748 ElementsAccessor** ElementsAccessor::elements_accessors_ = NULL;
3743 } // namespace internal 3749 } // namespace internal
3744 } // namespace v8 3750 } // 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