| Index: runtime/vm/intermediate_language_x64.cc
|
| ===================================================================
|
| --- runtime/vm/intermediate_language_x64.cc (revision 8343)
|
| +++ runtime/vm/intermediate_language_x64.cc (working copy)
|
| @@ -22,7 +22,7 @@
|
| DECLARE_FLAG(bool, trace_functions);
|
|
|
|
|
| -void BindInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void BindInstr::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| computation()->EmitNativeCode(compiler);
|
| __ pushq(locs()->out().reg());
|
| }
|
| @@ -38,7 +38,7 @@
|
| }
|
|
|
|
|
| -void ReturnInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void ReturnInstr::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| Register result = locs()->in(0).reg();
|
| Register temp = locs()->temp(0).reg();
|
| ASSERT(result == RAX);
|
| @@ -121,7 +121,7 @@
|
| }
|
|
|
|
|
| -void LoadLocalComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void LoadLocalComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| Register result = locs()->out().reg();
|
| __ movq(result, Address(RBP, local().index() * kWordSize));
|
| }
|
| @@ -132,7 +132,7 @@
|
| }
|
|
|
|
|
| -void StoreLocalComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void StoreLocalComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| Register value = locs()->in(0).reg();
|
| Register result = locs()->out().reg();
|
| ASSERT(result == value); // Assert that register assignment is correct.
|
| @@ -145,7 +145,7 @@
|
| }
|
|
|
|
|
| -void ConstantVal::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void ConstantVal::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| Register result = locs()->out().reg();
|
| if (value().IsSmi()) {
|
| int64_t imm = reinterpret_cast<int64_t>(value().raw());
|
| @@ -166,7 +166,7 @@
|
| }
|
|
|
|
|
| -void AssertBooleanComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void AssertBooleanComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| Register obj = locs()->in(0).reg();
|
| Register result = locs()->out().reg();
|
|
|
| @@ -201,7 +201,7 @@
|
| }
|
|
|
|
|
| -void EqualityCompareComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void EqualityCompareComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| Register left = locs()->in(0).reg();
|
| Register right = locs()->in(1).reg();
|
| Register result = locs()->out().reg();
|
| @@ -253,7 +253,7 @@
|
| }
|
|
|
|
|
| -void NativeCallComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void NativeCallComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| ASSERT(locs()->temp(0).reg() == RAX);
|
| ASSERT(locs()->temp(1).reg() == RBX);
|
| ASSERT(locs()->temp(2).reg() == R10);
|
| @@ -284,7 +284,7 @@
|
| }
|
|
|
|
|
| -void StoreIndexedComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void StoreIndexedComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| Register receiver = locs()->in(0).reg();
|
| Register index = locs()->in(1).reg();
|
| Register value = locs()->in(2).reg();
|
| @@ -314,7 +314,7 @@
|
| }
|
|
|
|
|
| -void InstanceSetterComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void InstanceSetterComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| Register receiver = locs()->in(0).reg();
|
| Register value = locs()->in(1).reg();
|
| Register result = locs()->out().reg();
|
| @@ -348,7 +348,7 @@
|
| }
|
|
|
|
|
| -void StaticSetterComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void StaticSetterComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| Register value = locs()->in(0).reg();
|
| Register result = locs()->out().reg();
|
|
|
| @@ -378,7 +378,7 @@
|
| }
|
|
|
|
|
| -void LoadInstanceFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void LoadInstanceFieldComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| Register instance = locs()->in(0).reg();
|
| Register result = locs()->out().reg();
|
|
|
| @@ -391,7 +391,7 @@
|
| }
|
|
|
|
|
| -void LoadStaticFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void LoadStaticFieldComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| Register result = locs()->out().reg();
|
| __ LoadObject(result, field());
|
| __ movq(result, FieldAddress(result, Field::value_offset()));
|
| @@ -408,7 +408,7 @@
|
| }
|
|
|
|
|
| -void InstanceOfComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void InstanceOfComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| ASSERT(locs()->in(0).reg() == RAX); // Value.
|
| ASSERT(locs()->in(1).reg() == RCX); // Instantiator.
|
| ASSERT(locs()->in(2).reg() == RDX); // Instantiator type arguments.
|
| @@ -437,7 +437,7 @@
|
| }
|
|
|
|
|
| -void CreateArrayComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void CreateArrayComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| Register temp_reg = locs()->temp(0).reg();
|
| Register result_reg = locs()->out().reg();
|
|
|
| @@ -466,7 +466,7 @@
|
|
|
|
|
| void AllocateObjectWithBoundsCheckComp::EmitNativeCode(
|
| - FlowGraphCompiler* compiler) {
|
| + FlowGraphCompilerShared* compiler) {
|
| const Class& cls = Class::ZoneHandle(constructor().owner());
|
| Register type_arguments = locs()->in(0).reg();
|
| Register instantiator_type_arguments = locs()->in(1).reg();
|
| @@ -494,7 +494,7 @@
|
| }
|
|
|
|
|
| -void LoadVMFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void LoadVMFieldComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| Register obj = locs()->in(0).reg();
|
| Register result = locs()->out().reg();
|
|
|
| @@ -512,7 +512,8 @@
|
| }
|
|
|
|
|
| -void InstantiateTypeArgumentsComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void InstantiateTypeArgumentsComp::EmitNativeCode(
|
| + FlowGraphCompilerShared* compiler) {
|
| Register instantiator_reg = locs()->in(0).reg();
|
| Register result_reg = locs()->out().reg();
|
|
|
| @@ -572,7 +573,7 @@
|
|
|
|
|
| void ExtractConstructorTypeArgumentsComp::EmitNativeCode(
|
| - FlowGraphCompiler* compiler) {
|
| + FlowGraphCompilerShared* compiler) {
|
| Register instantiator_reg = locs()->in(0).reg();
|
| Register result_reg = locs()->out().reg();
|
| ASSERT(instantiator_reg == result_reg);
|
| @@ -627,7 +628,7 @@
|
|
|
|
|
| void ExtractConstructorInstantiatorComp::EmitNativeCode(
|
| - FlowGraphCompiler* compiler) {
|
| + FlowGraphCompilerShared* compiler) {
|
| ASSERT(instantiator()->IsUse());
|
| Register instantiator_reg = locs()->in(0).reg();
|
| ASSERT(locs()->out().reg() == instantiator_reg);
|
| @@ -690,7 +691,7 @@
|
| }
|
|
|
|
|
| -void AllocateContextComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void AllocateContextComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| ASSERT(locs()->temp(0).reg() == R10);
|
|
|
| __ movq(R10, Immediate(num_context_variables()));
|
| @@ -708,7 +709,7 @@
|
| }
|
|
|
|
|
| -void CloneContextComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void CloneContextComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| Register context_value = locs()->in(0).reg();
|
| Register result = locs()->out().reg();
|
|
|
| @@ -730,7 +731,7 @@
|
|
|
| // Restore stack and initialize the two exception variables:
|
| // exception and stack trace variables.
|
| -void CatchEntryComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void CatchEntryComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| // Restore RSP from RBP as we are coming from a throw and the code for
|
| // popping arguments has not been run.
|
| const intptr_t locals_space_size = compiler->StackSize() * kWordSize;
|
| @@ -791,7 +792,7 @@
|
|
|
|
|
| // TODO(srdjan): Implement variations.
|
| -static bool TryEmitSmiBinaryOp(FlowGraphCompiler* compiler,
|
| +static bool TryEmitSmiBinaryOp(FlowGraphCompilerShared* compiler,
|
| BinaryOpComp* comp) {
|
| ASSERT((comp->ic_data() != NULL));
|
| const ICData& ic_data = *comp->ic_data();
|
| @@ -936,7 +937,7 @@
|
| return true;
|
| }
|
|
|
| -void BinaryOpComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void BinaryOpComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| if (TryEmitSmiBinaryOp(compiler, this)) {
|
| // Operation inlined.
|
| return;
|
| @@ -965,7 +966,7 @@
|
| }
|
|
|
|
|
| -void UnarySmiOpComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void UnarySmiOpComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| const ICData& ic_data = *instance_call()->ic_data();
|
| ASSERT(!ic_data.IsNull());
|
| ASSERT(ic_data.num_args_tested() == 1);
|
| @@ -1016,7 +1017,7 @@
|
| }
|
|
|
|
|
| -void NumberNegateComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void NumberNegateComp::EmitNativeCode(FlowGraphCompilerShared* compiler) {
|
| const ICData& ic_data = *instance_call()->ic_data();
|
| ASSERT(!ic_data.IsNull());
|
| ASSERT(ic_data.num_args_tested() == 1);
|
|
|