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

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

Issue 7696020: MIPS: port Parse harmony let declarations. (Closed)
Patch Set: Created 9 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 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
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 // We know that we have written a function, which is not a smi. 740 // We know that we have written a function, which is not a smi.
741 __ mov(a1, cp); 741 __ mov(a1, cp);
742 __ RecordWrite(a1, Operand(offset), a2, result_register()); 742 __ RecordWrite(a1, Operand(offset), a2, result_register());
743 } 743 }
744 break; 744 break;
745 745
746 case Slot::LOOKUP: { 746 case Slot::LOOKUP: {
747 __ li(a2, Operand(variable->name())); 747 __ li(a2, Operand(variable->name()));
748 // Declaration nodes are always introduced in one of two modes. 748 // Declaration nodes are always introduced in one of two modes.
749 ASSERT(mode == Variable::VAR || 749 ASSERT(mode == Variable::VAR ||
750 mode == Variable::CONST); 750 mode == Variable::CONST ||
751 PropertyAttributes attr = 751 mode == Variable::LET);
752 (mode == Variable::VAR) ? NONE : READ_ONLY; 752 PropertyAttributes attr = (mode == Variable::CONST) ? READ_ONLY : NONE;
753 __ li(a1, Operand(Smi::FromInt(attr))); 753 __ li(a1, Operand(Smi::FromInt(attr)));
754 // Push initial value, if any. 754 // Push initial value, if any.
755 // Note: For variables we must not push an initial value (such as 755 // Note: For variables we must not push an initial value (such as
756 // 'undefined') because we may have a (legal) redeclaration and we 756 // 'undefined') because we may have a (legal) redeclaration and we
757 // must not destroy the current value. 757 // must not destroy the current value.
758 if (mode == Variable::CONST) { 758 if (mode == Variable::CONST) {
759 __ LoadRoot(a0, Heap::kTheHoleValueRootIndex); 759 __ LoadRoot(a0, Heap::kTheHoleValueRootIndex);
760 __ Push(cp, a2, a1, a0); 760 __ Push(cp, a2, a1, a0);
761 } else if (function != NULL) { 761 } else if (function != NULL) {
762 __ Push(cp, a2, a1); 762 __ Push(cp, a2, a1);
(...skipping 3555 matching lines...) Expand 10 before | Expand all | Expand 10 after
4318 __ Addu(at, a1, Operand(masm_->CodeObject())); 4318 __ Addu(at, a1, Operand(masm_->CodeObject()));
4319 __ Jump(at); 4319 __ Jump(at);
4320 } 4320 }
4321 4321
4322 4322
4323 #undef __ 4323 #undef __
4324 4324
4325 } } // namespace v8::internal 4325 } } // namespace v8::internal
4326 4326
4327 #endif // V8_TARGET_ARCH_MIPS 4327 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698