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

Side by Side Diff: runtime/vm/flow_graph_compiler_mips.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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 if (negate_result) { 615 if (negate_result) {
616 __ LoadObject(V0, Bool::True()); 616 __ LoadObject(V0, Bool::True());
617 __ bne(T0, V0, &done); 617 __ bne(T0, V0, &done);
618 __ LoadObject(V0, Bool::False()); 618 __ LoadObject(V0, Bool::False());
619 } else { 619 } else {
620 __ mov(V0, T0); 620 __ mov(V0, T0);
621 } 621 }
622 __ b(&done); 622 __ b(&done);
623 } 623 }
624 __ Bind(&is_not_instance); 624 __ Bind(&is_not_instance);
625 __ LoadObject(V0, negate_result ? Bool::True() : Bool::False()); 625 __ LoadObject(V0, Bool::Get(negate_result));
626 __ b(&done); 626 __ b(&done);
627 627
628 __ Bind(&is_instance); 628 __ Bind(&is_instance);
629 __ LoadObject(V0, negate_result ? Bool::False() : Bool::True()); 629 __ LoadObject(V0, Bool::Get(!negate_result));
630 __ Bind(&done); 630 __ Bind(&done);
631 // Remove instantiator (A2) and its type arguments (A1). 631 // Remove instantiator (A2) and its type arguments (A1).
632 __ Drop(2); 632 __ Drop(2);
633 } 633 }
634 634
635 635
636 // Optimize assignable type check by adding inlined tests for: 636 // Optimize assignable type check by adding inlined tests for:
637 // - NULL -> return NULL. 637 // - NULL -> return NULL.
638 // - Smi -> compile time subtype check (only if dst class is not parameterized). 638 // - Smi -> compile time subtype check (only if dst class is not parameterized).
639 // - Class equality (only if class is not parameterized). 639 // - Class equality (only if class is not parameterized).
(...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after
2001 __ AddImmediate(SP, kDoubleSize); 2001 __ AddImmediate(SP, kDoubleSize);
2002 } 2002 }
2003 2003
2004 2004
2005 #undef __ 2005 #undef __
2006 2006
2007 2007
2008 } // namespace dart 2008 } // namespace dart
2009 2009
2010 #endif // defined TARGET_ARCH_MIPS 2010 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698