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

Side by Side Diff: src/objects.h

Issue 9460004: Fix redefining of attributes on aliased arguments. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Andreas Rossberg. Created 8 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 | « src/heap.cc ('k') | src/objects.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 V(ACCESS_CHECK_INFO, AccessCheckInfo, access_check_info) \ 433 V(ACCESS_CHECK_INFO, AccessCheckInfo, access_check_info) \
434 V(INTERCEPTOR_INFO, InterceptorInfo, interceptor_info) \ 434 V(INTERCEPTOR_INFO, InterceptorInfo, interceptor_info) \
435 V(CALL_HANDLER_INFO, CallHandlerInfo, call_handler_info) \ 435 V(CALL_HANDLER_INFO, CallHandlerInfo, call_handler_info) \
436 V(FUNCTION_TEMPLATE_INFO, FunctionTemplateInfo, function_template_info) \ 436 V(FUNCTION_TEMPLATE_INFO, FunctionTemplateInfo, function_template_info) \
437 V(OBJECT_TEMPLATE_INFO, ObjectTemplateInfo, object_template_info) \ 437 V(OBJECT_TEMPLATE_INFO, ObjectTemplateInfo, object_template_info) \
438 V(SIGNATURE_INFO, SignatureInfo, signature_info) \ 438 V(SIGNATURE_INFO, SignatureInfo, signature_info) \
439 V(TYPE_SWITCH_INFO, TypeSwitchInfo, type_switch_info) \ 439 V(TYPE_SWITCH_INFO, TypeSwitchInfo, type_switch_info) \
440 V(SCRIPT, Script, script) \ 440 V(SCRIPT, Script, script) \
441 V(CODE_CACHE, CodeCache, code_cache) \ 441 V(CODE_CACHE, CodeCache, code_cache) \
442 V(POLYMORPHIC_CODE_CACHE, PolymorphicCodeCache, polymorphic_code_cache) \ 442 V(POLYMORPHIC_CODE_CACHE, PolymorphicCodeCache, polymorphic_code_cache) \
443 V(TYPE_FEEDBACK_INFO, TypeFeedbackInfo, type_feedback_info) 443 V(TYPE_FEEDBACK_INFO, TypeFeedbackInfo, type_feedback_info) \
444 V(ALIASED_ARGUMENTS_ENTRY, AliasedArgumentsEntry, aliased_arguments_entry)
444 445
445 #ifdef ENABLE_DEBUGGER_SUPPORT 446 #ifdef ENABLE_DEBUGGER_SUPPORT
446 #define STRUCT_LIST_DEBUGGER(V) \ 447 #define STRUCT_LIST_DEBUGGER(V) \
447 V(DEBUG_INFO, DebugInfo, debug_info) \ 448 V(DEBUG_INFO, DebugInfo, debug_info) \
448 V(BREAK_POINT_INFO, BreakPointInfo, break_point_info) 449 V(BREAK_POINT_INFO, BreakPointInfo, break_point_info)
449 #else 450 #else
450 #define STRUCT_LIST_DEBUGGER(V) 451 #define STRUCT_LIST_DEBUGGER(V)
451 #endif 452 #endif
452 453
453 #define STRUCT_LIST(V) \ 454 #define STRUCT_LIST(V) \
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 INTERCEPTOR_INFO_TYPE, 590 INTERCEPTOR_INFO_TYPE,
590 CALL_HANDLER_INFO_TYPE, 591 CALL_HANDLER_INFO_TYPE,
591 FUNCTION_TEMPLATE_INFO_TYPE, 592 FUNCTION_TEMPLATE_INFO_TYPE,
592 OBJECT_TEMPLATE_INFO_TYPE, 593 OBJECT_TEMPLATE_INFO_TYPE,
593 SIGNATURE_INFO_TYPE, 594 SIGNATURE_INFO_TYPE,
594 TYPE_SWITCH_INFO_TYPE, 595 TYPE_SWITCH_INFO_TYPE,
595 SCRIPT_TYPE, 596 SCRIPT_TYPE,
596 CODE_CACHE_TYPE, 597 CODE_CACHE_TYPE,
597 POLYMORPHIC_CODE_CACHE_TYPE, 598 POLYMORPHIC_CODE_CACHE_TYPE,
598 TYPE_FEEDBACK_INFO_TYPE, 599 TYPE_FEEDBACK_INFO_TYPE,
600 ALIASED_ARGUMENTS_ENTRY_TYPE,
599 // The following two instance types are only used when ENABLE_DEBUGGER_SUPPORT 601 // The following two instance types are only used when ENABLE_DEBUGGER_SUPPORT
600 // is defined. However as include/v8.h contain some of the instance type 602 // is defined. However as include/v8.h contain some of the instance type
601 // constants always having them avoids them getting different numbers 603 // constants always having them avoids them getting different numbers
602 // depending on whether ENABLE_DEBUGGER_SUPPORT is defined or not. 604 // depending on whether ENABLE_DEBUGGER_SUPPORT is defined or not.
603 DEBUG_INFO_TYPE, 605 DEBUG_INFO_TYPE,
604 BREAK_POINT_INFO_TYPE, 606 BREAK_POINT_INFO_TYPE,
605 607
606 FIXED_ARRAY_TYPE, 608 FIXED_ARRAY_TYPE,
607 SHARED_FUNCTION_INFO_TYPE, 609 SHARED_FUNCTION_INFO_TYPE,
608 610
(...skipping 5819 matching lines...) Expand 10 before | Expand all | Expand 10 after
6428 kIcTotalCountOffset + kPointerSize; 6430 kIcTotalCountOffset + kPointerSize;
6429 static const int kTypeFeedbackCellsOffset = 6431 static const int kTypeFeedbackCellsOffset =
6430 kIcWithTypeinfoCountOffset + kPointerSize; 6432 kIcWithTypeinfoCountOffset + kPointerSize;
6431 static const int kSize = kTypeFeedbackCellsOffset + kPointerSize; 6433 static const int kSize = kTypeFeedbackCellsOffset + kPointerSize;
6432 6434
6433 private: 6435 private:
6434 DISALLOW_IMPLICIT_CONSTRUCTORS(TypeFeedbackInfo); 6436 DISALLOW_IMPLICIT_CONSTRUCTORS(TypeFeedbackInfo);
6435 }; 6437 };
6436 6438
6437 6439
6440 // Representation of a slow alias as part of a non-strict arguments objects.
6441 // For fast aliases (if HasNonStrictArgumentsElements()):
6442 // - the parameter map contains an index into the context
6443 // - all attributes of the element have default values
6444 // For slow aliases (if HasDictionaryArgumentsElements()):
6445 // - the parameter map contains no fast alias mapping (i.e. the hole)
6446 // - this struct (in the slow backing store) contains an index into the context
6447 // - all attributes are available as part if the property details
6448 class AliasedArgumentsEntry: public Struct {
6449 public:
6450 inline int aliased_context_slot();
6451 inline void set_aliased_context_slot(int count);
6452
6453 static inline AliasedArgumentsEntry* cast(Object* obj);
6454
6455 #ifdef OBJECT_PRINT
6456 inline void AliasedArgumentsEntryPrint() {
6457 AliasedArgumentsEntryPrint(stdout);
6458 }
6459 void AliasedArgumentsEntryPrint(FILE* out);
6460 #endif
6461 #ifdef DEBUG
6462 void AliasedArgumentsEntryVerify();
6463 #endif
6464
6465 static const int kAliasedContextSlot = HeapObject::kHeaderSize;
6466 static const int kSize = kAliasedContextSlot + kPointerSize;
6467
6468 private:
6469 DISALLOW_IMPLICIT_CONSTRUCTORS(AliasedArgumentsEntry);
6470 };
6471
6472
6438 enum AllowNullsFlag {ALLOW_NULLS, DISALLOW_NULLS}; 6473 enum AllowNullsFlag {ALLOW_NULLS, DISALLOW_NULLS};
6439 enum RobustnessFlag {ROBUST_STRING_TRAVERSAL, FAST_STRING_TRAVERSAL}; 6474 enum RobustnessFlag {ROBUST_STRING_TRAVERSAL, FAST_STRING_TRAVERSAL};
6440 6475
6441 6476
6442 class StringHasher { 6477 class StringHasher {
6443 public: 6478 public:
6444 explicit inline StringHasher(int length, uint32_t seed); 6479 explicit inline StringHasher(int length, uint32_t seed);
6445 6480
6446 // Returns true if the hash of this string can be computed without 6481 // Returns true if the hash of this string can be computed without
6447 // looking at the contents. 6482 // looking at the contents.
(...skipping 1934 matching lines...) Expand 10 before | Expand all | Expand 10 after
8382 } else { 8417 } else {
8383 value &= ~(1 << bit_position); 8418 value &= ~(1 << bit_position);
8384 } 8419 }
8385 return value; 8420 return value;
8386 } 8421 }
8387 }; 8422 };
8388 8423
8389 } } // namespace v8::internal 8424 } } // namespace v8::internal
8390 8425
8391 #endif // V8_OBJECTS_H_ 8426 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698