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

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

Issue 11821049: Combine DEBUG_BREAK and DEBUG_PREPARE_STEP_IN into one IC stub kind DEBUG_STUB, encoding DEBUG_BREA… (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/objects-inl.h ('k') | src/v8globals.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 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 return code; 902 return code;
903 } 903 }
904 904
905 905
906 #ifdef ENABLE_DEBUGGER_SUPPORT 906 #ifdef ENABLE_DEBUGGER_SUPPORT
907 Handle<Code> StubCache::ComputeCallDebugBreak(int argc, 907 Handle<Code> StubCache::ComputeCallDebugBreak(int argc,
908 Code::Kind kind) { 908 Code::Kind kind) {
909 // Extra IC state is irrelevant for debug break ICs. They jump to 909 // Extra IC state is irrelevant for debug break ICs. They jump to
910 // the actual call ic to carry out the work. 910 // the actual call ic to carry out the work.
911 Code::Flags flags = 911 Code::Flags flags =
912 Code::ComputeFlags(kind, DEBUG_BREAK, Code::kNoExtraICState, 912 Code::ComputeFlags(kind, DEBUG_STUB, DEBUG_BREAK,
913 Code::NORMAL, argc); 913 Code::NORMAL, argc);
914 Handle<UnseededNumberDictionary> cache = 914 Handle<UnseededNumberDictionary> cache =
915 isolate_->factory()->non_monomorphic_cache(); 915 isolate_->factory()->non_monomorphic_cache();
916 int entry = cache->FindEntry(isolate_, flags); 916 int entry = cache->FindEntry(isolate_, flags);
917 if (entry != -1) return Handle<Code>(Code::cast(cache->ValueAt(entry))); 917 if (entry != -1) return Handle<Code>(Code::cast(cache->ValueAt(entry)));
918 918
919 StubCompiler compiler(isolate_); 919 StubCompiler compiler(isolate_);
920 Handle<Code> code = compiler.CompileCallDebugBreak(flags); 920 Handle<Code> code = compiler.CompileCallDebugBreak(flags);
921 FillCache(isolate_, code); 921 FillCache(isolate_, code);
922 return code; 922 return code;
923 } 923 }
924 924
925 925
926 Handle<Code> StubCache::ComputeCallDebugPrepareStepIn(int argc, 926 Handle<Code> StubCache::ComputeCallDebugPrepareStepIn(int argc,
927 Code::Kind kind) { 927 Code::Kind kind) {
928 // Extra IC state is irrelevant for debug break ICs. They jump to 928 // Extra IC state is irrelevant for debug break ICs. They jump to
929 // the actual call ic to carry out the work. 929 // the actual call ic to carry out the work.
930 Code::Flags flags = 930 Code::Flags flags =
931 Code::ComputeFlags(kind, DEBUG_PREPARE_STEP_IN, Code::kNoExtraICState, 931 Code::ComputeFlags(kind, DEBUG_STUB, DEBUG_PREPARE_STEP_IN,
932 Code::NORMAL, argc); 932 Code::NORMAL, argc);
933 Handle<UnseededNumberDictionary> cache = 933 Handle<UnseededNumberDictionary> cache =
934 isolate_->factory()->non_monomorphic_cache(); 934 isolate_->factory()->non_monomorphic_cache();
935 int entry = cache->FindEntry(isolate_, flags); 935 int entry = cache->FindEntry(isolate_, flags);
936 if (entry != -1) return Handle<Code>(Code::cast(cache->ValueAt(entry))); 936 if (entry != -1) return Handle<Code>(Code::cast(cache->ValueAt(entry)));
937 937
938 StubCompiler compiler(isolate_); 938 StubCompiler compiler(isolate_);
939 Handle<Code> code = compiler.CompileCallDebugPrepareStepIn(flags); 939 Handle<Code> code = compiler.CompileCallDebugPrepareStepIn(flags);
940 FillCache(isolate_, code); 940 FillCache(isolate_, code);
941 return code; 941 return code;
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
1603 Handle<FunctionTemplateInfo>( 1603 Handle<FunctionTemplateInfo>(
1604 FunctionTemplateInfo::cast(signature->receiver())); 1604 FunctionTemplateInfo::cast(signature->receiver()));
1605 } 1605 }
1606 } 1606 }
1607 1607
1608 is_simple_api_call_ = true; 1608 is_simple_api_call_ = true;
1609 } 1609 }
1610 1610
1611 1611
1612 } } // namespace v8::internal 1612 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/v8globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698