blob: 1a4955815835bb9ac754cfb938ce3cfacec4ee3e [file] [log] [blame]
Andrei Popescu31002712010-02-23 13:46:05 +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
Leon Clarkef7060e22010-06-03 12:02:55 +010030#if defined(V8_TARGET_ARCH_MIPS)
31
Andrei Popescu31002712010-02-23 13:46:05 +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,
Teng-Hui Zhu3e5fa292010-11-09 16:16:48 -080047 Register extra,
48 Register extra2) {
Andrei Popescu31002712010-02-23 13:46:05 +000049 UNIMPLEMENTED_MIPS();
50}
51
52
53void StubCompiler::GenerateLoadGlobalFunctionPrototype(MacroAssembler* masm,
54 int index,
55 Register prototype) {
56 UNIMPLEMENTED_MIPS();
57}
58
59
Steve Block44f0eee2011-05-26 01:26:41 +010060void StubCompiler::GenerateDirectLoadGlobalFunctionPrototype(
61 MacroAssembler* masm, int index, Register prototype, Label* miss) {
62 UNIMPLEMENTED_MIPS();
63}
64
65
Andrei Popescu31002712010-02-23 13:46:05 +000066// Load a fast property out of a holder object (src). In-object properties
67// are loaded directly otherwise the property is loaded from the properties
68// fixed array.
69void StubCompiler::GenerateFastPropertyLoad(MacroAssembler* masm,
70 Register dst, Register src,
71 JSObject* holder, int index) {
72 UNIMPLEMENTED_MIPS();
73}
74
75
76void StubCompiler::GenerateLoadArrayLength(MacroAssembler* masm,
77 Register receiver,
78 Register scratch,
79 Label* miss_label) {
80 UNIMPLEMENTED_MIPS();
81}
82
83
Steve Block44f0eee2011-05-26 01:26:41 +010084// Generate code to load the length from a string object and return the length.
85// If the receiver object is not a string or a wrapped string object the
86// execution continues at the miss label. The register containing the
87// receiver is potentially clobbered.
88void StubCompiler::GenerateLoadStringLength(MacroAssembler* masm,
89 Register receiver,
90 Register scratch1,
91 Register scratch2,
92 Label* miss,
93 bool support_wrappers) {
94 UNIMPLEMENTED_MIPS();
95}
96
97
Andrei Popescu31002712010-02-23 13:46:05 +000098void StubCompiler::GenerateLoadFunctionPrototype(MacroAssembler* masm,
99 Register receiver,
100 Register scratch1,
101 Register scratch2,
102 Label* miss_label) {
103 UNIMPLEMENTED_MIPS();
104}
105
106
Steve Block44f0eee2011-05-26 01:26:41 +0100107// Generate StoreField code, value is passed in a0 register.
Andrei Popescu31002712010-02-23 13:46:05 +0000108// After executing generated code, the receiver_reg and name_reg
109// may be clobbered.
110void StubCompiler::GenerateStoreField(MacroAssembler* masm,
Andrei Popescu31002712010-02-23 13:46:05 +0000111 JSObject* object,
112 int index,
113 Map* transition,
114 Register receiver_reg,
115 Register name_reg,
116 Register scratch,
117 Label* miss_label) {
118 UNIMPLEMENTED_MIPS();
119}
120
121
122void StubCompiler::GenerateLoadMiss(MacroAssembler* masm, Code::Kind kind) {
123 UNIMPLEMENTED_MIPS();
124}
125
126
Steve Block44f0eee2011-05-26 01:26:41 +0100127class CallInterceptorCompiler BASE_EMBEDDED {
128 public:
129 CallInterceptorCompiler(StubCompiler* stub_compiler,
130 const ParameterCount& arguments,
131 Register name)
132 : stub_compiler_(stub_compiler),
133 arguments_(arguments),
134 name_(name) {}
135
136 void Compile(MacroAssembler* masm,
137 JSObject* object,
138 JSObject* holder,
139 String* name,
140 LookupResult* lookup,
141 Register receiver,
142 Register scratch1,
143 Register scratch2,
144 Register scratch3,
145 Label* miss) {
146 UNIMPLEMENTED_MIPS();
147 }
148
149 private:
150 void CompileCacheable(MacroAssembler* masm,
151 JSObject* object,
152 Register receiver,
153 Register scratch1,
154 Register scratch2,
155 Register scratch3,
156 JSObject* interceptor_holder,
157 LookupResult* lookup,
158 String* name,
159 const CallOptimization& optimization,
160 Label* miss_label) {
161 UNIMPLEMENTED_MIPS();
162 }
163
164 void CompileRegular(MacroAssembler* masm,
165 JSObject* object,
166 Register receiver,
167 Register scratch1,
168 Register scratch2,
169 Register scratch3,
170 String* name,
171 JSObject* interceptor_holder,
172 Label* miss_label) {
173 UNIMPLEMENTED_MIPS();
174 }
175
176 void LoadWithInterceptor(MacroAssembler* masm,
177 Register receiver,
178 Register holder,
179 JSObject* holder_obj,
180 Register scratch,
181 Label* interceptor_succeeded) {
182 UNIMPLEMENTED_MIPS();
183 }
184
185 StubCompiler* stub_compiler_;
186 const ParameterCount& arguments_;
187 Register name_;
188};
189
190
Andrei Popescu31002712010-02-23 13:46:05 +0000191#undef __
192#define __ ACCESS_MASM(masm())
193
194
Steve Block44f0eee2011-05-26 01:26:41 +0100195Register StubCompiler::CheckPrototypes(JSObject* object,
196 Register object_reg,
197 JSObject* holder,
198 Register holder_reg,
199 Register scratch1,
200 Register scratch2,
201 String* name,
202 int save_at_depth,
203 Label* miss) {
204 UNIMPLEMENTED_MIPS();
205 return no_reg;
206}
207
208
Andrei Popescu31002712010-02-23 13:46:05 +0000209void StubCompiler::GenerateLoadField(JSObject* object,
210 JSObject* holder,
211 Register receiver,
212 Register scratch1,
213 Register scratch2,
Steve Block44f0eee2011-05-26 01:26:41 +0100214 Register scratch3,
Andrei Popescu31002712010-02-23 13:46:05 +0000215 int index,
216 String* name,
217 Label* miss) {
218 UNIMPLEMENTED_MIPS();
219}
220
221
222void StubCompiler::GenerateLoadConstant(JSObject* object,
223 JSObject* holder,
224 Register receiver,
225 Register scratch1,
226 Register scratch2,
Steve Block44f0eee2011-05-26 01:26:41 +0100227 Register scratch3,
Andrei Popescu31002712010-02-23 13:46:05 +0000228 Object* value,
229 String* name,
230 Label* miss) {
231 UNIMPLEMENTED_MIPS();
232}
233
234
Steve Block44f0eee2011-05-26 01:26:41 +0100235MaybeObject* StubCompiler::GenerateLoadCallback(JSObject* object,
236 JSObject* holder,
237 Register receiver,
238 Register name_reg,
239 Register scratch1,
240 Register scratch2,
241 Register scratch3,
242 AccessorInfo* callback,
243 String* name,
244 Label* miss) {
Andrei Popescu31002712010-02-23 13:46:05 +0000245 UNIMPLEMENTED_MIPS();
Steve Block44f0eee2011-05-26 01:26:41 +0100246 return NULL;
Andrei Popescu31002712010-02-23 13:46:05 +0000247}
248
249
250void StubCompiler::GenerateLoadInterceptor(JSObject* object,
Steve Block44f0eee2011-05-26 01:26:41 +0100251 JSObject* interceptor_holder,
Andrei Popescu31002712010-02-23 13:46:05 +0000252 LookupResult* lookup,
253 Register receiver,
254 Register name_reg,
255 Register scratch1,
256 Register scratch2,
Steve Block44f0eee2011-05-26 01:26:41 +0100257 Register scratch3,
Andrei Popescu31002712010-02-23 13:46:05 +0000258 String* name,
259 Label* miss) {
260 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +0000261}
262
263
Steve Block44f0eee2011-05-26 01:26:41 +0100264void CallStubCompiler::GenerateNameCheck(String* name, Label* miss) {
Andrei Popescu31002712010-02-23 13:46:05 +0000265 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +0000266}
267
268
Steve Block44f0eee2011-05-26 01:26:41 +0100269void CallStubCompiler::GenerateGlobalReceiverCheck(JSObject* object,
270 JSObject* holder,
271 String* name,
272 Label* miss) {
Steve Block6ded16b2010-05-10 14:33:55 +0100273 UNIMPLEMENTED_MIPS();
Steve Block6ded16b2010-05-10 14:33:55 +0100274}
275
276
Steve Block44f0eee2011-05-26 01:26:41 +0100277void CallStubCompiler::GenerateLoadFunctionFromCell(JSGlobalPropertyCell* cell,
278 JSFunction* function,
279 Label* miss) {
Andrei Popescu31002712010-02-23 13:46:05 +0000280 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +0000281}
282
283
Steve Block44f0eee2011-05-26 01:26:41 +0100284MaybeObject* CallStubCompiler::GenerateMissBranch() {
Andrei Popescu31002712010-02-23 13:46:05 +0000285 UNIMPLEMENTED_MIPS();
Steve Block44f0eee2011-05-26 01:26:41 +0100286 return NULL;
Andrei Popescu31002712010-02-23 13:46:05 +0000287}
288
289
Steve Block44f0eee2011-05-26 01:26:41 +0100290MaybeObject* CallStubCompiler::CompileCallField(JSObject* object,
291 JSObject* holder,
292 int index,
Andrei Popescu31002712010-02-23 13:46:05 +0000293 String* name) {
294 UNIMPLEMENTED_MIPS();
Steve Block44f0eee2011-05-26 01:26:41 +0100295 return NULL;
Andrei Popescu31002712010-02-23 13:46:05 +0000296}
297
298
Steve Block44f0eee2011-05-26 01:26:41 +0100299MaybeObject* CallStubCompiler::CompileArrayPushCall(Object* object,
300 JSObject* holder,
301 JSGlobalPropertyCell* cell,
302 JSFunction* function,
303 String* name) {
304 UNIMPLEMENTED_MIPS();
305 return NULL;
306}
307
308
309MaybeObject* CallStubCompiler::CompileArrayPopCall(Object* object,
310 JSObject* holder,
311 JSGlobalPropertyCell* cell,
312 JSFunction* function,
Andrei Popescu31002712010-02-23 13:46:05 +0000313 String* name) {
314 UNIMPLEMENTED_MIPS();
Steve Block44f0eee2011-05-26 01:26:41 +0100315 return NULL;
Andrei Popescu31002712010-02-23 13:46:05 +0000316}
317
318
Steve Block44f0eee2011-05-26 01:26:41 +0100319MaybeObject* CallStubCompiler::CompileStringCharCodeAtCall(
320 Object* object,
321 JSObject* holder,
322 JSGlobalPropertyCell* cell,
323 JSFunction* function,
324 String* name) {
Andrei Popescu31002712010-02-23 13:46:05 +0000325 UNIMPLEMENTED_MIPS();
Steve Block44f0eee2011-05-26 01:26:41 +0100326 return NULL;
Andrei Popescu31002712010-02-23 13:46:05 +0000327}
328
329
Steve Block44f0eee2011-05-26 01:26:41 +0100330MaybeObject* CallStubCompiler::CompileStringCharAtCall(
331 Object* object,
332 JSObject* holder,
333 JSGlobalPropertyCell* cell,
334 JSFunction* function,
335 String* name) {
Andrei Popescu31002712010-02-23 13:46:05 +0000336 UNIMPLEMENTED_MIPS();
Steve Block44f0eee2011-05-26 01:26:41 +0100337 return NULL;
Andrei Popescu31002712010-02-23 13:46:05 +0000338}
339
340
Steve Block44f0eee2011-05-26 01:26:41 +0100341MaybeObject* CallStubCompiler::CompileStringFromCharCodeCall(
342 Object* object,
343 JSObject* holder,
344 JSGlobalPropertyCell* cell,
345 JSFunction* function,
346 String* name) {
Andrei Popescu31002712010-02-23 13:46:05 +0000347 UNIMPLEMENTED_MIPS();
Steve Block44f0eee2011-05-26 01:26:41 +0100348 return NULL;
Andrei Popescu31002712010-02-23 13:46:05 +0000349}
350
351
Steve Block44f0eee2011-05-26 01:26:41 +0100352MaybeObject* CallStubCompiler::CompileMathFloorCall(Object* object,
353 JSObject* holder,
354 JSGlobalPropertyCell* cell,
355 JSFunction* function,
356 String* name) {
Andrei Popescu31002712010-02-23 13:46:05 +0000357 UNIMPLEMENTED_MIPS();
Steve Block44f0eee2011-05-26 01:26:41 +0100358 return NULL;
Andrei Popescu31002712010-02-23 13:46:05 +0000359}
360
361
Steve Block44f0eee2011-05-26 01:26:41 +0100362MaybeObject* CallStubCompiler::CompileMathAbsCall(Object* object,
363 JSObject* holder,
364 JSGlobalPropertyCell* cell,
365 JSFunction* function,
366 String* name) {
Andrei Popescu31002712010-02-23 13:46:05 +0000367 UNIMPLEMENTED_MIPS();
Steve Block44f0eee2011-05-26 01:26:41 +0100368 return NULL;
Andrei Popescu31002712010-02-23 13:46:05 +0000369}
370
371
Steve Block44f0eee2011-05-26 01:26:41 +0100372MaybeObject* CallStubCompiler::CompileFastApiCall(
373 const CallOptimization& optimization,
374 Object* object,
375 JSObject* holder,
376 JSGlobalPropertyCell* cell,
377 JSFunction* function,
378 String* name) {
Andrei Popescu31002712010-02-23 13:46:05 +0000379 UNIMPLEMENTED_MIPS();
Steve Block44f0eee2011-05-26 01:26:41 +0100380 return NULL;
Andrei Popescu31002712010-02-23 13:46:05 +0000381}
382
383
Steve Block44f0eee2011-05-26 01:26:41 +0100384MaybeObject* CallStubCompiler::CompileCallConstant(Object* object,
Andrei Popescu31002712010-02-23 13:46:05 +0000385 JSObject* holder,
Steve Block44f0eee2011-05-26 01:26:41 +0100386 JSFunction* function,
387 String* name,
388 CheckType check) {
Andrei Popescu31002712010-02-23 13:46:05 +0000389 UNIMPLEMENTED_MIPS();
Steve Block44f0eee2011-05-26 01:26:41 +0100390 return NULL;
Andrei Popescu31002712010-02-23 13:46:05 +0000391}
392
393
Steve Block44f0eee2011-05-26 01:26:41 +0100394MaybeObject* CallStubCompiler::CompileCallInterceptor(JSObject* object,
Andrei Popescu31002712010-02-23 13:46:05 +0000395 JSObject* holder,
396 String* name) {
397 UNIMPLEMENTED_MIPS();
Steve Block44f0eee2011-05-26 01:26:41 +0100398 return NULL;
Andrei Popescu31002712010-02-23 13:46:05 +0000399}
400
401
Steve Block44f0eee2011-05-26 01:26:41 +0100402MaybeObject* CallStubCompiler::CompileCallGlobal(JSObject* object,
403 GlobalObject* holder,
404 JSGlobalPropertyCell* cell,
405 JSFunction* function,
406 String* name) {
Andrei Popescu31002712010-02-23 13:46:05 +0000407 UNIMPLEMENTED_MIPS();
Steve Block44f0eee2011-05-26 01:26:41 +0100408 return NULL;
Andrei Popescu31002712010-02-23 13:46:05 +0000409}
410
411
Steve Block44f0eee2011-05-26 01:26:41 +0100412MaybeObject* StoreStubCompiler::CompileStoreField(JSObject* object,
Andrei Popescu31002712010-02-23 13:46:05 +0000413 int index,
414 Map* transition,
415 String* name) {
416 UNIMPLEMENTED_MIPS();
Steve Block44f0eee2011-05-26 01:26:41 +0100417 return NULL;
Andrei Popescu31002712010-02-23 13:46:05 +0000418}
419
420
Steve Block44f0eee2011-05-26 01:26:41 +0100421MaybeObject* StoreStubCompiler::CompileStoreCallback(JSObject* object,
422 AccessorInfo* callback,
423 String* name) {
Andrei Popescu31002712010-02-23 13:46:05 +0000424 UNIMPLEMENTED_MIPS();
Steve Block44f0eee2011-05-26 01:26:41 +0100425 return NULL;
Andrei Popescu31002712010-02-23 13:46:05 +0000426}
427
428
Steve Block44f0eee2011-05-26 01:26:41 +0100429MaybeObject* StoreStubCompiler::CompileStoreInterceptor(JSObject* receiver,
430 String* name) {
Steve Block1e0659c2011-05-24 12:43:12 +0100431 UNIMPLEMENTED_MIPS();
Steve Block44f0eee2011-05-26 01:26:41 +0100432 return NULL;
Steve Block1e0659c2011-05-24 12:43:12 +0100433}
434
435
Steve Block44f0eee2011-05-26 01:26:41 +0100436MaybeObject* StoreStubCompiler::CompileStoreGlobal(GlobalObject* object,
437 JSGlobalPropertyCell* cell,
438 String* name) {
Steve Block1e0659c2011-05-24 12:43:12 +0100439 UNIMPLEMENTED_MIPS();
Steve Block44f0eee2011-05-26 01:26:41 +0100440 return NULL;
441}
442
443
444MaybeObject* LoadStubCompiler::CompileLoadNonexistent(String* name,
445 JSObject* object,
446 JSObject* last) {
447 UNIMPLEMENTED_MIPS();
448 return NULL;
449}
450
451
452MaybeObject* LoadStubCompiler::CompileLoadField(JSObject* object,
453 JSObject* holder,
454 int index,
455 String* name) {
456 UNIMPLEMENTED_MIPS();
457 return NULL;
458}
459
460
461MaybeObject* LoadStubCompiler::CompileLoadCallback(String* name,
462 JSObject* object,
463 JSObject* holder,
464 AccessorInfo* callback) {
465 UNIMPLEMENTED_MIPS();
466 return NULL;
467}
468
469
470MaybeObject* LoadStubCompiler::CompileLoadConstant(JSObject* object,
471 JSObject* holder,
472 Object* value,
473 String* name) {
474 UNIMPLEMENTED_MIPS();
475 return NULL;
476}
477
478
479MaybeObject* LoadStubCompiler::CompileLoadInterceptor(JSObject* object,
480 JSObject* holder,
481 String* name) {
482 UNIMPLEMENTED_MIPS();
483 return NULL;
484}
485
486
487MaybeObject* LoadStubCompiler::CompileLoadGlobal(JSObject* object,
488 GlobalObject* holder,
489 JSGlobalPropertyCell* cell,
490 String* name,
491 bool is_dont_delete) {
492 UNIMPLEMENTED_MIPS();
493 return NULL;
494}
495
496
497MaybeObject* KeyedLoadStubCompiler::CompileLoadField(String* name,
498 JSObject* receiver,
499 JSObject* holder,
500 int index) {
501 UNIMPLEMENTED_MIPS();
502 return NULL;
503}
504
505
506MaybeObject* KeyedLoadStubCompiler::CompileLoadCallback(
507 String* name,
508 JSObject* receiver,
509 JSObject* holder,
510 AccessorInfo* callback) {
511 UNIMPLEMENTED_MIPS();
512 return NULL;
513}
514
515
516MaybeObject* KeyedLoadStubCompiler::CompileLoadConstant(String* name,
517 JSObject* receiver,
518 JSObject* holder,
519 Object* value) {
520 UNIMPLEMENTED_MIPS();
521 return NULL;
522}
523
524
525MaybeObject* KeyedLoadStubCompiler::CompileLoadInterceptor(JSObject* receiver,
526 JSObject* holder,
527 String* name) {
528 UNIMPLEMENTED_MIPS();
529 return NULL;
530}
531
532
533MaybeObject* KeyedLoadStubCompiler::CompileLoadArrayLength(String* name) {
534 UNIMPLEMENTED_MIPS();
535 return NULL;
536}
537
538
539MaybeObject* KeyedLoadStubCompiler::CompileLoadStringLength(String* name) {
540 UNIMPLEMENTED_MIPS();
541 return NULL;
542}
543
544
545MaybeObject* KeyedLoadStubCompiler::CompileLoadFunctionPrototype(String* name) {
546 UNIMPLEMENTED_MIPS();
547 return NULL;
548}
549
550
551MaybeObject* KeyedLoadStubCompiler::CompileLoadSpecialized(JSObject* receiver) {
552 UNIMPLEMENTED_MIPS();
553 return NULL;
554}
555
556
557MaybeObject* KeyedStoreStubCompiler::CompileStoreField(JSObject* object,
558 int index,
559 Map* transition,
560 String* name) {
561 UNIMPLEMENTED_MIPS();
562 return NULL;
563}
564
565
566MaybeObject* KeyedStoreStubCompiler::CompileStoreSpecialized(
567 JSObject* receiver) {
568 UNIMPLEMENTED_MIPS();
569 return NULL;
570}
571
572
573MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) {
574 UNIMPLEMENTED_MIPS();
575 return NULL;
576}
577
578
579MaybeObject* ExternalArrayStubCompiler::CompileKeyedLoadStub(
580 JSObject* receiver_object,
581 ExternalArrayType array_type,
582 Code::Flags flags) {
583 UNIMPLEMENTED_MIPS();
584 return NULL;
585}
586
587
588MaybeObject* ExternalArrayStubCompiler::CompileKeyedStoreStub(
589 JSObject* receiver_object,
590 ExternalArrayType array_type,
591 Code::Flags flags) {
592 UNIMPLEMENTED_MIPS();
593 return NULL;
Steve Block1e0659c2011-05-24 12:43:12 +0100594}
595
596
Andrei Popescu31002712010-02-23 13:46:05 +0000597#undef __
598
599} } // namespace v8::internal
600
Leon Clarkef7060e22010-06-03 12:02:55 +0100601#endif // V8_TARGET_ARCH_MIPS