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

Unified Diff: runtime/vm/object_test.cc

Issue 2226893002: Optimize AOT's switchable calls for the monomorphic case. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 4 years, 4 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/object_service.cc ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_test.cc
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index 05ddd32d1dbad48878a9551ee1e3f4d21abd717f..52ab4260b6472ff0789f2afc1b5b522056a8feea 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -2713,8 +2713,9 @@ VM_TEST_CASE(Code) {
Code& code = Code::Handle(Code::FinalizeCode(function, &_assembler_));
function.AttachCode(code);
const Instructions& instructions = Instructions::Handle(code.instructions());
- uword entry_point = instructions.EntryPoint();
- EXPECT_EQ(instructions.raw(), Instructions::FromEntryPoint(entry_point));
+ uword entry_point = instructions.UncheckedEntryPoint();
+ EXPECT_EQ(instructions.raw(),
+ Instructions::FromUncheckedEntryPoint(entry_point));
const Object& result = Object::Handle(
DartEntry::InvokeFunction(function, Array::empty_array()));
EXPECT_EQ(1, Smi::Cast(result).Value());
@@ -2731,8 +2732,9 @@ VM_TEST_CASE(CodeImmutability) {
Code& code = Code::Handle(Code::FinalizeCode(function, &_assembler_));
function.AttachCode(code);
Instructions& instructions = Instructions::Handle(code.instructions());
- uword entry_point = instructions.EntryPoint();
- EXPECT_EQ(instructions.raw(), Instructions::FromEntryPoint(entry_point));
+ uword entry_point = instructions.UncheckedEntryPoint();
+ EXPECT_EQ(instructions.raw(),
+ Instructions::FromUncheckedEntryPoint(entry_point));
// Try writing into the generated code, expected to crash.
*(reinterpret_cast<char*>(entry_point) + 1) = 1;
if (!FLAG_write_protect_code) {
« no previous file with comments | « runtime/vm/object_service.cc ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698