[ create a new paste ] login | about

Link: http://codepad.org/mpNBrgIf    [ raw code | output | fork ]

Lua, pasted on Jan 13:
int main(int argc, char* argv[]) {
	v8::V8::InitializeICUDefaultLocation(argv[0]);
	v8::V8::InitializeExternalStartupData(argv[0]);
	v8::Platform* platform = v8::platform::CreateDefaultPlatform();
	v8::V8::InitializePlatform(platform);
	v8::V8::Initialize();
	v8::V8::SetFlagsFromCommandLine(&argc, argv, true);
	v8::Isolate::CreateParams create_params;
	create_params.array_buffer_allocator =
		v8::ArrayBuffer::Allocator::NewDefaultAllocator();
	v8::Isolate* isolate = v8::Isolate::New(create_params); //<-- 27 seconds
	//run_shell = (argc == 1);
	int result;
	{
		v8::Isolate::Scope isolate_scope(isolate);
		v8::HandleScope handle_scope(isolate);
		v8::Local<v8::Context> context = CreateShellContext(isolate);
		if (context.IsEmpty()) {
			fprintf(stderr, "Error creating context\n");
			return 1;
		}
		v8::Context::Scope context_scope(context);
		result = RunMain(isolate, platform, argc, argv);
		//if (run_shell) RunShell(context, platform);
	}
	isolate->Dispose();
	v8::V8::Dispose();
	v8::V8::ShutdownPlatform();
	delete platform;
	delete create_params.array_buffer_allocator;
	return 0;
}


Output:
1
line 1: '=' expected near 'main'


Create a new paste based on this one


Comments: