Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: src/mips/full-codegen-mips.cc

Issue 211453002: MIPS: Refactor optimized in hydrogen only runtime functions. (Closed) Base URL: git://github.com/paul99/v8m-rb.git@gbl
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3406 matching lines...) Expand 10 before | Expand all | Expand 10 after
3417 // 0 (literal string): The type of logging (corresponds to the flags). 3417 // 0 (literal string): The type of logging (corresponds to the flags).
3418 // This is used to determine whether or not to generate the log call. 3418 // This is used to determine whether or not to generate the log call.
3419 // 1 (string): Format string. Access the string at argument index 2 3419 // 1 (string): Format string. Access the string at argument index 2
3420 // with '%2s' (see Logger::LogRuntime for all the formats). 3420 // with '%2s' (see Logger::LogRuntime for all the formats).
3421 // 2 (array): Arguments to the format string. 3421 // 2 (array): Arguments to the format string.
3422 ZoneList<Expression*>* args = expr->arguments(); 3422 ZoneList<Expression*>* args = expr->arguments();
3423 ASSERT_EQ(args->length(), 3); 3423 ASSERT_EQ(args->length(), 3);
3424 if (CodeGenerator::ShouldGenerateLog(isolate(), args->at(0))) { 3424 if (CodeGenerator::ShouldGenerateLog(isolate(), args->at(0))) {
3425 VisitForStackValue(args->at(1)); 3425 VisitForStackValue(args->at(1));
3426 VisitForStackValue(args->at(2)); 3426 VisitForStackValue(args->at(2));
3427 __ CallRuntime(Runtime::kLog, 2); 3427 __ CallRuntime(Runtime::kHiddenLog, 2);
3428 } 3428 }
3429 3429
3430 // Finally, we're expected to leave a value on the top of the stack. 3430 // Finally, we're expected to leave a value on the top of the stack.
3431 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex); 3431 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex);
3432 context()->Plug(v0); 3432 context()->Plug(v0);
3433 } 3433 }
3434 3434
3435 3435
3436 void FullCodeGenerator::EmitSubString(CallRuntime* expr) { 3436 void FullCodeGenerator::EmitSubString(CallRuntime* expr) {
3437 // Load the arguments on the stack and call the stub. 3437 // Load the arguments on the stack and call the stub.
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
3905 // a3 now points to key of indexed element of cache. 3905 // a3 now points to key of indexed element of cache.
3906 __ lw(a2, MemOperand(a3)); 3906 __ lw(a2, MemOperand(a3));
3907 __ Branch(&not_found, ne, key, Operand(a2)); 3907 __ Branch(&not_found, ne, key, Operand(a2));
3908 3908
3909 __ lw(v0, MemOperand(a3, kPointerSize)); 3909 __ lw(v0, MemOperand(a3, kPointerSize));
3910 __ Branch(&done); 3910 __ Branch(&done);
3911 3911
3912 __ bind(&not_found); 3912 __ bind(&not_found);
3913 // Call runtime to perform the lookup. 3913 // Call runtime to perform the lookup.
3914 __ Push(cache, key); 3914 __ Push(cache, key);
3915 __ CallRuntime(Runtime::kGetFromCache, 2); 3915 __ CallRuntime(Runtime::kHiddenGetFromCache, 2);
3916 3916
3917 __ bind(&done); 3917 __ bind(&done);
3918 context()->Plug(v0); 3918 context()->Plug(v0);
3919 } 3919 }
3920 3920
3921 3921
3922 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { 3922 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) {
3923 ZoneList<Expression*>* args = expr->arguments(); 3923 ZoneList<Expression*>* args = expr->arguments();
3924 VisitForAccumulatorValue(args->at(0)); 3924 VisitForAccumulatorValue(args->at(0));
3925 3925
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
4186 __ Branch(&done); 4186 __ Branch(&done);
4187 4187
4188 __ bind(&bailout); 4188 __ bind(&bailout);
4189 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex); 4189 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex);
4190 __ bind(&done); 4190 __ bind(&done);
4191 context()->Plug(v0); 4191 context()->Plug(v0);
4192 } 4192 }
4193 4193
4194 4194
4195 void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) { 4195 void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
4196 Handle<String> name = expr->name(); 4196 if (expr->function() != NULL &&
4197 if (name->length() > 0 && name->Get(0) == '_') { 4197 expr->function()->intrinsic_type == Runtime::INLINE) {
4198 Comment cmnt(masm_, "[ InlineRuntimeCall"); 4198 Comment cmnt(masm_, "[ InlineRuntimeCall");
4199 EmitInlineRuntimeCall(expr); 4199 EmitInlineRuntimeCall(expr);
4200 return; 4200 return;
4201 } 4201 }
4202 4202
4203 Comment cmnt(masm_, "[ CallRuntime"); 4203 Comment cmnt(masm_, "[ CallRuntime");
4204 ZoneList<Expression*>* args = expr->arguments(); 4204 ZoneList<Expression*>* args = expr->arguments();
4205 int arg_count = args->length(); 4205 int arg_count = args->length();
4206 4206
4207 if (expr->is_jsruntime()) { 4207 if (expr->is_jsruntime()) {
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
4977 Assembler::target_address_at(pc_immediate_load_address)) == 4977 Assembler::target_address_at(pc_immediate_load_address)) ==
4978 reinterpret_cast<uint32_t>( 4978 reinterpret_cast<uint32_t>(
4979 isolate->builtins()->OsrAfterStackCheck()->entry())); 4979 isolate->builtins()->OsrAfterStackCheck()->entry()));
4980 return OSR_AFTER_STACK_CHECK; 4980 return OSR_AFTER_STACK_CHECK;
4981 } 4981 }
4982 4982
4983 4983
4984 } } // namespace v8::internal 4984 } } // namespace v8::internal
4985 4985
4986 #endif // V8_TARGET_ARCH_MIPS 4986 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698