OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 } | 607 } |
608 } | 608 } |
609 | 609 |
610 if (!definitely_matches) { | 610 if (!definitely_matches) { |
611 if (!code_constant.is_null()) { | 611 if (!code_constant.is_null()) { |
612 mov(r3, Operand(code_constant)); | 612 mov(r3, Operand(code_constant)); |
613 add(r3, r3, Operand(Code::kHeaderSize - kHeapObjectTag)); | 613 add(r3, r3, Operand(Code::kHeaderSize - kHeapObjectTag)); |
614 } | 614 } |
615 | 615 |
616 Handle<Code> adaptor = | 616 Handle<Code> adaptor = |
617 Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline)); | 617 Handle<Code>(Isolate::Current()->builtins()->builtin( |
| 618 Builtins::ArgumentsAdaptorTrampoline)); |
618 if (flag == CALL_FUNCTION) { | 619 if (flag == CALL_FUNCTION) { |
619 Call(adaptor, RelocInfo::CODE_TARGET); | 620 Call(adaptor, RelocInfo::CODE_TARGET); |
620 b(done); | 621 b(done); |
621 } else { | 622 } else { |
622 Jump(adaptor, RelocInfo::CODE_TARGET); | 623 Jump(adaptor, RelocInfo::CODE_TARGET); |
623 } | 624 } |
624 bind(®ular_invoke); | 625 bind(®ular_invoke); |
625 } | 626 } |
626 } | 627 } |
627 | 628 |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 int num_least_bits) { | 1362 int num_least_bits) { |
1362 if (Isolate::Current()->cpu_features()->IsSupported(ARMv7)) { | 1363 if (Isolate::Current()->cpu_features()->IsSupported(ARMv7)) { |
1363 ubfx(dst, src, kSmiTagSize, num_least_bits); | 1364 ubfx(dst, src, kSmiTagSize, num_least_bits); |
1364 } else { | 1365 } else { |
1365 mov(dst, Operand(src, ASR, kSmiTagSize)); | 1366 mov(dst, Operand(src, ASR, kSmiTagSize)); |
1366 and_(dst, dst, Operand((1 << num_least_bits) - 1)); | 1367 and_(dst, dst, Operand((1 << num_least_bits) - 1)); |
1367 } | 1368 } |
1368 } | 1369 } |
1369 | 1370 |
1370 | 1371 |
1371 void MacroAssembler::CallRuntime(Runtime::Function* f, int num_arguments) { | 1372 void MacroAssembler::CallRuntime(const Runtime::Function* f, |
| 1373 int num_arguments) { |
1372 // All parameters are on the stack. r0 has the return value after call. | 1374 // All parameters are on the stack. r0 has the return value after call. |
1373 | 1375 |
1374 // If the expected number of arguments of the runtime function is | 1376 // If the expected number of arguments of the runtime function is |
1375 // constant, we check that the actual number of arguments match the | 1377 // constant, we check that the actual number of arguments match the |
1376 // expectation. | 1378 // expectation. |
1377 if (f->nargs >= 0 && f->nargs != num_arguments) { | 1379 if (f->nargs >= 0 && f->nargs != num_arguments) { |
1378 IllegalOperation(num_arguments); | 1380 IllegalOperation(num_arguments); |
1379 return; | 1381 return; |
1380 } | 1382 } |
1381 | 1383 |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1799 | 1801 |
1800 void CodePatcher::Emit(Address addr) { | 1802 void CodePatcher::Emit(Address addr) { |
1801 masm()->emit(reinterpret_cast<Instr>(addr)); | 1803 masm()->emit(reinterpret_cast<Instr>(addr)); |
1802 } | 1804 } |
1803 #endif // ENABLE_DEBUGGER_SUPPORT | 1805 #endif // ENABLE_DEBUGGER_SUPPORT |
1804 | 1806 |
1805 | 1807 |
1806 } } // namespace v8::internal | 1808 } } // namespace v8::internal |
1807 | 1809 |
1808 #endif // V8_TARGET_ARCH_ARM | 1810 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |