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

Side by Side Diff: src/elements.cc

Issue 1118273004: Migrate error messages, part 8. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « src/arraybuffer.js ('k') | src/factory.h » ('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/v8.h" 5 #include "src/v8.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/elements.h" 9 #include "src/elements.h"
10 #include "src/messages.h"
10 #include "src/objects.h" 11 #include "src/objects.h"
11 #include "src/utils.h" 12 #include "src/utils.h"
12 13
13 // Each concrete ElementsAccessor can handle exactly one ElementsKind, 14 // Each concrete ElementsAccessor can handle exactly one ElementsKind,
14 // several abstract ElementsAccessor classes are used to allow sharing 15 // several abstract ElementsAccessor classes are used to allow sharing
15 // common code. 16 // common code.
16 // 17 //
17 // Inheritance hierarchy: 18 // Inheritance hierarchy:
18 // - ElementsAccessorBase (abstract) 19 // - ElementsAccessorBase (abstract)
19 // - FastElementsAccessor (abstract) 20 // - FastElementsAccessor (abstract)
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 key->IsString() && String::cast(element)->Equals(String::cast(key))) { 135 key->IsString() && String::cast(element)->Equals(String::cast(key))) {
135 return true; 136 return true;
136 } 137 }
137 } 138 }
138 return false; 139 return false;
139 } 140 }
140 141
141 142
142 MUST_USE_RESULT 143 MUST_USE_RESULT
143 static MaybeHandle<Object> ThrowArrayLengthRangeError(Isolate* isolate) { 144 static MaybeHandle<Object> ThrowArrayLengthRangeError(Isolate* isolate) {
144 THROW_NEW_ERROR(isolate, NewRangeError("invalid_array_length", 145 THROW_NEW_ERROR(isolate, NewRangeError(MessageTemplate::kInvalidArrayLength),
145 HandleVector<Object>(NULL, 0)),
146 Object); 146 Object);
147 } 147 }
148 148
149 149
150 static void CopyObjectToObjectElements(FixedArrayBase* from_base, 150 static void CopyObjectToObjectElements(FixedArrayBase* from_base,
151 ElementsKind from_kind, 151 ElementsKind from_kind,
152 uint32_t from_start, 152 uint32_t from_start,
153 FixedArrayBase* to_base, 153 FixedArrayBase* to_base,
154 ElementsKind to_kind, uint32_t to_start, 154 ElementsKind to_kind, uint32_t to_start,
155 int raw_copy_size) { 155 int raw_copy_size) {
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1851 UNREACHABLE(); 1851 UNREACHABLE();
1852 break; 1852 break;
1853 } 1853 }
1854 1854
1855 array->set_elements(*elms); 1855 array->set_elements(*elms);
1856 array->set_length(Smi::FromInt(number_of_elements)); 1856 array->set_length(Smi::FromInt(number_of_elements));
1857 return array; 1857 return array;
1858 } 1858 }
1859 1859
1860 } } // namespace v8::internal 1860 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arraybuffer.js ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698