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

Unified Diff: runtime/lib/errors.cc

Issue 1644793002: Replace intptr_t with TokenDescriptor (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/lib/mirrors.cc » ('j') | runtime/lib/mirrors.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/errors.cc
diff --git a/runtime/lib/errors.cc b/runtime/lib/errors.cc
index aa985da68c3127bd66d261e8d0542235f45cf91f..16508e55488857eec554999c7febb87d772d1ece 100644
--- a/runtime/lib/errors.cc
+++ b/runtime/lib/errors.cc
@@ -17,10 +17,10 @@ namespace dart {
DEFINE_NATIVE_ENTRY(AssertionError_throwNew, 2) {
// No need to type check the arguments. This function can only be called
// internally from the VM.
- intptr_t assertion_start =
- Smi::CheckedHandle(arguments->NativeArgAt(0)).Value();
- intptr_t assertion_end =
- Smi::CheckedHandle(arguments->NativeArgAt(1)).Value();
+ const TokenDescriptor assertion_start =
+ TokenDescriptor(Smi::CheckedHandle(arguments->NativeArgAt(0)).Value());
+ const TokenDescriptor assertion_end =
+ TokenDescriptor(Smi::CheckedHandle(arguments->NativeArgAt(1)).Value());
const Array& args = Array::Handle(Array::New(4));
@@ -60,7 +60,8 @@ DEFINE_NATIVE_ENTRY(AssertionError_throwNew, 2) {
DEFINE_NATIVE_ENTRY(TypeError_throwNew, 5) {
// No need to type check the arguments. This function can only be called
// internally from the VM.
- intptr_t location = Smi::CheckedHandle(arguments->NativeArgAt(0)).Value();
+ const TokenDescriptor location =
+ TokenDescriptor(Smi::CheckedHandle(arguments->NativeArgAt(0)).Value());
const Instance& src_value =
Instance::CheckedHandle(arguments->NativeArgAt(1));
const String& dst_type_name =
@@ -81,7 +82,7 @@ DEFINE_NATIVE_ENTRY(TypeError_throwNew, 5) {
// Return value: none, throws an exception.
DEFINE_NATIVE_ENTRY(FallThroughError_throwNew, 1) {
GET_NON_NULL_NATIVE_ARGUMENT(Smi, smi_pos, arguments->NativeArgAt(0));
- intptr_t fallthrough_pos = smi_pos.Value();
+ TokenDescriptor fallthrough_pos = TokenDescriptor(smi_pos.Value());
const Array& args = Array::Handle(Array::New(2));
@@ -107,7 +108,7 @@ DEFINE_NATIVE_ENTRY(FallThroughError_throwNew, 1) {
DEFINE_NATIVE_ENTRY(AbstractClassInstantiationError_throwNew, 2) {
GET_NON_NULL_NATIVE_ARGUMENT(Smi, smi_pos, arguments->NativeArgAt(0));
GET_NON_NULL_NATIVE_ARGUMENT(String, class_name, arguments->NativeArgAt(1));
- intptr_t error_pos = smi_pos.Value();
+ TokenDescriptor error_pos = TokenDescriptor(smi_pos.Value());
const Array& args = Array::Handle(Array::New(3));
« no previous file with comments | « no previous file | runtime/lib/mirrors.cc » ('j') | runtime/lib/mirrors.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698