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

Unified Diff: runtime/vm/object_test.cc

Issue 2463083002: Remove default monomorphic check code from functions and stubs that do not need it. (Closed)
Patch Set: address comment Created 4 years, 1 month 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/object_test.cc
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index 86852f41562ec11f98262d59e7196e93f5ce9c8d..0cd21eaf6006a7a421018be5cecdc3b2bfd232c9 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -2721,9 +2721,8 @@ 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.UncheckedEntryPoint();
- EXPECT_EQ(instructions.raw(),
- Instructions::FromUncheckedEntryPoint(entry_point));
+ uword payload_start = instructions.PayloadStart();
+ EXPECT_EQ(instructions.raw(), Instructions::FromPayloadStart(payload_start));
const Object& result = Object::Handle(
DartEntry::InvokeFunction(function, Array::empty_array()));
EXPECT_EQ(1, Smi::Cast(result).Value());
@@ -2740,11 +2739,10 @@ 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.UncheckedEntryPoint();
- EXPECT_EQ(instructions.raw(),
- Instructions::FromUncheckedEntryPoint(entry_point));
+ uword payload_start = instructions.PayloadStart();
+ EXPECT_EQ(instructions.raw(), Instructions::FromPayloadStart(payload_start));
// Try writing into the generated code, expected to crash.
- *(reinterpret_cast<char*>(entry_point) + 1) = 1;
+ *(reinterpret_cast<char*>(payload_start) + 1) = 1;
if (!FLAG_write_protect_code) {
// Since this test is expected to crash, crash if write protection of code
// is switched off.
« runtime/vm/object.h ('K') | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698