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

Side by Side Diff: compiled/shell.js

Issue 29333474: Issue 4125 - [emscripten] Convert filter classes to C++ (Closed)
Patch Set: Split up String class into two, cleaned up RegExpFilter methods Created Feb. 4, 2016, 7:20 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « compiled/intrusive_ptr.h ('k') | compiled/traceInit.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 "Compiled from https://hg.adblockplus.org/adblockplus/ with Emscripten {{{EMSCRI PTEN_VERSION}}}";
2
3 var FilterNotifier = require("filterNotifier").FilterNotifier;
4
5 var regexps =
6 {
7 _data: Object.create(null),
8 _counter: 0,
9
10 create: function(source, matchCase)
11 {
12 var id = ++this._counter;
13 try
14 {
15 this._data[id] = new RegExp(getStringData(source), matchCase ? "" : "i");
16 }
17 catch (e)
18 {
19 this._data[id] = String(e);
20 }
21 return id;
22 },
23
24 getErrorLength: function(id)
25 {
26 if (typeof this._data[id] == "string")
27 return this._data[id].length;
28 else
29 return -1;
30 },
31
32 getError: function(id, buffer)
33 {
34 if (typeof this._data[id] == "string")
35 {
36 copyString(this._data[id], buffer);
37 delete this._data[id];
38 }
39 },
40
41 delete: function(id)
42 {
43 delete this._data[id];
44 },
45
46 test: function(id, str)
47 {
48 return this._data[id].test(getStringData(str));
49 }
50 };
51
52 var Module =
53 {
54 preRun: [],
55 postRun: [],
56 print: console.log.bind(console),
57 printErr: console.error.bind(console),
58
59 getMemoryLayout: function()
60 {
61 return {
62 'static_base': STATIC_BASE,
63 'static_top': STATICTOP,
64 'stack_base': STACK_BASE,
65 'stack_top': STACKTOP,
66 'stack_max': STACK_MAX,
67 'dynamic_base': DYNAMIC_BASE,
68 'dynamic_top': DYNAMICTOP,
69 'total_memory': TOTAL_MEMORY
70 };
71 }
72 };
73 var ENVIRONMENT_IS_WEB = false, ENVIRONMENT_IS_NODE = false,
74 ENVIRONMENT_IS_WORKER = false, ENVIRONMENT_IS_SHELL = true;
75
76 {{BODY}}
77
78 Object.assign(exports, Module);
OLDNEW
« no previous file with comments | « compiled/intrusive_ptr.h ('k') | compiled/traceInit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld