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

Side by Side Diff: src/builtins/x64/builtins-x64.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/builtins/mips64/builtins-mips64.cc ('k') | src/heap/heap.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_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 2097 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 // ----------------------------------- 2108 // -----------------------------------
2109 __ Integer32ToSmi(rdx, rdx); 2109 __ Integer32ToSmi(rdx, rdx);
2110 __ PopReturnAddressTo(rcx); 2110 __ PopReturnAddressTo(rcx);
2111 __ Push(rdx); 2111 __ Push(rdx);
2112 __ Push(Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); 2112 __ Push(Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE)));
2113 __ PushReturnAddressFrom(rcx); 2113 __ PushReturnAddressFrom(rcx);
2114 __ Move(rsi, Smi::FromInt(0)); 2114 __ Move(rsi, Smi::FromInt(0));
2115 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); 2115 __ TailCallRuntime(Runtime::kAllocateInTargetSpace);
2116 } 2116 }
2117 2117
2118 // static
2119 void Builtins::Generate_Abort(MacroAssembler* masm) {
2120 // ----------- S t a t e -------------
2121 // -- rdx : message_id as Smi
2122 // -- rsp[0] : return address
2123 // -----------------------------------
2124 __ PopReturnAddressTo(rcx);
2125 __ Push(rdx);
2126 __ PushReturnAddressFrom(rcx);
2127 __ Move(rsi, Smi::FromInt(0));
2128 __ TailCallRuntime(Runtime::kAbort);
2129 }
2130
2131 void Builtins::Generate_StringToNumber(MacroAssembler* masm) { 2118 void Builtins::Generate_StringToNumber(MacroAssembler* masm) {
2132 // The StringToNumber stub takes one argument in rax. 2119 // The StringToNumber stub takes one argument in rax.
2133 __ AssertString(rax); 2120 __ AssertString(rax);
2134 2121
2135 // Check if string has a cached array index. 2122 // Check if string has a cached array index.
2136 Label runtime; 2123 Label runtime;
2137 __ testl(FieldOperand(rax, String::kHashFieldOffset), 2124 __ testl(FieldOperand(rax, String::kHashFieldOffset),
2138 Immediate(String::kContainsCachedArrayIndexMask)); 2125 Immediate(String::kContainsCachedArrayIndexMask));
2139 __ j(not_zero, &runtime, Label::kNear); 2126 __ j(not_zero, &runtime, Label::kNear);
2140 __ movl(rax, FieldOperand(rax, String::kHashFieldOffset)); 2127 __ movl(rax, FieldOperand(rax, String::kHashFieldOffset));
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
3047 // And "return" to the OSR entry point of the function. 3034 // And "return" to the OSR entry point of the function.
3048 __ ret(0); 3035 __ ret(0);
3049 } 3036 }
3050 3037
3051 #undef __ 3038 #undef __
3052 3039
3053 } // namespace internal 3040 } // namespace internal
3054 } // namespace v8 3041 } // namespace v8
3055 3042
3056 #endif // V8_TARGET_ARCH_X64 3043 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/builtins/mips64/builtins-mips64.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698