| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 namespace v8 { | 34 namespace v8 { |
| 35 namespace internal { | 35 namespace internal { |
| 36 | 36 |
| 37 // ---------------------------------------------------------------------------- | 37 // ---------------------------------------------------------------------------- |
| 38 // Implementation Variable. | 38 // Implementation Variable. |
| 39 | 39 |
| 40 const char* Variable::Mode2String(VariableMode mode) { | 40 const char* Variable::Mode2String(VariableMode mode) { |
| 41 switch (mode) { | 41 switch (mode) { |
| 42 case VAR: return "VAR"; | 42 case VAR: return "VAR"; |
| 43 case CONST_LEGACY: return "CONST_LEGACY"; |
| 44 case LET: return "LET"; |
| 43 case CONST: return "CONST"; | 45 case CONST: return "CONST"; |
| 44 case LET: return "LET"; | |
| 45 case CONST_HARMONY: return "CONST_HARMONY"; | |
| 46 case MODULE: return "MODULE"; | 46 case MODULE: return "MODULE"; |
| 47 case DYNAMIC: return "DYNAMIC"; | 47 case DYNAMIC: return "DYNAMIC"; |
| 48 case DYNAMIC_GLOBAL: return "DYNAMIC_GLOBAL"; | 48 case DYNAMIC_GLOBAL: return "DYNAMIC_GLOBAL"; |
| 49 case DYNAMIC_LOCAL: return "DYNAMIC_LOCAL"; | 49 case DYNAMIC_LOCAL: return "DYNAMIC_LOCAL"; |
| 50 case INTERNAL: return "INTERNAL"; | 50 case INTERNAL: return "INTERNAL"; |
| 51 case TEMPORARY: return "TEMPORARY"; | 51 case TEMPORARY: return "TEMPORARY"; |
| 52 } | 52 } |
| 53 UNREACHABLE(); | 53 UNREACHABLE(); |
| 54 return NULL; | 54 return NULL; |
| 55 } | 55 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 | 93 |
| 94 int Variable::CompareIndex(Variable* const* v, Variable* const* w) { | 94 int Variable::CompareIndex(Variable* const* v, Variable* const* w) { |
| 95 int x = (*v)->index(); | 95 int x = (*v)->index(); |
| 96 int y = (*w)->index(); | 96 int y = (*w)->index(); |
| 97 // Consider sorting them according to type as well? | 97 // Consider sorting them according to type as well? |
| 98 return x - y; | 98 return x - y; |
| 99 } | 99 } |
| 100 | 100 |
| 101 } } // namespace v8::internal | 101 } } // namespace v8::internal |
| OLD | NEW |