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

Side by Side Diff: runtime/lib/errors.cc

Issue 1584223006: Remove signature classes from the VM. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 4 years, 11 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 | « no previous file | runtime/lib/function.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/bootstrap_natives.h" 5 #include "vm/bootstrap_natives.h"
6 #include "vm/exceptions.h" 6 #include "vm/exceptions.h"
7 #include "vm/object_store.h" 7 #include "vm/object_store.h"
8 #include "vm/runtime_entry.h" 8 #include "vm/runtime_entry.h"
9 #include "vm/stack_frame.h" 9 #include "vm/stack_frame.h"
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 DEFINE_NATIVE_ENTRY(TypeError_throwNew, 5) { 60 DEFINE_NATIVE_ENTRY(TypeError_throwNew, 5) {
61 // No need to type check the arguments. This function can only be called 61 // No need to type check the arguments. This function can only be called
62 // internally from the VM. 62 // internally from the VM.
63 intptr_t location = Smi::CheckedHandle(arguments->NativeArgAt(0)).Value(); 63 intptr_t location = Smi::CheckedHandle(arguments->NativeArgAt(0)).Value();
64 const Instance& src_value = 64 const Instance& src_value =
65 Instance::CheckedHandle(arguments->NativeArgAt(1)); 65 Instance::CheckedHandle(arguments->NativeArgAt(1));
66 const String& dst_type_name = 66 const String& dst_type_name =
67 String::CheckedHandle(arguments->NativeArgAt(2)); 67 String::CheckedHandle(arguments->NativeArgAt(2));
68 const String& dst_name = String::CheckedHandle(arguments->NativeArgAt(3)); 68 const String& dst_name = String::CheckedHandle(arguments->NativeArgAt(3));
69 const String& error_msg = String::CheckedHandle(arguments->NativeArgAt(4)); 69 const String& error_msg = String::CheckedHandle(arguments->NativeArgAt(4));
70 const String& src_type_name = 70 const String& src_type_name = String::Handle(
71 String::Handle(Type::Handle(src_value.GetType()).UserVisibleName()); 71 AbstractType::Handle(src_value.GetType()).UserVisibleName());
72 Exceptions::CreateAndThrowTypeError(location, src_type_name, 72 Exceptions::CreateAndThrowTypeError(location, src_type_name,
73 dst_type_name, dst_name, error_msg); 73 dst_type_name, dst_name, error_msg);
74 UNREACHABLE(); 74 UNREACHABLE();
75 return Object::null(); 75 return Object::null();
76 } 76 }
77 77
78 78
79 // Allocate and throw a new FallThroughError. 79 // Allocate and throw a new FallThroughError.
80 // Arg0: index of the case clause token into which we fall through. 80 // Arg0: index of the case clause token into which we fall through.
81 // Return value: none, throws an exception. 81 // Return value: none, throws an exception.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 // Rethrow an error with a stacktrace. 129 // Rethrow an error with a stacktrace.
130 DEFINE_NATIVE_ENTRY(Async_rethrow, 2) { 130 DEFINE_NATIVE_ENTRY(Async_rethrow, 2) {
131 GET_NON_NULL_NATIVE_ARGUMENT(Instance, error, arguments->NativeArgAt(0)); 131 GET_NON_NULL_NATIVE_ARGUMENT(Instance, error, arguments->NativeArgAt(0));
132 GET_NON_NULL_NATIVE_ARGUMENT(Instance, stacktrace, arguments->NativeArgAt(1)); 132 GET_NON_NULL_NATIVE_ARGUMENT(Instance, stacktrace, arguments->NativeArgAt(1));
133 Exceptions::ReThrow(thread, error, stacktrace); 133 Exceptions::ReThrow(thread, error, stacktrace);
134 return Object::null(); 134 return Object::null();
135 } 135 }
136 136
137 } // namespace dart 137 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698