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

Side by Side Diff: test/cctest/compiler/codegen-tester.h

Issue 1377423002: [turbofan] Fix calls to computed code objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « src/compiler/x64/code-generator-x64.cc ('k') | test/cctest/compiler/test-run-machops.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #ifndef V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ 5 #ifndef V8_CCTEST_COMPILER_CODEGEN_TESTER_H_
6 #define V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ 6 #define V8_CCTEST_COMPILER_CODEGEN_TESTER_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/compiler/instruction-selector.h" 10 #include "src/compiler/instruction-selector.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 void CheckString(const char* expected, Object* string) { 47 void CheckString(const char* expected, Object* string) {
48 CHECK( 48 CHECK(
49 this->isolate()->factory()->InternalizeUtf8String(expected)->SameValue( 49 this->isolate()->factory()->InternalizeUtf8String(expected)->SameValue(
50 string)); 50 string));
51 } 51 }
52 52
53 void GenerateCode() { Generate(); } 53 void GenerateCode() { Generate(); }
54 54
55 Handle<Code> GetCode() {
56 Generate();
57 return code_.ToHandleChecked();
58 }
59
55 protected: 60 protected:
56 virtual byte* Generate() { 61 virtual byte* Generate() {
57 if (code_.is_null()) { 62 if (code_.is_null()) {
58 Schedule* schedule = this->Export(); 63 Schedule* schedule = this->Export();
59 CallDescriptor* call_descriptor = this->call_descriptor(); 64 CallDescriptor* call_descriptor = this->call_descriptor();
60 Graph* graph = this->graph(); 65 Graph* graph = this->graph();
61 CompilationInfo info("testing", main_isolate(), main_zone()); 66 CompilationInfo info("testing", main_isolate(), main_zone());
62 code_ = Pipeline::GenerateCodeForTesting(&info, call_descriptor, graph, 67 code_ = Pipeline::GenerateCodeForTesting(&info, call_descriptor, graph,
63 schedule); 68 schedule);
64 } 69 }
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 } else { 320 } else {
316 CHECK_EQ(x, y); 321 CHECK_EQ(x, y);
317 } 322 }
318 } 323 }
319 324
320 } // namespace compiler 325 } // namespace compiler
321 } // namespace internal 326 } // namespace internal
322 } // namespace v8 327 } // namespace v8
323 328
324 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ 329 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_
OLDNEW
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | test/cctest/compiler/test-run-machops.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698