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

Side by Side Diff: src/stub-cache.cc

Issue 107933005: Templatise type representation (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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
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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 Handle<Code> StubCache::ComputeLoadElementPolymorphic( 583 Handle<Code> StubCache::ComputeLoadElementPolymorphic(
584 MapHandleList* receiver_maps) { 584 MapHandleList* receiver_maps) {
585 Code::Flags flags = Code::ComputeFlags(Code::KEYED_LOAD_IC, POLYMORPHIC); 585 Code::Flags flags = Code::ComputeFlags(Code::KEYED_LOAD_IC, POLYMORPHIC);
586 Handle<PolymorphicCodeCache> cache = 586 Handle<PolymorphicCodeCache> cache =
587 isolate_->factory()->polymorphic_code_cache(); 587 isolate_->factory()->polymorphic_code_cache();
588 Handle<Object> probe = cache->Lookup(receiver_maps, flags); 588 Handle<Object> probe = cache->Lookup(receiver_maps, flags);
589 if (probe->IsCode()) return Handle<Code>::cast(probe); 589 if (probe->IsCode()) return Handle<Code>::cast(probe);
590 590
591 TypeHandleList types(receiver_maps->length()); 591 TypeHandleList types(receiver_maps->length());
592 for (int i = 0; i < receiver_maps->length(); i++) { 592 for (int i = 0; i < receiver_maps->length(); i++) {
593 types.Add(handle(Type::Class(receiver_maps->at(i)), isolate())); 593 types.Add(Type::Class(receiver_maps->at(i), isolate()));
594 } 594 }
595 CodeHandleList handlers(receiver_maps->length()); 595 CodeHandleList handlers(receiver_maps->length());
596 KeyedLoadStubCompiler compiler(isolate_); 596 KeyedLoadStubCompiler compiler(isolate_);
597 compiler.CompileElementHandlers(receiver_maps, &handlers); 597 compiler.CompileElementHandlers(receiver_maps, &handlers);
598 Handle<Code> code = compiler.CompilePolymorphicIC( 598 Handle<Code> code = compiler.CompilePolymorphicIC(
599 &types, &handlers, factory()->empty_string(), Code::NORMAL, ELEMENT); 599 &types, &handlers, factory()->empty_string(), Code::NORMAL, ELEMENT);
600 600
601 isolate()->counters()->keyed_load_polymorphic_stubs()->Increment(); 601 isolate()->counters()->keyed_load_polymorphic_stubs()->Increment();
602 602
603 PolymorphicCodeCache::Update(cache, receiver_maps, flags, code); 603 PolymorphicCodeCache::Update(cache, receiver_maps, flags, code);
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1897 Handle<FunctionTemplateInfo>( 1897 Handle<FunctionTemplateInfo>(
1898 FunctionTemplateInfo::cast(signature->receiver())); 1898 FunctionTemplateInfo::cast(signature->receiver()));
1899 } 1899 }
1900 } 1900 }
1901 1901
1902 is_simple_api_call_ = true; 1902 is_simple_api_call_ = true;
1903 } 1903 }
1904 1904
1905 1905
1906 } } // namespace v8::internal 1906 } } // namespace v8::internal
OLDNEW
« src/property-details.h ('K') | « src/property-details.h ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698