Use Object::null_object() instead of Object::ZoneHandle() when a null object
handle is desired. This is more efficient as it does not result in allocation of a ZoneHandle and access to Isolate::Current(). R=srdjan@google.com, zra@google.com Review URL: https://codereview.chromium.org//363093004 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38044 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
@@ -639,9 +639,9 @@ static void DisassembleCode(const Function& function, bool optimized) {
|
||||
|
||||
OS::Print("Pointer offsets for function: {\n");
|
||||
// Pointer offsets are stored in descending order.
|
||||
Object& obj = Object::Handle();
|
||||
for (intptr_t i = code.pointer_offsets_length() - 1; i >= 0; i--) {
|
||||
const uword addr = code.GetPointerOffsetAt(i) + code.EntryPoint();
|
||||
Object& obj = Object::Handle();
|
||||
obj = *reinterpret_cast<RawObject**>(addr);
|
||||
OS::Print(" %d : %#" Px " '%s'\n",
|
||||
code.GetPointerOffsetAt(i), addr, obj.ToCString());
|
||||
|
||||
@@ -595,7 +595,7 @@ void FlowGraphCompiler::GenerateInstanceOf(intptr_t token_pos,
|
||||
// Generate runtime call.
|
||||
// Load instantiator (R2) and its type arguments (R1).
|
||||
__ ldm(IA, SP, (1 << R1) | (1 << R2));
|
||||
__ PushObject(Object::ZoneHandle()); // Make room for the result.
|
||||
__ PushObject(Object::null_object()); // Make room for the result.
|
||||
__ Push(R0); // Push the instance.
|
||||
__ PushObject(type); // Push the type.
|
||||
// Push instantiator (R2) and its type arguments (R1).
|
||||
@@ -661,7 +661,7 @@ void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos,
|
||||
|
||||
// Generate throw new TypeError() if the type is malformed or malbounded.
|
||||
if (dst_type.IsMalformedOrMalbounded()) {
|
||||
__ PushObject(Object::ZoneHandle()); // Make room for the result.
|
||||
__ PushObject(Object::null_object()); // Make room for the result.
|
||||
__ Push(R0); // Push the source object.
|
||||
__ PushObject(dst_name); // Push the name of the destination.
|
||||
__ PushObject(dst_type); // Push the type of the destination.
|
||||
@@ -687,7 +687,7 @@ void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos,
|
||||
__ Bind(&runtime_call);
|
||||
// Load instantiator (R2) and its type arguments (R1).
|
||||
__ ldm(IA, SP, (1 << R1) | (1 << R2));
|
||||
__ PushObject(Object::ZoneHandle()); // Make room for the result.
|
||||
__ PushObject(Object::null_object()); // Make room for the result.
|
||||
__ Push(R0); // Push the source object.
|
||||
__ PushObject(dst_type); // Push the type of the destination.
|
||||
// Push instantiator (R2) and its type arguments (R1).
|
||||
|
||||
@@ -588,7 +588,7 @@ void FlowGraphCompiler::GenerateInstanceOf(intptr_t token_pos,
|
||||
// Load instantiator (R2) and its type arguments (R1).
|
||||
__ ldr(R1, Address(SP, 0 * kWordSize));
|
||||
__ ldr(R2, Address(SP, 1 * kWordSize));
|
||||
__ PushObject(Object::ZoneHandle(), PP); // Make room for the result.
|
||||
__ PushObject(Object::null_object(), PP); // Make room for the result.
|
||||
__ Push(R0); // Push the instance.
|
||||
__ PushObject(type, PP); // Push the type.
|
||||
// Push instantiator (R2) and its type arguments (R1).
|
||||
@@ -656,7 +656,7 @@ void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos,
|
||||
|
||||
// Generate throw new TypeError() if the type is malformed or malbounded.
|
||||
if (dst_type.IsMalformedOrMalbounded()) {
|
||||
__ PushObject(Object::ZoneHandle(), PP); // Make room for the result.
|
||||
__ PushObject(Object::null_object(), PP); // Make room for the result.
|
||||
__ Push(R0); // Push the source object.
|
||||
__ PushObject(dst_name, PP); // Push the name of the destination.
|
||||
__ PushObject(dst_type, PP); // Push the type of the destination.
|
||||
@@ -684,7 +684,7 @@ void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos,
|
||||
// Load instantiator (R2) and its type arguments (R1).
|
||||
__ ldr(R1, Address(SP));
|
||||
__ ldr(R2, Address(SP, 1 * kWordSize));
|
||||
__ PushObject(Object::ZoneHandle(), PP); // Make room for the result.
|
||||
__ PushObject(Object::null_object(), PP); // Make room for the result.
|
||||
__ Push(R0); // Push the source object.
|
||||
__ PushObject(dst_type, PP); // Push the type of the destination.
|
||||
// Push instantiator (R2) and its type arguments (R1).
|
||||
|
||||
@@ -605,7 +605,7 @@ void FlowGraphCompiler::GenerateInstanceOf(intptr_t token_pos,
|
||||
// Generate runtime call.
|
||||
__ movl(EDX, Address(ESP, 0)); // Get instantiator type arguments.
|
||||
__ movl(ECX, Address(ESP, kWordSize)); // Get instantiator.
|
||||
__ PushObject(Object::ZoneHandle()); // Make room for the result.
|
||||
__ PushObject(Object::null_object()); // Make room for the result.
|
||||
__ pushl(EAX); // Push the instance.
|
||||
__ PushObject(type); // Push the type.
|
||||
__ pushl(ECX); // Instantiator.
|
||||
@@ -677,7 +677,7 @@ void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos,
|
||||
|
||||
// Generate throw new TypeError() if the type is malformed or malbounded.
|
||||
if (dst_type.IsMalformedOrMalbounded()) {
|
||||
__ PushObject(Object::ZoneHandle()); // Make room for the result.
|
||||
__ PushObject(Object::null_object()); // Make room for the result.
|
||||
__ pushl(EAX); // Push the source object.
|
||||
__ PushObject(dst_name); // Push the name of the destination.
|
||||
__ PushObject(dst_type); // Push the type of the destination.
|
||||
@@ -703,7 +703,7 @@ void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos,
|
||||
__ Bind(&runtime_call);
|
||||
__ movl(EDX, Address(ESP, 0)); // Get instantiator type arguments.
|
||||
__ movl(ECX, Address(ESP, kWordSize)); // Get instantiator.
|
||||
__ PushObject(Object::ZoneHandle()); // Make room for the result.
|
||||
__ PushObject(Object::null_object()); // Make room for the result.
|
||||
__ pushl(EAX); // Push the source object.
|
||||
__ PushObject(dst_type); // Push the type of the destination.
|
||||
__ pushl(ECX); // Instantiator.
|
||||
|
||||
@@ -593,7 +593,7 @@ void FlowGraphCompiler::GenerateInstanceOf(intptr_t token_pos,
|
||||
__ lw(A2, Address(SP, 1 * kWordSize));
|
||||
|
||||
__ addiu(SP, SP, Immediate(-6 * kWordSize));
|
||||
__ LoadObject(TMP, Object::ZoneHandle());
|
||||
__ LoadObject(TMP, Object::null_object());
|
||||
__ sw(TMP, Address(SP, 5 * kWordSize)); // Make room for the result.
|
||||
__ sw(A0, Address(SP, 4 * kWordSize)); // Push the instance.
|
||||
__ LoadObject(TMP, type);
|
||||
@@ -666,7 +666,7 @@ void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos,
|
||||
// Generate throw new TypeError() if the type is malformed or malbounded.
|
||||
if (dst_type.IsMalformedOrMalbounded()) {
|
||||
__ addiu(SP, SP, Immediate(-4 * kWordSize));
|
||||
__ LoadObject(TMP, Object::ZoneHandle());
|
||||
__ LoadObject(TMP, Object::null_object());
|
||||
__ sw(TMP, Address(SP, 3 * kWordSize)); // Make room for the result.
|
||||
__ sw(A0, Address(SP, 2 * kWordSize)); // Push the source object.
|
||||
__ LoadObject(TMP, dst_name);
|
||||
@@ -701,7 +701,7 @@ void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos,
|
||||
__ lw(A2, Address(SP, 1 * kWordSize));
|
||||
|
||||
__ addiu(SP, SP, Immediate(-7 * kWordSize));
|
||||
__ LoadObject(TMP, Object::ZoneHandle());
|
||||
__ LoadObject(TMP, Object::null_object());
|
||||
__ sw(TMP, Address(SP, 6 * kWordSize)); // Make room for the result.
|
||||
__ sw(A0, Address(SP, 5 * kWordSize)); // Push the source object.
|
||||
__ LoadObject(TMP, dst_type);
|
||||
|
||||
@@ -594,7 +594,7 @@ void FlowGraphCompiler::GenerateInstanceOf(intptr_t token_pos,
|
||||
// Generate runtime call.
|
||||
__ movq(RDX, Address(RSP, 0)); // Get instantiator type arguments.
|
||||
__ movq(RCX, Address(RSP, kWordSize)); // Get instantiator.
|
||||
__ PushObject(Object::ZoneHandle(), PP); // Make room for the result.
|
||||
__ PushObject(Object::null_object(), PP); // Make room for the result.
|
||||
__ pushq(RAX); // Push the instance.
|
||||
__ PushObject(type, PP); // Push the type.
|
||||
__ pushq(RCX); // TODO(srdjan): Pass instantiator instead of null.
|
||||
@@ -664,7 +664,7 @@ void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos,
|
||||
|
||||
// Generate throw new TypeError() if the type is malformed or malbounded.
|
||||
if (dst_type.IsMalformedOrMalbounded()) {
|
||||
__ PushObject(Object::ZoneHandle(), PP); // Make room for the result.
|
||||
__ PushObject(Object::null_object(), PP); // Make room for the result.
|
||||
__ pushq(RAX); // Push the source object.
|
||||
__ PushObject(dst_name, PP); // Push the name of the destination.
|
||||
__ PushObject(dst_type, PP); // Push the type of the destination.
|
||||
@@ -690,7 +690,7 @@ void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos,
|
||||
__ Bind(&runtime_call);
|
||||
__ movq(RDX, Address(RSP, 0)); // Get instantiator type arguments.
|
||||
__ movq(RCX, Address(RSP, kWordSize)); // Get instantiator.
|
||||
__ PushObject(Object::ZoneHandle(), PP); // Make room for the result.
|
||||
__ PushObject(Object::null_object(), PP); // Make room for the result.
|
||||
__ pushq(RAX); // Push the source object.
|
||||
__ PushObject(dst_type, PP); // Push the type of the destination.
|
||||
__ pushq(RCX); // Instantiator.
|
||||
|
||||
@@ -913,7 +913,7 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
const Register result = locs()->out(0).reg();
|
||||
|
||||
// Push the result place holder initialized to NULL.
|
||||
__ PushObject(Object::ZoneHandle());
|
||||
__ PushObject(Object::null_object());
|
||||
// Pass a pointer to the first argument in R2.
|
||||
if (!function().HasOptionalParameters()) {
|
||||
__ AddImmediate(R2, FP, (kParamEndSlotFromFp +
|
||||
@@ -2367,7 +2367,7 @@ void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
Label slow_path, done;
|
||||
InlineArrayAllocation(compiler, length, &slow_path, &done);
|
||||
__ Bind(&slow_path);
|
||||
__ PushObject(Object::ZoneHandle()); // Make room for the result.
|
||||
__ PushObject(Object::null_object()); // Make room for the result.
|
||||
__ Push(kLengthReg); // length.
|
||||
__ Push(kElemTypeReg);
|
||||
compiler->GenerateRuntimeCall(token_pos(),
|
||||
@@ -2665,7 +2665,7 @@ void InstantiateTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
|
||||
// 'instantiator_reg' is the instantiator TypeArguments object (or null).
|
||||
// A runtime call to instantiate the type is required.
|
||||
__ PushObject(Object::ZoneHandle()); // Make room for the result.
|
||||
__ PushObject(Object::null_object()); // Make room for the result.
|
||||
__ PushObject(type());
|
||||
__ Push(instantiator_reg); // Push instantiator type arguments.
|
||||
compiler->GenerateRuntimeCall(token_pos(),
|
||||
@@ -2734,7 +2734,7 @@ void InstantiateTypeArgumentsInstr::EmitNativeCode(
|
||||
__ Bind(&slow_case);
|
||||
// Instantiate non-null type arguments.
|
||||
// A runtime call to instantiate the type arguments is required.
|
||||
__ PushObject(Object::ZoneHandle()); // Make room for the result.
|
||||
__ PushObject(Object::null_object()); // Make room for the result.
|
||||
__ PushObject(type_arguments());
|
||||
__ Push(instantiator_reg); // Push instantiator type arguments.
|
||||
compiler->GenerateRuntimeCall(token_pos(),
|
||||
@@ -2790,7 +2790,7 @@ void CloneContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
const Register context_value = locs()->in(0).reg();
|
||||
const Register result = locs()->out(0).reg();
|
||||
|
||||
__ PushObject(Object::ZoneHandle()); // Make room for the result.
|
||||
__ PushObject(Object::null_object()); // Make room for the result.
|
||||
__ Push(context_value);
|
||||
compiler->GenerateRuntimeCall(token_pos(),
|
||||
deopt_id(),
|
||||
|
||||
@@ -758,7 +758,7 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
const Register result = locs()->out(0).reg();
|
||||
|
||||
// Push the result place holder initialized to NULL.
|
||||
__ PushObject(Object::ZoneHandle(), PP);
|
||||
__ PushObject(Object::null_object(), PP);
|
||||
// Pass a pointer to the first argument in R2.
|
||||
if (!function().HasOptionalParameters()) {
|
||||
__ AddImmediate(R2, FP, (kParamEndSlotFromFp +
|
||||
@@ -2241,7 +2241,7 @@ void InstantiateTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
|
||||
// 'instantiator_reg' is the instantiator TypeArguments object (or null).
|
||||
// A runtime call to instantiate the type is required.
|
||||
__ PushObject(Object::ZoneHandle(), PP); // Make room for the result.
|
||||
__ PushObject(Object::null_object(), PP); // Make room for the result.
|
||||
__ PushObject(type(), PP);
|
||||
__ Push(instantiator_reg); // Push instantiator type arguments.
|
||||
compiler->GenerateRuntimeCall(token_pos(),
|
||||
@@ -2309,7 +2309,7 @@ void InstantiateTypeArgumentsInstr::EmitNativeCode(
|
||||
__ Bind(&slow_case);
|
||||
// Instantiate non-null type arguments.
|
||||
// A runtime call to instantiate the type arguments is required.
|
||||
__ PushObject(Object::ZoneHandle(), PP); // Make room for the result.
|
||||
__ PushObject(Object::null_object(), PP); // Make room for the result.
|
||||
__ PushObject(type_arguments(), PP);
|
||||
__ Push(instantiator_reg); // Push instantiator type arguments.
|
||||
compiler->GenerateRuntimeCall(token_pos(),
|
||||
@@ -2365,7 +2365,7 @@ void CloneContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
const Register context_value = locs()->in(0).reg();
|
||||
const Register result = locs()->out(0).reg();
|
||||
|
||||
__ PushObject(Object::ZoneHandle(), PP); // Make room for the result.
|
||||
__ PushObject(Object::null_object(), PP); // Make room for the result.
|
||||
__ Push(context_value);
|
||||
compiler->GenerateRuntimeCall(token_pos(),
|
||||
deopt_id(),
|
||||
|
||||
@@ -803,7 +803,7 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
StubCode* stub_code = compiler->isolate()->stub_code();
|
||||
|
||||
// Push the result place holder initialized to NULL.
|
||||
__ PushObject(Object::ZoneHandle());
|
||||
__ PushObject(Object::null_object());
|
||||
// Pass a pointer to the first argument in EAX.
|
||||
if (!function().HasOptionalParameters()) {
|
||||
__ leal(EAX, Address(EBP, (kParamEndSlotFromFp +
|
||||
@@ -2170,7 +2170,7 @@ void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
Label slow_path, done;
|
||||
InlineArrayAllocation(compiler, length, &slow_path, &done);
|
||||
__ Bind(&slow_path);
|
||||
__ PushObject(Object::ZoneHandle()); // Make room for the result.
|
||||
__ PushObject(Object::null_object()); // Make room for the result.
|
||||
__ pushl(kLengthReg);
|
||||
__ pushl(kElemTypeReg);
|
||||
compiler->GenerateRuntimeCall(token_pos(),
|
||||
@@ -2468,7 +2468,7 @@ void InstantiateTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
|
||||
// 'instantiator_reg' is the instantiator TypeArguments object (or null).
|
||||
// A runtime call to instantiate the type is required.
|
||||
__ PushObject(Object::ZoneHandle()); // Make room for the result.
|
||||
__ PushObject(Object::null_object()); // Make room for the result.
|
||||
__ PushObject(type());
|
||||
__ pushl(instantiator_reg); // Push instantiator type arguments.
|
||||
compiler->GenerateRuntimeCall(token_pos(),
|
||||
@@ -2540,7 +2540,7 @@ void InstantiateTypeArgumentsInstr::EmitNativeCode(
|
||||
__ Bind(&slow_case);
|
||||
// Instantiate non-null type arguments.
|
||||
// A runtime call to instantiate the type arguments is required.
|
||||
__ PushObject(Object::ZoneHandle()); // Make room for the result.
|
||||
__ PushObject(Object::null_object()); // Make room for the result.
|
||||
__ PushObject(type_arguments());
|
||||
__ pushl(instantiator_reg); // Push instantiator type arguments.
|
||||
compiler->GenerateRuntimeCall(token_pos(),
|
||||
@@ -2707,7 +2707,7 @@ void CloneContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
Register context_value = locs()->in(0).reg();
|
||||
Register result = locs()->out(0).reg();
|
||||
|
||||
__ PushObject(Object::ZoneHandle()); // Make room for the result.
|
||||
__ PushObject(Object::null_object()); // Make room for the result.
|
||||
__ pushl(context_value);
|
||||
compiler->GenerateRuntimeCall(token_pos(),
|
||||
deopt_id(),
|
||||
|
||||
@@ -868,7 +868,7 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
Register result = locs()->out(0).reg();
|
||||
|
||||
// Push the result place holder initialized to NULL.
|
||||
__ PushObject(Object::ZoneHandle());
|
||||
__ PushObject(Object::null_object());
|
||||
// Pass a pointer to the first argument in A2.
|
||||
if (!function().HasOptionalParameters()) {
|
||||
__ AddImmediate(A2, FP, (kParamEndSlotFromFp +
|
||||
@@ -2099,7 +2099,7 @@ void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
Label slow_path, done;
|
||||
InlineArrayAllocation(compiler, length, &slow_path, &done);
|
||||
__ Bind(&slow_path);
|
||||
__ PushObject(Object::ZoneHandle()); // Make room for the result.
|
||||
__ PushObject(Object::null_object()); // Make room for the result.
|
||||
__ Push(kLengthReg); // length.
|
||||
__ Push(kElemTypeReg);
|
||||
compiler->GenerateRuntimeCall(token_pos(),
|
||||
@@ -2280,7 +2280,7 @@ void InstantiateTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
// 'instantiator_reg' is the instantiator TypeArguments object (or null).
|
||||
// A runtime call to instantiate the type is required.
|
||||
__ addiu(SP, SP, Immediate(-3 * kWordSize));
|
||||
__ LoadObject(TMP, Object::ZoneHandle());
|
||||
__ LoadObject(TMP, Object::null_object());
|
||||
__ sw(TMP, Address(SP, 2 * kWordSize)); // Make room for the result.
|
||||
__ LoadObject(TMP, type());
|
||||
__ sw(TMP, Address(SP, 1 * kWordSize));
|
||||
@@ -2354,7 +2354,7 @@ void InstantiateTypeArgumentsInstr::EmitNativeCode(
|
||||
// Instantiate non-null type arguments.
|
||||
// A runtime call to instantiate the type arguments is required.
|
||||
__ addiu(SP, SP, Immediate(-3 * kWordSize));
|
||||
__ LoadObject(TMP, Object::ZoneHandle());
|
||||
__ LoadObject(TMP, Object::null_object());
|
||||
__ sw(TMP, Address(SP, 2 * kWordSize)); // Make room for the result.
|
||||
__ LoadObject(TMP, type_arguments());
|
||||
__ sw(TMP, Address(SP, 1 * kWordSize));
|
||||
@@ -2421,7 +2421,7 @@ void CloneContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
__ TraceSimMsg("CloneContextInstr");
|
||||
|
||||
__ addiu(SP, SP, Immediate(-2 * kWordSize));
|
||||
__ LoadObject(TMP, Object::ZoneHandle()); // Make room for the result.
|
||||
__ LoadObject(TMP, Object::null_object()); // Make room for the result.
|
||||
__ sw(TMP, Address(SP, 1 * kWordSize));
|
||||
__ sw(context_value, Address(SP, 0 * kWordSize));
|
||||
|
||||
|
||||
@@ -730,7 +730,7 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
StubCode* stub_code = compiler->isolate()->stub_code();
|
||||
|
||||
// Push the result place holder initialized to NULL.
|
||||
__ PushObject(Object::ZoneHandle(), PP);
|
||||
__ PushObject(Object::null_object(), PP);
|
||||
// Pass a pointer to the first argument in RAX.
|
||||
if (!function().HasOptionalParameters()) {
|
||||
__ leaq(RAX, Address(RBP, (kParamEndSlotFromFp +
|
||||
@@ -2004,7 +2004,7 @@ void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
Label slow_path, done;
|
||||
InlineArrayAllocation(compiler, length, &slow_path, &done);
|
||||
__ Bind(&slow_path);
|
||||
__ PushObject(Object::ZoneHandle(), PP); // Make room for the result.
|
||||
__ PushObject(Object::null_object(), PP); // Make room for the result.
|
||||
__ pushq(kLengthReg);
|
||||
__ pushq(kElemTypeReg);
|
||||
compiler->GenerateRuntimeCall(token_pos(),
|
||||
@@ -2299,7 +2299,7 @@ void InstantiateTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
|
||||
// 'instantiator_reg' is the instantiator TypeArguments object (or null).
|
||||
// A runtime call to instantiate the type is required.
|
||||
__ PushObject(Object::ZoneHandle(), PP); // Make room for the result.
|
||||
__ PushObject(Object::null_object(), PP); // Make room for the result.
|
||||
__ PushObject(type(), PP);
|
||||
__ pushq(instantiator_reg); // Push instantiator type arguments.
|
||||
compiler->GenerateRuntimeCall(token_pos(),
|
||||
@@ -2370,7 +2370,7 @@ void InstantiateTypeArgumentsInstr::EmitNativeCode(
|
||||
__ Bind(&slow_case);
|
||||
// Instantiate non-null type arguments.
|
||||
// A runtime call to instantiate the type arguments is required.
|
||||
__ PushObject(Object::ZoneHandle(), PP); // Make room for the result.
|
||||
__ PushObject(Object::null_object(), PP); // Make room for the result.
|
||||
__ PushObject(type_arguments(), PP);
|
||||
__ pushq(instantiator_reg); // Push instantiator type arguments.
|
||||
compiler->GenerateRuntimeCall(token_pos(),
|
||||
@@ -2427,7 +2427,7 @@ void CloneContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
||||
Register context_value = locs()->in(0).reg();
|
||||
Register result = locs()->out(0).reg();
|
||||
|
||||
__ PushObject(Object::ZoneHandle(), PP); // Make room for the result.
|
||||
__ PushObject(Object::null_object(), PP); // Make room for the result.
|
||||
__ pushq(context_value);
|
||||
compiler->GenerateRuntimeCall(token_pos(),
|
||||
deopt_id(),
|
||||
|
||||
@@ -1329,7 +1329,7 @@ void Parser::BuildDispatcherScope(const Function& func,
|
||||
intptr_t index = i - desc.PositionalCount();
|
||||
p.name = &String::ZoneHandle(I, desc.NameAt(index));
|
||||
p.type = &Type::ZoneHandle(I, Type::DynamicType());
|
||||
p.default_value = &Object::ZoneHandle();
|
||||
p.default_value = &Object::null_object();
|
||||
params.parameters->Add(p);
|
||||
params.num_optional_parameters++;
|
||||
params.has_optional_named_parameters = true;
|
||||
@@ -1697,7 +1697,7 @@ void Parser::ParseFormalParameter(bool allow_explicit_default_value,
|
||||
params->has_optional_named_parameters) {
|
||||
// Implicit default value is null.
|
||||
params->num_optional_parameters++;
|
||||
parameter.default_value = &Object::ZoneHandle();
|
||||
parameter.default_value = &Object::null_object();
|
||||
} else {
|
||||
params->num_fixed_parameters++;
|
||||
ASSERT(params->num_optional_parameters == 0);
|
||||
|
||||
@@ -44,12 +44,11 @@ static void GenerateCallToCallRuntimeStub(Assembler* assembler,
|
||||
const int argc = 2;
|
||||
const Smi& smi1 = Smi::ZoneHandle(Smi::New(value1));
|
||||
const Smi& smi2 = Smi::ZoneHandle(Smi::New(value2));
|
||||
const Object& result = Object::ZoneHandle();
|
||||
const Context& context = Context::ZoneHandle(Context::New(0, Heap::kOld));
|
||||
ASSERT(context.isolate() == Isolate::Current());
|
||||
__ EnterDartFrame(0);
|
||||
__ LoadObject(CTX, context, PP);
|
||||
__ PushObject(result, PP); // Push Null object for return value.
|
||||
__ PushObject(Object::null_object(), PP); // Push Null obj for return value.
|
||||
__ PushObject(smi1, PP); // Push argument 1 smi1.
|
||||
__ PushObject(smi2, PP); // Push argument 2 smi2.
|
||||
ASSERT(kTestSmiSubRuntimeEntry.argument_count() == argc);
|
||||
|
||||
@@ -44,12 +44,11 @@ static void GenerateCallToCallRuntimeStub(Assembler* assembler,
|
||||
const int argc = 2;
|
||||
const Smi& smi1 = Smi::ZoneHandle(Smi::New(value1));
|
||||
const Smi& smi2 = Smi::ZoneHandle(Smi::New(value2));
|
||||
const Object& result = Object::ZoneHandle();
|
||||
const Context& context = Context::ZoneHandle(Context::New(0, Heap::kOld));
|
||||
ASSERT(context.isolate() == Isolate::Current());
|
||||
__ EnterDartFrame(0);
|
||||
__ LoadObject(CTX, context);
|
||||
__ PushObject(result); // Push Null object for return value.
|
||||
__ PushObject(Object::null_object()); // Push Null object for return value.
|
||||
__ PushObject(smi1); // Push argument 1 smi1.
|
||||
__ PushObject(smi2); // Push argument 2 smi2.
|
||||
ASSERT(kTestSmiSubRuntimeEntry.argument_count() == argc);
|
||||
|
||||
@@ -44,12 +44,11 @@ static void GenerateCallToCallRuntimeStub(Assembler* assembler,
|
||||
const int argc = 2;
|
||||
const Smi& smi1 = Smi::ZoneHandle(Smi::New(value1));
|
||||
const Smi& smi2 = Smi::ZoneHandle(Smi::New(value2));
|
||||
const Object& result = Object::ZoneHandle();
|
||||
const Context& context = Context::ZoneHandle(Context::New(0, Heap::kOld));
|
||||
ASSERT(context.isolate() == Isolate::Current());
|
||||
__ enter(Immediate(0));
|
||||
__ LoadObject(CTX, context);
|
||||
__ PushObject(result); // Push Null object for return value.
|
||||
__ PushObject(Object::null_object()); // Push Null object for return value.
|
||||
__ PushObject(smi1); // Push argument 1 smi1.
|
||||
__ PushObject(smi2); // Push argument 2 smi2.
|
||||
ASSERT(kTestSmiSubRuntimeEntry.argument_count() == argc);
|
||||
|
||||
@@ -44,12 +44,11 @@ static void GenerateCallToCallRuntimeStub(Assembler* assembler,
|
||||
const int argc = 2;
|
||||
const Smi& smi1 = Smi::ZoneHandle(Smi::New(value1));
|
||||
const Smi& smi2 = Smi::ZoneHandle(Smi::New(value2));
|
||||
const Object& result = Object::ZoneHandle();
|
||||
const Context& context = Context::ZoneHandle(Context::New(0, Heap::kOld));
|
||||
ASSERT(context.isolate() == Isolate::Current());
|
||||
__ EnterDartFrame(0);
|
||||
__ LoadObject(CTX, context);
|
||||
__ PushObject(result); // Push Null object for return value.
|
||||
__ PushObject(Object::null_object()); // Push Null object for return value.
|
||||
__ PushObject(smi1); // Push argument 1 smi1.
|
||||
__ PushObject(smi2); // Push argument 2 smi2.
|
||||
ASSERT(kTestSmiSubRuntimeEntry.argument_count() == argc);
|
||||
|
||||
@@ -44,12 +44,11 @@ static void GenerateCallToCallRuntimeStub(Assembler* assembler,
|
||||
const int argc = 2;
|
||||
const Smi& smi1 = Smi::ZoneHandle(Smi::New(value1));
|
||||
const Smi& smi2 = Smi::ZoneHandle(Smi::New(value2));
|
||||
const Object& result = Object::ZoneHandle();
|
||||
const Context& context = Context::ZoneHandle(Context::New(0, Heap::kOld));
|
||||
ASSERT(context.isolate() == Isolate::Current());
|
||||
__ EnterStubFrame(true);
|
||||
__ LoadObject(CTX, context, PP);
|
||||
__ PushObject(result, PP); // Push Null object for return value.
|
||||
__ PushObject(Object::null_object(), PP); // Push Null obj for return value.
|
||||
__ PushObject(smi1, PP); // Push argument 1 smi1.
|
||||
__ PushObject(smi2, PP); // Push argument 2 smi2.
|
||||
ASSERT(kTestSmiSubRuntimeEntry.argument_count() == argc);
|
||||
|
||||
Reference in New Issue
Block a user