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

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

Issue 770303002: Support non-deoptimizing version of UnboxInt32 for integer definitions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | Annotate | Revision Log
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_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 3329 matching lines...) Expand 10 before | Expand all | Expand 10 after
3340 const Register out = locs()->out(0).reg(); 3340 const Register out = locs()->out(0).reg();
3341 Label* deopt = CanDeoptimize() ? 3341 Label* deopt = CanDeoptimize() ?
3342 compiler->AddDeoptStub(GetDeoptId(), ICData::kDeoptUnboxInteger) : NULL; 3342 compiler->AddDeoptStub(GetDeoptId(), ICData::kDeoptUnboxInteger) : NULL;
3343 Label* out_of_range = !is_truncating() ? deopt : NULL; 3343 Label* out_of_range = !is_truncating() ? deopt : NULL;
3344 ASSERT(value != out); 3344 ASSERT(value != out);
3345 3345
3346 if (value_cid == kSmiCid) { 3346 if (value_cid == kSmiCid) {
3347 __ SmiUntag(out, value); 3347 __ SmiUntag(out, value);
3348 } else if (value_cid == kMintCid) { 3348 } else if (value_cid == kMintCid) {
3349 LoadInt32FromMint(compiler, value, out, out_of_range); 3349 LoadInt32FromMint(compiler, value, out, out_of_range);
3350 } else if (!CanDeoptimize()) {
3351 Label done;
3352 __ SmiUntag(out, value);
3353 __ andi(CMPRES1, value, Immediate(kSmiTagMask));
3354 __ beq(CMPRES1, ZR, &done);
3355 LoadInt32FromMint(compiler, value, out, out_of_range);
Florian Schneider 2014/12/02 13:12:04 Same comment as on ARM.
Vyacheslav Egorov (Google) 2014/12/02 13:15:58 Done.
3356 __ Bind(&done);
3350 } else { 3357 } else {
3351 Label done; 3358 Label done;
3352 __ SmiUntag(out, value); 3359 __ SmiUntag(out, value);
3353 __ andi(CMPRES1, value, Immediate(kSmiTagMask)); 3360 __ andi(CMPRES1, value, Immediate(kSmiTagMask));
3354 __ beq(CMPRES1, ZR, &done); 3361 __ beq(CMPRES1, ZR, &done);
3355 __ LoadClassId(CMPRES1, value); 3362 __ LoadClassId(CMPRES1, value);
3356 __ BranchNotEqual(CMPRES1, Immediate(kMintCid), deopt); 3363 __ BranchNotEqual(CMPRES1, Immediate(kMintCid), deopt);
3357 LoadInt32FromMint(compiler, value, out, out_of_range); 3364 LoadInt32FromMint(compiler, value, out, out_of_range);
3358 __ Bind(&done); 3365 __ Bind(&done);
3359 } 3366 }
(...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after
4959 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 4966 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
4960 #if defined(DEBUG) 4967 #if defined(DEBUG)
4961 __ LoadImmediate(S4, kInvalidObjectPointer); 4968 __ LoadImmediate(S4, kInvalidObjectPointer);
4962 __ LoadImmediate(S5, kInvalidObjectPointer); 4969 __ LoadImmediate(S5, kInvalidObjectPointer);
4963 #endif 4970 #endif
4964 } 4971 }
4965 4972
4966 } // namespace dart 4973 } // namespace dart
4967 4974
4968 #endif // defined TARGET_ARCH_MIPS 4975 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« runtime/vm/intermediate_language_arm.cc ('K') | « runtime/vm/intermediate_language_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698