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

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

Issue 7920006: Fix asserts and GC unsafeness in stub generation, bug=1689. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 3 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/arm/lithium-codegen-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 static const char* MajorName(Major major_key, bool allow_unknown_keys); 141 static const char* MajorName(Major major_key, bool allow_unknown_keys);
142 142
143 virtual ~CodeStub() {} 143 virtual ~CodeStub() {}
144 144
145 // See comment above, where Instanceof is defined. 145 // See comment above, where Instanceof is defined.
146 virtual bool CompilingCallsToThisStubIsGCSafe() { 146 virtual bool CompilingCallsToThisStubIsGCSafe() {
147 return MajorKey() <= Instanceof; 147 return MajorKey() <= Instanceof;
148 } 148 }
149 149
150
151 static void GenerateStubsAheadOfTime(); 150 static void GenerateStubsAheadOfTime();
151 static void GenerateFPStubs();
152 152
153 // Some stubs put untagged junk on the stack that cannot be scanned by the 153 // Some stubs put untagged junk on the stack that cannot be scanned by the
154 // GC. This means that we must be statically sure that no GC can occur while 154 // GC. This means that we must be statically sure that no GC can occur while
155 // they are running. If that is the case they should override this to return 155 // they are running. If that is the case they should override this to return
156 // true, which will cause an assertion if we try to call something that can 156 // true, which will cause an assertion if we try to call something that can
157 // GC or if we try to put a stack frame on top of the junk, which would not 157 // GC or if we try to put a stack frame on top of the junk, which would not
158 // result in a traversable stack. 158 // result in a traversable stack.
159 virtual bool SometimesSetsUpAFrame() { return true; } 159 virtual bool SometimesSetsUpAFrame() { return true; }
160 160
161 protected: 161 protected:
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 bool result); 969 bool result);
970 void GenerateTypeTransition(MacroAssembler* masm); 970 void GenerateTypeTransition(MacroAssembler* masm);
971 971
972 Register tos_; 972 Register tos_;
973 Types types_; 973 Types types_;
974 }; 974 };
975 975
976 } } // namespace v8::internal 976 } } // namespace v8::internal
977 977
978 #endif // V8_CODE_STUBS_H_ 978 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698