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

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

Issue 2547043002: [Interpreter] Optimize equality check with null/undefined with a check on the map. (Closed)
Patch Set: Fixed a bug in reducing JSIsUndetectable. 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
« no previous file with comments | « no previous file | src/compiler/js-generic-lowering.cc » ('j') | src/compiler/js-generic-lowering.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 } 1629 }
1630 1630
1631 void BytecodeGraphBuilder::VisitTestIn() { 1631 void BytecodeGraphBuilder::VisitTestIn() {
1632 BuildCompareOp(javascript()->HasProperty()); 1632 BuildCompareOp(javascript()->HasProperty());
1633 } 1633 }
1634 1634
1635 void BytecodeGraphBuilder::VisitTestInstanceOf() { 1635 void BytecodeGraphBuilder::VisitTestInstanceOf() {
1636 BuildCompareOp(javascript()->InstanceOf()); 1636 BuildCompareOp(javascript()->InstanceOf());
1637 } 1637 }
1638 1638
1639 void BytecodeGraphBuilder::VisitTestUndetectable() {
1640 Node* object =
1641 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
1642 Node* node = NewNode(javascript()->IsUndetectable(), object);
1643 environment()->BindAccumulator(node);
1644 }
1645
1639 void BytecodeGraphBuilder::BuildCastOperator(const Operator* js_op) { 1646 void BytecodeGraphBuilder::BuildCastOperator(const Operator* js_op) {
1640 PrepareEagerCheckpoint(); 1647 PrepareEagerCheckpoint();
1641 Node* value = NewNode(js_op, environment()->LookupAccumulator()); 1648 Node* value = NewNode(js_op, environment()->LookupAccumulator());
1642 environment()->BindRegister(bytecode_iterator().GetRegisterOperand(0), value, 1649 environment()->BindRegister(bytecode_iterator().GetRegisterOperand(0), value,
1643 Environment::kAttachFrameState); 1650 Environment::kAttachFrameState);
1644 } 1651 }
1645 1652
1646 void BytecodeGraphBuilder::VisitToName() { 1653 void BytecodeGraphBuilder::VisitToName() {
1647 BuildCastOperator(javascript()->ToName()); 1654 BuildCastOperator(javascript()->ToName());
1648 } 1655 }
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
2190 it->source_position().ScriptOffset(), start_position_.InliningId())); 2197 it->source_position().ScriptOffset(), start_position_.InliningId()));
2191 it->Advance(); 2198 it->Advance();
2192 } else { 2199 } else {
2193 DCHECK_GT(it->code_offset(), offset); 2200 DCHECK_GT(it->code_offset(), offset);
2194 } 2201 }
2195 } 2202 }
2196 2203
2197 } // namespace compiler 2204 } // namespace compiler
2198 } // namespace internal 2205 } // namespace internal
2199 } // namespace v8 2206 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/js-generic-lowering.cc » ('j') | src/compiler/js-generic-lowering.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698