| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 2891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2902 | 2902 |
| 2903 void CodeGenerator::GenerateLog(ZoneList<Expression*>* args) { | 2903 void CodeGenerator::GenerateLog(ZoneList<Expression*>* args) { |
| 2904 // Conditionally generate a log call. | 2904 // Conditionally generate a log call. |
| 2905 // Args: | 2905 // Args: |
| 2906 // 0 (literal string): The type of logging (corresponds to the flags). | 2906 // 0 (literal string): The type of logging (corresponds to the flags). |
| 2907 // This is used to determine whether or not to generate the log call. | 2907 // This is used to determine whether or not to generate the log call. |
| 2908 // 1 (string): Format string. Access the string at argument index 2 | 2908 // 1 (string): Format string. Access the string at argument index 2 |
| 2909 // with '%2s' (see Logger::LogRuntime for all the formats). | 2909 // with '%2s' (see Logger::LogRuntime for all the formats). |
| 2910 // 2 (array): Arguments to the format string. | 2910 // 2 (array): Arguments to the format string. |
| 2911 ASSERT_EQ(args->length(), 3); | 2911 ASSERT_EQ(args->length(), 3); |
| 2912 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 2912 if (ShouldGenerateLog(args->at(0))) { | 2913 if (ShouldGenerateLog(args->at(0))) { |
| 2913 Load(args->at(1)); | 2914 Load(args->at(1)); |
| 2914 Load(args->at(2)); | 2915 Load(args->at(2)); |
| 2915 __ CallRuntime(Runtime::kLog, 2); | 2916 __ CallRuntime(Runtime::kLog, 2); |
| 2916 } | 2917 } |
| 2918 #endif |
| 2917 // Finally, we're expected to leave a value on the top of the stack. | 2919 // Finally, we're expected to leave a value on the top of the stack. |
| 2918 frame_->Push(Immediate(Factory::undefined_value())); | 2920 frame_->Push(Immediate(Factory::undefined_value())); |
| 2919 } | 2921 } |
| 2920 | 2922 |
| 2921 | 2923 |
| 2922 void CodeGenerator::GenerateIsNonNegativeSmi(ZoneList<Expression*>* args) { | 2924 void CodeGenerator::GenerateIsNonNegativeSmi(ZoneList<Expression*>* args) { |
| 2923 ASSERT(args->length() == 1); | 2925 ASSERT(args->length() == 1); |
| 2924 Load(args->at(0)); | 2926 Load(args->at(0)); |
| 2925 frame_->Pop(eax); | 2927 frame_->Pop(eax); |
| 2926 __ test(eax, Immediate(kSmiTagMask | 0x80000000)); | 2928 __ test(eax, Immediate(kSmiTagMask | 0x80000000)); |
| (...skipping 2369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5296 | 5298 |
| 5297 // Slow-case: Go through the JavaScript implementation. | 5299 // Slow-case: Go through the JavaScript implementation. |
| 5298 __ bind(&slow); | 5300 __ bind(&slow); |
| 5299 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); | 5301 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); |
| 5300 } | 5302 } |
| 5301 | 5303 |
| 5302 | 5304 |
| 5303 #undef __ | 5305 #undef __ |
| 5304 | 5306 |
| 5305 } } // namespace v8::internal | 5307 } } // namespace v8::internal |
| OLD | NEW |