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

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

Issue 12282038: Remove deprecated string features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // The intrinsic code below is executed before a method has built its frame. 5 // The intrinsic code below is executed before a method has built its frame.
6 // The return address is on the stack and the arguments below it. 6 // The return address is on the stack and the arguments below it.
7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved.
8 // Each intrinsification method returns true if the corresponding 8 // Each intrinsification method returns true if the corresponding
9 // Dart method was intrinsified. 9 // Dart method was intrinsified.
10 10
(...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 1428
1429 bool Intrinsifier::String_getLength(Assembler* assembler) { 1429 bool Intrinsifier::String_getLength(Assembler* assembler) {
1430 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // String object. 1430 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // String object.
1431 __ movl(EAX, FieldAddress(EAX, String::length_offset())); 1431 __ movl(EAX, FieldAddress(EAX, String::length_offset()));
1432 __ ret(); 1432 __ ret();
1433 return true; 1433 return true;
1434 } 1434 }
1435 1435
1436 1436
1437 // TODO(srdjan): Implement for two and four byte strings as well. 1437 // TODO(srdjan): Implement for two and four byte strings as well.
1438 bool Intrinsifier::String_charCodeAt(Assembler* assembler) { 1438 bool Intrinsifier::String_codeUnitAt(Assembler* assembler) {
1439 Label fall_through; 1439 Label fall_through;
1440 __ movl(EBX, Address(ESP, + 1 * kWordSize)); // Index. 1440 __ movl(EBX, Address(ESP, + 1 * kWordSize)); // Index.
1441 __ movl(EAX, Address(ESP, + 2 * kWordSize)); // String. 1441 __ movl(EAX, Address(ESP, + 2 * kWordSize)); // String.
1442 __ testl(EBX, Immediate(kSmiTagMask)); 1442 __ testl(EBX, Immediate(kSmiTagMask));
1443 __ j(NOT_ZERO, &fall_through, Assembler::kNearJump); // Non-smi index. 1443 __ j(NOT_ZERO, &fall_through, Assembler::kNearJump); // Non-smi index.
1444 // Range check. 1444 // Range check.
1445 __ cmpl(EBX, FieldAddress(EAX, String::length_offset())); 1445 __ cmpl(EBX, FieldAddress(EAX, String::length_offset()));
1446 // Runtime throws exception. 1446 // Runtime throws exception.
1447 __ j(ABOVE_EQUAL, &fall_through, Assembler::kNearJump); 1447 __ j(ABOVE_EQUAL, &fall_through, Assembler::kNearJump);
1448 __ CompareClassId(EAX, kOneByteStringCid, EDI); 1448 __ CompareClassId(EAX, kOneByteStringCid, EDI);
(...skipping 19 matching lines...) Expand all
1468 __ Bind(&is_true); 1468 __ Bind(&is_true);
1469 __ LoadObject(EAX, Bool::True()); 1469 __ LoadObject(EAX, Bool::True());
1470 __ ret(); 1470 __ ret();
1471 return true; 1471 return true;
1472 } 1472 }
1473 1473
1474 #undef __ 1474 #undef __
1475 } // namespace dart 1475 } // namespace dart
1476 1476
1477 #endif // defined TARGET_ARCH_IA32 1477 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698