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

Side by Side Diff: src/frame-element.h

Issue 652044: Fix reliability crash caused by wrong assert. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/jump-target.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // we have to inspect their backing element in the frame. 58 // we have to inspect their backing element in the frame.
59 ASSERT(!is_copy()); 59 ASSERT(!is_copy());
60 if (!is_constant()) return NumberInfoField::decode(value_); 60 if (!is_constant()) return NumberInfoField::decode(value_);
61 Handle<Object> value = handle(); 61 Handle<Object> value = handle();
62 if (value->IsSmi()) return NumberInfo::kSmi; 62 if (value->IsSmi()) return NumberInfo::kSmi;
63 if (value->IsHeapNumber()) return NumberInfo::kHeapNumber; 63 if (value->IsHeapNumber()) return NumberInfo::kHeapNumber;
64 return NumberInfo::kUnknown; 64 return NumberInfo::kUnknown;
65 } 65 }
66 66
67 inline void set_number_info(NumberInfo::Type info) { 67 inline void set_number_info(NumberInfo::Type info) {
68 // Copied elements do not have number info. Instead
69 // we have to inspect their backing element in the frame.
70 ASSERT(!is_copy());
68 value_ = value_ & ~NumberInfoField::mask(); 71 value_ = value_ & ~NumberInfoField::mask();
69 value_ = value_ | NumberInfoField::encode(info); 72 value_ = value_ | NumberInfoField::encode(info);
70 } 73 }
71 74
72 // The default constructor creates an invalid frame element. 75 // The default constructor creates an invalid frame element.
73 FrameElement() { 76 FrameElement() {
74 value_ = TypeField::encode(INVALID) 77 value_ = TypeField::encode(INVALID)
75 | CopiedField::encode(false) 78 | CopiedField::encode(false)
76 | SyncedField::encode(false) 79 | SyncedField::encode(false)
77 | NumberInfoField::encode(NumberInfo::kUninitialized) 80 | NumberInfoField::encode(NumberInfo::kUninitialized)
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 class SyncedField: public BitField<bool, 4, 1> {}; 254 class SyncedField: public BitField<bool, 4, 1> {};
252 class NumberInfoField: public BitField<NumberInfo::Type, 5, 3> {}; 255 class NumberInfoField: public BitField<NumberInfo::Type, 5, 3> {};
253 class DataField: public BitField<uint32_t, 8, 32 - 8> {}; 256 class DataField: public BitField<uint32_t, 8, 32 - 8> {};
254 257
255 friend class VirtualFrame; 258 friend class VirtualFrame;
256 }; 259 };
257 260
258 } } // namespace v8::internal 261 } } // namespace v8::internal
259 262
260 #endif // V8_FRAME_ELEMENT_H_ 263 #endif // V8_FRAME_ELEMENT_H_
OLDNEW
« no previous file with comments | « no previous file | src/jump-target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698