| Index: src/arm/lithium-arm.cc
|
| ===================================================================
|
| --- src/arm/lithium-arm.cc (revision 7948)
|
| +++ src/arm/lithium-arm.cc (working copy)
|
| @@ -237,6 +237,13 @@
|
| }
|
|
|
|
|
| +void LIsUndetectableAndBranch::PrintDataTo(StringStream* stream) {
|
| + stream->Add("if is_undetectable(");
|
| + InputAt(0)->PrintTo(stream);
|
| + stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
| +}
|
| +
|
| +
|
| void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("if has_instance_type(");
|
| InputAt(0)->PrintTo(stream);
|
| @@ -1015,6 +1022,8 @@
|
| outer);
|
| int argument_index = 0;
|
| for (int i = 0; i < value_count; ++i) {
|
| + if (hydrogen_env->is_special_index(i)) continue;
|
| +
|
| HValue* value = hydrogen_env->values()->at(i);
|
| LOperand* op = NULL;
|
| if (value->IsArgumentsObject()) {
|
| @@ -1079,6 +1088,12 @@
|
| ASSERT(compare->value()->representation().IsTagged());
|
|
|
| return new LIsSmiAndBranch(Use(compare->value()));
|
| + } else if (v->IsIsUndetectable()) {
|
| + HIsUndetectable* compare = HIsUndetectable::cast(v);
|
| + ASSERT(compare->value()->representation().IsTagged());
|
| +
|
| + return new LIsUndetectableAndBranch(UseRegisterAtStart(compare->value()),
|
| + TempRegister());
|
| } else if (v->IsHasInstanceType()) {
|
| HHasInstanceType* compare = HHasInstanceType::cast(v);
|
| ASSERT(compare->value()->representation().IsTagged());
|
| @@ -1105,6 +1120,10 @@
|
| HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v);
|
| return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()),
|
| UseRegisterAtStart(compare->right()));
|
| + } else if (v->IsCompareSymbolEq()) {
|
| + HCompareSymbolEq* compare = HCompareSymbolEq::cast(v);
|
| + return new LCmpSymbolEqAndBranch(UseRegisterAtStart(compare->left()),
|
| + UseRegisterAtStart(compare->right()));
|
| } else if (v->IsInstanceOf()) {
|
| HInstanceOf* instance_of = HInstanceOf::cast(v);
|
| LInstruction* result =
|
| @@ -1187,7 +1206,7 @@
|
|
|
|
|
| LInstruction* LChunkBuilder::DoContext(HContext* instr) {
|
| - return DefineAsRegister(new LContext);
|
| + return instr->HasNoUses() ? NULL : DefineAsRegister(new LContext);
|
| }
|
|
|
|
|
| @@ -1505,6 +1524,15 @@
|
| }
|
|
|
|
|
| +LInstruction* LChunkBuilder::DoCompareSymbolEq(
|
| + HCompareSymbolEq* instr) {
|
| + LOperand* left = UseRegisterAtStart(instr->left());
|
| + LOperand* right = UseRegisterAtStart(instr->right());
|
| + LCmpSymbolEq* result = new LCmpSymbolEq(left, right);
|
| + return DefineAsRegister(result);
|
| +}
|
| +
|
| +
|
| LInstruction* LChunkBuilder::DoIsNull(HIsNull* instr) {
|
| ASSERT(instr->value()->representation().IsTagged());
|
| LOperand* value = UseRegisterAtStart(instr->value());
|
| @@ -1529,6 +1557,14 @@
|
| }
|
|
|
|
|
| +LInstruction* LChunkBuilder::DoIsUndetectable(HIsUndetectable* instr) {
|
| + ASSERT(instr->value()->representation().IsTagged());
|
| + LOperand* value = UseRegisterAtStart(instr->value());
|
| +
|
| + return DefineAsRegister(new LIsUndetectable(value));
|
| +}
|
| +
|
| +
|
| LInstruction* LChunkBuilder::DoHasInstanceType(HHasInstanceType* instr) {
|
| ASSERT(instr->value()->representation().IsTagged());
|
| LOperand* value = UseRegisterAtStart(instr->value());
|
| @@ -1607,6 +1643,14 @@
|
| }
|
|
|
|
|
| +LInstruction* LChunkBuilder::DoForceRepresentation(HForceRepresentation* bad) {
|
| + // All HForceRepresentation instructions should be eliminated in the
|
| + // representation change phase of Hydrogen.
|
| + UNREACHABLE();
|
| + return NULL;
|
| +}
|
| +
|
| +
|
| LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
| Representation from = instr->from();
|
| Representation to = instr->to();
|
| @@ -1715,6 +1759,24 @@
|
| }
|
|
|
|
|
| +LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) {
|
| + HValue* value = instr->value();
|
| + Representation input_rep = value->representation();
|
| + LOperand* reg = UseRegister(value);
|
| + if (input_rep.IsDouble()) {
|
| + return DefineAsRegister(new LClampDToUint8(reg, FixedTemp(d1)));
|
| + } else if (input_rep.IsInteger32()) {
|
| + return DefineAsRegister(new LClampIToUint8(reg));
|
| + } else {
|
| + ASSERT(input_rep.IsTagged());
|
| + // Register allocator doesn't (yet) support allocation of double
|
| + // temps. Reserve d1 explicitly.
|
| + LClampTToUint8* result = new LClampTToUint8(reg, FixedTemp(d1));
|
| + return AssignEnvironment(DefineAsRegister(result));
|
| + }
|
| +}
|
| +
|
| +
|
| LInstruction* LChunkBuilder::DoReturn(HReturn* instr) {
|
| return new LReturn(UseFixed(instr->value(), r0));
|
| }
|
| @@ -1861,7 +1923,7 @@
|
| array_type == kExternalDoubleArray)));
|
| ASSERT(instr->key()->representation().IsInteger32());
|
| LOperand* external_pointer = UseRegister(instr->external_pointer());
|
| - LOperand* key = UseRegister(instr->key());
|
| + LOperand* key = UseRegisterOrConstant(instr->key());
|
| LLoadKeyedSpecializedArrayElement* result =
|
| new LLoadKeyedSpecializedArrayElement(external_pointer, key);
|
| LInstruction* load_instr = DefineAsRegister(result);
|
| @@ -1919,7 +1981,7 @@
|
| LOperand* val = val_is_temp_register
|
| ? UseTempRegister(instr->value())
|
| : UseRegister(instr->value());
|
| - LOperand* key = UseRegister(instr->key());
|
| + LOperand* key = UseRegisterOrConstant(instr->key());
|
|
|
| return new LStoreKeyedSpecializedArrayElement(external_pointer,
|
| key,
|
|
|