Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: compiled/bindings/generator.cpp

Issue 29426559: Issue 5137 - [emscripten] Added basic filter storage implementation (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Left Patch Set: Rebased, updated copyright year Created Aug. 22, 2017, 11:03 a.m.
Right Patch Set: Fixed bogus assert Created Aug. 31, 2017, 12:44 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « compiled/bindings/generator.h ('k') | compiled/bindings/main.cpp » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 case TypeCategory::INT64: 222 case TypeCategory::INT64:
223 return " var result = Runtime.makeBigInt(" + call_str + ", " + 223 return " var result = Runtime.makeBigInt(" + call_str + ", " +
224 "Runtime.getTempRet0(), " + 224 "Runtime.getTempRet0(), " +
225 "true);\n"; 225 "true);\n";
226 case TypeCategory::DEPENDENT_STRING: 226 case TypeCategory::DEPENDENT_STRING:
227 { 227 {
228 std::string result; 228 std::string result;
229 result += " var string = createString();\n"; 229 result += " var string = createString();\n";
230 result += " " + call_str + ";\n"; 230 result += " " + call_str + ";\n";
231 result += " var result = readString(string);\n"; 231 result += " var result = readString(string);\n";
232 // We don't call a destructor here because we know that dependent
233 // strings don't need to clean up.
232 return result; 234 return result;
233 } 235 }
234 case TypeCategory::OWNED_STRING: 236 case TypeCategory::OWNED_STRING:
235 { 237 {
236 std::string result; 238 std::string result;
237 result += " var string = createOwnedString();\n"; 239 result += " var string = createOwnedString();\n";
238 result += " " + call_str + ";\n"; 240 result += " " + call_str + ";\n";
239 result += " var result = readString(string);\n"; 241 result += " var result = readString(string);\n";
240 result += " Module._DestroyString(string);\n"; 242 result += " Module._DestroyString(string);\n";
241 return result; 243 return result;
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 478
477 void printBindings() 479 void printBindings()
478 { 480 {
479 bindings_internal::printHelpers(); 481 bindings_internal::printHelpers();
480 482
481 for (const auto& cls : classes) 483 for (const auto& cls : classes)
482 bindings_internal::printClass(cls); 484 bindings_internal::printClass(cls);
483 for (const auto& cls : classes) 485 for (const auto& cls : classes)
484 bindings_internal::printClassMapping(cls); 486 bindings_internal::printClassMapping(cls);
485 } 487 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld