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

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

Issue 7535004: Merge bleeding edge up to 8774 into the GC branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
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
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ia32/stub-cache-ia32.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 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 void MacroAssembler::SafePush(const Immediate& x) { 341 void MacroAssembler::SafePush(const Immediate& x) {
342 if (IsUnsafeImmediate(x) && jit_cookie() != 0) { 342 if (IsUnsafeImmediate(x) && jit_cookie() != 0) {
343 push(Immediate(x.x_ ^ jit_cookie())); 343 push(Immediate(x.x_ ^ jit_cookie()));
344 xor_(Operand(esp, 0), Immediate(jit_cookie())); 344 xor_(Operand(esp, 0), Immediate(jit_cookie()));
345 } else { 345 } else {
346 push(x); 346 push(x);
347 } 347 }
348 } 348 }
349 349
350 350
351 void MacroAssembler::CompareRoot(Register with, Heap::RootListIndex index) {
352 // see ROOT_ACCESSOR macro in factory.h
353 Handle<Object> value(&isolate()->heap()->roots_address()[index]);
354 cmp(with, value);
355 }
356
357
351 void MacroAssembler::CmpObjectType(Register heap_object, 358 void MacroAssembler::CmpObjectType(Register heap_object,
352 InstanceType type, 359 InstanceType type,
353 Register map) { 360 Register map) {
354 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); 361 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset));
355 CmpInstanceType(map, type); 362 CmpInstanceType(map, type);
356 } 363 }
357 364
358 365
359 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) { 366 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) {
360 cmpb(FieldOperand(map, Map::kInstanceTypeOffset), 367 cmpb(FieldOperand(map, Map::kInstanceTypeOffset),
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after
2122 2129
2123 2130
2124 void MacroAssembler::AssertFastElements(Register elements) { 2131 void MacroAssembler::AssertFastElements(Register elements) {
2125 if (emit_debug_code()) { 2132 if (emit_debug_code()) {
2126 Factory* factory = isolate()->factory(); 2133 Factory* factory = isolate()->factory();
2127 Label ok; 2134 Label ok;
2128 cmp(FieldOperand(elements, HeapObject::kMapOffset), 2135 cmp(FieldOperand(elements, HeapObject::kMapOffset),
2129 Immediate(factory->fixed_array_map())); 2136 Immediate(factory->fixed_array_map()));
2130 j(equal, &ok); 2137 j(equal, &ok);
2131 cmp(FieldOperand(elements, HeapObject::kMapOffset), 2138 cmp(FieldOperand(elements, HeapObject::kMapOffset),
2139 Immediate(factory->fixed_double_array_map()));
2140 j(equal, &ok);
2141 cmp(FieldOperand(elements, HeapObject::kMapOffset),
2132 Immediate(factory->fixed_cow_array_map())); 2142 Immediate(factory->fixed_cow_array_map()));
2133 j(equal, &ok); 2143 j(equal, &ok);
2134 Abort("JSObject with fast elements map has slow elements"); 2144 Abort("JSObject with fast elements map has slow elements");
2135 bind(&ok); 2145 bind(&ok);
2136 } 2146 }
2137 } 2147 }
2138 2148
2139 2149
2140 void MacroAssembler::Check(Condition cc, const char* msg) { 2150 void MacroAssembler::Check(Condition cc, const char* msg) {
2141 Label L; 2151 Label L;
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
2512 and_(bitmap_scratch, Immediate(~Page::kPageAlignmentMask)); 2522 and_(bitmap_scratch, Immediate(~Page::kPageAlignmentMask));
2513 add(Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset), 2523 add(Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset),
2514 length); 2524 length);
2515 2525
2516 bind(&done); 2526 bind(&done);
2517 } 2527 }
2518 2528
2519 } } // namespace v8::internal 2529 } } // namespace v8::internal
2520 2530
2521 #endif // V8_TARGET_ARCH_IA32 2531 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698