OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 : masm_(masm), function_(NULL) { | 42 : masm_(masm), function_(NULL) { |
43 } | 43 } |
44 | 44 |
45 static Handle<Code> MakeCode(FunctionLiteral* fun, Handle<Script> script); | 45 static Handle<Code> MakeCode(FunctionLiteral* fun, Handle<Script> script); |
46 | 46 |
47 void Generate(FunctionLiteral* fun); | 47 void Generate(FunctionLiteral* fun); |
48 | 48 |
49 private: | 49 private: |
50 int SlotOffset(Slot* slot); | 50 int SlotOffset(Slot* slot); |
51 | 51 |
| 52 void SetFunctionPosition(FunctionLiteral* fun); |
| 53 void SetReturnPosition(FunctionLiteral* fun); |
| 54 void SetStatementPosition(Statement* stmt); |
| 55 void SetSourcePosition(int pos); |
| 56 |
52 // AST node visit functions. | 57 // AST node visit functions. |
53 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); | 58 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); |
54 AST_NODE_LIST(DECLARE_VISIT) | 59 AST_NODE_LIST(DECLARE_VISIT) |
55 #undef DECLARE_VISIT | 60 #undef DECLARE_VISIT |
56 | 61 |
57 MacroAssembler* masm_; | 62 MacroAssembler* masm_; |
58 FunctionLiteral* function_; | 63 FunctionLiteral* function_; |
59 | 64 |
60 DISALLOW_COPY_AND_ASSIGN(FastCodeGenerator); | 65 DISALLOW_COPY_AND_ASSIGN(FastCodeGenerator); |
61 }; | 66 }; |
62 | 67 |
63 | 68 |
64 } } // namespace v8::internal | 69 } } // namespace v8::internal |
65 | 70 |
66 #endif // V8_FAST_CODEGEN_H_ | 71 #endif // V8_FAST_CODEGEN_H_ |
OLD | NEW |