| 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/access-builder.h" | 5 #include "src/compiler/access-builder.h" |
| 6 #include "src/compiler/diamond.h" | 6 #include "src/compiler/diamond.h" |
| 7 #include "src/compiler/js-graph.h" | 7 #include "src/compiler/js-graph.h" |
| 8 #include "src/compiler/js-intrinsic-lowering.h" | 8 #include "src/compiler/js-intrinsic-lowering.h" |
| 9 #include "src/compiler/js-operator.h" | 9 #include "src/compiler/js-operator.h" |
| 10 #include "test/unittests/compiler/graph-unittest.h" | 10 #include "test/unittests/compiler/graph-unittest.h" |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 effect, CaptureEq(&if_false0)), | 277 effect, CaptureEq(&if_false0)), |
| 278 effect, _), | 278 effect, _), |
| 279 IsInt32Constant(JS_VALUE_TYPE)), | 279 IsInt32Constant(JS_VALUE_TYPE)), |
| 280 CaptureEq(&if_false0)))))), | 280 CaptureEq(&if_false0)))))), |
| 281 IsMerge( | 281 IsMerge( |
| 282 IsIfTrue(AllOf(CaptureEq(&branch0), | 282 IsIfTrue(AllOf(CaptureEq(&branch0), |
| 283 IsBranch(IsObjectIsSmi(input), control))), | 283 IsBranch(IsObjectIsSmi(input), control))), |
| 284 AllOf(CaptureEq(&if_false0), IsIfFalse(CaptureEq(&branch0)))))); | 284 AllOf(CaptureEq(&if_false0), IsIfFalse(CaptureEq(&branch0)))))); |
| 285 } | 285 } |
| 286 | 286 |
| 287 // ----------------------------------------------------------------------------- | |
| 288 // %_GetOrdinaryHasInstance | |
| 289 | |
| 290 TEST_F(JSIntrinsicLoweringTest, InlineGetOrdinaryHasInstance) { | |
| 291 Node* const context = Parameter(0); | |
| 292 Node* const effect = graph()->start(); | |
| 293 Node* const control = graph()->start(); | |
| 294 Reduction const r = Reduce(graph()->NewNode( | |
| 295 javascript()->CallRuntime(Runtime::kInlineGetOrdinaryHasInstance, 0), | |
| 296 context, effect, control)); | |
| 297 ASSERT_TRUE(r.Changed()); | |
| 298 EXPECT_THAT( | |
| 299 r.replacement(), | |
| 300 IsLoadContext( | |
| 301 ContextAccess(0, Context::ORDINARY_HAS_INSTANCE_INDEX, true), _)); | |
| 302 } | |
| 303 | |
| 304 } // namespace compiler | 287 } // namespace compiler |
| 305 } // namespace internal | 288 } // namespace internal |
| 306 } // namespace v8 | 289 } // namespace v8 |
| OLD | NEW |