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

Side by Side Diff: src/runtime.h

Issue 185653004: Experimental parser: merge to r19637 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 9 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/rewriter.cc ('k') | src/runtime.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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 F(DeoptimizeFunction, 1, 1) \ 93 F(DeoptimizeFunction, 1, 1) \
94 F(ClearFunctionTypeFeedback, 1, 1) \ 94 F(ClearFunctionTypeFeedback, 1, 1) \
95 F(RunningInSimulator, 0, 1) \ 95 F(RunningInSimulator, 0, 1) \
96 F(IsConcurrentRecompilationSupported, 0, 1) \ 96 F(IsConcurrentRecompilationSupported, 0, 1) \
97 F(OptimizeFunctionOnNextCall, -1, 1) \ 97 F(OptimizeFunctionOnNextCall, -1, 1) \
98 F(NeverOptimizeFunction, 1, 1) \ 98 F(NeverOptimizeFunction, 1, 1) \
99 F(GetOptimizationStatus, -1, 1) \ 99 F(GetOptimizationStatus, -1, 1) \
100 F(GetOptimizationCount, 1, 1) \ 100 F(GetOptimizationCount, 1, 1) \
101 F(UnblockConcurrentRecompilation, 0, 1) \ 101 F(UnblockConcurrentRecompilation, 0, 1) \
102 F(CompileForOnStackReplacement, 1, 1) \ 102 F(CompileForOnStackReplacement, 1, 1) \
103 F(SetAllocationTimeout, 2, 1) \ 103 F(SetAllocationTimeout, -1 /* 2 || 3 */, 1) \
104 F(AllocateInNewSpace, 1, 1) \ 104 F(AllocateInNewSpace, 1, 1) \
105 F(AllocateInTargetSpace, 2, 1) \ 105 F(AllocateInTargetSpace, 2, 1) \
106 F(SetNativeFlag, 1, 1) \ 106 F(SetNativeFlag, 1, 1) \
107 F(SetInlineBuiltinFlag, 1, 1) \ 107 F(SetInlineBuiltinFlag, 1, 1) \
108 F(StoreArrayLiteralElement, 5, 1) \ 108 F(StoreArrayLiteralElement, 5, 1) \
109 F(DebugCallbackSupportsStepping, 1, 1) \ 109 F(DebugCallbackSupportsStepping, 1, 1) \
110 F(DebugPrepareStepInIfStepping, 1, 1) \ 110 F(DebugPrepareStepInIfStepping, 1, 1) \
111 F(FlattenString, 1, 1) \ 111 F(FlattenString, 1, 1) \
112 F(TryMigrateInstance, 1, 1) \ 112 F(TryMigrateInstance, 1, 1) \
113 F(NotifyContextDisposed, 0, 1) \ 113 F(NotifyContextDisposed, 0, 1) \
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 F(StringEquals, 2, 1) \ 170 F(StringEquals, 2, 1) \
171 \ 171 \
172 F(NumberCompare, 3, 1) \ 172 F(NumberCompare, 3, 1) \
173 F(SmiLexicographicCompare, 2, 1) \ 173 F(SmiLexicographicCompare, 2, 1) \
174 F(StringCompare, 2, 1) \ 174 F(StringCompare, 2, 1) \
175 \ 175 \
176 /* Math */ \ 176 /* Math */ \
177 F(Math_acos, 1, 1) \ 177 F(Math_acos, 1, 1) \
178 F(Math_asin, 1, 1) \ 178 F(Math_asin, 1, 1) \
179 F(Math_atan, 1, 1) \ 179 F(Math_atan, 1, 1) \
180 F(Math_atan2, 2, 1) \ 180 F(Math_log, 1, 1) \
181 F(Math_cbrt, 1, 1) \
182 F(Math_log1p, 1, 1) \
183 F(Math_expm1, 1, 1) \
184 F(Math_sqrt, 1, 1) \
181 F(Math_exp, 1, 1) \ 185 F(Math_exp, 1, 1) \
182 F(Math_floor, 1, 1) \ 186 F(Math_floor, 1, 1) \
183 F(Math_log, 1, 1) \
184 F(Math_pow, 2, 1) \ 187 F(Math_pow, 2, 1) \
185 F(Math_pow_cfunction, 2, 1) \ 188 F(Math_pow_cfunction, 2, 1) \
189 F(Math_atan2, 2, 1) \
186 F(RoundNumber, 1, 1) \ 190 F(RoundNumber, 1, 1) \
187 F(Math_sqrt, 1, 1) \ 191 F(Math_fround, 1, 1) \
188 \ 192 \
189 /* Regular expressions */ \ 193 /* Regular expressions */ \
190 F(RegExpCompile, 3, 1) \ 194 F(RegExpCompile, 3, 1) \
191 F(RegExpExec, 4, 1) \ 195 F(RegExpExec, 4, 1) \
192 F(RegExpExecMultiple, 4, 1) \ 196 F(RegExpExecMultiple, 4, 1) \
193 F(RegExpInitializeObject, 5, 1) \ 197 F(RegExpInitializeObject, 5, 1) \
194 F(RegExpConstructResult, 3, 1) \ 198 F(RegExpConstructResult, 3, 1) \
195 \ 199 \
196 /* JSON */ \ 200 /* JSON */ \
197 F(ParseJson, 1, 1) \ 201 F(ParseJson, 1, 1) \
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 \ 305 \
302 /* Harmony generators */ \ 306 /* Harmony generators */ \
303 F(CreateJSGeneratorObject, 0, 1) \ 307 F(CreateJSGeneratorObject, 0, 1) \
304 F(SuspendJSGeneratorObject, 1, 1) \ 308 F(SuspendJSGeneratorObject, 1, 1) \
305 F(ResumeJSGeneratorObject, 3, 1) \ 309 F(ResumeJSGeneratorObject, 3, 1) \
306 F(ThrowGeneratorStateError, 1, 1) \ 310 F(ThrowGeneratorStateError, 1, 1) \
307 \ 311 \
308 /* ES5 */ \ 312 /* ES5 */ \
309 F(ObjectFreeze, 1, 1) \ 313 F(ObjectFreeze, 1, 1) \
310 \ 314 \
315 /* Harmony Microtasks */ \
316 F(GetMicrotaskState, 0, 1) \
317 \
311 /* Harmony modules */ \ 318 /* Harmony modules */ \
312 F(IsJSModule, 1, 1) \ 319 F(IsJSModule, 1, 1) \
313 \ 320 \
314 /* Harmony symbols */ \ 321 /* Harmony symbols */ \
315 F(CreateSymbol, 1, 1) \ 322 F(CreateSymbol, 1, 1) \
316 F(CreatePrivateSymbol, 1, 1) \ 323 F(CreatePrivateSymbol, 1, 1) \
317 F(SymbolName, 1, 1) \ 324 F(NewSymbolWrapper, 1, 1) \
325 F(SymbolDescription, 1, 1) \
318 F(SymbolIsPrivate, 1, 1) \ 326 F(SymbolIsPrivate, 1, 1) \
319 \ 327 \
320 /* Harmony proxies */ \ 328 /* Harmony proxies */ \
321 F(CreateJSProxy, 2, 1) \ 329 F(CreateJSProxy, 2, 1) \
322 F(CreateJSFunctionProxy, 4, 1) \ 330 F(CreateJSFunctionProxy, 4, 1) \
323 F(IsJSProxy, 1, 1) \ 331 F(IsJSProxy, 1, 1) \
324 F(IsJSFunctionProxy, 1, 1) \ 332 F(IsJSFunctionProxy, 1, 1) \
325 F(GetHandler, 1, 1) \ 333 F(GetHandler, 1, 1) \
326 F(GetCallTrap, 1, 1) \ 334 F(GetCallTrap, 1, 1) \
327 F(GetConstructTrap, 1, 1) \ 335 F(GetConstructTrap, 1, 1) \
(...skipping 16 matching lines...) Expand all
344 \ 352 \
345 /* Harmony weak maps and sets */ \ 353 /* Harmony weak maps and sets */ \
346 F(WeakCollectionInitialize, 1, 1) \ 354 F(WeakCollectionInitialize, 1, 1) \
347 F(WeakCollectionGet, 2, 1) \ 355 F(WeakCollectionGet, 2, 1) \
348 F(WeakCollectionHas, 2, 1) \ 356 F(WeakCollectionHas, 2, 1) \
349 F(WeakCollectionDelete, 2, 1) \ 357 F(WeakCollectionDelete, 2, 1) \
350 F(WeakCollectionSet, 3, 1) \ 358 F(WeakCollectionSet, 3, 1) \
351 \ 359 \
352 /* Harmony events */ \ 360 /* Harmony events */ \
353 F(SetMicrotaskPending, 1, 1) \ 361 F(SetMicrotaskPending, 1, 1) \
362 F(RunMicrotasks, 0, 1) \
354 \ 363 \
355 /* Harmony observe */ \ 364 /* Harmony observe */ \
356 F(IsObserved, 1, 1) \ 365 F(IsObserved, 1, 1) \
357 F(SetIsObserved, 1, 1) \ 366 F(SetIsObserved, 1, 1) \
358 F(GetObservationState, 0, 1) \ 367 F(GetObservationState, 0, 1) \
359 F(ObservationWeakMapCreate, 0, 1) \ 368 F(ObservationWeakMapCreate, 0, 1) \
360 F(UnwrapGlobalProxy, 1, 1) \ 369 F(UnwrapGlobalProxy, 1, 1) \
361 F(IsAccessAllowedForObserver, 3, 1) \ 370 F(IsAccessAllowedForObserver, 3, 1) \
362 \ 371 \
363 /* Harmony typed arrays */ \ 372 /* Harmony typed arrays */ \
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 F(InitializeVarGlobal, -1 /* 2 or 3 */, 1) \ 439 F(InitializeVarGlobal, -1 /* 2 or 3 */, 1) \
431 F(InitializeConstGlobal, 2, 1) \ 440 F(InitializeConstGlobal, 2, 1) \
432 F(InitializeConstContextSlot, 3, 1) \ 441 F(InitializeConstContextSlot, 3, 1) \
433 F(OptimizeObjectForAddingMultipleProperties, 2, 1) \ 442 F(OptimizeObjectForAddingMultipleProperties, 2, 1) \
434 \ 443 \
435 /* Debugging */ \ 444 /* Debugging */ \
436 F(DebugPrint, 1, 1) \ 445 F(DebugPrint, 1, 1) \
437 F(DebugTrace, 0, 1) \ 446 F(DebugTrace, 0, 1) \
438 F(TraceEnter, 0, 1) \ 447 F(TraceEnter, 0, 1) \
439 F(TraceExit, 1, 1) \ 448 F(TraceExit, 1, 1) \
440 F(Abort, 2, 1) \ 449 F(Abort, 1, 1) \
441 F(AbortJS, 1, 1) \ 450 F(AbortJS, 1, 1) \
442 /* Logging */ \ 451 /* Logging */ \
443 F(Log, 2, 1) \ 452 F(Log, 2, 1) \
444 /* ES5 */ \ 453 /* ES5 */ \
445 F(LocalKeys, 1, 1) \ 454 F(LocalKeys, 1, 1) \
446 /* Cache suport */ \ 455 /* Cache suport */ \
447 F(GetFromCache, 2, 1) \ 456 F(GetFromCache, 2, 1) \
448 \ 457 \
449 /* Message objects */ \ 458 /* Message objects */ \
450 F(MessageGetStartPosition, 1, 1) \ 459 F(MessageGetStartPosition, 1, 1) \
451 F(MessageGetScript, 1, 1) \ 460 F(MessageGetScript, 1, 1) \
452 \ 461 \
453 /* Pseudo functions - handled as macros by parser */ \ 462 /* Pseudo functions - handled as macros by parser */ \
454 F(IS_VAR, 1, 1) \ 463 F(IS_VAR, 1, 1) \
455 \ 464 \
456 /* expose boolean functions from objects-inl.h */ \ 465 /* expose boolean functions from objects-inl.h */ \
457 F(HasFastSmiElements, 1, 1) \ 466 F(HasFastSmiElements, 1, 1) \
458 F(HasFastSmiOrObjectElements, 1, 1) \ 467 F(HasFastSmiOrObjectElements, 1, 1) \
459 F(HasFastObjectElements, 1, 1) \ 468 F(HasFastObjectElements, 1, 1) \
460 F(HasFastDoubleElements, 1, 1) \ 469 F(HasFastDoubleElements, 1, 1) \
461 F(HasFastHoleyElements, 1, 1) \ 470 F(HasFastHoleyElements, 1, 1) \
462 F(HasDictionaryElements, 1, 1) \ 471 F(HasDictionaryElements, 1, 1) \
463 F(HasNonStrictArgumentsElements, 1, 1) \ 472 F(HasNonStrictArgumentsElements, 1, 1) \
464 F(HasExternalPixelElements, 1, 1) \ 473 F(HasExternalUint8ClampedElements, 1, 1) \
465 F(HasExternalArrayElements, 1, 1) \ 474 F(HasExternalArrayElements, 1, 1) \
466 F(HasExternalByteElements, 1, 1) \ 475 F(HasExternalInt8Elements, 1, 1) \
467 F(HasExternalUnsignedByteElements, 1, 1) \ 476 F(HasExternalUint8Elements, 1, 1) \
468 F(HasExternalShortElements, 1, 1) \ 477 F(HasExternalInt16Elements, 1, 1) \
469 F(HasExternalUnsignedShortElements, 1, 1) \ 478 F(HasExternalUint16Elements, 1, 1) \
470 F(HasExternalIntElements, 1, 1) \ 479 F(HasExternalInt32Elements, 1, 1) \
471 F(HasExternalUnsignedIntElements, 1, 1) \ 480 F(HasExternalUint32Elements, 1, 1) \
472 F(HasExternalFloatElements, 1, 1) \ 481 F(HasExternalFloat32Elements, 1, 1) \
473 F(HasExternalDoubleElements, 1, 1) \ 482 F(HasExternalFloat64Elements, 1, 1) \
474 F(HasFastProperties, 1, 1) \ 483 F(HasFastProperties, 1, 1) \
475 F(TransitionElementsKind, 2, 1) \ 484 F(TransitionElementsKind, 2, 1) \
476 F(HaveSameMap, 2, 1) \ 485 F(HaveSameMap, 2, 1) \
477 F(IsAccessCheckNeeded, 1, 1) 486 F(IsAccessCheckNeeded, 1, 1)
478 487
479 488
480 #ifdef ENABLE_DEBUGGER_SUPPORT 489 #ifdef ENABLE_DEBUGGER_SUPPORT
481 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \ 490 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \
482 /* Debugger support*/ \ 491 /* Debugger support*/ \
483 F(DebugBreak, 0, 1) \ 492 F(DebugBreak, 0, 1) \
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 \ 570 \
562 /* Number format and parse. */ \ 571 /* Number format and parse. */ \
563 F(CreateNumberFormat, 3, 1) \ 572 F(CreateNumberFormat, 3, 1) \
564 F(InternalNumberFormat, 2, 1) \ 573 F(InternalNumberFormat, 2, 1) \
565 F(InternalNumberParse, 2, 1) \ 574 F(InternalNumberParse, 2, 1) \
566 \ 575 \
567 /* Collator. */ \ 576 /* Collator. */ \
568 F(CreateCollator, 3, 1) \ 577 F(CreateCollator, 3, 1) \
569 F(InternalCompare, 3, 1) \ 578 F(InternalCompare, 3, 1) \
570 \ 579 \
580 /* String.prototype.normalize. */ \
581 F(StringNormalize, 2, 1) \
582 \
571 /* Break iterator. */ \ 583 /* Break iterator. */ \
572 F(CreateBreakIterator, 3, 1) \ 584 F(CreateBreakIterator, 3, 1) \
573 F(BreakIteratorAdoptText, 2, 1) \ 585 F(BreakIteratorAdoptText, 2, 1) \
574 F(BreakIteratorFirst, 1, 1) \ 586 F(BreakIteratorFirst, 1, 1) \
575 F(BreakIteratorNext, 1, 1) \ 587 F(BreakIteratorNext, 1, 1) \
576 F(BreakIteratorCurrent, 1, 1) \ 588 F(BreakIteratorCurrent, 1, 1) \
577 F(BreakIteratorBreakType, 1, 1) \ 589 F(BreakIteratorBreakType, 1, 1) \
578 590
579 #else 591 #else
580 #define RUNTIME_FUNCTION_LIST_I18N_SUPPORT(F) 592 #define RUNTIME_FUNCTION_LIST_I18N_SUPPORT(F)
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 F(ObjectEquals, 2, 1) \ 636 F(ObjectEquals, 2, 1) \
625 F(IsObject, 1, 1) \ 637 F(IsObject, 1, 1) \
626 F(IsFunction, 1, 1) \ 638 F(IsFunction, 1, 1) \
627 F(IsUndetectableObject, 1, 1) \ 639 F(IsUndetectableObject, 1, 1) \
628 F(IsSpecObject, 1, 1) \ 640 F(IsSpecObject, 1, 1) \
629 F(IsStringWrapperSafeForDefaultValueOf, 1, 1) \ 641 F(IsStringWrapperSafeForDefaultValueOf, 1, 1) \
630 F(MathPow, 2, 1) \ 642 F(MathPow, 2, 1) \
631 F(MathSqrt, 1, 1) \ 643 F(MathSqrt, 1, 1) \
632 F(MathLog, 1, 1) \ 644 F(MathLog, 1, 1) \
633 F(IsMinusZero, 1, 1) \ 645 F(IsMinusZero, 1, 1) \
634 F(IsRegExpEquivalent, 2, 1) \
635 F(HasCachedArrayIndex, 1, 1) \ 646 F(HasCachedArrayIndex, 1, 1) \
636 F(GetCachedArrayIndex, 1, 1) \ 647 F(GetCachedArrayIndex, 1, 1) \
637 F(FastAsciiArrayJoin, 2, 1) \ 648 F(FastAsciiArrayJoin, 2, 1) \
638 F(GeneratorNext, 2, 1) \ 649 F(GeneratorNext, 2, 1) \
639 F(GeneratorThrow, 2, 1) \ 650 F(GeneratorThrow, 2, 1) \
640 F(DebugBreakInOptimizedCode, 0, 1) 651 F(DebugBreakInOptimizedCode, 0, 1)
641 652
642 653
643 // ---------------------------------------------------------------------------- 654 // ----------------------------------------------------------------------------
644 // INLINE_RUNTIME_FUNCTION_LIST defines all inlined functions accessed 655 // INLINE_RUNTIME_FUNCTION_LIST defines all inlined functions accessed
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 enum TypedArrayId { 843 enum TypedArrayId {
833 // arrayIds below should be synchromized with typedarray.js natives. 844 // arrayIds below should be synchromized with typedarray.js natives.
834 ARRAY_ID_UINT8 = 1, 845 ARRAY_ID_UINT8 = 1,
835 ARRAY_ID_INT8 = 2, 846 ARRAY_ID_INT8 = 2,
836 ARRAY_ID_UINT16 = 3, 847 ARRAY_ID_UINT16 = 3,
837 ARRAY_ID_INT16 = 4, 848 ARRAY_ID_INT16 = 4,
838 ARRAY_ID_UINT32 = 5, 849 ARRAY_ID_UINT32 = 5,
839 ARRAY_ID_INT32 = 6, 850 ARRAY_ID_INT32 = 6,
840 ARRAY_ID_FLOAT32 = 7, 851 ARRAY_ID_FLOAT32 = 7,
841 ARRAY_ID_FLOAT64 = 8, 852 ARRAY_ID_FLOAT64 = 8,
842 ARRAY_ID_UINT8C = 9 853 ARRAY_ID_UINT8_CLAMPED = 9
843 }; 854 };
844 855
845 static void ArrayIdToTypeAndSize(int array_id, 856 static void ArrayIdToTypeAndSize(int array_id,
846 ExternalArrayType *type, size_t *element_size); 857 ExternalArrayType *type, size_t *element_size);
847 858
848 // Helper functions used stubs. 859 // Helper functions used stubs.
849 static void PerformGC(Object* result, Isolate* isolate); 860 static void PerformGC(Object* result, Isolate* isolate);
850 861
851 // Used in runtime.cc and hydrogen's VisitArrayLiteral. 862 // Used in runtime.cc and hydrogen's VisitArrayLiteral.
852 static Handle<Object> CreateArrayLiteralBoilerplate( 863 static Handle<Object> CreateArrayLiteralBoilerplate(
853 Isolate* isolate, 864 Isolate* isolate,
854 Handle<FixedArray> literals, 865 Handle<FixedArray> literals,
855 Handle<FixedArray> elements); 866 Handle<FixedArray> elements);
856 }; 867 };
857 868
858 869
859 //--------------------------------------------------------------------------- 870 //---------------------------------------------------------------------------
860 // Constants used by interface to runtime functions. 871 // Constants used by interface to runtime functions.
861 872
862 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; 873 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {};
863 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; 874 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {};
864 875
865 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; 876 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {};
866 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; 877 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {};
867 class DeclareGlobalsLanguageMode: public BitField<LanguageMode, 2, 2> {}; 878 class DeclareGlobalsLanguageMode: public BitField<LanguageMode, 2, 2> {};
868 879
869 } } // namespace v8::internal 880 } } // namespace v8::internal
870 881
871 #endif // V8_RUNTIME_H_ 882 #endif // V8_RUNTIME_H_
OLDNEW
« no previous file with comments | « src/rewriter.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698