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

Side by Side Diff: test/cctest/test-code-stub-assembler.cc

Issue 2069003002: Repro for a bad code generation issue on ia32. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | 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/base/utils/random-number-generator.h" 5 #include "src/base/utils/random-number-generator.h"
6 #include "src/ic/stub-cache.h" 6 #include "src/ic/stub-cache.h"
7 #include "src/interface-descriptors.h" 7 #include "src/interface-descriptors.h"
8 #include "src/isolate.h" 8 #include "src/isolate.h"
9 #include "test/cctest/compiler/function-tester.h" 9 #include "test/cctest/compiler/function-tester.h"
10 10
(...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1395 queried_existing = true; 1395 queried_existing = true;
1396 } 1396 }
1397 1397
1398 Handle<Code> expected_handler(handler, isolate); 1398 Handle<Code> expected_handler(handler, isolate);
1399 ft.CheckTrue(receiver, name, expected_handler); 1399 ft.CheckTrue(receiver, name, expected_handler);
1400 } 1400 }
1401 // Ensure we performed both kind of queries. 1401 // Ensure we performed both kind of queries.
1402 CHECK(queried_existing && queried_non_existing); 1402 CHECK(queried_existing && queried_non_existing);
1403 } 1403 }
1404 1404
1405 TEST(Dump) {
1406 typedef CodeStubAssembler::Label Label;
1407 typedef CodeStubAssembler::Variable Variable;
1408 Isolate* isolate(CcTest::InitIsolateOnce());
1409 LoadWithVectorDescriptor descriptor(isolate);
1410 CodeStubAssemblerTester m(isolate, descriptor);
1411
1412 {
1413 CodeStubAssembler::LoadICParameters p(m.Parameter(4), m.Parameter(0),
1414 m.Parameter(1), m.Parameter(2),
1415 m.Parameter(3));
1416
1417 Variable var_handler(&m, MachineRepresentation::kTagged);
1418 Label if_handler(&m, &var_handler), try_polymorphic(&m), miss(&m);
1419
1420 Node* receiver_map = m.LoadReceiverMap(p.receiver);
1421
1422 // Check monomorphic case.
1423 Node* feedback = m.TryMonomorphicCase(&p, receiver_map, &if_handler,
1424 &var_handler, &try_polymorphic);
1425 m.Bind(&if_handler);
1426 {
1427 LoadWithVectorDescriptor descriptor(isolate);
1428 m.TailCallStub(descriptor, var_handler.value(), p.context, p.receiver,
1429 p.name, p.slot, p.vector);
1430 }
1431
1432 m.Bind(&try_polymorphic);
1433 {
1434 // Check polymorphic case.
1435 m.GotoUnless(m.WordEqual(m.LoadMap(feedback),
1436 m.LoadRoot(Heap::kFixedArrayMapRootIndex)),
1437 &miss);
1438 m.HandlePolymorphicCase(&p, receiver_map, feedback, &if_handler,
1439 &var_handler, &miss, 2);
1440 }
1441 m.Bind(&miss);
1442 {
1443 m.TailCallRuntime(Runtime::kLoadIC_Miss, p.context, p.receiver, p.name,
1444 p.slot, p.vector);
1445 }
1446 }
1447 Handle<Code> code = m.GenerateCode();
1448 code->Print();
1449 }
1450
1405 } // namespace internal 1451 } // namespace internal
1406 } // namespace v8 1452 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698