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 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1789 | 1789 |
1790 void MacroAssembler::CallRuntime(Runtime::FunctionId id, int num_arguments) { | 1790 void MacroAssembler::CallRuntime(Runtime::FunctionId id, int num_arguments) { |
1791 CallRuntime(Runtime::FunctionForId(id), num_arguments); | 1791 CallRuntime(Runtime::FunctionForId(id), num_arguments); |
1792 } | 1792 } |
1793 | 1793 |
1794 | 1794 |
1795 void MacroAssembler::CallRuntimeSaveDoubles(Runtime::FunctionId id) { | 1795 void MacroAssembler::CallRuntimeSaveDoubles(Runtime::FunctionId id) { |
1796 const Runtime::Function* function = Runtime::FunctionForId(id); | 1796 const Runtime::Function* function = Runtime::FunctionForId(id); |
1797 Set(eax, Immediate(function->nargs)); | 1797 Set(eax, Immediate(function->nargs)); |
1798 mov(ebx, Immediate(ExternalReference(function, isolate()))); | 1798 mov(ebx, Immediate(ExternalReference(function, isolate()))); |
1799 CEntryStub ces(1, kSaveFPRegs); | 1799 CEntryStub ces(1, CpuFeatures::IsSupported(SSE2) |
| 1800 ? kSaveFPRegs : |
| 1801 kDontSaveFPRegs); |
1800 CallStub(&ces); | 1802 CallStub(&ces); |
1801 } | 1803 } |
1802 | 1804 |
1803 | 1805 |
1804 void MacroAssembler::CallRuntime(const Runtime::Function* f, | 1806 void MacroAssembler::CallRuntime(const Runtime::Function* f, |
1805 int num_arguments) { | 1807 int num_arguments) { |
1806 // If the expected number of arguments of the runtime function is | 1808 // If the expected number of arguments of the runtime function is |
1807 // constant, we check that the actual number of arguments match the | 1809 // constant, we check that the actual number of arguments match the |
1808 // expectation. | 1810 // expectation. |
1809 if (f->nargs >= 0 && f->nargs != num_arguments) { | 1811 if (f->nargs >= 0 && f->nargs != num_arguments) { |
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2977 j(not_equal, call_runtime); | 2979 j(not_equal, call_runtime); |
2978 | 2980 |
2979 mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset)); | 2981 mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset)); |
2980 cmp(ecx, isolate()->factory()->null_value()); | 2982 cmp(ecx, isolate()->factory()->null_value()); |
2981 j(not_equal, &next); | 2983 j(not_equal, &next); |
2982 } | 2984 } |
2983 | 2985 |
2984 } } // namespace v8::internal | 2986 } } // namespace v8::internal |
2985 | 2987 |
2986 #endif // V8_TARGET_ARCH_IA32 | 2988 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |