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/base/utils/random-number-generator.h" | 5 #include "src/base/utils/random-number-generator.h" |
6 #include "src/interface-descriptors.h" | 6 #include "src/interface-descriptors.h" |
7 #include "src/isolate.h" | 7 #include "src/isolate.h" |
8 #include "test/cctest/compiler/function-tester.h" | 8 #include "test/cctest/compiler/function-tester.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 ft.CheckTrue(object, smi0, expect_bailout); | 1058 ft.CheckTrue(object, smi0, expect_bailout); |
1059 } | 1059 } |
1060 | 1060 |
1061 { | 1061 { |
1062 Handle<JSObject> object = isolate->global_proxy(); | 1062 Handle<JSObject> object = isolate->global_proxy(); |
1063 CHECK_EQ(JS_GLOBAL_PROXY_TYPE, object->map()->instance_type()); | 1063 CHECK_EQ(JS_GLOBAL_PROXY_TYPE, object->map()->instance_type()); |
1064 ft.CheckTrue(object, smi0, expect_bailout); | 1064 ft.CheckTrue(object, smi0, expect_bailout); |
1065 } | 1065 } |
1066 } | 1066 } |
1067 | 1067 |
| 1068 TEST(DeferredCodePhiHints) { |
| 1069 typedef compiler::Node Node; |
| 1070 typedef CodeStubAssembler::Label Label; |
| 1071 typedef CodeStubAssembler::Variable Variable; |
| 1072 Isolate* isolate(CcTest::InitIsolateOnce()); |
| 1073 VoidDescriptor descriptor(isolate); |
| 1074 CodeStubAssemblerTester m(isolate, descriptor); |
| 1075 Label block1(&m, Label::kDeferred); |
| 1076 m.Goto(&block1); |
| 1077 m.Bind(&block1); |
| 1078 { |
| 1079 Variable var_object(&m, MachineRepresentation::kTagged); |
| 1080 Label loop(&m, &var_object); |
| 1081 var_object.Bind(m.IntPtrConstant(0)); |
| 1082 m.Goto(&loop); |
| 1083 m.Bind(&loop); |
| 1084 { |
| 1085 Node* map = m.LoadMap(var_object.value()); |
| 1086 var_object.Bind(map); |
| 1087 m.Goto(&loop); |
| 1088 } |
| 1089 } |
| 1090 CHECK(!m.GenerateCode().is_null()); |
| 1091 } |
| 1092 |
1068 } // namespace internal | 1093 } // namespace internal |
1069 } // namespace v8 | 1094 } // namespace v8 |
OLD | NEW |