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

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

Issue 2163603003: Revert of [builtins] Introduce a builtin for Abort(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 // Check if Abort() has already been initialized. 2955 push(Immediate(reinterpret_cast<intptr_t>(Smi::FromInt(reason))));
2956 DCHECK(isolate()->builtins()->Abort()->IsHeapObject());
2957
2958 Move(edx, Smi::FromInt(static_cast<int>(reason)));
2959
2960 // Disable stub call restrictions to always allow calls to abort. 2956 // Disable stub call restrictions to always allow calls to abort.
2961 if (!has_frame_) { 2957 if (!has_frame_) {
2962 // We don't actually want to generate a pile of code for this, so just 2958 // We don't actually want to generate a pile of code for this, so just
2963 // claim there is a stack frame, without generating one. 2959 // claim there is a stack frame, without generating one.
2964 FrameScope scope(this, StackFrame::NONE); 2960 FrameScope scope(this, StackFrame::NONE);
2965 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); 2961 CallRuntime(Runtime::kAbort);
2966 } else { 2962 } else {
2967 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); 2963 CallRuntime(Runtime::kAbort);
2968 } 2964 }
2969 // will not return here 2965 // will not return here
2970 int3(); 2966 int3();
2971 } 2967 }
2972 2968
2973 2969
2974 void MacroAssembler::LoadInstanceDescriptors(Register map, 2970 void MacroAssembler::LoadInstanceDescriptors(Register map,
2975 Register descriptors) { 2971 Register descriptors) {
2976 mov(descriptors, FieldOperand(map, Map::kDescriptorsOffset)); 2972 mov(descriptors, FieldOperand(map, Map::kDescriptorsOffset));
2977 } 2973 }
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
3458 mov(eax, dividend); 3454 mov(eax, dividend);
3459 shr(eax, 31); 3455 shr(eax, 31);
3460 add(edx, eax); 3456 add(edx, eax);
3461 } 3457 }
3462 3458
3463 3459
3464 } // namespace internal 3460 } // namespace internal
3465 } // namespace v8 3461 } // namespace v8
3466 3462
3467 #endif // V8_TARGET_ARCH_IA32 3463 #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