OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1074 HIsObject* compare = HIsObject::cast(v); | 1074 HIsObject* compare = HIsObject::cast(v); |
1075 ASSERT(compare->value()->representation().IsTagged()); | 1075 ASSERT(compare->value()->representation().IsTagged()); |
1076 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value())); | 1076 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value())); |
1077 } else if (v->IsCompareJSObjectEq()) { | 1077 } else if (v->IsCompareJSObjectEq()) { |
1078 HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v); | 1078 HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v); |
1079 return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()), | 1079 return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()), |
1080 UseRegisterAtStart(compare->right())); | 1080 UseRegisterAtStart(compare->right())); |
1081 } else if (v->IsInstanceOf()) { | 1081 } else if (v->IsInstanceOf()) { |
1082 HInstanceOf* instance_of = HInstanceOf::cast(v); | 1082 HInstanceOf* instance_of = HInstanceOf::cast(v); |
1083 LInstanceOfAndBranch* result = | 1083 LInstanceOfAndBranch* result = |
1084 new LInstanceOfAndBranch( | 1084 new LInstanceOfAndBranch(UseFixed(instance_of->left(), rax), |
1085 UseFixed(instance_of->left(), InstanceofStub::left()), | 1085 UseFixed(instance_of->right()), rdx); |
Rico
2011/02/16 14:43:25
is the parenthesis not in the wrong place above? r
William Hesse
2011/02/16 15:15:06
This was a last minute change. This is dead code,
| |
1086 UseFixed(instance_of->right(), InstanceofStub::right())); | |
1087 return MarkAsCall(result, instr); | 1086 return MarkAsCall(result, instr); |
1088 } else if (v->IsTypeofIs()) { | 1087 } else if (v->IsTypeofIs()) { |
1089 HTypeofIs* typeof_is = HTypeofIs::cast(v); | 1088 HTypeofIs* typeof_is = HTypeofIs::cast(v); |
1090 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value())); | 1089 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value())); |
1091 } else if (v->IsIsConstructCall()) { | 1090 } else if (v->IsIsConstructCall()) { |
1092 return new LIsConstructCallAndBranch(TempRegister()); | 1091 return new LIsConstructCallAndBranch(TempRegister()); |
1093 } else { | 1092 } else { |
1094 if (v->IsConstant()) { | 1093 if (v->IsConstant()) { |
1095 if (HConstant::cast(v)->handle()->IsTrue()) { | 1094 if (HConstant::cast(v)->handle()->IsTrue()) { |
1096 return new LGoto(instr->FirstSuccessor()->block_id()); | 1095 return new LGoto(instr->FirstSuccessor()->block_id()); |
(...skipping 20 matching lines...) Expand all Loading... | |
1117 return DefineAsRegister(new LArgumentsLength(Use(length->value()))); | 1116 return DefineAsRegister(new LArgumentsLength(Use(length->value()))); |
1118 } | 1117 } |
1119 | 1118 |
1120 | 1119 |
1121 LInstruction* LChunkBuilder::DoArgumentsElements(HArgumentsElements* elems) { | 1120 LInstruction* LChunkBuilder::DoArgumentsElements(HArgumentsElements* elems) { |
1122 return DefineAsRegister(new LArgumentsElements); | 1121 return DefineAsRegister(new LArgumentsElements); |
1123 } | 1122 } |
1124 | 1123 |
1125 | 1124 |
1126 LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) { | 1125 LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) { |
1127 Abort("Unimplemented: %s", "DoInstanceOf"); | 1126 LOperand* left = UseFixed(instr->left(), rax); |
1128 return NULL; | 1127 LOperand* right = UseFixed(instr->right(), rdx); |
1128 LInstanceOf* result = new LInstanceOf(left, right); | |
1129 return MarkAsCall(DefineFixed(result, rax), instr); | |
1129 } | 1130 } |
1130 | 1131 |
1131 | 1132 |
1132 LInstruction* LChunkBuilder::DoInstanceOfKnownGlobal( | 1133 LInstruction* LChunkBuilder::DoInstanceOfKnownGlobal( |
1133 HInstanceOfKnownGlobal* instr) { | 1134 HInstanceOfKnownGlobal* instr) { |
1134 Abort("Unimplemented: %s", "DoInstanceOfKnownGlobal"); | 1135 LInstanceOfKnownGlobal* result = |
1135 return NULL; | 1136 new LInstanceOfKnownGlobal(UseRegisterAtStart(instr->value())); |
1137 MarkAsSaveDoubles(result); | |
1138 return AssignEnvironment(AssignPointerMap(DefineFixed(result, rax))); | |
1136 } | 1139 } |
1137 | 1140 |
1138 | 1141 |
1139 LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) { | 1142 LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) { |
1140 Abort("Unimplemented: %s", "DoApplyArguments"); | 1143 Abort("Unimplemented: %s", "DoApplyArguments"); |
1141 return NULL; | 1144 return NULL; |
1142 } | 1145 } |
1143 | 1146 |
1144 | 1147 |
1145 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { | 1148 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1895 | 1898 |
1896 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 1899 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
1897 HEnvironment* outer = current_block_->last_environment()->outer(); | 1900 HEnvironment* outer = current_block_->last_environment()->outer(); |
1898 current_block_->UpdateEnvironment(outer); | 1901 current_block_->UpdateEnvironment(outer); |
1899 return NULL; | 1902 return NULL; |
1900 } | 1903 } |
1901 | 1904 |
1902 } } // namespace v8::internal | 1905 } } // namespace v8::internal |
1903 | 1906 |
1904 #endif // V8_TARGET_ARCH_X64 | 1907 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |