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

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

Issue 181543002: Eliminate extended mode, and other modes clean-up (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/stub-cache.h ('k') | src/token.h » ('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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 KeyedLoadStubCompiler compiler(isolate()); 222 KeyedLoadStubCompiler compiler(isolate());
223 Handle<Code> code = compiler.CompileLoadElement(receiver_map); 223 Handle<Code> code = compiler.CompileLoadElement(receiver_map);
224 224
225 Map::UpdateCodeCache(receiver_map, name, code); 225 Map::UpdateCodeCache(receiver_map, name, code);
226 return code; 226 return code;
227 } 227 }
228 228
229 229
230 Handle<Code> StubCache::ComputeKeyedStoreElement( 230 Handle<Code> StubCache::ComputeKeyedStoreElement(
231 Handle<Map> receiver_map, 231 Handle<Map> receiver_map,
232 StrictModeFlag strict_mode, 232 StrictMode strict_mode,
233 KeyedAccessStoreMode store_mode) { 233 KeyedAccessStoreMode store_mode) {
234 ExtraICState extra_state = 234 ExtraICState extra_state =
235 KeyedStoreIC::ComputeExtraICState(strict_mode, store_mode); 235 KeyedStoreIC::ComputeExtraICState(strict_mode, store_mode);
236 Code::Flags flags = Code::ComputeMonomorphicFlags( 236 Code::Flags flags = Code::ComputeMonomorphicFlags(
237 Code::KEYED_STORE_IC, extra_state); 237 Code::KEYED_STORE_IC, extra_state);
238 238
239 ASSERT(store_mode == STANDARD_STORE || 239 ASSERT(store_mode == STANDARD_STORE ||
240 store_mode == STORE_AND_GROW_NO_TRANSITION || 240 store_mode == STORE_AND_GROW_NO_TRANSITION ||
241 store_mode == STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS || 241 store_mode == STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS ||
242 store_mode == STORE_NO_TRANSITION_HANDLE_COW); 242 store_mode == STORE_NO_TRANSITION_HANDLE_COW);
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 StoreStubCompiler ic_compiler(isolate_, extra_ic_state); 396 StoreStubCompiler ic_compiler(isolate_, extra_ic_state);
397 return ic_compiler.CompilePolymorphicIC( 397 return ic_compiler.CompilePolymorphicIC(
398 types, handlers, name, type, PROPERTY); 398 types, handlers, name, type, PROPERTY);
399 } 399 }
400 } 400 }
401 401
402 402
403 Handle<Code> StubCache::ComputeStoreElementPolymorphic( 403 Handle<Code> StubCache::ComputeStoreElementPolymorphic(
404 MapHandleList* receiver_maps, 404 MapHandleList* receiver_maps,
405 KeyedAccessStoreMode store_mode, 405 KeyedAccessStoreMode store_mode,
406 StrictModeFlag strict_mode) { 406 StrictMode strict_mode) {
407 ASSERT(store_mode == STANDARD_STORE || 407 ASSERT(store_mode == STANDARD_STORE ||
408 store_mode == STORE_AND_GROW_NO_TRANSITION || 408 store_mode == STORE_AND_GROW_NO_TRANSITION ||
409 store_mode == STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS || 409 store_mode == STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS ||
410 store_mode == STORE_NO_TRANSITION_HANDLE_COW); 410 store_mode == STORE_NO_TRANSITION_HANDLE_COW);
411 Handle<PolymorphicCodeCache> cache = 411 Handle<PolymorphicCodeCache> cache =
412 isolate_->factory()->polymorphic_code_cache(); 412 isolate_->factory()->polymorphic_code_cache();
413 ExtraICState extra_state = KeyedStoreIC::ComputeExtraICState( 413 ExtraICState extra_state = KeyedStoreIC::ComputeExtraICState(
414 strict_mode, store_mode); 414 strict_mode, store_mode);
415 Code::Flags flags = 415 Code::Flags flags =
416 Code::ComputeFlags(Code::KEYED_STORE_IC, POLYMORPHIC, extra_state); 416 Code::ComputeFlags(Code::KEYED_STORE_IC, POLYMORPHIC, extra_state);
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 Handle<Code> code = GetCodeWithFlags(flags, "CompileStorePreMonomorphic"); 722 Handle<Code> code = GetCodeWithFlags(flags, "CompileStorePreMonomorphic");
723 PROFILE(isolate(), 723 PROFILE(isolate(),
724 CodeCreateEvent(Logger::STORE_PREMONOMORPHIC_TAG, *code, 0)); 724 CodeCreateEvent(Logger::STORE_PREMONOMORPHIC_TAG, *code, 0));
725 GDBJIT(AddCode(GDBJITInterface::STORE_IC, *code)); 725 GDBJIT(AddCode(GDBJITInterface::STORE_IC, *code));
726 return code; 726 return code;
727 } 727 }
728 728
729 729
730 Handle<Code> StubCompiler::CompileStoreGeneric(Code::Flags flags) { 730 Handle<Code> StubCompiler::CompileStoreGeneric(Code::Flags flags) {
731 ExtraICState extra_state = Code::ExtractExtraICStateFromFlags(flags); 731 ExtraICState extra_state = Code::ExtractExtraICStateFromFlags(flags);
732 StrictModeFlag strict_mode = StoreIC::GetStrictMode(extra_state); 732 StrictMode strict_mode = StoreIC::GetStrictMode(extra_state);
733 StoreIC::GenerateRuntimeSetProperty(masm(), strict_mode); 733 StoreIC::GenerateRuntimeSetProperty(masm(), strict_mode);
734 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreGeneric"); 734 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreGeneric");
735 PROFILE(isolate(), 735 PROFILE(isolate(),
736 CodeCreateEvent(Logger::STORE_GENERIC_TAG, *code, 0)); 736 CodeCreateEvent(Logger::STORE_GENERIC_TAG, *code, 0));
737 GDBJIT(AddCode(GDBJITInterface::STORE_IC, *code)); 737 GDBJIT(AddCode(GDBJITInterface::STORE_IC, *code));
738 return code; 738 return code;
739 } 739 }
740 740
741 741
742 Handle<Code> StubCompiler::CompileStoreMegamorphic(Code::Flags flags) { 742 Handle<Code> StubCompiler::CompileStoreMegamorphic(Code::Flags flags) {
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 Handle<FunctionTemplateInfo>( 1469 Handle<FunctionTemplateInfo>(
1470 FunctionTemplateInfo::cast(signature->receiver())); 1470 FunctionTemplateInfo::cast(signature->receiver()));
1471 } 1471 }
1472 } 1472 }
1473 1473
1474 is_simple_api_call_ = true; 1474 is_simple_api_call_ = true;
1475 } 1475 }
1476 1476
1477 1477
1478 } } // namespace v8::internal 1478 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache.h ('k') | src/token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698