• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are
4 // met:
5 //
6 //     * Redistributions of source code must retain the above copyright
7 //       notice, this list of conditions and the following disclaimer.
8 //     * Redistributions in binary form must reproduce the above
9 //       copyright notice, this list of conditions and the following
10 //       disclaimer in the documentation and/or other materials provided
11 //       with the distribution.
12 //     * Neither the name of Google Inc. nor the names of its
13 //       contributors may be used to endorse or promote products derived
14 //       from this software without specific prior written permission.
15 //
16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 
28 #include "v8.h"
29 
30 #include "ic-inl.h"
31 #include "codegen-inl.h"
32 #include "stub-cache.h"
33 
34 namespace v8 {
35 namespace internal {
36 
37 #define __ ACCESS_MASM(masm)
38 
39 
GenerateProbe(MacroAssembler * masm,Code::Flags flags,Register receiver,Register name,Register scratch,Register extra)40 void StubCache::GenerateProbe(MacroAssembler* masm,
41                               Code::Flags flags,
42                               Register receiver,
43                               Register name,
44                               Register scratch,
45                               Register extra) {
46   UNIMPLEMENTED_MIPS();
47 }
48 
49 
GenerateLoadGlobalFunctionPrototype(MacroAssembler * masm,int index,Register prototype)50 void StubCompiler::GenerateLoadGlobalFunctionPrototype(MacroAssembler* masm,
51                                                        int index,
52                                                        Register prototype) {
53   UNIMPLEMENTED_MIPS();
54 }
55 
56 
57 // Load a fast property out of a holder object (src). In-object properties
58 // are loaded directly otherwise the property is loaded from the properties
59 // fixed array.
GenerateFastPropertyLoad(MacroAssembler * masm,Register dst,Register src,JSObject * holder,int index)60 void StubCompiler::GenerateFastPropertyLoad(MacroAssembler* masm,
61                                             Register dst, Register src,
62                                             JSObject* holder, int index) {
63   UNIMPLEMENTED_MIPS();
64 }
65 
66 
GenerateLoadArrayLength(MacroAssembler * masm,Register receiver,Register scratch,Label * miss_label)67 void StubCompiler::GenerateLoadArrayLength(MacroAssembler* masm,
68                                            Register receiver,
69                                            Register scratch,
70                                            Label* miss_label) {
71   UNIMPLEMENTED_MIPS();
72 }
73 
74 
75 // Generate code to load the length from a string object and return the length.
76 // If the receiver object is not a string or a wrapped string object the
77 // execution continues at the miss label. The register containing the
78 // receiver is potentially clobbered.
GenerateLoadStringLength2(MacroAssembler * masm,Register receiver,Register scratch1,Register scratch2,Label * miss)79 void StubCompiler::GenerateLoadStringLength2(MacroAssembler* masm,
80                                              Register receiver,
81                                              Register scratch1,
82                                              Register scratch2,
83                                              Label* miss) {
84   UNIMPLEMENTED_MIPS();
85   __ break_(0x249);
86 }
87 
88 
GenerateLoadFunctionPrototype(MacroAssembler * masm,Register receiver,Register scratch1,Register scratch2,Label * miss_label)89 void StubCompiler::GenerateLoadFunctionPrototype(MacroAssembler* masm,
90                                                  Register receiver,
91                                                  Register scratch1,
92                                                  Register scratch2,
93                                                  Label* miss_label) {
94   UNIMPLEMENTED_MIPS();
95 }
96 
97 
98 // Generate StoreField code, value is passed in r0 register.
99 // After executing generated code, the receiver_reg and name_reg
100 // may be clobbered.
GenerateStoreField(MacroAssembler * masm,Builtins::Name storage_extend,JSObject * object,int index,Map * transition,Register receiver_reg,Register name_reg,Register scratch,Label * miss_label)101 void StubCompiler::GenerateStoreField(MacroAssembler* masm,
102                                       Builtins::Name storage_extend,
103                                       JSObject* object,
104                                       int index,
105                                       Map* transition,
106                                       Register receiver_reg,
107                                       Register name_reg,
108                                       Register scratch,
109                                       Label* miss_label) {
110   UNIMPLEMENTED_MIPS();
111 }
112 
113 
GenerateLoadMiss(MacroAssembler * masm,Code::Kind kind)114 void StubCompiler::GenerateLoadMiss(MacroAssembler* masm, Code::Kind kind) {
115   UNIMPLEMENTED_MIPS();
116 }
117 
118 
119 #undef __
120 #define __ ACCESS_MASM(masm())
121 
122 
CheckPrototypes(JSObject * object,Register object_reg,JSObject * holder,Register holder_reg,Register scratch,String * name,Label * miss)123 Register StubCompiler::CheckPrototypes(JSObject* object,
124                                        Register object_reg,
125                                        JSObject* holder,
126                                        Register holder_reg,
127                                        Register scratch,
128                                        String* name,
129                                        Label* miss) {
130   UNIMPLEMENTED_MIPS();
131   return at;    // UNIMPLEMENTED RETURN
132 }
133 
134 
GenerateLoadField(JSObject * object,JSObject * holder,Register receiver,Register scratch1,Register scratch2,int index,String * name,Label * miss)135 void StubCompiler::GenerateLoadField(JSObject* object,
136                                      JSObject* holder,
137                                      Register receiver,
138                                      Register scratch1,
139                                      Register scratch2,
140                                      int index,
141                                      String* name,
142                                      Label* miss) {
143   UNIMPLEMENTED_MIPS();
144 }
145 
146 
GenerateLoadConstant(JSObject * object,JSObject * holder,Register receiver,Register scratch1,Register scratch2,Object * value,String * name,Label * miss)147 void StubCompiler::GenerateLoadConstant(JSObject* object,
148                                         JSObject* holder,
149                                         Register receiver,
150                                         Register scratch1,
151                                         Register scratch2,
152                                         Object* value,
153                                         String* name,
154                                         Label* miss) {
155   UNIMPLEMENTED_MIPS();
156 }
157 
158 
GenerateLoadCallback(JSObject * object,JSObject * holder,Register receiver,Register name_reg,Register scratch1,Register scratch2,AccessorInfo * callback,String * name,Label * miss,Failure ** failure)159 bool StubCompiler::GenerateLoadCallback(JSObject* object,
160                                         JSObject* holder,
161                                         Register receiver,
162                                         Register name_reg,
163                                         Register scratch1,
164                                         Register scratch2,
165                                         AccessorInfo* callback,
166                                         String* name,
167                                         Label* miss,
168                                         Failure** failure) {
169   UNIMPLEMENTED_MIPS();
170   __ break_(0x470);
171   return false;   // UNIMPLEMENTED RETURN
172 }
173 
174 
GenerateLoadInterceptor(JSObject * object,JSObject * holder,LookupResult * lookup,Register receiver,Register name_reg,Register scratch1,Register scratch2,String * name,Label * miss)175 void StubCompiler::GenerateLoadInterceptor(JSObject* object,
176                                            JSObject* holder,
177                                            LookupResult* lookup,
178                                            Register receiver,
179                                            Register name_reg,
180                                            Register scratch1,
181                                            Register scratch2,
182                                            String* name,
183                                            Label* miss) {
184   UNIMPLEMENTED_MIPS();
185   __ break_(0x505);
186 }
187 
188 
CompileLazyCompile(Code::Flags flags)189 Object* StubCompiler::CompileLazyCompile(Code::Flags flags) {
190   UNIMPLEMENTED_MIPS();
191   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
192 }
193 
194 
CompileCallField(Object * object,JSObject * holder,int index,String * name)195 Object* CallStubCompiler::CompileCallField(Object* object,
196                                            JSObject* holder,
197                                            int index,
198                                            String* name) {
199   UNIMPLEMENTED_MIPS();
200   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
201 }
202 
203 
CompileCallConstant(Object * object,JSObject * holder,JSFunction * function,String * name,CheckType check)204 Object* CallStubCompiler::CompileCallConstant(Object* object,
205                                               JSObject* holder,
206                                               JSFunction* function,
207                                               String* name,
208                                               CheckType check) {
209   UNIMPLEMENTED_MIPS();
210   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
211 }
212 
213 
CompileCallInterceptor(Object * object,JSObject * holder,String * name)214 Object* CallStubCompiler::CompileCallInterceptor(Object* object,
215                                                  JSObject* holder,
216                                                  String* name) {
217   UNIMPLEMENTED_MIPS();
218   __ break_(0x782);
219   return GetCode(INTERCEPTOR, name);
220 }
221 
222 
CompileCallGlobal(JSObject * object,GlobalObject * holder,JSGlobalPropertyCell * cell,JSFunction * function,String * name)223 Object* CallStubCompiler::CompileCallGlobal(JSObject* object,
224                                             GlobalObject* holder,
225                                             JSGlobalPropertyCell* cell,
226                                             JSFunction* function,
227                                             String* name) {
228   UNIMPLEMENTED_MIPS();
229   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
230 }
231 
232 
CompileStoreField(JSObject * object,int index,Map * transition,String * name)233 Object* StoreStubCompiler::CompileStoreField(JSObject* object,
234                                              int index,
235                                              Map* transition,
236                                              String* name) {
237   UNIMPLEMENTED_MIPS();
238   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
239 }
240 
241 
CompileStoreCallback(JSObject * object,AccessorInfo * callback,String * name)242 Object* StoreStubCompiler::CompileStoreCallback(JSObject* object,
243                                                 AccessorInfo* callback,
244                                                 String* name) {
245   UNIMPLEMENTED_MIPS();
246   __ break_(0x906);
247   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
248 }
249 
250 
CompileStoreInterceptor(JSObject * receiver,String * name)251 Object* StoreStubCompiler::CompileStoreInterceptor(JSObject* receiver,
252                                                    String* name) {
253   UNIMPLEMENTED_MIPS();
254   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
255 }
256 
257 
CompileStoreGlobal(GlobalObject * object,JSGlobalPropertyCell * cell,String * name)258 Object* StoreStubCompiler::CompileStoreGlobal(GlobalObject* object,
259                                               JSGlobalPropertyCell* cell,
260                                               String* name) {
261   UNIMPLEMENTED_MIPS();
262   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
263 }
264 
265 
CompileLoadField(JSObject * object,JSObject * holder,int index,String * name)266 Object* LoadStubCompiler::CompileLoadField(JSObject* object,
267                                            JSObject* holder,
268                                            int index,
269                                            String* name) {
270   UNIMPLEMENTED_MIPS();
271   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
272 }
273 
274 
CompileLoadCallback(String * name,JSObject * object,JSObject * holder,AccessorInfo * callback)275 Object* LoadStubCompiler::CompileLoadCallback(String* name,
276                                               JSObject* object,
277                                               JSObject* holder,
278                                               AccessorInfo* callback) {
279   UNIMPLEMENTED_MIPS();
280   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
281 }
282 
283 
CompileLoadConstant(JSObject * object,JSObject * holder,Object * value,String * name)284 Object* LoadStubCompiler::CompileLoadConstant(JSObject* object,
285                                               JSObject* holder,
286                                               Object* value,
287                                               String* name) {
288   UNIMPLEMENTED_MIPS();
289   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
290 }
291 
292 
CompileLoadInterceptor(JSObject * object,JSObject * holder,String * name)293 Object* LoadStubCompiler::CompileLoadInterceptor(JSObject* object,
294                                                  JSObject* holder,
295                                                  String* name) {
296   UNIMPLEMENTED_MIPS();
297   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
298 }
299 
300 
CompileLoadGlobal(JSObject * object,GlobalObject * holder,JSGlobalPropertyCell * cell,String * name,bool is_dont_delete)301 Object* LoadStubCompiler::CompileLoadGlobal(JSObject* object,
302                                             GlobalObject* holder,
303                                             JSGlobalPropertyCell* cell,
304                                             String* name,
305                                             bool is_dont_delete) {
306   UNIMPLEMENTED_MIPS();
307   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
308 }
309 
310 
CompileLoadField(String * name,JSObject * receiver,JSObject * holder,int index)311 Object* KeyedLoadStubCompiler::CompileLoadField(String* name,
312                                                 JSObject* receiver,
313                                                 JSObject* holder,
314                                                 int index) {
315   UNIMPLEMENTED_MIPS();
316   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
317 }
318 
319 
CompileLoadCallback(String * name,JSObject * receiver,JSObject * holder,AccessorInfo * callback)320 Object* KeyedLoadStubCompiler::CompileLoadCallback(String* name,
321                                                    JSObject* receiver,
322                                                    JSObject* holder,
323                                                    AccessorInfo* callback) {
324   UNIMPLEMENTED_MIPS();
325   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
326 }
327 
328 
CompileLoadConstant(String * name,JSObject * receiver,JSObject * holder,Object * value)329 Object* KeyedLoadStubCompiler::CompileLoadConstant(String* name,
330                                                    JSObject* receiver,
331                                                    JSObject* holder,
332                                                    Object* value) {
333   UNIMPLEMENTED_MIPS();
334   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
335 }
336 
337 
CompileLoadInterceptor(JSObject * receiver,JSObject * holder,String * name)338 Object* KeyedLoadStubCompiler::CompileLoadInterceptor(JSObject* receiver,
339                                                       JSObject* holder,
340                                                       String* name) {
341   UNIMPLEMENTED_MIPS();
342   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
343 }
344 
345 
CompileLoadArrayLength(String * name)346 Object* KeyedLoadStubCompiler::CompileLoadArrayLength(String* name) {
347   UNIMPLEMENTED_MIPS();
348   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
349 }
350 
351 
CompileLoadStringLength(String * name)352 Object* KeyedLoadStubCompiler::CompileLoadStringLength(String* name) {
353   UNIMPLEMENTED_MIPS();
354   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
355 }
356 
357 
358 // TODO(1224671): implement the fast case.
CompileLoadFunctionPrototype(String * name)359 Object* KeyedLoadStubCompiler::CompileLoadFunctionPrototype(String* name) {
360   UNIMPLEMENTED_MIPS();
361   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
362 }
363 
364 
CompileStoreField(JSObject * object,int index,Map * transition,String * name)365 Object* KeyedStoreStubCompiler::CompileStoreField(JSObject* object,
366                                                   int index,
367                                                   Map* transition,
368                                                   String* name) {
369   UNIMPLEMENTED_MIPS();
370   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
371 }
372 
373 
CompileConstructStub(SharedFunctionInfo * shared)374 Object* ConstructStubCompiler::CompileConstructStub(
375     SharedFunctionInfo* shared) {
376   UNIMPLEMENTED_MIPS();
377   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
378 }
379 
380 
381 #undef __
382 
383 } }  // namespace v8::internal
384 
385