OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 Abort("DoClassOfTestAndBranch unimplemented."); | 1330 Abort("DoClassOfTestAndBranch unimplemented."); |
1331 } | 1331 } |
1332 | 1332 |
1333 | 1333 |
1334 void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) { | 1334 void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) { |
1335 Abort("DoCmpMapAndBranch unimplemented."); | 1335 Abort("DoCmpMapAndBranch unimplemented."); |
1336 } | 1336 } |
1337 | 1337 |
1338 | 1338 |
1339 void LCodeGen::DoInstanceOf(LInstanceOf* instr) { | 1339 void LCodeGen::DoInstanceOf(LInstanceOf* instr) { |
1340 // We expect object and function in registers r1 and r0. | 1340 ASSERT(ToRegister(instr->left()).is(r0)); // Object is in r0. |
| 1341 ASSERT(ToRegister(instr->right()).is(r1)); // Function is in r1. |
| 1342 |
1341 InstanceofStub stub(InstanceofStub::kArgsInRegisters); | 1343 InstanceofStub stub(InstanceofStub::kArgsInRegisters); |
1342 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 1344 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
1343 | 1345 |
1344 Label true_value, done; | 1346 Label true_value, done; |
1345 __ tst(r0, r0); | 1347 __ tst(r0, r0); |
1346 __ mov(r0, Operand(Factory::false_value()), LeaveCC, eq); | 1348 __ mov(r0, Operand(Factory::false_value()), LeaveCC, ne); |
1347 __ mov(r0, Operand(Factory::true_value()), LeaveCC, ne); | 1349 __ mov(r0, Operand(Factory::true_value()), LeaveCC, eq); |
1348 } | 1350 } |
1349 | 1351 |
1350 | 1352 |
1351 void LCodeGen::DoInstanceOfAndBranch(LInstanceOfAndBranch* instr) { | 1353 void LCodeGen::DoInstanceOfAndBranch(LInstanceOfAndBranch* instr) { |
1352 Abort("DoInstanceOfAndBranch unimplemented."); | 1354 Abort("DoInstanceOfAndBranch unimplemented."); |
1353 } | 1355 } |
1354 | 1356 |
1355 | 1357 |
1356 | 1358 |
1357 static Condition ComputeCompareCondition(Token::Value op) { | 1359 static Condition ComputeCompareCondition(Token::Value op) { |
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2207 | 2209 |
2208 | 2210 |
2209 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { | 2211 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { |
2210 Abort("DoOsrEntry unimplemented."); | 2212 Abort("DoOsrEntry unimplemented."); |
2211 } | 2213 } |
2212 | 2214 |
2213 | 2215 |
2214 #undef __ | 2216 #undef __ |
2215 | 2217 |
2216 } } // namespace v8::internal | 2218 } } // namespace v8::internal |
OLD | NEW |