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

Unified Diff: runtime/vm/code_generator.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
Index: runtime/vm/code_generator.cc
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index d0cdd74ee6410e7b0b1335c0d9f07793ca6d703f..f8569559b0ebb6d0bc5843ee53865e8c8d1dab91 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -147,7 +147,7 @@ DEFINE_RUNTIME_ENTRY(AllocateArray, 2) {
// Helper returning the token position of the Dart caller.
-static intptr_t GetCallerLocation() {
+static TokenDescriptor GetCallerLocation() {
DartFrameIterator iterator;
StackFrame* caller_frame = iterator.NextFrame();
ASSERT(caller_frame != NULL);
@@ -207,7 +207,7 @@ DEFINE_RUNTIME_ENTRY(InstantiateType, 2) {
type = type.InstantiateFrom(instantiator, &bound_error, NULL, Heap::kOld);
if (!bound_error.IsNull()) {
// Throw a dynamic type error.
- const intptr_t location = GetCallerLocation();
+ const TokenDescriptor location = GetCallerLocation();
String& bound_error_message = String::Handle(
String::New(bound_error.ToErrorCString()));
Exceptions::CreateAndThrowTypeError(
@@ -246,7 +246,7 @@ DEFINE_RUNTIME_ENTRY(InstantiateTypeArguments, 2) {
&bound_error);
if (!bound_error.IsNull()) {
// Throw a dynamic type error.
- const intptr_t location = GetCallerLocation();
+ const TokenDescriptor location = GetCallerLocation();
String& bound_error_message = String::Handle(
String::New(bound_error.ToErrorCString()));
Exceptions::CreateAndThrowTypeError(
@@ -475,7 +475,7 @@ DEFINE_RUNTIME_ENTRY(Instanceof, 4) {
}
if (!result.value() && !bound_error.IsNull()) {
// Throw a dynamic type error only if the instanceof test fails.
- const intptr_t location = GetCallerLocation();
+ const TokenDescriptor location = GetCallerLocation();
String& bound_error_message = String::Handle(
String::New(bound_error.ToErrorCString()));
Exceptions::CreateAndThrowTypeError(
@@ -522,7 +522,7 @@ DEFINE_RUNTIME_ENTRY(TypeCheck, 5) {
}
if (!is_instance_of) {
// Throw a dynamic type error.
- const intptr_t location = GetCallerLocation();
+ const TokenDescriptor location = GetCallerLocation();
const AbstractType& src_type = AbstractType::Handle(src_instance.GetType());
String& src_type_name = String::Handle(src_type.UserVisibleName());
String& dst_type_name = String::Handle();
@@ -575,7 +575,7 @@ DEFINE_RUNTIME_ENTRY(TypeCheck, 5) {
// Arg0: bad object.
// Return value: none, throws TypeError or AssertionError.
DEFINE_RUNTIME_ENTRY(NonBoolTypeError, 1) {
- const intptr_t location = GetCallerLocation();
+ const TokenDescriptor location = GetCallerLocation();
const Instance& src_instance = Instance::CheckedHandle(arguments.ArgAt(0));
if (src_instance.IsNull()) {
@@ -612,7 +612,7 @@ DEFINE_RUNTIME_ENTRY(NonBoolTypeError, 1) {
// Arg2: type of destination being assigned to.
// Return value: none, throws an exception.
DEFINE_RUNTIME_ENTRY(BadTypeError, 3) {
- const intptr_t location = GetCallerLocation();
+ const TokenDescriptor location = GetCallerLocation();
const Instance& src_value = Instance::CheckedHandle(arguments.ArgAt(0));
const String& dst_name = String::CheckedHandle(arguments.ArgAt(1));
const AbstractType& dst_type =
@@ -1380,7 +1380,7 @@ DEFINE_RUNTIME_ENTRY(StackOverflow, 0) {
// Variable locations and number are unknown when 'always_optimize'.
const int num_vars =
Compiler::always_optimize() ? 0 : frame->NumLocalVariables();
- intptr_t unused;
+ TokenDescriptor unused = TokenDescriptor::kNoSource;
for (intptr_t v = 0; v < num_vars; v++) {
frame->VariableAt(v, &var_name, &unused, &unused, &var_value);
}

Powered by Google App Engine
This is Rietveld 408576698