| 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 <iostream> | 5 #include <iostream> |
| 6 | 6 |
| 7 #include "src/compiler/bytecode-graph-builder.h" | 7 #include "src/compiler/bytecode-graph-builder.h" |
| 8 #include "src/compiler/common-operator.h" | 8 #include "src/compiler/common-operator.h" |
| 9 #include "src/compiler/graph-visualizer.h" | 9 #include "src/compiler/graph-visualizer.h" |
| 10 #include "src/compiler/instruction.h" | 10 #include "src/compiler/instruction.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 return IsInt32Constant(value); | 127 return IsInt32Constant(value); |
| 128 } | 128 } |
| 129 } | 129 } |
| 130 | 130 |
| 131 | 131 |
| 132 Matcher<Node*> BytecodeGraphBuilderTest::IsFeedbackVector(Node* effect, | 132 Matcher<Node*> BytecodeGraphBuilderTest::IsFeedbackVector(Node* effect, |
| 133 Node* control) { | 133 Node* control) { |
| 134 int offset = SharedFunctionInfo::kFeedbackVectorOffset - kHeapObjectTag; | 134 int offset = SharedFunctionInfo::kFeedbackVectorOffset - kHeapObjectTag; |
| 135 int offset1 = JSFunction::kSharedFunctionInfoOffset - kHeapObjectTag; | 135 int offset1 = JSFunction::kSharedFunctionInfoOffset - kHeapObjectTag; |
| 136 | 136 |
| 137 return IsLoad(kMachAnyTagged, | 137 return IsLoad( |
| 138 IsLoad(kMachAnyTagged, | 138 kMachAnyTagged, |
| 139 IsParameter(Linkage::kJSFunctionCallClosureParamIndex), | 139 IsLoad(kMachAnyTagged, IsParameter(Linkage::kJSCallClosureParamIndex), |
| 140 IsIntPtrConstant(offset1), effect, control), | 140 IsIntPtrConstant(offset1), effect, control), |
| 141 IsIntPtrConstant(offset), effect, control); | 141 IsIntPtrConstant(offset), effect, control); |
| 142 } | 142 } |
| 143 | 143 |
| 144 | 144 |
| 145 TEST_F(BytecodeGraphBuilderTest, ReturnUndefined) { | 145 TEST_F(BytecodeGraphBuilderTest, ReturnUndefined) { |
| 146 interpreter::BytecodeArrayBuilder array_builder(isolate(), zone()); | 146 interpreter::BytecodeArrayBuilder array_builder(isolate(), zone()); |
| 147 array_builder.set_locals_count(0); | 147 array_builder.set_locals_count(0); |
| 148 array_builder.set_context_count(0); | 148 array_builder.set_context_count(0); |
| 149 array_builder.set_parameter_count(1); | 149 array_builder.set_parameter_count(1); |
| 150 array_builder.LoadUndefined().Return(); | 150 array_builder.LoadUndefined().Return(); |
| 151 | 151 |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 | 523 |
| 524 EXPECT_THAT(ret, IsReturn(_, store_global_matcher, _)); | 524 EXPECT_THAT(ret, IsReturn(_, store_global_matcher, _)); |
| 525 } | 525 } |
| 526 } | 526 } |
| 527 } | 527 } |
| 528 | 528 |
| 529 | 529 |
| 530 } // namespace compiler | 530 } // namespace compiler |
| 531 } // namespace internal | 531 } // namespace internal |
| 532 } // namespace v8 | 532 } // namespace v8 |
| OLD | NEW |