Lines Matching defs:string
7 #include <string.h>
14 #include <string>
477 std::map<std::string, std::unique_ptr<ScriptCompiler::CachedData>>
681 // Executes a string within the current v8 context.
847 std::string ToSTLString(Isolate* isolate, Local<String> v8_str) {
854 bool IsAbsolutePath(const std::string& path) {
858 return path.find(':') != std::string::npos;
864 std::string GetWorkingDirectory() {
880 std::string DirName(const std::string& path) {
883 DCHECK(last_slash != std::string::npos);
890 std::string NormalizePath(const std::string& path,
891 const std::string& dir_name) {
892 std::string absolute_path;
899 std::vector<std::string> segments;
901 std::string segment;
913 std::ostream_iterator<std::string>(os, "/"));
951 std::string assertion_key = ToSTLString(isolate, v8_assertion_key);
956 std::string assertion_value = ToSTLString(isolate, v8_assertion_value);
971 std::map<std::pair<std::string, ModuleType>, Global<Module>> module_map;
973 std::unordered_map<Global<Module>, std::string, ModuleGlobalHash>
1007 std::string absolute_path = NormalizePath(ToSTLString(isolate, specifier),
1021 const std::string& file_name,
1027 std::string fallback_file_name = file_name + ".js";
1037 std::string msg = "d8: Error reading module from " + file_name;
1093 std::string dir_name = DirName(file_name);
1100 std::string absolute_path =
1309 std::string source_url = ToSTLString(isolate, referrer);
1310 std::string dir_name =
1312 std::string file_name = ToSTLString(isolate, specifier);
1313 std::string absolute_path = NormalizePath(file_name, dir_name);
1369 std::string absolute_path = NormalizePath(file_name, GetWorkingDirectory());
1438 std::string absolute_path = NormalizePath(file_name, GetWorkingDirectory());
1469 std::string absolute_path = NormalizePath(file_name, GetWorkingDirectory());
1477 std::string line;
2056 std::string file_name = i_isolate->logger()->file_name();
2066 std::string raw_log;
2313 args.GetIsolate()->ThrowError("Error converting filename to string");
2372 oss << "Cannot convert file[" << i << "] name to string.";
2424 } else if (strcmp("string", *str) == 0) {
2450 isolate->ThrowError("Failed to convert function to string");
2476 isolate->ThrowError("Failed to convert argument to string");
2540 isolate->ThrowError("1st argument must be a string or a function");
2731 String::Utf8Value string(args.GetIsolate(), args[1]);
2732 if (*string == nullptr) {
2735 fprintf(fzliout, "%s\n", *string);
2744 // Using ErrorPrototypeToString for converting the error to string will fail
2754 // Converts a V8 value to a C string.
2756 return *value ? *value : "<string conversion failed>";
2895 // Turn a value into a human-readable string.
3208 // Converts a V8 value to a C string.
3210 return *value ? *value : "<string conversion failed>";
3388 const std::string& name, int start_line,
3408 std::string file_name = ToSTLString(isolate, name);
3479 std::vector<std::pair<std::string, Counter*>> counters(
3486 std::string key = pair.first;
3500 std::cout << "+" << std::string(kNameBoxSize, '-') << "+"
3501 << std::string(kValueBoxSize, '-') << "+\n";
3502 std::cout << "| Name" << std::string(kNameBoxSize - 5, ' ') << "| Value"
3503 << std::string(kValueBoxSize - 6, ' ') << "|\n";
3504 std::cout << "+" << std::string(kNameBoxSize, '-') << "+"
3505 << std::string(kValueBoxSize, '-') << "+\n";
3507 std::string key = pair.first;
3522 std::cout << "+" << std::string(kNameBoxSize, '-') << "+"
3523 << std::string(kValueBoxSize, '-') << "+\n";
3644 std::string line;
3645 std::vector<std::string> lines;
3688 // Reads a file into a v8 string.
3757 Send(message->string());
3761 Send(message->string());
3765 void Send(const v8_inspector::StringView& string) {
3768 int length = static_cast<int>(string.length());
3771 (string.is8Bit()
3774 reinterpret_cast<const uint8_t*>(string.characters8()),
3778 reinterpret_cast<const uint16_t*>(string.characters16()),
4388 // Convert utf-16 encoded string to utf-8 encoded.
4651 " d8 [options] [-e <string>] [--shell] [[--module|--web-snapshot]"
4653 " -e execute a string in V8\n"