Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source code refactoring. Extracted common functionality in cpp_helpers.c... #128

Merged
merged 6 commits into from Dec 12, 2014

Conversation

krishnanm86
Copy link

...c and python/python_generator.cc

@googlebot
Copy link

CLAs look good, thanks!

@@ -360,21 +360,31 @@ string FilenameIdentifier(const string& filename) {
return result;
}


string GlobalSymbolName(const string& filename, string prefix)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert changes to this file. I don't think this refactoring helps.

@krishnanm86
Copy link
Author

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.

"'$class_name$', (_service.Service,), dict(\n",
"class_name", descriptor.name());

void Generator::PrintDescriptorKeyAndModuleName(const ServiceDescriptor& descriptor) const {
printer_->Indent();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this "printer_->Indent()" to PrintServiceClass() and PrintServiceStub().

@xiaofeng-gg
Copy link

On Wed, Dec 10, 2014 at 10:48 PM, krishnanm86 notifications@github.com
wrote:

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.

Because it doesn't help the code's readability.


Reply to this email directly or view it on GitHub
#128 (comment).

@krishnanm86
Copy link
Author

Done.

xfxyjwf added a commit that referenced this pull request Dec 12, 2014
Source code refactoring. Extracted common functionality in cpp_helpers.c...
@xfxyjwf xfxyjwf merged commit f473bb9 into protocolbuffers:master Dec 12, 2014
TeBoring added a commit to TeBoring/protobuf that referenced this pull request Jan 19, 2019
* 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
copybara-service bot pushed a commit that referenced this pull request Dec 14, 2023
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
copybara-service bot pushed a commit that referenced this pull request Dec 15, 2023
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
copybara-service bot pushed a commit that referenced this pull request Dec 15, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants