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

Side by Side Diff: src/stub-cache.h

Issue 240053010: Return Object* instead of MaybeObject* from runtime calls. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: cmpp Created 6 years, 8 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
« no previous file with comments | « src/serialize.cc ('k') | src/stub-cache.cc » ('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 // 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 friend class SCTableReference; 281 friend class SCTableReference;
282 282
283 DISALLOW_COPY_AND_ASSIGN(StubCache); 283 DISALLOW_COPY_AND_ASSIGN(StubCache);
284 }; 284 };
285 285
286 286
287 // ------------------------------------------------------------------------ 287 // ------------------------------------------------------------------------
288 288
289 289
290 // Support functions for IC stubs for callbacks. 290 // Support functions for IC stubs for callbacks.
291 DECLARE_RUNTIME_FUNCTION(MaybeObject*, StoreCallbackProperty); 291 DECLARE_RUNTIME_FUNCTION(StoreCallbackProperty);
292 292
293 293
294 // Support functions for IC stubs for interceptors. 294 // Support functions for IC stubs for interceptors.
295 DECLARE_RUNTIME_FUNCTION(MaybeObject*, LoadPropertyWithInterceptorOnly); 295 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly);
296 DECLARE_RUNTIME_FUNCTION(MaybeObject*, LoadPropertyWithInterceptorForLoad); 296 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorForLoad);
297 DECLARE_RUNTIME_FUNCTION(MaybeObject*, LoadPropertyWithInterceptorForCall); 297 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorForCall);
298 DECLARE_RUNTIME_FUNCTION(MaybeObject*, StoreInterceptorProperty); 298 DECLARE_RUNTIME_FUNCTION(StoreInterceptorProperty);
299 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadPropertyWithInterceptor); 299 DECLARE_RUNTIME_FUNCTION(KeyedLoadPropertyWithInterceptor);
300 300
301 301
302 enum PrototypeCheckType { CHECK_ALL_MAPS, SKIP_RECEIVER }; 302 enum PrototypeCheckType { CHECK_ALL_MAPS, SKIP_RECEIVER };
303 enum IcCheckType { ELEMENT, PROPERTY }; 303 enum IcCheckType { ELEMENT, PROPERTY };
304 304
305 305
306 // The stub compilers compile stubs for the stub cache. 306 // The stub compilers compile stubs for the stub cache.
307 class StubCompiler BASE_EMBEDDED { 307 class StubCompiler BASE_EMBEDDED {
308 public: 308 public:
309 explicit StubCompiler(Isolate* isolate, 309 explicit StubCompiler(Isolate* isolate,
310 ExtraICState extra_ic_state = kNoExtraICState) 310 ExtraICState extra_ic_state = kNoExtraICState)
311 : isolate_(isolate), extra_ic_state_(extra_ic_state), 311 : isolate_(isolate), extra_ic_state_(extra_ic_state),
312 masm_(isolate, NULL, 256), failure_(NULL) { } 312 masm_(isolate, NULL, 256) { }
313 313
314 Handle<Code> CompileLoadInitialize(Code::Flags flags); 314 Handle<Code> CompileLoadInitialize(Code::Flags flags);
315 Handle<Code> CompileLoadPreMonomorphic(Code::Flags flags); 315 Handle<Code> CompileLoadPreMonomorphic(Code::Flags flags);
316 Handle<Code> CompileLoadMegamorphic(Code::Flags flags); 316 Handle<Code> CompileLoadMegamorphic(Code::Flags flags);
317 317
318 Handle<Code> CompileStoreInitialize(Code::Flags flags); 318 Handle<Code> CompileStoreInitialize(Code::Flags flags);
319 Handle<Code> CompileStorePreMonomorphic(Code::Flags flags); 319 Handle<Code> CompileStorePreMonomorphic(Code::Flags flags);
320 Handle<Code> CompileStoreGeneric(Code::Flags flags); 320 Handle<Code> CompileStoreGeneric(Code::Flags flags);
321 Handle<Code> CompileStoreMegamorphic(Code::Flags flags); 321 Handle<Code> CompileStoreMegamorphic(Code::Flags flags);
322 322
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 int argc, 410 int argc,
411 Register* values); 411 Register* values);
412 412
413 protected: 413 protected:
414 Handle<Code> GetCodeWithFlags(Code::Flags flags, const char* name); 414 Handle<Code> GetCodeWithFlags(Code::Flags flags, const char* name);
415 Handle<Code> GetCodeWithFlags(Code::Flags flags, Handle<Name> name); 415 Handle<Code> GetCodeWithFlags(Code::Flags flags, Handle<Name> name);
416 416
417 ExtraICState extra_state() { return extra_ic_state_; } 417 ExtraICState extra_state() { return extra_ic_state_; }
418 418
419 MacroAssembler* masm() { return &masm_; } 419 MacroAssembler* masm() { return &masm_; }
420 void set_failure(Failure* failure) { failure_ = failure; }
421 420
422 static void LookupPostInterceptor(Handle<JSObject> holder, 421 static void LookupPostInterceptor(Handle<JSObject> holder,
423 Handle<Name> name, 422 Handle<Name> name,
424 LookupResult* lookup); 423 LookupResult* lookup);
425 424
426 Isolate* isolate() { return isolate_; } 425 Isolate* isolate() { return isolate_; }
427 Heap* heap() { return isolate()->heap(); } 426 Heap* heap() { return isolate()->heap(); }
428 Factory* factory() { return isolate()->factory(); } 427 Factory* factory() { return isolate()->factory(); }
429 428
430 static void GenerateTailCall(MacroAssembler* masm, Handle<Code> code); 429 static void GenerateTailCall(MacroAssembler* masm, Handle<Code> code);
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 Handle<JSFunction> constant_function_; 852 Handle<JSFunction> constant_function_;
854 bool is_simple_api_call_; 853 bool is_simple_api_call_;
855 Handle<FunctionTemplateInfo> expected_receiver_type_; 854 Handle<FunctionTemplateInfo> expected_receiver_type_;
856 Handle<CallHandlerInfo> api_call_info_; 855 Handle<CallHandlerInfo> api_call_info_;
857 }; 856 };
858 857
859 858
860 } } // namespace v8::internal 859 } } // namespace v8::internal
861 860
862 #endif // V8_STUB_CACHE_H_ 861 #endif // V8_STUB_CACHE_H_
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698