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

Side by Side Diff: test/cctest/test-log-stack-tracer.cc

Issue 573056: Add fuzzing support for inline runtime functions (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | test/mjsunit/fuzz-natives.js » ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // 2 //
3 // Tests of profiler-related functions from log.h 3 // Tests of profiler-related functions from log.h
4 4
5 #ifdef ENABLE_LOGGING_AND_PROFILING 5 #ifdef ENABLE_LOGGING_AND_PROFILING
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "v8.h" 9 #include "v8.h"
10 10
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 225 }
226 226
227 227
228 namespace v8 { 228 namespace v8 {
229 namespace internal { 229 namespace internal {
230 230
231 class CodeGeneratorPatcher { 231 class CodeGeneratorPatcher {
232 public: 232 public:
233 CodeGeneratorPatcher() { 233 CodeGeneratorPatcher() {
234 CodeGenerator::InlineRuntimeLUT genGetFramePointer = 234 CodeGenerator::InlineRuntimeLUT genGetFramePointer =
235 {&CodeGenerator::GenerateGetFramePointer, "_GetFramePointer"}; 235 {&CodeGenerator::GenerateGetFramePointer, "_GetFramePointer", 0};
236 // _FastCharCodeAt is not used in our tests. 236 // _RandomPositiveSmi is not used in our tests. The one we replace need to
237 // have the same noumer of arguments as the one we put in, which is zero in
238 // this case.
237 bool result = CodeGenerator::PatchInlineRuntimeEntry( 239 bool result = CodeGenerator::PatchInlineRuntimeEntry(
238 NewString("_FastCharCodeAt"), 240 NewString("_RandomPositiveSmi"),
239 genGetFramePointer, &oldInlineEntry); 241 genGetFramePointer, &oldInlineEntry);
240 CHECK(result); 242 CHECK(result);
241 } 243 }
242 244
243 ~CodeGeneratorPatcher() { 245 ~CodeGeneratorPatcher() {
244 CHECK(CodeGenerator::PatchInlineRuntimeEntry( 246 CHECK(CodeGenerator::PatchInlineRuntimeEntry(
245 NewString("_GetFramePointer"), 247 NewString("_GetFramePointer"),
246 oldInlineEntry, NULL)); 248 oldInlineEntry, NULL));
247 } 249 }
248 250
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 CHECK_EQ(0, GetJsEntrySp()); 368 CHECK_EQ(0, GetJsEntrySp());
367 CompileRun("a = 1; b = a + 1;"); 369 CompileRun("a = 1; b = a + 1;");
368 CHECK_EQ(0, GetJsEntrySp()); 370 CHECK_EQ(0, GetJsEntrySp());
369 CompileRun("js_entry_sp();"); 371 CompileRun("js_entry_sp();");
370 CHECK_EQ(0, GetJsEntrySp()); 372 CHECK_EQ(0, GetJsEntrySp());
371 CompileRun("js_entry_sp_level2();"); 373 CompileRun("js_entry_sp_level2();");
372 CHECK_EQ(0, GetJsEntrySp()); 374 CHECK_EQ(0, GetJsEntrySp());
373 } 375 }
374 376
375 #endif // ENABLE_LOGGING_AND_PROFILING 377 #endif // ENABLE_LOGGING_AND_PROFILING
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | test/mjsunit/fuzz-natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698