Commit 78537344 authored by Hitoshi Yoshida's avatar Hitoshi Yoshida Committed by Commit Bot

CodeGen: (Clean-up) Make function names consistent

'dict_' is commonly used in dictionary.py, but it's obvious the file
focuses on dictionary classes.  This CL drops the redundant common
prefix.
Plus, make it consistent, put 'dict_' prefix on 'member' in function
names.  This change makes it clear "dict_member" figures dictionary
members from the scope of *public* functions.


Bug: 839389
Change-Id: I0e8662c323c0dce5a4edfc70d39966434aebb6f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1933853Reviewed-by: default avatarYuki Shiino <yukishiino@chromium.org>
Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718549}
parent d493dead
......@@ -93,7 +93,7 @@ def make_dict_member_set_def(cg_context):
return func_def
def make_dict_fill_with_members_def(cg_context):
def make_fill_with_dict_members_def(cg_context):
assert isinstance(cg_context, CodeGenContext)
T = TextNode
......@@ -128,7 +128,7 @@ def make_dict_fill_with_members_def(cg_context):
return func_def
def make_dict_fill_with_own_members_def(cg_context):
def make_fill_with_own_dict_members_def(cg_context):
assert isinstance(cg_context, CodeGenContext)
T = TextNode
......@@ -190,8 +190,8 @@ def generate_dictionaries(web_idl_database, output_dirs):
code_node = SymbolScopeNode()
code_node.append(make_dict_fill_with_members_def(cg_context))
code_node.append(make_dict_fill_with_own_members_def(cg_context))
code_node.append(make_fill_with_dict_members_def(cg_context))
code_node.append(make_fill_with_own_dict_members_def(cg_context))
for member in sorted(dictionary.own_members, key=lambda x: x.identifier):
code_node.extend([
make_dict_member_get_def(cg_context.make_copy(dict_member=member)),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment