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

Side by Side Diff: src/arguments.h

Issue 869963002: Reland "Call directly to c callbacks in Invoke instead of transitioning to js and back out" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | src/builtins.h » ('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_ARGUMENTS_H_ 5 #ifndef V8_ARGUMENTS_H_
6 #define V8_ARGUMENTS_H_ 6 #define V8_ARGUMENTS_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 double number_at(int index) { 52 double number_at(int index) {
53 return (*this)[index]->Number(); 53 return (*this)[index]->Number();
54 } 54 }
55 55
56 // Get the total number of arguments including the receiver. 56 // Get the total number of arguments including the receiver.
57 int length() const { return static_cast<int>(length_); } 57 int length() const { return static_cast<int>(length_); }
58 58
59 Object** arguments() { return arguments_; } 59 Object** arguments() { return arguments_; }
60 60
61 Object** lowest_address() { return &this->operator[](length() - 1); }
62
63 Object** highest_address() { return &this->operator[](0); }
64
61 private: 65 private:
62 intptr_t length_; 66 intptr_t length_;
63 Object** arguments_; 67 Object** arguments_;
64 }; 68 };
65 69
66 70
67 // For each type of callback, we have a list of arguments 71 // For each type of callback, we have a list of arguments
68 // They are used to generate the Call() functions below 72 // They are used to generate the Call() functions below
69 // These aren't included in the list as they have duplicate signatures 73 // These aren't included in the list as they have duplicate signatures
70 // F(GenericNamedPropertyEnumeratorCallback, ...) 74 // F(GenericNamedPropertyEnumeratorCallback, ...)
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 #define RUNTIME_FUNCTION(Name) RUNTIME_FUNCTION_RETURNS_TYPE(Object*, Name) 285 #define RUNTIME_FUNCTION(Name) RUNTIME_FUNCTION_RETURNS_TYPE(Object*, Name)
282 #define RUNTIME_FUNCTION_RETURN_PAIR(Name) \ 286 #define RUNTIME_FUNCTION_RETURN_PAIR(Name) \
283 RUNTIME_FUNCTION_RETURNS_TYPE(ObjectPair, Name) 287 RUNTIME_FUNCTION_RETURNS_TYPE(ObjectPair, Name)
284 288
285 #define RUNTIME_ARGUMENTS(isolate, args) \ 289 #define RUNTIME_ARGUMENTS(isolate, args) \
286 args.length(), args.arguments(), isolate 290 args.length(), args.arguments(), isolate
287 291
288 } } // namespace v8::internal 292 } } // namespace v8::internal
289 293
290 #endif // V8_ARGUMENTS_H_ 294 #endif // V8_ARGUMENTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698