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

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

Issue 27267: Experimental: periodic merge from the bleeding edge branch to the code... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: '' Created 11 years, 9 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/macro-assembler-ia32.h ('k') | src/mark-compact.h » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 24 matching lines...) Expand all
35 35
36 namespace v8 { namespace internal { 36 namespace v8 { namespace internal {
37 37
38 // ------------------------------------------------------------------------- 38 // -------------------------------------------------------------------------
39 // MacroAssembler implementation. 39 // MacroAssembler implementation.
40 40
41 MacroAssembler::MacroAssembler(void* buffer, int size) 41 MacroAssembler::MacroAssembler(void* buffer, int size)
42 : Assembler(buffer, size), 42 : Assembler(buffer, size),
43 unresolved_(0), 43 unresolved_(0),
44 generating_stub_(false), 44 generating_stub_(false),
45 allow_stub_calls_(true) { 45 allow_stub_calls_(true),
46 code_object_(Heap::undefined_value()) {
46 } 47 }
47 48
48 49
49 static void RecordWriteHelper(MacroAssembler* masm, 50 static void RecordWriteHelper(MacroAssembler* masm,
50 Register object, 51 Register object,
51 Register addr, 52 Register addr,
52 Register scratch) { 53 Register scratch) {
53 Label fast; 54 Label fast;
54 55
55 // Compute the page address from the heap object pointer, leave it 56 // Compute the page address from the heap object pointer, leave it
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 sahf(); 313 sahf();
313 pop(eax); 314 pop(eax);
314 } 315 }
315 316
316 317
317 void MacroAssembler::EnterFrame(StackFrame::Type type) { 318 void MacroAssembler::EnterFrame(StackFrame::Type type) {
318 push(ebp); 319 push(ebp);
319 mov(ebp, Operand(esp)); 320 mov(ebp, Operand(esp));
320 push(esi); 321 push(esi);
321 push(Immediate(Smi::FromInt(type))); 322 push(Immediate(Smi::FromInt(type)));
322 push(Immediate(0)); // Push an empty code cache slot. 323 push(Immediate(CodeObject()));
324 if (FLAG_debug_code) {
325 cmp(Operand(esp, 0), Immediate(Factory::undefined_value()));
326 Check(not_equal, "code object not properly patched");
327 }
323 } 328 }
324 329
325 330
326 void MacroAssembler::LeaveFrame(StackFrame::Type type) { 331 void MacroAssembler::LeaveFrame(StackFrame::Type type) {
327 if (FLAG_debug_code) { 332 if (FLAG_debug_code) {
328 cmp(Operand(ebp, StandardFrameConstants::kMarkerOffset), 333 cmp(Operand(ebp, StandardFrameConstants::kMarkerOffset),
329 Immediate(Smi::FromInt(type))); 334 Immediate(Smi::FromInt(type)));
330 Check(equal, "stack frame types must match"); 335 Check(equal, "stack frame types must match");
331 } 336 }
332 leave(); 337 leave();
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 // Indicate that code has changed. 1027 // Indicate that code has changed.
1023 CPU::FlushICache(address_, size_); 1028 CPU::FlushICache(address_, size_);
1024 1029
1025 // Check that the code was patched as expected. 1030 // Check that the code was patched as expected.
1026 ASSERT(masm_.pc_ == address_ + size_); 1031 ASSERT(masm_.pc_ == address_ + size_);
1027 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 1032 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
1028 } 1033 }
1029 1034
1030 1035
1031 } } // namespace v8::internal 1036 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/macro-assembler-ia32.h ('k') | src/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698