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

Side by Side Diff: src/objects.h

Issue 952303002: Remove NativeContext from Literal array, since we always create the literals in the native context … (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
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 7556 matching lines...) Expand 10 before | Expand all | Expand 10 after
7567 void JSFunctionIterateBody(int object_size, ObjectVisitor* v); 7567 void JSFunctionIterateBody(int object_size, ObjectVisitor* v);
7568 7568
7569 // Dispatched behavior. 7569 // Dispatched behavior.
7570 DECLARE_PRINTER(JSFunction) 7570 DECLARE_PRINTER(JSFunction)
7571 DECLARE_VERIFIER(JSFunction) 7571 DECLARE_VERIFIER(JSFunction)
7572 7572
7573 // Returns the number of allocated literals. 7573 // Returns the number of allocated literals.
7574 inline int NumberOfLiterals(); 7574 inline int NumberOfLiterals();
7575 7575
7576 // Retrieve the native context from a function's literal array. 7576 // Retrieve the native context from a function's literal array.
7577 static Context* NativeContextFromLiterals(FixedArray* literals); 7577 static Context* NativeContextFromLiterals(FixedArray* literals);
Michael Starzinger 2015/02/25 21:32:33 nit: Implementation is gone, let's also remove the
Toon Verwaest 2015/02/25 21:57:47 Done.
7578 7578
7579 // Used for flags such as --hydrogen-filter. 7579 // Used for flags such as --hydrogen-filter.
7580 bool PassesFilter(const char* raw_filter); 7580 bool PassesFilter(const char* raw_filter);
7581 7581
7582 // Layout descriptors. The last property (from kNonWeakFieldsEndOffset to 7582 // Layout descriptors. The last property (from kNonWeakFieldsEndOffset to
7583 // kSize) is weak and has special handling during garbage collection. 7583 // kSize) is weak and has special handling during garbage collection.
7584 static const int kCodeEntryOffset = JSObject::kHeaderSize; 7584 static const int kCodeEntryOffset = JSObject::kHeaderSize;
7585 static const int kPrototypeOrInitialMapOffset = 7585 static const int kPrototypeOrInitialMapOffset =
7586 kCodeEntryOffset + kPointerSize; 7586 kCodeEntryOffset + kPointerSize;
7587 static const int kSharedFunctionInfoOffset = 7587 static const int kSharedFunctionInfoOffset =
7588 kPrototypeOrInitialMapOffset + kPointerSize; 7588 kPrototypeOrInitialMapOffset + kPointerSize;
7589 static const int kContextOffset = kSharedFunctionInfoOffset + kPointerSize; 7589 static const int kContextOffset = kSharedFunctionInfoOffset + kPointerSize;
7590 static const int kLiteralsOffset = kContextOffset + kPointerSize; 7590 static const int kLiteralsOffset = kContextOffset + kPointerSize;
7591 static const int kNonWeakFieldsEndOffset = kLiteralsOffset + kPointerSize; 7591 static const int kNonWeakFieldsEndOffset = kLiteralsOffset + kPointerSize;
7592 static const int kNextFunctionLinkOffset = kNonWeakFieldsEndOffset; 7592 static const int kNextFunctionLinkOffset = kNonWeakFieldsEndOffset;
7593 static const int kSize = kNextFunctionLinkOffset + kPointerSize; 7593 static const int kSize = kNextFunctionLinkOffset + kPointerSize;
7594 7594
7595 // Layout of the literals array.
7596 static const int kLiteralsPrefixSize = 1;
7597 static const int kLiteralNativeContextIndex = 0;
7598
7599 // Layout of the bound-function binding array. 7595 // Layout of the bound-function binding array.
7600 static const int kBoundFunctionIndex = 0; 7596 static const int kBoundFunctionIndex = 0;
7601 static const int kBoundThisIndex = 1; 7597 static const int kBoundThisIndex = 1;
7602 static const int kBoundArgumentsStartIndex = 2; 7598 static const int kBoundArgumentsStartIndex = 2;
7603 7599
7604 private: 7600 private:
7605 DISALLOW_IMPLICIT_CONSTRUCTORS(JSFunction); 7601 DISALLOW_IMPLICIT_CONSTRUCTORS(JSFunction);
7606 }; 7602 };
7607 7603
7608 7604
(...skipping 3376 matching lines...) Expand 10 before | Expand all | Expand 10 after
10985 } else { 10981 } else {
10986 value &= ~(1 << bit_position); 10982 value &= ~(1 << bit_position);
10987 } 10983 }
10988 return value; 10984 return value;
10989 } 10985 }
10990 }; 10986 };
10991 10987
10992 } } // namespace v8::internal 10988 } } // namespace v8::internal
10993 10989
10994 #endif // V8_OBJECTS_H_ 10990 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698