| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 ASSERT(register_spills_[allocation_index] == NULL); | 55 ASSERT(register_spills_[allocation_index] == NULL); |
| 56 register_spills_[allocation_index] = spill_operand; | 56 register_spills_[allocation_index] = spill_operand; |
| 57 } | 57 } |
| 58 | 58 |
| 59 | 59 |
| 60 #ifdef DEBUG | 60 #ifdef DEBUG |
| 61 void LInstruction::VerifyCall() { | 61 void LInstruction::VerifyCall() { |
| 62 // Call instructions can use only fixed registers as | 62 // Call instructions can use only fixed registers as |
| 63 // temporaries and outputs because all registers | 63 // temporaries and outputs because all registers |
| 64 // are blocked by the calling convention. | 64 // are blocked by the calling convention. |
| 65 // Inputs can use either fixed register or have a short lifetime (be | 65 // Inputs must use a fixed register. |
| 66 // used at start of the instruction). | |
| 67 ASSERT(Output() == NULL || | 66 ASSERT(Output() == NULL || |
| 68 LUnallocated::cast(Output())->HasFixedPolicy() || | 67 LUnallocated::cast(Output())->HasFixedPolicy() || |
| 69 !LUnallocated::cast(Output())->HasRegisterPolicy()); | 68 !LUnallocated::cast(Output())->HasRegisterPolicy()); |
| 70 for (UseIterator it(this); it.HasNext(); it.Advance()) { | 69 for (UseIterator it(this); it.HasNext(); it.Advance()) { |
| 71 LOperand* operand = it.Next(); | 70 LOperand* operand = it.Next(); |
| 72 ASSERT(LUnallocated::cast(operand)->HasFixedPolicy() || | 71 ASSERT(LUnallocated::cast(operand)->HasFixedPolicy() || |
| 73 LUnallocated::cast(operand)->IsUsedAtStart() || | |
| 74 !LUnallocated::cast(operand)->HasRegisterPolicy()); | 72 !LUnallocated::cast(operand)->HasRegisterPolicy()); |
| 75 } | 73 } |
| 76 for (TempIterator it(this); it.HasNext(); it.Advance()) { | 74 for (TempIterator it(this); it.HasNext(); it.Advance()) { |
| 77 LOperand* operand = it.Next(); | 75 LOperand* operand = it.Next(); |
| 78 ASSERT(LUnallocated::cast(operand)->HasFixedPolicy() || | 76 ASSERT(LUnallocated::cast(operand)->HasFixedPolicy() || |
| 79 !LUnallocated::cast(operand)->HasRegisterPolicy()); | 77 !LUnallocated::cast(operand)->HasRegisterPolicy()); |
| 80 } | 78 } |
| 81 } | 79 } |
| 82 #endif | 80 #endif |
| 83 | 81 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 const char* LArithmeticT::Mnemonic() const { | 177 const char* LArithmeticT::Mnemonic() const { |
| 180 switch (op()) { | 178 switch (op()) { |
| 181 case Token::ADD: return "add-t"; | 179 case Token::ADD: return "add-t"; |
| 182 case Token::SUB: return "sub-t"; | 180 case Token::SUB: return "sub-t"; |
| 183 case Token::MUL: return "mul-t"; | 181 case Token::MUL: return "mul-t"; |
| 184 case Token::MOD: return "mod-t"; | 182 case Token::MOD: return "mod-t"; |
| 185 case Token::DIV: return "div-t"; | 183 case Token::DIV: return "div-t"; |
| 186 case Token::BIT_AND: return "bit-and-t"; | 184 case Token::BIT_AND: return "bit-and-t"; |
| 187 case Token::BIT_OR: return "bit-or-t"; | 185 case Token::BIT_OR: return "bit-or-t"; |
| 188 case Token::BIT_XOR: return "bit-xor-t"; | 186 case Token::BIT_XOR: return "bit-xor-t"; |
| 187 case Token::SHL: return "shl-t"; |
| 188 case Token::SAR: return "sar-t"; |
| 189 case Token::SHR: return "shr-t"; |
| 189 default: | 190 default: |
| 190 UNREACHABLE(); | 191 UNREACHABLE(); |
| 191 return NULL; | 192 return NULL; |
| 192 } | 193 } |
| 193 } | 194 } |
| 194 | 195 |
| 195 | 196 |
| 196 void LGoto::PrintDataTo(StringStream* stream) { | 197 void LGoto::PrintDataTo(StringStream* stream) { |
| 197 stream->Add("B%d", block_id()); | 198 stream->Add("B%d", block_id()); |
| 198 } | 199 } |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 arguments()->PrintTo(stream); | 339 arguments()->PrintTo(stream); |
| 339 | 340 |
| 340 stream->Add(" length "); | 341 stream->Add(" length "); |
| 341 length()->PrintTo(stream); | 342 length()->PrintTo(stream); |
| 342 | 343 |
| 343 stream->Add(" index "); | 344 stream->Add(" index "); |
| 344 index()->PrintTo(stream); | 345 index()->PrintTo(stream); |
| 345 } | 346 } |
| 346 | 347 |
| 347 | 348 |
| 348 void LStoreNamed::PrintDataTo(StringStream* stream) { | 349 void LStoreNamedField::PrintDataTo(StringStream* stream) { |
| 349 object()->PrintTo(stream); | 350 object()->PrintTo(stream); |
| 350 stream->Add("."); | 351 stream->Add("."); |
| 351 stream->Add(*String::cast(*name())->ToCString()); | 352 stream->Add(*String::cast(*name())->ToCString()); |
| 352 stream->Add(" <- "); | 353 stream->Add(" <- "); |
| 353 value()->PrintTo(stream); | 354 value()->PrintTo(stream); |
| 354 } | 355 } |
| 355 | 356 |
| 356 | 357 |
| 357 void LStoreKeyed::PrintDataTo(StringStream* stream) { | 358 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) { |
| 359 object()->PrintTo(stream); |
| 360 stream->Add("."); |
| 361 stream->Add(*String::cast(*name())->ToCString()); |
| 362 stream->Add(" <- "); |
| 363 value()->PrintTo(stream); |
| 364 } |
| 365 |
| 366 |
| 367 void LStoreKeyedFastElement::PrintDataTo(StringStream* stream) { |
| 358 object()->PrintTo(stream); | 368 object()->PrintTo(stream); |
| 359 stream->Add("["); | 369 stream->Add("["); |
| 360 key()->PrintTo(stream); | 370 key()->PrintTo(stream); |
| 361 stream->Add("] <- "); | 371 stream->Add("] <- "); |
| 362 value()->PrintTo(stream); | 372 value()->PrintTo(stream); |
| 363 } | 373 } |
| 364 | 374 |
| 365 | 375 |
| 376 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { |
| 377 object()->PrintTo(stream); |
| 378 stream->Add("["); |
| 379 key()->PrintTo(stream); |
| 380 stream->Add("] <- "); |
| 381 value()->PrintTo(stream); |
| 382 } |
| 383 |
| 384 |
| 366 LChunk::LChunk(HGraph* graph) | 385 LChunk::LChunk(HGraph* graph) |
| 367 : spill_slot_count_(0), | 386 : spill_slot_count_(0), |
| 368 graph_(graph), | 387 graph_(graph), |
| 369 instructions_(32), | 388 instructions_(32), |
| 370 pointer_maps_(8), | 389 pointer_maps_(8), |
| 371 inlined_closures_(1) { | 390 inlined_closures_(1) { |
| 372 } | 391 } |
| 373 | 392 |
| 374 | 393 |
| 375 int LChunk::GetNextSpillIndex(bool is_double) { | 394 int LChunk::GetNextSpillIndex(bool is_double) { |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 LOperand* left = UseFixed(instr->left(), r1); | 814 LOperand* left = UseFixed(instr->left(), r1); |
| 796 LOperand* right = UseFixed(instr->right(), r0); | 815 LOperand* right = UseFixed(instr->right(), r0); |
| 797 LArithmeticT* result = new LArithmeticT(op, left, right); | 816 LArithmeticT* result = new LArithmeticT(op, left, right); |
| 798 return MarkAsCall(DefineFixed(result, r0), instr); | 817 return MarkAsCall(DefineFixed(result, r0), instr); |
| 799 } | 818 } |
| 800 } | 819 } |
| 801 | 820 |
| 802 | 821 |
| 803 LInstruction* LChunkBuilder::DoShift(Token::Value op, | 822 LInstruction* LChunkBuilder::DoShift(Token::Value op, |
| 804 HBitwiseBinaryOperation* instr) { | 823 HBitwiseBinaryOperation* instr) { |
| 824 if (instr->representation().IsTagged()) { |
| 825 ASSERT(instr->left()->representation().IsTagged()); |
| 826 ASSERT(instr->right()->representation().IsTagged()); |
| 827 |
| 828 LOperand* left = UseFixed(instr->left(), r1); |
| 829 LOperand* right = UseFixed(instr->right(), r0); |
| 830 LArithmeticT* result = new LArithmeticT(op, left, right); |
| 831 return MarkAsCall(DefineFixed(result, r0), instr); |
| 832 } |
| 833 |
| 805 ASSERT(instr->representation().IsInteger32()); | 834 ASSERT(instr->representation().IsInteger32()); |
| 806 ASSERT(instr->OperandAt(0)->representation().IsInteger32()); | 835 ASSERT(instr->OperandAt(0)->representation().IsInteger32()); |
| 807 ASSERT(instr->OperandAt(1)->representation().IsInteger32()); | 836 ASSERT(instr->OperandAt(1)->representation().IsInteger32()); |
| 808 LOperand* left = UseRegisterAtStart(instr->OperandAt(0)); | 837 LOperand* left = UseRegisterAtStart(instr->OperandAt(0)); |
| 809 | 838 |
| 810 HValue* right_value = instr->OperandAt(1); | 839 HValue* right_value = instr->OperandAt(1); |
| 811 LOperand* right = NULL; | 840 LOperand* right = NULL; |
| 812 int constant_value = 0; | 841 int constant_value = 0; |
| 813 if (right_value->IsConstant()) { | 842 if (right_value->IsConstant()) { |
| 814 HConstant* constant = HConstant::cast(right_value); | 843 HConstant* constant = HConstant::cast(right_value); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 837 if (can_deopt) AssignEnvironment(result); | 866 if (can_deopt) AssignEnvironment(result); |
| 838 return result; | 867 return result; |
| 839 } | 868 } |
| 840 | 869 |
| 841 | 870 |
| 842 LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op, | 871 LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op, |
| 843 HArithmeticBinaryOperation* instr) { | 872 HArithmeticBinaryOperation* instr) { |
| 844 ASSERT(instr->representation().IsDouble()); | 873 ASSERT(instr->representation().IsDouble()); |
| 845 ASSERT(instr->left()->representation().IsDouble()); | 874 ASSERT(instr->left()->representation().IsDouble()); |
| 846 ASSERT(instr->right()->representation().IsDouble()); | 875 ASSERT(instr->right()->representation().IsDouble()); |
| 876 ASSERT(op != Token::MOD); |
| 847 LOperand* left = UseRegisterAtStart(instr->left()); | 877 LOperand* left = UseRegisterAtStart(instr->left()); |
| 848 LOperand* right = UseRegisterAtStart(instr->right()); | 878 LOperand* right = UseRegisterAtStart(instr->right()); |
| 849 LArithmeticD* result = new LArithmeticD(op, left, right); | 879 LArithmeticD* result = new LArithmeticD(op, left, right); |
| 850 return DefineSameAsFirst(result); | 880 return DefineSameAsFirst(result); |
| 851 } | 881 } |
| 852 | 882 |
| 853 | 883 |
| 854 LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op, | 884 LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op, |
| 855 HArithmeticBinaryOperation* instr) { | 885 HArithmeticBinaryOperation* instr) { |
| 856 ASSERT(op == Token::ADD || | 886 ASSERT(op == Token::ADD || |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 } else if (v->IsCompare()) { | 1044 } else if (v->IsCompare()) { |
| 1015 HCompare* compare = HCompare::cast(v); | 1045 HCompare* compare = HCompare::cast(v); |
| 1016 Token::Value op = compare->token(); | 1046 Token::Value op = compare->token(); |
| 1017 HValue* left = compare->left(); | 1047 HValue* left = compare->left(); |
| 1018 HValue* right = compare->right(); | 1048 HValue* right = compare->right(); |
| 1019 Representation r = compare->GetInputRepresentation(); | 1049 Representation r = compare->GetInputRepresentation(); |
| 1020 if (r.IsInteger32()) { | 1050 if (r.IsInteger32()) { |
| 1021 ASSERT(left->representation().IsInteger32()); | 1051 ASSERT(left->representation().IsInteger32()); |
| 1022 ASSERT(right->representation().IsInteger32()); | 1052 ASSERT(right->representation().IsInteger32()); |
| 1023 return new LCmpIDAndBranch(UseRegisterAtStart(left), | 1053 return new LCmpIDAndBranch(UseRegisterAtStart(left), |
| 1024 UseOrConstantAtStart(right)); | 1054 UseRegisterAtStart(right)); |
| 1025 } else if (r.IsDouble()) { | 1055 } else if (r.IsDouble()) { |
| 1026 ASSERT(left->representation().IsDouble()); | 1056 ASSERT(left->representation().IsDouble()); |
| 1027 ASSERT(right->representation().IsDouble()); | 1057 ASSERT(right->representation().IsDouble()); |
| 1028 return new LCmpIDAndBranch(UseRegisterAtStart(left), | 1058 return new LCmpIDAndBranch(UseRegisterAtStart(left), |
| 1029 UseRegisterAtStart(right)); | 1059 UseRegisterAtStart(right)); |
| 1030 } else { | 1060 } else { |
| 1031 ASSERT(left->representation().IsTagged()); | 1061 ASSERT(left->representation().IsTagged()); |
| 1032 ASSERT(right->representation().IsTagged()); | 1062 ASSERT(right->representation().IsTagged()); |
| 1033 bool reversed = op == Token::GT || op == Token::LTE; | 1063 bool reversed = op == Token::GT || op == Token::LTE; |
| 1034 LOperand* left_operand = UseFixed(left, reversed ? r0 : r1); | 1064 LOperand* left_operand = UseFixed(left, reversed ? r0 : r1); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1118 new LInstanceOf(UseFixed(instr->left(), r0), | 1148 new LInstanceOf(UseFixed(instr->left(), r0), |
| 1119 UseFixed(instr->right(), r1)); | 1149 UseFixed(instr->right(), r1)); |
| 1120 return MarkAsCall(DefineFixed(result, r0), instr); | 1150 return MarkAsCall(DefineFixed(result, r0), instr); |
| 1121 } | 1151 } |
| 1122 | 1152 |
| 1123 | 1153 |
| 1124 LInstruction* LChunkBuilder::DoInstanceOfKnownGlobal( | 1154 LInstruction* LChunkBuilder::DoInstanceOfKnownGlobal( |
| 1125 HInstanceOfKnownGlobal* instr) { | 1155 HInstanceOfKnownGlobal* instr) { |
| 1126 LInstanceOfKnownGlobal* result = | 1156 LInstanceOfKnownGlobal* result = |
| 1127 new LInstanceOfKnownGlobal(UseFixed(instr->value(), r0), FixedTemp(r4)); | 1157 new LInstanceOfKnownGlobal(UseFixed(instr->value(), r0), FixedTemp(r4)); |
| 1128 MarkAsSaveDoubles(result); | 1158 return MarkAsCall(DefineFixed(result, r0), instr); |
| 1129 return AssignEnvironment(AssignPointerMap(DefineFixed(result, r0))); | |
| 1130 } | 1159 } |
| 1131 | 1160 |
| 1132 | 1161 |
| 1133 LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) { | 1162 LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) { |
| 1134 LOperand* function = UseFixed(instr->function(), r1); | 1163 LOperand* function = UseFixed(instr->function(), r1); |
| 1135 LOperand* receiver = UseFixed(instr->receiver(), r0); | 1164 LOperand* receiver = UseFixed(instr->receiver(), r0); |
| 1136 LOperand* length = UseRegisterAtStart(instr->length()); | 1165 LOperand* length = UseFixed(instr->length(), r2); |
| 1137 LOperand* elements = UseRegisterAtStart(instr->elements()); | 1166 LOperand* elements = UseFixed(instr->elements(), r3); |
| 1138 LApplyArguments* result = new LApplyArguments(function, | 1167 LApplyArguments* result = new LApplyArguments(function, |
| 1139 receiver, | 1168 receiver, |
| 1140 length, | 1169 length, |
| 1141 elements); | 1170 elements); |
| 1142 return MarkAsCall(DefineFixed(result, r0), instr, CAN_DEOPTIMIZE_EAGERLY); | 1171 return MarkAsCall(DefineFixed(result, r0), instr, CAN_DEOPTIMIZE_EAGERLY); |
| 1143 } | 1172 } |
| 1144 | 1173 |
| 1145 | 1174 |
| 1146 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { | 1175 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { |
| 1147 ++argument_count_; | 1176 ++argument_count_; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1175 | 1204 |
| 1176 LInstruction* LChunkBuilder::DoCallConstantFunction( | 1205 LInstruction* LChunkBuilder::DoCallConstantFunction( |
| 1177 HCallConstantFunction* instr) { | 1206 HCallConstantFunction* instr) { |
| 1178 argument_count_ -= instr->argument_count(); | 1207 argument_count_ -= instr->argument_count(); |
| 1179 return MarkAsCall(DefineFixed(new LCallConstantFunction, r0), instr); | 1208 return MarkAsCall(DefineFixed(new LCallConstantFunction, r0), instr); |
| 1180 } | 1209 } |
| 1181 | 1210 |
| 1182 | 1211 |
| 1183 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { | 1212 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
| 1184 BuiltinFunctionId op = instr->op(); | 1213 BuiltinFunctionId op = instr->op(); |
| 1185 LOperand* input = UseRegisterAtStart(instr->value()); | 1214 if (op == kMathLog || op == kMathSin || op == kMathCos) { |
| 1186 LOperand* temp = (op == kMathFloor) ? TempRegister() : NULL; | 1215 LOperand* input = UseFixedDouble(instr->value(), d2); |
| 1187 LUnaryMathOperation* result = new LUnaryMathOperation(input, temp); | 1216 LUnaryMathOperation* result = new LUnaryMathOperation(input, NULL); |
| 1188 switch (op) { | 1217 return MarkAsCall(DefineFixedDouble(result, d2), instr); |
| 1189 case kMathAbs: | 1218 } else { |
| 1190 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); | 1219 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1191 case kMathFloor: | 1220 LOperand* temp = (op == kMathFloor) ? TempRegister() : NULL; |
| 1192 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); | 1221 LUnaryMathOperation* result = new LUnaryMathOperation(input, temp); |
| 1193 case kMathSqrt: | 1222 switch (op) { |
| 1194 return DefineSameAsFirst(result); | 1223 case kMathAbs: |
| 1195 case kMathRound: | 1224 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); |
| 1196 Abort("MathRound LUnaryMathOperation not implemented"); | 1225 case kMathFloor: |
| 1197 return NULL; | 1226 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); |
| 1198 case kMathPowHalf: | 1227 case kMathSqrt: |
| 1199 Abort("MathPowHalf LUnaryMathOperation not implemented"); | 1228 return DefineSameAsFirst(result); |
| 1200 return NULL; | 1229 case kMathRound: |
| 1201 case kMathLog: | 1230 return AssignEnvironment(DefineAsRegister(result)); |
| 1202 Abort("MathLog LUnaryMathOperation not implemented"); | 1231 case kMathPowHalf: |
| 1203 return NULL; | 1232 Abort("MathPowHalf LUnaryMathOperation not implemented"); |
| 1204 case kMathCos: | 1233 return NULL; |
| 1205 Abort("MathCos LUnaryMathOperation not implemented"); | 1234 default: |
| 1206 return NULL; | 1235 UNREACHABLE(); |
| 1207 case kMathSin: | 1236 return NULL; |
| 1208 Abort("MathSin LUnaryMathOperation not implemented"); | 1237 } |
| 1209 return NULL; | |
| 1210 default: | |
| 1211 UNREACHABLE(); | |
| 1212 return NULL; | |
| 1213 } | 1238 } |
| 1214 } | 1239 } |
| 1215 | 1240 |
| 1216 | 1241 |
| 1217 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) { | 1242 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) { |
| 1218 ASSERT(instr->key()->representation().IsTagged()); | 1243 ASSERT(instr->key()->representation().IsTagged()); |
| 1219 argument_count_ -= instr->argument_count(); | 1244 argument_count_ -= instr->argument_count(); |
| 1220 LOperand* key = UseFixed(instr->key(), r2); | 1245 LOperand* key = UseFixed(instr->key(), r2); |
| 1221 return MarkAsCall(DefineFixed(new LCallKeyed(key), r0), instr); | 1246 return MarkAsCall(DefineFixed(new LCallKeyed(key), r0), instr); |
| 1222 } | 1247 } |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1400 } else if (instr->representation().IsDouble()) { | 1425 } else if (instr->representation().IsDouble()) { |
| 1401 return DoArithmeticD(Token::ADD, instr); | 1426 return DoArithmeticD(Token::ADD, instr); |
| 1402 } else { | 1427 } else { |
| 1403 ASSERT(instr->representation().IsTagged()); | 1428 ASSERT(instr->representation().IsTagged()); |
| 1404 return DoArithmeticT(Token::ADD, instr); | 1429 return DoArithmeticT(Token::ADD, instr); |
| 1405 } | 1430 } |
| 1406 } | 1431 } |
| 1407 | 1432 |
| 1408 | 1433 |
| 1409 LInstruction* LChunkBuilder::DoPower(HPower* instr) { | 1434 LInstruction* LChunkBuilder::DoPower(HPower* instr) { |
| 1410 Abort("LPower instruction not implemented on ARM"); | 1435 ASSERT(instr->representation().IsDouble()); |
| 1411 return NULL; | 1436 // We call a C function for double power. It can't trigger a GC. |
| 1437 // We need to use fixed result register for the call. |
| 1438 Representation exponent_type = instr->right()->representation(); |
| 1439 ASSERT(instr->left()->representation().IsDouble()); |
| 1440 LOperand* left = UseFixedDouble(instr->left(), d1); |
| 1441 LOperand* right = exponent_type.IsDouble() ? |
| 1442 UseFixedDouble(instr->right(), d2) : |
| 1443 UseFixed(instr->right(), r0); |
| 1444 LPower* result = new LPower(left, right); |
| 1445 return MarkAsCall(DefineFixedDouble(result, d3), |
| 1446 instr, |
| 1447 CAN_DEOPTIMIZE_EAGERLY); |
| 1412 } | 1448 } |
| 1413 | 1449 |
| 1414 | 1450 |
| 1415 LInstruction* LChunkBuilder::DoCompare(HCompare* instr) { | 1451 LInstruction* LChunkBuilder::DoCompare(HCompare* instr) { |
| 1416 Token::Value op = instr->token(); | 1452 Token::Value op = instr->token(); |
| 1417 Representation r = instr->GetInputRepresentation(); | 1453 Representation r = instr->GetInputRepresentation(); |
| 1418 if (r.IsInteger32()) { | 1454 if (r.IsInteger32()) { |
| 1419 ASSERT(instr->left()->representation().IsInteger32()); | 1455 ASSERT(instr->left()->representation().IsInteger32()); |
| 1420 ASSERT(instr->right()->representation().IsInteger32()); | 1456 ASSERT(instr->right()->representation().IsInteger32()); |
| 1421 LOperand* left = UseRegisterAtStart(instr->left()); | 1457 LOperand* left = UseRegisterAtStart(instr->left()); |
| 1422 LOperand* right = UseOrConstantAtStart(instr->right()); | 1458 LOperand* right = UseRegisterAtStart(instr->right()); |
| 1423 return DefineAsRegister(new LCmpID(left, right)); | 1459 return DefineAsRegister(new LCmpID(left, right)); |
| 1424 } else if (r.IsDouble()) { | 1460 } else if (r.IsDouble()) { |
| 1425 ASSERT(instr->left()->representation().IsDouble()); | 1461 ASSERT(instr->left()->representation().IsDouble()); |
| 1426 ASSERT(instr->right()->representation().IsDouble()); | 1462 ASSERT(instr->right()->representation().IsDouble()); |
| 1427 LOperand* left = UseRegisterAtStart(instr->left()); | 1463 LOperand* left = UseRegisterAtStart(instr->left()); |
| 1428 LOperand* right = UseRegisterAtStart(instr->right()); | 1464 LOperand* right = UseRegisterAtStart(instr->right()); |
| 1429 return DefineAsRegister(new LCmpID(left, right)); | 1465 return DefineAsRegister(new LCmpID(left, right)); |
| 1430 } else { | 1466 } else { |
| 1431 ASSERT(instr->left()->representation().IsTagged()); | 1467 ASSERT(instr->left()->representation().IsTagged()); |
| 1432 ASSERT(instr->right()->representation().IsTagged()); | 1468 ASSERT(instr->right()->representation().IsTagged()); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1473 | 1509 |
| 1474 | 1510 |
| 1475 LInstruction* LChunkBuilder::DoHasInstanceType(HHasInstanceType* instr) { | 1511 LInstruction* LChunkBuilder::DoHasInstanceType(HHasInstanceType* instr) { |
| 1476 ASSERT(instr->value()->representation().IsTagged()); | 1512 ASSERT(instr->value()->representation().IsTagged()); |
| 1477 LOperand* value = UseRegisterAtStart(instr->value()); | 1513 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1478 | 1514 |
| 1479 return DefineAsRegister(new LHasInstanceType(value)); | 1515 return DefineAsRegister(new LHasInstanceType(value)); |
| 1480 } | 1516 } |
| 1481 | 1517 |
| 1482 | 1518 |
| 1519 LInstruction* LChunkBuilder::DoGetCachedArrayIndex( |
| 1520 HGetCachedArrayIndex* instr) { |
| 1521 ASSERT(instr->value()->representation().IsTagged()); |
| 1522 LOperand* value = UseRegister(instr->value()); |
| 1523 |
| 1524 return DefineAsRegister(new LGetCachedArrayIndex(value)); |
| 1525 } |
| 1526 |
| 1527 |
| 1483 LInstruction* LChunkBuilder::DoHasCachedArrayIndex( | 1528 LInstruction* LChunkBuilder::DoHasCachedArrayIndex( |
| 1484 HHasCachedArrayIndex* instr) { | 1529 HHasCachedArrayIndex* instr) { |
| 1485 ASSERT(instr->value()->representation().IsTagged()); | 1530 ASSERT(instr->value()->representation().IsTagged()); |
| 1486 LOperand* value = UseRegister(instr->value()); | 1531 LOperand* value = UseRegister(instr->value()); |
| 1487 | 1532 |
| 1488 return DefineAsRegister(new LHasCachedArrayIndex(value)); | 1533 return DefineAsRegister(new LHasCachedArrayIndex(value)); |
| 1489 } | 1534 } |
| 1490 | 1535 |
| 1491 | 1536 |
| 1492 LInstruction* LChunkBuilder::DoClassOfTest(HClassOfTest* instr) { | 1537 LInstruction* LChunkBuilder::DoClassOfTest(HClassOfTest* instr) { |
| 1493 ASSERT(instr->value()->representation().IsTagged()); | 1538 ASSERT(instr->value()->representation().IsTagged()); |
| 1494 LOperand* value = UseTempRegister(instr->value()); | 1539 LOperand* value = UseTempRegister(instr->value()); |
| 1495 return DefineSameAsFirst(new LClassOfTest(value)); | 1540 return DefineSameAsFirst(new LClassOfTest(value)); |
| 1496 } | 1541 } |
| 1497 | 1542 |
| 1498 | 1543 |
| 1499 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) { | 1544 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) { |
| 1500 LOperand* array = UseRegisterAtStart(instr->value()); | 1545 LOperand* array = UseRegisterAtStart(instr->value()); |
| 1501 return DefineAsRegister(new LJSArrayLength(array)); | 1546 return DefineAsRegister(new LJSArrayLength(array)); |
| 1502 } | 1547 } |
| 1503 | 1548 |
| 1504 | 1549 |
| 1550 LInstruction* LChunkBuilder::DoPixelArrayLength(HPixelArrayLength* instr) { |
| 1551 LOperand* array = UseRegisterAtStart(instr->value()); |
| 1552 return DefineAsRegister(new LPixelArrayLength(array)); |
| 1553 } |
| 1554 |
| 1555 |
| 1505 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) { | 1556 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) { |
| 1506 LOperand* array = UseRegisterAtStart(instr->value()); | 1557 LOperand* array = UseRegisterAtStart(instr->value()); |
| 1507 return DefineAsRegister(new LFixedArrayLength(array)); | 1558 return DefineAsRegister(new LFixedArrayLength(array)); |
| 1508 } | 1559 } |
| 1509 | 1560 |
| 1510 | 1561 |
| 1511 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { | 1562 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { |
| 1512 LOperand* object = UseRegister(instr->value()); | 1563 LOperand* object = UseRegister(instr->value()); |
| 1513 LValueOf* result = new LValueOf(object, TempRegister()); | 1564 LValueOf* result = new LValueOf(object, TempRegister()); |
| 1514 return AssignEnvironment(DefineSameAsFirst(result)); | 1565 return AssignEnvironment(DefineSameAsFirst(result)); |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1676 } | 1727 } |
| 1677 | 1728 |
| 1678 | 1729 |
| 1679 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 1730 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
| 1680 LOperand* context = UseRegisterAtStart(instr->value()); | 1731 LOperand* context = UseRegisterAtStart(instr->value()); |
| 1681 return DefineAsRegister(new LLoadContextSlot(context)); | 1732 return DefineAsRegister(new LLoadContextSlot(context)); |
| 1682 } | 1733 } |
| 1683 | 1734 |
| 1684 | 1735 |
| 1685 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { | 1736 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { |
| 1686 LOperand* context = UseTempRegister(instr->context()); | 1737 LOperand* context; |
| 1687 LOperand* value; | 1738 LOperand* value; |
| 1688 if (instr->NeedsWriteBarrier()) { | 1739 if (instr->NeedsWriteBarrier()) { |
| 1740 context = UseTempRegister(instr->context()); |
| 1689 value = UseTempRegister(instr->value()); | 1741 value = UseTempRegister(instr->value()); |
| 1690 } else { | 1742 } else { |
| 1743 context = UseRegister(instr->context()); |
| 1691 value = UseRegister(instr->value()); | 1744 value = UseRegister(instr->value()); |
| 1692 } | 1745 } |
| 1693 return new LStoreContextSlot(context, value); | 1746 return new LStoreContextSlot(context, value); |
| 1694 } | 1747 } |
| 1695 | 1748 |
| 1696 | 1749 |
| 1697 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 1750 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
| 1698 return DefineAsRegister( | 1751 return DefineAsRegister( |
| 1699 new LLoadNamedField(UseRegisterAtStart(instr->object()))); | 1752 new LLoadNamedField(UseRegisterAtStart(instr->object()))); |
| 1700 } | 1753 } |
| 1701 | 1754 |
| 1702 | 1755 |
| 1703 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 1756 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
| 1704 LOperand* object = UseFixed(instr->object(), r0); | 1757 LOperand* object = UseFixed(instr->object(), r0); |
| 1705 LInstruction* result = DefineFixed(new LLoadNamedGeneric(object), r0); | 1758 LInstruction* result = DefineFixed(new LLoadNamedGeneric(object), r0); |
| 1706 return MarkAsCall(result, instr); | 1759 return MarkAsCall(result, instr); |
| 1707 } | 1760 } |
| 1708 | 1761 |
| 1709 | 1762 |
| 1710 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 1763 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
| 1711 HLoadFunctionPrototype* instr) { | 1764 HLoadFunctionPrototype* instr) { |
| 1712 return AssignEnvironment(DefineAsRegister( | 1765 return AssignEnvironment(DefineAsRegister( |
| 1713 new LLoadFunctionPrototype(UseRegister(instr->function())))); | 1766 new LLoadFunctionPrototype(UseRegister(instr->function())))); |
| 1714 } | 1767 } |
| 1715 | 1768 |
| 1716 | 1769 |
| 1717 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) { | 1770 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) { |
| 1718 LOperand* input = UseRegisterAtStart(instr->value()); | 1771 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1719 return DefineSameAsFirst(new LLoadElements(input)); | 1772 return DefineAsRegister(new LLoadElements(input)); |
| 1773 } |
| 1774 |
| 1775 |
| 1776 LInstruction* LChunkBuilder::DoLoadPixelArrayExternalPointer( |
| 1777 HLoadPixelArrayExternalPointer* instr) { |
| 1778 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1779 return DefineAsRegister(new LLoadPixelArrayExternalPointer(input)); |
| 1720 } | 1780 } |
| 1721 | 1781 |
| 1722 | 1782 |
| 1723 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( | 1783 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( |
| 1724 HLoadKeyedFastElement* instr) { | 1784 HLoadKeyedFastElement* instr) { |
| 1725 ASSERT(instr->representation().IsTagged()); | 1785 ASSERT(instr->representation().IsTagged()); |
| 1726 ASSERT(instr->key()->representation().IsInteger32()); | 1786 ASSERT(instr->key()->representation().IsInteger32()); |
| 1727 LOperand* obj = UseRegisterAtStart(instr->object()); | 1787 LOperand* obj = UseRegisterAtStart(instr->object()); |
| 1728 LOperand* key = UseRegisterAtStart(instr->key()); | 1788 LOperand* key = UseRegisterAtStart(instr->key()); |
| 1729 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); | 1789 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); |
| 1730 return AssignEnvironment(DefineSameAsFirst(result)); | 1790 return AssignEnvironment(DefineSameAsFirst(result)); |
| 1731 } | 1791 } |
| 1732 | 1792 |
| 1733 | 1793 |
| 1794 LInstruction* LChunkBuilder::DoLoadPixelArrayElement( |
| 1795 HLoadPixelArrayElement* instr) { |
| 1796 ASSERT(instr->representation().IsInteger32()); |
| 1797 ASSERT(instr->key()->representation().IsInteger32()); |
| 1798 LOperand* external_pointer = |
| 1799 UseRegisterAtStart(instr->external_pointer()); |
| 1800 LOperand* key = UseRegisterAtStart(instr->key()); |
| 1801 LLoadPixelArrayElement* result = |
| 1802 new LLoadPixelArrayElement(external_pointer, key); |
| 1803 return DefineAsRegister(result); |
| 1804 } |
| 1805 |
| 1806 |
| 1734 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 1807 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
| 1735 LOperand* object = UseFixed(instr->object(), r1); | 1808 LOperand* object = UseFixed(instr->object(), r1); |
| 1736 LOperand* key = UseFixed(instr->key(), r0); | 1809 LOperand* key = UseFixed(instr->key(), r0); |
| 1737 | 1810 |
| 1738 LInstruction* result = | 1811 LInstruction* result = |
| 1739 DefineFixed(new LLoadKeyedGeneric(object, key), r0); | 1812 DefineFixed(new LLoadKeyedGeneric(object, key), r0); |
| 1740 return MarkAsCall(result, instr); | 1813 return MarkAsCall(result, instr); |
| 1741 } | 1814 } |
| 1742 | 1815 |
| 1743 | 1816 |
| 1744 LInstruction* LChunkBuilder::DoStoreKeyedFastElement( | 1817 LInstruction* LChunkBuilder::DoStoreKeyedFastElement( |
| 1745 HStoreKeyedFastElement* instr) { | 1818 HStoreKeyedFastElement* instr) { |
| 1746 bool needs_write_barrier = instr->NeedsWriteBarrier(); | 1819 bool needs_write_barrier = instr->NeedsWriteBarrier(); |
| 1747 ASSERT(instr->value()->representation().IsTagged()); | 1820 ASSERT(instr->value()->representation().IsTagged()); |
| 1748 ASSERT(instr->object()->representation().IsTagged()); | 1821 ASSERT(instr->object()->representation().IsTagged()); |
| 1749 ASSERT(instr->key()->representation().IsInteger32()); | 1822 ASSERT(instr->key()->representation().IsInteger32()); |
| 1750 | 1823 |
| 1751 LOperand* obj = UseTempRegister(instr->object()); | 1824 LOperand* obj = UseTempRegister(instr->object()); |
| 1752 LOperand* val = needs_write_barrier | 1825 LOperand* val = needs_write_barrier |
| 1753 ? UseTempRegister(instr->value()) | 1826 ? UseTempRegister(instr->value()) |
| 1754 : UseRegisterAtStart(instr->value()); | 1827 : UseRegisterAtStart(instr->value()); |
| 1755 LOperand* key = needs_write_barrier | 1828 LOperand* key = needs_write_barrier |
| 1756 ? UseTempRegister(instr->key()) | 1829 ? UseTempRegister(instr->key()) |
| 1757 : UseRegisterOrConstantAtStart(instr->key()); | 1830 : UseRegisterOrConstantAtStart(instr->key()); |
| 1758 | 1831 |
| 1759 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val)); | 1832 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val)); |
| 1760 } | 1833 } |
| 1761 | 1834 |
| 1762 | 1835 |
| 1836 LInstruction* LChunkBuilder::DoStorePixelArrayElement( |
| 1837 HStorePixelArrayElement* instr) { |
| 1838 Abort("DoStorePixelArrayElement not implemented"); |
| 1839 return NULL; |
| 1840 } |
| 1841 |
| 1842 |
| 1763 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | 1843 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { |
| 1764 LOperand* obj = UseFixed(instr->object(), r2); | 1844 LOperand* obj = UseFixed(instr->object(), r2); |
| 1765 LOperand* key = UseFixed(instr->key(), r1); | 1845 LOperand* key = UseFixed(instr->key(), r1); |
| 1766 LOperand* val = UseFixed(instr->value(), r0); | 1846 LOperand* val = UseFixed(instr->value(), r0); |
| 1767 | 1847 |
| 1768 ASSERT(instr->object()->representation().IsTagged()); | 1848 ASSERT(instr->object()->representation().IsTagged()); |
| 1769 ASSERT(instr->key()->representation().IsTagged()); | 1849 ASSERT(instr->key()->representation().IsTagged()); |
| 1770 ASSERT(instr->value()->representation().IsTagged()); | 1850 ASSERT(instr->value()->representation().IsTagged()); |
| 1771 | 1851 |
| 1772 return MarkAsCall(new LStoreKeyedGeneric(obj, key, val), instr); | 1852 return MarkAsCall(new LStoreKeyedGeneric(obj, key, val), instr); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1825 return MarkAsCall(DefineFixed(new LRegExpLiteral, r0), instr); | 1905 return MarkAsCall(DefineFixed(new LRegExpLiteral, r0), instr); |
| 1826 } | 1906 } |
| 1827 | 1907 |
| 1828 | 1908 |
| 1829 LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) { | 1909 LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) { |
| 1830 return MarkAsCall(DefineFixed(new LFunctionLiteral, r0), instr); | 1910 return MarkAsCall(DefineFixed(new LFunctionLiteral, r0), instr); |
| 1831 } | 1911 } |
| 1832 | 1912 |
| 1833 | 1913 |
| 1834 LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) { | 1914 LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) { |
| 1835 LOperand* object = UseRegisterAtStart(instr->object()); | 1915 LOperand* object = UseFixed(instr->object(), r0); |
| 1836 LOperand* key = UseRegisterAtStart(instr->key()); | 1916 LOperand* key = UseFixed(instr->key(), r1); |
| 1837 LDeleteProperty* result = new LDeleteProperty(object, key); | 1917 LDeleteProperty* result = new LDeleteProperty(object, key); |
| 1838 return MarkAsCall(DefineFixed(result, r0), instr); | 1918 return MarkAsCall(DefineFixed(result, r0), instr); |
| 1839 } | 1919 } |
| 1840 | 1920 |
| 1841 | 1921 |
| 1842 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { | 1922 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { |
| 1843 allocator_->MarkAsOsrEntry(); | 1923 allocator_->MarkAsOsrEntry(); |
| 1844 current_block_->last_environment()->set_ast_id(instr->ast_id()); | 1924 current_block_->last_environment()->set_ast_id(instr->ast_id()); |
| 1845 return AssignEnvironment(new LOsrEntry); | 1925 return AssignEnvironment(new LOsrEntry); |
| 1846 } | 1926 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1858 } | 1938 } |
| 1859 | 1939 |
| 1860 | 1940 |
| 1861 LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) { | 1941 LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) { |
| 1862 argument_count_ -= instr->argument_count(); | 1942 argument_count_ -= instr->argument_count(); |
| 1863 return MarkAsCall(DefineFixed(new LCallStub, r0), instr); | 1943 return MarkAsCall(DefineFixed(new LCallStub, r0), instr); |
| 1864 } | 1944 } |
| 1865 | 1945 |
| 1866 | 1946 |
| 1867 LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) { | 1947 LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) { |
| 1868 // There are no real uses of the arguments object (we bail out in all other | 1948 // There are no real uses of the arguments object. |
| 1869 // cases). | 1949 // arguments.length and element access are supported directly on |
| 1950 // stack arguments, and any real arguments object use causes a bailout. |
| 1951 // So this value is never used. |
| 1870 return NULL; | 1952 return NULL; |
| 1871 } | 1953 } |
| 1872 | 1954 |
| 1873 | 1955 |
| 1874 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { | 1956 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { |
| 1875 LOperand* arguments = UseRegister(instr->arguments()); | 1957 LOperand* arguments = UseRegister(instr->arguments()); |
| 1876 LOperand* length = UseTempRegister(instr->length()); | 1958 LOperand* length = UseTempRegister(instr->length()); |
| 1877 LOperand* index = UseRegister(instr->index()); | 1959 LOperand* index = UseRegister(instr->index()); |
| 1878 LAccessArgumentsAt* result = new LAccessArgumentsAt(arguments, length, index); | 1960 LAccessArgumentsAt* result = new LAccessArgumentsAt(arguments, length, index); |
| 1879 return AssignEnvironment(DefineAsRegister(result)); | 1961 return AssignEnvironment(DefineAsRegister(result)); |
| 1880 } | 1962 } |
| 1881 | 1963 |
| 1882 | 1964 |
| 1883 LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) { | 1965 LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) { |
| 1884 LTypeof* result = new LTypeof(UseRegisterAtStart(instr->value())); | 1966 LTypeof* result = new LTypeof(UseFixed(instr->value(), r0)); |
| 1885 return MarkAsCall(DefineFixed(result, r0), instr); | 1967 return MarkAsCall(DefineFixed(result, r0), instr); |
| 1886 } | 1968 } |
| 1887 | 1969 |
| 1888 | 1970 |
| 1889 LInstruction* LChunkBuilder::DoTypeofIs(HTypeofIs* instr) { | 1971 LInstruction* LChunkBuilder::DoTypeofIs(HTypeofIs* instr) { |
| 1890 return DefineSameAsFirst(new LTypeofIs(UseRegister(instr->value()))); | 1972 return DefineSameAsFirst(new LTypeofIs(UseRegister(instr->value()))); |
| 1891 } | 1973 } |
| 1892 | 1974 |
| 1893 | 1975 |
| 1894 LInstruction* LChunkBuilder::DoIsConstructCall(HIsConstructCall* instr) { | 1976 LInstruction* LChunkBuilder::DoIsConstructCall(HIsConstructCall* instr) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1948 | 2030 |
| 1949 | 2031 |
| 1950 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2032 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
| 1951 HEnvironment* outer = current_block_->last_environment()->outer(); | 2033 HEnvironment* outer = current_block_->last_environment()->outer(); |
| 1952 current_block_->UpdateEnvironment(outer); | 2034 current_block_->UpdateEnvironment(outer); |
| 1953 return NULL; | 2035 return NULL; |
| 1954 } | 2036 } |
| 1955 | 2037 |
| 1956 | 2038 |
| 1957 } } // namespace v8::internal | 2039 } } // namespace v8::internal |
| OLD | NEW |