| OLD | NEW |
| 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/compiler/access-builder.h" | 9 #include "src/compiler/access-builder.h" |
| 10 #include "src/compiler/compiler-source-position-table.h" | 10 #include "src/compiler/compiler-source-position-table.h" |
| (...skipping 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1913 Node* node = | 1913 Node* node = |
| 1914 NewNode(javascript()->TypeOf(), environment()->LookupAccumulator()); | 1914 NewNode(javascript()->TypeOf(), environment()->LookupAccumulator()); |
| 1915 environment()->BindAccumulator(node); | 1915 environment()->BindAccumulator(node); |
| 1916 } | 1916 } |
| 1917 | 1917 |
| 1918 void BytecodeGraphBuilder::BuildDelete(LanguageMode language_mode) { | 1918 void BytecodeGraphBuilder::BuildDelete(LanguageMode language_mode) { |
| 1919 PrepareEagerCheckpoint(); | 1919 PrepareEagerCheckpoint(); |
| 1920 Node* key = environment()->LookupAccumulator(); | 1920 Node* key = environment()->LookupAccumulator(); |
| 1921 Node* object = | 1921 Node* object = |
| 1922 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); | 1922 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
| 1923 Node* node = | 1923 Node* mode = jsgraph()->Constant(static_cast<int32_t>(language_mode)); |
| 1924 NewNode(javascript()->DeleteProperty(language_mode), object, key); | 1924 Node* node = NewNode(javascript()->DeleteProperty(), object, key, mode); |
| 1925 environment()->BindAccumulator(node, Environment::kAttachFrameState); | 1925 environment()->BindAccumulator(node, Environment::kAttachFrameState); |
| 1926 } | 1926 } |
| 1927 | 1927 |
| 1928 void BytecodeGraphBuilder::VisitDeletePropertyStrict() { | 1928 void BytecodeGraphBuilder::VisitDeletePropertyStrict() { |
| 1929 BuildDelete(LanguageMode::STRICT); | 1929 BuildDelete(LanguageMode::STRICT); |
| 1930 } | 1930 } |
| 1931 | 1931 |
| 1932 void BytecodeGraphBuilder::VisitDeletePropertySloppy() { | 1932 void BytecodeGraphBuilder::VisitDeletePropertySloppy() { |
| 1933 BuildDelete(LanguageMode::SLOPPY); | 1933 BuildDelete(LanguageMode::SLOPPY); |
| 1934 } | 1934 } |
| (...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2832 it->source_position().ScriptOffset(), start_position_.InliningId())); | 2832 it->source_position().ScriptOffset(), start_position_.InliningId())); |
| 2833 it->Advance(); | 2833 it->Advance(); |
| 2834 } else { | 2834 } else { |
| 2835 DCHECK_GT(it->code_offset(), offset); | 2835 DCHECK_GT(it->code_offset(), offset); |
| 2836 } | 2836 } |
| 2837 } | 2837 } |
| 2838 | 2838 |
| 2839 } // namespace compiler | 2839 } // namespace compiler |
| 2840 } // namespace internal | 2840 } // namespace internal |
| 2841 } // namespace v8 | 2841 } // namespace v8 |
| OLD | NEW |