| 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 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1479 // is the case when we invoke functions using call and apply. | 1479 // is the case when we invoke functions using call and apply. |
| 1480 cmp(expected.reg(), Operand(actual.reg())); | 1480 cmp(expected.reg(), Operand(actual.reg())); |
| 1481 j(equal, &invoke); | 1481 j(equal, &invoke); |
| 1482 ASSERT(actual.reg().is(eax)); | 1482 ASSERT(actual.reg().is(eax)); |
| 1483 ASSERT(expected.reg().is(ebx)); | 1483 ASSERT(expected.reg().is(ebx)); |
| 1484 } | 1484 } |
| 1485 } | 1485 } |
| 1486 | 1486 |
| 1487 if (!definitely_matches) { | 1487 if (!definitely_matches) { |
| 1488 Handle<Code> adaptor = | 1488 Handle<Code> adaptor = |
| 1489 Handle<Code>(Isolate::Current()->builtins()->builtin( | 1489 isolate()->builtins()->ArgumentsAdaptorTrampoline(); |
| 1490 Builtins::ArgumentsAdaptorTrampoline)); | |
| 1491 if (!code_constant.is_null()) { | 1490 if (!code_constant.is_null()) { |
| 1492 mov(edx, Immediate(code_constant)); | 1491 mov(edx, Immediate(code_constant)); |
| 1493 add(Operand(edx), Immediate(Code::kHeaderSize - kHeapObjectTag)); | 1492 add(Operand(edx), Immediate(Code::kHeaderSize - kHeapObjectTag)); |
| 1494 } else if (!code_operand.is_reg(edx)) { | 1493 } else if (!code_operand.is_reg(edx)) { |
| 1495 mov(edx, code_operand); | 1494 mov(edx, code_operand); |
| 1496 } | 1495 } |
| 1497 | 1496 |
| 1498 if (flag == CALL_FUNCTION) { | 1497 if (flag == CALL_FUNCTION) { |
| 1499 call(adaptor, RelocInfo::CODE_TARGET); | 1498 call(adaptor, RelocInfo::CODE_TARGET); |
| 1500 if (post_call_generator != NULL) post_call_generator->Generate(); | 1499 if (post_call_generator != NULL) post_call_generator->Generate(); |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2050 | 2049 |
| 2051 // Check that the code was patched as expected. | 2050 // Check that the code was patched as expected. |
| 2052 ASSERT(masm_.pc_ == address_ + size_); | 2051 ASSERT(masm_.pc_ == address_ + size_); |
| 2053 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2052 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 2054 } | 2053 } |
| 2055 | 2054 |
| 2056 | 2055 |
| 2057 } } // namespace v8::internal | 2056 } } // namespace v8::internal |
| 2058 | 2057 |
| 2059 #endif // V8_TARGET_ARCH_IA32 | 2058 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |