Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: test/unittests/compiler/js-intrinsic-lowering-unittest.cc

Issue 1980483003: [es6] Reintroduce the instanceof operator in the backends. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Igors comments. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/mjsunit/messages.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « test/mjsunit/messages.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698