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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.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/compiler/ast-graph-builder.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.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_ARM 5 #if V8_TARGET_ARCH_ARM
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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 246 }
247 } 247 }
248 } 248 }
249 249
250 // Register holding this function and new target are both trashed in case we 250 // Register holding this function and new target are both trashed in case we
251 // bailout here. But since that can happen only when new target is not used 251 // bailout here. But since that can happen only when new target is not used
252 // and we allocate a context, the value of |function_in_register| is correct. 252 // and we allocate a context, the value of |function_in_register| is correct.
253 PrepareForBailoutForId(BailoutId::FunctionContext(), 253 PrepareForBailoutForId(BailoutId::FunctionContext(),
254 BailoutState::NO_REGISTERS); 254 BailoutState::NO_REGISTERS);
255 255
256 // Possibly set up a local binding to the this function which is used in 256 // We don't support new.target and rest parameters here.
257 // derived constructors with super calls. 257 DCHECK_NULL(info->scope()->new_target_var());
258 Variable* this_function_var = info->scope()->this_function_var(); 258 DCHECK_NULL(info->scope()->rest_parameter());
259 if (this_function_var != nullptr) { 259 DCHECK_NULL(info->scope()->this_function_var());
260 Comment cmnt(masm_, "[ This function");
261 if (!function_in_register_r1) {
262 __ ldr(r1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
263 // The write barrier clobbers register again, keep it marked as such.
264 }
265 SetVar(this_function_var, r1, r0, r2);
266 }
267
268 // Possibly set up a local binding to the new target value.
269 Variable* new_target_var = info->scope()->new_target_var();
270 if (new_target_var != nullptr) {
271 Comment cmnt(masm_, "[ new.target");
272 SetVar(new_target_var, r3, r0, r2);
273 }
274
275 // Possibly allocate RestParameters
276 Variable* rest_param = info->scope()->rest_parameter();
277 if (rest_param != nullptr) {
278 Comment cmnt(masm_, "[ Allocate rest parameter array");
279 if (!function_in_register_r1) {
280 __ ldr(r1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
281 }
282 FastNewRestParameterStub stub(isolate());
283 __ CallStub(&stub);
284 function_in_register_r1 = false;
285 SetVar(rest_param, r0, r1, r2);
286 }
287 260
288 Variable* arguments = info->scope()->arguments(); 261 Variable* arguments = info->scope()->arguments();
289 if (arguments != NULL) { 262 if (arguments != NULL) {
290 // Function uses arguments object. 263 // Function uses arguments object.
291 Comment cmnt(masm_, "[ Allocate arguments object"); 264 Comment cmnt(masm_, "[ Allocate arguments object");
292 if (!function_in_register_r1) { 265 if (!function_in_register_r1) {
293 // Load this again, if it's used by the local context below. 266 // Load this again, if it's used by the local context below.
294 __ ldr(r1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 267 __ ldr(r1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
295 } 268 }
296 if (is_strict(language_mode()) || !has_simple_parameters()) { 269 if (is_strict(language_mode()) || !has_simple_parameters()) {
(...skipping 2984 matching lines...) Expand 10 before | Expand all | Expand 10 after
3281 DCHECK(interrupt_address == 3254 DCHECK(interrupt_address ==
3282 isolate->builtins()->OnStackReplacement()->entry()); 3255 isolate->builtins()->OnStackReplacement()->entry());
3283 return ON_STACK_REPLACEMENT; 3256 return ON_STACK_REPLACEMENT;
3284 } 3257 }
3285 3258
3286 3259
3287 } // namespace internal 3260 } // namespace internal
3288 } // namespace v8 3261 } // namespace v8
3289 3262
3290 #endif // V8_TARGET_ARCH_ARM 3263 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698