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

Side by Side Diff: test/cctest/compiler/test-run-bytecode-graph-builder.cc

Issue 1424943004: Move compiler cctests into v8::internal::compiler namespace. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 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 // TODO(jochen): Remove this after the setting is turned on globally. 5 // TODO(jochen): Remove this after the setting is turned on globally.
6 #define V8_IMMINENT_DEPRECATION_WARNINGS 6 #define V8_IMMINENT_DEPRECATION_WARNINGS
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "src/compiler/pipeline.h" 10 #include "src/compiler/pipeline.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 compiler::Pipeline pipeline(&compilation_info); 105 compiler::Pipeline pipeline(&compilation_info);
106 Handle<Code> code = pipeline.GenerateCode(); 106 Handle<Code> code = pipeline.GenerateCode();
107 function->ReplaceCode(*code); 107 function->ReplaceCode(*code);
108 108
109 return function; 109 return function;
110 } 110 }
111 111
112 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphTester); 112 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphTester);
113 }; 113 };
114 114
115 } // namespace compiler
116 } // namespace internal
117 } // namespace v8
118
119
120 using namespace v8::internal;
121 using namespace v8::internal::compiler;
122 115
123 template <int N> 116 template <int N>
124 struct ExpectedSnippet { 117 struct ExpectedSnippet {
125 const char* code_snippet; 118 const char* code_snippet;
126 Handle<Object> return_value_and_parameters[N + 1]; 119 Handle<Object> return_value_and_parameters[N + 1];
127 120
128 inline Handle<Object> return_value() const { 121 inline Handle<Object> return_value() const {
129 return return_value_and_parameters[0]; 122 return return_value_and_parameters[0];
130 } 123 }
131 124
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 snippets[i].code_snippet, kFunctionName); 246 snippets[i].code_snippet, kFunctionName);
254 247
255 BytecodeGraphTester tester(isolate, zone, script.start()); 248 BytecodeGraphTester tester(isolate, zone, script.start());
256 auto callable = tester.GetCallable<Handle<Object>, Handle<Object>>(); 249 auto callable = tester.GetCallable<Handle<Object>, Handle<Object>>();
257 Handle<Object> return_value = 250 Handle<Object> return_value =
258 callable(snippets[i].parameter(0), snippets[i].parameter(1)) 251 callable(snippets[i].parameter(0), snippets[i].parameter(1))
259 .ToHandleChecked(); 252 .ToHandleChecked();
260 CHECK(return_value->SameValue(*snippets[i].return_value())); 253 CHECK(return_value->SameValue(*snippets[i].return_value()));
261 } 254 }
262 } 255 }
256
257 } // namespace compiler
258 } // namespace internal
259 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-representation-change.cc ('k') | test/cctest/compiler/test-run-deopt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698