| Index: runtime/vm/stub_code_arm.cc
|
| diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc
|
| index ab56734911c1f712c25c8e54825d3d953e6a9a22..9d2883b58d65b194d1cb612ba2591b19a494a377 100644
|
| --- a/runtime/vm/stub_code_arm.cc
|
| +++ b/runtime/vm/stub_code_arm.cc
|
| @@ -303,7 +303,7 @@ void StubCode::GenerateCallStaticFunctionStub(Assembler* assembler) {
|
| // calling into the runtime.
|
| __ EnterStubFrame();
|
| // Setup space on stack for return value and preserve arguments descriptor.
|
| - __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ LoadObject(R0, Object::null_object());
|
| __ PushList((1 << R0) | (1 << R4));
|
| __ CallRuntime(kPatchStaticCallRuntimeEntry, 0);
|
| // Get Code object result and restore arguments descriptor array.
|
| @@ -324,7 +324,7 @@ void StubCode::GenerateFixCallersTargetStub(Assembler* assembler) {
|
| // calling into the runtime.
|
| __ EnterStubFrame();
|
| // Setup space on stack for return value and preserve arguments descriptor.
|
| - __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ LoadObject(R0, Object::null_object());
|
| __ PushList((1 << R0) | (1 << R4));
|
| __ CallRuntime(kFixCallersTargetRuntimeEntry, 0);
|
| // Get Code object result and restore arguments descriptor array.
|
| @@ -342,7 +342,7 @@ void StubCode::GenerateFixCallersTargetStub(Assembler* assembler) {
|
| void StubCode::GenerateFixAllocationStubTargetStub(Assembler* assembler) {
|
| __ EnterStubFrame();
|
| // Setup space on stack for return value.
|
| - __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ LoadObject(R0, Object::null_object());
|
| __ Push(R0);
|
| __ CallRuntime(kFixAllocationStubTargetRuntimeEntry, 0);
|
| // Get Code object result.
|
| @@ -360,7 +360,7 @@ void StubCode::GenerateFixAllocationStubTargetStub(Assembler* assembler) {
|
| // FP[kParamEndSlotFromFp + 1]: last argument.
|
| static void PushArgumentsArray(Assembler* assembler) {
|
| // Allocate array to store arguments of caller.
|
| - __ LoadImmediate(R1, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ LoadObject(R1, Object::null_object());
|
| // R1: null element type for raw Array.
|
| // R2: smi-tagged argument count, may be zero.
|
| __ BranchLink(*StubCode::AllocateArray_entry());
|
| @@ -563,7 +563,7 @@ void StubCode::GenerateMegamorphicMissStub(Assembler* assembler) {
|
| // Push the receiver.
|
| // Push IC data object.
|
| // Push arguments descriptor array.
|
| - __ LoadImmediate(IP, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ LoadObject(IP, Object::null_object());
|
| __ PushList((1 << R4) | (1 << R5) | (1 << R6) | (1 << IP));
|
| __ CallRuntime(kMegamorphicCacheMissHandlerRuntimeEntry, 3);
|
| // Remove arguments.
|
| @@ -688,7 +688,7 @@ void StubCode::GenerateAllocateArrayStub(Assembler* assembler) {
|
| // R7: new object end address.
|
| // R9: allocation size.
|
|
|
| - __ LoadImmediate(R4, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ LoadObject(R4, Object::null_object());
|
| __ mov(R5, Operand(R4));
|
| __ AddImmediate(R6, R0, sizeof(RawArray) - kHeapObjectTag);
|
| __ InitializeFieldsNoBarrier(R0, R6, R7, R4, R5);
|
| @@ -701,7 +701,7 @@ void StubCode::GenerateAllocateArrayStub(Assembler* assembler) {
|
| // Create a stub frame as we are pushing some objects on the stack before
|
| // calling into the runtime.
|
| __ EnterStubFrame();
|
| - __ LoadImmediate(IP, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ LoadObject(IP, Object::null_object());
|
| // Setup space on stack for return value.
|
| // Push array length as Smi and element type.
|
| __ PushList((1 << R1) | (1 << R2) | (1 << IP));
|
| @@ -914,7 +914,7 @@ void StubCode::GenerateAllocateContextStub(Assembler* assembler) {
|
| // R2: object size.
|
| // R3: next object start.
|
| // R6: allocation stats address.
|
| - __ LoadImmediate(R4, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ LoadObject(R4, Object::null_object());
|
| __ InitializeFieldNoBarrier(R0, FieldAddress(R0, Context::parent_offset()),
|
| R4);
|
|
|
| @@ -940,7 +940,7 @@ void StubCode::GenerateAllocateContextStub(Assembler* assembler) {
|
| // calling into the runtime.
|
| __ EnterStubFrame();
|
| // Setup space on stack for return value.
|
| - __ LoadImmediate(R2, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ LoadObject(R2, Object::null_object());
|
| __ SmiTag(R1);
|
| __ PushList((1 << R1) | (1 << R2));
|
| __ CallRuntime(kAllocateContextRuntimeEntry, 1); // Allocate context.
|
| @@ -1086,7 +1086,7 @@ void StubCode::GenerateAllocationStubForClass(
|
| __ add(R0, R0, Operand(kHeapObjectTag));
|
|
|
| // Initialize the remaining words of the object.
|
| - __ LoadImmediate(R2, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ LoadObject(R2, Object::null_object());
|
|
|
| // R2: raw null.
|
| // R0: new object (tagged).
|
| @@ -1144,7 +1144,7 @@ void StubCode::GenerateAllocationStubForClass(
|
| // Create a stub frame as we are pushing some objects on the stack before
|
| // calling into the runtime.
|
| __ EnterStubFrame(); // Uses pool pointer to pass cls to runtime.
|
| - __ LoadImmediate(R2, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ LoadObject(R2, Object::null_object());
|
| __ Push(R2); // Setup space on stack for return value.
|
| __ PushObject(cls); // Push class of object to be allocated.
|
| if (is_cls_parameterized) {
|
| @@ -1184,7 +1184,7 @@ void StubCode::GenerateCallClosureNoSuchMethodStub(Assembler* assembler) {
|
| // Push space for the return value.
|
| // Push the receiver.
|
| // Push arguments descriptor array.
|
| - __ LoadImmediate(IP, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ LoadObject(IP, Object::null_object());
|
| __ PushList((1 << R4) | (1 << R6) | (1 << IP));
|
|
|
| // R2: Smi-tagged arguments array length.
|
| @@ -1424,7 +1424,7 @@ void StubCode::GenerateNArgsCheckInlineCacheStub(
|
| // Create a stub frame as we are pushing some objects on the stack before
|
| // calling into the runtime.
|
| __ EnterStubFrame();
|
| - __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ LoadObject(R0, Object::null_object());
|
| // Preserve IC data object and arguments descriptor array and
|
| // setup space on stack for result (target code object).
|
| __ PushList((1 << R0) | (1 << R4) | (1 << R5));
|
| @@ -1699,7 +1699,7 @@ void StubCode::GenerateLazyCompileStub(Assembler* assembler) {
|
| // R5: Contains an ICData.
|
| void StubCode::GenerateICCallBreakpointStub(Assembler* assembler) {
|
| __ EnterStubFrame();
|
| - __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ LoadObject(R0, Object::null_object());
|
| // Preserve arguments descriptor and make room for result.
|
| __ PushList((1 << R0) | (1 << R5));
|
| __ CallRuntime(kBreakpointRuntimeHandlerRuntimeEntry, 0);
|
| @@ -1711,7 +1711,7 @@ void StubCode::GenerateICCallBreakpointStub(Assembler* assembler) {
|
|
|
| void StubCode::GenerateRuntimeCallBreakpointStub(Assembler* assembler) {
|
| __ EnterStubFrame();
|
| - __ LoadImmediate(R0, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ LoadObject(R0, Object::null_object());
|
| // Make room for result.
|
| __ PushList((1 << R0));
|
| __ CallRuntime(kBreakpointRuntimeHandlerRuntimeEntry, 0);
|
| @@ -1754,7 +1754,7 @@ static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) {
|
| __ LoadClass(R3, R0, R4);
|
| // Compute instance type arguments into R4.
|
| Label has_no_type_arguments;
|
| - __ LoadImmediate(R4, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ LoadObject(R4, Object::null_object());
|
| __ ldr(R5, FieldAddress(R3,
|
| Class::type_arguments_field_offset_in_words_offset()));
|
| __ CompareImmediate(R5, Class::kNoTypeArguments);
|
| @@ -1779,7 +1779,7 @@ static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) {
|
| __ SmiTag(R3);
|
| __ Bind(&loop);
|
| __ ldr(R5, Address(R2, kWordSize * SubtypeTestCache::kInstanceClassId));
|
| - __ CompareImmediate(R5, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ CompareObject(R5, Object::null_object());
|
| __ b(¬_found, EQ);
|
| __ cmp(R5, Operand(R3));
|
| if (n == 1) {
|
| @@ -1804,7 +1804,7 @@ static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) {
|
| __ b(&loop);
|
| // Fall through to not found.
|
| __ Bind(¬_found);
|
| - __ LoadImmediate(R1, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ LoadObject(R1, Object::null_object());
|
| __ Ret();
|
|
|
| __ Bind(&found);
|
| @@ -1889,7 +1889,7 @@ void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
|
| void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) {
|
| __ EnterStubFrame();
|
| __ Push(R4);
|
| - __ LoadImmediate(IP, reinterpret_cast<intptr_t>(Object::null()));
|
| + __ LoadObject(IP, Object::null_object());
|
| __ Push(IP); // Setup space on stack for return value.
|
| __ Push(R6);
|
| __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry, 1);
|
|
|