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

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

Issue 497623003: Fix performance degradation in Havlak: prevent conflicting method recognizer kinds to be stored in … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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_arm64.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 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 &fall_through, 1316 &fall_through,
1317 Assembler::kNearJump, 1317 Assembler::kNearJump,
1318 EAX, // Result register. 1318 EAX, // Result register.
1319 EBX); 1319 EBX);
1320 __ movsd(FieldAddress(EAX, Double::value_offset()), XMM0); 1320 __ movsd(FieldAddress(EAX, Double::value_offset()), XMM0);
1321 __ ret(); 1321 __ ret();
1322 __ Bind(&fall_through); 1322 __ Bind(&fall_through);
1323 } 1323 }
1324 1324
1325 1325
1326 void Intrinsifier::Double_fromInteger(Assembler* assembler) { 1326 void Intrinsifier::DoubleFromInteger(Assembler* assembler) {
1327 Label fall_through; 1327 Label fall_through;
1328 __ movl(EAX, Address(ESP, +1 * kWordSize)); 1328 __ movl(EAX, Address(ESP, +1 * kWordSize));
1329 __ testl(EAX, Immediate(kSmiTagMask)); 1329 __ testl(EAX, Immediate(kSmiTagMask));
1330 __ j(NOT_ZERO, &fall_through, Assembler::kNearJump); 1330 __ j(NOT_ZERO, &fall_through, Assembler::kNearJump);
1331 // Is Smi. 1331 // Is Smi.
1332 __ SmiUntag(EAX); 1332 __ SmiUntag(EAX);
1333 __ cvtsi2sd(XMM0, EAX); 1333 __ cvtsi2sd(XMM0, EAX);
1334 const Class& double_class = Class::Handle( 1334 const Class& double_class = Class::Handle(
1335 Isolate::Current()->object_store()->double_class()); 1335 Isolate::Current()->object_store()->double_class());
1336 __ TryAllocate(double_class, 1336 __ TryAllocate(double_class,
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1516 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump); 1516 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump);
1517 ASSERT(kSmiTagShift == 1); 1517 ASSERT(kSmiTagShift == 1);
1518 __ movzxw(EAX, FieldAddress(EAX, EBX, TIMES_1, TwoByteString::data_offset())); 1518 __ movzxw(EAX, FieldAddress(EAX, EBX, TIMES_1, TwoByteString::data_offset()));
1519 __ SmiTag(EAX); 1519 __ SmiTag(EAX);
1520 __ ret(); 1520 __ ret();
1521 1521
1522 __ Bind(&fall_through); 1522 __ Bind(&fall_through);
1523 } 1523 }
1524 1524
1525 1525
1526 void Intrinsifier::StringBase_charAt(Assembler* assembler) { 1526 void Intrinsifier::StringBaseCharAt(Assembler* assembler) {
1527 Label fall_through, try_two_byte_string; 1527 Label fall_through, try_two_byte_string;
1528 __ movl(EBX, Address(ESP, + 1 * kWordSize)); // Index. 1528 __ movl(EBX, Address(ESP, + 1 * kWordSize)); // Index.
1529 __ movl(EAX, Address(ESP, + 2 * kWordSize)); // String. 1529 __ movl(EAX, Address(ESP, + 2 * kWordSize)); // String.
1530 __ testl(EBX, Immediate(kSmiTagMask)); 1530 __ testl(EBX, Immediate(kSmiTagMask));
1531 __ j(NOT_ZERO, &fall_through, Assembler::kNearJump); // Non-smi index. 1531 __ j(NOT_ZERO, &fall_through, Assembler::kNearJump); // Non-smi index.
1532 // Range check. 1532 // Range check.
1533 __ cmpl(EBX, FieldAddress(EAX, String::length_offset())); 1533 __ cmpl(EBX, FieldAddress(EAX, String::length_offset()));
1534 // Runtime throws exception. 1534 // Runtime throws exception.
1535 __ j(ABOVE_EQUAL, &fall_through, Assembler::kNearJump); 1535 __ j(ABOVE_EQUAL, &fall_through, Assembler::kNearJump);
1536 __ CompareClassId(EAX, kOneByteStringCid, EDI); 1536 __ CompareClassId(EAX, kOneByteStringCid, EDI);
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 Isolate::current_tag_offset()); 1910 Isolate::current_tag_offset());
1911 // Set return value to Isolate::current_tag_. 1911 // Set return value to Isolate::current_tag_.
1912 __ movl(EAX, current_tag_addr); 1912 __ movl(EAX, current_tag_addr);
1913 __ ret(); 1913 __ ret();
1914 } 1914 }
1915 1915
1916 #undef __ 1916 #undef __
1917 } // namespace dart 1917 } // namespace dart
1918 1918
1919 #endif // defined TARGET_ARCH_IA32 1919 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_arm64.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698