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

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
« no previous file with comments | « runtime/vm/code_descriptors_test.cc ('k') | runtime/vm/code_generator_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index e66fd701992f80324c57297194cfd372cdbff386..0a207de71a5df68920f4bbeb5741de86c09a8019 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -148,7 +148,7 @@ DEFINE_RUNTIME_ENTRY(AllocateArray, 2) {
// Helper returning the token position of the Dart caller.
-static intptr_t GetCallerLocation() {
+static TokenPosition GetCallerLocation() {
DartFrameIterator iterator;
StackFrame* caller_frame = iterator.NextFrame();
ASSERT(caller_frame != NULL);
@@ -208,7 +208,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 TokenPosition location = GetCallerLocation();
String& bound_error_message = String::Handle(
String::New(bound_error.ToErrorCString()));
Exceptions::CreateAndThrowTypeError(
@@ -247,7 +247,7 @@ DEFINE_RUNTIME_ENTRY(InstantiateTypeArguments, 2) {
&bound_error);
if (!bound_error.IsNull()) {
// Throw a dynamic type error.
- const intptr_t location = GetCallerLocation();
+ const TokenPosition location = GetCallerLocation();
String& bound_error_message = String::Handle(
String::New(bound_error.ToErrorCString()));
Exceptions::CreateAndThrowTypeError(
@@ -476,7 +476,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 TokenPosition location = GetCallerLocation();
String& bound_error_message = String::Handle(
String::New(bound_error.ToErrorCString()));
Exceptions::CreateAndThrowTypeError(
@@ -523,7 +523,7 @@ DEFINE_RUNTIME_ENTRY(TypeCheck, 5) {
}
if (!is_instance_of) {
// Throw a dynamic type error.
- const intptr_t location = GetCallerLocation();
+ const TokenPosition 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();
@@ -576,7 +576,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 TokenPosition location = GetCallerLocation();
const Instance& src_instance = Instance::CheckedHandle(arguments.ArgAt(0));
if (src_instance.IsNull()) {
@@ -613,7 +613,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 TokenPosition location = GetCallerLocation();
const Instance& src_value = Instance::CheckedHandle(arguments.ArgAt(0));
const String& dst_name = String::CheckedHandle(arguments.ArgAt(1));
const AbstractType& dst_type =
@@ -1381,7 +1381,7 @@ DEFINE_RUNTIME_ENTRY(StackOverflow, 0) {
// Variable locations and number are unknown when precompiling.
const int num_vars =
FLAG_precompilation ? 0 : frame->NumLocalVariables();
- intptr_t unused;
+ TokenPosition unused = TokenPosition::kNoSource;
for (intptr_t v = 0; v < num_vars; v++) {
frame->VariableAt(v, &var_name, &unused, &unused, &var_value);
}
« no previous file with comments | « runtime/vm/code_descriptors_test.cc ('k') | runtime/vm/code_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698