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

Side by Side Diff: src/runtime/runtime-typedarray.cc

Issue 1122033002: Migrate error messages, part 7. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase 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/runtime/runtime-internal.cc ('k') | src/typedarray.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/messages.h"
8 #include "src/runtime/runtime.h" 9 #include "src/runtime/runtime.h"
9 #include "src/runtime/runtime-utils.h" 10 #include "src/runtime/runtime-utils.h"
10 11
11 12
12 namespace v8 { 13 namespace v8 {
13 namespace internal { 14 namespace internal {
14 15
15 void Runtime::SetupArrayBuffer(Isolate* isolate, 16 void Runtime::SetupArrayBuffer(Isolate* isolate,
16 Handle<JSArrayBuffer> array_buffer, 17 Handle<JSArrayBuffer> array_buffer,
17 bool is_external, void* data, 18 bool is_external, void* data,
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 // Set from non-typed array. 393 // Set from non-typed array.
393 TYPED_ARRAY_SET_NON_TYPED_ARRAY = 3 394 TYPED_ARRAY_SET_NON_TYPED_ARRAY = 3
394 }; 395 };
395 396
396 397
397 RUNTIME_FUNCTION(Runtime_TypedArraySetFastCases) { 398 RUNTIME_FUNCTION(Runtime_TypedArraySetFastCases) {
398 HandleScope scope(isolate); 399 HandleScope scope(isolate);
399 DCHECK(args.length() == 3); 400 DCHECK(args.length() == 3);
400 if (!args[0]->IsJSTypedArray()) { 401 if (!args[0]->IsJSTypedArray()) {
401 THROW_NEW_ERROR_RETURN_FAILURE( 402 THROW_NEW_ERROR_RETURN_FAILURE(
402 isolate, 403 isolate, NewTypeError(MessageTemplate::kNotTypedArray));
403 NewTypeError("not_typed_array", HandleVector<Object>(NULL, 0)));
404 } 404 }
405 405
406 if (!args[1]->IsJSTypedArray()) 406 if (!args[1]->IsJSTypedArray())
407 return Smi::FromInt(TYPED_ARRAY_SET_NON_TYPED_ARRAY); 407 return Smi::FromInt(TYPED_ARRAY_SET_NON_TYPED_ARRAY);
408 408
409 CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, target_obj, 0); 409 CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, target_obj, 0);
410 CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, source_obj, 1); 410 CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, source_obj, 1);
411 CONVERT_NUMBER_ARG_HANDLE_CHECKED(offset_obj, 2); 411 CONVERT_NUMBER_ARG_HANDLE_CHECKED(offset_obj, 2);
412 412
413 Handle<JSTypedArray> target(JSTypedArray::cast(*target_obj)); 413 Handle<JSTypedArray> target(JSTypedArray::cast(*target_obj));
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 DATA_VIEW_SETTER(Uint16, uint16_t) 719 DATA_VIEW_SETTER(Uint16, uint16_t)
720 DATA_VIEW_SETTER(Int16, int16_t) 720 DATA_VIEW_SETTER(Int16, int16_t)
721 DATA_VIEW_SETTER(Uint32, uint32_t) 721 DATA_VIEW_SETTER(Uint32, uint32_t)
722 DATA_VIEW_SETTER(Int32, int32_t) 722 DATA_VIEW_SETTER(Int32, int32_t)
723 DATA_VIEW_SETTER(Float32, float) 723 DATA_VIEW_SETTER(Float32, float)
724 DATA_VIEW_SETTER(Float64, double) 724 DATA_VIEW_SETTER(Float64, double)
725 725
726 #undef DATA_VIEW_SETTER 726 #undef DATA_VIEW_SETTER
727 } 727 }
728 } // namespace v8::internal 728 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime/runtime-internal.cc ('k') | src/typedarray.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698