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

Side by Side Diff: src/builtins/builtins.h

Issue 2152693002: [stubs] Introduce NonPrimitiveToPrimitive builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments. Created 4 years, 5 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/builtins.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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_BUILTINS_BUILTINS_H_ 5 #ifndef V8_BUILTINS_BUILTINS_H_
6 #define V8_BUILTINS_BUILTINS_H_ 6 #define V8_BUILTINS_BUILTINS_H_
7 7
8 #include "src/base/flags.h" 8 #include "src/base/flags.h"
9 #include "src/handles.h" 9 #include "src/handles.h"
10 10
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 V(SymbolPrototypeToPrimitive, 2) \ 355 V(SymbolPrototypeToPrimitive, 2) \
356 V(SymbolPrototypeToString, 1) \ 356 V(SymbolPrototypeToString, 1) \
357 V(SymbolPrototypeValueOf, 1) \ 357 V(SymbolPrototypeValueOf, 1) \
358 V(TypedArrayPrototypeByteLength, 1) \ 358 V(TypedArrayPrototypeByteLength, 1) \
359 V(TypedArrayPrototypeByteOffset, 1) \ 359 V(TypedArrayPrototypeByteOffset, 1) \
360 V(TypedArrayPrototypeLength, 1) \ 360 V(TypedArrayPrototypeLength, 1) \
361 V(AtomicsLoad, 3) \ 361 V(AtomicsLoad, 3) \
362 V(AtomicsStore, 4) 362 V(AtomicsStore, 4)
363 363
364 // Define list of builtins implemented in TurboFan (with CallStub linkage). 364 // Define list of builtins implemented in TurboFan (with CallStub linkage).
365 #define BUILTIN_LIST_S(V) \ 365 #define BUILTIN_LIST_S(V) \
366 V(LoadGlobalIC_Miss, BUILTIN, kNoExtraICState, LoadGlobalWithVector) \ 366 V(LoadGlobalIC_Miss, BUILTIN, kNoExtraICState, LoadGlobalWithVector) \
367 V(LoadGlobalIC_SlowNotInsideTypeof, HANDLER, Code::LOAD_GLOBAL_IC, \ 367 V(LoadGlobalIC_SlowNotInsideTypeof, HANDLER, Code::LOAD_GLOBAL_IC, \
368 LoadGlobalWithVector) \ 368 LoadGlobalWithVector) \
369 V(LoadGlobalIC_SlowInsideTypeof, HANDLER, Code::LOAD_GLOBAL_IC, \ 369 V(LoadGlobalIC_SlowInsideTypeof, HANDLER, Code::LOAD_GLOBAL_IC, \
370 LoadGlobalWithVector) \ 370 LoadGlobalWithVector) \
371 V(LoadIC_Miss, BUILTIN, kNoExtraICState, LoadWithVector) \ 371 V(LoadIC_Miss, BUILTIN, kNoExtraICState, LoadWithVector) \
372 V(LoadIC_Slow, HANDLER, Code::LOAD_IC, LoadWithVector) \ 372 V(LoadIC_Slow, HANDLER, Code::LOAD_IC, LoadWithVector) \
373 V(StoreIC_Miss, BUILTIN, kNoExtraICState, VectorStoreIC) \ 373 V(StoreIC_Miss, BUILTIN, kNoExtraICState, VectorStoreIC) \
374 V(StoreIC_SlowSloppy, HANDLER, Code::STORE_IC, VectorStoreIC) \ 374 V(StoreIC_SlowSloppy, HANDLER, Code::STORE_IC, VectorStoreIC) \
375 V(StoreIC_SlowStrict, HANDLER, Code::STORE_IC, VectorStoreIC) 375 V(StoreIC_SlowStrict, HANDLER, Code::STORE_IC, VectorStoreIC) \
376 V(OrdinaryToPrimitive_Number, BUILTIN, kNoExtraICState, TypeConversion) \
377 V(OrdinaryToPrimitive_String, BUILTIN, kNoExtraICState, TypeConversion) \
378 V(NonPrimitiveToPrimitive_Default, BUILTIN, kNoExtraICState, TypeConversion) \
379 V(NonPrimitiveToPrimitive_Number, BUILTIN, kNoExtraICState, TypeConversion) \
380 V(NonPrimitiveToPrimitive_String, BUILTIN, kNoExtraICState, TypeConversion)
376 381
377 // Define list of builtin handlers implemented in assembly. 382 // Define list of builtin handlers implemented in assembly.
378 #define BUILTIN_LIST_H(V) \ 383 #define BUILTIN_LIST_H(V) \
379 V(KeyedLoadIC_Slow, KEYED_LOAD_IC) \ 384 V(KeyedLoadIC_Slow, KEYED_LOAD_IC) \
380 V(KeyedStoreIC_Slow, KEYED_STORE_IC) \ 385 V(KeyedStoreIC_Slow, KEYED_STORE_IC) \
381 V(LoadIC_Normal, LOAD_IC) \ 386 V(LoadIC_Normal, LOAD_IC) \
382 V(StoreIC_Normal, STORE_IC) 387 V(StoreIC_Normal, STORE_IC)
383 388
384 // Define list of builtins used by the debugger implemented in assembly. 389 // Define list of builtins used by the debugger implemented in assembly.
385 #define BUILTIN_LIST_DEBUG_A(V) \ 390 #define BUILTIN_LIST_DEBUG_A(V) \
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 #undef DECLARE_BUILTIN_ACCESSOR_S 455 #undef DECLARE_BUILTIN_ACCESSOR_S
451 #undef DECLARE_BUILTIN_ACCESSOR_H 456 #undef DECLARE_BUILTIN_ACCESSOR_H
452 457
453 // Convenience wrappers. 458 // Convenience wrappers.
454 Handle<Code> CallFunction( 459 Handle<Code> CallFunction(
455 ConvertReceiverMode = ConvertReceiverMode::kAny, 460 ConvertReceiverMode = ConvertReceiverMode::kAny,
456 TailCallMode tail_call_mode = TailCallMode::kDisallow); 461 TailCallMode tail_call_mode = TailCallMode::kDisallow);
457 Handle<Code> Call(ConvertReceiverMode = ConvertReceiverMode::kAny, 462 Handle<Code> Call(ConvertReceiverMode = ConvertReceiverMode::kAny,
458 TailCallMode tail_call_mode = TailCallMode::kDisallow); 463 TailCallMode tail_call_mode = TailCallMode::kDisallow);
459 Handle<Code> CallBoundFunction(TailCallMode tail_call_mode); 464 Handle<Code> CallBoundFunction(TailCallMode tail_call_mode);
465 Handle<Code> NonPrimitiveToPrimitive(
466 ToPrimitiveHint hint = ToPrimitiveHint::kDefault);
467 Handle<Code> OrdinaryToPrimitive(OrdinaryToPrimitiveHint hint);
460 Handle<Code> InterpreterPushArgsAndCall( 468 Handle<Code> InterpreterPushArgsAndCall(
461 TailCallMode tail_call_mode, 469 TailCallMode tail_call_mode,
462 CallableType function_type = CallableType::kAny); 470 CallableType function_type = CallableType::kAny);
463 471
464 Code* builtin(Name name) { 472 Code* builtin(Name name) {
465 // Code::cast cannot be used here since we access builtins 473 // Code::cast cannot be used here since we access builtins
466 // during the marking phase of mark sweep. See IC::Clear. 474 // during the marking phase of mark sweep. See IC::Clear.
467 return reinterpret_cast<Code*>(builtins_[name]); 475 return reinterpret_cast<Code*>(builtins_[name]);
468 } 476 }
469 477
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 friend class BuiltinFunctionTable; 848 friend class BuiltinFunctionTable;
841 friend class Isolate; 849 friend class Isolate;
842 850
843 DISALLOW_COPY_AND_ASSIGN(Builtins); 851 DISALLOW_COPY_AND_ASSIGN(Builtins);
844 }; 852 };
845 853
846 } // namespace internal 854 } // namespace internal
847 } // namespace v8 855 } // namespace v8
848 856
849 #endif // V8_BUILTINS_BUILTINS_H_ 857 #endif // V8_BUILTINS_BUILTINS_H_
OLDNEW
« no previous file with comments | « no previous file | src/builtins/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698