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

Side by Side Diff: src/objects.h

Issue 2042013003: [builtins] Properly optimize TypedArray/DataView accessors. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/assert-scope.h" 10 #include "src/assert-scope.h"
(...skipping 6599 matching lines...) Expand 10 before | Expand all | Expand 10 after
6610 6610
6611 enum BuiltinFunctionId { 6611 enum BuiltinFunctionId {
6612 kArrayCode, 6612 kArrayCode,
6613 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ 6613 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \
6614 k##name, 6614 k##name,
6615 FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) 6615 FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID)
6616 ATOMIC_FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) 6616 ATOMIC_FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID)
6617 #undef DECLARE_FUNCTION_ID 6617 #undef DECLARE_FUNCTION_ID
6618 // Fake id for a special case of Math.pow. Note, it continues the 6618 // Fake id for a special case of Math.pow. Note, it continues the
6619 // list of math functions. 6619 // list of math functions.
6620 kMathPowHalf 6620 kMathPowHalf,
6621 // These are manually assigned to special getters during bootstrapping.
6622 kDataViewBuffer,
6623 kDataViewByteLength,
6624 kDataViewByteOffset,
6625 kTypedArrayByteLength,
6626 kTypedArrayByteOffset,
6627 kTypedArrayLength,
6621 }; 6628 };
6622 6629
6623 6630
6624 // Result of searching in an optimized code map of a SharedFunctionInfo. Note 6631 // Result of searching in an optimized code map of a SharedFunctionInfo. Note
6625 // that both {code} and {literals} can be NULL to pass search result status. 6632 // that both {code} and {literals} can be NULL to pass search result status.
6626 struct CodeAndLiterals { 6633 struct CodeAndLiterals {
6627 Code* code; // Cached optimized code. 6634 Code* code; // Cached optimized code.
6628 LiteralsArray* literals; // Cached literals array. 6635 LiteralsArray* literals; // Cached literals array.
6629 }; 6636 };
6630 6637
(...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after
8535 inline bool AsArrayIndex(uint32_t* index); 8542 inline bool AsArrayIndex(uint32_t* index);
8536 8543
8537 // If the name is private, it can only name own properties. 8544 // If the name is private, it can only name own properties.
8538 inline bool IsPrivate(); 8545 inline bool IsPrivate();
8539 8546
8540 inline bool IsUniqueName() const; 8547 inline bool IsUniqueName() const;
8541 8548
8542 // Return a string version of this name that is converted according to the 8549 // Return a string version of this name that is converted according to the
8543 // rules described in ES6 section 9.2.11. 8550 // rules described in ES6 section 9.2.11.
8544 MUST_USE_RESULT static MaybeHandle<String> ToFunctionName(Handle<Name> name); 8551 MUST_USE_RESULT static MaybeHandle<String> ToFunctionName(Handle<Name> name);
8552 MUST_USE_RESULT static MaybeHandle<String> ToFunctionName(
8553 Handle<Name> name, Handle<String> prefix);
8545 8554
8546 DECLARE_CAST(Name) 8555 DECLARE_CAST(Name)
8547 8556
8548 DECLARE_PRINTER(Name) 8557 DECLARE_PRINTER(Name)
8549 #if TRACE_MAPS 8558 #if TRACE_MAPS
8550 void NameShortPrint(); 8559 void NameShortPrint();
8551 int NameShortPrint(Vector<char> str); 8560 int NameShortPrint(Vector<char> str);
8552 #endif 8561 #endif
8553 8562
8554 // Layout description. 8563 // Layout description.
(...skipping 2235 matching lines...) Expand 10 before | Expand all | Expand 10 after
10790 } 10799 }
10791 return value; 10800 return value;
10792 } 10801 }
10793 }; 10802 };
10794 10803
10795 10804
10796 } // NOLINT, false-positive due to second-order macros. 10805 } // NOLINT, false-positive due to second-order macros.
10797 } // NOLINT, false-positive due to second-order macros. 10806 } // NOLINT, false-positive due to second-order macros.
10798 10807
10799 #endif // V8_OBJECTS_H_ 10808 #endif // V8_OBJECTS_H_
OLDNEW
« src/builtins.cc ('K') | « src/js/typedarray.js ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698