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

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

Issue 11238035: Make isEmpty a getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 1 month 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_ia32.cc ('k') | samples/buildhook2/build.dart » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1545 __ j(NOT_EQUAL, &fall_through); 1545 __ j(NOT_EQUAL, &fall_through);
1546 __ SmiUntag(RCX); 1546 __ SmiUntag(RCX);
1547 __ movzxb(RAX, FieldAddress(RAX, RCX, TIMES_1, OneByteString::data_offset())); 1547 __ movzxb(RAX, FieldAddress(RAX, RCX, TIMES_1, OneByteString::data_offset()));
1548 __ SmiTag(RAX); 1548 __ SmiTag(RAX);
1549 __ ret(); 1549 __ ret();
1550 __ Bind(&fall_through); 1550 __ Bind(&fall_through);
1551 return false; 1551 return false;
1552 } 1552 }
1553 1553
1554 1554
1555 bool Intrinsifier::String_isEmpty(Assembler* assembler) { 1555 bool Intrinsifier::String_getIsEmpty(Assembler* assembler) {
1556 Label is_true; 1556 Label is_true;
1557 const Bool& bool_true = Bool::ZoneHandle(Bool::True()); 1557 const Bool& bool_true = Bool::ZoneHandle(Bool::True());
1558 const Bool& bool_false = Bool::ZoneHandle(Bool::False()); 1558 const Bool& bool_false = Bool::ZoneHandle(Bool::False());
1559 // Get length. 1559 // Get length.
1560 __ movq(RAX, Address(RSP, + 1 * kWordSize)); // String object. 1560 __ movq(RAX, Address(RSP, + 1 * kWordSize)); // String object.
1561 __ movq(RAX, FieldAddress(RAX, String::length_offset())); 1561 __ movq(RAX, FieldAddress(RAX, String::length_offset()));
1562 __ cmpq(RAX, Immediate(Smi::RawValue(0))); 1562 __ cmpq(RAX, Immediate(Smi::RawValue(0)));
1563 __ j(EQUAL, &is_true, Assembler::kNearJump); 1563 __ j(EQUAL, &is_true, Assembler::kNearJump);
1564 __ LoadObject(RAX, bool_false); 1564 __ LoadObject(RAX, bool_false);
1565 __ ret(); 1565 __ ret();
1566 __ Bind(&is_true); 1566 __ Bind(&is_true);
1567 __ LoadObject(RAX, bool_true); 1567 __ LoadObject(RAX, bool_true);
1568 __ ret(); 1568 __ ret();
1569 return true; 1569 return true;
1570 } 1570 }
1571 1571
1572 #undef __ 1572 #undef __
1573 1573
1574 } // namespace dart 1574 } // namespace dart
1575 1575
1576 #endif // defined TARGET_ARCH_X64 1576 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | samples/buildhook2/build.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698