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

Side by Side Diff: src/compiler/bytecode-graph-builder.cc

Issue 2504553003: [es6] Perform the IsConstructor test in GetSuperConstructor. (Closed)
Patch Set: Fix assembler and add unittest Created 4 years 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/compiler/bytecode-graph-builder.h" 5 #include "src/compiler/bytecode-graph-builder.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/compilation-info.h" 9 #include "src/compilation-info.h"
10 #include "src/compiler/compiler-source-position-table.h" 10 #include "src/compiler/compiler-source-position-table.h"
(...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1603 } 1603 }
1604 1604
1605 void BytecodeGraphBuilder::VisitDeletePropertyStrict() { 1605 void BytecodeGraphBuilder::VisitDeletePropertyStrict() {
1606 BuildDelete(LanguageMode::STRICT); 1606 BuildDelete(LanguageMode::STRICT);
1607 } 1607 }
1608 1608
1609 void BytecodeGraphBuilder::VisitDeletePropertySloppy() { 1609 void BytecodeGraphBuilder::VisitDeletePropertySloppy() {
1610 BuildDelete(LanguageMode::SLOPPY); 1610 BuildDelete(LanguageMode::SLOPPY);
1611 } 1611 }
1612 1612
1613 void BytecodeGraphBuilder::VisitGetSuperConstructor() {
1614 Node* node = NewNode(javascript()->GetSuperConstructor(),
1615 environment()->LookupAccumulator());
1616 environment()->BindRegister(bytecode_iterator().GetRegisterOperand(0), node,
1617 Environment::kAttachFrameState);
1618 }
1619
1613 void BytecodeGraphBuilder::BuildCompareOp(const Operator* js_op) { 1620 void BytecodeGraphBuilder::BuildCompareOp(const Operator* js_op) {
1614 PrepareEagerCheckpoint(); 1621 PrepareEagerCheckpoint();
1615 Node* left = 1622 Node* left =
1616 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); 1623 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
1617 Node* right = environment()->LookupAccumulator(); 1624 Node* right = environment()->LookupAccumulator();
1618 Node* node = NewNode(js_op, left, right); 1625 Node* node = NewNode(js_op, left, right);
1619 environment()->BindAccumulator(node, Environment::kAttachFrameState); 1626 environment()->BindAccumulator(node, Environment::kAttachFrameState);
1620 } 1627 }
1621 1628
1622 void BytecodeGraphBuilder::VisitTestEqual() { 1629 void BytecodeGraphBuilder::VisitTestEqual() {
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
2221 it->source_position().ScriptOffset(), start_position_.InliningId())); 2228 it->source_position().ScriptOffset(), start_position_.InliningId()));
2222 it->Advance(); 2229 it->Advance();
2223 } else { 2230 } else {
2224 DCHECK_GT(it->code_offset(), offset); 2231 DCHECK_GT(it->code_offset(), offset);
2225 } 2232 }
2226 } 2233 }
2227 2234
2228 } // namespace compiler 2235 } // namespace compiler
2229 } // namespace internal 2236 } // namespace internal
2230 } // namespace v8 2237 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698