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

Side by Side Diff: src/property.h

Issue 6529055: [Isolates] Merge crankshaft (r5922 from bleeding_edge). (Closed)
Patch Set: Win32 port Created 9 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
« no previous file with comments | « src/profile-generator.cc ('k') | src/rewriter.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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 return Smi::FromInt(0); 259 return Smi::FromInt(0);
260 } 260 }
261 } 261 }
262 262
263 Map* GetTransitionMap() { 263 Map* GetTransitionMap() {
264 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); 264 ASSERT(lookup_type_ == DESCRIPTOR_TYPE);
265 ASSERT(type() == MAP_TRANSITION || type() == CONSTANT_TRANSITION); 265 ASSERT(type() == MAP_TRANSITION || type() == CONSTANT_TRANSITION);
266 return Map::cast(GetValue()); 266 return Map::cast(GetValue());
267 } 267 }
268 268
269 Map* GetTransitionMapFromMap(Map* map) {
270 ASSERT(lookup_type_ == DESCRIPTOR_TYPE);
271 ASSERT(type() == MAP_TRANSITION);
272 return Map::cast(map->instance_descriptors()->GetValue(number_));
273 }
274
269 int GetFieldIndex() { 275 int GetFieldIndex() {
270 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); 276 ASSERT(lookup_type_ == DESCRIPTOR_TYPE);
271 ASSERT(type() == FIELD); 277 ASSERT(type() == FIELD);
272 return Descriptor::IndexFromValue(GetValue()); 278 return Descriptor::IndexFromValue(GetValue());
273 } 279 }
274 280
281 int GetLocalFieldIndexFromMap(Map* map) {
282 ASSERT(lookup_type_ == DESCRIPTOR_TYPE);
283 ASSERT(type() == FIELD);
284 return Descriptor::IndexFromValue(
285 map->instance_descriptors()->GetValue(number_)) -
286 map->inobject_properties();
287 }
288
275 int GetDictionaryEntry() { 289 int GetDictionaryEntry() {
276 ASSERT(lookup_type_ == DICTIONARY_TYPE); 290 ASSERT(lookup_type_ == DICTIONARY_TYPE);
277 return number_; 291 return number_;
278 } 292 }
279 293
280 JSFunction* GetConstantFunction() { 294 JSFunction* GetConstantFunction() {
281 ASSERT(type() == CONSTANT_FUNCTION); 295 ASSERT(type() == CONSTANT_FUNCTION);
282 return JSFunction::cast(GetValue()); 296 return JSFunction::cast(GetValue());
283 } 297 }
284 298
299 JSFunction* GetConstantFunctionFromMap(Map* map) {
300 ASSERT(lookup_type_ == DESCRIPTOR_TYPE);
301 ASSERT(type() == CONSTANT_FUNCTION);
302 return JSFunction::cast(map->instance_descriptors()->GetValue(number_));
303 }
304
285 Object* GetCallbackObject() { 305 Object* GetCallbackObject() {
286 if (lookup_type_ == CONSTANT_TYPE) { 306 if (lookup_type_ == CONSTANT_TYPE) {
287 // For now we only have the __proto__ as constant type. 307 // For now we only have the __proto__ as constant type.
288 return HEAP->prototype_accessors(); 308 return HEAP->prototype_accessors();
289 } 309 }
290 return GetValue(); 310 return GetValue();
291 } 311 }
292 312
293 #ifdef DEBUG 313 #ifdef DEBUG
294 void Print(); 314 void Print();
(...skipping 13 matching lines...) Expand all
308 JSObject* holder_; 328 JSObject* holder_;
309 int number_; 329 int number_;
310 bool cacheable_; 330 bool cacheable_;
311 PropertyDetails details_; 331 PropertyDetails details_;
312 }; 332 };
313 333
314 334
315 } } // namespace v8::internal 335 } } // namespace v8::internal
316 336
317 #endif // V8_PROPERTY_H_ 337 #endif // V8_PROPERTY_H_
OLDNEW
« no previous file with comments | « src/profile-generator.cc ('k') | src/rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698