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 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1924 return NewNode(op, value, current_context(), name, strict); | 1924 return NewNode(op, value, current_context(), name, strict); |
1925 } | 1925 } |
1926 } | 1926 } |
1927 UNREACHABLE(); | 1927 UNREACHABLE(); |
1928 return NULL; | 1928 return NULL; |
1929 } | 1929 } |
1930 | 1930 |
1931 | 1931 |
1932 Node* AstGraphBuilder::BuildLoadObjectField(Node* object, int offset) { | 1932 Node* AstGraphBuilder::BuildLoadObjectField(Node* object, int offset) { |
1933 // TODO(sigurds) Use simplified load here once it is ready. | 1933 // TODO(sigurds) Use simplified load here once it is ready. |
1934 MachineOperatorBuilder machine; | 1934 Node* field_load = NewNode(jsgraph()->machine()->Load(kMachAnyTagged), object, |
1935 Node* field_load = NewNode(machine.Load(kMachAnyTagged), object, | 1935 jsgraph()->Int32Constant(offset - kHeapObjectTag)); |
1936 jsgraph_->Int32Constant(offset - kHeapObjectTag)); | |
1937 return field_load; | 1936 return field_load; |
1938 } | 1937 } |
1939 | 1938 |
1940 | 1939 |
1941 Node* AstGraphBuilder::BuildLoadBuiltinsObject() { | 1940 Node* AstGraphBuilder::BuildLoadBuiltinsObject() { |
1942 Node* global = BuildLoadGlobalObject(); | 1941 Node* global = BuildLoadGlobalObject(); |
1943 Node* builtins = | 1942 Node* builtins = |
1944 BuildLoadObjectField(global, JSGlobalObject::kBuiltinsOffset); | 1943 BuildLoadObjectField(global, JSGlobalObject::kBuiltinsOffset); |
1945 return builtins; | 1944 return builtins; |
1946 } | 1945 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2020 DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead); | 2019 DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead); |
2021 | 2020 |
2022 Node* frame_state_node = environment()->Checkpoint(ast_id, combine); | 2021 Node* frame_state_node = environment()->Checkpoint(ast_id, combine); |
2023 node->ReplaceInput(frame_state_index, frame_state_node); | 2022 node->ReplaceInput(frame_state_index, frame_state_node); |
2024 } | 2023 } |
2025 } | 2024 } |
2026 | 2025 |
2027 } | 2026 } |
2028 } | 2027 } |
2029 } // namespace v8::internal::compiler | 2028 } // namespace v8::internal::compiler |
OLD | NEW |