Source code refactoring. Extracted common functionality in cpp_helpers.c...#128
Source code refactoring. Extracted common functionality in cpp_helpers.c...#128xfxyjwf merged 6 commits intoprotocolbuffers:masterfrom
Conversation
…s.cc and python/python_generator.cc
|
CLAs look good, thanks! |
There was a problem hiding this comment.
Please revert changes to this file. I don't think this refactoring helps.
|
Implemented the feedback. Hope we can land it now. Anyway could I ask you feedback on the merge which you wanted to revert. I am collecting data on the duplication my tool detects and the merges it performs. Did you want it reverted because it was a bad detection or because it doesn't help readability of the Google developers. |
There was a problem hiding this comment.
Move this "printer_->Indent()" to PrintServiceClass() and PrintServiceStub().
|
On Wed, Dec 10, 2014 at 10:48 PM, krishnanm86 notifications@github.com
|
…printserviceclass in python generator
|
Done. |
Source code refactoring. Extracted common functionality in cpp_helpers.c...
* Fix json ignore unknown Previously, there were several problems with ignoring unknown in json. 1) After finding a field is unknown, the parser's state is not changed. Thus, there is no way to distinguish whether the parser is dealing with an unknown field or it's just a top level message. 2) Several method didn't respect unknown field, e.g., start_object, end_bool, start_array. * Update json parser size * Update json parser size
Before, every charAt would emit (on android):
```
0x00002104 adrp x17, #+0x1000 (addr 0x3000)
0x00002108 ldr w17, [x17, #20]
0x0000210c ldr x0, [x0, #128]
0x00002110 ldr x0, [x0, #328]
0x00002114 ldr lr, [x0, #24]
0x00002118 blr lr <-- Call into String.charAt(int)
```
Now, it emits the inlined implementation of charAt (branch is for possibly compressed strings):
```
0x000020b4 ldur w16, [x4, #-8]
0x000020b8 tbnz w16, #0, #+0xc (addr 0x20c4)
0x000020bc ldrb w4, [x4, x0]
0x000020c0 b #+0x8 (addr 0x20c8)
0x000020c4 ldrh w4, [x4, x0, lsl #1]
```
PiperOrigin-RevId: 590821750
Before, every charAt would emit (on android):
```
0x00002104 adrp x17, #+0x1000 (addr 0x3000)
0x00002108 ldr w17, [x17, #20]
0x0000210c ldr x0, [x0, #128]
0x00002110 ldr x0, [x0, #328]
0x00002114 ldr lr, [x0, #24]
0x00002118 blr lr <-- Call into String.charAt(int)
```
Now, it emits the inlined implementation of charAt (branch is for possibly compressed strings):
```
0x000020b4 ldur w16, [x4, #-8]
0x000020b8 tbnz w16, #0, #+0xc (addr 0x20c4)
0x000020bc ldrb w4, [x4, x0]
0x000020c0 b #+0x8 (addr 0x20c8)
0x000020c4 ldrh w4, [x4, x0, lsl #1]
```
PiperOrigin-RevId: 590821750
Before, every charAt would emit (on android):
```
0x00002104 adrp x17, #+0x1000 (addr 0x3000)
0x00002108 ldr w17, [x17, #20]
0x0000210c ldr x0, [x0, #128]
0x00002110 ldr x0, [x0, #328]
0x00002114 ldr lr, [x0, #24]
0x00002118 blr lr <-- Call into String.charAt(int)
```
Now, it emits the inlined implementation of charAt (branch is for possibly compressed strings):
```
0x000020b4 ldur w16, [x4, #-8]
0x000020b8 tbnz w16, #0, #+0xc (addr 0x20c4)
0x000020bc ldrb w4, [x4, x0]
0x000020c0 b #+0x8 (addr 0x20c8)
0x000020c4 ldrh w4, [x4, x0, lsl #1]
```
PiperOrigin-RevId: 591147406
...c and python/python_generator.cc