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

Unified Diff: runtime/vm/code_descriptors_test.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.cc ('k') | runtime/vm/code_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_descriptors_test.cc
diff --git a/runtime/vm/code_descriptors_test.cc b/runtime/vm/code_descriptors_test.cc
index 37de3e489f005f8894e75f10b3047e3154e7175c..5f8bb1d0651a891dc2ed47c9e6c2bc8e3467bdf3 100644
--- a/runtime/vm/code_descriptors_test.cc
+++ b/runtime/vm/code_descriptors_test.cc
@@ -18,7 +18,7 @@
namespace dart {
-static const intptr_t kPos = Token::kNoSourcePos;
+static const TokenPosition kPos = TokenPosition::kNoSource;
CODEGEN_TEST_GENERATE(StackmapCodegen, test) {
@@ -293,15 +293,15 @@ TEST_CASE(DescriptorList_TokenPositions) {
33,
5,
5,
- Token::kMinSourcePos,
- Token::kMaxSourcePos,
+ TokenPosition::kMinSourcePos,
+ TokenPosition::kMaxSourcePos,
};
const intptr_t num_token_positions =
sizeof(token_positions) / sizeof(token_positions[0]);
for (intptr_t i = 0; i < num_token_positions; i++) {
descriptors->AddDescriptor(RawPcDescriptors::kRuntimeCall, 0, 0,
- token_positions[i], 0);
+ TokenPosition(token_positions[i]), 0);
}
const PcDescriptors& finalized_descriptors =
@@ -313,11 +313,11 @@ TEST_CASE(DescriptorList_TokenPositions) {
intptr_t i = 0;
while (it.MoveNext()) {
- if (token_positions[i] != it.TokenPos()) {
+ if (token_positions[i] != it.TokenPos().value()) {
OS::Print("[%" Pd "]: Expected: %" Pd " != %" Pd "\n",
- i, token_positions[i], it.TokenPos());
+ i, token_positions[i], it.TokenPos().value());
}
- EXPECT(token_positions[i] == it.TokenPos());
+ EXPECT(token_positions[i] == it.TokenPos().value());
i++;
}
}
@@ -339,8 +339,8 @@ TEST_CASE(CodeSourceMap_TokenPositions) {
33,
5,
5,
- Token::kMinSourcePos,
- Token::kMaxSourcePos,
+ TokenPosition::kMinSourcePos,
+ TokenPosition::kMaxSourcePos,
};
const intptr_t num_token_positions =
sizeof(token_positions) / sizeof(token_positions[0]);
@@ -349,7 +349,7 @@ TEST_CASE(CodeSourceMap_TokenPositions) {
ASSERT(builder != NULL);
for (intptr_t i = 0; i < num_token_positions; i++) {
- builder->AddEntry(i, token_positions[i]);
+ builder->AddEntry(i, TokenPosition(token_positions[i]));
}
const CodeSourceMap& code_Source_map =
@@ -361,11 +361,11 @@ TEST_CASE(CodeSourceMap_TokenPositions) {
uintptr_t i = 0;
while (it.MoveNext()) {
EXPECT(it.PcOffset() == i);
- if (token_positions[i] != it.TokenPos()) {
+ if (token_positions[i] != it.TokenPos().value()) {
OS::Print("[%" Pd "]: Expected: %" Pd " != %" Pd "\n",
- i, token_positions[i], it.TokenPos());
+ i, token_positions[i], it.TokenPos().value());
}
- EXPECT(token_positions[i] == it.TokenPos());
+ EXPECT(token_positions[i] == it.TokenPos().value());
i++;
}
}
« no previous file with comments | « runtime/vm/code_descriptors.cc ('k') | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698