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

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: Moved comment one line down. 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
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 2933 matching lines...) Expand 10 before | Expand all | Expand 10 after
2944 if (msg != NULL) { 2944 if (msg != NULL) {
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 // Check if Abort() has already been initialized.
2955 push(Immediate(reinterpret_cast<intptr_t>(Smi::FromInt(reason)))); 2955 DCHECK(isolate()->builtins()->Abort()->IsHeapObject());
2956 Move(edx, Smi::FromInt(static_cast<int>(reason)));
Michael Starzinger 2016/07/18 08:51:11 nit: Empty newline before and after this block for
ahaas 2016/07/18 09:04:16 Done
2956 // Disable stub call restrictions to always allow calls to abort. 2957 // Disable stub call restrictions to always allow calls to abort.
2957 if (!has_frame_) { 2958 if (!has_frame_) {
2958 // We don't actually want to generate a pile of code for this, so just 2959 // 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. 2960 // claim there is a stack frame, without generating one.
2960 FrameScope scope(this, StackFrame::NONE); 2961 FrameScope scope(this, StackFrame::NONE);
2961 CallRuntime(Runtime::kAbort); 2962 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
2962 } else { 2963 } else {
2963 CallRuntime(Runtime::kAbort); 2964 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
2964 } 2965 }
2965 // will not return here 2966 // will not return here
2966 int3(); 2967 int3();
2967 } 2968 }
2968 2969
2969 2970
2970 void MacroAssembler::LoadInstanceDescriptors(Register map, 2971 void MacroAssembler::LoadInstanceDescriptors(Register map,
2971 Register descriptors) { 2972 Register descriptors) {
2972 mov(descriptors, FieldOperand(map, Map::kDescriptorsOffset)); 2973 mov(descriptors, FieldOperand(map, Map::kDescriptorsOffset));
2973 } 2974 }
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
3454 mov(eax, dividend); 3455 mov(eax, dividend);
3455 shr(eax, 31); 3456 shr(eax, 31);
3456 add(edx, eax); 3457 add(edx, eax);
3457 } 3458 }
3458 3459
3459 3460
3460 } // namespace internal 3461 } // namespace internal
3461 } // namespace v8 3462 } // namespace v8
3462 3463
3463 #endif // V8_TARGET_ARCH_IA32 3464 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698