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

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

Issue 18147021: Fix type check elimination bug in code generator (issue 11792). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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/flow_graph_compiler_ia32.cc ('k') | runtime/vm/flow_graph_compiler_x64.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 #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 "lib/error.h" 10 #include "lib/error.h"
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 // Preserve instantiator and its type arguments. 657 // Preserve instantiator and its type arguments.
658 __ addiu(SP, SP, Immediate(-2 * kWordSize)); 658 __ addiu(SP, SP, Immediate(-2 * kWordSize));
659 __ sw(A2, Address(SP, 1 * kWordSize)); 659 __ sw(A2, Address(SP, 1 * kWordSize));
660 660
661 // A null object is always assignable and is returned as result. 661 // A null object is always assignable and is returned as result.
662 Label is_assignable, runtime_call; 662 Label is_assignable, runtime_call;
663 663
664 __ BranchEqual(A0, reinterpret_cast<int32_t>(Object::null()), &is_assignable); 664 __ BranchEqual(A0, reinterpret_cast<int32_t>(Object::null()), &is_assignable);
665 __ delay_slot()->sw(A1, Address(SP, 0 * kWordSize)); 665 __ delay_slot()->sw(A1, Address(SP, 0 * kWordSize));
666 666
667 if (!FLAG_eliminate_type_checks) { 667 if (!FLAG_eliminate_type_checks || dst_type.IsMalformed()) {
668 // If type checks are not eliminated during the graph building then 668 // If type checks are not eliminated during the graph building then
669 // a transition sentinel can be seen here. 669 // a transition sentinel can be seen here.
670 __ BranchEqual(A0, Object::transition_sentinel(), &is_assignable); 670 __ BranchEqual(A0, Object::transition_sentinel(), &is_assignable);
671 } 671 }
672 672
673 // Generate throw new TypeError() if the type is malformed. 673 // Generate throw new TypeError() if the type is malformed.
674 if (dst_type.IsMalformed()) { 674 if (dst_type.IsMalformed()) {
675 const Error& error = Error::Handle(dst_type.malformed_error()); 675 const Error& error = Error::Handle(dst_type.malformed_error());
676 const String& error_message = String::ZoneHandle( 676 const String& error_message = String::ZoneHandle(
677 Symbols::New(error.ToErrorCString())); 677 Symbols::New(error.ToErrorCString()));
(...skipping 1323 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
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698