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

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

Issue 1245603003: Add function literal variable to declaration list. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_turbofan-super-6
Patch Set: Created 5 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/typing.cc ('k') | src/x87/full-codegen-x87.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 338
339 // Visit the declarations and body unless there is an illegal 339 // Visit the declarations and body unless there is an illegal
340 // redeclaration. 340 // redeclaration.
341 if (scope()->HasIllegalRedeclaration()) { 341 if (scope()->HasIllegalRedeclaration()) {
342 Comment cmnt(masm_, "[ Declarations"); 342 Comment cmnt(masm_, "[ Declarations");
343 scope()->VisitIllegalRedeclaration(this); 343 scope()->VisitIllegalRedeclaration(this);
344 344
345 } else { 345 } else {
346 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); 346 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS);
347 { Comment cmnt(masm_, "[ Declarations"); 347 { Comment cmnt(masm_, "[ Declarations");
348 // For named function expressions, declare the function name as a
349 // constant.
350 if (scope()->is_function_scope() && scope()->function() != NULL) {
351 VariableDeclaration* function = scope()->function();
352 DCHECK(function->proxy()->var()->mode() == CONST ||
353 function->proxy()->var()->mode() == CONST_LEGACY);
354 DCHECK(!function->proxy()->var()->IsUnallocatedOrGlobalSlot());
355 VisitVariableDeclaration(function);
356 }
357 VisitDeclarations(scope()->declarations()); 348 VisitDeclarations(scope()->declarations());
358 } 349 }
359 350
360 { Comment cmnt(masm_, "[ Stack check"); 351 { Comment cmnt(masm_, "[ Stack check");
361 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); 352 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS);
362 Label ok; 353 Label ok;
363 __ CompareRoot(rsp, Heap::kStackLimitRootIndex); 354 __ CompareRoot(rsp, Heap::kStackLimitRootIndex);
364 __ j(above_equal, &ok, Label::kNear); 355 __ j(above_equal, &ok, Label::kNear);
365 __ call(isolate()->builtins()->StackCheck(), RelocInfo::CODE_TARGET); 356 __ call(isolate()->builtins()->StackCheck(), RelocInfo::CODE_TARGET);
366 __ bind(&ok); 357 __ bind(&ok);
(...skipping 5107 matching lines...) Expand 10 before | Expand all | Expand 10 after
5474 Assembler::target_address_at(call_target_address, 5465 Assembler::target_address_at(call_target_address,
5475 unoptimized_code)); 5466 unoptimized_code));
5476 return OSR_AFTER_STACK_CHECK; 5467 return OSR_AFTER_STACK_CHECK;
5477 } 5468 }
5478 5469
5479 5470
5480 } // namespace internal 5471 } // namespace internal
5481 } // namespace v8 5472 } // namespace v8
5482 5473
5483 #endif // V8_TARGET_ARCH_X64 5474 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/typing.cc ('k') | src/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698