| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 2005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2016 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { | 2016 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { |
| 2017 __ Comment("OptimizeFunctionStub"); | 2017 __ Comment("OptimizeFunctionStub"); |
| 2018 __ EnterStubFrame(); | 2018 __ EnterStubFrame(); |
| 2019 __ addiu(SP, SP, Immediate(-3 * kWordSize)); | 2019 __ addiu(SP, SP, Immediate(-3 * kWordSize)); |
| 2020 __ sw(S4, Address(SP, 2 * kWordSize)); | 2020 __ sw(S4, Address(SP, 2 * kWordSize)); |
| 2021 // Setup space on stack for return value. | 2021 // Setup space on stack for return value. |
| 2022 __ sw(ZR, Address(SP, 1 * kWordSize)); | 2022 __ sw(ZR, Address(SP, 1 * kWordSize)); |
| 2023 __ sw(T0, Address(SP, 0 * kWordSize)); | 2023 __ sw(T0, Address(SP, 0 * kWordSize)); |
| 2024 __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry, 1); | 2024 __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry, 1); |
| 2025 __ Comment("OptimizeFunctionStub return"); | 2025 __ Comment("OptimizeFunctionStub return"); |
| 2026 __ lw(CODE_REG, Address(SP, 1 * kWordSize)); // Get Code object | 2026 __ lw(T0, Address(SP, 1 * kWordSize)); // Get Function object |
| 2027 __ lw(S4, Address(SP, 2 * kWordSize)); // Restore argument descriptor. | 2027 __ lw(S4, Address(SP, 2 * kWordSize)); // Restore argument descriptor. |
| 2028 __ addiu(SP, SP, Immediate(3 * kWordSize)); // Discard argument. | 2028 __ addiu(SP, SP, Immediate(3 * kWordSize)); // Discard argument. |
| 2029 | 2029 |
| 2030 __ lw(T0, FieldAddress(CODE_REG, Code::entry_point_offset())); | 2030 __ lw(CODE_REG, FieldAddress(T0, Function::code_offset())); |
| 2031 __ LeaveStubFrameAndReturn(T0); | 2031 __ lw(T1, FieldAddress(T0, Function::entry_point_offset())); |
| 2032 __ LeaveStubFrameAndReturn(T1); |
| 2032 __ break_(0); | 2033 __ break_(0); |
| 2033 } | 2034 } |
| 2034 | 2035 |
| 2035 | 2036 |
| 2036 // Does identical check (object references are equal or not equal) with special | 2037 // Does identical check (object references are equal or not equal) with special |
| 2037 // checks for boxed numbers. | 2038 // checks for boxed numbers. |
| 2038 // Returns: CMPRES1 is zero if equal, non-zero otherwise. | 2039 // Returns: CMPRES1 is zero if equal, non-zero otherwise. |
| 2039 // Note: A Mint cannot contain a value that would fit in Smi, a Bigint | 2040 // Note: A Mint cannot contain a value that would fit in Smi, a Bigint |
| 2040 // cannot contain a value that fits in Mint or Smi. | 2041 // cannot contain a value that fits in Mint or Smi. |
| 2041 static void GenerateIdenticalWithNumberCheckStub(Assembler* assembler, | 2042 static void GenerateIdenticalWithNumberCheckStub(Assembler* assembler, |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2390 } | 2391 } |
| 2391 | 2392 |
| 2392 | 2393 |
| 2393 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { | 2394 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { |
| 2394 __ break_(0); | 2395 __ break_(0); |
| 2395 } | 2396 } |
| 2396 | 2397 |
| 2397 } // namespace dart | 2398 } // namespace dart |
| 2398 | 2399 |
| 2399 #endif // defined TARGET_ARCH_MIPS | 2400 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |