OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3305 void FullCodeGenerator::EmitLog(CallRuntime* expr) { | 3305 void FullCodeGenerator::EmitLog(CallRuntime* expr) { |
3306 // Conditionally generate a log call. | 3306 // Conditionally generate a log call. |
3307 // Args: | 3307 // Args: |
3308 // 0 (literal string): The type of logging (corresponds to the flags). | 3308 // 0 (literal string): The type of logging (corresponds to the flags). |
3309 // This is used to determine whether or not to generate the log call. | 3309 // This is used to determine whether or not to generate the log call. |
3310 // 1 (string): Format string. Access the string at argument index 2 | 3310 // 1 (string): Format string. Access the string at argument index 2 |
3311 // with '%2s' (see Logger::LogRuntime for all the formats). | 3311 // with '%2s' (see Logger::LogRuntime for all the formats). |
3312 // 2 (array): Arguments to the format string. | 3312 // 2 (array): Arguments to the format string. |
3313 ZoneList<Expression*>* args = expr->arguments(); | 3313 ZoneList<Expression*>* args = expr->arguments(); |
3314 ASSERT_EQ(args->length(), 3); | 3314 ASSERT_EQ(args->length(), 3); |
3315 if (CodeGenerator::ShouldGenerateLog(args->at(0))) { | 3315 if (CodeGenerator::ShouldGenerateLog(isolate(), args->at(0))) { |
3316 VisitForStackValue(args->at(1)); | 3316 VisitForStackValue(args->at(1)); |
3317 VisitForStackValue(args->at(2)); | 3317 VisitForStackValue(args->at(2)); |
3318 __ CallRuntime(Runtime::kLog, 2); | 3318 __ CallRuntime(Runtime::kLog, 2); |
3319 } | 3319 } |
3320 | 3320 |
3321 // Finally, we're expected to leave a value on the top of the stack. | 3321 // Finally, we're expected to leave a value on the top of the stack. |
3322 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); | 3322 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); |
3323 context()->Plug(r0); | 3323 context()->Plug(r0); |
3324 } | 3324 } |
3325 | 3325 |
(...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4884 *context_length = 0; | 4884 *context_length = 0; |
4885 return previous_; | 4885 return previous_; |
4886 } | 4886 } |
4887 | 4887 |
4888 | 4888 |
4889 #undef __ | 4889 #undef __ |
4890 | 4890 |
4891 } } // namespace v8::internal | 4891 } } // namespace v8::internal |
4892 | 4892 |
4893 #endif // V8_TARGET_ARCH_ARM | 4893 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |