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

Side by Side Diff: src/mips/codegen-mips.cc

Issue 6965006: Update mips infrastructure files. (Closed) Base URL: http://github.com/v8/v8.git@bleeding_edge
Patch Set: Fix additional style issues. Created 9 years, 7 months 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2011 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
11 // with the distribution. 11 // with the distribution.
12 // * Neither the name of Google Inc. nor the names of its 12 // * Neither the name of Google Inc. nor the names of its
13 // contributors may be used to endorse or promote products derived 13 // contributors may be used to endorse or promote products derived
14 // from this software without specific prior written permission. 14 // from this software without specific prior written permission.
15 // 15 //
16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 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. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28
29 #include "v8.h" 28 #include "v8.h"
30 29
31 #if defined(V8_TARGET_ARCH_MIPS) 30 #if defined(V8_TARGET_ARCH_MIPS)
32 31
33 #include "bootstrapper.h" 32 #include "codegen.h"
34 #include "code-stubs.h"
35 #include "codegen-inl.h"
36 #include "compiler.h"
37 #include "debug.h"
38 #include "ic-inl.h"
39 #include "jsregexp.h"
40 #include "jump-target-inl.h"
41 #include "parser.h"
42 #include "regexp-macro-assembler.h"
43 #include "regexp-stack.h"
44 #include "register-allocator-inl.h"
45 #include "runtime.h"
46 #include "scopes.h"
47 #include "stub-cache.h"
48 #include "virtual-frame-inl.h"
49 #include "virtual-frame-mips-inl.h"
50 33
51 namespace v8 { 34 namespace v8 {
52 namespace internal { 35 namespace internal {
53 36
54
55 #define __ ACCESS_MASM(masm_)
56
57 // -------------------------------------------------------------------------
58 // Platform-specific DeferredCode functions.
59
60 void DeferredCode::SaveRegisters() {
61 // On MIPS you either have a completely spilled frame or you
62 // handle it yourself, but at the moment there's no automation
63 // of registers and deferred code.
64 }
65
66
67 void DeferredCode::RestoreRegisters() {
68 }
69
70
71 // ------------------------------------------------------------------------- 37 // -------------------------------------------------------------------------
72 // Platform-specific RuntimeCallHelper functions. 38 // Platform-specific RuntimeCallHelper functions.
73 39
74 void VirtualFrameRuntimeCallHelper::BeforeCall(MacroAssembler* masm) const {
75 frame_state_->frame()->AssertIsSpilled();
76 }
77
78
79 void VirtualFrameRuntimeCallHelper::AfterCall(MacroAssembler* masm) const {
80 }
81
82
83 void StubRuntimeCallHelper::BeforeCall(MacroAssembler* masm) const { 40 void StubRuntimeCallHelper::BeforeCall(MacroAssembler* masm) const {
84 masm->EnterInternalFrame(); 41 masm->EnterInternalFrame();
85 } 42 }
86 43
87 44
88 void StubRuntimeCallHelper::AfterCall(MacroAssembler* masm) const { 45 void StubRuntimeCallHelper::AfterCall(MacroAssembler* masm) const {
89 masm->LeaveInternalFrame(); 46 masm->LeaveInternalFrame();
90 } 47 }
91 48
92 49
93 // -----------------------------------------------------------------------------
94 // CodeGenState implementation.
95
96 CodeGenState::CodeGenState(CodeGenerator* owner)
97 : owner_(owner),
98 previous_(owner->state()) {
99 owner->set_state(this);
100 }
101
102
103 ConditionCodeGenState::ConditionCodeGenState(CodeGenerator* owner,
104 JumpTarget* true_target,
105 JumpTarget* false_target)
106 : CodeGenState(owner),
107 true_target_(true_target),
108 false_target_(false_target) {
109 owner->set_state(this);
110 }
111
112
113 TypeInfoCodeGenState::TypeInfoCodeGenState(CodeGenerator* owner,
114 Slot* slot,
115 TypeInfo type_info)
116 : CodeGenState(owner),
117 slot_(slot) {
118 owner->set_state(this);
119 old_type_info_ = owner->set_type_info(slot, type_info);
120 }
121
122
123 CodeGenState::~CodeGenState() {
124 ASSERT(owner_->state() == this);
125 owner_->set_state(previous_);
126 }
127
128
129 TypeInfoCodeGenState::~TypeInfoCodeGenState() {
130 owner()->set_type_info(slot_, old_type_info_);
131 }
132
133
134 // -----------------------------------------------------------------------------
135 // CodeGenerator implementation.
136
137 CodeGenerator::CodeGenerator(MacroAssembler* masm)
138 : deferred_(8),
139 masm_(masm),
140 info_(NULL),
141 frame_(NULL),
142 allocator_(NULL),
143 cc_reg_(cc_always),
144 state_(NULL),
145 loop_nesting_(0),
146 type_info_(NULL),
147 function_return_(JumpTarget::BIDIRECTIONAL),
148 function_return_is_shadowed_(false) {
149 }
150
151
152 // Calling conventions:
153 // fp: caller's frame pointer
154 // sp: stack pointer
155 // a1: called JS function
156 // cp: callee's context
157
158 void CodeGenerator::Generate(CompilationInfo* info) {
159 UNIMPLEMENTED_MIPS();
160 }
161
162
163 int CodeGenerator::NumberOfSlot(Slot* slot) {
164 UNIMPLEMENTED_MIPS();
165 return 0;
166 }
167
168
169 MemOperand CodeGenerator::SlotOperand(Slot* slot, Register tmp) {
170 UNIMPLEMENTED_MIPS();
171 return MemOperand(zero_reg, 0);
172 }
173
174
175 MemOperand CodeGenerator::ContextSlotOperandCheckExtensions(
176 Slot* slot,
177 Register tmp,
178 Register tmp2,
179 JumpTarget* slow) {
180 UNIMPLEMENTED_MIPS();
181 return MemOperand(zero_reg, 0);
182 }
183
184
185 void CodeGenerator::LoadCondition(Expression* x,
186 JumpTarget* true_target,
187 JumpTarget* false_target,
188 bool force_cc) {
189 UNIMPLEMENTED_MIPS();
190 }
191
192
193 void CodeGenerator::Load(Expression* x) {
194 UNIMPLEMENTED_MIPS();
195 }
196
197
198 void CodeGenerator::LoadGlobal() {
199 UNIMPLEMENTED_MIPS();
200 }
201
202
203 void CodeGenerator::LoadGlobalReceiver(Register scratch) {
204 UNIMPLEMENTED_MIPS();
205 }
206
207
208 ArgumentsAllocationMode CodeGenerator::ArgumentsMode() {
209 UNIMPLEMENTED_MIPS();
210 return EAGER_ARGUMENTS_ALLOCATION;
211 }
212
213
214 void CodeGenerator::StoreArgumentsObject(bool initial) {
215 UNIMPLEMENTED_MIPS();
216 }
217
218
219 void CodeGenerator::LoadTypeofExpression(Expression* x) {
220 UNIMPLEMENTED_MIPS();
221 }
222
223
224 Reference::Reference(CodeGenerator* cgen,
225 Expression* expression,
226 bool persist_after_get)
227 : cgen_(cgen),
228 expression_(expression),
229 type_(ILLEGAL),
230 persist_after_get_(persist_after_get) {
231 UNIMPLEMENTED_MIPS();
232 }
233
234
235 Reference::~Reference() {
236 UNIMPLEMENTED_MIPS();
237 }
238
239
240 void CodeGenerator::LoadReference(Reference* ref) {
241 UNIMPLEMENTED_MIPS();
242 }
243
244
245 void CodeGenerator::UnloadReference(Reference* ref) {
246 UNIMPLEMENTED_MIPS();
247 }
248
249
250 // ECMA-262, section 9.2, page 30: ToBoolean(). Convert the given
251 // register to a boolean in the condition code register. The code
252 // may jump to 'false_target' in case the register converts to 'false'.
253 void CodeGenerator::ToBoolean(JumpTarget* true_target,
254 JumpTarget* false_target) {
255 UNIMPLEMENTED_MIPS();
256 }
257
258
259 void CodeGenerator::GenericBinaryOperation(Token::Value op,
260 OverwriteMode overwrite_mode,
261 GenerateInlineSmi inline_smi,
262 int constant_rhs) {
263 UNIMPLEMENTED_MIPS();
264 }
265
266
267 class DeferredInlineSmiOperation: public DeferredCode {
268 public:
269 DeferredInlineSmiOperation(Token::Value op,
270 int value,
271 bool reversed,
272 OverwriteMode overwrite_mode,
273 Register tos)
274 : op_(op),
275 value_(value),
276 reversed_(reversed),
277 overwrite_mode_(overwrite_mode),
278 tos_register_(tos) {
279 set_comment("[ DeferredInlinedSmiOperation");
280 }
281
282 virtual void Generate();
283 // This stub makes explicit calls to SaveRegisters(), RestoreRegisters() and
284 // Exit(). Currently on MIPS SaveRegisters() and RestoreRegisters() are empty
285 // methods, it is the responsibility of the deferred code to save and restore
286 // registers.
287 virtual bool AutoSaveAndRestore() { return false; }
288
289 void JumpToNonSmiInput(Condition cond, Register cmp1, const Operand& cmp2);
290 void JumpToAnswerOutOfRange(Condition cond,
291 Register cmp1,
292 const Operand& cmp2);
293
294 private:
295 void GenerateNonSmiInput();
296 void GenerateAnswerOutOfRange();
297 void WriteNonSmiAnswer(Register answer,
298 Register heap_number,
299 Register scratch);
300
301 Token::Value op_;
302 int value_;
303 bool reversed_;
304 OverwriteMode overwrite_mode_;
305 Register tos_register_;
306 Label non_smi_input_;
307 Label answer_out_of_range_;
308 };
309
310
311 // For bit operations we try harder and handle the case where the input is not
312 // a Smi but a 32bits integer without calling the generic stub.
313 void DeferredInlineSmiOperation::JumpToNonSmiInput(Condition cond,
314 Register cmp1,
315 const Operand& cmp2) {
316 UNIMPLEMENTED_MIPS();
317 }
318
319
320 // For bit operations the result is always 32bits so we handle the case where
321 // the result does not fit in a Smi without calling the generic stub.
322 void DeferredInlineSmiOperation::JumpToAnswerOutOfRange(Condition cond,
323 Register cmp1,
324 const Operand& cmp2) {
325 UNIMPLEMENTED_MIPS();
326 }
327
328
329 // On entry the non-constant side of the binary operation is in tos_register_
330 // and the constant smi side is nowhere. The tos_register_ is not used by the
331 // virtual frame. On exit the answer is in the tos_register_ and the virtual
332 // frame is unchanged.
333 void DeferredInlineSmiOperation::Generate() {
334 UNIMPLEMENTED_MIPS();
335 }
336
337
338 // Convert and write the integer answer into heap_number.
339 void DeferredInlineSmiOperation::WriteNonSmiAnswer(Register answer,
340 Register heap_number,
341 Register scratch) {
342 UNIMPLEMENTED_MIPS();
343 }
344
345
346 void DeferredInlineSmiOperation::GenerateNonSmiInput() {
347 UNIMPLEMENTED_MIPS();
348 }
349
350
351 void DeferredInlineSmiOperation::GenerateAnswerOutOfRange() {
352 UNIMPLEMENTED_MIPS();
353 }
354
355
356 void CodeGenerator::SmiOperation(Token::Value op,
357 Handle<Object> value,
358 bool reversed,
359 OverwriteMode mode) {
360 UNIMPLEMENTED_MIPS();
361 }
362
363
364 // On MIPS we load registers condReg1 and condReg2 with the values which should
365 // be compared. With the CodeGenerator::cc_reg_ condition, functions will be
366 // able to evaluate correctly the condition. (eg CodeGenerator::Branch)
367 void CodeGenerator::Comparison(Condition cc,
368 Expression* left,
369 Expression* right,
370 bool strict) {
371 UNIMPLEMENTED_MIPS();
372 }
373
374
375 void CodeGenerator::CallWithArguments(ZoneList<Expression*>* args,
376 CallFunctionFlags flags,
377 int position) {
378 UNIMPLEMENTED_MIPS();
379 }
380
381
382 void CodeGenerator::CallApplyLazy(Expression* applicand,
383 Expression* receiver,
384 VariableProxy* arguments,
385 int position) {
386 UNIMPLEMENTED_MIPS();
387 }
388
389
390 void CodeGenerator::Branch(bool if_true, JumpTarget* target) {
391 UNIMPLEMENTED_MIPS();
392 }
393
394
395 void CodeGenerator::CheckStack() {
396 UNIMPLEMENTED_MIPS();
397 }
398
399
400 void CodeGenerator::VisitStatements(ZoneList<Statement*>* statements) {
401 UNIMPLEMENTED_MIPS();
402 }
403
404
405 void CodeGenerator::VisitBlock(Block* node) {
406 UNIMPLEMENTED_MIPS();
407 }
408
409
410 void CodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
411 UNIMPLEMENTED_MIPS();
412 }
413
414
415 void CodeGenerator::VisitDeclaration(Declaration* node) {
416 UNIMPLEMENTED_MIPS();
417 }
418
419
420 void CodeGenerator::VisitExpressionStatement(ExpressionStatement* node) {
421 UNIMPLEMENTED_MIPS();
422 }
423
424
425 void CodeGenerator::VisitEmptyStatement(EmptyStatement* node) {
426 UNIMPLEMENTED_MIPS();
427 }
428
429
430 void CodeGenerator::VisitIfStatement(IfStatement* node) {
431 UNIMPLEMENTED_MIPS();
432 }
433
434
435 void CodeGenerator::VisitContinueStatement(ContinueStatement* node) {
436 UNIMPLEMENTED_MIPS();
437 }
438
439
440 void CodeGenerator::VisitBreakStatement(BreakStatement* node) {
441 UNIMPLEMENTED_MIPS();
442 }
443
444
445 void CodeGenerator::VisitReturnStatement(ReturnStatement* node) {
446 UNIMPLEMENTED_MIPS();
447 }
448
449
450 void CodeGenerator::GenerateReturnSequence() {
451 UNIMPLEMENTED_MIPS();
452 }
453
454
455 void CodeGenerator::VisitWithEnterStatement(WithEnterStatement* node) {
456 UNIMPLEMENTED_MIPS();
457 }
458
459
460 void CodeGenerator::VisitWithExitStatement(WithExitStatement* node) {
461 UNIMPLEMENTED_MIPS();
462 }
463
464
465 void CodeGenerator::VisitSwitchStatement(SwitchStatement* node) {
466 UNIMPLEMENTED_MIPS();
467 }
468
469
470 void CodeGenerator::VisitDoWhileStatement(DoWhileStatement* node) {
471 UNIMPLEMENTED_MIPS();
472 }
473
474
475 void CodeGenerator::VisitWhileStatement(WhileStatement* node) {
476 UNIMPLEMENTED_MIPS();
477 }
478
479
480 void CodeGenerator::VisitForStatement(ForStatement* node) {
481 UNIMPLEMENTED_MIPS();
482 }
483
484
485 void CodeGenerator::VisitForInStatement(ForInStatement* node) {
486 UNIMPLEMENTED_MIPS();
487 }
488
489
490 void CodeGenerator::VisitTryCatchStatement(TryCatchStatement* node) {
491 UNIMPLEMENTED_MIPS();
492 }
493
494
495 void CodeGenerator::VisitTryFinallyStatement(TryFinallyStatement* node) {
496 UNIMPLEMENTED_MIPS();
497 }
498
499
500 void CodeGenerator::VisitDebuggerStatement(DebuggerStatement* node) {
501 UNIMPLEMENTED_MIPS();
502 }
503
504
505 void CodeGenerator::InstantiateFunction(
506 Handle<SharedFunctionInfo> function_info,
507 bool pretenure) {
508 UNIMPLEMENTED_MIPS();
509 }
510
511
512 void CodeGenerator::VisitFunctionLiteral(FunctionLiteral* node) {
513 UNIMPLEMENTED_MIPS();
514 }
515
516
517 void CodeGenerator::VisitSharedFunctionInfoLiteral(
518 SharedFunctionInfoLiteral* node) {
519 UNIMPLEMENTED_MIPS();
520 }
521
522
523 void CodeGenerator::VisitConditional(Conditional* node) {
524 UNIMPLEMENTED_MIPS();
525 }
526
527
528 void CodeGenerator::LoadFromSlot(Slot* slot, TypeofState typeof_state) {
529 UNIMPLEMENTED_MIPS();
530 }
531
532
533 void CodeGenerator::LoadFromSlotCheckForArguments(Slot* slot,
534 TypeofState state) {
535 UNIMPLEMENTED_MIPS();
536 }
537
538
539 void CodeGenerator::StoreToSlot(Slot* slot, InitState init_state) {
540 UNIMPLEMENTED_MIPS();
541 }
542
543
544 void CodeGenerator::LoadFromGlobalSlotCheckExtensions(Slot* slot,
545 TypeofState typeof_state,
546 JumpTarget* slow) {
547 UNIMPLEMENTED_MIPS();
548 }
549
550
551 void CodeGenerator::EmitDynamicLoadFromSlotFastCase(Slot* slot,
552 TypeofState typeof_state,
553 JumpTarget* slow,
554 JumpTarget* done) {
555 UNIMPLEMENTED_MIPS();
556 }
557
558
559 void CodeGenerator::VisitSlot(Slot* node) {
560 UNIMPLEMENTED_MIPS();
561 }
562
563
564 void CodeGenerator::VisitVariableProxy(VariableProxy* node) {
565 UNIMPLEMENTED_MIPS();
566 }
567
568
569 void CodeGenerator::VisitLiteral(Literal* node) {
570 UNIMPLEMENTED_MIPS();
571 }
572
573
574 void CodeGenerator::VisitRegExpLiteral(RegExpLiteral* node) {
575 UNIMPLEMENTED_MIPS();
576 }
577
578
579 void CodeGenerator::VisitObjectLiteral(ObjectLiteral* node) {
580 UNIMPLEMENTED_MIPS();
581 }
582
583
584 void CodeGenerator::VisitArrayLiteral(ArrayLiteral* node) {
585 UNIMPLEMENTED_MIPS();
586 }
587
588
589 void CodeGenerator::VisitCatchExtensionObject(CatchExtensionObject* node) {
590 UNIMPLEMENTED_MIPS();
591 }
592
593
594 void CodeGenerator::EmitSlotAssignment(Assignment* node) {
595 UNIMPLEMENTED_MIPS();
596 }
597
598
599 void CodeGenerator::EmitNamedPropertyAssignment(Assignment* node) {
600 UNIMPLEMENTED_MIPS();
601 }
602
603
604 void CodeGenerator::EmitKeyedPropertyAssignment(Assignment* node) {
605 UNIMPLEMENTED_MIPS();
606 }
607
608
609 void CodeGenerator::VisitAssignment(Assignment* node) {
610 UNIMPLEMENTED_MIPS();
611 }
612
613
614 void CodeGenerator::VisitThrow(Throw* node) {
615 UNIMPLEMENTED_MIPS();
616 }
617
618
619 void CodeGenerator::VisitProperty(Property* node) {
620 UNIMPLEMENTED_MIPS();
621 }
622
623
624 void CodeGenerator::VisitCall(Call* node) {
625 UNIMPLEMENTED_MIPS();
626 }
627
628
629 void CodeGenerator::VisitCallNew(CallNew* node) {
630 UNIMPLEMENTED_MIPS();
631 }
632
633
634 void CodeGenerator::GenerateClassOf(ZoneList<Expression*>* args) {
635 UNIMPLEMENTED_MIPS();
636 }
637
638
639 void CodeGenerator::GenerateValueOf(ZoneList<Expression*>* args) {
640 UNIMPLEMENTED_MIPS();
641 }
642
643
644 void CodeGenerator::GenerateSetValueOf(ZoneList<Expression*>* args) {
645 UNIMPLEMENTED_MIPS();
646 }
647
648
649 void CodeGenerator::GenerateIsSmi(ZoneList<Expression*>* args) {
650 UNIMPLEMENTED_MIPS();
651 }
652
653
654 void CodeGenerator::GenerateLog(ZoneList<Expression*>* args) {
655 UNIMPLEMENTED_MIPS();
656 }
657
658
659 void CodeGenerator::GenerateIsNonNegativeSmi(ZoneList<Expression*>* args) {
660 UNIMPLEMENTED_MIPS();
661 }
662
663
664 void CodeGenerator::GenerateMathPow(ZoneList<Expression*>* args) {
665 UNIMPLEMENTED_MIPS();
666 }
667
668
669 void CodeGenerator::GenerateMathSqrt(ZoneList<Expression*>* args) {
670 UNIMPLEMENTED_MIPS();
671 }
672
673
674 class DeferredStringCharCodeAt : public DeferredCode {
675 public:
676 DeferredStringCharCodeAt(Register object,
677 Register index,
678 Register scratch,
679 Register result)
680 : result_(result),
681 char_code_at_generator_(object,
682 index,
683 scratch,
684 result,
685 &need_conversion_,
686 &need_conversion_,
687 &index_out_of_range_,
688 STRING_INDEX_IS_NUMBER) {}
689
690 StringCharCodeAtGenerator* fast_case_generator() {
691 return &char_code_at_generator_;
692 }
693
694 virtual void Generate() {
695 UNIMPLEMENTED_MIPS();
696 }
697
698 private:
699 Register result_;
700
701 Label need_conversion_;
702 Label index_out_of_range_;
703
704 StringCharCodeAtGenerator char_code_at_generator_;
705 };
706
707
708 void CodeGenerator::GenerateStringCharCodeAt(ZoneList<Expression*>* args) {
709 UNIMPLEMENTED_MIPS();
710 }
711
712
713 class DeferredStringCharFromCode : public DeferredCode {
714 public:
715 DeferredStringCharFromCode(Register code,
716 Register result)
717 : char_from_code_generator_(code, result) {}
718
719 StringCharFromCodeGenerator* fast_case_generator() {
720 return &char_from_code_generator_;
721 }
722
723 virtual void Generate() {
724 VirtualFrameRuntimeCallHelper call_helper(frame_state());
725 char_from_code_generator_.GenerateSlow(masm(), call_helper);
726 }
727
728 private:
729 StringCharFromCodeGenerator char_from_code_generator_;
730 };
731
732
733 void CodeGenerator::GenerateStringCharFromCode(ZoneList<Expression*>* args) {
734 UNIMPLEMENTED_MIPS();
735 }
736
737
738 class DeferredStringCharAt : public DeferredCode {
739 public:
740 DeferredStringCharAt(Register object,
741 Register index,
742 Register scratch1,
743 Register scratch2,
744 Register result)
745 : result_(result),
746 char_at_generator_(object,
747 index,
748 scratch1,
749 scratch2,
750 result,
751 &need_conversion_,
752 &need_conversion_,
753 &index_out_of_range_,
754 STRING_INDEX_IS_NUMBER) {}
755
756 StringCharAtGenerator* fast_case_generator() {
757 return &char_at_generator_;
758 }
759
760 virtual void Generate() {
761 UNIMPLEMENTED_MIPS();
762 }
763
764 private:
765 Register result_;
766
767 Label need_conversion_;
768 Label index_out_of_range_;
769
770 StringCharAtGenerator char_at_generator_;
771 };
772
773
774 void CodeGenerator::GenerateStringCharAt(ZoneList<Expression*>* args) {
775 UNIMPLEMENTED_MIPS();
776 }
777
778
779 void CodeGenerator::GenerateIsArray(ZoneList<Expression*>* args) {
780 UNIMPLEMENTED_MIPS();
781 }
782
783
784 void CodeGenerator::GenerateIsRegExp(ZoneList<Expression*>* args) {
785 UNIMPLEMENTED_MIPS();
786 }
787
788
789 void CodeGenerator::GenerateIsObject(ZoneList<Expression*>* args) {
790 UNIMPLEMENTED_MIPS();
791 }
792
793
794 void CodeGenerator::GenerateIsSpecObject(ZoneList<Expression*>* args) {
795 UNIMPLEMENTED_MIPS();
796 }
797
798
799 class DeferredIsStringWrapperSafeForDefaultValueOf : public DeferredCode {
800 public:
801 DeferredIsStringWrapperSafeForDefaultValueOf(Register object,
802 Register map_result,
803 Register scratch1,
804 Register scratch2)
805 : object_(object),
806 map_result_(map_result),
807 scratch1_(scratch1),
808 scratch2_(scratch2) { }
809
810 virtual void Generate() {
811 UNIMPLEMENTED_MIPS();
812 }
813
814 private:
815 Register object_;
816 Register map_result_;
817 Register scratch1_;
818 Register scratch2_;
819 };
820
821
822 void CodeGenerator::GenerateIsStringWrapperSafeForDefaultValueOf(
823 ZoneList<Expression*>* args) {
824 UNIMPLEMENTED_MIPS();
825 }
826
827
828 void CodeGenerator::GenerateIsFunction(ZoneList<Expression*>* args) {
829 UNIMPLEMENTED_MIPS();
830 }
831
832
833 void CodeGenerator::GenerateIsUndetectableObject(ZoneList<Expression*>* args) {
834 UNIMPLEMENTED_MIPS();
835 }
836
837
838 void CodeGenerator::GenerateIsConstructCall(ZoneList<Expression*>* args) {
839 UNIMPLEMENTED_MIPS();
840 }
841
842
843 void CodeGenerator::GenerateArgumentsLength(ZoneList<Expression*>* args) {
844 UNIMPLEMENTED_MIPS();
845 }
846
847
848 void CodeGenerator::GenerateArguments(ZoneList<Expression*>* args) {
849 UNIMPLEMENTED_MIPS();
850 }
851
852
853 void CodeGenerator::GenerateRandomHeapNumber(
854 ZoneList<Expression*>* args) {
855 UNIMPLEMENTED_MIPS();
856 }
857
858
859 void CodeGenerator::GenerateStringAdd(ZoneList<Expression*>* args) {
860 UNIMPLEMENTED_MIPS();
861 }
862
863
864 void CodeGenerator::GenerateSubString(ZoneList<Expression*>* args) {
865 UNIMPLEMENTED_MIPS();
866 }
867
868
869 void CodeGenerator::GenerateStringCompare(ZoneList<Expression*>* args) {
870 UNIMPLEMENTED_MIPS();
871 }
872
873
874 void CodeGenerator::GenerateRegExpExec(ZoneList<Expression*>* args) {
875 UNIMPLEMENTED_MIPS();
876 }
877
878
879 void CodeGenerator::GenerateRegExpConstructResult(ZoneList<Expression*>* args) {
880 UNIMPLEMENTED_MIPS();
881 }
882
883
884 class DeferredSearchCache: public DeferredCode {
885 public:
886 DeferredSearchCache(Register dst, Register cache, Register key)
887 : dst_(dst), cache_(cache), key_(key) {
888 set_comment("[ DeferredSearchCache");
889 }
890
891 virtual void Generate();
892
893 private:
894 Register dst_, cache_, key_;
895 };
896
897
898 void DeferredSearchCache::Generate() {
899 UNIMPLEMENTED_MIPS();
900 }
901
902
903 void CodeGenerator::GenerateGetFromCache(ZoneList<Expression*>* args) {
904 UNIMPLEMENTED_MIPS();
905 }
906
907
908 void CodeGenerator::GenerateNumberToString(ZoneList<Expression*>* args) {
909 UNIMPLEMENTED_MIPS();
910 }
911
912
913 class DeferredSwapElements: public DeferredCode {
914 public:
915 DeferredSwapElements(Register object, Register index1, Register index2)
916 : object_(object), index1_(index1), index2_(index2) {
917 set_comment("[ DeferredSwapElements");
918 }
919
920 virtual void Generate();
921
922 private:
923 Register object_, index1_, index2_;
924 };
925
926
927 void DeferredSwapElements::Generate() {
928 UNIMPLEMENTED_MIPS();
929 }
930
931
932 void CodeGenerator::GenerateSwapElements(ZoneList<Expression*>* args) {
933 UNIMPLEMENTED_MIPS();
934 }
935
936
937 void CodeGenerator::GenerateCallFunction(ZoneList<Expression*>* args) {
938 UNIMPLEMENTED_MIPS();
939 }
940
941
942 void CodeGenerator::GenerateMathSin(ZoneList<Expression*>* args) {
943 UNIMPLEMENTED_MIPS();
944 }
945
946
947 void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) {
948 UNIMPLEMENTED_MIPS();
949 }
950
951
952 void CodeGenerator::GenerateMathLog(ZoneList<Expression*>* args) {
953 UNIMPLEMENTED_MIPS();
954 }
955
956
957 void CodeGenerator::GenerateObjectEquals(ZoneList<Expression*>* args) {
958 UNIMPLEMENTED_MIPS();
959 }
960
961
962 void CodeGenerator::GenerateIsRegExpEquivalent(ZoneList<Expression*>* args) {
963 UNIMPLEMENTED_MIPS();
964 }
965
966
967 void CodeGenerator::GenerateHasCachedArrayIndex(ZoneList<Expression*>* args) {
968 UNIMPLEMENTED_MIPS();
969 }
970
971
972 void CodeGenerator::GenerateGetCachedArrayIndex(ZoneList<Expression*>* args) {
973 UNIMPLEMENTED_MIPS();
974 }
975
976
977 void CodeGenerator::GenerateFastAsciiArrayJoin(ZoneList<Expression*>* args) {
978 UNIMPLEMENTED_MIPS();
979 }
980
981
982 void CodeGenerator::VisitCallRuntime(CallRuntime* node) {
983 UNIMPLEMENTED_MIPS();
984 }
985
986
987 void CodeGenerator::VisitUnaryOperation(UnaryOperation* node) {
988 UNIMPLEMENTED_MIPS();
989 }
990
991
992 class DeferredCountOperation: public DeferredCode {
993 public:
994 DeferredCountOperation(Register value,
995 bool is_increment,
996 bool is_postfix,
997 int target_size)
998 : value_(value),
999 is_increment_(is_increment),
1000 is_postfix_(is_postfix),
1001 target_size_(target_size) {}
1002
1003 virtual void Generate() {
1004 UNIMPLEMENTED_MIPS();
1005 }
1006
1007 private:
1008 Register value_;
1009 bool is_increment_;
1010 bool is_postfix_;
1011 int target_size_;
1012 };
1013
1014
1015 void CodeGenerator::VisitCountOperation(CountOperation* node) {
1016 UNIMPLEMENTED_MIPS();
1017 }
1018
1019
1020 void CodeGenerator::GenerateLogicalBooleanOperation(BinaryOperation* node) {
1021 UNIMPLEMENTED_MIPS();
1022 }
1023
1024
1025 void CodeGenerator::VisitBinaryOperation(BinaryOperation* node) {
1026 UNIMPLEMENTED_MIPS();
1027 }
1028
1029
1030 void CodeGenerator::VisitThisFunction(ThisFunction* node) {
1031 UNIMPLEMENTED_MIPS();
1032 }
1033
1034
1035 void CodeGenerator::VisitCompareOperation(CompareOperation* node) {
1036 UNIMPLEMENTED_MIPS();
1037 }
1038
1039
1040 void CodeGenerator::VisitCompareToNull(CompareToNull* node) {
1041 UNIMPLEMENTED_MIPS();
1042 }
1043
1044
1045 class DeferredReferenceGetNamedValue: public DeferredCode {
1046 public:
1047 explicit DeferredReferenceGetNamedValue(Register receiver,
1048 Handle<String> name,
1049 bool is_contextual)
1050 : receiver_(receiver),
1051 name_(name),
1052 is_contextual_(is_contextual),
1053 is_dont_delete_(false) {
1054 set_comment(is_contextual
1055 ? "[ DeferredReferenceGetNamedValue (contextual)"
1056 : "[ DeferredReferenceGetNamedValue");
1057 }
1058
1059 virtual void Generate();
1060
1061 void set_is_dont_delete(bool value) {
1062 ASSERT(is_contextual_);
1063 is_dont_delete_ = value;
1064 }
1065
1066 private:
1067 Register receiver_;
1068 Handle<String> name_;
1069 bool is_contextual_;
1070 bool is_dont_delete_;
1071 };
1072
1073
1074
1075 void DeferredReferenceGetNamedValue::Generate() {
1076 UNIMPLEMENTED_MIPS();
1077 }
1078
1079
1080 class DeferredReferenceGetKeyedValue: public DeferredCode {
1081 public:
1082 DeferredReferenceGetKeyedValue(Register key, Register receiver)
1083 : key_(key), receiver_(receiver) {
1084 set_comment("[ DeferredReferenceGetKeyedValue");
1085 }
1086
1087 virtual void Generate();
1088
1089 private:
1090 Register key_;
1091 Register receiver_;
1092 };
1093
1094
1095 void DeferredReferenceGetKeyedValue::Generate() {
1096 UNIMPLEMENTED_MIPS();
1097 }
1098
1099
1100 class DeferredReferenceSetKeyedValue: public DeferredCode {
1101 public:
1102 DeferredReferenceSetKeyedValue(Register value,
1103 Register key,
1104 Register receiver)
1105 : value_(value), key_(key), receiver_(receiver) {
1106 set_comment("[ DeferredReferenceSetKeyedValue");
1107 }
1108
1109 virtual void Generate();
1110
1111 private:
1112 Register value_;
1113 Register key_;
1114 Register receiver_;
1115 };
1116
1117
1118 void DeferredReferenceSetKeyedValue::Generate() {
1119 UNIMPLEMENTED_MIPS();
1120 }
1121
1122
1123 class DeferredReferenceSetNamedValue: public DeferredCode {
1124 public:
1125 DeferredReferenceSetNamedValue(Register value,
1126 Register receiver,
1127 Handle<String> name)
1128 : value_(value), receiver_(receiver), name_(name) {
1129 set_comment("[ DeferredReferenceSetNamedValue");
1130 }
1131
1132 virtual void Generate();
1133
1134 private:
1135 Register value_;
1136 Register receiver_;
1137 Handle<String> name_;
1138 };
1139
1140
1141 void DeferredReferenceSetNamedValue::Generate() {
1142 UNIMPLEMENTED_MIPS();
1143 }
1144
1145
1146 void CodeGenerator::EmitNamedLoad(Handle<String> name, bool is_contextual) {
1147 UNIMPLEMENTED_MIPS();
1148 }
1149
1150
1151 void CodeGenerator::EmitNamedStore(Handle<String> name, bool is_contextual) {
1152 UNIMPLEMENTED_MIPS();
1153 }
1154
1155
1156 void CodeGenerator::EmitKeyedLoad() {
1157 UNIMPLEMENTED_MIPS();
1158 }
1159
1160
1161 void CodeGenerator::EmitKeyedStore(StaticType* key_type,
1162 WriteBarrierCharacter wb_info) {
1163 UNIMPLEMENTED_MIPS();
1164 }
1165
1166
1167 #ifdef DEBUG
1168 bool CodeGenerator::HasValidEntryRegisters() {
1169 UNIMPLEMENTED_MIPS();
1170 return false;
1171 }
1172 #endif
1173
1174
1175 #undef __
1176 #define __ ACCESS_MASM(masm)
1177
1178 // -----------------------------------------------------------------------------
1179 // Reference support.
1180
1181
1182 Handle<String> Reference::GetName() {
1183 UNIMPLEMENTED_MIPS();
1184 return Handle<String>();
1185 }
1186
1187
1188 void Reference::DupIfPersist() {
1189 UNIMPLEMENTED_MIPS();
1190 }
1191
1192
1193 void Reference::GetValue() {
1194 UNIMPLEMENTED_MIPS();
1195 }
1196
1197
1198 void Reference::SetValue(InitState init_state, WriteBarrierCharacter wb_info) {
1199 UNIMPLEMENTED_MIPS();
1200 }
1201
1202
1203 const char* GenericBinaryOpStub::GetName() {
1204 UNIMPLEMENTED_MIPS();
1205 return name_;
1206 }
1207
1208
1209 #undef __
1210
1211 } } // namespace v8::internal 50 } } // namespace v8::internal
1212 51
1213 #endif // V8_TARGET_ARCH_MIPS 52 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698