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

Side by Side Diff: test/cctest/test-compiler.cc

Issue 184403002: Remove Script::SetData and the script_data parameter from Script::(Compile|New). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 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 | « test/cctest/test-api.cc ('k') | test/cctest/test-debug.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 Handle<String> source_code( 60 Handle<String> source_code(
61 isolate->factory()->NewStringFromUtf8(CStrVector(source))); 61 isolate->factory()->NewStringFromUtf8(CStrVector(source)));
62 Handle<SharedFunctionInfo> shared_function = 62 Handle<SharedFunctionInfo> shared_function =
63 Compiler::CompileScript(source_code, 63 Compiler::CompileScript(source_code,
64 Handle<String>(), 64 Handle<String>(),
65 0, 65 0,
66 0, 66 0,
67 false, 67 false,
68 Handle<Context>(isolate->native_context()), 68 Handle<Context>(isolate->native_context()),
69 NULL, NULL, 69 NULL, NULL,
70 Handle<String>::null(),
71 NOT_NATIVES_CODE); 70 NOT_NATIVES_CODE);
72 return isolate->factory()->NewFunctionFromSharedFunctionInfo( 71 return isolate->factory()->NewFunctionFromSharedFunctionInfo(
73 shared_function, isolate->native_context()); 72 shared_function, isolate->native_context());
74 } 73 }
75 74
76 75
77 static double Inc(Isolate* isolate, int x) { 76 static double Inc(Isolate* isolate, int x) {
78 const char* source = "result = %d + 1;"; 77 const char* source = "result = %d + 1;";
79 EmbeddedVector<char, 512> buffer; 78 EmbeddedVector<char, 512> buffer;
80 OS::SNPrintF(buffer, source, x); 79 OS::SNPrintF(buffer, source, x);
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 CompileRun("function f() { a = 12345678 }; f();"); 393 CompileRun("function f() { a = 12345678 }; f();");
395 CheckCodeForUnsafeLiteral(GetJSFunction(context->Global(), "f")); 394 CheckCodeForUnsafeLiteral(GetJSFunction(context->Global(), "f"));
396 CompileRun("function f(x) { a = 12345678 + x}; f(1);"); 395 CompileRun("function f(x) { a = 12345678 + x}; f(1);");
397 CheckCodeForUnsafeLiteral(GetJSFunction(context->Global(), "f")); 396 CheckCodeForUnsafeLiteral(GetJSFunction(context->Global(), "f"));
398 CompileRun("function f(x) { var arguments = 1; x += 12345678}; f(1);"); 397 CompileRun("function f(x) { var arguments = 1; x += 12345678}; f(1);");
399 CheckCodeForUnsafeLiteral(GetJSFunction(context->Global(), "f")); 398 CheckCodeForUnsafeLiteral(GetJSFunction(context->Global(), "f"));
400 CompileRun("function f(x) { var arguments = 1; x = 12345678}; f(1);"); 399 CompileRun("function f(x) { var arguments = 1; x = 12345678}; f(1);");
401 CheckCodeForUnsafeLiteral(GetJSFunction(context->Global(), "f")); 400 CheckCodeForUnsafeLiteral(GetJSFunction(context->Global(), "f"));
402 } 401 }
403 #endif 402 #endif
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698