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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 8357010: Handlify the stub cache lookup and patching for CallIC and KeyedCallIC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Do not assume functions are compiled when specializing. Created 9 years, 2 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/debug.cc ('k') | src/ia32/stub-cache-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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2069 matching lines...) Expand 10 before | Expand all | Expand 10 after
2080 2080
2081 2081
2082 void MacroAssembler::InvokeFunction(JSFunction* function, 2082 void MacroAssembler::InvokeFunction(JSFunction* function,
2083 const ParameterCount& actual, 2083 const ParameterCount& actual,
2084 InvokeFlag flag, 2084 InvokeFlag flag,
2085 const CallWrapper& call_wrapper, 2085 const CallWrapper& call_wrapper,
2086 CallKind call_kind) { 2086 CallKind call_kind) {
2087 // You can't call a function without a valid frame. 2087 // You can't call a function without a valid frame.
2088 ASSERT(flag == JUMP_FUNCTION || has_frame()); 2088 ASSERT(flag == JUMP_FUNCTION || has_frame());
2089 2089
2090 ASSERT(function->is_compiled());
2091 // Get the function and setup the context. 2090 // Get the function and setup the context.
2092 mov(edi, Immediate(Handle<JSFunction>(function))); 2091 mov(edi, Immediate(Handle<JSFunction>(function)));
2093 mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); 2092 mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
2094 2093
2095 ParameterCount expected(function->shared()->formal_parameter_count()); 2094 ParameterCount expected(function->shared()->formal_parameter_count());
2096 if (V8::UseCrankshaft()) { 2095 // We call indirectly through the code field in the function to
2097 // TODO(kasperl): For now, we always call indirectly through the 2096 // allow recompilation to take effect without changing any of the
2098 // code field in the function to allow recompilation to take effect 2097 // call sites.
2099 // without changing any of the call sites. 2098 InvokeCode(FieldOperand(edi, JSFunction::kCodeEntryOffset),
2100 InvokeCode(FieldOperand(edi, JSFunction::kCodeEntryOffset), 2099 expected, actual, flag, call_wrapper, call_kind);
2101 expected, actual, flag, call_wrapper, call_kind);
2102 } else {
2103 Handle<Code> code(function->code());
2104 InvokeCode(code, expected, actual, RelocInfo::CODE_TARGET,
2105 flag, call_wrapper, call_kind);
2106 }
2107 } 2100 }
2108 2101
2109 2102
2110 void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, 2103 void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id,
2111 InvokeFlag flag, 2104 InvokeFlag flag,
2112 const CallWrapper& call_wrapper) { 2105 const CallWrapper& call_wrapper) {
2113 // You can't call a builtin without a valid frame. 2106 // You can't call a builtin without a valid frame.
2114 ASSERT(flag == JUMP_FUNCTION || has_frame()); 2107 ASSERT(flag == JUMP_FUNCTION || has_frame());
2115 2108
2116 // Rely on the assertion to check that the number of provided 2109 // Rely on the assertion to check that the number of provided
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
2734 cmp(length, Operand(bitmap_scratch, MemoryChunk::kSizeOffset)); 2727 cmp(length, Operand(bitmap_scratch, MemoryChunk::kSizeOffset));
2735 Check(less_equal, "Live Bytes Count overflow chunk size"); 2728 Check(less_equal, "Live Bytes Count overflow chunk size");
2736 } 2729 }
2737 2730
2738 bind(&done); 2731 bind(&done);
2739 } 2732 }
2740 2733
2741 } } // namespace v8::internal 2734 } } // namespace v8::internal
2742 2735
2743 #endif // V8_TARGET_ARCH_IA32 2736 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698