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

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

Issue 902563002: Fix assertion in full codegen for holed 'this'. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/ia32/full-codegen-ia32.cc ('k') | test/mjsunit/harmony/regress/regress-455141.js » ('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 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 // 1490 //
1491 // The condition on the declaration scopes is a conservative check for 1491 // The condition on the declaration scopes is a conservative check for
1492 // nested functions that access a binding and are called before the 1492 // nested functions that access a binding and are called before the
1493 // binding is initialized: 1493 // binding is initialized:
1494 // function() { f(); let x = 1; function f() { x = 2; } } 1494 // function() { f(); let x = 1; function f() { x = 2; } }
1495 // 1495 //
1496 bool skip_init_check; 1496 bool skip_init_check;
1497 if (var->scope()->DeclarationScope() != scope()->DeclarationScope()) { 1497 if (var->scope()->DeclarationScope() != scope()->DeclarationScope()) {
1498 skip_init_check = false; 1498 skip_init_check = false;
1499 } else if (var->is_this()) { 1499 } else if (var->is_this()) {
1500 CHECK((info_->shared_info()->kind() & kSubclassConstructor) != 0); 1500 CHECK(info_->function() != nullptr &&
1501 (info_->function()->kind() & kSubclassConstructor) != 0);
1501 // TODO(dslomov): implement 'this' hole check elimination. 1502 // TODO(dslomov): implement 'this' hole check elimination.
1502 skip_init_check = false; 1503 skip_init_check = false;
1503 } else { 1504 } else {
1504 // Check that we always have valid source position. 1505 // Check that we always have valid source position.
1505 DCHECK(var->initializer_position() != RelocInfo::kNoPosition); 1506 DCHECK(var->initializer_position() != RelocInfo::kNoPosition);
1506 DCHECK(proxy->position() != RelocInfo::kNoPosition); 1507 DCHECK(proxy->position() != RelocInfo::kNoPosition);
1507 skip_init_check = var->mode() != CONST_LEGACY && 1508 skip_init_check = var->mode() != CONST_LEGACY &&
1508 var->initializer_position() < proxy->position(); 1509 var->initializer_position() < proxy->position();
1509 } 1510 }
1510 1511
(...skipping 3802 matching lines...) Expand 10 before | Expand all | Expand 10 after
5313 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5314 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5314 Assembler::target_address_at(call_target_address, 5315 Assembler::target_address_at(call_target_address,
5315 unoptimized_code)); 5316 unoptimized_code));
5316 return OSR_AFTER_STACK_CHECK; 5317 return OSR_AFTER_STACK_CHECK;
5317 } 5318 }
5318 5319
5319 5320
5320 } } // namespace v8::internal 5321 } } // namespace v8::internal
5321 5322
5322 #endif // V8_TARGET_ARCH_X64 5323 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | test/mjsunit/harmony/regress/regress-455141.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698