Lines Matching refs:v8
1 // Copyright 2012 the V8 project authors. All rights reserved.
5 #include "v8.h"
13 using namespace v8::internal;
15 static v8::Persistent<v8::Context> env;
18 if (env.IsEmpty()) env = v8::Context::New();
19 v8::HandleScope scope;
108 v8::HandleScope sc;
199 v8::HandleScope sc;
209 v8::HandleScope inner_scope;
263 v8::HandleScope scope;
286 v8::HandleScope scope;
334 static void TestWeakGlobalHandleCallback(v8::Persistent<v8::Value> handle,
539 v8::HandleScope sc;
562 v8::HandleScope sc;
635 v8::HandleScope sc;
659 v8::HandleScope sc;
706 v8::HandleScope sc;
757 v8::HandleScope scope;
805 v8::HandleScope scope;
842 v8::HandleScope scope;
846 v8::HandleScope nested;
867 v8::HandleScope scope;
940 v8::HandleScope scope;
950 { v8::HandleScope scope;
998 static int CountOptimizedUserFunctions(v8::Handle<v8::Context> context) {
1000 Handle<Context> icontext = v8::Utils::OpenHandle(*context);
1011 v8::V8::Initialize();
1015 v8::HandleScope scope;
1016 v8::Persistent<v8::Context> ctx[kNumTestContexts];
1022 ctx[i] = v8::Context::New();
1024 bool opt = (FLAG_always_opt && i::V8::UseCrankshaft());
1032 v8::HandleScope scope;
1124 static int CountOptimizedUserFunctionsWithGC(v8::Handle<v8::Context> context,
1127 Handle<Context> icontext = v8::Utils::OpenHandle(*context);
1141 v8::V8::Initialize();
1145 v8::HandleScope scope;
1146 v8::Persistent<v8::Context> ctx[kNumTestContexts];
1153 ctx[i] = v8::Context::New();
1158 bool opt = (FLAG_always_opt && i::V8::UseCrankshaft());
1191 v8::V8::Initialize();
1264 v8::HandleScope scope;
1318 v8::HandleScope scope;
1346 v8::HandleScope outer_scope;
1347 v8::Persistent<v8::Context> ctx1 = v8::Context::New();
1348 v8::Persistent<v8::Context> ctx2 = v8::Context::New();
1355 v8::HandleScope inner_scope;
1357 v8::Local<v8::Value> v = ctx1->Global()->Get(v8_str("v"));
1360 v8::Local<v8::Value> res = CompileRun(
1366 ctx2->Global()->Set(v8_str("o"), v8::Int32::New(0));
1383 v8::HandleScope outer_scope;
1384 v8::Persistent<v8::Context> ctx1 = v8::Context::New();
1385 v8::Persistent<v8::Context> ctx2 = v8::Context::New();
1392 v8::HandleScope inner_scope;
1394 v8::Local<v8::Value> v = ctx1->Global()->Get(v8_str("v"));
1397 v8::Local<v8::Value> res = CompileRun(
1403 ctx2->Global()->Set(v8_str("o"), v8::Int32::New(0));
1418 v8::HandleScope outer_scope;
1419 v8::Persistent<v8::Context> ctx1 = v8::Context::New();
1420 v8::Persistent<v8::Context> ctx2 = v8::Context::New();
1427 v8::HandleScope inner_scope;
1429 v8::Local<v8::Value> v = ctx1->Global()->Get(v8_str("v"));
1432 v8::Local<v8::Value> res = CompileRun(
1438 ctx2->Global()->Set(v8_str("o"), v8::Int32::New(0));
1453 v8::HandleScope outer_scope;
1454 v8::Persistent<v8::Context> ctx1 = v8::Context::New();
1455 v8::Persistent<v8::Context> ctx2 = v8::Context::New();
1462 v8::HandleScope inner_scope;
1464 v8::Local<v8::Value> v = ctx1->Global()->Get(v8_str("v"));
1467 v8::Local<v8::Value> res = CompileRun(
1477 ctx2->Global()->Set(v8_str("o"), v8::Int32::New(0));
1496 if (!i::V8::UseCrankshaft()) return;
1497 v8::HandleScope outer_scope;
1500 v8::HandleScope scope;
1516 v8::Utils::OpenHandle(
1517 *v8::Handle<v8::Function>::Cast(
1518 v8::Context::GetCurrent()->Global()->Get(v8_str("f"))));
1532 v8::HandleScope scope;
1533 v8::Handle<v8::Object> global = v8::Context::GetCurrent()->Global();
1534 v8::Handle<v8::Function> g =
1535 v8::Handle<v8::Function>::Cast(global->Get(v8_str("g")));
1546 v8::HandleScope scope;
1559 v8::Utils::OpenHandle(
1560 *v8::Handle<v8::Object>::Cast(
1561 v8::Context::GetCurrent()->Global()->Get(v8_str("base"))));
1604 if (!i::V8::UseCrankshaft()) return;
1605 v8::HandleScope outer_scope;
1608 v8::HandleScope scope;
1620 v8::Utils::OpenHandle(
1621 *v8::Handle<v8::Function>::Cast(
1622 v8::Context::GetCurrent()->Global()->Get(v8_str("f"))));
1631 v8::V8::ContextDisposedNotification();
1632 v8::V8::IdleNotification(kLongIdlePauseInMs);
1650 if (!i::V8::UseCrankshaft()) return;
1651 v8::HandleScope outer_scope;
1654 v8::HandleScope scope;
1666 v8::Utils::OpenHandle(
1667 *v8::Handle<v8::Function>::Cast(
1668 v8::Context::GetCurrent()->Global()->Get(v8_str("f"))));
1676 v8::V8::ContextDisposedNotification();
1677 v8::V8::IdleNotification(kLongIdlePauseInMs);