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

Side by Side Diff: src/type-info.cc

Issue 136403005: Remove CALL_AS_FUNCTION and CALL_AS_METHOD. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Don't store/restore ecx/rcx/r5 given that it doesn't contain callkind anymore 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/type-info.h ('k') | src/typing.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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 return KeyedStoreIC::GetKeyedAccessStoreMode(code->extra_ic_state()); 171 return KeyedStoreIC::GetKeyedAccessStoreMode(code->extra_ic_state());
172 } 172 }
173 } 173 }
174 return STANDARD_STORE; 174 return STANDARD_STORE;
175 } 175 }
176 176
177 177
178 void TypeFeedbackOracle::CallReceiverTypes(TypeFeedbackId id, 178 void TypeFeedbackOracle::CallReceiverTypes(TypeFeedbackId id,
179 Handle<String> name, 179 Handle<String> name,
180 int arity, 180 int arity,
181 CallKind call_kind, 181 ContextualMode contextual_mode,
182 SmallMapList* types) { 182 SmallMapList* types) {
183 // Note: Currently we do not take string extra ic data into account 183 // Note: Currently we do not take string extra ic data into account
184 // here. 184 // here.
185 ContextualMode contextual_mode = call_kind == CALL_AS_FUNCTION
186 ? CONTEXTUAL
187 : NOT_CONTEXTUAL;
188 ExtraICState extra_ic_state = 185 ExtraICState extra_ic_state =
189 CallIC::Contextual::encode(contextual_mode); 186 CallIC::Contextual::encode(contextual_mode);
190
191 Code::Flags flags = Code::ComputeMonomorphicFlags( 187 Code::Flags flags = Code::ComputeMonomorphicFlags(
192 Code::CALL_IC, extra_ic_state, OWN_MAP, Code::NORMAL, arity); 188 Code::CALL_IC, extra_ic_state, OWN_MAP, Code::NORMAL, arity);
193 CollectReceiverTypes(id, name, flags, types); 189 CollectReceiverTypes(id, name, flags, types);
194 } 190 }
195 191
196 192
197 CheckType TypeFeedbackOracle::GetCallCheckType(TypeFeedbackId id) { 193 CheckType TypeFeedbackOracle::GetCallCheckType(TypeFeedbackId id) {
198 Handle<Object> value = GetInfo(id); 194 Handle<Object> value = GetInfo(id);
199 if (!value->IsSmi()) return RECEIVER_MAP_CHECK; 195 if (!value->IsSmi()) return RECEIVER_MAP_CHECK;
200 CheckType check = static_cast<CheckType>(Smi::cast(*value)->value()); 196 CheckType check = static_cast<CheckType>(Smi::cast(*value)->value());
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 #ifdef DEBUG 571 #ifdef DEBUG
576 Object* result = NULL; 572 Object* result = NULL;
577 // Dictionary has been allocated with sufficient size for all elements. 573 // Dictionary has been allocated with sufficient size for all elements.
578 ASSERT(maybe_result->ToObject(&result)); 574 ASSERT(maybe_result->ToObject(&result));
579 ASSERT(*dictionary_ == result); 575 ASSERT(*dictionary_ == result);
580 #endif 576 #endif
581 } 577 }
582 578
583 579
584 } } // namespace v8::internal 580 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/type-info.h ('k') | src/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698