OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 static bool RecordPositions(MacroAssembler* masm, | 107 static bool RecordPositions(MacroAssembler* masm, |
108 int pos, | 108 int pos, |
109 bool right_here = false); | 109 bool right_here = false); |
110 | 110 |
111 private: | 111 private: |
112 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 112 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
113 }; | 113 }; |
114 | 114 |
115 | 115 |
116 // Results of the library implementation of transcendental functions may differ | |
117 // from the one we use in our generated code. Therefore we use the same | |
118 // generated code both in runtime and compiled code. | |
119 typedef double (*UnaryMathFunction)(double x); | |
120 | |
121 UnaryMathFunction CreateExpFunction(); | |
122 UnaryMathFunction CreateSqrtFunction(); | |
123 | |
124 | |
125 class ElementsTransitionGenerator : public AllStatic { | 116 class ElementsTransitionGenerator : public AllStatic { |
126 public: | 117 public: |
127 // If |mode| is set to DONT_TRACK_ALLOCATION_SITE, | 118 // If |mode| is set to DONT_TRACK_ALLOCATION_SITE, |
128 // |allocation_memento_found| may be NULL. | 119 // |allocation_memento_found| may be NULL. |
129 static void GenerateMapChangeElementsTransition(MacroAssembler* masm, | 120 static void GenerateMapChangeElementsTransition(MacroAssembler* masm, |
130 AllocationSiteMode mode, | 121 AllocationSiteMode mode, |
131 Label* allocation_memento_found); | 122 Label* allocation_memento_found); |
132 static void GenerateSmiToDouble(MacroAssembler* masm, | 123 static void GenerateSmiToDouble(MacroAssembler* masm, |
133 AllocationSiteMode mode, | 124 AllocationSiteMode mode, |
134 Label* fail); | 125 Label* fail); |
135 static void GenerateDoubleToObject(MacroAssembler* masm, | 126 static void GenerateDoubleToObject(MacroAssembler* masm, |
136 AllocationSiteMode mode, | 127 AllocationSiteMode mode, |
137 Label* fail); | 128 Label* fail); |
138 | 129 |
139 private: | 130 private: |
140 DISALLOW_COPY_AND_ASSIGN(ElementsTransitionGenerator); | 131 DISALLOW_COPY_AND_ASSIGN(ElementsTransitionGenerator); |
141 }; | 132 }; |
142 | 133 |
143 static const int kNumberDictionaryProbes = 4; | 134 static const int kNumberDictionaryProbes = 4; |
144 | 135 |
145 | 136 |
146 } } // namespace v8::internal | 137 } } // namespace v8::internal |
147 | 138 |
148 #endif // V8_CODEGEN_H_ | 139 #endif // V8_CODEGEN_H_ |
OLD | NEW |