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

Side by Side Diff: src/objects.h

Issue 726423002: Hydrogen should recognize literal smi arrays as fast literals. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Test failure revealed forgotten requirement with dependencies. Created 6 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/hydrogen.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 8335 matching lines...) Expand 10 before | Expand all | Expand 10 after
8346 bool SitePointsToLiteral() { 8346 bool SitePointsToLiteral() {
8347 // If transition_info is a smi, then it represents an ElementsKind 8347 // If transition_info is a smi, then it represents an ElementsKind
8348 // for a constructed array. Otherwise, it must be a boilerplate 8348 // for a constructed array. Otherwise, it must be a boilerplate
8349 // for an object or array literal. 8349 // for an object or array literal.
8350 return transition_info()->IsJSArray() || transition_info()->IsJSObject(); 8350 return transition_info()->IsJSArray() || transition_info()->IsJSObject();
8351 } 8351 }
8352 8352
8353 static void DigestTransitionFeedback(Handle<AllocationSite> site, 8353 static void DigestTransitionFeedback(Handle<AllocationSite> site,
8354 ElementsKind to_kind); 8354 ElementsKind to_kind);
8355 8355
8356 enum Reason { 8356 static void RegisterForDeoptOnTenureChange(Handle<AllocationSite> site,
8357 TENURING, 8357 CompilationInfo* info);
8358 TRANSITIONS
8359 };
8360 8358
8361 static void AddDependentCompilationInfo(Handle<AllocationSite> site, 8359 static void RegisterForDeoptOnTransitionChange(Handle<AllocationSite> site,
8362 Reason reason, 8360 CompilationInfo* info);
8363 CompilationInfo* info);
8364 8361
8365 DECLARE_PRINTER(AllocationSite) 8362 DECLARE_PRINTER(AllocationSite)
8366 DECLARE_VERIFIER(AllocationSite) 8363 DECLARE_VERIFIER(AllocationSite)
8367 8364
8368 DECLARE_CAST(AllocationSite) 8365 DECLARE_CAST(AllocationSite)
8369 static inline AllocationSiteMode GetMode( 8366 static inline AllocationSiteMode GetMode(
8370 ElementsKind boilerplate_elements_kind); 8367 ElementsKind boilerplate_elements_kind);
8371 static inline AllocationSiteMode GetMode(ElementsKind from, ElementsKind to); 8368 static inline AllocationSiteMode GetMode(ElementsKind from, ElementsKind to);
8372 static inline bool CanTrack(InstanceType type); 8369 static inline bool CanTrack(InstanceType type);
8373 8370
(...skipping 11 matching lines...) Expand all
8385 // field. 8382 // field.
8386 static const int kPointerFieldsBeginOffset = kTransitionInfoOffset; 8383 static const int kPointerFieldsBeginOffset = kTransitionInfoOffset;
8387 static const int kPointerFieldsEndOffset = kDependentCodeOffset; 8384 static const int kPointerFieldsEndOffset = kDependentCodeOffset;
8388 8385
8389 // For other visitors, use the fixed body descriptor below. 8386 // For other visitors, use the fixed body descriptor below.
8390 typedef FixedBodyDescriptor<HeapObject::kHeaderSize, 8387 typedef FixedBodyDescriptor<HeapObject::kHeaderSize,
8391 kDependentCodeOffset + kPointerSize, 8388 kDependentCodeOffset + kPointerSize,
8392 kSize> BodyDescriptor; 8389 kSize> BodyDescriptor;
8393 8390
8394 private: 8391 private:
8395 inline DependentCode::DependencyGroup ToDependencyGroup(Reason reason); 8392 static void AddDependentCompilationInfo(Handle<AllocationSite> site,
8393 DependentCode::DependencyGroup group,
8394 CompilationInfo* info);
8395
8396 bool PretenuringDecisionMade() { 8396 bool PretenuringDecisionMade() {
8397 return pretenure_decision() != kUndecided; 8397 return pretenure_decision() != kUndecided;
8398 } 8398 }
8399 8399
8400 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSite); 8400 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSite);
8401 }; 8401 };
8402 8402
8403 8403
8404 class AllocationMemento: public Struct { 8404 class AllocationMemento: public Struct {
8405 public: 8405 public:
(...skipping 2561 matching lines...) Expand 10 before | Expand all | Expand 10 after
10967 } else { 10967 } else {
10968 value &= ~(1 << bit_position); 10968 value &= ~(1 << bit_position);
10969 } 10969 }
10970 return value; 10970 return value;
10971 } 10971 }
10972 }; 10972 };
10973 10973
10974 } } // namespace v8::internal 10974 } } // namespace v8::internal
10975 10975
10976 #endif // V8_OBJECTS_H_ 10976 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698