OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/ast-graph-builder.h" | 5 #include "src/compiler/ast-graph-builder.h" |
6 | 6 |
7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
8 #include "src/compiler/control-builders.h" | 8 #include "src/compiler/control-builders.h" |
9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
(...skipping 1906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1917 return NewNode(op, value, current_context(), name, strict); | 1917 return NewNode(op, value, current_context(), name, strict); |
1918 } | 1918 } |
1919 } | 1919 } |
1920 UNREACHABLE(); | 1920 UNREACHABLE(); |
1921 return NULL; | 1921 return NULL; |
1922 } | 1922 } |
1923 | 1923 |
1924 | 1924 |
1925 Node* AstGraphBuilder::BuildLoadObjectField(Node* object, int offset) { | 1925 Node* AstGraphBuilder::BuildLoadObjectField(Node* object, int offset) { |
1926 // TODO(sigurds) Use simplified load here once it is ready. | 1926 // TODO(sigurds) Use simplified load here once it is ready. |
1927 MachineOperatorBuilder machine(zone()); | 1927 MachineOperatorBuilder machine; |
1928 Node* field_load = NewNode(machine.Load(kMachAnyTagged), object, | 1928 Node* field_load = NewNode(machine.Load(kMachAnyTagged), object, |
1929 jsgraph_->Int32Constant(offset - kHeapObjectTag)); | 1929 jsgraph_->Int32Constant(offset - kHeapObjectTag)); |
1930 return field_load; | 1930 return field_load; |
1931 } | 1931 } |
1932 | 1932 |
1933 | 1933 |
1934 Node* AstGraphBuilder::BuildLoadBuiltinsObject() { | 1934 Node* AstGraphBuilder::BuildLoadBuiltinsObject() { |
1935 Node* global = BuildLoadGlobalObject(); | 1935 Node* global = BuildLoadGlobalObject(); |
1936 Node* builtins = | 1936 Node* builtins = |
1937 BuildLoadObjectField(global, JSGlobalObject::kBuiltinsOffset); | 1937 BuildLoadObjectField(global, JSGlobalObject::kBuiltinsOffset); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2013 DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead); | 2013 DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead); |
2014 | 2014 |
2015 Node* frame_state_node = environment()->Checkpoint(ast_id, combine); | 2015 Node* frame_state_node = environment()->Checkpoint(ast_id, combine); |
2016 node->ReplaceInput(frame_state_index, frame_state_node); | 2016 node->ReplaceInput(frame_state_index, frame_state_node); |
2017 } | 2017 } |
2018 } | 2018 } |
2019 | 2019 |
2020 } | 2020 } |
2021 } | 2021 } |
2022 } // namespace v8::internal::compiler | 2022 } // namespace v8::internal::compiler |
OLD | NEW |