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

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

Issue 1413463006: Map v8::Object to v8::internal::JSReceiver (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates 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
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-api.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_FUNCTION_TESTER_H_ 5 #ifndef V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
7 7
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 void CheckFalse(double a, double b) { 117 void CheckFalse(double a, double b) {
118 CheckCall(false_value(), Val(a), Val(b)); 118 CheckCall(false_value(), Val(a), Val(b));
119 } 119 }
120 120
121 Handle<JSFunction> NewFunction(const char* source) { 121 Handle<JSFunction> NewFunction(const char* source) {
122 return Handle<JSFunction>::cast(v8::Utils::OpenHandle( 122 return Handle<JSFunction>::cast(v8::Utils::OpenHandle(
123 *v8::Local<v8::Function>::Cast(CompileRun(source)))); 123 *v8::Local<v8::Function>::Cast(CompileRun(source))));
124 } 124 }
125 125
126 Handle<JSObject> NewObject(const char* source) { 126 Handle<JSObject> NewObject(const char* source) {
127 return v8::Utils::OpenHandle( 127 return Handle<JSObject>::cast(v8::Utils::OpenHandle(
128 *v8::Local<v8::Object>::Cast(CompileRun(source))); 128 *v8::Local<v8::Object>::Cast(CompileRun(source))));
129 } 129 }
130 130
131 Handle<String> Val(const char* string) { 131 Handle<String> Val(const char* string) {
132 return isolate->factory()->InternalizeUtf8String(string); 132 return isolate->factory()->InternalizeUtf8String(string);
133 } 133 }
134 134
135 Handle<Object> Val(double value) { 135 Handle<Object> Val(double value) {
136 return isolate->factory()->NewNumber(value); 136 return isolate->factory()->NewNumber(value);
137 } 137 }
138 138
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 CHECK(!code.is_null()); 209 CHECK(!code.is_null());
210 function->ReplaceCode(*code); 210 function->ReplaceCode(*code);
211 return function; 211 return function;
212 } 212 }
213 }; 213 };
214 } // namespace compiler 214 } // namespace compiler
215 } // namespace internal 215 } // namespace internal
216 } // namespace v8 216 } // namespace v8
217 217
218 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 218 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698