| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 } | 793 } |
| 794 | 794 |
| 795 | 795 |
| 796 static void Indent(int n, const char* str) { | 796 static void Indent(int n, const char* str) { |
| 797 PrintF("%*s%s", n, "", str); | 797 PrintF("%*s%s", n, "", str); |
| 798 } | 798 } |
| 799 | 799 |
| 800 | 800 |
| 801 static void PrintName(Handle<String> name) { | 801 static void PrintName(Handle<String> name) { |
| 802 SmartArrayPointer<char> s = name->ToCString(DISALLOW_NULLS); | 802 SmartArrayPointer<char> s = name->ToCString(DISALLOW_NULLS); |
| 803 PrintF("%s", *s); | 803 PrintF("%s", s.get()); |
| 804 } | 804 } |
| 805 | 805 |
| 806 | 806 |
| 807 static void PrintLocation(Variable* var) { | 807 static void PrintLocation(Variable* var) { |
| 808 switch (var->location()) { | 808 switch (var->location()) { |
| 809 case Variable::UNALLOCATED: | 809 case Variable::UNALLOCATED: |
| 810 break; | 810 break; |
| 811 case Variable::PARAMETER: | 811 case Variable::PARAMETER: |
| 812 PrintF("parameter[%d]", var->index()); | 812 PrintF("parameter[%d]", var->index()); |
| 813 break; | 813 break; |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1405 } | 1405 } |
| 1406 | 1406 |
| 1407 | 1407 |
| 1408 int Scope::ContextLocalCount() const { | 1408 int Scope::ContextLocalCount() const { |
| 1409 if (num_heap_slots() == 0) return 0; | 1409 if (num_heap_slots() == 0) return 0; |
| 1410 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - | 1410 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - |
| 1411 (function_ != NULL && function_->proxy()->var()->IsContextSlot() ? 1 : 0); | 1411 (function_ != NULL && function_->proxy()->var()->IsContextSlot() ? 1 : 0); |
| 1412 } | 1412 } |
| 1413 | 1413 |
| 1414 } } // namespace v8::internal | 1414 } } // namespace v8::internal |
| OLD | NEW |