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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 static Handle<Code> MakeCode(FunctionLiteral* fun, | 45 static Handle<Code> MakeCode(FunctionLiteral* fun, |
46 Handle<Script> script, | 46 Handle<Script> script, |
47 bool is_eval); | 47 bool is_eval); |
48 | 48 |
49 void Generate(FunctionLiteral* fun); | 49 void Generate(FunctionLiteral* fun); |
50 | 50 |
51 private: | 51 private: |
52 int SlotOffset(Slot* slot); | 52 int SlotOffset(Slot* slot); |
53 | 53 |
54 void Move(Location destination, Register source); | 54 void Move(Expression::Context destination, Register source); |
55 void Move(Location destination, Slot* source); | 55 void Move(Expression::Context destination, Slot* source); |
56 void Move(Location destination, Literal* source); | 56 void Move(Expression::Context destination, Literal* source); |
57 | |
58 void Move(Register destination, Location source); | |
59 void Move(Slot* destination, Location source); | |
60 | 57 |
61 // Drop the TOS, and store source to destination. | 58 // Drop the TOS, and store source to destination. |
62 // If destination is TOS, just overwrite TOS with source. | 59 // If destination is TOS, just overwrite TOS with source. |
63 void DropAndMove(Location destination, Register source); | 60 void DropAndMove(Expression::Context destination, Register source); |
64 | 61 |
65 void VisitDeclarations(ZoneList<Declaration*>* declarations); | 62 void VisitDeclarations(ZoneList<Declaration*>* declarations); |
66 Handle<JSFunction> BuildBoilerplate(FunctionLiteral* fun); | 63 Handle<JSFunction> BuildBoilerplate(FunctionLiteral* fun); |
67 void DeclareGlobals(Handle<FixedArray> pairs); | 64 void DeclareGlobals(Handle<FixedArray> pairs); |
68 | 65 |
69 void SetFunctionPosition(FunctionLiteral* fun); | 66 void SetFunctionPosition(FunctionLiteral* fun); |
70 void SetReturnPosition(FunctionLiteral* fun); | 67 void SetReturnPosition(FunctionLiteral* fun); |
71 void SetStatementPosition(Statement* stmt); | 68 void SetStatementPosition(Statement* stmt); |
72 void SetSourcePosition(int pos); | 69 void SetSourcePosition(int pos); |
73 | 70 |
(...skipping 10 matching lines...) Expand all Loading... |
84 Handle<Script> script_; | 81 Handle<Script> script_; |
85 bool is_eval_; | 82 bool is_eval_; |
86 | 83 |
87 DISALLOW_COPY_AND_ASSIGN(FastCodeGenerator); | 84 DISALLOW_COPY_AND_ASSIGN(FastCodeGenerator); |
88 }; | 85 }; |
89 | 86 |
90 | 87 |
91 } } // namespace v8::internal | 88 } } // namespace v8::internal |
92 | 89 |
93 #endif // V8_FAST_CODEGEN_H_ | 90 #endif // V8_FAST_CODEGEN_H_ |
OLD | NEW |