| Index: runtime/vm/intermediate_language_ia32.cc
|
| diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
|
| index 20095edb23c05cfa7b25b7fa9c5d64308b89804d..1505a6cc5f8a522469dd2cb163c90fdf6893f833 100644
|
| --- a/runtime/vm/intermediate_language_ia32.cc
|
| +++ b/runtime/vm/intermediate_language_ia32.cc
|
| @@ -1077,13 +1077,10 @@ static bool CanBeImmediateIndex(Value* index, intptr_t cid) {
|
|
|
| LocationSummary* StringFromCharCodeInstr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 1;
|
| - const intptr_t kNumTemps = 0;
|
| - LocationSummary* locs =
|
| - new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
|
| // TODO(fschneider): Allow immediate operands for the char code.
|
| - locs->set_in(0, Location::RequiresRegister());
|
| - locs->set_out(Location::RequiresRegister());
|
| - return locs;
|
| + return LocationSummary::Make(kNumInputs,
|
| + Location::RequiresRegister(),
|
| + LocationSummary::kNoCall);
|
| }
|
|
|
|
|
| @@ -1101,12 +1098,9 @@ void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
|
|
| LocationSummary* LoadUntaggedInstr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 1;
|
| - const intptr_t kNumTemps = 0;
|
| - LocationSummary* locs =
|
| - new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
|
| - locs->set_in(0, Location::RequiresRegister());
|
| - locs->set_out(Location::RequiresRegister());
|
| - return locs;
|
| + return LocationSummary::Make(kNumInputs,
|
| + Location::RequiresRegister(),
|
| + LocationSummary::kNoCall);
|
| }
|
|
|
|
|
| @@ -1117,6 +1111,29 @@ void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
|
|
|
|
| +LocationSummary* LoadClassIdInstr::MakeLocationSummary() const {
|
| + const intptr_t kNumInputs = 1;
|
| + return LocationSummary::Make(kNumInputs,
|
| + Location::RequiresRegister(),
|
| + LocationSummary::kNoCall);
|
| +}
|
| +
|
| +
|
| +void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| + Register object = locs()->in(0).reg();
|
| + Register result = locs()->out().reg();
|
| + Label load, done;
|
| + __ testl(object, Immediate(kSmiTagMask));
|
| + __ j(NOT_ZERO, &load, Assembler::kNearJump);
|
| + __ movl(result, Immediate(Smi::RawValue(kSmiCid)));
|
| + __ jmp(&done);
|
| + __ Bind(&load);
|
| + __ LoadClassId(result, object);
|
| + __ SmiTag(result);
|
| + __ Bind(&done);
|
| +}
|
| +
|
| +
|
| CompileType LoadIndexedInstr::ComputeType() const {
|
| switch (class_id_) {
|
| case kArrayCid:
|
| @@ -3317,12 +3334,9 @@ void MathSqrtInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
|
|
| LocationSummary* UnarySmiOpInstr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 1;
|
| - const intptr_t kNumTemps = 0;
|
| - LocationSummary* summary =
|
| - new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
|
| - summary->set_in(0, Location::RequiresRegister());
|
| - summary->set_out(Location::SameAsFirstInput());
|
| - return summary;
|
| + return LocationSummary::Make(kNumInputs,
|
| + Location::SameAsFirstInput(),
|
| + LocationSummary::kNoCall);
|
| }
|
|
|
|
|
| @@ -3400,7 +3414,7 @@ void DoubleToIntegerInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0));
|
|
|
| const intptr_t kNumberOfArguments = 1;
|
| - compiler->GenerateStaticCall(instance_call()->deopt_id(),
|
| + compiler->GenerateStaticCall(deopt_id(),
|
| instance_call()->token_pos(),
|
| target,
|
| kNumberOfArguments,
|
| @@ -3496,7 +3510,7 @@ LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary() const {
|
|
|
|
|
| void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| - Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
|
| + Label* deopt = compiler->AddDeoptStub(deopt_id(),
|
| kDeoptPolymorphicInstanceCallTestFail);
|
| if (ic_data().NumberOfChecks() == 0) {
|
| __ jmp(deopt);
|
| @@ -3506,7 +3520,7 @@ void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| if (!with_checks()) {
|
| ASSERT(ic_data().HasOneTarget());
|
| const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0));
|
| - compiler->GenerateStaticCall(instance_call()->deopt_id(),
|
| + compiler->GenerateStaticCall(deopt_id(),
|
| instance_call()->token_pos(),
|
| target,
|
| instance_call()->ArgumentCount(),
|
| @@ -3527,7 +3541,7 @@ void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| instance_call()->ArgumentCount(),
|
| instance_call()->argument_names(),
|
| deopt,
|
| - instance_call()->deopt_id(),
|
| + deopt_id(),
|
| instance_call()->token_pos(),
|
| locs());
|
| }
|
|
|