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

Side by Side Diff: src/objects-inl.h

Issue 2280007: Extend CallIC to support non-constant names.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 6 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/objects.cc ('k') | src/spaces.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 2178 matching lines...) Expand 10 before | Expand all | Expand 10 after
2189 2189
2190 2190
2191 Code::Flags Code::flags() { 2191 Code::Flags Code::flags() {
2192 return static_cast<Flags>(READ_INT_FIELD(this, kFlagsOffset)); 2192 return static_cast<Flags>(READ_INT_FIELD(this, kFlagsOffset));
2193 } 2193 }
2194 2194
2195 2195
2196 void Code::set_flags(Code::Flags flags) { 2196 void Code::set_flags(Code::Flags flags) {
2197 STATIC_ASSERT(Code::NUMBER_OF_KINDS <= (kFlagsKindMask >> kFlagsKindShift)+1); 2197 STATIC_ASSERT(Code::NUMBER_OF_KINDS <= (kFlagsKindMask >> kFlagsKindShift)+1);
2198 // Make sure that all call stubs have an arguments count. 2198 // Make sure that all call stubs have an arguments count.
2199 ASSERT(ExtractKindFromFlags(flags) != CALL_IC || 2199 ASSERT((ExtractKindFromFlags(flags) != CALL_IC &&
2200 ExtractKindFromFlags(flags) != KEYED_CALL_IC) ||
2200 ExtractArgumentsCountFromFlags(flags) >= 0); 2201 ExtractArgumentsCountFromFlags(flags) >= 0);
2201 WRITE_INT_FIELD(this, kFlagsOffset, flags); 2202 WRITE_INT_FIELD(this, kFlagsOffset, flags);
2202 } 2203 }
2203 2204
2204 2205
2205 Code::Kind Code::kind() { 2206 Code::Kind Code::kind() {
2206 return ExtractKindFromFlags(flags()); 2207 return ExtractKindFromFlags(flags());
2207 } 2208 }
2208 2209
2209 2210
(...skipping 15 matching lines...) Expand all
2225 } 2226 }
2226 2227
2227 2228
2228 PropertyType Code::type() { 2229 PropertyType Code::type() {
2229 ASSERT(ic_state() == MONOMORPHIC); 2230 ASSERT(ic_state() == MONOMORPHIC);
2230 return ExtractTypeFromFlags(flags()); 2231 return ExtractTypeFromFlags(flags());
2231 } 2232 }
2232 2233
2233 2234
2234 int Code::arguments_count() { 2235 int Code::arguments_count() {
2235 ASSERT(is_call_stub() || kind() == STUB); 2236 ASSERT(is_call_stub() || is_keyed_call_stub() || kind() == STUB);
2236 return ExtractArgumentsCountFromFlags(flags()); 2237 return ExtractArgumentsCountFromFlags(flags());
2237 } 2238 }
2238 2239
2239 2240
2240 CodeStub::Major Code::major_key() { 2241 CodeStub::Major Code::major_key() {
2241 ASSERT(kind() == STUB || kind() == BINARY_OP_IC); 2242 ASSERT(kind() == STUB || kind() == BINARY_OP_IC);
2242 return static_cast<CodeStub::Major>(READ_BYTE_FIELD(this, 2243 return static_cast<CodeStub::Major>(READ_BYTE_FIELD(this,
2243 kStubMajorKeyOffset)); 2244 kStubMajorKeyOffset));
2244 } 2245 }
2245 2246
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
3224 #undef WRITE_INT_FIELD 3225 #undef WRITE_INT_FIELD
3225 #undef READ_SHORT_FIELD 3226 #undef READ_SHORT_FIELD
3226 #undef WRITE_SHORT_FIELD 3227 #undef WRITE_SHORT_FIELD
3227 #undef READ_BYTE_FIELD 3228 #undef READ_BYTE_FIELD
3228 #undef WRITE_BYTE_FIELD 3229 #undef WRITE_BYTE_FIELD
3229 3230
3230 3231
3231 } } // namespace v8::internal 3232 } } // namespace v8::internal
3232 3233
3233 #endif // V8_OBJECTS_INL_H_ 3234 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698