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

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

Issue 11973008: Replace special IC builtins and stubs in the map's cache by codestubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 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/x64/code-stubs-x64.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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 return Handle<Map>::cast(GetInfo(prop->key()->LiteralFeedbackId())); 298 return Handle<Map>::cast(GetInfo(prop->key()->LiteralFeedbackId()));
299 } 299 }
300 300
301 301
302 bool TypeFeedbackOracle::LoadIsBuiltin(Property* expr, Builtins::Name id) { 302 bool TypeFeedbackOracle::LoadIsBuiltin(Property* expr, Builtins::Name id) {
303 return *GetInfo(expr->PropertyFeedbackId()) == 303 return *GetInfo(expr->PropertyFeedbackId()) ==
304 isolate_->builtins()->builtin(id); 304 isolate_->builtins()->builtin(id);
305 } 305 }
306 306
307 307
308 bool TypeFeedbackOracle::LoadIsStub(Property* expr, ICStub* stub) {
309 Handle<Object> object = GetInfo(expr->PropertyFeedbackId());
310 if (!object->IsCode()) return false;
311 Handle<Code> code = Handle<Code>::cast(object);
312 if (!code->is_load_stub()) return false;
313 return stub->Describes(*code);
314 }
315
316
308 static TypeInfo TypeFromCompareType(CompareIC::State state) { 317 static TypeInfo TypeFromCompareType(CompareIC::State state) {
309 switch (state) { 318 switch (state) {
310 case CompareIC::UNINITIALIZED: 319 case CompareIC::UNINITIALIZED:
311 // Uninitialized means never executed. 320 // Uninitialized means never executed.
312 return TypeInfo::Uninitialized(); 321 return TypeInfo::Uninitialized();
313 case CompareIC::SMI: 322 case CompareIC::SMI:
314 return TypeInfo::Smi(); 323 return TypeInfo::Smi();
315 case CompareIC::HEAP_NUMBER: 324 case CompareIC::HEAP_NUMBER:
316 return TypeInfo::Number(); 325 return TypeInfo::Number();
317 case CompareIC::SYMBOL: 326 case CompareIC::SYMBOL:
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 USE(maybe_result); 713 USE(maybe_result);
705 #ifdef DEBUG 714 #ifdef DEBUG
706 Object* result = NULL; 715 Object* result = NULL;
707 // Dictionary has been allocated with sufficient size for all elements. 716 // Dictionary has been allocated with sufficient size for all elements.
708 ASSERT(maybe_result->ToObject(&result)); 717 ASSERT(maybe_result->ToObject(&result));
709 ASSERT(*dictionary_ == result); 718 ASSERT(*dictionary_ == result);
710 #endif 719 #endif
711 } 720 }
712 721
713 } } // namespace v8::internal 722 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/type-info.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698