| Index: runtime/vm/intermediate_language_ia32.cc
|
| diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
|
| index 1ee8f707340a455c8bfe7334c5cb08d0796022e0..ced3e206a0c85e78cb7de151ed11cdc7ba179acc 100644
|
| --- a/runtime/vm/intermediate_language_ia32.cc
|
| +++ b/runtime/vm/intermediate_language_ia32.cc
|
| @@ -36,7 +36,6 @@ LocationSummary* Instruction::MakeCallSummary(Zone* zone) {
|
| return result;
|
| }
|
|
|
| -
|
| LocationSummary* PushArgumentInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -47,7 +46,6 @@ LocationSummary* PushArgumentInstr::MakeLocationSummary(Zone* zone,
|
| return locs;
|
| }
|
|
|
| -
|
| void PushArgumentInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // In SSA mode, we need an explicit push. Nothing to do in non-SSA mode
|
| // where PushArgument is handled by BindInstr::EmitNativeCode.
|
| @@ -64,7 +62,6 @@ void PushArgumentInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* ReturnInstr::MakeLocationSummary(Zone* zone, bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| const intptr_t kNumTemps = 0;
|
| @@ -74,7 +71,6 @@ LocationSummary* ReturnInstr::MakeLocationSummary(Zone* zone, bool opt) const {
|
| return locs;
|
| }
|
|
|
| -
|
| // Attempt optimized compilation at return instruction instead of at the entry.
|
| // The entry needs to be patchable, no inlined objects are allowed in the area
|
| // that will be overwritten by the patch instruction: a jump).
|
| @@ -105,7 +101,6 @@ void ReturnInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ ret();
|
| }
|
|
|
| -
|
| LocationSummary* LoadLocalInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 0;
|
| @@ -117,13 +112,11 @@ LocationSummary* LoadLocalInstr::MakeLocationSummary(Zone* zone,
|
| LocationSummary::kNoCall);
|
| }
|
|
|
| -
|
| void LoadLocalInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(!compiler->is_optimizing());
|
| // Nothing to do.
|
| }
|
|
|
| -
|
| LocationSummary* StoreLocalInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -131,7 +124,6 @@ LocationSummary* StoreLocalInstr::MakeLocationSummary(Zone* zone,
|
| LocationSummary::kNoCall);
|
| }
|
|
|
| -
|
| void StoreLocalInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register value = locs()->in(0).reg();
|
| Register result = locs()->out(0).reg();
|
| @@ -139,7 +131,6 @@ void StoreLocalInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ movl(Address(EBP, local().index() * kWordSize), value);
|
| }
|
|
|
| -
|
| LocationSummary* ConstantInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 0;
|
| @@ -150,7 +141,6 @@ LocationSummary* ConstantInstr::MakeLocationSummary(Zone* zone,
|
| LocationSummary::kNoCall);
|
| }
|
|
|
| -
|
| void ConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // The register allocator drops constant definitions that have no uses.
|
| Location out = locs()->out(0);
|
| @@ -161,7 +151,6 @@ void ConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* UnboxedConstantInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 0;
|
| @@ -181,7 +170,6 @@ LocationSummary* UnboxedConstantInstr::MakeLocationSummary(Zone* zone,
|
| return locs;
|
| }
|
|
|
| -
|
| void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // The register allocator drops constant definitions that have no uses.
|
| if (!locs()->out(0).IsInvalid()) {
|
| @@ -208,7 +196,6 @@ void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* AssertAssignableInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 3;
|
| @@ -222,7 +209,6 @@ LocationSummary* AssertAssignableInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| LocationSummary* AssertBooleanInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -234,7 +220,6 @@ LocationSummary* AssertBooleanInstr::MakeLocationSummary(Zone* zone,
|
| return locs;
|
| }
|
|
|
| -
|
| static void EmitAssertBoolean(Register reg,
|
| TokenPosition token_pos,
|
| intptr_t deopt_id,
|
| @@ -264,7 +249,6 @@ static void EmitAssertBoolean(Register reg,
|
| __ Bind(&done);
|
| }
|
|
|
| -
|
| void AssertBooleanInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register obj = locs()->in(0).reg();
|
| Register result = locs()->out(0).reg();
|
| @@ -273,7 +257,6 @@ void AssertBooleanInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(obj == result);
|
| }
|
|
|
| -
|
| static Condition TokenKindToSmiCondition(Token::Kind kind) {
|
| switch (kind) {
|
| case Token::kEQ:
|
| @@ -294,7 +277,6 @@ static Condition TokenKindToSmiCondition(Token::Kind kind) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* EqualityCompareInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -336,7 +318,6 @@ LocationSummary* EqualityCompareInstr::MakeLocationSummary(Zone* zone,
|
| return NULL;
|
| }
|
|
|
| -
|
| static void LoadValueCid(FlowGraphCompiler* compiler,
|
| Register value_cid_reg,
|
| Register value_reg,
|
| @@ -355,7 +336,6 @@ static void LoadValueCid(FlowGraphCompiler* compiler,
|
| __ Bind(&done);
|
| }
|
|
|
| -
|
| static Condition FlipCondition(Condition condition) {
|
| switch (condition) {
|
| case EQUAL:
|
| @@ -384,7 +364,6 @@ static Condition FlipCondition(Condition condition) {
|
| }
|
| }
|
|
|
| -
|
| static Condition NegateCondition(Condition condition) {
|
| switch (condition) {
|
| case EQUAL:
|
| @@ -417,7 +396,6 @@ static Condition NegateCondition(Condition condition) {
|
| }
|
| }
|
|
|
| -
|
| static void EmitBranchOnCondition(FlowGraphCompiler* compiler,
|
| Condition true_condition,
|
| BranchLabels labels) {
|
| @@ -436,7 +414,6 @@ static void EmitBranchOnCondition(FlowGraphCompiler* compiler,
|
| }
|
| }
|
|
|
| -
|
| static Condition EmitSmiComparisonOp(FlowGraphCompiler* compiler,
|
| const LocationSummary& locs,
|
| Token::Kind kind,
|
| @@ -460,7 +437,6 @@ static Condition EmitSmiComparisonOp(FlowGraphCompiler* compiler,
|
| return true_condition;
|
| }
|
|
|
| -
|
| static Condition TokenKindToMintCondition(Token::Kind kind) {
|
| switch (kind) {
|
| case Token::kEQ:
|
| @@ -481,7 +457,6 @@ static Condition TokenKindToMintCondition(Token::Kind kind) {
|
| }
|
| }
|
|
|
| -
|
| static Condition EmitUnboxedMintEqualityOp(FlowGraphCompiler* compiler,
|
| const LocationSummary& locs,
|
| Token::Kind kind,
|
| @@ -504,7 +479,6 @@ static Condition EmitUnboxedMintEqualityOp(FlowGraphCompiler* compiler,
|
| return true_condition;
|
| }
|
|
|
| -
|
| static Condition EmitUnboxedMintComparisonOp(FlowGraphCompiler* compiler,
|
| const LocationSummary& locs,
|
| Token::Kind kind,
|
| @@ -548,7 +522,6 @@ static Condition EmitUnboxedMintComparisonOp(FlowGraphCompiler* compiler,
|
| return lo_cond;
|
| }
|
|
|
| -
|
| static Condition TokenKindToDoubleCondition(Token::Kind kind) {
|
| switch (kind) {
|
| case Token::kEQ:
|
| @@ -569,7 +542,6 @@ static Condition TokenKindToDoubleCondition(Token::Kind kind) {
|
| }
|
| }
|
|
|
| -
|
| static Condition EmitDoubleComparisonOp(FlowGraphCompiler* compiler,
|
| const LocationSummary& locs,
|
| Token::Kind kind,
|
| @@ -586,7 +558,6 @@ static Condition EmitDoubleComparisonOp(FlowGraphCompiler* compiler,
|
| return true_condition;
|
| }
|
|
|
| -
|
| Condition EqualityCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
|
| BranchLabels labels) {
|
| if (operation_cid() == kSmiCid) {
|
| @@ -599,7 +570,6 @@ Condition EqualityCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
|
| }
|
| }
|
|
|
| -
|
| void ComparisonInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Label is_true, is_false;
|
| BranchLabels labels = {&is_true, &is_false, &is_false};
|
| @@ -618,7 +588,6 @@ void ComparisonInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Bind(&done);
|
| }
|
|
|
| -
|
| void ComparisonInstr::EmitBranchCode(FlowGraphCompiler* compiler,
|
| BranchInstr* branch) {
|
| BranchLabels labels = compiler->CreateBranchLabels(branch);
|
| @@ -628,7 +597,6 @@ void ComparisonInstr::EmitBranchCode(FlowGraphCompiler* compiler,
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* TestSmiInstr::MakeLocationSummary(Zone* zone, bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| const intptr_t kNumTemps = 0;
|
| @@ -641,7 +609,6 @@ LocationSummary* TestSmiInstr::MakeLocationSummary(Zone* zone, bool opt) const {
|
| return locs;
|
| }
|
|
|
| -
|
| Condition TestSmiInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
|
| BranchLabels labels) {
|
| Register left = locs()->in(0).reg();
|
| @@ -657,7 +624,6 @@ Condition TestSmiInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
|
| return true_condition;
|
| }
|
|
|
| -
|
| LocationSummary* TestCidsInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -670,18 +636,16 @@ LocationSummary* TestCidsInstr::MakeLocationSummary(Zone* zone,
|
| return locs;
|
| }
|
|
|
| -
|
| Condition TestCidsInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
|
| BranchLabels labels) {
|
| ASSERT((kind() == Token::kIS) || (kind() == Token::kISNOT));
|
| Register val_reg = locs()->in(0).reg();
|
| Register cid_reg = locs()->temp(0).reg();
|
|
|
| - Label* deopt =
|
| - CanDeoptimize()
|
| - ? compiler->AddDeoptStub(deopt_id(), ICData::kDeoptTestCids,
|
| - licm_hoisted_ ? ICData::kHoisted : 0)
|
| - : NULL;
|
| + Label* deopt = CanDeoptimize() ? compiler->AddDeoptStub(
|
| + deopt_id(), ICData::kDeoptTestCids,
|
| + licm_hoisted_ ? ICData::kHoisted : 0)
|
| + : NULL;
|
|
|
| const intptr_t true_result = (kind() == Token::kIS) ? 1 : 0;
|
| const ZoneGrowableArray<intptr_t>& data = cid_results();
|
| @@ -714,7 +678,6 @@ Condition TestCidsInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
|
| return INVALID_CONDITION;
|
| }
|
|
|
| -
|
| LocationSummary* RelationalOpInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -751,7 +714,6 @@ LocationSummary* RelationalOpInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| Condition RelationalOpInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
|
| BranchLabels labels) {
|
| if (operation_cid() == kSmiCid) {
|
| @@ -764,13 +726,11 @@ Condition RelationalOpInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* NativeCallInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| return MakeCallSummary(zone);
|
| }
|
|
|
| -
|
| void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| SetupNative();
|
| Register result = locs()->out(0).reg();
|
| @@ -807,7 +767,6 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ popl(result);
|
| }
|
|
|
| -
|
| static bool CanBeImmediateIndex(Value* value, intptr_t cid) {
|
| ConstantInstr* constant = value->definition()->AsConstant();
|
| if ((constant == NULL) || !Assembler::IsSafeSmi(constant->value())) {
|
| @@ -820,7 +779,6 @@ static bool CanBeImmediateIndex(Value* value, intptr_t cid) {
|
| return Utils::IsInt(32, displacement);
|
| }
|
|
|
| -
|
| LocationSummary* OneByteStringFromCharCodeInstr::MakeLocationSummary(
|
| Zone* zone,
|
| bool opt) const {
|
| @@ -830,7 +788,6 @@ LocationSummary* OneByteStringFromCharCodeInstr::MakeLocationSummary(
|
| LocationSummary::kNoCall);
|
| }
|
|
|
| -
|
| void OneByteStringFromCharCodeInstr::EmitNativeCode(
|
| FlowGraphCompiler* compiler) {
|
| Register char_code = locs()->in(0).reg();
|
| @@ -842,7 +799,6 @@ void OneByteStringFromCharCodeInstr::EmitNativeCode(
|
| Symbols::kNullCharCodeSymbolOffset * kWordSize));
|
| }
|
|
|
| -
|
| LocationSummary* StringToCharCodeInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -850,7 +806,6 @@ LocationSummary* StringToCharCodeInstr::MakeLocationSummary(Zone* zone,
|
| LocationSummary::kNoCall);
|
| }
|
|
|
| -
|
| void StringToCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(cid_ == kOneByteStringCid);
|
| Register str = locs()->in(0).reg();
|
| @@ -867,7 +822,6 @@ void StringToCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Bind(&done);
|
| }
|
|
|
| -
|
| LocationSummary* StringInterpolateInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -879,7 +833,6 @@ LocationSummary* StringInterpolateInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register array = locs()->in(0).reg();
|
| __ pushl(array);
|
| @@ -892,7 +845,6 @@ void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(locs()->out(0).reg() == EAX);
|
| }
|
|
|
| -
|
| LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -900,7 +852,6 @@ LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Zone* zone,
|
| LocationSummary::kNoCall);
|
| }
|
|
|
| -
|
| void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register obj = locs()->in(0).reg();
|
| Register result = locs()->out(0).reg();
|
| @@ -912,7 +863,6 @@ void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* LoadClassIdInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -920,7 +870,6 @@ LocationSummary* LoadClassIdInstr::MakeLocationSummary(Zone* zone,
|
| LocationSummary::kNoCall);
|
| }
|
|
|
| -
|
| void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| const Register object = locs()->in(0).reg();
|
| const Register result = locs()->out(0).reg();
|
| @@ -945,7 +894,6 @@ void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| CompileType LoadIndexedInstr::ComputeType() const {
|
| switch (class_id_) {
|
| case kArrayCid:
|
| @@ -985,7 +933,6 @@ CompileType LoadIndexedInstr::ComputeType() const {
|
| }
|
| }
|
|
|
| -
|
| Representation LoadIndexedInstr::representation() const {
|
| switch (class_id_) {
|
| case kArrayCid:
|
| @@ -1021,7 +968,6 @@ Representation LoadIndexedInstr::representation() const {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* LoadIndexedInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -1056,7 +1002,6 @@ LocationSummary* LoadIndexedInstr::MakeLocationSummary(Zone* zone,
|
| return locs;
|
| }
|
|
|
| -
|
| void LoadIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // The array register points to the backing store for external arrays.
|
| const Register array = locs()->in(0).reg();
|
| @@ -1156,7 +1101,6 @@ void LoadIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| Representation StoreIndexedInstr::RequiredInputRepresentation(
|
| intptr_t idx) const {
|
| // Array can be a Dart object or a pointer to external data.
|
| @@ -1193,7 +1137,6 @@ Representation StoreIndexedInstr::RequiredInputRepresentation(
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* StoreIndexedInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 3;
|
| @@ -1252,7 +1195,6 @@ LocationSummary* StoreIndexedInstr::MakeLocationSummary(Zone* zone,
|
| return locs;
|
| }
|
|
|
| -
|
| void StoreIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // The array register points to the backing store for external arrays.
|
| const Register array = locs()->in(0).reg();
|
| @@ -1352,7 +1294,6 @@ void StoreIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* GuardFieldClassInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -1384,7 +1325,6 @@ LocationSummary* GuardFieldClassInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(sizeof(classid_t) == kInt16Size);
|
| const intptr_t value_cid = value()->Type()->ToCid();
|
| @@ -1530,7 +1470,6 @@ void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Bind(&ok);
|
| }
|
|
|
| -
|
| LocationSummary* GuardFieldLengthInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -1553,7 +1492,6 @@ LocationSummary* GuardFieldLengthInstr::MakeLocationSummary(Zone* zone,
|
| UNREACHABLE();
|
| }
|
|
|
| -
|
| void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| if (field().guarded_list_length() == Field::kNoFixedLength) {
|
| if (Compiler::IsBackgroundCompilation()) {
|
| @@ -1624,7 +1562,6 @@ void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| class BoxAllocationSlowPath : public SlowPathCode {
|
| public:
|
| BoxAllocationSlowPath(Instruction* instruction,
|
| @@ -1680,7 +1617,6 @@ class BoxAllocationSlowPath : public SlowPathCode {
|
| const Register result_;
|
| };
|
|
|
| -
|
| LocationSummary* StoreInstanceFieldInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -1713,7 +1649,6 @@ LocationSummary* StoreInstanceFieldInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| static void EnsureMutableBox(FlowGraphCompiler* compiler,
|
| StoreInstanceFieldInstr* instruction,
|
| Register box_reg,
|
| @@ -1734,7 +1669,6 @@ static void EnsureMutableBox(FlowGraphCompiler* compiler,
|
| __ Bind(&done);
|
| }
|
|
|
| -
|
| void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(sizeof(classid_t) == kInt16Size);
|
| Label skip_store;
|
| @@ -1832,7 +1766,6 @@ void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // Fall through.
|
| __ jmp(&store_pointer);
|
|
|
| -
|
| if (!compiler->is_optimizing()) {
|
| locs()->live_registers()->Add(locs()->in(0));
|
| locs()->live_registers()->Add(locs()->in(1));
|
| @@ -1888,7 +1821,6 @@ void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Bind(&skip_store);
|
| }
|
|
|
| -
|
| LocationSummary* LoadStaticFieldInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -1902,7 +1834,6 @@ LocationSummary* LoadStaticFieldInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| // When the parser is building an implicit static getter for optimization,
|
| // it can generate a function body where deoptimization ids do not line up
|
| // with the unoptimized code.
|
| @@ -1914,7 +1845,6 @@ void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ movl(result, FieldAddress(field, Field::static_value_offset()));
|
| }
|
|
|
| -
|
| LocationSummary* StoreStaticFieldInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| LocationSummary* locs =
|
| @@ -1925,7 +1855,6 @@ LocationSummary* StoreStaticFieldInstr::MakeLocationSummary(Zone* zone,
|
| return locs;
|
| }
|
|
|
| -
|
| void StoreStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register value = locs()->in(0).reg();
|
| Register temp = locs()->temp(0).reg();
|
| @@ -1940,7 +1869,6 @@ void StoreStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* InstanceOfInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 3;
|
| @@ -1954,7 +1882,6 @@ LocationSummary* InstanceOfInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void InstanceOfInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(locs()->in(0).reg() == EAX); // Value.
|
| ASSERT(locs()->in(1).reg() == EDX); // Instantiator type arguments.
|
| @@ -1964,7 +1891,6 @@ void InstanceOfInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(locs()->out(0).reg() == EAX);
|
| }
|
|
|
| -
|
| // TODO(srdjan): In case of constant inputs make CreateArray kNoCall and
|
| // use slow path stub.
|
| LocationSummary* CreateArrayInstr::MakeLocationSummary(Zone* zone,
|
| @@ -1979,7 +1905,6 @@ LocationSummary* CreateArrayInstr::MakeLocationSummary(Zone* zone,
|
| return locs;
|
| }
|
|
|
| -
|
| // Inlines array allocation for known constant values.
|
| static void InlineArrayAllocation(FlowGraphCompiler* compiler,
|
| intptr_t num_elements,
|
| @@ -2034,7 +1959,6 @@ static void InlineArrayAllocation(FlowGraphCompiler* compiler,
|
| __ jmp(done, Assembler::kNearJump);
|
| }
|
|
|
| -
|
| void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // Allocate the array. EDX = length, ECX = element type.
|
| const Register kLengthReg = EDX;
|
| @@ -2074,7 +1998,6 @@ void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(locs()->out(0).reg() == kResultReg);
|
| }
|
|
|
| -
|
| LocationSummary* LoadFieldInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -2082,9 +2005,9 @@ LocationSummary* LoadFieldInstr::MakeLocationSummary(Zone* zone,
|
| (IsUnboxedLoad() && opt) ? 1 : ((IsPotentialUnboxedLoad()) ? 2 : 0);
|
|
|
| LocationSummary* locs = new (zone) LocationSummary(
|
| - zone, kNumInputs, kNumTemps, (opt && !IsPotentialUnboxedLoad())
|
| - ? LocationSummary::kNoCall
|
| - : LocationSummary::kCallOnSlowPath);
|
| + zone, kNumInputs, kNumTemps,
|
| + (opt && !IsPotentialUnboxedLoad()) ? LocationSummary::kNoCall
|
| + : LocationSummary::kCallOnSlowPath);
|
|
|
| locs->set_in(0, Location::RequiresRegister());
|
|
|
| @@ -2099,7 +2022,6 @@ LocationSummary* LoadFieldInstr::MakeLocationSummary(Zone* zone,
|
| return locs;
|
| }
|
|
|
| -
|
| void LoadFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(sizeof(classid_t) == kInt16Size);
|
|
|
| @@ -2134,7 +2056,6 @@ void LoadFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register temp = locs()->temp(1).reg();
|
| XmmRegister value = locs()->temp(0).fpu_reg();
|
|
|
| -
|
| Label load_pointer;
|
| Label load_double;
|
| Label load_float32x4;
|
| @@ -2200,7 +2121,6 @@ void LoadFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Bind(&done);
|
| }
|
|
|
| -
|
| LocationSummary* InstantiateTypeInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -2213,7 +2133,6 @@ LocationSummary* InstantiateTypeInstr::MakeLocationSummary(Zone* zone,
|
| return locs;
|
| }
|
|
|
| -
|
| void InstantiateTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register instantiator_type_args_reg = locs()->in(0).reg();
|
| Register function_type_args_reg = locs()->in(1).reg();
|
| @@ -2233,7 +2152,6 @@ void InstantiateTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(instantiator_type_args_reg == result_reg);
|
| }
|
|
|
| -
|
| LocationSummary* InstantiateTypeArgumentsInstr::MakeLocationSummary(
|
| Zone* zone,
|
| bool opt) const {
|
| @@ -2247,7 +2165,6 @@ LocationSummary* InstantiateTypeArgumentsInstr::MakeLocationSummary(
|
| return locs;
|
| }
|
|
|
| -
|
| void InstantiateTypeArgumentsInstr::EmitNativeCode(
|
| FlowGraphCompiler* compiler) {
|
| Register instantiator_type_args_reg = locs()->in(0).reg();
|
| @@ -2316,7 +2233,6 @@ void InstantiateTypeArgumentsInstr::EmitNativeCode(
|
| __ Bind(&type_arguments_instantiated);
|
| }
|
|
|
| -
|
| LocationSummary* AllocateUninitializedContextInstr::MakeLocationSummary(
|
| Zone* zone,
|
| bool opt) const {
|
| @@ -2331,7 +2247,6 @@ LocationSummary* AllocateUninitializedContextInstr::MakeLocationSummary(
|
| return locs;
|
| }
|
|
|
| -
|
| class AllocateContextSlowPath : public SlowPathCode {
|
| public:
|
| explicit AllocateContextSlowPath(
|
| @@ -2363,7 +2278,6 @@ class AllocateContextSlowPath : public SlowPathCode {
|
| AllocateUninitializedContextInstr* instruction_;
|
| };
|
|
|
| -
|
| void AllocateUninitializedContextInstr::EmitNativeCode(
|
| FlowGraphCompiler* compiler) {
|
| ASSERT(compiler->is_optimizing());
|
| @@ -2388,7 +2302,6 @@ void AllocateUninitializedContextInstr::EmitNativeCode(
|
| __ Bind(slow_path->exit_label());
|
| }
|
|
|
| -
|
| LocationSummary* AllocateContextInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 0;
|
| @@ -2400,7 +2313,6 @@ LocationSummary* AllocateContextInstr::MakeLocationSummary(Zone* zone,
|
| return locs;
|
| }
|
|
|
| -
|
| void AllocateContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(locs()->temp(0).reg() == EDX);
|
| ASSERT(locs()->out(0).reg() == EAX);
|
| @@ -2410,7 +2322,6 @@ void AllocateContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| RawPcDescriptors::kOther, locs());
|
| }
|
|
|
| -
|
| LocationSummary* InitStaticFieldInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -2422,7 +2333,6 @@ LocationSummary* InitStaticFieldInstr::MakeLocationSummary(Zone* zone,
|
| return locs;
|
| }
|
|
|
| -
|
| void InitStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register field = locs()->in(0).reg();
|
| Register temp = locs()->temp(0).reg();
|
| @@ -2445,7 +2355,6 @@ void InitStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Bind(&no_call);
|
| }
|
|
|
| -
|
| LocationSummary* CloneContextInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -2457,7 +2366,6 @@ LocationSummary* CloneContextInstr::MakeLocationSummary(Zone* zone,
|
| return locs;
|
| }
|
|
|
| -
|
| void CloneContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register context_value = locs()->in(0).reg();
|
| Register result = locs()->out(0).reg();
|
| @@ -2470,14 +2378,12 @@ void CloneContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ popl(result); // Get result (cloned context).
|
| }
|
|
|
| -
|
| LocationSummary* CatchBlockEntryInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| UNREACHABLE();
|
| return NULL;
|
| }
|
|
|
| -
|
| void CatchBlockEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Bind(compiler->GetJumpLabel(this));
|
| compiler->AddExceptionHandler(catch_try_index(), try_index(),
|
| @@ -2552,7 +2458,6 @@ void CatchBlockEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* CheckStackOverflowInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 0;
|
| @@ -2565,7 +2470,6 @@ LocationSummary* CheckStackOverflowInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| class CheckStackOverflowSlowPath : public SlowPathCode {
|
| public:
|
| explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction)
|
| @@ -2612,7 +2516,6 @@ class CheckStackOverflowSlowPath : public SlowPathCode {
|
| Label osr_entry_label_;
|
| };
|
|
|
| -
|
| void CheckStackOverflowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| CheckStackOverflowSlowPath* slow_path = new CheckStackOverflowSlowPath(this);
|
| compiler->AddSlowPathCode(slow_path);
|
| @@ -2638,7 +2541,6 @@ void CheckStackOverflowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Bind(slow_path->exit_label());
|
| }
|
|
|
| -
|
| static void EmitSmiShiftLeft(FlowGraphCompiler* compiler,
|
| BinarySmiOpInstr* shift_left) {
|
| const LocationSummary& locs = *shift_left->locs();
|
| @@ -2750,7 +2652,6 @@ static void EmitSmiShiftLeft(FlowGraphCompiler* compiler,
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* CheckedSmiOpInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| // Only for precompiled code, not on ia32 currently.
|
| @@ -2758,13 +2659,11 @@ LocationSummary* CheckedSmiOpInstr::MakeLocationSummary(Zone* zone,
|
| return NULL;
|
| }
|
|
|
| -
|
| void CheckedSmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // Only for precompiled code, not on ia32 currently.
|
| UNIMPLEMENTED();
|
| }
|
|
|
| -
|
| LocationSummary* CheckedSmiComparisonInstr::MakeLocationSummary(
|
| Zone* zone,
|
| bool opt) const {
|
| @@ -2773,7 +2672,6 @@ LocationSummary* CheckedSmiComparisonInstr::MakeLocationSummary(
|
| return NULL;
|
| }
|
|
|
| -
|
| Condition CheckedSmiComparisonInstr::EmitComparisonCode(
|
| FlowGraphCompiler* compiler,
|
| BranchLabels labels) {
|
| @@ -2782,25 +2680,21 @@ Condition CheckedSmiComparisonInstr::EmitComparisonCode(
|
| return ZERO;
|
| }
|
|
|
| -
|
| void CheckedSmiComparisonInstr::EmitBranchCode(FlowGraphCompiler* compiler,
|
| BranchInstr* instr) {
|
| // Only for precompiled code, not on ia32 currently.
|
| UNIMPLEMENTED();
|
| }
|
|
|
| -
|
| void CheckedSmiComparisonInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // Only for precompiled code, not on ia32 currently.
|
| UNIMPLEMENTED();
|
| }
|
|
|
| -
|
| static bool IsSmiValue(const Object& constant, intptr_t value) {
|
| return constant.IsSmi() && (Smi::Cast(constant).Value() == value);
|
| }
|
|
|
| -
|
| LocationSummary* BinarySmiOpInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -2874,7 +2768,6 @@ LocationSummary* BinarySmiOpInstr::MakeLocationSummary(Zone* zone,
|
| }
|
| }
|
|
|
| -
|
| template <typename OperandType>
|
| static void EmitIntegerArithmetic(FlowGraphCompiler* compiler,
|
| Token::Kind op_kind,
|
| @@ -2906,7 +2799,6 @@ static void EmitIntegerArithmetic(FlowGraphCompiler* compiler,
|
| if (deopt != NULL) __ j(OVERFLOW, deopt);
|
| }
|
|
|
| -
|
| void BinarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| if (op_kind() == Token::kSHL) {
|
| EmitSmiShiftLeft(compiler, this);
|
| @@ -2998,7 +2890,6 @@ void BinarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| EmitIntegerArithmetic(compiler, op_kind(), left, right, deopt);
|
| break;
|
|
|
| -
|
| case Token::kTRUNCDIV: {
|
| if (RangeUtils::CanBeZero(right_range())) {
|
| // Handle divide by zero in runtime.
|
| @@ -3107,7 +2998,6 @@ void BinarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* BinaryInt32OpInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -3152,7 +3042,6 @@ LocationSummary* BinaryInt32OpInstr::MakeLocationSummary(Zone* zone,
|
| }
|
| }
|
|
|
| -
|
| static void EmitInt32ShiftLeft(FlowGraphCompiler* compiler,
|
| BinaryInt32OpInstr* shift_left) {
|
| const LocationSummary& locs = *shift_left->locs();
|
| @@ -3184,7 +3073,6 @@ static void EmitInt32ShiftLeft(FlowGraphCompiler* compiler,
|
| __ shll(left, Immediate(value));
|
| }
|
|
|
| -
|
| void BinaryInt32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| if (op_kind() == Token::kSHL) {
|
| EmitInt32ShiftLeft(compiler, this);
|
| @@ -3214,7 +3102,6 @@ void BinaryInt32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| deopt);
|
| break;
|
|
|
| -
|
| case Token::kTRUNCDIV: {
|
| UNREACHABLE();
|
| break;
|
| @@ -3258,7 +3145,6 @@ void BinaryInt32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* BinaryUint32OpInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -3276,7 +3162,6 @@ LocationSummary* BinaryUint32OpInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void BinaryUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register left = locs()->in(0).reg();
|
| Register right = locs()->in(1).reg();
|
| @@ -3301,7 +3186,6 @@ void BinaryUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* CheckEitherNonSmiInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| intptr_t left_cid = left()->Type()->ToCid();
|
| @@ -3319,7 +3203,6 @@ LocationSummary* CheckEitherNonSmiInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void CheckEitherNonSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Label* deopt =
|
| compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryDoubleOp,
|
| @@ -3343,7 +3226,6 @@ void CheckEitherNonSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ j(ZERO, deopt);
|
| }
|
|
|
| -
|
| LocationSummary* BoxInstr::MakeLocationSummary(Zone* zone, bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| const intptr_t kNumTemps = 1;
|
| @@ -3355,7 +3237,6 @@ LocationSummary* BoxInstr::MakeLocationSummary(Zone* zone, bool opt) const {
|
| return summary;
|
| }
|
|
|
| -
|
| void BoxInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register out_reg = locs()->out(0).reg();
|
| XmmRegister value = locs()->in(0).fpu_reg();
|
| @@ -3379,7 +3260,6 @@ void BoxInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* UnboxInstr::MakeLocationSummary(Zone* zone, bool opt) const {
|
| const bool needs_temp =
|
| CanDeoptimize() ||
|
| @@ -3402,7 +3282,6 @@ LocationSummary* UnboxInstr::MakeLocationSummary(Zone* zone, bool opt) const {
|
| return summary;
|
| }
|
|
|
| -
|
| void UnboxInstr::EmitLoadFromBox(FlowGraphCompiler* compiler) {
|
| const Register box = locs()->in(0).reg();
|
|
|
| @@ -3435,7 +3314,6 @@ void UnboxInstr::EmitLoadFromBox(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| void UnboxInstr::EmitSmiConversion(FlowGraphCompiler* compiler) {
|
| const Register box = locs()->in(0).reg();
|
|
|
| @@ -3465,7 +3343,6 @@ void UnboxInstr::EmitSmiConversion(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| void UnboxInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| const intptr_t value_cid = value()->Type()->ToCid();
|
| const intptr_t box_cid = BoxCid();
|
| @@ -3506,7 +3383,6 @@ void UnboxInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* BoxInteger32Instr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -3527,7 +3403,6 @@ LocationSummary* BoxInteger32Instr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void BoxInteger32Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| const Register value = locs()->in(0).reg();
|
| const Register out = locs()->out(0).reg();
|
| @@ -3562,7 +3437,6 @@ void BoxInteger32Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* BoxInt64Instr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -3580,7 +3454,6 @@ LocationSummary* BoxInt64Instr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void BoxInt64Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| if (ValueFitsSmi()) {
|
| PairLocation* value_pair = locs()->in(0).AsPairLocation();
|
| @@ -3628,7 +3501,6 @@ void BoxInt64Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Bind(&done);
|
| }
|
|
|
| -
|
| LocationSummary* UnboxInteger32Instr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t value_cid = value()->Type()->ToCid();
|
| @@ -3655,7 +3527,6 @@ LocationSummary* UnboxInteger32Instr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| static void LoadInt32FromMint(FlowGraphCompiler* compiler,
|
| Register result,
|
| const Address& lo,
|
| @@ -3672,16 +3543,14 @@ static void LoadInt32FromMint(FlowGraphCompiler* compiler,
|
| }
|
| }
|
|
|
| -
|
| void UnboxInteger32Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| const intptr_t value_cid = value()->Type()->ToCid();
|
| Register value = locs()->in(0).reg();
|
| const Register result = locs()->out(0).reg();
|
| const Register temp = CanDeoptimize() ? locs()->temp(0).reg() : kNoRegister;
|
| - Label* deopt =
|
| - CanDeoptimize()
|
| - ? compiler->AddDeoptStub(GetDeoptId(), ICData::kDeoptUnboxInteger)
|
| - : NULL;
|
| + Label* deopt = CanDeoptimize() ? compiler->AddDeoptStub(
|
| + GetDeoptId(), ICData::kDeoptUnboxInteger)
|
| + : NULL;
|
| Label* out_of_range = !is_truncating() ? deopt : NULL;
|
|
|
| const intptr_t lo_offset = Mint::value_offset();
|
| @@ -3717,7 +3586,6 @@ void UnboxInteger32Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* LoadCodeUnitsInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const bool might_box = (representation() == kTagged) && !can_pack_into_smi();
|
| @@ -3747,7 +3615,6 @@ LocationSummary* LoadCodeUnitsInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void LoadCodeUnitsInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // The string register points to the backing store for external strings.
|
| const Register str = locs()->in(0).reg();
|
| @@ -3846,7 +3713,6 @@ void LoadCodeUnitsInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* BinaryDoubleOpInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -3859,7 +3725,6 @@ LocationSummary* BinaryDoubleOpInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void BinaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister left = locs()->in(0).fpu_reg();
|
| XmmRegister right = locs()->in(1).fpu_reg();
|
| @@ -3884,7 +3749,6 @@ void BinaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* DoubleTestOpInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -3900,7 +3764,6 @@ LocationSummary* DoubleTestOpInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| Condition DoubleTestOpInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
|
| BranchLabels labels) {
|
| ASSERT(compiler->is_optimizing());
|
| @@ -3934,7 +3797,6 @@ Condition DoubleTestOpInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* BinaryFloat32x4OpInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -3947,7 +3809,6 @@ LocationSummary* BinaryFloat32x4OpInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void BinaryFloat32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister left = locs()->in(0).fpu_reg();
|
| XmmRegister right = locs()->in(1).fpu_reg();
|
| @@ -3972,7 +3833,6 @@ void BinaryFloat32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* BinaryFloat64x2OpInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -3985,7 +3845,6 @@ LocationSummary* BinaryFloat64x2OpInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void BinaryFloat64x2OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister left = locs()->in(0).fpu_reg();
|
| XmmRegister right = locs()->in(1).fpu_reg();
|
| @@ -4010,7 +3869,6 @@ void BinaryFloat64x2OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* Simd32x4ShuffleInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -4022,7 +3880,6 @@ LocationSummary* Simd32x4ShuffleInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Simd32x4ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister value = locs()->in(0).fpu_reg();
|
|
|
| @@ -4054,7 +3911,6 @@ void Simd32x4ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* Simd32x4ShuffleMixInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -4067,7 +3923,6 @@ LocationSummary* Simd32x4ShuffleMixInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Simd32x4ShuffleMixInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister left = locs()->in(0).fpu_reg();
|
| XmmRegister right = locs()->in(1).fpu_reg();
|
| @@ -4083,7 +3938,6 @@ void Simd32x4ShuffleMixInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* Simd32x4GetSignMaskInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -4095,7 +3949,6 @@ LocationSummary* Simd32x4GetSignMaskInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Simd32x4GetSignMaskInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister value = locs()->in(0).fpu_reg();
|
| Register out = locs()->out(0).reg();
|
| @@ -4104,7 +3957,6 @@ void Simd32x4GetSignMaskInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ SmiTag(out);
|
| }
|
|
|
| -
|
| LocationSummary* Float32x4ConstructorInstr::MakeLocationSummary(
|
| Zone* zone,
|
| bool opt) const {
|
| @@ -4120,7 +3972,6 @@ LocationSummary* Float32x4ConstructorInstr::MakeLocationSummary(
|
| return summary;
|
| }
|
|
|
| -
|
| void Float32x4ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister v0 = locs()->in(0).fpu_reg();
|
| XmmRegister v1 = locs()->in(1).fpu_reg();
|
| @@ -4143,7 +3994,6 @@ void Float32x4ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ addl(ESP, Immediate(16));
|
| }
|
|
|
| -
|
| LocationSummary* Float32x4ZeroInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 0;
|
| @@ -4154,13 +4004,11 @@ LocationSummary* Float32x4ZeroInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Float32x4ZeroInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister value = locs()->out(0).fpu_reg();
|
| __ xorps(value, value);
|
| }
|
|
|
| -
|
| LocationSummary* Float32x4SplatInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -4172,7 +4020,6 @@ LocationSummary* Float32x4SplatInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Float32x4SplatInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister value = locs()->out(0).fpu_reg();
|
| ASSERT(locs()->in(0).fpu_reg() == locs()->out(0).fpu_reg());
|
| @@ -4182,7 +4029,6 @@ void Float32x4SplatInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ shufps(value, value, Immediate(0x00));
|
| }
|
|
|
| -
|
| LocationSummary* Float32x4ComparisonInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -4195,7 +4041,6 @@ LocationSummary* Float32x4ComparisonInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Float32x4ComparisonInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister left = locs()->in(0).fpu_reg();
|
| XmmRegister right = locs()->in(1).fpu_reg();
|
| @@ -4227,7 +4072,6 @@ void Float32x4ComparisonInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* Float32x4MinMaxInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -4240,7 +4084,6 @@ LocationSummary* Float32x4MinMaxInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Float32x4MinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister left = locs()->in(0).fpu_reg();
|
| XmmRegister right = locs()->in(1).fpu_reg();
|
| @@ -4259,7 +4102,6 @@ void Float32x4MinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* Float32x4ScaleInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -4272,7 +4114,6 @@ LocationSummary* Float32x4ScaleInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Float32x4ScaleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister left = locs()->in(0).fpu_reg();
|
| XmmRegister right = locs()->in(1).fpu_reg();
|
| @@ -4290,7 +4131,6 @@ void Float32x4ScaleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* Float32x4SqrtInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -4302,7 +4142,6 @@ LocationSummary* Float32x4SqrtInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Float32x4SqrtInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister left = locs()->in(0).fpu_reg();
|
|
|
| @@ -4323,7 +4162,6 @@ void Float32x4SqrtInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* Float32x4ZeroArgInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -4335,7 +4173,6 @@ LocationSummary* Float32x4ZeroArgInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Float32x4ZeroArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister left = locs()->in(0).fpu_reg();
|
|
|
| @@ -4352,7 +4189,6 @@ void Float32x4ZeroArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* Float32x4ClampInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 3;
|
| @@ -4366,7 +4202,6 @@ LocationSummary* Float32x4ClampInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Float32x4ClampInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister left = locs()->in(0).fpu_reg();
|
| XmmRegister lower = locs()->in(1).fpu_reg();
|
| @@ -4376,7 +4211,6 @@ void Float32x4ClampInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ maxps(left, lower);
|
| }
|
|
|
| -
|
| LocationSummary* Float32x4WithInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -4389,7 +4223,6 @@ LocationSummary* Float32x4WithInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Float32x4WithInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister replacement = locs()->in(0).fpu_reg();
|
| XmmRegister value = locs()->in(1).fpu_reg();
|
| @@ -4446,7 +4279,6 @@ void Float32x4WithInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* Float32x4ToInt32x4Instr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -4458,12 +4290,10 @@ LocationSummary* Float32x4ToInt32x4Instr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Float32x4ToInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // NOP.
|
| }
|
|
|
| -
|
| LocationSummary* Simd64x2ShuffleInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -4475,7 +4305,6 @@ LocationSummary* Simd64x2ShuffleInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Simd64x2ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister value = locs()->in(0).fpu_reg();
|
|
|
| @@ -4493,7 +4322,6 @@ void Simd64x2ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* Float64x2ZeroInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 0;
|
| @@ -4504,13 +4332,11 @@ LocationSummary* Float64x2ZeroInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Float64x2ZeroInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister value = locs()->out(0).fpu_reg();
|
| __ xorpd(value, value);
|
| }
|
|
|
| -
|
| LocationSummary* Float64x2SplatInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -4522,13 +4348,11 @@ LocationSummary* Float64x2SplatInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Float64x2SplatInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister value = locs()->out(0).fpu_reg();
|
| __ shufpd(value, value, Immediate(0x0));
|
| }
|
|
|
| -
|
| LocationSummary* Float64x2ConstructorInstr::MakeLocationSummary(
|
| Zone* zone,
|
| bool opt) const {
|
| @@ -4542,7 +4366,6 @@ LocationSummary* Float64x2ConstructorInstr::MakeLocationSummary(
|
| return summary;
|
| }
|
|
|
| -
|
| void Float64x2ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister v0 = locs()->in(0).fpu_reg();
|
| XmmRegister v1 = locs()->in(1).fpu_reg();
|
| @@ -4553,7 +4376,6 @@ void Float64x2ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ shufpd(v0, v1, Immediate(0x0));
|
| }
|
|
|
| -
|
| LocationSummary* Float64x2ToFloat32x4Instr::MakeLocationSummary(
|
| Zone* zone,
|
| bool opt) const {
|
| @@ -4566,13 +4388,11 @@ LocationSummary* Float64x2ToFloat32x4Instr::MakeLocationSummary(
|
| return summary;
|
| }
|
|
|
| -
|
| void Float64x2ToFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister value = locs()->out(0).fpu_reg();
|
| __ cvtpd2ps(value, value);
|
| }
|
|
|
| -
|
| LocationSummary* Float32x4ToFloat64x2Instr::MakeLocationSummary(
|
| Zone* zone,
|
| bool opt) const {
|
| @@ -4585,13 +4405,11 @@ LocationSummary* Float32x4ToFloat64x2Instr::MakeLocationSummary(
|
| return summary;
|
| }
|
|
|
| -
|
| void Float32x4ToFloat64x2Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister value = locs()->out(0).fpu_reg();
|
| __ cvtps2pd(value, value);
|
| }
|
|
|
| -
|
| LocationSummary* Float64x2ZeroArgInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -4609,7 +4427,6 @@ LocationSummary* Float64x2ZeroArgInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Float64x2ZeroArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister left = locs()->in(0).fpu_reg();
|
|
|
| @@ -4635,7 +4452,6 @@ void Float64x2ZeroArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* Float64x2OneArgInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -4648,7 +4464,6 @@ LocationSummary* Float64x2OneArgInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Float64x2OneArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister left = locs()->in(0).fpu_reg();
|
| XmmRegister right = locs()->in(1).fpu_reg();
|
| @@ -4690,7 +4505,6 @@ void Float64x2OneArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* Int32x4ConstructorInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 4;
|
| @@ -4705,7 +4519,6 @@ LocationSummary* Int32x4ConstructorInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Int32x4ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register v0 = locs()->in(0).reg();
|
| Register v1 = locs()->in(1).reg();
|
| @@ -4721,7 +4534,6 @@ void Int32x4ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ addl(ESP, Immediate(4 * kInt32Size));
|
| }
|
|
|
| -
|
| LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary(
|
| Zone* zone,
|
| bool opt) const {
|
| @@ -4737,7 +4549,6 @@ LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary(
|
| return summary;
|
| }
|
|
|
| -
|
| void Int32x4BoolConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register v0 = locs()->in(0).reg();
|
| Register v1 = locs()->in(1).reg();
|
| @@ -4785,7 +4596,6 @@ void Int32x4BoolConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ addl(ESP, Immediate(16));
|
| }
|
|
|
| -
|
| LocationSummary* Int32x4GetFlagInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -4797,7 +4607,6 @@ LocationSummary* Int32x4GetFlagInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Int32x4GetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister value = locs()->in(0).fpu_reg();
|
| Register result = locs()->out(0).reg();
|
| @@ -4832,7 +4641,6 @@ void Int32x4GetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Bind(&done);
|
| }
|
|
|
| -
|
| LocationSummary* Int32x4SelectInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 3;
|
| @@ -4847,7 +4655,6 @@ LocationSummary* Int32x4SelectInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Int32x4SelectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister mask = locs()->in(0).fpu_reg();
|
| XmmRegister trueValue = locs()->in(1).fpu_reg();
|
| @@ -4867,7 +4674,6 @@ void Int32x4SelectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ orps(mask, temp);
|
| }
|
|
|
| -
|
| LocationSummary* Int32x4SetFlagInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -4880,7 +4686,6 @@ LocationSummary* Int32x4SetFlagInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Int32x4SetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister mask = locs()->in(0).fpu_reg();
|
| Register flag = locs()->in(1).reg();
|
| @@ -4925,7 +4730,6 @@ void Int32x4SetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ addl(ESP, Immediate(16));
|
| }
|
|
|
| -
|
| LocationSummary* Int32x4ToFloat32x4Instr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -4937,12 +4741,10 @@ LocationSummary* Int32x4ToFloat32x4Instr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void Int32x4ToFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // NOP.
|
| }
|
|
|
| -
|
| LocationSummary* BinaryInt32x4OpInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -4955,7 +4757,6 @@ LocationSummary* BinaryInt32x4OpInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void BinaryInt32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister left = locs()->in(0).fpu_reg();
|
| XmmRegister right = locs()->in(1).fpu_reg();
|
| @@ -4984,7 +4785,6 @@ void BinaryInt32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* MathUnaryInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| ASSERT((kind() == MathUnaryInstr::kSqrt) ||
|
| @@ -5002,7 +4802,6 @@ LocationSummary* MathUnaryInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void MathUnaryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| if (kind() == MathUnaryInstr::kSqrt) {
|
| __ sqrtsd(locs()->out(0).fpu_reg(), locs()->in(0).fpu_reg());
|
| @@ -5015,7 +4814,6 @@ void MathUnaryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* CaseInsensitiveCompareUC16Instr::MakeLocationSummary(
|
| Zone* zone,
|
| bool opt) const {
|
| @@ -5030,7 +4828,6 @@ LocationSummary* CaseInsensitiveCompareUC16Instr::MakeLocationSummary(
|
| return summary;
|
| }
|
|
|
| -
|
| void CaseInsensitiveCompareUC16Instr::EmitNativeCode(
|
| FlowGraphCompiler* compiler) {
|
| // Save ESP. EDI is chosen because it is callee saved so we do not need to
|
| @@ -5051,7 +4848,6 @@ void CaseInsensitiveCompareUC16Instr::EmitNativeCode(
|
| __ movl(ESP, kSavedSPReg);
|
| }
|
|
|
| -
|
| LocationSummary* MathMinMaxInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| if (result_cid() == kDoubleCid) {
|
| @@ -5079,7 +4875,6 @@ LocationSummary* MathMinMaxInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void MathMinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT((op_kind() == MethodRecognizer::kMathMin) ||
|
| (op_kind() == MethodRecognizer::kMathMax));
|
| @@ -5140,7 +4935,6 @@ void MathMinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* UnarySmiOpInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -5148,7 +4942,6 @@ LocationSummary* UnarySmiOpInstr::MakeLocationSummary(Zone* zone,
|
| LocationSummary::kNoCall);
|
| }
|
|
|
| -
|
| void UnarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register value = locs()->in(0).reg();
|
| ASSERT(value == locs()->out(0).reg());
|
| @@ -5168,7 +4961,6 @@ void UnarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* UnaryDoubleOpInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -5180,14 +4972,12 @@ LocationSummary* UnaryDoubleOpInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void UnaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister value = locs()->in(0).fpu_reg();
|
| ASSERT(locs()->out(0).fpu_reg() == value);
|
| __ DoubleNegate(value);
|
| }
|
|
|
| -
|
| LocationSummary* Int32ToDoubleInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -5199,14 +4989,12 @@ LocationSummary* Int32ToDoubleInstr::MakeLocationSummary(Zone* zone,
|
| return result;
|
| }
|
|
|
| -
|
| void Int32ToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register value = locs()->in(0).reg();
|
| FpuRegister result = locs()->out(0).fpu_reg();
|
| __ cvtsi2sd(result, value);
|
| }
|
|
|
| -
|
| LocationSummary* SmiToDoubleInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -5218,7 +5006,6 @@ LocationSummary* SmiToDoubleInstr::MakeLocationSummary(Zone* zone,
|
| return result;
|
| }
|
|
|
| -
|
| void SmiToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register value = locs()->in(0).reg();
|
| FpuRegister result = locs()->out(0).fpu_reg();
|
| @@ -5226,7 +5013,6 @@ void SmiToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ cvtsi2sd(result, value);
|
| }
|
|
|
| -
|
| LocationSummary* MintToDoubleInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -5239,7 +5025,6 @@ LocationSummary* MintToDoubleInstr::MakeLocationSummary(Zone* zone,
|
| return result;
|
| }
|
|
|
| -
|
| void MintToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| PairLocation* pair = locs()->in(0).AsPairLocation();
|
| Register in_lo = pair->At(0).reg();
|
| @@ -5261,7 +5046,6 @@ void MintToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ addl(ESP, Immediate(2 * kWordSize));
|
| }
|
|
|
| -
|
| LocationSummary* DoubleToIntegerInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -5273,7 +5057,6 @@ LocationSummary* DoubleToIntegerInstr::MakeLocationSummary(Zone* zone,
|
| return result;
|
| }
|
|
|
| -
|
| void DoubleToIntegerInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register result = locs()->out(0).reg();
|
| Register value_obj = locs()->in(0).reg();
|
| @@ -5304,7 +5087,6 @@ void DoubleToIntegerInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Bind(&done);
|
| }
|
|
|
| -
|
| LocationSummary* DoubleToSmiInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -5316,7 +5098,6 @@ LocationSummary* DoubleToSmiInstr::MakeLocationSummary(Zone* zone,
|
| return result;
|
| }
|
|
|
| -
|
| void DoubleToSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptDoubleToSmi);
|
| Register result = locs()->out(0).reg();
|
| @@ -5328,7 +5109,6 @@ void DoubleToSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ SmiTag(result);
|
| }
|
|
|
| -
|
| LocationSummary* DoubleToDoubleInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -5340,7 +5120,6 @@ LocationSummary* DoubleToDoubleInstr::MakeLocationSummary(Zone* zone,
|
| return result;
|
| }
|
|
|
| -
|
| void DoubleToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister value = locs()->in(0).fpu_reg();
|
| XmmRegister result = locs()->out(0).fpu_reg();
|
| @@ -5359,7 +5138,6 @@ void DoubleToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* DoubleToFloatInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -5371,12 +5149,10 @@ LocationSummary* DoubleToFloatInstr::MakeLocationSummary(Zone* zone,
|
| return result;
|
| }
|
|
|
| -
|
| void DoubleToFloatInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ cvtsd2ss(locs()->out(0).fpu_reg(), locs()->in(0).fpu_reg());
|
| }
|
|
|
| -
|
| LocationSummary* FloatToDoubleInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -5388,12 +5164,10 @@ LocationSummary* FloatToDoubleInstr::MakeLocationSummary(Zone* zone,
|
| return result;
|
| }
|
|
|
| -
|
| void FloatToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ cvtss2sd(locs()->out(0).fpu_reg(), locs()->in(0).fpu_reg());
|
| }
|
|
|
| -
|
| LocationSummary* InvokeMathCFunctionInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| ASSERT((InputCount() == 1) || (InputCount() == 2));
|
| @@ -5418,7 +5192,6 @@ LocationSummary* InvokeMathCFunctionInstr::MakeLocationSummary(Zone* zone,
|
| return result;
|
| }
|
|
|
| -
|
| // Pseudo code:
|
| // if (exponent == 0.0) return 1.0;
|
| // // Speed up simple cases.
|
| @@ -5551,7 +5324,6 @@ static void InvokeDoublePow(FlowGraphCompiler* compiler,
|
| __ Bind(&skip_call);
|
| }
|
|
|
| -
|
| void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| if (recognized_kind() == MethodRecognizer::kMathDoublePow) {
|
| InvokeDoublePow(compiler, this);
|
| @@ -5571,7 +5343,6 @@ void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ movl(ESP, locs()->temp(kSavedSpTempIndex).reg());
|
| }
|
|
|
| -
|
| LocationSummary* ExtractNthOutputInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| // Only use this instruction in optimized code.
|
| @@ -5604,7 +5375,6 @@ LocationSummary* ExtractNthOutputInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void ExtractNthOutputInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(locs()->in(0).IsPairLocation());
|
| PairLocation* pair = locs()->in(0).AsPairLocation();
|
| @@ -5621,7 +5391,6 @@ void ExtractNthOutputInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* TruncDivModInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -5637,7 +5406,6 @@ LocationSummary* TruncDivModInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void TruncDivModInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(CanDeoptimize());
|
| Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinarySmiOp);
|
| @@ -5701,14 +5469,12 @@ void TruncDivModInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ SmiTag(EDX);
|
| }
|
|
|
| -
|
| LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary(
|
| Zone* zone,
|
| bool opt) const {
|
| return MakeCallSummary(zone);
|
| }
|
|
|
| -
|
| LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, bool opt) const {
|
| comparison()->InitializeLocationSummary(zone, opt);
|
| // Branches don't produce a result.
|
| @@ -5716,12 +5482,10 @@ LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, bool opt) const {
|
| return comparison()->locs();
|
| }
|
|
|
| -
|
| void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| comparison()->EmitBranchCode(compiler, this);
|
| }
|
|
|
| -
|
| LocationSummary* CheckClassInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -5739,7 +5503,6 @@ LocationSummary* CheckClassInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void CheckClassInstr::EmitNullCheck(FlowGraphCompiler* compiler, Label* deopt) {
|
| const Immediate& raw_null =
|
| Immediate(reinterpret_cast<intptr_t>(Object::null()));
|
| @@ -5749,7 +5512,6 @@ void CheckClassInstr::EmitNullCheck(FlowGraphCompiler* compiler, Label* deopt) {
|
| __ j(cond, deopt);
|
| }
|
|
|
| -
|
| void CheckClassInstr::EmitBitTest(FlowGraphCompiler* compiler,
|
| intptr_t min,
|
| intptr_t max,
|
| @@ -5766,7 +5528,6 @@ void CheckClassInstr::EmitBitTest(FlowGraphCompiler* compiler,
|
| __ j(NOT_CARRY, deopt);
|
| }
|
|
|
| -
|
| int CheckClassInstr::EmitCheckCid(FlowGraphCompiler* compiler,
|
| int bias,
|
| intptr_t cid_start,
|
| @@ -5803,7 +5564,6 @@ int CheckClassInstr::EmitCheckCid(FlowGraphCompiler* compiler,
|
| return bias;
|
| }
|
|
|
| -
|
| LocationSummary* CheckSmiInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -5814,7 +5574,6 @@ LocationSummary* CheckSmiInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register value = locs()->in(0).reg();
|
| Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckSmi,
|
| @@ -5822,7 +5581,6 @@ void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ BranchIfNotSmi(value, deopt);
|
| }
|
|
|
| -
|
| LocationSummary* CheckClassIdInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -5834,7 +5592,6 @@ LocationSummary* CheckClassIdInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void CheckClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register value = locs()->in(0).reg();
|
| Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckClass);
|
| @@ -5848,7 +5605,6 @@ void CheckClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* GenericCheckBoundInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| // Only needed for AOT.
|
| @@ -5856,13 +5612,11 @@ LocationSummary* GenericCheckBoundInstr::MakeLocationSummary(Zone* zone,
|
| return NULL;
|
| }
|
|
|
| -
|
| void GenericCheckBoundInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // Only needed for AOT.
|
| UNIMPLEMENTED();
|
| }
|
|
|
| -
|
| // Length: register or constant.
|
| // Index: register, constant or stack slot.
|
| LocationSummary* CheckArrayBoundInstr::MakeLocationSummary(Zone* zone,
|
| @@ -5880,7 +5634,6 @@ LocationSummary* CheckArrayBoundInstr::MakeLocationSummary(Zone* zone,
|
| return locs;
|
| }
|
|
|
| -
|
| void CheckArrayBoundInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| uint32_t flags = generalized_ ? ICData::kGeneralized : 0;
|
| flags |= licm_hoisted_ ? ICData::kHoisted : 0;
|
| @@ -5943,7 +5696,6 @@ void CheckArrayBoundInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* BinaryMintOpInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -5976,7 +5728,6 @@ LocationSummary* BinaryMintOpInstr::MakeLocationSummary(Zone* zone,
|
| }
|
| }
|
|
|
| -
|
| void BinaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| PairLocation* left_pair = locs()->in(0).AsPairLocation();
|
| Register left_lo = left_pair->At(0).reg();
|
| @@ -6046,7 +5797,6 @@ void BinaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* ShiftMintOpInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -6065,7 +5815,6 @@ LocationSummary* ShiftMintOpInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| PairLocation* left_pair = locs()->in(0).AsPairLocation();
|
| Register left_lo = left_pair->At(0).reg();
|
| @@ -6238,7 +5987,6 @@ void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* UnaryMintOpInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -6251,7 +5999,6 @@ LocationSummary* UnaryMintOpInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void UnaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(op_kind() == Token::kBIT_NOT);
|
| PairLocation* left_pair = locs()->in(0).AsPairLocation();
|
| @@ -6266,22 +6013,18 @@ void UnaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ notl(left_hi);
|
| }
|
|
|
| -
|
| CompileType BinaryUint32OpInstr::ComputeType() const {
|
| return CompileType::Int();
|
| }
|
|
|
| -
|
| CompileType ShiftUint32OpInstr::ComputeType() const {
|
| return CompileType::Int();
|
| }
|
|
|
| -
|
| CompileType UnaryUint32OpInstr::ComputeType() const {
|
| return CompileType::Int();
|
| }
|
|
|
| -
|
| LocationSummary* ShiftUint32OpInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -6294,7 +6037,6 @@ LocationSummary* ShiftUint32OpInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void ShiftUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| const intptr_t kShifterLimit = 31;
|
|
|
| @@ -6302,7 +6044,6 @@ void ShiftUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register out = locs()->out(0).reg();
|
| ASSERT(left == out);
|
|
|
| -
|
| Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp);
|
|
|
| if (locs()->in(1).IsConstant()) {
|
| @@ -6312,7 +6053,6 @@ void ShiftUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(constant.IsSmi());
|
| const intptr_t shift_value = Smi::Cast(constant).Value();
|
|
|
| -
|
| // Do the shift: (shift_value > 0) && (shift_value <= kShifterLimit).
|
| switch (op_kind()) {
|
| case Token::kSHR:
|
| @@ -6366,7 +6106,6 @@ void ShiftUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Bind(&done);
|
| }
|
|
|
| -
|
| LocationSummary* UnaryUint32OpInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -6378,7 +6117,6 @@ LocationSummary* UnaryUint32OpInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void UnaryUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register out = locs()->out(0).reg();
|
| ASSERT(locs()->in(0).reg() == out);
|
| @@ -6388,7 +6126,6 @@ void UnaryUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ notl(out);
|
| }
|
|
|
| -
|
| LocationSummary* UnboxedIntConverterInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -6417,7 +6154,6 @@ LocationSummary* UnboxedIntConverterInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void UnboxedIntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| if (from() == kUnboxedInt32 && to() == kUnboxedUint32) {
|
| // Representations are bitwise equivalent.
|
| @@ -6473,24 +6209,20 @@ void UnboxedIntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* ThrowInstr::MakeLocationSummary(Zone* zone, bool opt) const {
|
| return new (zone) LocationSummary(zone, 0, 0, LocationSummary::kCall);
|
| }
|
|
|
| -
|
| void ThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| compiler->GenerateRuntimeCall(token_pos(), deopt_id(), kThrowRuntimeEntry, 1,
|
| locs());
|
| __ int3();
|
| }
|
|
|
| -
|
| LocationSummary* ReThrowInstr::MakeLocationSummary(Zone* zone, bool opt) const {
|
| return new (zone) LocationSummary(zone, 0, 0, LocationSummary::kCall);
|
| }
|
|
|
| -
|
| void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| compiler->SetNeedsStackTrace(catch_try_index());
|
| compiler->GenerateRuntimeCall(token_pos(), deopt_id(), kReThrowRuntimeEntry,
|
| @@ -6498,29 +6230,24 @@ void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ int3();
|
| }
|
|
|
| -
|
| LocationSummary* StopInstr::MakeLocationSummary(Zone* zone, bool opt) const {
|
| return new (zone) LocationSummary(zone, 0, 0, LocationSummary::kNoCall);
|
| }
|
|
|
| -
|
| void StopInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Stop(message());
|
| }
|
|
|
| -
|
| void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| if (!compiler->CanFallThroughTo(normal_entry())) {
|
| __ jmp(compiler->GetJumpLabel(normal_entry()));
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* GotoInstr::MakeLocationSummary(Zone* zone, bool opt) const {
|
| return new (zone) LocationSummary(zone, 0, 0, LocationSummary::kNoCall);
|
| }
|
|
|
| -
|
| void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| if (!compiler->is_optimizing()) {
|
| if (FLAG_reorder_basic_blocks) {
|
| @@ -6542,7 +6269,6 @@ void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* IndirectGotoInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -6557,7 +6283,6 @@ LocationSummary* IndirectGotoInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void IndirectGotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register target_reg = locs()->temp_slot(0)->reg();
|
|
|
| @@ -6580,7 +6305,6 @@ void IndirectGotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ jmp(target_reg);
|
| }
|
|
|
| -
|
| LocationSummary* StrictCompareInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 2;
|
| @@ -6605,7 +6329,6 @@ LocationSummary* StrictCompareInstr::MakeLocationSummary(Zone* zone,
|
| return locs;
|
| }
|
|
|
| -
|
| Condition StrictCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
|
| BranchLabels labels) {
|
| Location left = locs()->in(0);
|
| @@ -6631,14 +6354,12 @@ Condition StrictCompareInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
|
| return true_condition;
|
| }
|
|
|
| -
|
| // Detect pattern when one value is zero and another is a power of 2.
|
| static bool IsPowerOfTwoKind(intptr_t v1, intptr_t v2) {
|
| return (Utils::IsPowerOfTwo(v1) && (v2 == 0)) ||
|
| (Utils::IsPowerOfTwo(v2) && (v1 == 0));
|
| }
|
|
|
| -
|
| LocationSummary* IfThenElseInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| comparison()->InitializeLocationSummary(zone, opt);
|
| @@ -6647,7 +6368,6 @@ LocationSummary* IfThenElseInstr::MakeLocationSummary(Zone* zone,
|
| return comparison()->locs();
|
| }
|
|
|
| -
|
| void IfThenElseInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(locs()->out(0).reg() == EDX);
|
|
|
| @@ -6699,7 +6419,6 @@ void IfThenElseInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
| }
|
|
|
| -
|
| LocationSummary* ClosureCallInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| const intptr_t kNumInputs = 1;
|
| @@ -6711,7 +6430,6 @@ LocationSummary* ClosureCallInstr::MakeLocationSummary(Zone* zone,
|
| return summary;
|
| }
|
|
|
| -
|
| void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // Load arguments descriptor.
|
| const intptr_t argument_count = ArgumentCount(); // Includes type args.
|
| @@ -6743,14 +6461,12 @@ void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Drop(argument_count);
|
| }
|
|
|
| -
|
| LocationSummary* BooleanNegateInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| return LocationSummary::Make(zone, 1, Location::RequiresRegister(),
|
| LocationSummary::kNoCall);
|
| }
|
|
|
| -
|
| void BooleanNegateInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register value = locs()->in(0).reg();
|
| Register result = locs()->out(0).reg();
|
| @@ -6763,13 +6479,11 @@ void BooleanNegateInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Bind(&done);
|
| }
|
|
|
| -
|
| LocationSummary* AllocateObjectInstr::MakeLocationSummary(Zone* zone,
|
| bool opt) const {
|
| return MakeCallSummary(zone);
|
| }
|
|
|
| -
|
| void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| const Code& stub = Code::ZoneHandle(
|
| compiler->zone(), StubCode::GetAllocationStubForClass(cls()));
|
| @@ -6780,14 +6494,12 @@ void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ Drop(ArgumentCount()); // Discard arguments.
|
| }
|
|
|
| -
|
| void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(!compiler->is_optimizing());
|
| __ Call(*StubCode::DebugStepCheck_entry());
|
| compiler->EmitCallsiteMetaData(token_pos(), deopt_id_, stub_kind_, locs());
|
| }
|
|
|
| -
|
| } // namespace dart
|
|
|
| #undef __
|
|
|