|
IDL: Drop value conversion (V8 -> C++) macros from generated code
Instead of using an ever growing set of per-type-and-situation macros
to perform the conversion from V8 value to C++ value (e.g. for method
arguments and in attribute setters), just generate regular C++ code
that does the same job. In many cases, this leads to roughly the same
amount of code, and is arguable easier to read unless one is very
familiar with all the different macros and their definitions.
Technically, the v8_types.v8_value_to_local_cpp_value() function now
returns a small template context dictionary instead of a "single-
expression" string, and a new template macro is used to generate the
multi-line conversion code using this context.
All now unused macros in V8BindingMacros.h are removed. The remaining
macros are used from custom bindings code, which will be rewritten to
not use them too and thus better match the corresponding generated
code. (There was already a fair amount of mismatch between the two.)
BUG=
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=190816
Total comments: 9
Total comments: 6
Total comments: 4
Total comments: 10
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1518 lines, -653 lines) |
Patch |
 |
M |
Source/bindings/core/v8/V8BindingMacros.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
3 chunks |
+6 lines, -83 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/core/v8/V8StringResource.h
|
View
|
1
2
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/scripts/v8_attributes.py
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/scripts/v8_dictionary.py
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/scripts/v8_interface.py
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/scripts/v8_methods.py
|
View
|
1
2
3
|
3 chunks |
+19 lines, -21 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/scripts/v8_types.py
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+42 lines, -39 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/scripts/v8_union.py
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/templates/attributes.cpp
|
View
|
1
2
3
|
4 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
A |
Source/bindings/templates/conversions.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+31 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/templates/dictionary_v8.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
3 chunks |
+4 lines, -7 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/templates/interface.cpp
|
View
|
1
2
3
4
5
6
7
8
|
4 chunks |
+10 lines, -4 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/templates/methods.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
18 chunks |
+44 lines, -38 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/templates/templates.gni
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/templates/templates.gypi
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/templates/union.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
7 chunks |
+7 lines, -9 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/UnionTypesCore.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
11 chunks |
+54 lines, -18 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8SVGTestInterface.cpp
|
View
|
1
2
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestDictionary.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
13 chunks |
+39 lines, -13 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestDictionaryDerived.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestInterface.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
37 chunks |
+119 lines, -40 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestInterface2.cpp
|
View
|
1
2
3
4
5
6
7
8
|
8 chunks |
+22 lines, -8 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestInterface3.cpp
|
View
|
1
2
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp
|
View
|
1
2
|
2 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp
|
View
|
1
2
|
6 chunks |
+39 lines, -13 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp
|
View
|
1
2
|
6 chunks |
+24 lines, -8 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestInterfaceConstructor3.cpp
|
View
|
1
2
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestInterfaceConstructor4.cpp
|
View
|
1
2
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestInterfaceEventConstructor.cpp
|
View
|
1
2
3
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestInterfaceEventInit.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+6 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp
|
View
|
1
2
|
5 chunks |
+13 lines, -5 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp
|
View
|
1
2
|
2 chunks |
+15 lines, -5 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.cpp
|
View
|
1
2
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
|
View
|
1
2
|
3 chunks |
+9 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestInterfaceWillBeGarbageCollected.cpp
|
View
|
1
2
|
2 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestNode.cpp
|
View
|
1
2
|
4 chunks |
+12 lines, -4 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestObject.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
256 chunks |
+823 lines, -270 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestSpecialOperations.cpp
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/core/V8TestTypedefs.cpp
|
View
|
1
2
|
7 chunks |
+24 lines, -8 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/modules/UnionTypesModules.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/modules/V8TestInterface5.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
15 chunks |
+52 lines, -18 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
|
View
|
1
2
|
11 chunks |
+36 lines, -9 lines |
0 comments
|
Download
|
Total messages: 33 (3 generated)
|