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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.cc

Issue 2604833004: [builtins] FastNewFunctionContextStub becomes a builtin (Closed)
Patch Set: That was unnecessary, reverted :) Created 3 years, 11 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 7 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/builtins/builtins-constructor.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
11 #include "src/code-stubs.h" 11 #include "src/code-stubs.h"
12 #include "src/codegen.h" 12 #include "src/codegen.h"
13 #include "src/compilation-info.h" 13 #include "src/compilation-info.h"
14 #include "src/compiler.h" 14 #include "src/compiler.h"
15 #include "src/debug/debug.h" 15 #include "src/debug/debug.h"
16 #include "src/full-codegen/full-codegen.h"
16 #include "src/ic/ic.h" 17 #include "src/ic/ic.h"
17 18
18 #include "src/arm64/code-stubs-arm64.h" 19 #include "src/arm64/code-stubs-arm64.h"
19 #include "src/arm64/frames-arm64.h" 20 #include "src/arm64/frames-arm64.h"
20 #include "src/arm64/macro-assembler-arm64.h" 21 #include "src/arm64/macro-assembler-arm64.h"
21 22
22 namespace v8 { 23 namespace v8 {
23 namespace internal { 24 namespace internal {
24 25
25 #define __ ACCESS_MASM(masm()) 26 #define __ ACCESS_MASM(masm())
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 __ Push(x1, x10); 195 __ Push(x1, x10);
195 __ CallRuntime(Runtime::kNewScriptContext); 196 __ CallRuntime(Runtime::kNewScriptContext);
196 PrepareForBailoutForId(BailoutId::ScriptContext(), 197 PrepareForBailoutForId(BailoutId::ScriptContext(),
197 BailoutState::TOS_REGISTER); 198 BailoutState::TOS_REGISTER);
198 // The new target value is not used, clobbering is safe. 199 // The new target value is not used, clobbering is safe.
199 DCHECK_NULL(info->scope()->new_target_var()); 200 DCHECK_NULL(info->scope()->new_target_var());
200 } else { 201 } else {
201 if (info->scope()->new_target_var() != nullptr) { 202 if (info->scope()->new_target_var() != nullptr) {
202 __ Push(x3); // Preserve new target. 203 __ Push(x3); // Preserve new target.
203 } 204 }
204 if (slots <= FastNewFunctionContextStub::MaximumSlots()) { 205 if (slots <=
205 FastNewFunctionContextStub stub(isolate(), info->scope()->scope_type()); 206 ConstructorBuiltinsAssembler::MaximumFunctionContextSlots()) {
207 Callable callable = CodeFactory::FastNewFunctionContext(
208 isolate(), info->scope()->scope_type());
206 __ Mov(FastNewFunctionContextDescriptor::SlotsRegister(), slots); 209 __ Mov(FastNewFunctionContextDescriptor::SlotsRegister(), slots);
207 __ CallStub(&stub); 210 __ Call(callable.code(), RelocInfo::CODE_TARGET);
208 // Result of FastNewFunctionContextStub is always in new space. 211 // Result of the FastNewFunctionContext builtin is always in new space.
209 need_write_barrier = false; 212 need_write_barrier = false;
210 } else { 213 } else {
211 __ Push(x1); 214 __ Push(x1);
212 __ Push(Smi::FromInt(info->scope()->scope_type())); 215 __ Push(Smi::FromInt(info->scope()->scope_type()));
213 __ CallRuntime(Runtime::kNewFunctionContext); 216 __ CallRuntime(Runtime::kNewFunctionContext);
214 } 217 }
215 if (info->scope()->new_target_var() != nullptr) { 218 if (info->scope()->new_target_var() != nullptr) {
216 __ Pop(x3); // Restore new target. 219 __ Pop(x3); // Restore new target.
217 } 220 }
218 } 221 }
(...skipping 2700 matching lines...) Expand 10 before | Expand all | Expand 10 after
2919 } 2922 }
2920 2923
2921 return INTERRUPT; 2924 return INTERRUPT;
2922 } 2925 }
2923 2926
2924 2927
2925 } // namespace internal 2928 } // namespace internal
2926 } // namespace v8 2929 } // namespace v8
2927 2930
2928 #endif // V8_TARGET_ARCH_ARM64 2931 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698