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" // Needed here to get TARGET_ARCH_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
7 | 7 |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 2373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2384 __ TryAllocateArray(kContextCid, instance_size, slow_path->entry_label(), | 2384 __ TryAllocateArray(kContextCid, instance_size, slow_path->entry_label(), |
2385 result, // instance | 2385 result, // instance |
2386 temp0, | 2386 temp0, |
2387 temp1, | 2387 temp1, |
2388 temp2); | 2388 temp2); |
2389 | 2389 |
2390 // Setup up number of context variables field. | 2390 // Setup up number of context variables field. |
2391 __ LoadImmediate(temp0, num_context_variables()); | 2391 __ LoadImmediate(temp0, num_context_variables()); |
2392 __ sw(temp0, FieldAddress(result, Context::num_variables_offset())); | 2392 __ sw(temp0, FieldAddress(result, Context::num_variables_offset())); |
2393 | 2393 |
2394 // Setup isolate field. | |
2395 __ lw(temp0, FieldAddress(CTX, Context::isolate_offset())); | |
2396 __ sw(temp0, FieldAddress(result, Context::isolate_offset())); | |
2397 | |
2398 __ Bind(slow_path->exit_label()); | 2394 __ Bind(slow_path->exit_label()); |
2399 } | 2395 } |
2400 | 2396 |
2401 | 2397 |
2402 LocationSummary* AllocateContextInstr::MakeLocationSummary(Isolate* isolate, | 2398 LocationSummary* AllocateContextInstr::MakeLocationSummary(Isolate* isolate, |
2403 bool opt) const { | 2399 bool opt) const { |
2404 const intptr_t kNumInputs = 0; | 2400 const intptr_t kNumInputs = 0; |
2405 const intptr_t kNumTemps = 1; | 2401 const intptr_t kNumTemps = 1; |
2406 LocationSummary* locs = new(isolate) LocationSummary( | 2402 LocationSummary* locs = new(isolate) LocationSummary( |
2407 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); | 2403 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); |
(...skipping 2540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4948 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 4944 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
4949 #if defined(DEBUG) | 4945 #if defined(DEBUG) |
4950 __ LoadImmediate(S4, kInvalidObjectPointer); | 4946 __ LoadImmediate(S4, kInvalidObjectPointer); |
4951 __ LoadImmediate(S5, kInvalidObjectPointer); | 4947 __ LoadImmediate(S5, kInvalidObjectPointer); |
4952 #endif | 4948 #endif |
4953 } | 4949 } |
4954 | 4950 |
4955 } // namespace dart | 4951 } // namespace dart |
4956 | 4952 |
4957 #endif // defined TARGET_ARCH_MIPS | 4953 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |