blob: faaacbc4db4181e2ebb126bd63543e8d138dbbc5 [file] [log] [blame]
ager@chromium.org5c838252010-02-19 08:53:10 +00001// 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
erik.corry@gmail.com9dfbea42010-05-21 12:58:28 +000030#if defined(V8_TARGET_ARCH_MIPS)
31
ager@chromium.org5c838252010-02-19 08:53:10 +000032#include "ic-inl.h"
33#include "codegen-inl.h"
34#include "stub-cache.h"
35
36namespace v8 {
37namespace internal {
38
39#define __ ACCESS_MASM(masm)
40
41
42void StubCache::GenerateProbe(MacroAssembler* masm,
43 Code::Flags flags,
44 Register receiver,
45 Register name,
46 Register scratch,
47 Register extra) {
48 UNIMPLEMENTED_MIPS();
49}
50
51
52void StubCompiler::GenerateLoadGlobalFunctionPrototype(MacroAssembler* masm,
53 int index,
54 Register prototype) {
55 UNIMPLEMENTED_MIPS();
56}
57
58
59// Load a fast property out of a holder object (src). In-object properties
60// are loaded directly otherwise the property is loaded from the properties
61// fixed array.
62void StubCompiler::GenerateFastPropertyLoad(MacroAssembler* masm,
63 Register dst, Register src,
64 JSObject* holder, int index) {
65 UNIMPLEMENTED_MIPS();
66}
67
68
69void StubCompiler::GenerateLoadArrayLength(MacroAssembler* masm,
70 Register receiver,
71 Register scratch,
72 Label* miss_label) {
73 UNIMPLEMENTED_MIPS();
74}
75
76
ager@chromium.org5c838252010-02-19 08:53:10 +000077void StubCompiler::GenerateLoadFunctionPrototype(MacroAssembler* masm,
78 Register receiver,
79 Register scratch1,
80 Register scratch2,
81 Label* miss_label) {
82 UNIMPLEMENTED_MIPS();
83}
84
85
86// Generate StoreField code, value is passed in r0 register.
87// After executing generated code, the receiver_reg and name_reg
88// may be clobbered.
89void StubCompiler::GenerateStoreField(MacroAssembler* masm,
ager@chromium.org5c838252010-02-19 08:53:10 +000090 JSObject* object,
91 int index,
92 Map* transition,
93 Register receiver_reg,
94 Register name_reg,
95 Register scratch,
96 Label* miss_label) {
97 UNIMPLEMENTED_MIPS();
98}
99
100
101void StubCompiler::GenerateLoadMiss(MacroAssembler* masm, Code::Kind kind) {
102 UNIMPLEMENTED_MIPS();
103}
104
105
106#undef __
107#define __ ACCESS_MASM(masm())
108
109
ager@chromium.org5c838252010-02-19 08:53:10 +0000110void StubCompiler::GenerateLoadField(JSObject* object,
111 JSObject* holder,
112 Register receiver,
113 Register scratch1,
114 Register scratch2,
115 int index,
116 String* name,
117 Label* miss) {
118 UNIMPLEMENTED_MIPS();
119}
120
121
122void StubCompiler::GenerateLoadConstant(JSObject* object,
123 JSObject* holder,
124 Register receiver,
125 Register scratch1,
126 Register scratch2,
127 Object* value,
128 String* name,
129 Label* miss) {
130 UNIMPLEMENTED_MIPS();
131}
132
133
134bool StubCompiler::GenerateLoadCallback(JSObject* object,
135 JSObject* holder,
136 Register receiver,
137 Register name_reg,
138 Register scratch1,
139 Register scratch2,
140 AccessorInfo* callback,
141 String* name,
142 Label* miss,
143 Failure** failure) {
144 UNIMPLEMENTED_MIPS();
145 __ break_(0x470);
146 return false; // UNIMPLEMENTED RETURN
147}
148
149
150void StubCompiler::GenerateLoadInterceptor(JSObject* object,
151 JSObject* holder,
152 LookupResult* lookup,
153 Register receiver,
154 Register name_reg,
155 Register scratch1,
156 Register scratch2,
157 String* name,
158 Label* miss) {
159 UNIMPLEMENTED_MIPS();
160 __ break_(0x505);
161}
162
163
164Object* StubCompiler::CompileLazyCompile(Code::Flags flags) {
kmillikin@chromium.org5d8f0e62010-03-24 08:21:20 +0000165 // Registers:
166 // a1: function
167 // ra: return address
168
169 // Enter an internal frame.
170 __ EnterInternalFrame();
171 // Preserve the function.
172 __ Push(a1);
173 // Setup aligned call.
174 __ SetupAlignedCall(t0, 1);
175 // Push the function on the stack as the argument to the runtime function.
176 __ Push(a1);
177 // Call the runtime function
178 __ CallRuntime(Runtime::kLazyCompile, 1);
179 __ ReturnFromAlignedCall();
180 // Calculate the entry point.
181 __ addiu(t9, v0, Code::kHeaderSize - kHeapObjectTag);
182 // Restore saved function.
183 __ Pop(a1);
184 // Tear down temporary frame.
185 __ LeaveInternalFrame();
186 // Do a tail-call of the compiled function.
187 __ Jump(t9);
188
189 return GetCodeWithFlags(flags, "LazyCompileStub");
ager@chromium.org5c838252010-02-19 08:53:10 +0000190}
191
192
ager@chromium.orgce5e87b2010-03-10 10:24:18 +0000193Object* CallStubCompiler::CompileCallField(JSObject* object,
ager@chromium.org5c838252010-02-19 08:53:10 +0000194 JSObject* holder,
195 int index,
196 String* name) {
197 UNIMPLEMENTED_MIPS();
198 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
199}
200
201
kmillikin@chromium.org5d8f0e62010-03-24 08:21:20 +0000202Object* CallStubCompiler::CompileArrayPushCall(Object* object,
203 JSObject* holder,
204 JSFunction* function,
205 String* name,
206 CheckType check) {
207 UNIMPLEMENTED_MIPS();
208 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
209}
210
211
212Object* CallStubCompiler::CompileArrayPopCall(Object* object,
213 JSObject* holder,
214 JSFunction* function,
215 String* name,
216 CheckType check) {
217 UNIMPLEMENTED_MIPS();
218 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
219}
220
221
ager@chromium.org5c838252010-02-19 08:53:10 +0000222Object* CallStubCompiler::CompileCallConstant(Object* object,
223 JSObject* holder,
224 JSFunction* function,
225 String* name,
226 CheckType check) {
227 UNIMPLEMENTED_MIPS();
228 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
229}
230
231
ager@chromium.orgce5e87b2010-03-10 10:24:18 +0000232Object* CallStubCompiler::CompileCallInterceptor(JSObject* object,
ager@chromium.org5c838252010-02-19 08:53:10 +0000233 JSObject* holder,
234 String* name) {
235 UNIMPLEMENTED_MIPS();
236 __ break_(0x782);
237 return GetCode(INTERCEPTOR, name);
238}
239
240
241Object* CallStubCompiler::CompileCallGlobal(JSObject* object,
242 GlobalObject* holder,
243 JSGlobalPropertyCell* cell,
244 JSFunction* function,
245 String* name) {
246 UNIMPLEMENTED_MIPS();
247 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
248}
249
250
251Object* StoreStubCompiler::CompileStoreField(JSObject* object,
252 int index,
253 Map* transition,
254 String* name) {
255 UNIMPLEMENTED_MIPS();
256 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
257}
258
259
260Object* StoreStubCompiler::CompileStoreCallback(JSObject* object,
261 AccessorInfo* callback,
262 String* name) {
263 UNIMPLEMENTED_MIPS();
264 __ break_(0x906);
265 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
266}
267
268
269Object* StoreStubCompiler::CompileStoreInterceptor(JSObject* receiver,
270 String* name) {
271 UNIMPLEMENTED_MIPS();
272 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
273}
274
275
276Object* StoreStubCompiler::CompileStoreGlobal(GlobalObject* object,
277 JSGlobalPropertyCell* cell,
278 String* name) {
279 UNIMPLEMENTED_MIPS();
280 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
281}
282
283
284Object* LoadStubCompiler::CompileLoadField(JSObject* object,
285 JSObject* holder,
286 int index,
287 String* name) {
288 UNIMPLEMENTED_MIPS();
289 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
290}
291
292
293Object* LoadStubCompiler::CompileLoadCallback(String* name,
294 JSObject* object,
295 JSObject* holder,
296 AccessorInfo* callback) {
297 UNIMPLEMENTED_MIPS();
298 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
299}
300
301
302Object* LoadStubCompiler::CompileLoadConstant(JSObject* object,
303 JSObject* holder,
304 Object* value,
305 String* name) {
306 UNIMPLEMENTED_MIPS();
307 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
308}
309
310
311Object* LoadStubCompiler::CompileLoadInterceptor(JSObject* object,
312 JSObject* holder,
313 String* name) {
314 UNIMPLEMENTED_MIPS();
315 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
316}
317
318
319Object* LoadStubCompiler::CompileLoadGlobal(JSObject* object,
320 GlobalObject* holder,
321 JSGlobalPropertyCell* cell,
322 String* name,
323 bool is_dont_delete) {
324 UNIMPLEMENTED_MIPS();
325 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
326}
327
328
329Object* KeyedLoadStubCompiler::CompileLoadField(String* name,
330 JSObject* receiver,
331 JSObject* holder,
332 int index) {
333 UNIMPLEMENTED_MIPS();
334 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
335}
336
337
338Object* KeyedLoadStubCompiler::CompileLoadCallback(String* name,
339 JSObject* receiver,
340 JSObject* holder,
341 AccessorInfo* callback) {
342 UNIMPLEMENTED_MIPS();
343 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
344}
345
346
347Object* KeyedLoadStubCompiler::CompileLoadConstant(String* name,
348 JSObject* receiver,
349 JSObject* holder,
350 Object* value) {
351 UNIMPLEMENTED_MIPS();
352 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
353}
354
355
356Object* KeyedLoadStubCompiler::CompileLoadInterceptor(JSObject* receiver,
357 JSObject* holder,
358 String* name) {
359 UNIMPLEMENTED_MIPS();
360 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
361}
362
363
364Object* KeyedLoadStubCompiler::CompileLoadArrayLength(String* name) {
365 UNIMPLEMENTED_MIPS();
366 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
367}
368
369
370Object* KeyedLoadStubCompiler::CompileLoadStringLength(String* name) {
371 UNIMPLEMENTED_MIPS();
372 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
373}
374
375
376// TODO(1224671): implement the fast case.
377Object* KeyedLoadStubCompiler::CompileLoadFunctionPrototype(String* name) {
378 UNIMPLEMENTED_MIPS();
379 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
380}
381
382
383Object* KeyedStoreStubCompiler::CompileStoreField(JSObject* object,
384 int index,
385 Map* transition,
386 String* name) {
387 UNIMPLEMENTED_MIPS();
388 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
389}
390
391
392Object* ConstructStubCompiler::CompileConstructStub(
393 SharedFunctionInfo* shared) {
394 UNIMPLEMENTED_MIPS();
395 return reinterpret_cast<Object*>(NULL); // UNIMPLEMENTED RETURN
396}
397
398
399#undef __
400
401} } // namespace v8::internal
402
erik.corry@gmail.com9dfbea42010-05-21 12:58:28 +0000403#endif // V8_TARGET_ARCH_MIPS