| OLD | NEW |
| 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_RUNTIME_H_ | 5 #ifndef V8_RUNTIME_H_ |
| 6 #define V8_RUNTIME_H_ | 6 #define V8_RUNTIME_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/zone.h" | 9 #include "src/zone.h" |
| 10 | 10 |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 F(IsBreakOnException, 1, 1) \ | 431 F(IsBreakOnException, 1, 1) \ |
| 432 F(PrepareStep, 4, 1) \ | 432 F(PrepareStep, 4, 1) \ |
| 433 F(ClearStepping, 0, 1) \ | 433 F(ClearStepping, 0, 1) \ |
| 434 F(DebugEvaluate, 6, 1) \ | 434 F(DebugEvaluate, 6, 1) \ |
| 435 F(DebugEvaluateGlobal, 4, 1) \ | 435 F(DebugEvaluateGlobal, 4, 1) \ |
| 436 F(DebugGetLoadedScripts, 0, 1) \ | 436 F(DebugGetLoadedScripts, 0, 1) \ |
| 437 F(DebugReferencedBy, 3, 1) \ | 437 F(DebugReferencedBy, 3, 1) \ |
| 438 F(DebugConstructedBy, 2, 1) \ | 438 F(DebugConstructedBy, 2, 1) \ |
| 439 F(DebugGetPrototype, 1, 1) \ | 439 F(DebugGetPrototype, 1, 1) \ |
| 440 F(DebugSetScriptSource, 2, 1) \ | 440 F(DebugSetScriptSource, 2, 1) \ |
| 441 F(DebugCallbackSupportsStepping, 1, 1) \ |
| 441 F(SystemBreak, 0, 1) \ | 442 F(SystemBreak, 0, 1) \ |
| 442 F(DebugDisassembleFunction, 1, 1) \ | 443 F(DebugDisassembleFunction, 1, 1) \ |
| 443 F(DebugDisassembleConstructor, 1, 1) \ | 444 F(DebugDisassembleConstructor, 1, 1) \ |
| 444 F(FunctionGetInferredName, 1, 1) \ | 445 F(FunctionGetInferredName, 1, 1) \ |
| 445 F(LiveEditFindSharedFunctionInfosForScript, 1, 1) \ | 446 F(LiveEditFindSharedFunctionInfosForScript, 1, 1) \ |
| 446 F(LiveEditGatherCompileInfo, 2, 1) \ | 447 F(LiveEditGatherCompileInfo, 2, 1) \ |
| 447 F(LiveEditReplaceScript, 3, 1) \ | 448 F(LiveEditReplaceScript, 3, 1) \ |
| 448 F(LiveEditReplaceFunctionCode, 2, 1) \ | 449 F(LiveEditReplaceFunctionCode, 2, 1) \ |
| 449 F(LiveEditFunctionSourceUpdated, 1, 1) \ | 450 F(LiveEditFunctionSourceUpdated, 1, 1) \ |
| 450 F(LiveEditFunctionSetScript, 2, 1) \ | 451 F(LiveEditFunctionSetScript, 2, 1) \ |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 F(GeneratorThrow, 2, 1) \ | 648 F(GeneratorThrow, 2, 1) \ |
| 648 F(DebugBreakInOptimizedCode, 0, 1) \ | 649 F(DebugBreakInOptimizedCode, 0, 1) \ |
| 649 F(ClassOf, 1, 1) \ | 650 F(ClassOf, 1, 1) \ |
| 650 F(StringCharCodeAt, 2, 1) \ | 651 F(StringCharCodeAt, 2, 1) \ |
| 651 F(StringAdd, 2, 1) \ | 652 F(StringAdd, 2, 1) \ |
| 652 F(SubString, 3, 1) \ | 653 F(SubString, 3, 1) \ |
| 653 F(StringCompare, 2, 1) \ | 654 F(StringCompare, 2, 1) \ |
| 654 F(RegExpExec, 4, 1) \ | 655 F(RegExpExec, 4, 1) \ |
| 655 F(RegExpConstructResult, 3, 1) \ | 656 F(RegExpConstructResult, 3, 1) \ |
| 656 F(GetFromCache, 2, 1) \ | 657 F(GetFromCache, 2, 1) \ |
| 657 F(NumberToString, 1, 1) | 658 F(NumberToString, 1, 1) \ |
| 659 F(DebugIsActive, 0, 1) |
| 658 | 660 |
| 659 | 661 |
| 660 // ---------------------------------------------------------------------------- | 662 // ---------------------------------------------------------------------------- |
| 661 // INLINE_OPTIMIZED_FUNCTION_LIST defines all inlined functions accessed | 663 // INLINE_OPTIMIZED_FUNCTION_LIST defines all inlined functions accessed |
| 662 // with a native call of the form %_name from within JS code that also have | 664 // with a native call of the form %_name from within JS code that also have |
| 663 // a corresponding runtime function, that is called from non-optimized code. | 665 // a corresponding runtime function, that is called from non-optimized code. |
| 664 // For the benefit of (fuzz) tests, the runtime version can also be called | 666 // For the benefit of (fuzz) tests, the runtime version can also be called |
| 665 // directly as %name (i.e. without the leading underscore). | 667 // directly as %name (i.e. without the leading underscore). |
| 666 // Entries have the form F(name, number of arguments, number of return values). | 668 // Entries have the form F(name, number of arguments, number of return values). |
| 667 #define INLINE_OPTIMIZED_FUNCTION_LIST(F) \ | 669 #define INLINE_OPTIMIZED_FUNCTION_LIST(F) \ |
| 668 /* Typed Arrays */ \ | 670 /* Typed Arrays */ \ |
| 669 F(TypedArrayInitialize, 5, 1) \ | 671 F(TypedArrayInitialize, 5, 1) \ |
| 670 F(DataViewInitialize, 4, 1) \ | 672 F(DataViewInitialize, 4, 1) \ |
| 671 F(MaxSmi, 0, 1) \ | 673 F(MaxSmi, 0, 1) \ |
| 672 F(TypedArrayMaxSizeInHeap, 0, 1) \ | 674 F(TypedArrayMaxSizeInHeap, 0, 1) \ |
| 673 F(ArrayBufferViewGetByteLength, 1, 1) \ | 675 F(ArrayBufferViewGetByteLength, 1, 1) \ |
| 674 F(ArrayBufferViewGetByteOffset, 1, 1) \ | 676 F(ArrayBufferViewGetByteOffset, 1, 1) \ |
| 675 F(TypedArrayGetLength, 1, 1) \ | 677 F(TypedArrayGetLength, 1, 1) \ |
| 676 /* ArrayBuffer */ \ | 678 /* ArrayBuffer */ \ |
| 677 F(ArrayBufferGetByteLength, 1, 1) \ | 679 F(ArrayBufferGetByteLength, 1, 1) \ |
| 678 /* Maths */ \ | 680 /* Maths */ \ |
| 679 F(ConstructDouble, 2, 1) \ | 681 F(ConstructDouble, 2, 1) \ |
| 680 F(DoubleHi, 1, 1) \ | 682 F(DoubleHi, 1, 1) \ |
| 681 F(DoubleLo, 1, 1) \ | 683 F(DoubleLo, 1, 1) \ |
| 682 F(MathSqrtRT, 1, 1) \ | 684 F(MathSqrtRT, 1, 1) \ |
| 683 F(MathLogRT, 1, 1) \ | 685 F(MathLogRT, 1, 1) |
| 684 /* Debugger */ \ | |
| 685 F(DebugCallbackSupportsStepping, 1, 1) | |
| 686 | 686 |
| 687 | 687 |
| 688 //--------------------------------------------------------------------------- | 688 //--------------------------------------------------------------------------- |
| 689 // Runtime provides access to all C++ runtime functions. | 689 // Runtime provides access to all C++ runtime functions. |
| 690 | 690 |
| 691 class RuntimeState { | 691 class RuntimeState { |
| 692 public: | 692 public: |
| 693 StaticResource<ConsStringIteratorOp>* string_iterator() { | 693 StaticResource<ConsStringIteratorOp>* string_iterator() { |
| 694 return &string_iterator_; | 694 return &string_iterator_; |
| 695 } | 695 } |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; | 891 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; |
| 892 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; | 892 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; |
| 893 | 893 |
| 894 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; | 894 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; |
| 895 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; | 895 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; |
| 896 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; | 896 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; |
| 897 | 897 |
| 898 } } // namespace v8::internal | 898 } } // namespace v8::internal |
| 899 | 899 |
| 900 #endif // V8_RUNTIME_H_ | 900 #endif // V8_RUNTIME_H_ |
| OLD | NEW |