| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 } | 753 } |
| 754 } | 754 } |
| 755 } | 755 } |
| 756 | 756 |
| 757 | 757 |
| 758 void FastCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { | 758 void FastCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
| 759 Comment cmnt(masm_, "[ ArrayLiteral"); | 759 Comment cmnt(masm_, "[ ArrayLiteral"); |
| 760 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 760 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 761 __ ldr(r3, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); | 761 __ ldr(r3, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); |
| 762 __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); | 762 __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); |
| 763 __ mov(r1, Operand(expr->literals())); | 763 __ mov(r1, Operand(expr->constant_elements())); |
| 764 __ stm(db_w, sp, r3.bit() | r2.bit() | r1.bit()); | 764 __ stm(db_w, sp, r3.bit() | r2.bit() | r1.bit()); |
| 765 if (expr->depth() > 1) { | 765 if (expr->depth() > 1) { |
| 766 __ CallRuntime(Runtime::kCreateArrayLiteral, 3); | 766 __ CallRuntime(Runtime::kCreateArrayLiteral, 3); |
| 767 } else { | 767 } else { |
| 768 __ CallRuntime(Runtime::kCreateArrayLiteralShallow, 3); | 768 __ CallRuntime(Runtime::kCreateArrayLiteralShallow, 3); |
| 769 } | 769 } |
| 770 | 770 |
| 771 bool result_saved = false; // Is the result saved to the stack? | 771 bool result_saved = false; // Is the result saved to the stack? |
| 772 | 772 |
| 773 // Emit code to evaluate all the non-constant subexpressions and to store | 773 // Emit code to evaluate all the non-constant subexpressions and to store |
| (...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1731 __ pop(result_register()); | 1731 __ pop(result_register()); |
| 1732 ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); | 1732 ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); |
| 1733 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 1733 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
| 1734 __ add(pc, r1, Operand(masm_->CodeObject())); | 1734 __ add(pc, r1, Operand(masm_->CodeObject())); |
| 1735 } | 1735 } |
| 1736 | 1736 |
| 1737 | 1737 |
| 1738 #undef __ | 1738 #undef __ |
| 1739 | 1739 |
| 1740 } } // namespace v8::internal | 1740 } } // namespace v8::internal |
| OLD | NEW |