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

Side by Side Diff: vm/stub_code_ia32.cc

Issue 11745022: - Make Boolean 'true' and 'false' singleton VM isolate objects. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 7 years, 11 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 | « vm/snapshot_test.cc ('k') | vm/stub_code_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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/assembler_macros.h" 9 #include "vm/assembler_macros.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after
1975 __ addl(Address(EBX, count_offset), Immediate(Smi::RawValue(1))); 1975 __ addl(Address(EBX, count_offset), Immediate(Smi::RawValue(1)));
1976 __ j(NO_OVERFLOW, &compute_result); 1976 __ j(NO_OVERFLOW, &compute_result);
1977 __ movl(Address(EBX, count_offset), 1977 __ movl(Address(EBX, count_offset),
1978 Immediate(Smi::RawValue(Smi::kMaxValue))); 1978 Immediate(Smi::RawValue(Smi::kMaxValue)));
1979 1979
1980 __ Bind(&compute_result); 1980 __ Bind(&compute_result);
1981 Label true_label; 1981 Label true_label;
1982 __ movl(EAX, Address(ESP, 1 * kWordSize)); 1982 __ movl(EAX, Address(ESP, 1 * kWordSize));
1983 __ cmpl(EAX, Address(ESP, 2 * kWordSize)); 1983 __ cmpl(EAX, Address(ESP, 2 * kWordSize));
1984 __ j(EQUAL, &true_label, Assembler::kNearJump); 1984 __ j(EQUAL, &true_label, Assembler::kNearJump);
1985 __ LoadObject(EAX, Bool::ZoneHandle(Bool::False())); 1985 __ LoadObject(EAX, Bool::False());
1986 __ ret(); 1986 __ ret();
1987 __ Bind(&true_label); 1987 __ Bind(&true_label);
1988 __ LoadObject(EAX, Bool::ZoneHandle(Bool::True())); 1988 __ LoadObject(EAX, Bool::True());
1989 __ ret(); 1989 __ ret();
1990 1990
1991 __ Bind(&get_class_id_as_smi); 1991 __ Bind(&get_class_id_as_smi);
1992 Label not_smi; 1992 Label not_smi;
1993 // Test if Smi -> load Smi class for comparison. 1993 // Test if Smi -> load Smi class for comparison.
1994 __ testl(EAX, Immediate(kSmiTagMask)); 1994 __ testl(EAX, Immediate(kSmiTagMask));
1995 __ j(NOT_ZERO, &not_smi, Assembler::kNearJump); 1995 __ j(NOT_ZERO, &not_smi, Assembler::kNearJump);
1996 __ movl(EAX, Immediate(Smi::RawValue(kSmiCid))); 1996 __ movl(EAX, Immediate(Smi::RawValue(kSmiCid)));
1997 __ ret(); 1997 __ ret();
1998 1998
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2115 __ Bind(&done); 2115 __ Bind(&done);
2116 __ popl(temp); 2116 __ popl(temp);
2117 __ popl(right); 2117 __ popl(right);
2118 __ popl(left); 2118 __ popl(left);
2119 __ ret(); 2119 __ ret();
2120 } 2120 }
2121 2121
2122 } // namespace dart 2122 } // namespace dart
2123 2123
2124 #endif // defined TARGET_ARCH_IA32 2124 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « vm/snapshot_test.cc ('k') | vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698