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

Side by Side Diff: test/cctest/test-code-layout.cc

Issue 2304553002: Include only stuff you need, part 6: Fix cctest.h. (Closed)
Patch Set: Created 4 years, 3 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/cctest/test-code-cache.cc ('k') | test/cctest/test-conversions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "src/factory.h"
6 #include "src/isolate.h"
5 #include "src/objects.h" 7 #include "src/objects.h"
8 // FIXME(mstarzinger, marja): This is weird, but required because of the missing
9 // (disallowed) include: src/factory.h -> src/objects-inl.h
10 #include "src/objects-inl.h"
11 // FIXME(mstarzinger, marja): This is weird, but required because of the missing
12 // (disallowed) include: src/type-feedback-vector.h ->
13 // src/type-feedback-vector-inl.h
14 #include "src/type-feedback-vector-inl.h"
6 #include "test/cctest/cctest.h" 15 #include "test/cctest/cctest.h"
7 16
8 using namespace v8::internal; 17 using namespace v8::internal;
9 18
10 TEST(CodeLayoutWithoutUnwindingInfo) { 19 TEST(CodeLayoutWithoutUnwindingInfo) {
11 CcTest::InitializeVM(); 20 CcTest::InitializeVM();
12 HandleScope handle_scope(CcTest::i_isolate()); 21 HandleScope handle_scope(CcTest::i_isolate());
13 22
14 // "Hello, World!" in ASCII. 23 // "Hello, World!" in ASCII.
15 byte buffer_array[13] = {0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x2c, 0x20, 24 byte buffer_array[13] = {0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x2c, 0x20,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 CHECK_EQ(code->unwinding_info_size(), unwinding_info_size); 84 CHECK_EQ(code->unwinding_info_size(), unwinding_info_size);
76 CHECK( 85 CHECK(
77 IsAligned(reinterpret_cast<uintptr_t>(code->unwinding_info_start()), 8)); 86 IsAligned(reinterpret_cast<uintptr_t>(code->unwinding_info_start()), 8));
78 CHECK_EQ( 87 CHECK_EQ(
79 memcmp(code->unwinding_info_start(), unwinding_info, unwinding_info_size), 88 memcmp(code->unwinding_info_start(), unwinding_info, unwinding_info_size),
80 0); 89 0);
81 CHECK_EQ(code->unwinding_info_end() - reinterpret_cast<byte*>(*code), 90 CHECK_EQ(code->unwinding_info_end() - reinterpret_cast<byte*>(*code),
82 Code::kHeaderSize + RoundUp(buffer_size, kInt64Size) + kInt64Size + 91 Code::kHeaderSize + RoundUp(buffer_size, kInt64Size) + kInt64Size +
83 unwinding_info_size - kHeapObjectTag); 92 unwinding_info_size - kHeapObjectTag);
84 } 93 }
OLDNEW
« no previous file with comments | « test/cctest/test-code-cache.cc ('k') | test/cctest/test-conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698