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/interface-descriptors.h" | 5 #include "src/interface-descriptors.h" |
6 #include "src/isolate.h" | 6 #include "src/isolate.h" |
7 #include "test/cctest/compiler/function-tester.h" | 7 #include "test/cctest/compiler/function-tester.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
382 | 382 |
383 a = m.UndefinedConstant(); | 383 a = m.UndefinedConstant(); |
384 CHECK(!m.ToInt32Constant(a, value32)); | 384 CHECK(!m.ToInt32Constant(a, value32)); |
385 CHECK(!m.ToInt64Constant(a, value64)); | 385 CHECK(!m.ToInt64Constant(a, value64)); |
386 | 386 |
387 a = m.UndefinedConstant(); | 387 a = m.UndefinedConstant(); |
388 CHECK(!m.ToInt32Constant(a, value32)); | 388 CHECK(!m.ToInt32Constant(a, value32)); |
389 CHECK(!m.ToInt64Constant(a, value64)); | 389 CHECK(!m.ToInt64Constant(a, value64)); |
390 } | 390 } |
391 | 391 |
392 TEST(DeferredCodePhiHints) { | |
393 typedef compiler::Node Node; | |
394 typedef CodeStubAssembler::Label Label; | |
395 typedef CodeStubAssembler::Variable Variable; | |
396 Isolate* isolate(CcTest::InitIsolateOnce()); | |
397 VoidDescriptor descriptor(isolate); | |
398 CodeStubAssemblerTester m(isolate, descriptor); | |
399 Label block1(&m, Label::kDeferred); | |
400 m.Goto(&block1); | |
401 m.Bind(&block1); | |
402 { | |
403 Variable var_object(&m, MachineRepresentation::kTagged); | |
404 Label loop(&m, &var_object); | |
405 var_object.Bind(m.IntPtrConstant(0)); | |
406 m.Goto(&loop); | |
407 m.Bind(&loop); | |
408 { | |
409 Node* map = m.LoadMap(var_object.value()); | |
410 var_object.Bind(map); | |
411 m.Goto(&loop); | |
412 } | |
413 } | |
414 USE(m.GenerateCode()); | |
Mircea Trofin
2016/06/01 15:02:58
Why not CHECK there was code generated?
danno
2016/06/02 01:29:37
Done.
| |
415 } | |
416 | |
392 } // namespace compiler | 417 } // namespace compiler |
393 } // namespace internal | 418 } // namespace internal |
394 } // namespace v8 | 419 } // namespace v8 |
OLD | NEW |