| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 ASSERT(actual.is_immediate() || actual.reg().is(r0)); | 292 ASSERT(actual.is_immediate() || actual.reg().is(r0)); |
| 293 ASSERT(expected.is_immediate() || expected.reg().is(r2)); | 293 ASSERT(expected.is_immediate() || expected.reg().is(r2)); |
| 294 ASSERT((!code_constant.is_null() && code_reg.is(no_reg)) || code_reg.is(r3)); | 294 ASSERT((!code_constant.is_null() && code_reg.is(no_reg)) || code_reg.is(r3)); |
| 295 | 295 |
| 296 if (expected.is_immediate()) { | 296 if (expected.is_immediate()) { |
| 297 ASSERT(actual.is_immediate()); | 297 ASSERT(actual.is_immediate()); |
| 298 if (expected.immediate() == actual.immediate()) { | 298 if (expected.immediate() == actual.immediate()) { |
| 299 definitely_matches = true; | 299 definitely_matches = true; |
| 300 } else { | 300 } else { |
| 301 mov(r0, Operand(actual.immediate())); | 301 mov(r0, Operand(actual.immediate())); |
| 302 mov(r2, Operand(expected.immediate())); | 302 const int sentinel = SharedFunctionInfo::kDontAdaptArgumentsSentinel; |
| 303 if (expected.immediate() == sentinel) { |
| 304 // Don't worry about adapting arguments for builtins that |
| 305 // don't want that done. Skip adaption code by making it look |
| 306 // like we have a match between expected and actual number of |
| 307 // arguments. |
| 308 definitely_matches = true; |
| 309 } else { |
| 310 mov(r2, Operand(expected.immediate())); |
| 311 } |
| 303 } | 312 } |
| 304 } else { | 313 } else { |
| 305 if (actual.is_immediate()) { | 314 if (actual.is_immediate()) { |
| 306 cmp(expected.reg(), Operand(actual.immediate())); | 315 cmp(expected.reg(), Operand(actual.immediate())); |
| 307 b(eq, ®ular_invoke); | 316 b(eq, ®ular_invoke); |
| 308 mov(r0, Operand(actual.immediate())); | 317 mov(r0, Operand(actual.immediate())); |
| 309 } else { | 318 } else { |
| 310 cmp(expected.reg(), Operand(actual.reg())); | 319 cmp(expected.reg(), Operand(actual.reg())); |
| 311 b(eq, ®ular_invoke); | 320 b(eq, ®ular_invoke); |
| 312 } | 321 } |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 #endif | 748 #endif |
| 740 mov(r0, Operand(p0)); | 749 mov(r0, Operand(p0)); |
| 741 push(r0); | 750 push(r0); |
| 742 mov(r0, Operand(Smi::FromInt(p1 - p0))); | 751 mov(r0, Operand(Smi::FromInt(p1 - p0))); |
| 743 push(r0); | 752 push(r0); |
| 744 CallRuntime(Runtime::kAbort, 2); | 753 CallRuntime(Runtime::kAbort, 2); |
| 745 // will not return here | 754 // will not return here |
| 746 } | 755 } |
| 747 | 756 |
| 748 } } // namespace v8::internal | 757 } } // namespace v8::internal |
| OLD | NEW |