Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: runtime/vm/intermediate_language_x64.cc

Issue 1390153004: Move deopt_id and related helpers/definitions from Isolate to Thread (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 6346 matching lines...) Expand 10 before | Expand all | Expand 10 after
6357 __ movq(RCX, FieldAddress(RAX, Function::entry_point_offset())); 6357 __ movq(RCX, FieldAddress(RAX, Function::entry_point_offset()));
6358 6358
6359 // RAX: Function. 6359 // RAX: Function.
6360 // R10: Arguments descriptor array. 6360 // R10: Arguments descriptor array.
6361 // RBX: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). 6361 // RBX: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value).
6362 __ xorq(RBX, RBX); 6362 __ xorq(RBX, RBX);
6363 __ call(RCX); 6363 __ call(RCX);
6364 compiler->RecordSafepoint(locs()); 6364 compiler->RecordSafepoint(locs());
6365 // Marks either the continuation point in unoptimized code or the 6365 // Marks either the continuation point in unoptimized code or the
6366 // deoptimization point in optimized code, after call. 6366 // deoptimization point in optimized code, after call.
6367 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); 6367 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id());
6368 if (compiler->is_optimizing()) { 6368 if (compiler->is_optimizing()) {
6369 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos()); 6369 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos());
6370 } 6370 }
6371 // Add deoptimization continuation point after the call and before the 6371 // Add deoptimization continuation point after the call and before the
6372 // arguments are removed. 6372 // arguments are removed.
6373 // In optimized code this descriptor is needed for exception handling. 6373 // In optimized code this descriptor is needed for exception handling.
6374 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, 6374 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt,
6375 deopt_id_after, 6375 deopt_id_after,
6376 token_pos()); 6376 token_pos());
6377 __ Drop(argument_count); 6377 __ Drop(argument_count);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
6415 RawPcDescriptors::kOther, 6415 RawPcDescriptors::kOther,
6416 locs()); 6416 locs());
6417 compiler->AddStubCallTarget(stub); 6417 compiler->AddStubCallTarget(stub);
6418 __ Drop(ArgumentCount()); // Discard arguments. 6418 __ Drop(ArgumentCount()); // Discard arguments.
6419 } 6419 }
6420 6420
6421 6421
6422 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 6422 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
6423 ASSERT(!compiler->is_optimizing()); 6423 ASSERT(!compiler->is_optimizing());
6424 __ CallPatchable(*StubCode::DebugStepCheck_entry()); 6424 __ CallPatchable(*StubCode::DebugStepCheck_entry());
6425 compiler->AddCurrentDescriptor(stub_kind_, Isolate::kNoDeoptId, token_pos()); 6425 compiler->AddCurrentDescriptor(stub_kind_, Thread::kNoDeoptId, token_pos());
6426 compiler->RecordSafepoint(locs()); 6426 compiler->RecordSafepoint(locs());
6427 } 6427 }
6428 6428
6429 6429
6430 LocationSummary* GrowRegExpStackInstr::MakeLocationSummary( 6430 LocationSummary* GrowRegExpStackInstr::MakeLocationSummary(
6431 Zone* zone, bool opt) const { 6431 Zone* zone, bool opt) const {
6432 const intptr_t kNumInputs = 1; 6432 const intptr_t kNumInputs = 1;
6433 const intptr_t kNumTemps = 0; 6433 const intptr_t kNumTemps = 0;
6434 LocationSummary* locs = new(zone) LocationSummary( 6434 LocationSummary* locs = new(zone) LocationSummary(
6435 zone, kNumInputs, kNumTemps, LocationSummary::kCall); 6435 zone, kNumInputs, kNumTemps, LocationSummary::kCall);
(...skipping 16 matching lines...) Expand all
6452 __ Drop(1); 6452 __ Drop(1);
6453 __ popq(result); 6453 __ popq(result);
6454 } 6454 }
6455 6455
6456 6456
6457 } // namespace dart 6457 } // namespace dart
6458 6458
6459 #undef __ 6459 #undef __
6460 6460
6461 #endif // defined TARGET_ARCH_X64 6461 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698