Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(850)

Side by Side Diff: src/fast-codegen.h

Issue 405033: Fast-codegen: Arguments object working on all platforms. (Closed)
Patch Set: Addressed review coments. Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 50
51 static Handle<Code> MakeCode(FunctionLiteral* fun, 51 static Handle<Code> MakeCode(FunctionLiteral* fun,
52 Handle<Script> script, 52 Handle<Script> script,
53 bool is_eval); 53 bool is_eval);
54 54
55 void Generate(FunctionLiteral* fun); 55 void Generate(FunctionLiteral* fun);
56 56
57 private: 57 private:
58 int SlotOffset(Slot* slot); 58 int SlotOffset(Slot* slot);
59 void Move(Expression::Context destination, Register source);
60 void Move(Expression::Context destination, Slot* source, Register scratch);
61 void Move(Expression::Context destination, Literal* source);
62 void Move(Slot* dst, Register source, Register scratch1, Register scratch2);
63 void Move(Register dst, Slot* source);
59 64
60 void Move(Expression::Context destination, Register source); 65 // Templated to allow for Operand on intel and MemOperand on ARM.
61 void Move(Expression::Context destination, Slot* source); 66 template <typename MemoryLocation>
62 void Move(Expression::Context destination, Literal* source); 67 MemoryLocation CreateSlotOperand(Slot* slot, Register scratch);
63 68
64 // Drop the TOS, and store source to destination. 69 // Drop the TOS, and store source to destination.
65 // If destination is TOS, just overwrite TOS with source. 70 // If destination is TOS, just overwrite TOS with source.
66 void DropAndMove(Expression::Context destination, Register source); 71 void DropAndMove(Expression::Context destination,
72 Register source,
73 int drop_count = 1);
67 74
68 // Test the JavaScript value in source as if in a test context, compile 75 // Test the JavaScript value in source as if in a test context, compile
69 // control flow to a pair of labels. 76 // control flow to a pair of labels.
70 void TestAndBranch(Register source, Label* true_label, Label* false_label); 77 void TestAndBranch(Register source, Label* true_label, Label* false_label);
71 78
72 void VisitDeclarations(ZoneList<Declaration*>* declarations); 79 void VisitDeclarations(ZoneList<Declaration*>* declarations);
73 void DeclareGlobals(Handle<FixedArray> pairs); 80 void DeclareGlobals(Handle<FixedArray> pairs);
74 81
75 // Platform-specific return sequence 82 // Platform-specific return sequence
76 void EmitReturnSequence(int position); 83 void EmitReturnSequence(int position);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 Label* true_label_; 130 Label* true_label_;
124 Label* false_label_; 131 Label* false_label_;
125 132
126 DISALLOW_COPY_AND_ASSIGN(FastCodeGenerator); 133 DISALLOW_COPY_AND_ASSIGN(FastCodeGenerator);
127 }; 134 };
128 135
129 136
130 } } // namespace v8::internal 137 } } // namespace v8::internal
131 138
132 #endif // V8_FAST_CODEGEN_H_ 139 #endif // V8_FAST_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/ia32/fast-codegen-ia32.cc » ('j') | src/ia32/fast-codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698