| OLD | NEW |
| 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_H_ | 5 #ifndef V8_BUILTINS_H_ |
| 6 #define V8_BUILTINS_H_ | 6 #define V8_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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 V(CompileOptimizedConcurrent, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 207 V(CompileOptimizedConcurrent, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 208 V(NotifyDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 208 V(NotifyDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 209 V(NotifySoftDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 209 V(NotifySoftDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 210 V(NotifyLazyDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 210 V(NotifyLazyDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 211 V(NotifyStubFailure, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 211 V(NotifyStubFailure, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 212 V(NotifyStubFailureSaveDoubles, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 212 V(NotifyStubFailureSaveDoubles, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 213 \ | 213 \ |
| 214 V(InterpreterEntryTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 214 V(InterpreterEntryTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 215 V(InterpreterExitTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 215 V(InterpreterExitTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 216 V(InterpreterPushArgsAndCall, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 216 V(InterpreterPushArgsAndCall, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 217 V(InterpreterPushArgsAndTailCall, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 217 V(InterpreterPushArgsAndConstruct, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 218 V(InterpreterPushArgsAndConstruct, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 218 V(InterpreterNotifyDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 219 V(InterpreterNotifyDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 219 V(InterpreterNotifySoftDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 220 V(InterpreterNotifySoftDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 220 V(InterpreterNotifyLazyDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 221 V(InterpreterNotifyLazyDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 221 V(InterpreterEnterBytecodeDispatch, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 222 V(InterpreterEnterBytecodeDispatch, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 222 \ | 223 \ |
| 223 V(LoadIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 224 V(LoadIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 224 V(KeyedLoadIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 225 V(KeyedLoadIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 225 V(StoreIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 226 V(StoreIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 226 V(KeyedStoreIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 227 V(KeyedStoreIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 #undef DECLARE_BUILTIN_ACCESSOR_C | 356 #undef DECLARE_BUILTIN_ACCESSOR_C |
| 356 #undef DECLARE_BUILTIN_ACCESSOR_A | 357 #undef DECLARE_BUILTIN_ACCESSOR_A |
| 357 | 358 |
| 358 // Convenience wrappers. | 359 // Convenience wrappers. |
| 359 Handle<Code> CallFunction( | 360 Handle<Code> CallFunction( |
| 360 ConvertReceiverMode = ConvertReceiverMode::kAny, | 361 ConvertReceiverMode = ConvertReceiverMode::kAny, |
| 361 TailCallMode tail_call_mode = TailCallMode::kDisallow); | 362 TailCallMode tail_call_mode = TailCallMode::kDisallow); |
| 362 Handle<Code> Call(ConvertReceiverMode = ConvertReceiverMode::kAny, | 363 Handle<Code> Call(ConvertReceiverMode = ConvertReceiverMode::kAny, |
| 363 TailCallMode tail_call_mode = TailCallMode::kDisallow); | 364 TailCallMode tail_call_mode = TailCallMode::kDisallow); |
| 364 Handle<Code> CallBoundFunction(TailCallMode tail_call_mode); | 365 Handle<Code> CallBoundFunction(TailCallMode tail_call_mode); |
| 366 Handle<Code> InterpreterPushArgsAndCall(TailCallMode tail_call_mode); |
| 365 | 367 |
| 366 Code* builtin(Name name) { | 368 Code* builtin(Name name) { |
| 367 // Code::cast cannot be used here since we access builtins | 369 // Code::cast cannot be used here since we access builtins |
| 368 // during the marking phase of mark sweep. See IC::Clear. | 370 // during the marking phase of mark sweep. See IC::Clear. |
| 369 return reinterpret_cast<Code*>(builtins_[name]); | 371 return reinterpret_cast<Code*>(builtins_[name]); |
| 370 } | 372 } |
| 371 | 373 |
| 372 Address builtin_address(Name name) { | 374 Address builtin_address(Name name) { |
| 373 return reinterpret_cast<Address>(&builtins_[name]); | 375 return reinterpret_cast<Address>(&builtins_[name]); |
| 374 } | 376 } |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 | 572 |
| 571 static void Generate_StringConstructor(MacroAssembler* masm); | 573 static void Generate_StringConstructor(MacroAssembler* masm); |
| 572 static void Generate_StringConstructor_ConstructStub(MacroAssembler* masm); | 574 static void Generate_StringConstructor_ConstructStub(MacroAssembler* masm); |
| 573 static void Generate_OnStackReplacement(MacroAssembler* masm); | 575 static void Generate_OnStackReplacement(MacroAssembler* masm); |
| 574 static void Generate_OsrAfterStackCheck(MacroAssembler* masm); | 576 static void Generate_OsrAfterStackCheck(MacroAssembler* masm); |
| 575 static void Generate_InterruptCheck(MacroAssembler* masm); | 577 static void Generate_InterruptCheck(MacroAssembler* masm); |
| 576 static void Generate_StackCheck(MacroAssembler* masm); | 578 static void Generate_StackCheck(MacroAssembler* masm); |
| 577 | 579 |
| 578 static void Generate_InterpreterEntryTrampoline(MacroAssembler* masm); | 580 static void Generate_InterpreterEntryTrampoline(MacroAssembler* masm); |
| 579 static void Generate_InterpreterExitTrampoline(MacroAssembler* masm); | 581 static void Generate_InterpreterExitTrampoline(MacroAssembler* masm); |
| 580 static void Generate_InterpreterPushArgsAndCall(MacroAssembler* masm); | 582 static void Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) { |
| 583 return Generate_InterpreterPushArgsAndCallImpl(masm, |
| 584 TailCallMode::kDisallow); |
| 585 } |
| 586 static void Generate_InterpreterPushArgsAndTailCall(MacroAssembler* masm) { |
| 587 return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kAllow); |
| 588 } |
| 589 static void Generate_InterpreterPushArgsAndCallImpl( |
| 590 MacroAssembler* masm, TailCallMode tail_call_mode); |
| 581 static void Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm); | 591 static void Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm); |
| 582 static void Generate_InterpreterNotifyDeoptimized(MacroAssembler* masm); | 592 static void Generate_InterpreterNotifyDeoptimized(MacroAssembler* masm); |
| 583 static void Generate_InterpreterNotifySoftDeoptimized(MacroAssembler* masm); | 593 static void Generate_InterpreterNotifySoftDeoptimized(MacroAssembler* masm); |
| 584 static void Generate_InterpreterNotifyLazyDeoptimized(MacroAssembler* masm); | 594 static void Generate_InterpreterNotifyLazyDeoptimized(MacroAssembler* masm); |
| 585 static void Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm); | 595 static void Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm); |
| 586 | 596 |
| 587 #define DECLARE_CODE_AGE_BUILTIN_GENERATOR(C) \ | 597 #define DECLARE_CODE_AGE_BUILTIN_GENERATOR(C) \ |
| 588 static void Generate_Make##C##CodeYoungAgainEvenMarking( \ | 598 static void Generate_Make##C##CodeYoungAgainEvenMarking( \ |
| 589 MacroAssembler* masm); \ | 599 MacroAssembler* masm); \ |
| 590 static void Generate_Make##C##CodeYoungAgainOddMarking( \ | 600 static void Generate_Make##C##CodeYoungAgainOddMarking( \ |
| (...skipping 12 matching lines...) Expand all Loading... |
| 603 friend class BuiltinFunctionTable; | 613 friend class BuiltinFunctionTable; |
| 604 friend class Isolate; | 614 friend class Isolate; |
| 605 | 615 |
| 606 DISALLOW_COPY_AND_ASSIGN(Builtins); | 616 DISALLOW_COPY_AND_ASSIGN(Builtins); |
| 607 }; | 617 }; |
| 608 | 618 |
| 609 } // namespace internal | 619 } // namespace internal |
| 610 } // namespace v8 | 620 } // namespace v8 |
| 611 | 621 |
| 612 #endif // V8_BUILTINS_H_ | 622 #endif // V8_BUILTINS_H_ |
| OLD | NEW |