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 2156923002: [builtins] Introduce a builtin for Abort(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 5 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
« no previous file with comments | « src/heap/heap.cc ('k') | src/isolate.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 2934 matching lines...) Expand 10 before | Expand all | Expand 10 after
2945 RecordComment("Abort message: "); 2945 RecordComment("Abort message: ");
2946 RecordComment(msg); 2946 RecordComment(msg);
2947 } 2947 }
2948 2948
2949 if (FLAG_trap_on_abort) { 2949 if (FLAG_trap_on_abort) {
2950 int3(); 2950 int3();
2951 return; 2951 return;
2952 } 2952 }
2953 #endif 2953 #endif
2954 2954
2955 push(Immediate(reinterpret_cast<intptr_t>(Smi::FromInt(reason)))); 2955 // Check if Abort() has already been initialized.
2956 DCHECK(isolate()->builtins()->Abort()->IsHeapObject());
2957
2958 Move(edx, Smi::FromInt(static_cast<int>(reason)));
2959
2956 // Disable stub call restrictions to always allow calls to abort. 2960 // Disable stub call restrictions to always allow calls to abort.
2957 if (!has_frame_) { 2961 if (!has_frame_) {
2958 // We don't actually want to generate a pile of code for this, so just 2962 // We don't actually want to generate a pile of code for this, so just
2959 // claim there is a stack frame, without generating one. 2963 // claim there is a stack frame, without generating one.
2960 FrameScope scope(this, StackFrame::NONE); 2964 FrameScope scope(this, StackFrame::NONE);
2961 CallRuntime(Runtime::kAbort); 2965 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
2962 } else { 2966 } else {
2963 CallRuntime(Runtime::kAbort); 2967 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
2964 } 2968 }
2965 // will not return here 2969 // will not return here
2966 int3(); 2970 int3();
2967 } 2971 }
2968 2972
2969 2973
2970 void MacroAssembler::LoadInstanceDescriptors(Register map, 2974 void MacroAssembler::LoadInstanceDescriptors(Register map,
2971 Register descriptors) { 2975 Register descriptors) {
2972 mov(descriptors, FieldOperand(map, Map::kDescriptorsOffset)); 2976 mov(descriptors, FieldOperand(map, Map::kDescriptorsOffset));
2973 } 2977 }
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
3454 mov(eax, dividend); 3458 mov(eax, dividend);
3455 shr(eax, 31); 3459 shr(eax, 31);
3456 add(edx, eax); 3460 add(edx, eax);
3457 } 3461 }
3458 3462
3459 3463
3460 } // namespace internal 3464 } // namespace internal
3461 } // namespace v8 3465 } // namespace v8
3462 3466
3463 #endif // V8_TARGET_ARCH_IA32 3467 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698