blob: c1149dfd1dc32ebd760719b660ddbe396b1c2889 [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
29#include "v8.h"
30
Leon Clarkef7060e22010-06-03 12:02:55 +010031#if defined(V8_TARGET_ARCH_MIPS)
32
Andrei Popescu31002712010-02-23 13:46:05 +000033#include "bootstrapper.h"
Steve Block44f0eee2011-05-26 01:26:41 +010034#include "code-stubs.h"
Andrei Popescu31002712010-02-23 13:46:05 +000035#include "codegen-inl.h"
Steve Block6ded16b2010-05-10 14:33:55 +010036#include "compiler.h"
Andrei Popescu31002712010-02-23 13:46:05 +000037#include "debug.h"
Steve Block6ded16b2010-05-10 14:33:55 +010038#include "ic-inl.h"
Steve Block44f0eee2011-05-26 01:26:41 +010039#include "jsregexp.h"
40#include "jump-target-inl.h"
Andrei Popescu31002712010-02-23 13:46:05 +000041#include "parser.h"
Steve Block44f0eee2011-05-26 01:26:41 +010042#include "regexp-macro-assembler.h"
43#include "regexp-stack.h"
Andrei Popescu31002712010-02-23 13:46:05 +000044#include "register-allocator-inl.h"
45#include "runtime.h"
46#include "scopes.h"
Steve Block44f0eee2011-05-26 01:26:41 +010047#include "stub-cache.h"
Steve Block6ded16b2010-05-10 14:33:55 +010048#include "virtual-frame-inl.h"
Steve Block44f0eee2011-05-26 01:26:41 +010049#include "virtual-frame-mips-inl.h"
Andrei Popescu31002712010-02-23 13:46:05 +000050
51namespace v8 {
52namespace internal {
53
Steve Block44f0eee2011-05-26 01:26:41 +010054
Andrei Popescu31002712010-02-23 13:46:05 +000055#define __ ACCESS_MASM(masm_)
56
Steve Block44f0eee2011-05-26 01:26:41 +010057// -------------------------------------------------------------------------
Andrei Popescu31002712010-02-23 13:46:05 +000058// Platform-specific DeferredCode functions.
59
Andrei Popescu31002712010-02-23 13:46:05 +000060void DeferredCode::SaveRegisters() {
Steve Block44f0eee2011-05-26 01:26:41 +010061 // 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.
Andrei Popescu31002712010-02-23 13:46:05 +000064}
65
66
67void DeferredCode::RestoreRegisters() {
Steve Block44f0eee2011-05-26 01:26:41 +010068}
69
70
71// -------------------------------------------------------------------------
72// Platform-specific RuntimeCallHelper functions.
73
74void VirtualFrameRuntimeCallHelper::BeforeCall(MacroAssembler* masm) const {
75 frame_state_->frame()->AssertIsSpilled();
76}
77
78
79void VirtualFrameRuntimeCallHelper::AfterCall(MacroAssembler* masm) const {
80}
81
82
83void StubRuntimeCallHelper::BeforeCall(MacroAssembler* masm) const {
84 masm->EnterInternalFrame();
85}
86
87
88void StubRuntimeCallHelper::AfterCall(MacroAssembler* masm) const {
89 masm->LeaveInternalFrame();
Andrei Popescu31002712010-02-23 13:46:05 +000090}
91
92
Steve Block6ded16b2010-05-10 14:33:55 +010093// -----------------------------------------------------------------------------
94// CodeGenState implementation.
95
96CodeGenState::CodeGenState(CodeGenerator* owner)
97 : owner_(owner),
Steve Block44f0eee2011-05-26 01:26:41 +010098 previous_(owner->state()) {
99 owner->set_state(this);
Steve Block6ded16b2010-05-10 14:33:55 +0100100}
101
102
Steve Block44f0eee2011-05-26 01:26:41 +0100103ConditionCodeGenState::ConditionCodeGenState(CodeGenerator* owner,
Steve Block6ded16b2010-05-10 14:33:55 +0100104 JumpTarget* true_target,
105 JumpTarget* false_target)
Steve Block44f0eee2011-05-26 01:26:41 +0100106 : CodeGenState(owner),
Steve Block6ded16b2010-05-10 14:33:55 +0100107 true_target_(true_target),
Steve Block44f0eee2011-05-26 01:26:41 +0100108 false_target_(false_target) {
109 owner->set_state(this);
110}
111
112
113TypeInfoCodeGenState::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);
Steve Block6ded16b2010-05-10 14:33:55 +0100120}
121
122
123CodeGenState::~CodeGenState() {
124 ASSERT(owner_->state() == this);
125 owner_->set_state(previous_);
126}
127
128
Steve Block44f0eee2011-05-26 01:26:41 +0100129TypeInfoCodeGenState::~TypeInfoCodeGenState() {
130 owner()->set_type_info(slot_, old_type_info_);
131}
132
133
Steve Block6ded16b2010-05-10 14:33:55 +0100134// -----------------------------------------------------------------------------
Steve Block44f0eee2011-05-26 01:26:41 +0100135// CodeGenerator implementation.
Andrei Popescu31002712010-02-23 13:46:05 +0000136
137CodeGenerator::CodeGenerator(MacroAssembler* masm)
138 : deferred_(8),
139 masm_(masm),
Steve Block44f0eee2011-05-26 01:26:41 +0100140 info_(NULL),
Andrei Popescu31002712010-02-23 13:46:05 +0000141 frame_(NULL),
142 allocator_(NULL),
143 cc_reg_(cc_always),
144 state_(NULL),
Steve Block44f0eee2011-05-26 01:26:41 +0100145 loop_nesting_(0),
146 type_info_(NULL),
147 function_return_(JumpTarget::BIDIRECTIONAL),
Andrei Popescu31002712010-02-23 13:46:05 +0000148 function_return_is_shadowed_(false) {
149}
150
151
152// Calling conventions:
Steve Block6ded16b2010-05-10 14:33:55 +0100153// fp: caller's frame pointer
Andrei Popescu31002712010-02-23 13:46:05 +0000154// sp: stack pointer
155// a1: called JS function
156// cp: callee's context
157
Steve Block6ded16b2010-05-10 14:33:55 +0100158void CodeGenerator::Generate(CompilationInfo* info) {
Steve Block44f0eee2011-05-26 01:26:41 +0100159 UNIMPLEMENTED_MIPS();
Steve Block6ded16b2010-05-10 14:33:55 +0100160}
161
162
Steve Block44f0eee2011-05-26 01:26:41 +0100163int CodeGenerator::NumberOfSlot(Slot* slot) {
164 UNIMPLEMENTED_MIPS();
165 return 0;
Steve Block6ded16b2010-05-10 14:33:55 +0100166}
167
168
169MemOperand CodeGenerator::SlotOperand(Slot* slot, Register tmp) {
Steve Block44f0eee2011-05-26 01:26:41 +0100170 UNIMPLEMENTED_MIPS();
171 return MemOperand(zero_reg, 0);
Steve Block6ded16b2010-05-10 14:33:55 +0100172}
173
174
Steve Block44f0eee2011-05-26 01:26:41 +0100175MemOperand 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
Steve Block6ded16b2010-05-10 14:33:55 +0100185void CodeGenerator::LoadCondition(Expression* x,
186 JumpTarget* true_target,
187 JumpTarget* false_target,
188 bool force_cc) {
Steve Block44f0eee2011-05-26 01:26:41 +0100189 UNIMPLEMENTED_MIPS();
Steve Block6ded16b2010-05-10 14:33:55 +0100190}
191
192
193void CodeGenerator::Load(Expression* x) {
Steve Block44f0eee2011-05-26 01:26:41 +0100194 UNIMPLEMENTED_MIPS();
Steve Block6ded16b2010-05-10 14:33:55 +0100195}
196
197
198void CodeGenerator::LoadGlobal() {
Steve Block44f0eee2011-05-26 01:26:41 +0100199 UNIMPLEMENTED_MIPS();
Steve Block6ded16b2010-05-10 14:33:55 +0100200}
201
202
Steve Block44f0eee2011-05-26 01:26:41 +0100203void CodeGenerator::LoadGlobalReceiver(Register scratch) {
204 UNIMPLEMENTED_MIPS();
Steve Block6ded16b2010-05-10 14:33:55 +0100205}
206
207
Steve Block44f0eee2011-05-26 01:26:41 +0100208ArgumentsAllocationMode CodeGenerator::ArgumentsMode() {
209 UNIMPLEMENTED_MIPS();
210 return EAGER_ARGUMENTS_ALLOCATION;
211}
Steve Block6ded16b2010-05-10 14:33:55 +0100212
Steve Block6ded16b2010-05-10 14:33:55 +0100213
Steve Block44f0eee2011-05-26 01:26:41 +0100214void CodeGenerator::StoreArgumentsObject(bool initial) {
215 UNIMPLEMENTED_MIPS();
216}
217
218
219void CodeGenerator::LoadTypeofExpression(Expression* x) {
220 UNIMPLEMENTED_MIPS();
221}
222
223
224Reference::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
235Reference::~Reference() {
236 UNIMPLEMENTED_MIPS();
237}
238
239
240void CodeGenerator::LoadReference(Reference* ref) {
241 UNIMPLEMENTED_MIPS();
242}
243
244
245void 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'.
253void CodeGenerator::ToBoolean(JumpTarget* true_target,
254 JumpTarget* false_target) {
255 UNIMPLEMENTED_MIPS();
256}
257
258
259void CodeGenerator::GenericBinaryOperation(Token::Value op,
260 OverwriteMode overwrite_mode,
261 GenerateInlineSmi inline_smi,
262 int constant_rhs) {
263 UNIMPLEMENTED_MIPS();
264}
265
266
267class 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");
Steve Block6ded16b2010-05-10 14:33:55 +0100280 }
Steve Block44f0eee2011-05-26 01:26:41 +0100281
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.
313void 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.
322void 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.
333void DeferredInlineSmiOperation::Generate() {
334 UNIMPLEMENTED_MIPS();
335}
336
337
338// Convert and write the integer answer into heap_number.
339void DeferredInlineSmiOperation::WriteNonSmiAnswer(Register answer,
340 Register heap_number,
341 Register scratch) {
342 UNIMPLEMENTED_MIPS();
343}
344
345
346void DeferredInlineSmiOperation::GenerateNonSmiInput() {
347 UNIMPLEMENTED_MIPS();
348}
349
350
351void DeferredInlineSmiOperation::GenerateAnswerOutOfRange() {
352 UNIMPLEMENTED_MIPS();
353}
354
355
356void 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)
367void CodeGenerator::Comparison(Condition cc,
368 Expression* left,
369 Expression* right,
370 bool strict) {
371 UNIMPLEMENTED_MIPS();
372}
373
374
375void CodeGenerator::CallWithArguments(ZoneList<Expression*>* args,
376 CallFunctionFlags flags,
377 int position) {
378 UNIMPLEMENTED_MIPS();
379}
380
381
382void CodeGenerator::CallApplyLazy(Expression* applicand,
383 Expression* receiver,
384 VariableProxy* arguments,
385 int position) {
386 UNIMPLEMENTED_MIPS();
387}
388
389
390void CodeGenerator::Branch(bool if_true, JumpTarget* target) {
391 UNIMPLEMENTED_MIPS();
392}
393
394
395void CodeGenerator::CheckStack() {
396 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +0000397}
398
399
400void CodeGenerator::VisitStatements(ZoneList<Statement*>* statements) {
Steve Block44f0eee2011-05-26 01:26:41 +0100401 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +0000402}
403
404
405void CodeGenerator::VisitBlock(Block* node) {
406 UNIMPLEMENTED_MIPS();
407}
408
409
410void CodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
Steve Block44f0eee2011-05-26 01:26:41 +0100411 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +0000412}
413
414
415void CodeGenerator::VisitDeclaration(Declaration* node) {
416 UNIMPLEMENTED_MIPS();
417}
418
419
420void CodeGenerator::VisitExpressionStatement(ExpressionStatement* node) {
Steve Block44f0eee2011-05-26 01:26:41 +0100421 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +0000422}
423
424
425void CodeGenerator::VisitEmptyStatement(EmptyStatement* node) {
426 UNIMPLEMENTED_MIPS();
427}
428
429
430void CodeGenerator::VisitIfStatement(IfStatement* node) {
431 UNIMPLEMENTED_MIPS();
432}
433
434
435void CodeGenerator::VisitContinueStatement(ContinueStatement* node) {
436 UNIMPLEMENTED_MIPS();
437}
438
439
440void CodeGenerator::VisitBreakStatement(BreakStatement* node) {
441 UNIMPLEMENTED_MIPS();
442}
443
444
445void CodeGenerator::VisitReturnStatement(ReturnStatement* node) {
Steve Block44f0eee2011-05-26 01:26:41 +0100446 UNIMPLEMENTED_MIPS();
447}
Steve Block6ded16b2010-05-10 14:33:55 +0100448
Steve Block6ded16b2010-05-10 14:33:55 +0100449
Steve Block44f0eee2011-05-26 01:26:41 +0100450void CodeGenerator::GenerateReturnSequence() {
451 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +0000452}
453
454
455void CodeGenerator::VisitWithEnterStatement(WithEnterStatement* node) {
456 UNIMPLEMENTED_MIPS();
457}
458
459
460void CodeGenerator::VisitWithExitStatement(WithExitStatement* node) {
461 UNIMPLEMENTED_MIPS();
462}
463
464
465void CodeGenerator::VisitSwitchStatement(SwitchStatement* node) {
466 UNIMPLEMENTED_MIPS();
467}
468
469
470void CodeGenerator::VisitDoWhileStatement(DoWhileStatement* node) {
471 UNIMPLEMENTED_MIPS();
472}
473
474
475void CodeGenerator::VisitWhileStatement(WhileStatement* node) {
476 UNIMPLEMENTED_MIPS();
477}
478
479
480void CodeGenerator::VisitForStatement(ForStatement* node) {
481 UNIMPLEMENTED_MIPS();
482}
483
484
485void CodeGenerator::VisitForInStatement(ForInStatement* node) {
486 UNIMPLEMENTED_MIPS();
487}
488
489
490void CodeGenerator::VisitTryCatchStatement(TryCatchStatement* node) {
491 UNIMPLEMENTED_MIPS();
492}
493
494
495void CodeGenerator::VisitTryFinallyStatement(TryFinallyStatement* node) {
496 UNIMPLEMENTED_MIPS();
497}
498
499
500void CodeGenerator::VisitDebuggerStatement(DebuggerStatement* node) {
501 UNIMPLEMENTED_MIPS();
502}
503
504
Steve Block44f0eee2011-05-26 01:26:41 +0100505void CodeGenerator::InstantiateFunction(
506 Handle<SharedFunctionInfo> function_info,
507 bool pretenure) {
508 UNIMPLEMENTED_MIPS();
509}
510
511
Andrei Popescu31002712010-02-23 13:46:05 +0000512void CodeGenerator::VisitFunctionLiteral(FunctionLiteral* node) {
513 UNIMPLEMENTED_MIPS();
514}
515
516
Steve Block6ded16b2010-05-10 14:33:55 +0100517void CodeGenerator::VisitSharedFunctionInfoLiteral(
518 SharedFunctionInfoLiteral* node) {
Andrei Popescu31002712010-02-23 13:46:05 +0000519 UNIMPLEMENTED_MIPS();
520}
521
522
523void CodeGenerator::VisitConditional(Conditional* node) {
524 UNIMPLEMENTED_MIPS();
525}
526
527
Steve Block44f0eee2011-05-26 01:26:41 +0100528void CodeGenerator::LoadFromSlot(Slot* slot, TypeofState typeof_state) {
529 UNIMPLEMENTED_MIPS();
530}
531
532
533void CodeGenerator::LoadFromSlotCheckForArguments(Slot* slot,
534 TypeofState state) {
535 UNIMPLEMENTED_MIPS();
536}
537
538
539void CodeGenerator::StoreToSlot(Slot* slot, InitState init_state) {
540 UNIMPLEMENTED_MIPS();
541}
542
543
544void CodeGenerator::LoadFromGlobalSlotCheckExtensions(Slot* slot,
545 TypeofState typeof_state,
546 JumpTarget* slow) {
547 UNIMPLEMENTED_MIPS();
548}
549
550
551void CodeGenerator::EmitDynamicLoadFromSlotFastCase(Slot* slot,
552 TypeofState typeof_state,
553 JumpTarget* slow,
554 JumpTarget* done) {
555 UNIMPLEMENTED_MIPS();
556}
557
558
Andrei Popescu31002712010-02-23 13:46:05 +0000559void CodeGenerator::VisitSlot(Slot* node) {
Steve Block44f0eee2011-05-26 01:26:41 +0100560 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +0000561}
562
563
564void CodeGenerator::VisitVariableProxy(VariableProxy* node) {
Steve Block44f0eee2011-05-26 01:26:41 +0100565 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +0000566}
567
568
569void CodeGenerator::VisitLiteral(Literal* node) {
Steve Block44f0eee2011-05-26 01:26:41 +0100570 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +0000571}
572
573
574void CodeGenerator::VisitRegExpLiteral(RegExpLiteral* node) {
575 UNIMPLEMENTED_MIPS();
576}
577
578
579void CodeGenerator::VisitObjectLiteral(ObjectLiteral* node) {
580 UNIMPLEMENTED_MIPS();
581}
582
583
584void CodeGenerator::VisitArrayLiteral(ArrayLiteral* node) {
585 UNIMPLEMENTED_MIPS();
586}
587
588
589void CodeGenerator::VisitCatchExtensionObject(CatchExtensionObject* node) {
590 UNIMPLEMENTED_MIPS();
591}
592
593
Steve Block44f0eee2011-05-26 01:26:41 +0100594void CodeGenerator::EmitSlotAssignment(Assignment* node) {
595 UNIMPLEMENTED_MIPS();
596}
597
598
599void CodeGenerator::EmitNamedPropertyAssignment(Assignment* node) {
600 UNIMPLEMENTED_MIPS();
601}
602
603
604void CodeGenerator::EmitKeyedPropertyAssignment(Assignment* node) {
605 UNIMPLEMENTED_MIPS();
606}
607
608
Andrei Popescu31002712010-02-23 13:46:05 +0000609void CodeGenerator::VisitAssignment(Assignment* node) {
Steve Block44f0eee2011-05-26 01:26:41 +0100610 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +0000611}
612
613
614void CodeGenerator::VisitThrow(Throw* node) {
615 UNIMPLEMENTED_MIPS();
616}
617
618
619void CodeGenerator::VisitProperty(Property* node) {
620 UNIMPLEMENTED_MIPS();
621}
622
623
624void CodeGenerator::VisitCall(Call* node) {
Steve Block44f0eee2011-05-26 01:26:41 +0100625 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +0000626}
627
628
629void CodeGenerator::VisitCallNew(CallNew* node) {
630 UNIMPLEMENTED_MIPS();
631}
632
633
634void CodeGenerator::GenerateClassOf(ZoneList<Expression*>* args) {
635 UNIMPLEMENTED_MIPS();
636}
637
638
639void CodeGenerator::GenerateValueOf(ZoneList<Expression*>* args) {
640 UNIMPLEMENTED_MIPS();
641}
642
643
644void CodeGenerator::GenerateSetValueOf(ZoneList<Expression*>* args) {
645 UNIMPLEMENTED_MIPS();
646}
647
648
649void CodeGenerator::GenerateIsSmi(ZoneList<Expression*>* args) {
650 UNIMPLEMENTED_MIPS();
651}
652
653
654void CodeGenerator::GenerateLog(ZoneList<Expression*>* args) {
655 UNIMPLEMENTED_MIPS();
656}
657
658
659void CodeGenerator::GenerateIsNonNegativeSmi(ZoneList<Expression*>* args) {
660 UNIMPLEMENTED_MIPS();
661}
662
663
Steve Block6ded16b2010-05-10 14:33:55 +0100664void CodeGenerator::GenerateMathPow(ZoneList<Expression*>* args) {
665 UNIMPLEMENTED_MIPS();
666}
667
668
Steve Block6ded16b2010-05-10 14:33:55 +0100669void CodeGenerator::GenerateMathSqrt(ZoneList<Expression*>* args) {
670 UNIMPLEMENTED_MIPS();
671}
672
673
Steve Block44f0eee2011-05-26 01:26:41 +0100674class 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
708void CodeGenerator::GenerateStringCharCodeAt(ZoneList<Expression*>* args) {
Andrei Popescu31002712010-02-23 13:46:05 +0000709 UNIMPLEMENTED_MIPS();
710}
711
712
Steve Block44f0eee2011-05-26 01:26:41 +0100713class 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
733void CodeGenerator::GenerateStringCharFromCode(ZoneList<Expression*>* args) {
734 UNIMPLEMENTED_MIPS();
735}
736
737
738class 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
774void CodeGenerator::GenerateStringCharAt(ZoneList<Expression*>* args) {
Steve Block6ded16b2010-05-10 14:33:55 +0100775 UNIMPLEMENTED_MIPS();
776}
777
778
Andrei Popescu31002712010-02-23 13:46:05 +0000779void CodeGenerator::GenerateIsArray(ZoneList<Expression*>* args) {
780 UNIMPLEMENTED_MIPS();
781}
782
783
Andrei Popescu402d9372010-02-26 13:31:12 +0000784void CodeGenerator::GenerateIsRegExp(ZoneList<Expression*>* args) {
785 UNIMPLEMENTED_MIPS();
786}
787
788
Steve Block44f0eee2011-05-26 01:26:41 +0100789void CodeGenerator::GenerateIsObject(ZoneList<Expression*>* args) {
790 UNIMPLEMENTED_MIPS();
791}
792
793
794void CodeGenerator::GenerateIsSpecObject(ZoneList<Expression*>* args) {
795 UNIMPLEMENTED_MIPS();
796}
797
798
799class 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
822void CodeGenerator::GenerateIsStringWrapperSafeForDefaultValueOf(
823 ZoneList<Expression*>* args) {
824 UNIMPLEMENTED_MIPS();
825}
826
827
828void CodeGenerator::GenerateIsFunction(ZoneList<Expression*>* args) {
829 UNIMPLEMENTED_MIPS();
830}
831
832
833void CodeGenerator::GenerateIsUndetectableObject(ZoneList<Expression*>* args) {
834 UNIMPLEMENTED_MIPS();
835}
836
837
Andrei Popescu31002712010-02-23 13:46:05 +0000838void CodeGenerator::GenerateIsConstructCall(ZoneList<Expression*>* args) {
839 UNIMPLEMENTED_MIPS();
840}
841
842
843void CodeGenerator::GenerateArgumentsLength(ZoneList<Expression*>* args) {
844 UNIMPLEMENTED_MIPS();
845}
846
847
Steve Block6ded16b2010-05-10 14:33:55 +0100848void CodeGenerator::GenerateArguments(ZoneList<Expression*>* args) {
Andrei Popescu31002712010-02-23 13:46:05 +0000849 UNIMPLEMENTED_MIPS();
850}
851
852
Steve Block44f0eee2011-05-26 01:26:41 +0100853void CodeGenerator::GenerateRandomHeapNumber(
854 ZoneList<Expression*>* args) {
Andrei Popescu31002712010-02-23 13:46:05 +0000855 UNIMPLEMENTED_MIPS();
856}
857
858
859void CodeGenerator::GenerateStringAdd(ZoneList<Expression*>* args) {
860 UNIMPLEMENTED_MIPS();
861}
862
863
864void CodeGenerator::GenerateSubString(ZoneList<Expression*>* args) {
865 UNIMPLEMENTED_MIPS();
866}
867
868
869void CodeGenerator::GenerateStringCompare(ZoneList<Expression*>* args) {
870 UNIMPLEMENTED_MIPS();
871}
872
873
874void CodeGenerator::GenerateRegExpExec(ZoneList<Expression*>* args) {
875 UNIMPLEMENTED_MIPS();
876}
877
878
Steve Block44f0eee2011-05-26 01:26:41 +0100879void CodeGenerator::GenerateRegExpConstructResult(ZoneList<Expression*>* args) {
880 UNIMPLEMENTED_MIPS();
881}
882
883
884class 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
898void DeferredSearchCache::Generate() {
899 UNIMPLEMENTED_MIPS();
900}
901
902
903void CodeGenerator::GenerateGetFromCache(ZoneList<Expression*>* args) {
904 UNIMPLEMENTED_MIPS();
905}
906
907
Andrei Popescu402d9372010-02-26 13:31:12 +0000908void CodeGenerator::GenerateNumberToString(ZoneList<Expression*>* args) {
909 UNIMPLEMENTED_MIPS();
910}
911
912
Steve Block44f0eee2011-05-26 01:26:41 +0100913class 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
927void DeferredSwapElements::Generate() {
928 UNIMPLEMENTED_MIPS();
929}
930
931
932void CodeGenerator::GenerateSwapElements(ZoneList<Expression*>* args) {
933 UNIMPLEMENTED_MIPS();
934}
935
936
937void CodeGenerator::GenerateCallFunction(ZoneList<Expression*>* args) {
938 UNIMPLEMENTED_MIPS();
939}
940
941
942void CodeGenerator::GenerateMathSin(ZoneList<Expression*>* args) {
943 UNIMPLEMENTED_MIPS();
944}
945
946
947void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) {
948 UNIMPLEMENTED_MIPS();
949}
950
951
952void CodeGenerator::GenerateMathLog(ZoneList<Expression*>* args) {
953 UNIMPLEMENTED_MIPS();
954}
955
956
957void CodeGenerator::GenerateObjectEquals(ZoneList<Expression*>* args) {
958 UNIMPLEMENTED_MIPS();
959}
960
961
962void CodeGenerator::GenerateIsRegExpEquivalent(ZoneList<Expression*>* args) {
963 UNIMPLEMENTED_MIPS();
964}
965
966
967void CodeGenerator::GenerateHasCachedArrayIndex(ZoneList<Expression*>* args) {
968 UNIMPLEMENTED_MIPS();
969}
970
971
972void CodeGenerator::GenerateGetCachedArrayIndex(ZoneList<Expression*>* args) {
973 UNIMPLEMENTED_MIPS();
974}
975
976
977void CodeGenerator::GenerateFastAsciiArrayJoin(ZoneList<Expression*>* args) {
978 UNIMPLEMENTED_MIPS();
979}
980
981
Andrei Popescu31002712010-02-23 13:46:05 +0000982void CodeGenerator::VisitCallRuntime(CallRuntime* node) {
983 UNIMPLEMENTED_MIPS();
984}
985
986
987void CodeGenerator::VisitUnaryOperation(UnaryOperation* node) {
988 UNIMPLEMENTED_MIPS();
989}
990
991
Steve Block44f0eee2011-05-26 01:26:41 +0100992class 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
Andrei Popescu31002712010-02-23 13:46:05 +00001015void CodeGenerator::VisitCountOperation(CountOperation* node) {
1016 UNIMPLEMENTED_MIPS();
1017}
1018
1019
Steve Block44f0eee2011-05-26 01:26:41 +01001020void CodeGenerator::GenerateLogicalBooleanOperation(BinaryOperation* node) {
1021 UNIMPLEMENTED_MIPS();
1022}
1023
1024
Andrei Popescu31002712010-02-23 13:46:05 +00001025void CodeGenerator::VisitBinaryOperation(BinaryOperation* node) {
1026 UNIMPLEMENTED_MIPS();
1027}
1028
1029
1030void CodeGenerator::VisitThisFunction(ThisFunction* node) {
1031 UNIMPLEMENTED_MIPS();
1032}
1033
1034
1035void CodeGenerator::VisitCompareOperation(CompareOperation* node) {
1036 UNIMPLEMENTED_MIPS();
1037}
1038
1039
Steve Block44f0eee2011-05-26 01:26:41 +01001040void CodeGenerator::VisitCompareToNull(CompareToNull* node) {
1041 UNIMPLEMENTED_MIPS();
1042}
1043
1044
1045class 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
1075void DeferredReferenceGetNamedValue::Generate() {
1076 UNIMPLEMENTED_MIPS();
1077}
1078
1079
1080class 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
1095void DeferredReferenceGetKeyedValue::Generate() {
1096 UNIMPLEMENTED_MIPS();
1097}
1098
1099
1100class 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
1118void DeferredReferenceSetKeyedValue::Generate() {
1119 UNIMPLEMENTED_MIPS();
1120}
1121
1122
1123class 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
1141void DeferredReferenceSetNamedValue::Generate() {
1142 UNIMPLEMENTED_MIPS();
1143}
1144
1145
1146void CodeGenerator::EmitNamedLoad(Handle<String> name, bool is_contextual) {
1147 UNIMPLEMENTED_MIPS();
1148}
1149
1150
1151void CodeGenerator::EmitNamedStore(Handle<String> name, bool is_contextual) {
1152 UNIMPLEMENTED_MIPS();
1153}
1154
1155
1156void CodeGenerator::EmitKeyedLoad() {
1157 UNIMPLEMENTED_MIPS();
1158}
1159
1160
1161void CodeGenerator::EmitKeyedStore(StaticType* key_type,
1162 WriteBarrierCharacter wb_info) {
1163 UNIMPLEMENTED_MIPS();
1164}
1165
1166
Andrei Popescu31002712010-02-23 13:46:05 +00001167#ifdef DEBUG
Steve Block44f0eee2011-05-26 01:26:41 +01001168bool CodeGenerator::HasValidEntryRegisters() {
1169 UNIMPLEMENTED_MIPS();
1170 return false;
1171}
Andrei Popescu31002712010-02-23 13:46:05 +00001172#endif
1173
1174
1175#undef __
1176#define __ ACCESS_MASM(masm)
1177
Steve Block6ded16b2010-05-10 14:33:55 +01001178// -----------------------------------------------------------------------------
Steve Block44f0eee2011-05-26 01:26:41 +01001179// Reference support.
Steve Block6ded16b2010-05-10 14:33:55 +01001180
1181
1182Handle<String> Reference::GetName() {
Steve Block44f0eee2011-05-26 01:26:41 +01001183 UNIMPLEMENTED_MIPS();
1184 return Handle<String>();
1185}
1186
1187
1188void Reference::DupIfPersist() {
1189 UNIMPLEMENTED_MIPS();
Steve Block6ded16b2010-05-10 14:33:55 +01001190}
1191
1192
1193void Reference::GetValue() {
Andrei Popescu31002712010-02-23 13:46:05 +00001194 UNIMPLEMENTED_MIPS();
Andrei Popescu31002712010-02-23 13:46:05 +00001195}
1196
1197
Steve Block44f0eee2011-05-26 01:26:41 +01001198void Reference::SetValue(InitState init_state, WriteBarrierCharacter wb_info) {
Steve Block6ded16b2010-05-10 14:33:55 +01001199 UNIMPLEMENTED_MIPS();
Steve Block6ded16b2010-05-10 14:33:55 +01001200}
1201
1202
Steve Block44f0eee2011-05-26 01:26:41 +01001203const char* GenericBinaryOpStub::GetName() {
Andrei Popescu31002712010-02-23 13:46:05 +00001204 UNIMPLEMENTED_MIPS();
Steve Block44f0eee2011-05-26 01:26:41 +01001205 return name_;
Andrei Popescu31002712010-02-23 13:46:05 +00001206}
1207
1208
1209#undef __
1210
1211} } // namespace v8::internal
Leon Clarkef7060e22010-06-03 12:02:55 +01001212
1213#endif // V8_TARGET_ARCH_MIPS