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

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

Issue 1148943004: VM: Fix bugs with missing deoptimization environment and int32x4 constructor (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixed more typed data bugs Created 5 years, 6 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 3419 matching lines...) Expand 10 before | Expand all | Expand 10 after
3430 const intptr_t value_cid = value()->Type()->ToCid(); 3430 const intptr_t value_cid = value()->Type()->ToCid();
3431 const Register value = locs()->in(0).reg(); 3431 const Register value = locs()->in(0).reg();
3432 Label* deopt = CanDeoptimize() ? 3432 Label* deopt = CanDeoptimize() ?
3433 compiler->AddDeoptStub(GetDeoptId(), ICData::kDeoptUnboxInteger) : NULL; 3433 compiler->AddDeoptStub(GetDeoptId(), ICData::kDeoptUnboxInteger) : NULL;
3434 ASSERT(value == locs()->out(0).reg()); 3434 ASSERT(value == locs()->out(0).reg());
3435 3435
3436 if (value_cid == kSmiCid) { 3436 if (value_cid == kSmiCid) {
3437 __ SmiUntag(value); 3437 __ SmiUntag(value);
3438 } else if (value_cid == kMintCid) { 3438 } else if (value_cid == kMintCid) {
3439 __ movq(value, FieldAddress(value, Mint::value_offset())); 3439 __ movq(value, FieldAddress(value, Mint::value_offset()));
3440 } else if (!CanDeoptimize()) {
3441 // Type information is not conclusive, but range analysis found
3442 // the value to be in int64 range. Therefore it must be a smi
3443 // or mint value.
3444 ASSERT(is_truncating());
3445 Label done;
3446 __ SmiUntag(value);
3447 __ j(NOT_CARRY, &done, Assembler::kNearJump);
3448 __ movq(value, Address(value, TIMES_2, Mint::value_offset()));
3449 __ Bind(&done);
3450 return;
3440 } else { 3451 } else {
3441 Label done; 3452 Label done;
3442 // Optimistically untag value. 3453 // Optimistically untag value.
3443 __ SmiUntagOrCheckClass(value, kMintCid, &done); 3454 __ SmiUntagOrCheckClass(value, kMintCid, &done);
3444 __ j(NOT_EQUAL, deopt); 3455 __ j(NOT_EQUAL, deopt);
3445 // Undo untagging by multiplying value with 2. 3456 // Undo untagging by multiplying value with 2.
3446 __ movq(value, Address(value, TIMES_2, Mint::value_offset())); 3457 __ movq(value, Address(value, TIMES_2, Mint::value_offset()));
3447 __ Bind(&done); 3458 __ Bind(&done);
3448 } 3459 }
3449 3460
(...skipping 3001 matching lines...) Expand 10 before | Expand all | Expand 10 after
6451 __ Drop(1); 6462 __ Drop(1);
6452 __ popq(result); 6463 __ popq(result);
6453 } 6464 }
6454 6465
6455 6466
6456 } // namespace dart 6467 } // namespace dart
6457 6468
6458 #undef __ 6469 #undef __
6459 6470
6460 #endif // defined TARGET_ARCH_X64 6471 #endif // defined TARGET_ARCH_X64
OLDNEW
« runtime/vm/intermediate_language.cc ('K') | « runtime/vm/intermediate_language_arm64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698