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

Side by Side Diff: test/cctest/test-accessor-assembler.cc

Issue 2570213002: [stubs] Enable machine graph verification for CodeStubAssembler and friends by default in debug mode (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 "test/cctest/cctest.h" 5 #include "test/cctest/cctest.h"
6 6
7 #include "src/base/utils/random-number-generator.h" 7 #include "src/base/utils/random-number-generator.h"
8 #include "src/ic/accessor-assembler-impl.h" 8 #include "src/ic/accessor-assembler-impl.h"
9 #include "src/ic/stub-cache.h" 9 #include "src/ic/stub-cache.h"
10 #include "test/cctest/compiler/code-assembler-tester.h" 10 #include "test/cctest/compiler/code-assembler-tester.h"
(...skipping 18 matching lines...) Expand all
29 Node* name = m.Parameter(0); 29 Node* name = m.Parameter(0);
30 Node* map = m.Parameter(1); 30 Node* map = m.Parameter(1);
31 Node* primary_offset = m.StubCachePrimaryOffsetForTesting(name, map); 31 Node* primary_offset = m.StubCachePrimaryOffsetForTesting(name, map);
32 Node* result; 32 Node* result;
33 if (table == StubCache::kPrimary) { 33 if (table == StubCache::kPrimary) {
34 result = primary_offset; 34 result = primary_offset;
35 } else { 35 } else {
36 CHECK_EQ(StubCache::kSecondary, table); 36 CHECK_EQ(StubCache::kSecondary, table);
37 result = m.StubCacheSecondaryOffsetForTesting(name, primary_offset); 37 result = m.StubCacheSecondaryOffsetForTesting(name, primary_offset);
38 } 38 }
39 m.Return(m.SmiFromWord32(result)); 39 m.Return(m.SmiTag(result));
40 } 40 }
41 41
42 Handle<Code> code = data.GenerateCode(); 42 Handle<Code> code = data.GenerateCode();
43 FunctionTester ft(code, kNumParams); 43 FunctionTester ft(code, kNumParams);
44 44
45 Factory* factory = isolate->factory(); 45 Factory* factory = isolate->factory();
46 Handle<Name> names[] = { 46 Handle<Name> names[] = {
47 factory->NewSymbol(), 47 factory->NewSymbol(),
48 factory->InternalizeUtf8String("a"), 48 factory->InternalizeUtf8String("a"),
49 factory->InternalizeUtf8String("bb"), 49 factory->InternalizeUtf8String("bb"),
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 254
255 Handle<Object> expected_handler(handler, isolate); 255 Handle<Object> expected_handler(handler, isolate);
256 ft.CheckTrue(receiver, name, expected_handler); 256 ft.CheckTrue(receiver, name, expected_handler);
257 } 257 }
258 // Ensure we performed both kind of queries. 258 // Ensure we performed both kind of queries.
259 CHECK(queried_existing && queried_non_existing); 259 CHECK(queried_existing && queried_non_existing);
260 } 260 }
261 261
262 } // namespace internal 262 } // namespace internal
263 } // namespace v8 263 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698