| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1578     __ ld(at, MemOperand(at, 5 * Assembler::kInstrSize)); | 1578     __ ld(at, MemOperand(at, 5 * Assembler::kInstrSize)); | 
| 1579     __ jr(at); | 1579     __ jr(at); | 
| 1580     __ nop(); | 1580     __ nop(); | 
| 1581     for (int i = 0; i < kNumCases; ++i) { | 1581     for (int i = 0; i < kNumCases; ++i) { | 
| 1582       __ dd(&labels[i]); | 1582       __ dd(&labels[i]); | 
| 1583     } | 1583     } | 
| 1584   } | 1584   } | 
| 1585 | 1585 | 
| 1586   __ bind(&done); | 1586   __ bind(&done); | 
| 1587   __ ld(ra, MemOperand(sp)); | 1587   __ ld(ra, MemOperand(sp)); | 
| 1588   __ addiu(sp, sp, 8); | 1588   __ daddiu(sp, sp, 8); | 
| 1589   __ jr(ra); | 1589   __ jr(ra); | 
| 1590   __ nop(); | 1590   __ nop(); | 
| 1591 | 1591 | 
| 1592   CodeDesc desc; | 1592   CodeDesc desc; | 
| 1593   assm.GetCode(&desc); | 1593   assm.GetCode(&desc); | 
| 1594   Handle<Code> code = isolate->factory()->NewCode( | 1594   Handle<Code> code = isolate->factory()->NewCode( | 
| 1595       desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 1595       desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 
| 1596 #ifdef OBJECT_PRINT | 1596 #ifdef OBJECT_PRINT | 
| 1597 //  code->Print(std::cout); | 1597   code->Print(std::cout); | 
| 1598 #endif | 1598 #endif | 
| 1599   F1 f = FUNCTION_CAST<F1>(code->entry()); | 1599   F1 f = FUNCTION_CAST<F1>(code->entry()); | 
| 1600   for (int i = 0; i < kNumCases; ++i) { | 1600   for (int i = 0; i < kNumCases; ++i) { | 
| 1601     Handle<Object> result(CALL_GENERATED_CODE(f, i, 0, 0, 0, 0), isolate); | 1601     Handle<Object> result(CALL_GENERATED_CODE(f, i, 0, 0, 0, 0), isolate); | 
| 1602 #ifdef OBJECT_PRINT | 1602 #ifdef OBJECT_PRINT | 
| 1603     ::printf("f(%d) = ", i); | 1603     ::printf("f(%d) = ", i); | 
| 1604     result->Print(std::cout); | 1604     result->Print(std::cout); | 
| 1605     ::printf("\n"); | 1605     ::printf("\n"); | 
| 1606 #endif | 1606 #endif | 
| 1607     CHECK(values[i].is_identical_to(result)); | 1607     CHECK(values[i].is_identical_to(result)); | 
| 1608   } | 1608   } | 
| 1609 } | 1609 } | 
| 1610 | 1610 | 
| 1611 | 1611 | 
| 1612 #undef __ | 1612 #undef __ | 
| OLD | NEW | 
|---|