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

Unified Diff: src/code-stubs.h

Issue 428183003: Fix issue with storing 31-bit bitfield as Smi. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: reverted v8.h Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index fd6b0a9e27d4293eec0b6a2d44044dc0487ef258..661152465b29561687bb92945b71c35fcc5945f1 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -1610,7 +1610,9 @@ class RegExpConstructResultStub V8_FINAL : public HydrogenCodeStub {
class CallFunctionStub: public PlatformCodeStub {
public:
CallFunctionStub(Isolate* isolate, int argc, CallFunctionFlags flags)
- : PlatformCodeStub(isolate), argc_(argc), flags_(flags) { }
+ : PlatformCodeStub(isolate), argc_(argc), flags_(flags) {
+ ASSERT(argc <= Code::kMaxArguments);
+ }
void Generate(MacroAssembler* masm);
@@ -1626,7 +1628,9 @@ class CallFunctionStub: public PlatformCodeStub {
// Minor key encoding in 32 bits with Bitfield <Type, shift, size>.
class FlagBits: public BitField<CallFunctionFlags, 0, 2> {};
- class ArgcBits: public BitField<unsigned, 2, 32 - 2> {};
+ class ArgcBits : public BitField<unsigned, 2, Code::kArgumentsBits> {};
+
+ STATIC_ASSERT(Code::kArgumentsBits + 2 <= kStubMinorKeyBits);
Major MajorKey() const { return CallFunction; }
int MinorKey() const {
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698