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 2766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2777 | 2777 |
2778 void FullCodeGenerator::EmitLog(ZoneList<Expression*>* args) { | 2778 void FullCodeGenerator::EmitLog(ZoneList<Expression*>* args) { |
2779 // Conditionally generate a log call. | 2779 // Conditionally generate a log call. |
2780 // Args: | 2780 // Args: |
2781 // 0 (literal string): The type of logging (corresponds to the flags). | 2781 // 0 (literal string): The type of logging (corresponds to the flags). |
2782 // This is used to determine whether or not to generate the log call. | 2782 // This is used to determine whether or not to generate the log call. |
2783 // 1 (string): Format string. Access the string at argument index 2 | 2783 // 1 (string): Format string. Access the string at argument index 2 |
2784 // with '%2s' (see Logger::LogRuntime for all the formats). | 2784 // with '%2s' (see Logger::LogRuntime for all the formats). |
2785 // 2 (array): Arguments to the format string. | 2785 // 2 (array): Arguments to the format string. |
2786 ASSERT_EQ(args->length(), 3); | 2786 ASSERT_EQ(args->length(), 3); |
2787 #ifdef ENABLE_LOGGING_AND_PROFILING | |
2788 if (CodeGenerator::ShouldGenerateLog(args->at(0))) { | 2787 if (CodeGenerator::ShouldGenerateLog(args->at(0))) { |
2789 VisitForStackValue(args->at(1)); | 2788 VisitForStackValue(args->at(1)); |
2790 VisitForStackValue(args->at(2)); | 2789 VisitForStackValue(args->at(2)); |
2791 __ CallRuntime(Runtime::kLog, 2); | 2790 __ CallRuntime(Runtime::kLog, 2); |
2792 } | 2791 } |
2793 #endif | 2792 |
2794 // Finally, we're expected to leave a value on the top of the stack. | 2793 // Finally, we're expected to leave a value on the top of the stack. |
2795 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex); | 2794 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex); |
2796 context()->Plug(v0); | 2795 context()->Plug(v0); |
2797 } | 2796 } |
2798 | 2797 |
2799 | 2798 |
2800 void FullCodeGenerator::EmitRandomHeapNumber(ZoneList<Expression*>* args) { | 2799 void FullCodeGenerator::EmitRandomHeapNumber(ZoneList<Expression*>* args) { |
2801 ASSERT(args->length() == 0); | 2800 ASSERT(args->length() == 0); |
2802 | 2801 |
2803 Label slow_allocate_heapnumber; | 2802 Label slow_allocate_heapnumber; |
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4313 __ Addu(at, a1, Operand(masm_->CodeObject())); | 4312 __ Addu(at, a1, Operand(masm_->CodeObject())); |
4314 __ Jump(at); | 4313 __ Jump(at); |
4315 } | 4314 } |
4316 | 4315 |
4317 | 4316 |
4318 #undef __ | 4317 #undef __ |
4319 | 4318 |
4320 } } // namespace v8::internal | 4319 } } // namespace v8::internal |
4321 | 4320 |
4322 #endif // V8_TARGET_ARCH_MIPS | 4321 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |