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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 7544012: Implement type recording for ToBoolean on x64. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 4 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 void MacroAssembler::SafePush(const Immediate& x) { 256 void MacroAssembler::SafePush(const Immediate& x) {
257 if (IsUnsafeImmediate(x) && jit_cookie() != 0) { 257 if (IsUnsafeImmediate(x) && jit_cookie() != 0) {
258 push(Immediate(x.x_ ^ jit_cookie())); 258 push(Immediate(x.x_ ^ jit_cookie()));
259 xor_(Operand(esp, 0), Immediate(jit_cookie())); 259 xor_(Operand(esp, 0), Immediate(jit_cookie()));
260 } else { 260 } else {
261 push(x); 261 push(x);
262 } 262 }
263 } 263 }
264 264
265 265
266 void MacroAssembler::CompareRoot(Register with, Heap::RootListIndex index) {
267 // see ROOT_ACCESSOR macro in factory.h
268 Handle<Object> value(BitCast<Object**>(
Kevin Millikin (Chromium) 2011/08/01 13:02:05 I don't think we need the BitCast here, the roots
Sven Panne 2011/08/01 13:13:25 Good point, I should have looked more closely at t
269 &isolate()->heap()->roots_address()[index]));
270 cmp(with, value);
271 }
272
273
266 void MacroAssembler::CmpObjectType(Register heap_object, 274 void MacroAssembler::CmpObjectType(Register heap_object,
267 InstanceType type, 275 InstanceType type,
268 Register map) { 276 Register map) {
269 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); 277 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset));
270 CmpInstanceType(map, type); 278 CmpInstanceType(map, type);
271 } 279 }
272 280
273 281
274 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) { 282 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) {
275 cmpb(FieldOperand(map, Map::kInstanceTypeOffset), 283 cmpb(FieldOperand(map, Map::kInstanceTypeOffset),
(...skipping 1954 matching lines...) Expand 10 before | Expand all | Expand 10 after
2230 2238
2231 // Check that the code was patched as expected. 2239 // Check that the code was patched as expected.
2232 ASSERT(masm_.pc_ == address_ + size_); 2240 ASSERT(masm_.pc_ == address_ + size_);
2233 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2241 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2234 } 2242 }
2235 2243
2236 2244
2237 } } // namespace v8::internal 2245 } } // namespace v8::internal
2238 2246
2239 #endif // V8_TARGET_ARCH_IA32 2247 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698