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 2687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2698 | 2698 |
2699 void FullCodeGenerator::EmitLog(ZoneList<Expression*>* args) { | 2699 void FullCodeGenerator::EmitLog(ZoneList<Expression*>* args) { |
2700 // Conditionally generate a log call. | 2700 // Conditionally generate a log call. |
2701 // Args: | 2701 // Args: |
2702 // 0 (literal string): The type of logging (corresponds to the flags). | 2702 // 0 (literal string): The type of logging (corresponds to the flags). |
2703 // This is used to determine whether or not to generate the log call. | 2703 // This is used to determine whether or not to generate the log call. |
2704 // 1 (string): Format string. Access the string at argument index 2 | 2704 // 1 (string): Format string. Access the string at argument index 2 |
2705 // with '%2s' (see Logger::LogRuntime for all the formats). | 2705 // with '%2s' (see Logger::LogRuntime for all the formats). |
2706 // 2 (array): Arguments to the format string. | 2706 // 2 (array): Arguments to the format string. |
2707 ASSERT_EQ(args->length(), 3); | 2707 ASSERT_EQ(args->length(), 3); |
2708 #ifdef ENABLE_LOGGING_AND_PROFILING | |
2709 if (CodeGenerator::ShouldGenerateLog(args->at(0))) { | 2708 if (CodeGenerator::ShouldGenerateLog(args->at(0))) { |
2710 VisitForStackValue(args->at(1)); | 2709 VisitForStackValue(args->at(1)); |
2711 VisitForStackValue(args->at(2)); | 2710 VisitForStackValue(args->at(2)); |
2712 __ CallRuntime(Runtime::kLog, 2); | 2711 __ CallRuntime(Runtime::kLog, 2); |
2713 } | 2712 } |
2714 #endif | |
2715 // Finally, we're expected to leave a value on the top of the stack. | 2713 // Finally, we're expected to leave a value on the top of the stack. |
2716 __ mov(eax, isolate()->factory()->undefined_value()); | 2714 __ mov(eax, isolate()->factory()->undefined_value()); |
2717 context()->Plug(eax); | 2715 context()->Plug(eax); |
2718 } | 2716 } |
2719 | 2717 |
2720 | 2718 |
2721 void FullCodeGenerator::EmitRandomHeapNumber(ZoneList<Expression*>* args) { | 2719 void FullCodeGenerator::EmitRandomHeapNumber(ZoneList<Expression*>* args) { |
2722 ASSERT(args->length() == 0); | 2720 ASSERT(args->length() == 0); |
2723 | 2721 |
2724 Label slow_allocate_heapnumber; | 2722 Label slow_allocate_heapnumber; |
(...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4251 __ add(Operand(edx), Immediate(masm_->CodeObject())); | 4249 __ add(Operand(edx), Immediate(masm_->CodeObject())); |
4252 __ jmp(Operand(edx)); | 4250 __ jmp(Operand(edx)); |
4253 } | 4251 } |
4254 | 4252 |
4255 | 4253 |
4256 #undef __ | 4254 #undef __ |
4257 | 4255 |
4258 } } // namespace v8::internal | 4256 } } // namespace v8::internal |
4259 | 4257 |
4260 #endif // V8_TARGET_ARCH_IA32 | 4258 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |