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

Unified Diff: test/cctest/compiler/function-tester.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/cctest.cc ('k') | test/cctest/compiler/function-tester.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/function-tester.h
diff --git a/test/cctest/compiler/function-tester.h b/test/cctest/compiler/function-tester.h
index 51461e6362926eba29c22fc79f79e668edd8e3ac..e65fa78c131ea7ade8ef1cdfdbae529d5f1dabc9 100644
--- a/test/cctest/compiler/function-tester.h
+++ b/test/cctest/compiler/function-tester.h
@@ -43,10 +43,7 @@ class FunctionTester : public InitializedHandleScope {
v8::Local<v8::Message> CheckThrowsReturnMessage(Handle<Object> a,
Handle<Object> b);
void CheckCall(Handle<Object> expected, Handle<Object> a, Handle<Object> b,
- Handle<Object> c, Handle<Object> d) {
- Handle<Object> result = Call(a, b, c, d).ToHandleChecked();
- CHECK(expected->SameValue(*result));
- }
+ Handle<Object> c, Handle<Object> d);
void CheckCall(Handle<Object> expected, Handle<Object> a, Handle<Object> b,
Handle<Object> c) {
@@ -96,15 +93,8 @@ class FunctionTester : public InitializedHandleScope {
CheckCall(false_value(), Val(a), Val(b));
}
- Handle<JSFunction> NewFunction(const char* source) {
- return Handle<JSFunction>::cast(v8::Utils::OpenHandle(
- *v8::Local<v8::Function>::Cast(CompileRun(source))));
- }
-
- Handle<JSObject> NewObject(const char* source) {
- return Handle<JSObject>::cast(v8::Utils::OpenHandle(
- *v8::Local<v8::Object>::Cast(CompileRun(source))));
- }
+ Handle<JSFunction> NewFunction(const char* source);
+ Handle<JSObject> NewObject(const char* source);
Handle<String> Val(const char* string);
Handle<Object> Val(double value);
@@ -116,14 +106,7 @@ class FunctionTester : public InitializedHandleScope {
Handle<Object> true_value();
Handle<Object> false_value();
- static Handle<JSFunction> ForMachineGraph(Graph* graph, int param_count) {
- JSFunction* p = NULL;
- { // because of the implicit handle scope of FunctionTester.
- FunctionTester f(graph, param_count);
- p = *f.function;
- }
- return Handle<JSFunction>(p); // allocated in outer handle scope.
- }
+ static Handle<JSFunction> ForMachineGraph(Graph* graph, int param_count);
private:
uint32_t flags_;
« no previous file with comments | « test/cctest/cctest.cc ('k') | test/cctest/compiler/function-tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698