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 3313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3324 void FullCodeGenerator::EmitLog(CallRuntime* expr) { | 3324 void FullCodeGenerator::EmitLog(CallRuntime* expr) { |
3325 // Conditionally generate a log call. | 3325 // Conditionally generate a log call. |
3326 // Args: | 3326 // Args: |
3327 // 0 (literal string): The type of logging (corresponds to the flags). | 3327 // 0 (literal string): The type of logging (corresponds to the flags). |
3328 // This is used to determine whether or not to generate the log call. | 3328 // This is used to determine whether or not to generate the log call. |
3329 // 1 (string): Format string. Access the string at argument index 2 | 3329 // 1 (string): Format string. Access the string at argument index 2 |
3330 // with '%2s' (see Logger::LogRuntime for all the formats). | 3330 // with '%2s' (see Logger::LogRuntime for all the formats). |
3331 // 2 (array): Arguments to the format string. | 3331 // 2 (array): Arguments to the format string. |
3332 ZoneList<Expression*>* args = expr->arguments(); | 3332 ZoneList<Expression*>* args = expr->arguments(); |
3333 ASSERT_EQ(args->length(), 3); | 3333 ASSERT_EQ(args->length(), 3); |
3334 if (CodeGenerator::ShouldGenerateLog(args->at(0))) { | 3334 if (CodeGenerator::ShouldGenerateLog(isolate(), args->at(0))) { |
3335 VisitForStackValue(args->at(1)); | 3335 VisitForStackValue(args->at(1)); |
3336 VisitForStackValue(args->at(2)); | 3336 VisitForStackValue(args->at(2)); |
3337 __ CallRuntime(Runtime::kLog, 2); | 3337 __ CallRuntime(Runtime::kLog, 2); |
3338 } | 3338 } |
3339 | 3339 |
3340 // Finally, we're expected to leave a value on the top of the stack. | 3340 // Finally, we're expected to leave a value on the top of the stack. |
3341 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex); | 3341 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex); |
3342 context()->Plug(v0); | 3342 context()->Plug(v0); |
3343 } | 3343 } |
3344 | 3344 |
(...skipping 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4916 *context_length = 0; | 4916 *context_length = 0; |
4917 return previous_; | 4917 return previous_; |
4918 } | 4918 } |
4919 | 4919 |
4920 | 4920 |
4921 #undef __ | 4921 #undef __ |
4922 | 4922 |
4923 } } // namespace v8::internal | 4923 } } // namespace v8::internal |
4924 | 4924 |
4925 #endif // V8_TARGET_ARCH_MIPS | 4925 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |