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

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

Issue 118553003: Upgrade Symbol implementation to match current ES6 behavior. (Closed) Base URL: git://github.com/v8/v8.git@bleeding_edge
Patch Set: Remove uninteresting equality test 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
« no previous file with comments | « src/runtime.js ('k') | src/symbol.js » ('j') | src/symbol.js » ('J')
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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 KeyedStoreStubCompiler compiler(isolate(), extra_state); 240 KeyedStoreStubCompiler compiler(isolate(), extra_state);
241 Handle<Code> code = compiler.CompileStoreElement(receiver_map); 241 Handle<Code> code = compiler.CompileStoreElement(receiver_map);
242 242
243 Map::UpdateCodeCache(receiver_map, name, code); 243 Map::UpdateCodeCache(receiver_map, name, code);
244 ASSERT(KeyedStoreIC::GetKeyedAccessStoreMode(code->extra_ic_state()) 244 ASSERT(KeyedStoreIC::GetKeyedAccessStoreMode(code->extra_ic_state())
245 == store_mode); 245 == store_mode);
246 return code; 246 return code;
247 } 247 }
248 248
249 249
250 #define CALL_LOGGER_TAG(kind, type) (Logger::KEYED_##type)
251
252 static void FillCache(Isolate* isolate, Handle<Code> code) { 250 static void FillCache(Isolate* isolate, Handle<Code> code) {
253 Handle<UnseededNumberDictionary> dictionary = 251 Handle<UnseededNumberDictionary> dictionary =
254 UnseededNumberDictionary::Set(isolate->factory()->non_monomorphic_cache(), 252 UnseededNumberDictionary::Set(isolate->factory()->non_monomorphic_cache(),
255 code->flags(), 253 code->flags(),
256 code); 254 code);
257 isolate->heap()->public_set_non_monomorphic_cache(*dictionary); 255 isolate->heap()->public_set_non_monomorphic_cache(*dictionary);
258 } 256 }
259 257
260 258
261 Code* StubCache::FindPreMonomorphicIC(Code::Kind kind, ExtraICState state) { 259 Code* StubCache::FindPreMonomorphicIC(Code::Kind kind, ExtraICState state) {
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 ExtraICState extra_state = Code::ExtractExtraICStateFromFlags(flags); 735 ExtraICState extra_state = Code::ExtractExtraICStateFromFlags(flags);
738 StoreIC::GenerateMegamorphic(masm(), extra_state); 736 StoreIC::GenerateMegamorphic(masm(), extra_state);
739 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreMegamorphic"); 737 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreMegamorphic");
740 PROFILE(isolate(), 738 PROFILE(isolate(),
741 CodeCreateEvent(Logger::STORE_MEGAMORPHIC_TAG, *code, 0)); 739 CodeCreateEvent(Logger::STORE_MEGAMORPHIC_TAG, *code, 0));
742 GDBJIT(AddCode(GDBJITInterface::STORE_IC, *code)); 740 GDBJIT(AddCode(GDBJITInterface::STORE_IC, *code));
743 return code; 741 return code;
744 } 742 }
745 743
746 744
747 #undef CALL_LOGGER_TAG
748
749
750 Handle<Code> StubCompiler::GetCodeWithFlags(Code::Flags flags, 745 Handle<Code> StubCompiler::GetCodeWithFlags(Code::Flags flags,
751 const char* name) { 746 const char* name) {
752 // Create code object in the heap. 747 // Create code object in the heap.
753 CodeDesc desc; 748 CodeDesc desc;
754 masm_.GetCode(&desc); 749 masm_.GetCode(&desc);
755 Handle<Code> code = factory()->NewCode(desc, flags, masm_.CodeObject()); 750 Handle<Code> code = factory()->NewCode(desc, flags, masm_.CodeObject());
756 if (code->has_major_key()) { 751 if (code->has_major_key()) {
757 code->set_major_key(CodeStub::NoCache); 752 code->set_major_key(CodeStub::NoCache);
758 } 753 }
759 #ifdef ENABLE_DISASSEMBLER 754 #ifdef ENABLE_DISASSEMBLER
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 Handle<FunctionTemplateInfo>( 1410 Handle<FunctionTemplateInfo>(
1416 FunctionTemplateInfo::cast(signature->receiver())); 1411 FunctionTemplateInfo::cast(signature->receiver()));
1417 } 1412 }
1418 } 1413 }
1419 1414
1420 is_simple_api_call_ = true; 1415 is_simple_api_call_ = true;
1421 } 1416 }
1422 1417
1423 1418
1424 } } // namespace v8::internal 1419 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.js ('k') | src/symbol.js » ('j') | src/symbol.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698