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

Side by Side Diff: src/objects.h

Issue 1540953004: [runtime] Rewrite Function.prototype.toString in C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix typos. Created 5 years 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/allocation.h" 10 #include "src/allocation.h"
(...skipping 7392 matching lines...) Expand 10 before | Expand all | Expand 10 after
7403 7403
7404 // The function's name if it is configured, otherwise shared function info 7404 // The function's name if it is configured, otherwise shared function info
7405 // debug name. 7405 // debug name.
7406 static Handle<String> GetName(Handle<JSFunction> function); 7406 static Handle<String> GetName(Handle<JSFunction> function);
7407 7407
7408 // The function's displayName if it is set, otherwise name if it is 7408 // The function's displayName if it is set, otherwise name if it is
7409 // configured, otherwise shared function info 7409 // configured, otherwise shared function info
7410 // debug name. 7410 // debug name.
7411 static Handle<String> GetDebugName(Handle<JSFunction> function); 7411 static Handle<String> GetDebugName(Handle<JSFunction> function);
7412 7412
7413 // The function's string representation implemented according to
7414 // ES6 section 19.2.3.5 Function.prototype.toString ( ).
7415 static Handle<String> ToString(Handle<JSFunction> function);
7416
7413 // Layout descriptors. The last property (from kNonWeakFieldsEndOffset to 7417 // Layout descriptors. The last property (from kNonWeakFieldsEndOffset to
7414 // kSize) is weak and has special handling during garbage collection. 7418 // kSize) is weak and has special handling during garbage collection.
7415 static const int kPrototypeOrInitialMapOffset = JSObject::kHeaderSize; 7419 static const int kPrototypeOrInitialMapOffset = JSObject::kHeaderSize;
7416 static const int kSharedFunctionInfoOffset = 7420 static const int kSharedFunctionInfoOffset =
7417 kPrototypeOrInitialMapOffset + kPointerSize; 7421 kPrototypeOrInitialMapOffset + kPointerSize;
7418 static const int kContextOffset = kSharedFunctionInfoOffset + kPointerSize; 7422 static const int kContextOffset = kSharedFunctionInfoOffset + kPointerSize;
7419 static const int kLiteralsOffset = kContextOffset + kPointerSize; 7423 static const int kLiteralsOffset = kContextOffset + kPointerSize;
7420 static const int kNonWeakFieldsEndOffset = kLiteralsOffset + kPointerSize; 7424 static const int kNonWeakFieldsEndOffset = kLiteralsOffset + kPointerSize;
7421 static const int kCodeEntryOffset = kNonWeakFieldsEndOffset; 7425 static const int kCodeEntryOffset = kNonWeakFieldsEndOffset;
7422 static const int kNextFunctionLinkOffset = kCodeEntryOffset + kPointerSize; 7426 static const int kNextFunctionLinkOffset = kCodeEntryOffset + kPointerSize;
(...skipping 3285 matching lines...) Expand 10 before | Expand all | Expand 10 after
10708 } 10712 }
10709 return value; 10713 return value;
10710 } 10714 }
10711 }; 10715 };
10712 10716
10713 10717
10714 } // NOLINT, false-positive due to second-order macros. 10718 } // NOLINT, false-positive due to second-order macros.
10715 } // NOLINT, false-positive due to second-order macros. 10719 } // NOLINT, false-positive due to second-order macros.
10716 10720
10717 #endif // V8_OBJECTS_H_ 10721 #endif // V8_OBJECTS_H_
OLDNEW
« src/debug/mirrors.js ('K') | « src/mips64/builtins-mips64.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698