OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2013 The Native Client Authors. All rights reserved. | 3 # Copyright (c) 2013 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 baseline classes based on representations | 9 Responsible for generating baseline classes based on representations |
10 in the decoder table file armv7.table. | 10 in the decoder table file armv7.table. |
11 | 11 |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 of the row.""" | 381 of the row.""" |
382 action = row.action.copy() | 382 action = row.action.copy() |
383 return dgen_core.Row(list(row.patterns), _AddBaselineToAction(action)) | 383 return dgen_core.Row(list(row.patterns), _AddBaselineToAction(action)) |
384 | 384 |
385 def _AddBaselineToAction(action): | 385 def _AddBaselineToAction(action): |
386 action = action.copy() | 386 action = action.copy() |
387 if (isinstance(action, dgen_core.DecoderAction) and | 387 if (isinstance(action, dgen_core.DecoderAction) and |
388 dgen_decoder.ActionDefinesDecoder(action)): | 388 dgen_decoder.ActionDefinesDecoder(action)): |
389 action.define('baseline', BaselineName(action)) | 389 action.define('baseline', BaselineName(action)) |
390 return action | 390 return action |
OLD | NEW |