Commit 275e088a authored by dslomov's avatar dslomov Committed by Commit bot

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}
parent 8f9a62d3
......@@ -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 {
......
// 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(){
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment