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

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') | no next file with comments »
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 434143b30e3de86ec39258dcad8448464867184f..dd7acd86c766b070cbe19073250c2e59b1d41213 100644
--- a/runtime/lib/errors.cc
+++ b/runtime/lib/errors.cc
@@ -23,10 +23,10 @@ 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 TokenPosition assertion_start =
+ TokenPosition(Smi::CheckedHandle(arguments->NativeArgAt(0)).Value());
+ const TokenPosition assertion_end =
+ TokenPosition(Smi::CheckedHandle(arguments->NativeArgAt(1)).Value());
const Array& args = Array::Handle(Array::New(4));
@@ -66,7 +66,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 TokenPosition location =
+ TokenPosition(Smi::CheckedHandle(arguments->NativeArgAt(0)).Value());
const Instance& src_value =
Instance::CheckedHandle(arguments->NativeArgAt(1));
const String& dst_type_name =
@@ -87,7 +88,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();
+ TokenPosition fallthrough_pos = TokenPosition(smi_pos.Value());
const Array& args = Array::Handle(Array::New(2));
@@ -113,7 +114,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();
+ TokenPosition error_pos = TokenPosition(smi_pos.Value());
const Array& args = Array::Handle(Array::New(3));
« no previous file with comments | « no previous file | runtime/lib/mirrors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698