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

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

Issue 23480005: Change Bool::Get to return a handle instead of a pointer to a raw object. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
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/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 __ LoadObject(RAX, Bool::True()); 624 __ LoadObject(RAX, Bool::True());
625 __ cmpq(RDX, RAX); 625 __ cmpq(RDX, RAX);
626 __ j(NOT_EQUAL, &done, Assembler::kNearJump); 626 __ j(NOT_EQUAL, &done, Assembler::kNearJump);
627 __ LoadObject(RAX, Bool::False()); 627 __ LoadObject(RAX, Bool::False());
628 } else { 628 } else {
629 __ popq(RAX); 629 __ popq(RAX);
630 } 630 }
631 __ jmp(&done, Assembler::kNearJump); 631 __ jmp(&done, Assembler::kNearJump);
632 } 632 }
633 __ Bind(&is_not_instance); 633 __ Bind(&is_not_instance);
634 __ LoadObject(RAX, negate_result ? Bool::True() : Bool::False()); 634 __ LoadObject(RAX, Bool::Get(negate_result));
635 __ jmp(&done, Assembler::kNearJump); 635 __ jmp(&done, Assembler::kNearJump);
636 636
637 __ Bind(&is_instance); 637 __ Bind(&is_instance);
638 __ LoadObject(RAX, negate_result ? Bool::False() : Bool::True()); 638 __ LoadObject(RAX, Bool::Get(!negate_result));
639 __ Bind(&done); 639 __ Bind(&done);
640 __ popq(RDX); // Remove pushed instantiator type arguments. 640 __ popq(RDX); // Remove pushed instantiator type arguments.
641 __ popq(RCX); // Remove pushed instantiator. 641 __ popq(RCX); // Remove pushed instantiator.
642 } 642 }
643 643
644 644
645 // Optimize assignable type check by adding inlined tests for: 645 // Optimize assignable type check by adding inlined tests for:
646 // - NULL -> return NULL. 646 // - NULL -> return NULL.
647 // - Smi -> compile time subtype check (only if dst class is not parameterized). 647 // - Smi -> compile time subtype check (only if dst class is not parameterized).
648 // - Class equality (only if class is not parameterized). 648 // - Class equality (only if class is not parameterized).
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1895 __ movups(reg, Address(RSP, 0)); 1895 __ movups(reg, Address(RSP, 0));
1896 __ addq(RSP, Immediate(kFpuRegisterSize)); 1896 __ addq(RSP, Immediate(kFpuRegisterSize));
1897 } 1897 }
1898 1898
1899 1899
1900 #undef __ 1900 #undef __
1901 1901
1902 } // namespace dart 1902 } // namespace dart
1903 1903
1904 #endif // defined TARGET_ARCH_X64 1904 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698