|
Create fewer local v8::TryCatch objects in generated bindings code
When converting constructor and method arguments, switch from generating
the equivalent of
float x;
{
v8::TryCatch block;
x = ...;
if (UNLIKELY(block.HasCaught()) {
block.ReThrow();
return;
}
}
float y;
{
v8::TryCatch block;
y = ...;
/* check result again, same as above */
}
to generating the equivalent of
float x;
float y;
{
v8::TryCatch block;
x = ...;
if (UNLIKELY(block.HasCaught()) {
block.ReThrow();
return;
}
y = ...;
/* check result again, same as above */
}
in order to avoid creating and destroying one v8::TryCatch object for each
argument.
This reduces the size of the final binary by about 20 kB (64-bit Linux) and
improves performance by up to 30 % on favorable micro-benchmarks (repeatedly
calling some DOM function that takes many primitive-typed arguments.)
R=haraken, nbarth
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=174546
Total comments: 22
Total comments: 17
Total comments: 1
Total comments: 1
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1156 lines, -414 lines) |
Patch |
|
M |
Source/bindings/scripts/v8_interface.py
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/bindings/scripts/v8_methods.py
|
View
|
1
2
3
4
5
6
7
8
9
10
|
6 chunks |
+31 lines, -10 lines |
0 comments
|
Download
|
|
M |
Source/bindings/scripts/v8_types.py
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
4 chunks |
+21 lines, -4 lines |
0 comments
|
Download
|
|
M |
Source/bindings/templates/methods.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
7 chunks |
+57 lines, -22 lines |
0 comments
|
Download
|
|
M |
Source/bindings/tests/results/V8TestInterface.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
6 chunks |
+54 lines, -23 lines |
0 comments
|
Download
|
|
M |
Source/bindings/tests/results/V8TestInterface2.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
6 chunks |
+31 lines, -8 lines |
0 comments
|
Download
|
|
M |
Source/bindings/tests/results/V8TestInterfaceConstructor.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+30 lines, -17 lines |
0 comments
|
Download
|
|
M |
Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
3 chunks |
+40 lines, -22 lines |
0 comments
|
Download
|
|
M |
Source/bindings/tests/results/V8TestInterfaceConstructor3.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/bindings/tests/results/V8TestInterfaceGarbageCollected.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+9 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+21 lines, -12 lines |
0 comments
|
Download
|
|
M |
Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/bindings/tests/results/V8TestInterfaceNode.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+16 lines, -8 lines |
0 comments
|
Download
|
|
M |
Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+9 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/bindings/tests/results/V8TestObject.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
114 chunks |
+737 lines, -251 lines |
0 comments
|
Download
|
|
M |
Source/bindings/tests/results/V8TestSpecialOperations.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/bindings/tests/results/V8TestTypedefs.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
7 chunks |
+41 lines, -14 lines |
0 comments
|
Download
|
|
M |
Source/bindings/v8/V8BindingMacros.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
3 chunks |
+32 lines, -14 lines |
0 comments
|
Download
|
|
M |
Source/bindings/v8/V8StringResource.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+10 lines, -1 line |
0 comments
|
Download
|
Total messages: 53 (0 generated)
|