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

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

Issue 137083002: Get rid of ContextualMode for call ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Restore HCallGlobal until a follow-up CL 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 | Annotate | Revision Log
« no previous file with comments | « src/ast.cc ('k') | src/ia32/lithium-codegen-ia32.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 2535 matching lines...) Expand 10 before | Expand all | Expand 10 after
2546 int arg_count = args->length(); 2546 int arg_count = args->length();
2547 { PreservePositionScope scope(masm()->positions_recorder()); 2547 { PreservePositionScope scope(masm()->positions_recorder());
2548 for (int i = 0; i < arg_count; i++) { 2548 for (int i = 0; i < arg_count; i++) {
2549 VisitForStackValue(args->at(i)); 2549 VisitForStackValue(args->at(i));
2550 } 2550 }
2551 __ Set(ecx, Immediate(name)); 2551 __ Set(ecx, Immediate(name));
2552 } 2552 }
2553 // Record source position of the IC call. 2553 // Record source position of the IC call.
2554 SetSourcePosition(expr->position()); 2554 SetSourcePosition(expr->position());
2555 Handle<Code> ic = 2555 Handle<Code> ic =
2556 isolate()->stub_cache()->ComputeCallInitialize(arg_count, mode); 2556 isolate()->stub_cache()->ComputeCallInitialize(arg_count);
2557 TypeFeedbackId ast_id = mode == CONTEXTUAL 2557 TypeFeedbackId ast_id = mode == CONTEXTUAL
2558 ? TypeFeedbackId::None() 2558 ? TypeFeedbackId::None()
2559 : expr->CallFeedbackId(); 2559 : expr->CallFeedbackId();
2560 CallIC(ic, mode, ast_id); 2560 CallIC(ic, mode, ast_id);
2561 RecordJSReturnSite(expr); 2561 RecordJSReturnSite(expr);
2562 // Restore context register. 2562 // Restore context register.
2563 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); 2563 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
2564 context()->Plug(eax); 2564 context()->Plug(eax);
2565 } 2565 }
2566 2566
(...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after
4123 4123
4124 // Push the arguments ("left-to-right"). 4124 // Push the arguments ("left-to-right").
4125 int arg_count = args->length(); 4125 int arg_count = args->length();
4126 for (int i = 0; i < arg_count; i++) { 4126 for (int i = 0; i < arg_count; i++) {
4127 VisitForStackValue(args->at(i)); 4127 VisitForStackValue(args->at(i));
4128 } 4128 }
4129 4129
4130 if (expr->is_jsruntime()) { 4130 if (expr->is_jsruntime()) {
4131 // Call the JS runtime function via a call IC. 4131 // Call the JS runtime function via a call IC.
4132 __ Set(ecx, Immediate(expr->name())); 4132 __ Set(ecx, Immediate(expr->name()));
4133 ContextualMode mode = NOT_CONTEXTUAL; 4133 Handle<Code> ic = isolate()->stub_cache()->ComputeCallInitialize(arg_count);
4134 Handle<Code> ic = 4134 CallIC(ic, NOT_CONTEXTUAL, expr->CallRuntimeFeedbackId());
4135 isolate()->stub_cache()->ComputeCallInitialize(arg_count, mode);
4136 CallIC(ic, mode, expr->CallRuntimeFeedbackId());
4137 // Restore context register. 4135 // Restore context register.
4138 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); 4136 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
4139 } else { 4137 } else {
4140 // Call the C runtime function. 4138 // Call the C runtime function.
4141 __ CallRuntime(expr->function(), arg_count); 4139 __ CallRuntime(expr->function(), arg_count);
4142 } 4140 }
4143 context()->Plug(eax); 4141 context()->Plug(eax);
4144 } 4142 }
4145 4143
4146 4144
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
4885 4883
4886 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4884 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4887 Assembler::target_address_at(call_target_address)); 4885 Assembler::target_address_at(call_target_address));
4888 return OSR_AFTER_STACK_CHECK; 4886 return OSR_AFTER_STACK_CHECK;
4889 } 4887 }
4890 4888
4891 4889
4892 } } // namespace v8::internal 4890 } } // namespace v8::internal
4893 4891
4894 #endif // V8_TARGET_ARCH_IA32 4892 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698