| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 InferFunctionsNames(); | 75 InferFunctionsNames(); |
| 76 } | 76 } |
| 77 names_stack_.Rewind(entries_stack_.RemoveLast()); | 77 names_stack_.Rewind(entries_stack_.RemoveLast()); |
| 78 } | 78 } |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 Handle<String> MakeNameFromStack(); | 81 Handle<String> MakeNameFromStack(); |
| 82 Handle<String> MakeNameFromStackHelper(int pos, Handle<String> prev); | 82 Handle<String> MakeNameFromStackHelper(int pos, Handle<String> prev); |
| 83 void InferFunctionsNames(); | 83 void InferFunctionsNames(); |
| 84 | 84 |
| 85 List<int> entries_stack_; | 85 ZoneList<int> entries_stack_; |
| 86 List<Handle<String> > names_stack_; | 86 ZoneList<Handle<String> > names_stack_; |
| 87 List<FunctionLiteral*> funcs_to_infer_; | 87 ZoneList<FunctionLiteral*> funcs_to_infer_; |
| 88 Handle<String> dot_; | 88 Handle<String> dot_; |
| 89 | 89 |
| 90 DISALLOW_COPY_AND_ASSIGN(FuncNameInferrer); | 90 DISALLOW_COPY_AND_ASSIGN(FuncNameInferrer); |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 | 93 |
| 94 // A wrapper class that automatically calls InferAndLeave when | 94 // A wrapper class that automatically calls InferAndLeave when |
| 95 // leaving scope. | 95 // leaving scope. |
| 96 class ScopedFuncNameInferrer BASE_EMBEDDED { | 96 class ScopedFuncNameInferrer BASE_EMBEDDED { |
| 97 public: | 97 public: |
| (...skipping 15 matching lines...) Expand all Loading... |
| 113 FuncNameInferrer* inferrer_; | 113 FuncNameInferrer* inferrer_; |
| 114 bool is_entered_; | 114 bool is_entered_; |
| 115 | 115 |
| 116 DISALLOW_COPY_AND_ASSIGN(ScopedFuncNameInferrer); | 116 DISALLOW_COPY_AND_ASSIGN(ScopedFuncNameInferrer); |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 | 119 |
| 120 } } // namespace v8::internal | 120 } } // namespace v8::internal |
| 121 | 121 |
| 122 #endif // V8_FUNC_NAME_INFERRER_H_ | 122 #endif // V8_FUNC_NAME_INFERRER_H_ |
| OLD | NEW |