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

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

Issue 2528293002: [fullcodegen] Remove deprecated support for new.target and rest parameters. (Closed)
Patch Set: Now with green bots AKA fix copy-and-paste. Created 4 years 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/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.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 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" 7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 8 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 } 248 }
249 } 249 }
250 } 250 }
251 251
252 // Register holding this function and new target are both trashed in case we 252 // Register holding this function and new target are both trashed in case we
253 // bailout here. But since that can happen only when new target is not used 253 // bailout here. But since that can happen only when new target is not used
254 // and we allocate a context, the value of |function_in_register| is correct. 254 // and we allocate a context, the value of |function_in_register| is correct.
255 PrepareForBailoutForId(BailoutId::FunctionContext(), 255 PrepareForBailoutForId(BailoutId::FunctionContext(),
256 BailoutState::NO_REGISTERS); 256 BailoutState::NO_REGISTERS);
257 257
258 // Possibly set up a local binding to the this function which is used in 258 // We don't support new.target and rest parameters here.
259 // derived constructors with super calls. 259 DCHECK_NULL(info->scope()->new_target_var());
260 Variable* this_function_var = info->scope()->this_function_var(); 260 DCHECK_NULL(info->scope()->rest_parameter());
261 if (this_function_var != nullptr) { 261 DCHECK_NULL(info->scope()->this_function_var());
262 Comment cmnt(masm_, "[ This function");
263 if (!function_in_register_x1) {
264 __ Ldr(x1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
265 // The write barrier clobbers register again, keep it marked as such.
266 }
267 SetVar(this_function_var, x1, x0, x2);
268 }
269
270 // Possibly set up a local binding to the new target value.
271 Variable* new_target_var = info->scope()->new_target_var();
272 if (new_target_var != nullptr) {
273 Comment cmnt(masm_, "[ new.target");
274 SetVar(new_target_var, x3, x0, x2);
275 }
276
277 // Possibly allocate RestParameters
278 Variable* rest_param = info->scope()->rest_parameter();
279 if (rest_param != nullptr) {
280 Comment cmnt(masm_, "[ Allocate rest parameter array");
281 if (!function_in_register_x1) {
282 __ Ldr(x1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
283 }
284 FastNewRestParameterStub stub(isolate());
285 __ CallStub(&stub);
286 function_in_register_x1 = false;
287 SetVar(rest_param, x0, x1, x2);
288 }
289 262
290 Variable* arguments = info->scope()->arguments(); 263 Variable* arguments = info->scope()->arguments();
291 if (arguments != NULL) { 264 if (arguments != NULL) {
292 // Function uses arguments object. 265 // Function uses arguments object.
293 Comment cmnt(masm_, "[ Allocate arguments object"); 266 Comment cmnt(masm_, "[ Allocate arguments object");
294 if (!function_in_register_x1) { 267 if (!function_in_register_x1) {
295 // Load this again, if it's used by the local context below. 268 // Load this again, if it's used by the local context below.
296 __ Ldr(x1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 269 __ Ldr(x1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
297 } 270 }
298 if (is_strict(language_mode()) || !has_simple_parameters()) { 271 if (is_strict(language_mode()) || !has_simple_parameters()) {
(...skipping 2981 matching lines...) Expand 10 before | Expand all | Expand 10 after
3280 } 3253 }
3281 3254
3282 return INTERRUPT; 3255 return INTERRUPT;
3283 } 3256 }
3284 3257
3285 3258
3286 } // namespace internal 3259 } // namespace internal
3287 } // namespace v8 3260 } // namespace v8
3288 3261
3289 #endif // V8_TARGET_ARCH_ARM64 3262 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698