28 #ifndef V8_FUNC_NAME_INFERRER_H_
29 #define V8_FUNC_NAME_INFERRER_H_
51 bool IsOpen()
const {
return !entries_stack_.is_empty(); }
58 entries_stack_.
Add(names_stack_.length(), zone());
69 funcs_to_infer_.Add(func_to_infer, zone());
74 if (
IsOpen() && !funcs_to_infer_.is_empty()) {
75 funcs_to_infer_.RemoveLast();
82 if (!funcs_to_infer_.is_empty()) {
83 InferFunctionsNames();
90 names_stack_.Rewind(entries_stack_.RemoveLast());
91 if (entries_stack_.is_empty())
92 funcs_to_infer_.Clear();
97 kEnclosingConstructorName,
102 Name(
Handle<String> name, NameType type) : name(name), type(type) { }
107 Isolate* isolate() {
return isolate_; }
108 Zone* zone()
const {
return zone_; }
111 Handle<String> MakeNameFromStack();
114 Handle<String> MakeNameFromStackHelper(
int pos, Handle<String> prev);
117 void InferFunctionsNames();
120 ZoneList<int> entries_stack_;
121 ZoneList<Name> names_stack_;
122 ZoneList<FunctionLiteral*> funcs_to_infer_;
131 #endif // V8_FUNC_NAME_INFERRER_H_
void PushVariableName(Handle< String > name)
FuncNameInferrer(Isolate *isolate, Zone *zone)
#define ASSERT(condition)
void RemoveLastFunction()
void PushEnclosingName(Handle< String > name)
void PushLiteralName(Handle< String > name)
void Add(const T &element, AllocationPolicy allocator=AllocationPolicy())
void AddFunction(FunctionLiteral *func_to_infer)