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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
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 2429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2440 | 2440 |
2441 __ TryAllocateArray(kContextCid, instance_size, slow_path->entry_label(), | 2441 __ TryAllocateArray(kContextCid, instance_size, slow_path->entry_label(), |
2442 Assembler::kFarJump, | 2442 Assembler::kFarJump, |
2443 result, // instance | 2443 result, // instance |
2444 temp); // end address | 2444 temp); // end address |
2445 | 2445 |
2446 // Setup up number of context variables field. | 2446 // Setup up number of context variables field. |
2447 __ movl(FieldAddress(result, Context::num_variables_offset()), | 2447 __ movl(FieldAddress(result, Context::num_variables_offset()), |
2448 Immediate(num_context_variables())); | 2448 Immediate(num_context_variables())); |
2449 | 2449 |
2450 // Setup isolate field. | |
2451 __ movl(FieldAddress(result, Context::isolate_offset()), | |
2452 Immediate(reinterpret_cast<int32_t>(Isolate::Current()))); | |
2453 | |
2454 __ Bind(slow_path->exit_label()); | 2450 __ Bind(slow_path->exit_label()); |
2455 } | 2451 } |
2456 | 2452 |
2457 | 2453 |
2458 LocationSummary* AllocateContextInstr::MakeLocationSummary(Isolate* isolate, | 2454 LocationSummary* AllocateContextInstr::MakeLocationSummary(Isolate* isolate, |
2459 bool opt) const { | 2455 bool opt) const { |
2460 const intptr_t kNumInputs = 0; | 2456 const intptr_t kNumInputs = 0; |
2461 const intptr_t kNumTemps = 1; | 2457 const intptr_t kNumTemps = 1; |
2462 LocationSummary* locs = new(isolate) LocationSummary( | 2458 LocationSummary* locs = new(isolate) LocationSummary( |
2463 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); | 2459 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); |
(...skipping 4305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6769 __ movl(EDX, Immediate(kInvalidObjectPointer)); | 6765 __ movl(EDX, Immediate(kInvalidObjectPointer)); |
6770 __ movl(EDX, Immediate(kInvalidObjectPointer)); | 6766 __ movl(EDX, Immediate(kInvalidObjectPointer)); |
6771 #endif | 6767 #endif |
6772 } | 6768 } |
6773 | 6769 |
6774 } // namespace dart | 6770 } // namespace dart |
6775 | 6771 |
6776 #undef __ | 6772 #undef __ |
6777 | 6773 |
6778 #endif // defined TARGET_ARCH_IA32 | 6774 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |