Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(714)

Side by Side Diff: src/trusted/validator_arm/dgen_test_output.py

Issue 12450015: **/*.py: use /usr/bin/env to find python Base URL: https://chromium.googlesource.com/native_client/src/native_client@master
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/trusted/validator_arm/dgen_output.py ('k') | src/trusted/validator_arm/generate_decoder.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 3 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 # 6 #
7 7
8 """ 8 """
9 Responsible for generating the testing decoders based on 9 Responsible for generating the testing decoders based on
10 parsed table representations. 10 parsed table representations.
11 """ 11 """
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 values, to its corresponding index. This is done to reduce the 1007 values, to its corresponding index. This is done to reduce the
1008 number of compares to find the index, speeding up code 1008 number of compares to find the index, speeding up code
1009 generation. 1009 generation.
1010 """ 1010 """
1011 lookup_map = {} 1011 lookup_map = {}
1012 index = 0 1012 index = 0
1013 for v in values: 1013 for v in values:
1014 lookup_map[dgen_core.neutral_repr(v)] = index 1014 lookup_map[dgen_core.neutral_repr(v)] = index
1015 index += 1 1015 index += 1
1016 return lookup_map 1016 return lookup_map
OLDNEW
« no previous file with comments | « src/trusted/validator_arm/dgen_output.py ('k') | src/trusted/validator_arm/generate_decoder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698