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

Side by Side Diff: src/codegen-ia32.h

Issue 9689: Reporting -1 as the size of an ILLEGAL reference which actually has... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 1 month 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/codegen-arm.cc ('k') | src/codegen-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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 Reference(CodeGenerator* cgen, Expression* expression); 114 Reference(CodeGenerator* cgen, Expression* expression);
115 ~Reference(); 115 ~Reference();
116 116
117 Expression* expression() const { return expression_; } 117 Expression* expression() const { return expression_; }
118 Type type() const { return type_; } 118 Type type() const { return type_; }
119 void set_type(Type value) { 119 void set_type(Type value) {
120 ASSERT(type_ == ILLEGAL); 120 ASSERT(type_ == ILLEGAL);
121 type_ = value; 121 type_ = value;
122 } 122 }
123 123
124 // The size of the reference or -1 if the reference is illegal. 124 // The size the reference takes up on the stack.
125 int size() const { return type_; } 125 int size() const { return (type_ == ILLEGAL) ? 0 : type_; }
126 126
127 bool is_illegal() const { return type_ == ILLEGAL; } 127 bool is_illegal() const { return type_ == ILLEGAL; }
128 bool is_slot() const { return type_ == SLOT; } 128 bool is_slot() const { return type_ == SLOT; }
129 bool is_property() const { return type_ == NAMED || type_ == KEYED; } 129 bool is_property() const { return type_ == NAMED || type_ == KEYED; }
130 130
131 // Return the name. Only valid for named property references. 131 // Return the name. Only valid for named property references.
132 Handle<String> GetName(); 132 Handle<String> GetName();
133 133
134 // Generate code to push the value of the reference on top of the 134 // Generate code to push the value of the reference on top of the
135 // expression stack. The reference is expected to be already on top of 135 // expression stack. The reference is expected to be already on top of
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 friend class VirtualFrame; 427 friend class VirtualFrame;
428 friend class Reference; 428 friend class Reference;
429 429
430 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); 430 DISALLOW_COPY_AND_ASSIGN(CodeGenerator);
431 }; 431 };
432 432
433 433
434 } } // namespace v8::internal 434 } } // namespace v8::internal
435 435
436 #endif // V8_CODEGEN_IA32_H_ 436 #endif // V8_CODEGEN_IA32_H_
OLDNEW
« no previous file with comments | « src/codegen-arm.cc ('k') | src/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698