| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 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 2348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2359 | 2359 |
| 2360 __ TryAllocateArray(kContextCid, instance_size, slow_path->entry_label(), | 2360 __ TryAllocateArray(kContextCid, instance_size, slow_path->entry_label(), |
| 2361 Assembler::kFarJump, | 2361 Assembler::kFarJump, |
| 2362 result, // instance | 2362 result, // instance |
| 2363 temp); // end address | 2363 temp); // end address |
| 2364 | 2364 |
| 2365 // Setup up number of context variables field. | 2365 // Setup up number of context variables field. |
| 2366 __ movq(FieldAddress(result, Context::num_variables_offset()), | 2366 __ movq(FieldAddress(result, Context::num_variables_offset()), |
| 2367 Immediate(num_context_variables())); | 2367 Immediate(num_context_variables())); |
| 2368 | 2368 |
| 2369 // Setup isolate field. | |
| 2370 __ movq(FieldAddress(result, Context::isolate_offset()), | |
| 2371 Immediate(reinterpret_cast<intptr_t>(Isolate::Current()))); | |
| 2372 | |
| 2373 __ Bind(slow_path->exit_label()); | 2369 __ Bind(slow_path->exit_label()); |
| 2374 } | 2370 } |
| 2375 | 2371 |
| 2376 | 2372 |
| 2377 LocationSummary* AllocateContextInstr::MakeLocationSummary(Isolate* isolate, | 2373 LocationSummary* AllocateContextInstr::MakeLocationSummary(Isolate* isolate, |
| 2378 bool opt) const { | 2374 bool opt) const { |
| 2379 const intptr_t kNumInputs = 0; | 2375 const intptr_t kNumInputs = 0; |
| 2380 const intptr_t kNumTemps = 1; | 2376 const intptr_t kNumTemps = 1; |
| 2381 LocationSummary* locs = new(isolate) LocationSummary( | 2377 LocationSummary* locs = new(isolate) LocationSummary( |
| 2382 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); | 2378 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); |
| (...skipping 4021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6404 __ movq(R10, Immediate(kInvalidObjectPointer)); | 6400 __ movq(R10, Immediate(kInvalidObjectPointer)); |
| 6405 __ movq(RBX, Immediate(kInvalidObjectPointer)); | 6401 __ movq(RBX, Immediate(kInvalidObjectPointer)); |
| 6406 #endif | 6402 #endif |
| 6407 } | 6403 } |
| 6408 | 6404 |
| 6409 } // namespace dart | 6405 } // namespace dart |
| 6410 | 6406 |
| 6411 #undef __ | 6407 #undef __ |
| 6412 | 6408 |
| 6413 #endif // defined TARGET_ARCH_X64 | 6409 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |