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

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

Issue 1130783002: Migrate error messages, part 9. (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/objects.cc ('k') | src/runtime/runtime-internal.cc » ('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 <stdlib.h> 5 #include <stdlib.h>
6 #include <limits> 6 #include <limits>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/arguments.h" 10 #include "src/arguments.h"
11 #include "src/debug.h" 11 #include "src/debug.h"
12 #include "src/messages.h"
12 #include "src/runtime/runtime.h" 13 #include "src/runtime/runtime.h"
13 #include "src/runtime/runtime-utils.h" 14 #include "src/runtime/runtime-utils.h"
14 15
15 16
16 namespace v8 { 17 namespace v8 {
17 namespace internal { 18 namespace internal {
18 19
19 20
20 RUNTIME_FUNCTION(Runtime_ThrowNonMethodError) { 21 RUNTIME_FUNCTION(Runtime_ThrowNonMethodError) {
21 HandleScope scope(isolate); 22 HandleScope scope(isolate);
22 DCHECK(args.length() == 0); 23 DCHECK(args.length() == 0);
23 THROW_NEW_ERROR_RETURN_FAILURE( 24 THROW_NEW_ERROR_RETURN_FAILURE(
24 isolate, NewReferenceError("non_method", HandleVector<Object>(NULL, 0))); 25 isolate, NewReferenceError(MessageTemplate::kNonMethod));
25 }
26
27
28 static Object* ThrowUnsupportedSuper(Isolate* isolate) {
29 THROW_NEW_ERROR_RETURN_FAILURE(
30 isolate,
31 NewReferenceError("unsupported_super", HandleVector<Object>(NULL, 0)));
32 } 26 }
33 27
34 28
35 RUNTIME_FUNCTION(Runtime_ThrowUnsupportedSuperError) { 29 RUNTIME_FUNCTION(Runtime_ThrowUnsupportedSuperError) {
36 HandleScope scope(isolate); 30 HandleScope scope(isolate);
37 DCHECK(args.length() == 0); 31 DCHECK(args.length() == 0);
38 return ThrowUnsupportedSuper(isolate); 32 THROW_NEW_ERROR_RETURN_FAILURE(
33 isolate, NewReferenceError(MessageTemplate::kUnsupportedSuper));
39 } 34 }
40 35
41 36
42 RUNTIME_FUNCTION(Runtime_ThrowConstructorNonCallableError) { 37 RUNTIME_FUNCTION(Runtime_ThrowConstructorNonCallableError) {
43 HandleScope scope(isolate); 38 HandleScope scope(isolate);
44 DCHECK(args.length() == 0); 39 DCHECK(args.length() == 0);
45 THROW_NEW_ERROR_RETURN_FAILURE( 40 THROW_NEW_ERROR_RETURN_FAILURE(
46 isolate, 41 isolate, NewTypeError(MessageTemplate::kConstructorNonCallable));
47 NewTypeError("constructor_noncallable", HandleVector<Object>(NULL, 0)));
48 } 42 }
49 43
50 44
51 RUNTIME_FUNCTION(Runtime_ThrowArrayNotSubclassableError) { 45 RUNTIME_FUNCTION(Runtime_ThrowArrayNotSubclassableError) {
52 HandleScope scope(isolate); 46 HandleScope scope(isolate);
53 DCHECK(args.length() == 0); 47 DCHECK(args.length() == 0);
54 THROW_NEW_ERROR_RETURN_FAILURE( 48 THROW_NEW_ERROR_RETURN_FAILURE(
55 isolate, 49 isolate, NewTypeError(MessageTemplate::kArrayNotSubclassable));
56 NewTypeError("array_not_subclassable", HandleVector<Object>(NULL, 0)));
57 } 50 }
58 51
59 52
60 static Object* ThrowStaticPrototypeError(Isolate* isolate) { 53 static Object* ThrowStaticPrototypeError(Isolate* isolate) {
61 THROW_NEW_ERROR_RETURN_FAILURE( 54 THROW_NEW_ERROR_RETURN_FAILURE(
62 isolate, NewTypeError("static_prototype", HandleVector<Object>(NULL, 0))); 55 isolate, NewTypeError("static_prototype", HandleVector<Object>(NULL, 0)));
63 } 56 }
64 57
65 58
66 RUNTIME_FUNCTION(Runtime_ThrowStaticPrototypeError) { 59 RUNTIME_FUNCTION(Runtime_ThrowStaticPrototypeError) {
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 return nullptr; 458 return nullptr;
466 } 459 }
467 460
468 461
469 RUNTIME_FUNCTION(Runtime_CallSuperWithSpread) { 462 RUNTIME_FUNCTION(Runtime_CallSuperWithSpread) {
470 UNIMPLEMENTED(); 463 UNIMPLEMENTED();
471 return nullptr; 464 return nullptr;
472 } 465 }
473 } 466 }
474 } // namespace v8::internal 467 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698