Home | History | Annotate | Download | only in cctest

Lines Matching refs:Script

75 using ::v8::Script;
170 Local<Script> script = v8_compile(source);
171 CHECK_EQ(6, v8_run_int32value(script));
359 THREADED_TEST(Script) {
363 Local<Script> script = v8_compile(source);
364 CHECK_EQ(6, v8_run_int32value(script));
438 Local<Script> script = v8_compile(source);
439 Local<Value> value = script->Run(env.local()).ToLocalChecked();
476 Local<Script> script = v8_compile(source);
477 Local<Value> value = script->Run(env.local()).ToLocalChecked();
510 Local<Script> script = v8_compile(source);
511 Local<Value> value = script->Run(env.local()).ToLocalChecked();
536 Local<Script> script = v8_compile(source);
537 Local<Value> value = script->Run(env.local()).ToLocalChecked();
834 Local<Script> script = v8_compile(source);
835 Local<Value> value = script->Run(env.local()).ToLocalChecked();
857 Local<Script> script = v8_compile(source);
858 Local<Value> value = script->Run(env.local()).ToLocalChecked();
917 Local<Script> script = v8_compile(source);
918 Local<Value> value = script->Run(env.local()).ToLocalChecked();
995 Local<Script> script = v8_compile("obj()");
997 CHECK_EQ(102, v8_run_int32value(script));
1011 Local<Script> script = v8_compile("obj()");
1013 CHECK_EQ(102, v8_run_int32value(script));
1035 Local<Script> script;
1036 script = v8_compile("obj_instance.x");
1038 CHECK_EQ(1, v8_run_int32value(script));
1040 script = v8_compile("obj_instance.m");
1042 CHECK_EQ(239, v8_run_int32value(script));
1076 v8::Local<v8::Script> script;
1077 script = v8_compile("callback_object.callback(17)");
1079 CHECK_EQ(51424, v8_run_int32value(script));
1081 script = v8_compile("callback_object.callback(17, 24)");
1083 CHECK_EQ(51425, v8_run_int32value(script));
1273 Local<Script> script = v8_compile("obj.length");
1274 CHECK_EQ(23, v8_run_int32value(script));
1282 Local<Script> script = v8_compile("obj.length");
1283 CHECK_EQ(22, v8_run_int32value(script));
1291 Local<Script> script = v8_compile("obj.length");
1292 CHECK_EQ(0, v8_run_int32value(script));
1883 v8::Local<Script> script(v8_compile("dummy()"));
1884 v8::Local<Value> result(script->Run(env.local()).ToLocalChecked());
2164 v8::Local<Script> call_recursively_script;
2229 call_recursively_script = v8::Local<Script>();
2286 Local<Script> script = v8_compile("Foo.prototype.plak");
2287 CHECK_EQ(v8_run_int32value(script), 321);
2968 std::string script = std::string("var sym = ") + name;
2969 CompileRun(script.c_str());
4564 Local<Script> script = v8_compile("throw 'panama!';");
4566 v8::MaybeLocal<Value> result = script->Run(env.local());
4615 v8::Local<v8::Script> script = CompileWithOrigin("throw 'error'", "6.75");
4616 CHECK(script->Run(context.local()).IsEmpty());
4715 v8::Local<v8::Script> script =
4716 Script::Compile(context.local(), v8_str("throw 'error'"), &origin)
4718 CHECK(script->Run(context.local()).IsEmpty());
4746 v8::Local<v8::Script> script =
4747 Script::Compile(context.local(), v8_str("throw 'error'"), &origin)
4749 CHECK(script->Run(context.local()).IsEmpty());
4788 v8::Local<v8::Script> script =
4789 Script::Compile(context.local(), v8_str("throw 'error'"), &origin1)
4791 CHECK(script->Run(context.local()).IsEmpty());
4801 script = Script::Compile(context.local(), v8_str("throw 'error'"), &origin2)
4803 CHECK(script->Run(context.local()).IsEmpty());
6269 Local<Script> script = v8_compile("x");
6271 script->Run(context.local()).IsEmpty();
6298 Local<Script> script = v8_compile("obj.x");
6300 Local<Value> result = script->Run(context.local()).ToLocalChecked();
6318 Local<Script> script_desc = v8_compile(
6326 Local<Script> script_define = v8_compile(
6370 Local<Script> script_desc = v8_compile(
6378 Local<Script> script_define = v8_compile(
6635 Local<Script> script = v8_compile("obj.x = 4");
6638 script->Run(context.local()).ToLocalChecked();
6658 Local<Script> script = v8_compile("obj.x = 4; obj.x");
6661 script->Run(context.local()).ToLocalChecked();
6682 Local<Script> script = v8_compile("obj.x = 4; obj.x");
6684 script->Run(context.local()).ToLocalChecked();
6794 Local<Script> script0 = v8_compile(source);
6801 Local<Script> script1 = v8_compile(source);
6926 Local<Script> script = v8_compile(source);
6929 ->Equals(env.local(), script->Run(env.local()).ToLocalChecked())
6935 script = v8_compile(source);
6936 script->Run(env.local()).ToLocalChecked();
6940 script = v8_compile(source);
6941 script->Run(env.local()).ToLocalChecked();
6955 Local<Script> scr = v8_compile("");
6956 v8::Persistent<Script> p_scr(isolate, scr);
8961 v8::Local<Script> script0 = v8_compile("foo = 111");
8979 v8::Local<Script> script1 =
8998 v8::Local<Script> script2 =
9087 v8::Local<Script> access_other0 = v8_compile("other.Object");
9088 v8::Local<Script> access_other1 = v8_compile("other[42]");
9103 v8::Local<Script> access_f0 = v8_compile("f.Object");
9104 v8::Local<Script> access_f1 = v8_compile("f[42]");
9129 Local<Script> access_f2 = v8_compile("f.foo");
9130 Local<Script> access_f3 = v8_compile("f[99]");
10248 // The script to check how Crankshaft compiles missing global function
10250 const char* script =
10274 value = CompileRun(script);
10285 value = CompileRun(script);
10300 // The script to check that we leave global object not
10306 const char* script =
10320 foo = CompileRun(script);
11251 Local<Script> script = v8_compile(
11262 script->Run(current.local()).ToLocalChecked();
11280 script = v8_compile(
11286 script->Run(current.local()).ToLocalChecked();
11313 Local<Script> script = v8_compile("other.eval('var foo = 1234')");
11314 script->Run(current.local()).ToLocalChecked();
11322 script = v8_compile("other.eval('na = 1234')");
11323 script->Run(current.local()).ToLocalChecked();
11334 script = v8_compile("var bar = 42; other.eval('bar');");
11335 CHECK(script->Run(current.local()).IsEmpty());
11341 script = v8_compile(
11346 CHECK(script->Run(current.local()).IsEmpty());
11355 script = v8_compile("other.eval('bis')");
11356 CHECK_EQ(1234, script->Run(current.local())
11367 script = v8_compile("other.eval('this == t')");
11368 Local<Value> result = script->Run(current.local()).ToLocalChecked();
11374 script = v8_compile("with({x:2}){other.eval('x')}");
11375 CHECK(script->Run(current.local()).IsEmpty());
11381 script = v8_compile("other.y = 1; eval.call(other, 'y')");
11382 CHECK(script->Run(current.local()).IsEmpty());
11436 Local<Script> script = v8_compile("other.eval('new Date(42)')");
11437 Local<Value> value = script->Run(current.local()).ToLocalChecked();
13363 Local<Script> script = v8_compile("(function () {"
13371 CHECK_EQ(91, script->Run(env.local())
13388 Local<Script> script = v8_compile("(function () {"
13396 CHECK_EQ(91, script->Run(env.local())
13429 Local<Script> script = v8_compile("(function () {"
13433 CHECK_EQ(42, script->Run(env.local())
13448 Local<Script> script = v8_compile("(function () {"
13452 CHECK_EQ(42, script->Run(env.local())
13878 // script at which the function source is found, see
13992 const char* script =
14002 CompileRun(script);
14155 // script at which the function source is found, see
14225 const char* script =
14267 CompileRun(script);
14311 CompileRun(script);
14408 static void CheckTryCatchSourceInfo(v8::Local<v8::Script> script,
14414 CHECK(script->Run(context).IsEmpty());
14449 v8::Local<v8::Script> script;
14451 script = CompileWithOrigin(source, resource_name);
14452 CheckTryCatchSourceInfo(script, resource_name, 0);
14456 script =
14457 v8::Script::Compile(context.local(), source, &origin1).ToLocalChecked();
14458 CheckTryCatchSourceInfo(script, resource_name, 0);
14463 script =
14464 v8::Script::Compile(context.local(), source, &origin2).ToLocalChecked();
14465 CheckTryCatchSourceInfo(script, resource_name, 7);
14473 CHECK(v8::Script::Compile(context.local(), v8_str("!\n")).IsEmpty());
14486 v8::Local<v8::Script> script0 = CompileWithOrigin(source0, "test.js");
14487 v8::Local<v8::Script> script1 = CompileWithOrigin(source1, "test.js");
14488 v8::Local<v8::Script> script2 = v8::Script::Compile(context.local(), source0)
14713 const char* script = "function foo(a) { return a+1; }";
14714 v8::ScriptCompiler::Source source(v8_str(script));
15007 v8::Script::Compile(context.local(), source).FromMaybe(Local<Script>());
16087 v8::Local<v8::Script> dep = v8_compile(source);
16159 // The situation where there is no associated script, like for evals.
16262 // script name, function name, line number, and column offset.
16294 // Make the script using a non-zero line and column offset.
17095 v8::Local<v8::Script> script = CompileWithOrigin(scriptSource, "test");
17096 script->Run(context.local()).ToLocalChecked();
17099 CHECK_EQ(scriptIdInStack[i], script->GetUnboundScript()->GetId());
17346 // Execute a script.
17370 // Execute a script.
17870 v8::Local<v8::String> script = v8_str("function f() {}\n\nfunction g() {}");
17871 v8::Script::Compile(env.local(), script, &origin)
17912 v8::Local<v8::String> script =
17914 v8::Script::Compile(env.local(), script, &origin)
17971 v8::Script::Compile(env.local(), v8_str(code), &origin)
18039 v8::Script::Compile(env.local(), v8_str(code), &origin)
18075 v8::Local<v8::String> script = v8_str("function f() {}\n\nfunction g() {}");
18076 v8::Script::Compile(env.local(), script, &origin)
18096 v8::Local<v8::String> script =
18098 v8::Script::Compile(env.local(), script, &origin)
18138 v8::Local<v8::Script> script(
18139 v8::Script::Compile(env.local(), scriptSource, &origin).ToLocalChecked());
18140 script->Run(env.local()).ToLocalChecked();
18145 CHECK_EQ(script->GetUnboundScript()->GetId(), foo->ScriptId());
18146 CHECK_EQ(script->GetUnboundScript()->GetId(), bar->ScriptId());
18154 v8::Local<v8::String> script = v8_str(
18160 v8::Script::Compile(env.local(), script, &origin)
18249 v8::Local<v8::Script> script;
18250 script = v8_compile("new C1();");
18253 script->Run(context.local()).ToLocalChecked());
18264 script = v8_compile("new C2();");
18267 script->Run(context.local()).ToLocalChecked());
18320 v8::Local<v8::Script> script;
18321 script = v8_compile("new C1();");
18324 script->Run(context.local()).ToLocalChecked());
18335 script = v8_compile("new C2();");
18338 script->Run(context.local()).ToLocalChecked());
18360 v8::Local<v8::Script> script;
18372 script = v8_compile("new C1();");
18377 script->Run(context.local()).ToLocalChecked());
18400 script = v8_compile("new C1();");
18403 script->Run(context.local()).ToLocalChecked());
18916 static void BreakArrayGuarantees(const char* script) {
18936 CompileRun(script);
20355 char script[64];
20356 i::Vector<char> script_vector(script, sizeof(script));
20381 v8::base::OS::Print("--- Script (1) ---\n");
20382 Local<Script> script =
20383 v8::Script::Compile(env.local(), v8_str("recursion(0)")).ToLocalChecked();
20384 script->Run(env.local()).ToLocalChecked();
20387 v8::base::OS::Print("\n--- Script (2) ---\n");
20390 script->Run(env.local()).ToLocalChecked();
21472 void CheckCorrectThrow(const char* script) {
21473 // Test that the script, when wrapped into a try-catch, triggers the catch
21479 i::SNPrintF(source, "try { %s; } catch (e) { catcher(e); }", script);
22679 Local<Script> script =
22681 Local<Value> script_name = script->GetUnboundScript()->GetScriptName();
22686 int line_number = script->GetUnboundScript()->GetLineNumber(0);
22690 void CheckMagicComments(Local<Script> script, const char* expected_source_url,
22693 v8::String::Utf8Value url(script->GetUnboundScript()->GetSourceURL());
22696 CHECK(script->GetUnboundScript()->GetSourceURL()->IsUndefined());
22700 script->GetUnboundScript()->GetSourceMappingURL());
22703 CHECK(script->GetUnboundScript()->GetSourceMappingURL()->IsUndefined());
22709 Local<Script> script = v8_compile(source);
22710 CheckMagicComments(script, expected_source_url, expected_source_mapping_url);
22736 // SourceURL or sourceMappingURL in the middle of the script.
22952 v8::MaybeLocal<Script> script = v8::ScriptCompiler::Compile(
22955 CHECK(!script.IsEmpty());
22957 script.ToLocalChecked()->Run(env.local()).ToLocalChecked());
22960 CheckMagicComments(script.ToLocalChecked(), expected_source_url,
22963 CHECK(script.IsEmpty());
22971 // This script is unrealistically small, since no one chunk is enough to fill
23012 // Test that the next script succeeds normally.
23128 // Case 2: the script ends with a multi-byte character. Make sure that it's
23228 v8::Local<Script> script =
23234 script->Run(env.local()).ToLocalChecked()->Uint32Value(env.local());
23312 // First, run a script with a let variable.
23315 // Then stream a script which (erroneously) tries to introduce the same
23328 // Parsing should succeed (the script will be parsed and compiled in a context
23334 v8::Local<Script> script =
23338 CHECK(!script.IsEmpty());
23341 // Running the script exposes the error.
23342 CHECK(script->Run(env.local()).IsEmpty());
23387 v8::Local<v8::Script> script;
23391 script = v8::ScriptCompiler::Compile(context, &source, option)
23394 CHECK_EQ(2, script->Run(context)
23415 v8::Local<v8::Script> script =
23420 script->Run(context).ToLocalChecked()->Int32Value(context).FromJust());
23442 v8::Local<v8::Script> script =
23446 USE(script);
23453 // Recompiling the same script with it won't reject the data.
23459 v8::Local<v8::Script> script =
23463 USE(script);
23469 // Compile an incompatible script with the cached data. The new script doesn't
23479 v8::Local<v8::Script> script =
23483 USE(script);