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

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

Issue 133223003: MIPS: Get rid of ContextualMode for call ICs. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 6 years, 11 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 | « no previous file | 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 2631 matching lines...) Expand 10 before | Expand all | Expand 10 after
2642 int arg_count = args->length(); 2642 int arg_count = args->length();
2643 { PreservePositionScope scope(masm()->positions_recorder()); 2643 { PreservePositionScope scope(masm()->positions_recorder());
2644 for (int i = 0; i < arg_count; i++) { 2644 for (int i = 0; i < arg_count; i++) {
2645 VisitForStackValue(args->at(i)); 2645 VisitForStackValue(args->at(i));
2646 } 2646 }
2647 __ li(a2, Operand(name)); 2647 __ li(a2, Operand(name));
2648 } 2648 }
2649 // Record source position for debugger. 2649 // Record source position for debugger.
2650 SetSourcePosition(expr->position()); 2650 SetSourcePosition(expr->position());
2651 // Call the IC initialization code. 2651 // Call the IC initialization code.
2652 Handle<Code> ic = 2652 Handle<Code> ic = isolate()->stub_cache()->ComputeCallInitialize(arg_count);
2653 isolate()->stub_cache()->ComputeCallInitialize(arg_count, mode);
2654 TypeFeedbackId ast_id = mode == CONTEXTUAL 2653 TypeFeedbackId ast_id = mode == CONTEXTUAL
2655 ? TypeFeedbackId::None() 2654 ? TypeFeedbackId::None()
2656 : expr->CallFeedbackId(); 2655 : expr->CallFeedbackId();
2657 CallIC(ic, mode, ast_id); 2656 CallIC(ic, mode, ast_id);
2658 RecordJSReturnSite(expr); 2657 RecordJSReturnSite(expr);
2659 // Restore context register. 2658 // Restore context register.
2660 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 2659 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2661 context()->Plug(v0); 2660 context()->Plug(v0);
2662 } 2661 }
2663 2662
(...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after
4211 4210
4212 // Push the arguments ("left-to-right"). 4211 // Push the arguments ("left-to-right").
4213 int arg_count = args->length(); 4212 int arg_count = args->length();
4214 for (int i = 0; i < arg_count; i++) { 4213 for (int i = 0; i < arg_count; i++) {
4215 VisitForStackValue(args->at(i)); 4214 VisitForStackValue(args->at(i));
4216 } 4215 }
4217 4216
4218 if (expr->is_jsruntime()) { 4217 if (expr->is_jsruntime()) {
4219 // Call the JS runtime function. 4218 // Call the JS runtime function.
4220 __ li(a2, Operand(expr->name())); 4219 __ li(a2, Operand(expr->name()));
4221 ContextualMode mode = NOT_CONTEXTUAL; 4220 Handle<Code> ic = isolate()->stub_cache()->ComputeCallInitialize(arg_count);
4222 Handle<Code> ic = 4221 CallIC(ic, NOT_CONTEXTUAL, expr->CallRuntimeFeedbackId());
4223 isolate()->stub_cache()->ComputeCallInitialize(arg_count, mode);
4224 CallIC(ic, mode, expr->CallRuntimeFeedbackId());
4225 // Restore context register. 4222 // Restore context register.
4226 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 4223 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
4227 } else { 4224 } else {
4228 // Call the C runtime function. 4225 // Call the C runtime function.
4229 __ CallRuntime(expr->function(), arg_count); 4226 __ CallRuntime(expr->function(), arg_count);
4230 } 4227 }
4231 context()->Plug(v0); 4228 context()->Plug(v0);
4232 } 4229 }
4233 4230
4234 4231
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
4970 Assembler::target_address_at(pc_immediate_load_address)) == 4967 Assembler::target_address_at(pc_immediate_load_address)) ==
4971 reinterpret_cast<uint32_t>( 4968 reinterpret_cast<uint32_t>(
4972 isolate->builtins()->OsrAfterStackCheck()->entry())); 4969 isolate->builtins()->OsrAfterStackCheck()->entry()));
4973 return OSR_AFTER_STACK_CHECK; 4970 return OSR_AFTER_STACK_CHECK;
4974 } 4971 }
4975 4972
4976 4973
4977 } } // namespace v8::internal 4974 } } // namespace v8::internal
4978 4975
4979 #endif // V8_TARGET_ARCH_MIPS 4976 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698