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

Side by Side Diff: src/arguments.h

Issue 23461039: add context save for GenerateFastApiCall (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: arm Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 #undef WRITE_CALL_2_VOID 230 #undef WRITE_CALL_2_VOID
231 }; 231 };
232 232
233 233
234 class FunctionCallbackArguments 234 class FunctionCallbackArguments
235 : public CustomArguments<FunctionCallbackInfo<Value> > { 235 : public CustomArguments<FunctionCallbackInfo<Value> > {
236 public: 236 public:
237 typedef FunctionCallbackInfo<Value> T; 237 typedef FunctionCallbackInfo<Value> T;
238 typedef CustomArguments<T> Super; 238 typedef CustomArguments<T> Super;
239 static const int kArgsLength = T::kArgsLength; 239 static const int kArgsLength = T::kArgsLength;
240 static const int kHolderIndex = T::kHolderIndex;
240 241
241 FunctionCallbackArguments(internal::Isolate* isolate, 242 FunctionCallbackArguments(internal::Isolate* isolate,
242 internal::Object* data, 243 internal::Object* data,
243 internal::JSFunction* callee, 244 internal::JSFunction* callee,
244 internal::Object* holder, 245 internal::Object* holder,
245 internal::Object** argv, 246 internal::Object** argv,
246 int argc, 247 int argc,
247 bool is_construct_call) 248 bool is_construct_call)
248 : Super(isolate), 249 : Super(isolate),
249 argv_(argv), 250 argv_(argv),
250 argc_(argc), 251 argc_(argc),
251 is_construct_call_(is_construct_call) { 252 is_construct_call_(is_construct_call) {
252 Object** values = end(); 253 Object** values = end();
253 values[T::kDataIndex] = data; 254 values[T::kDataIndex] = data;
254 values[T::kCalleeIndex] = callee; 255 values[T::kCalleeIndex] = callee;
255 values[T::kHolderIndex] = holder; 256 values[T::kHolderIndex] = holder;
257 values[T::kContextSaveIndex] = isolate->heap()->the_hole_value();
256 values[T::kIsolateIndex] = reinterpret_cast<internal::Object*>(isolate); 258 values[T::kIsolateIndex] = reinterpret_cast<internal::Object*>(isolate);
257 // Here the hole is set as default value. 259 // Here the hole is set as default value.
258 // It cannot escape into js as it's remove in Call below. 260 // It cannot escape into js as it's remove in Call below.
259 values[T::kReturnValueDefaultValueIndex] = 261 values[T::kReturnValueDefaultValueIndex] =
260 isolate->heap()->the_hole_value(); 262 isolate->heap()->the_hole_value();
261 values[T::kReturnValueIndex] = isolate->heap()->the_hole_value(); 263 values[T::kReturnValueIndex] = isolate->heap()->the_hole_value();
262 ASSERT(values[T::kCalleeIndex]->IsJSFunction()); 264 ASSERT(values[T::kCalleeIndex]->IsJSFunction());
263 ASSERT(values[T::kHolderIndex]->IsHeapObject()); 265 ASSERT(values[T::kHolderIndex]->IsHeapObject());
264 ASSERT(values[T::kIsolateIndex]->IsSmi()); 266 ASSERT(values[T::kIsolateIndex]->IsSmi());
265 } 267 }
(...skipping 25 matching lines...) Expand all
291 return __RT_impl_##Name(args, isolate); \ 293 return __RT_impl_##Name(args, isolate); \
292 } \ 294 } \
293 static Type __RT_impl_##Name(Arguments args, Isolate* isolate) 295 static Type __RT_impl_##Name(Arguments args, Isolate* isolate)
294 296
295 #define RUNTIME_ARGUMENTS(isolate, args) \ 297 #define RUNTIME_ARGUMENTS(isolate, args) \
296 args.length(), args.arguments(), isolate 298 args.length(), args.arguments(), isolate
297 299
298 } } // namespace v8::internal 300 } } // namespace v8::internal
299 301
300 #endif // V8_ARGUMENTS_H_ 302 #endif // V8_ARGUMENTS_H_
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/arm/code-stubs-arm.cc » ('j') | src/ia32/stub-cache-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698