| 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 3386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3397 // 0 (literal string): The type of logging (corresponds to the flags). | 3397 // 0 (literal string): The type of logging (corresponds to the flags). |
| 3398 // This is used to determine whether or not to generate the log call. | 3398 // This is used to determine whether or not to generate the log call. |
| 3399 // 1 (string): Format string. Access the string at argument index 2 | 3399 // 1 (string): Format string. Access the string at argument index 2 |
| 3400 // with '%2s' (see Logger::LogRuntime for all the formats). | 3400 // with '%2s' (see Logger::LogRuntime for all the formats). |
| 3401 // 2 (array): Arguments to the format string. | 3401 // 2 (array): Arguments to the format string. |
| 3402 ZoneList<Expression*>* args = expr->arguments(); | 3402 ZoneList<Expression*>* args = expr->arguments(); |
| 3403 ASSERT_EQ(args->length(), 3); | 3403 ASSERT_EQ(args->length(), 3); |
| 3404 if (CodeGenerator::ShouldGenerateLog(isolate(), args->at(0))) { | 3404 if (CodeGenerator::ShouldGenerateLog(isolate(), args->at(0))) { |
| 3405 VisitForStackValue(args->at(1)); | 3405 VisitForStackValue(args->at(1)); |
| 3406 VisitForStackValue(args->at(2)); | 3406 VisitForStackValue(args->at(2)); |
| 3407 __ CallRuntime(Runtime::kLog, 2); | 3407 __ CallRuntime(Runtime::kHiddenLog, 2); |
| 3408 } | 3408 } |
| 3409 | 3409 |
| 3410 // Finally, we're expected to leave a value on the top of the stack. | 3410 // Finally, we're expected to leave a value on the top of the stack. |
| 3411 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); | 3411 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); |
| 3412 context()->Plug(r0); | 3412 context()->Plug(r0); |
| 3413 } | 3413 } |
| 3414 | 3414 |
| 3415 | 3415 |
| 3416 void FullCodeGenerator::EmitSubString(CallRuntime* expr) { | 3416 void FullCodeGenerator::EmitSubString(CallRuntime* expr) { |
| 3417 // Load the arguments on the stack and call the stub. | 3417 // Load the arguments on the stack and call the stub. |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3860 // Note side effect of PreIndex: r3 now points to the key of the pair. | 3860 // Note side effect of PreIndex: r3 now points to the key of the pair. |
| 3861 __ cmp(key, r2); | 3861 __ cmp(key, r2); |
| 3862 __ b(ne, ¬_found); | 3862 __ b(ne, ¬_found); |
| 3863 | 3863 |
| 3864 __ ldr(r0, MemOperand(r3, kPointerSize)); | 3864 __ ldr(r0, MemOperand(r3, kPointerSize)); |
| 3865 __ b(&done); | 3865 __ b(&done); |
| 3866 | 3866 |
| 3867 __ bind(¬_found); | 3867 __ bind(¬_found); |
| 3868 // Call runtime to perform the lookup. | 3868 // Call runtime to perform the lookup. |
| 3869 __ Push(cache, key); | 3869 __ Push(cache, key); |
| 3870 __ CallRuntime(Runtime::kGetFromCache, 2); | 3870 __ CallRuntime(Runtime::kHiddenGetFromCache, 2); |
| 3871 | 3871 |
| 3872 __ bind(&done); | 3872 __ bind(&done); |
| 3873 context()->Plug(r0); | 3873 context()->Plug(r0); |
| 3874 } | 3874 } |
| 3875 | 3875 |
| 3876 | 3876 |
| 3877 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { | 3877 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { |
| 3878 ZoneList<Expression*>* args = expr->arguments(); | 3878 ZoneList<Expression*>* args = expr->arguments(); |
| 3879 VisitForAccumulatorValue(args->at(0)); | 3879 VisitForAccumulatorValue(args->at(0)); |
| 3880 | 3880 |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4137 __ b(&done); | 4137 __ b(&done); |
| 4138 | 4138 |
| 4139 __ bind(&bailout); | 4139 __ bind(&bailout); |
| 4140 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); | 4140 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); |
| 4141 __ bind(&done); | 4141 __ bind(&done); |
| 4142 context()->Plug(r0); | 4142 context()->Plug(r0); |
| 4143 } | 4143 } |
| 4144 | 4144 |
| 4145 | 4145 |
| 4146 void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) { | 4146 void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) { |
| 4147 Handle<String> name = expr->name(); | 4147 if (expr->function() != NULL && |
| 4148 if (name->length() > 0 && name->Get(0) == '_') { | 4148 expr->function()->intrinsic_type == Runtime::INLINE) { |
| 4149 Comment cmnt(masm_, "[ InlineRuntimeCall"); | 4149 Comment cmnt(masm_, "[ InlineRuntimeCall"); |
| 4150 EmitInlineRuntimeCall(expr); | 4150 EmitInlineRuntimeCall(expr); |
| 4151 return; | 4151 return; |
| 4152 } | 4152 } |
| 4153 | 4153 |
| 4154 Comment cmnt(masm_, "[ CallRuntime"); | 4154 Comment cmnt(masm_, "[ CallRuntime"); |
| 4155 ZoneList<Expression*>* args = expr->arguments(); | 4155 ZoneList<Expression*>* args = expr->arguments(); |
| 4156 int arg_count = args->length(); | 4156 int arg_count = args->length(); |
| 4157 | 4157 |
| 4158 if (expr->is_jsruntime()) { | 4158 if (expr->is_jsruntime()) { |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4943 | 4943 |
| 4944 ASSERT(interrupt_address == | 4944 ASSERT(interrupt_address == |
| 4945 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4945 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 4946 return OSR_AFTER_STACK_CHECK; | 4946 return OSR_AFTER_STACK_CHECK; |
| 4947 } | 4947 } |
| 4948 | 4948 |
| 4949 | 4949 |
| 4950 } } // namespace v8::internal | 4950 } } // namespace v8::internal |
| 4951 | 4951 |
| 4952 #endif // V8_TARGET_ARCH_ARM | 4952 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |