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

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

Issue 5736008: Provide baseline for experimental GC implementation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 10 years 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 30 matching lines...) Expand all
41 // ------------------------------------------------------------------------- 41 // -------------------------------------------------------------------------
42 // MacroAssembler implementation. 42 // MacroAssembler implementation.
43 43
44 MacroAssembler::MacroAssembler(void* buffer, int size) 44 MacroAssembler::MacroAssembler(void* buffer, int size)
45 : Assembler(buffer, size), 45 : Assembler(buffer, size),
46 generating_stub_(false), 46 generating_stub_(false),
47 allow_stub_calls_(true), 47 allow_stub_calls_(true),
48 code_object_(Heap::undefined_value()) { 48 code_object_(Heap::undefined_value()) {
49 } 49 }
50 50
51 51 #ifdef ENABLE_CARDMARKING_WRITE_BARRIER
52 void MacroAssembler::RecordWriteHelper(Register object, 52 void MacroAssembler::RecordWriteHelper(Register object,
53 Register addr, 53 Register addr,
54 Register scratch) { 54 Register scratch) {
55 if (FLAG_debug_code) { 55 if (FLAG_debug_code) {
56 // Check that the object is not in new space. 56 // Check that the object is not in new space.
57 Label not_in_new_space; 57 Label not_in_new_space;
58 InNewSpace(object, scratch, not_equal, &not_in_new_space); 58 InNewSpace(object, scratch, not_equal, &not_in_new_space);
59 Abort("new-space object passed to RecordWriteHelper"); 59 Abort("new-space object passed to RecordWriteHelper");
60 bind(&not_in_new_space); 60 bind(&not_in_new_space);
61 } 61 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 bind(&done); 174 bind(&done);
175 175
176 // Clobber all input registers when running with the debug-code flag 176 // Clobber all input registers when running with the debug-code flag
177 // turned on to provoke errors. 177 // turned on to provoke errors.
178 if (FLAG_debug_code) { 178 if (FLAG_debug_code) {
179 mov(object, Immediate(BitCast<int32_t>(kZapValue))); 179 mov(object, Immediate(BitCast<int32_t>(kZapValue)));
180 mov(address, Immediate(BitCast<int32_t>(kZapValue))); 180 mov(address, Immediate(BitCast<int32_t>(kZapValue)));
181 mov(value, Immediate(BitCast<int32_t>(kZapValue))); 181 mov(value, Immediate(BitCast<int32_t>(kZapValue)));
182 } 182 }
183 } 183 }
184 184 #endif
185 185
186 #ifdef ENABLE_DEBUGGER_SUPPORT 186 #ifdef ENABLE_DEBUGGER_SUPPORT
187 void MacroAssembler::DebugBreak() { 187 void MacroAssembler::DebugBreak() {
188 Set(eax, Immediate(0)); 188 Set(eax, Immediate(0));
189 mov(ebx, Immediate(ExternalReference(Runtime::kDebugBreak))); 189 mov(ebx, Immediate(ExternalReference(Runtime::kDebugBreak)));
190 CEntryStub ces(1); 190 CEntryStub ces(1);
191 call(ces.GetCode(), RelocInfo::DEBUG_BREAK); 191 call(ces.GetCode(), RelocInfo::DEBUG_BREAK);
192 } 192 }
193 #endif 193 #endif
194 194
(...skipping 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1915 1915
1916 // Check that the code was patched as expected. 1916 // Check that the code was patched as expected.
1917 ASSERT(masm_.pc_ == address_ + size_); 1917 ASSERT(masm_.pc_ == address_ + size_);
1918 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 1918 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
1919 } 1919 }
1920 1920
1921 1921
1922 } } // namespace v8::internal 1922 } } // namespace v8::internal
1923 1923
1924 #endif // V8_TARGET_ARCH_IA32 1924 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698