Fix assertion in full codegen for holed 'this'.
R=rossberg@chromium.org BUG=chromium:455141 LOG=N Review URL: https://codereview.chromium.org/902563002 Cr-Commit-Position: refs/heads/master@{#26423}
This commit is contained in:
parent
8f9a62d312
commit
275e088abe
@ -1539,7 +1539,8 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
|
||||
if (var->scope()->DeclarationScope() != scope()->DeclarationScope()) {
|
||||
skip_init_check = false;
|
||||
} else if (var->is_this()) {
|
||||
CHECK((info_->shared_info()->kind() & kSubclassConstructor) != 0);
|
||||
CHECK(info_->function() != nullptr &&
|
||||
(info_->function()->kind() & kSubclassConstructor) != 0);
|
||||
// TODO(dslomov): implement 'this' hole check elimination.
|
||||
skip_init_check = false;
|
||||
} else {
|
||||
|
@ -1519,7 +1519,8 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
|
||||
if (var->scope()->DeclarationScope() != scope()->DeclarationScope()) {
|
||||
skip_init_check = false;
|
||||
} else if (var->is_this()) {
|
||||
CHECK((info_->shared_info()->kind() & kSubclassConstructor) != 0);
|
||||
CHECK(info_->function() != nullptr &&
|
||||
(info_->function()->kind() & kSubclassConstructor) != 0);
|
||||
// TODO(dslomov): implement 'this' hole check elimination.
|
||||
skip_init_check = false;
|
||||
} else {
|
||||
|
@ -1462,7 +1462,8 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
|
||||
if (var->scope()->DeclarationScope() != scope()->DeclarationScope()) {
|
||||
skip_init_check = false;
|
||||
} else if (var->is_this()) {
|
||||
CHECK((info_->shared_info()->kind() & kSubclassConstructor) != 0);
|
||||
CHECK(info_->function() != nullptr &&
|
||||
(info_->function()->kind() & kSubclassConstructor) != 0);
|
||||
// TODO(dslomov): implement 'this' hole check elimination.
|
||||
skip_init_check = false;
|
||||
} else {
|
||||
|
@ -1497,7 +1497,8 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
|
||||
if (var->scope()->DeclarationScope() != scope()->DeclarationScope()) {
|
||||
skip_init_check = false;
|
||||
} else if (var->is_this()) {
|
||||
CHECK((info_->shared_info()->kind() & kSubclassConstructor) != 0);
|
||||
CHECK(info_->function() != nullptr &&
|
||||
(info_->function()->kind() & kSubclassConstructor) != 0);
|
||||
// TODO(dslomov): implement 'this' hole check elimination.
|
||||
skip_init_check = false;
|
||||
} else {
|
||||
|
15
test/mjsunit/harmony/regress/regress-455141.js
Normal file
15
test/mjsunit/harmony/regress/regress-455141.js
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright 2015 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
//
|
||||
// Flags: --experimental-classes --no-lazy
|
||||
"use strict";
|
||||
class Base {
|
||||
}
|
||||
class Subclass extends Base {
|
||||
constructor() {
|
||||
this.prp1 = 3;
|
||||
}
|
||||
}
|
||||
function __f_1(){
|
||||
}
|
Loading…
Reference in New Issue
Block a user