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

Side by Side Diff: src/code-stubs.h

Issue 1222093007: Debugger: use debug break slot to break on call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased and addressed comments Created 5 years, 5 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/builtins.cc ('k') | src/debug.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_CODE_STUBS_H_ 5 #ifndef V8_CODE_STUBS_H_
6 #define V8_CODE_STUBS_H_ 6 #define V8_CODE_STUBS_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assembler.h" 9 #include "src/assembler.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 }; 1006 };
1007 1007
1008 1008
1009 class CallICStub: public PlatformCodeStub { 1009 class CallICStub: public PlatformCodeStub {
1010 public: 1010 public:
1011 CallICStub(Isolate* isolate, const CallICState& state) 1011 CallICStub(Isolate* isolate, const CallICState& state)
1012 : PlatformCodeStub(isolate) { 1012 : PlatformCodeStub(isolate) {
1013 minor_key_ = state.GetExtraICState(); 1013 minor_key_ = state.GetExtraICState();
1014 } 1014 }
1015 1015
1016 static int ExtractArgcFromMinorKey(int minor_key) {
1017 CallICState state(static_cast<ExtraICState>(minor_key));
1018 return state.arg_count();
1019 }
1020
1021 Code::Kind GetCodeKind() const override { return Code::CALL_IC; } 1016 Code::Kind GetCodeKind() const override { return Code::CALL_IC; }
1022 1017
1023 InlineCacheState GetICState() const override { return DEFAULT; } 1018 InlineCacheState GetICState() const override { return DEFAULT; }
1024 1019
1025 ExtraICState GetExtraICState() const final { 1020 ExtraICState GetExtraICState() const final {
1026 return static_cast<ExtraICState>(minor_key_); 1021 return static_cast<ExtraICState>(minor_key_);
1027 } 1022 }
1028 1023
1029 protected: 1024 protected:
1030 bool CallAsMethod() const { 1025 bool CallAsMethod() const {
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
1906 1901
1907 1902
1908 class CallFunctionStub: public PlatformCodeStub { 1903 class CallFunctionStub: public PlatformCodeStub {
1909 public: 1904 public:
1910 CallFunctionStub(Isolate* isolate, int argc, CallFunctionFlags flags) 1905 CallFunctionStub(Isolate* isolate, int argc, CallFunctionFlags flags)
1911 : PlatformCodeStub(isolate) { 1906 : PlatformCodeStub(isolate) {
1912 DCHECK(argc >= 0 && argc <= Code::kMaxArguments); 1907 DCHECK(argc >= 0 && argc <= Code::kMaxArguments);
1913 minor_key_ = ArgcBits::encode(argc) | FlagBits::encode(flags); 1908 minor_key_ = ArgcBits::encode(argc) | FlagBits::encode(flags);
1914 } 1909 }
1915 1910
1916 static int ExtractArgcFromMinorKey(int minor_key) {
1917 return ArgcBits::decode(minor_key);
1918 }
1919
1920 private: 1911 private:
1921 int argc() const { return ArgcBits::decode(minor_key_); } 1912 int argc() const { return ArgcBits::decode(minor_key_); }
1922 int flags() const { return FlagBits::decode(minor_key_); } 1913 int flags() const { return FlagBits::decode(minor_key_); }
1923 1914
1924 bool CallAsMethod() const { 1915 bool CallAsMethod() const {
1925 return flags() == CALL_AS_METHOD || flags() == WRAP_AND_CALL; 1916 return flags() == CALL_AS_METHOD || flags() == WRAP_AND_CALL;
1926 } 1917 }
1927 1918
1928 bool NeedsChecks() const { return flags() != WRAP_AND_CALL; } 1919 bool NeedsChecks() const { return flags() != WRAP_AND_CALL; }
1929 1920
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
3035 #undef DEFINE_PLATFORM_CODE_STUB 3026 #undef DEFINE_PLATFORM_CODE_STUB
3036 #undef DEFINE_HANDLER_CODE_STUB 3027 #undef DEFINE_HANDLER_CODE_STUB
3037 #undef DEFINE_HYDROGEN_CODE_STUB 3028 #undef DEFINE_HYDROGEN_CODE_STUB
3038 #undef DEFINE_CODE_STUB 3029 #undef DEFINE_CODE_STUB
3039 #undef DEFINE_CODE_STUB_BASE 3030 #undef DEFINE_CODE_STUB_BASE
3040 3031
3041 extern Representation RepresentationFromType(Type* type); 3032 extern Representation RepresentationFromType(Type* type);
3042 } } // namespace v8::internal 3033 } } // namespace v8::internal
3043 3034
3044 #endif // V8_CODE_STUBS_H_ 3035 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698