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

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

Issue 23352004: Add a trap_on_abort flag (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address review Created 7 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/flag-definitions.h ('k') | src/x64/macro-assembler-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2756 matching lines...) Expand 10 before | Expand all | Expand 10 after
2767 // from the real pointer as a smi. 2767 // from the real pointer as a smi.
2768 const char* msg = GetBailoutReason(reason); 2768 const char* msg = GetBailoutReason(reason);
2769 intptr_t p1 = reinterpret_cast<intptr_t>(msg); 2769 intptr_t p1 = reinterpret_cast<intptr_t>(msg);
2770 intptr_t p0 = (p1 & ~kSmiTagMask) + kSmiTag; 2770 intptr_t p0 = (p1 & ~kSmiTagMask) + kSmiTag;
2771 ASSERT(reinterpret_cast<Object*>(p0)->IsSmi()); 2771 ASSERT(reinterpret_cast<Object*>(p0)->IsSmi());
2772 #ifdef DEBUG 2772 #ifdef DEBUG
2773 if (msg != NULL) { 2773 if (msg != NULL) {
2774 RecordComment("Abort message: "); 2774 RecordComment("Abort message: ");
2775 RecordComment(msg); 2775 RecordComment(msg);
2776 } 2776 }
2777
2778 if (FLAG_trap_on_abort) {
2779 int3();
2780 return;
2781 }
2777 #endif 2782 #endif
2778 2783
2779 push(eax); 2784 push(eax);
2780 push(Immediate(p0)); 2785 push(Immediate(p0));
2781 push(Immediate(reinterpret_cast<intptr_t>(Smi::FromInt(p1 - p0)))); 2786 push(Immediate(reinterpret_cast<intptr_t>(Smi::FromInt(p1 - p0))));
2782 // Disable stub call restrictions to always allow calls to abort. 2787 // Disable stub call restrictions to always allow calls to abort.
2783 if (!has_frame_) { 2788 if (!has_frame_) {
2784 // We don't actually want to generate a pile of code for this, so just 2789 // We don't actually want to generate a pile of code for this, so just
2785 // claim there is a stack frame, without generating one. 2790 // claim there is a stack frame, without generating one.
2786 FrameScope scope(this, StackFrame::NONE); 2791 FrameScope scope(this, StackFrame::NONE);
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
3237 j(greater, &no_memento_available); 3242 j(greater, &no_memento_available);
3238 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize), 3243 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize),
3239 Immediate(Handle<Map>(isolate()->heap()->allocation_memento_map()))); 3244 Immediate(Handle<Map>(isolate()->heap()->allocation_memento_map())));
3240 bind(&no_memento_available); 3245 bind(&no_memento_available);
3241 } 3246 }
3242 3247
3243 3248
3244 } } // namespace v8::internal 3249 } } // namespace v8::internal
3245 3250
3246 #endif // V8_TARGET_ARCH_IA32 3251 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698