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:
dslomov 2015-02-04 04:14:21 -08:00 committed by Commit bot
parent 8f9a62d312
commit 275e088abe
5 changed files with 23 additions and 4 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View 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(){
}