| 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 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1098 PrintIndented("\""); | 1098 PrintIndented("\""); |
| 1099 } else { | 1099 } else { |
| 1100 Print("\""); | 1100 Print("\""); |
| 1101 } | 1101 } |
| 1102 Print("%s\":", name); | 1102 Print("%s\":", name); |
| 1103 attributes()->use(); | 1103 attributes()->use(); |
| 1104 } | 1104 } |
| 1105 | 1105 |
| 1106 | 1106 |
| 1107 void JsonAstBuilder::AddAttribute(const char* name, Handle<String> value) { | 1107 void JsonAstBuilder::AddAttribute(const char* name, Handle<String> value) { |
| 1108 SmartPointer<char> value_string = value->ToCString(); | 1108 SmartArrayPointer<char> value_string = value->ToCString(); |
| 1109 AddAttributePrefix(name); | 1109 AddAttributePrefix(name); |
| 1110 Print("\"%s\"", *value_string); | 1110 Print("\"%s\"", *value_string); |
| 1111 } | 1111 } |
| 1112 | 1112 |
| 1113 | 1113 |
| 1114 void JsonAstBuilder::AddAttribute(const char* name, const char* value) { | 1114 void JsonAstBuilder::AddAttribute(const char* name, const char* value) { |
| 1115 AddAttributePrefix(name); | 1115 AddAttributePrefix(name); |
| 1116 Print("\"%s\"", value); | 1116 Print("\"%s\"", value); |
| 1117 } | 1117 } |
| 1118 | 1118 |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1429 AddAttribute("mode", Variable::Mode2String(decl->mode())); | 1429 AddAttribute("mode", Variable::Mode2String(decl->mode())); |
| 1430 } | 1430 } |
| 1431 Visit(decl->proxy()); | 1431 Visit(decl->proxy()); |
| 1432 if (decl->fun() != NULL) Visit(decl->fun()); | 1432 if (decl->fun() != NULL) Visit(decl->fun()); |
| 1433 } | 1433 } |
| 1434 | 1434 |
| 1435 | 1435 |
| 1436 #endif // DEBUG | 1436 #endif // DEBUG |
| 1437 | 1437 |
| 1438 } } // namespace v8::internal | 1438 } } // namespace v8::internal |
| OLD | NEW |