OLD | NEW |
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 2758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2769 | 2769 |
2770 void FullCodeGenerator::EmitLog(ZoneList<Expression*>* args) { | 2770 void FullCodeGenerator::EmitLog(ZoneList<Expression*>* args) { |
2771 // Conditionally generate a log call. | 2771 // Conditionally generate a log call. |
2772 // Args: | 2772 // Args: |
2773 // 0 (literal string): The type of logging (corresponds to the flags). | 2773 // 0 (literal string): The type of logging (corresponds to the flags). |
2774 // This is used to determine whether or not to generate the log call. | 2774 // This is used to determine whether or not to generate the log call. |
2775 // 1 (string): Format string. Access the string at argument index 2 | 2775 // 1 (string): Format string. Access the string at argument index 2 |
2776 // with '%2s' (see Logger::LogRuntime for all the formats). | 2776 // with '%2s' (see Logger::LogRuntime for all the formats). |
2777 // 2 (array): Arguments to the format string. | 2777 // 2 (array): Arguments to the format string. |
2778 ASSERT_EQ(args->length(), 3); | 2778 ASSERT_EQ(args->length(), 3); |
2779 #ifdef ENABLE_LOGGING_AND_PROFILING | |
2780 if (CodeGenerator::ShouldGenerateLog(args->at(0))) { | 2779 if (CodeGenerator::ShouldGenerateLog(args->at(0))) { |
2781 VisitForStackValue(args->at(1)); | 2780 VisitForStackValue(args->at(1)); |
2782 VisitForStackValue(args->at(2)); | 2781 VisitForStackValue(args->at(2)); |
2783 __ CallRuntime(Runtime::kLog, 2); | 2782 __ CallRuntime(Runtime::kLog, 2); |
2784 } | 2783 } |
2785 #endif | 2784 |
2786 // Finally, we're expected to leave a value on the top of the stack. | 2785 // Finally, we're expected to leave a value on the top of the stack. |
2787 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); | 2786 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); |
2788 context()->Plug(r0); | 2787 context()->Plug(r0); |
2789 } | 2788 } |
2790 | 2789 |
2791 | 2790 |
2792 void FullCodeGenerator::EmitRandomHeapNumber(ZoneList<Expression*>* args) { | 2791 void FullCodeGenerator::EmitRandomHeapNumber(ZoneList<Expression*>* args) { |
2793 ASSERT(args->length() == 0); | 2792 ASSERT(args->length() == 0); |
2794 | 2793 |
2795 Label slow_allocate_heapnumber; | 2794 Label slow_allocate_heapnumber; |
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4293 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 4292 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
4294 __ add(pc, r1, Operand(masm_->CodeObject())); | 4293 __ add(pc, r1, Operand(masm_->CodeObject())); |
4295 } | 4294 } |
4296 | 4295 |
4297 | 4296 |
4298 #undef __ | 4297 #undef __ |
4299 | 4298 |
4300 } } // namespace v8::internal | 4299 } } // namespace v8::internal |
4301 | 4300 |
4302 #endif // V8_TARGET_ARCH_ARM | 4301 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |