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

Side by Side Diff: runtime/vm/flow_graph_compiler_ia32.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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 __ LoadObject(EAX, Bool::True()); 627 __ LoadObject(EAX, Bool::True());
628 __ cmpl(EDX, EAX); 628 __ cmpl(EDX, EAX);
629 __ j(NOT_EQUAL, &done, Assembler::kNearJump); 629 __ j(NOT_EQUAL, &done, Assembler::kNearJump);
630 __ LoadObject(EAX, Bool::False()); 630 __ LoadObject(EAX, Bool::False());
631 } else { 631 } else {
632 __ popl(EAX); 632 __ popl(EAX);
633 } 633 }
634 __ jmp(&done, Assembler::kNearJump); 634 __ jmp(&done, Assembler::kNearJump);
635 } 635 }
636 __ Bind(&is_not_instance); 636 __ Bind(&is_not_instance);
637 __ LoadObject(EAX, negate_result ? Bool::True() : Bool::False()); 637 __ LoadObject(EAX, Bool::Get(negate_result));
638 __ jmp(&done, Assembler::kNearJump); 638 __ jmp(&done, Assembler::kNearJump);
639 639
640 __ Bind(&is_instance); 640 __ Bind(&is_instance);
641 __ LoadObject(EAX, negate_result ? Bool::False() : Bool::True()); 641 __ LoadObject(EAX, Bool::Get(!negate_result));
642 __ Bind(&done); 642 __ Bind(&done);
643 __ popl(EDX); // Remove pushed instantiator type arguments. 643 __ popl(EDX); // Remove pushed instantiator type arguments.
644 __ popl(ECX); // Remove pushed instantiator. 644 __ popl(ECX); // Remove pushed instantiator.
645 } 645 }
646 646
647 647
648 // Optimize assignable type check by adding inlined tests for: 648 // Optimize assignable type check by adding inlined tests for:
649 // - NULL -> return NULL. 649 // - NULL -> return NULL.
650 // - Smi -> compile time subtype check (only if dst class is not parameterized). 650 // - Smi -> compile time subtype check (only if dst class is not parameterized).
651 // - Class equality (only if class is not parameterized). 651 // - Class equality (only if class is not parameterized).
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1915 __ movups(reg, Address(ESP, 0)); 1915 __ movups(reg, Address(ESP, 0));
1916 __ addl(ESP, Immediate(kFpuRegisterSize)); 1916 __ addl(ESP, Immediate(kFpuRegisterSize));
1917 } 1917 }
1918 1918
1919 1919
1920 #undef __ 1920 #undef __
1921 1921
1922 } // namespace dart 1922 } // namespace dart
1923 1923
1924 #endif // defined TARGET_ARCH_IA32 1924 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698