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

Side by Side Diff: src/runtime.h

Issue 212163004: Hide some runtime functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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/parser.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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 F(IsExtensible, 1, 1) \ 76 F(IsExtensible, 1, 1) \
77 F(PreventExtensions, 1, 1)\ 77 F(PreventExtensions, 1, 1)\
78 \ 78 \
79 /* Utilities */ \ 79 /* Utilities */ \
80 F(CheckIsBootstrapping, 0, 1) \ 80 F(CheckIsBootstrapping, 0, 1) \
81 F(GetRootNaN, 0, 1) \ 81 F(GetRootNaN, 0, 1) \
82 F(Call, -1 /* >= 2 */, 1) \ 82 F(Call, -1 /* >= 2 */, 1) \
83 F(Apply, 5, 1) \ 83 F(Apply, 5, 1) \
84 F(GetFunctionDelegate, 1, 1) \ 84 F(GetFunctionDelegate, 1, 1) \
85 F(GetConstructorDelegate, 1, 1) \ 85 F(GetConstructorDelegate, 1, 1) \
86 F(NewArgumentsFast, 3, 1) \
87 F(NewStrictArgumentsFast, 3, 1) \
88 F(CompileUnoptimized, 1, 1) \
89 F(CompileOptimized, 2, 1) \
90 F(TryInstallOptimizedCode, 1, 1) \
91 F(NotifyDeoptimized, 1, 1) \
92 F(NotifyStubFailure, 0, 1) \
93 F(DeoptimizeFunction, 1, 1) \ 86 F(DeoptimizeFunction, 1, 1) \
94 F(ClearFunctionTypeFeedback, 1, 1) \ 87 F(ClearFunctionTypeFeedback, 1, 1) \
95 F(RunningInSimulator, 0, 1) \ 88 F(RunningInSimulator, 0, 1) \
96 F(IsConcurrentRecompilationSupported, 0, 1) \ 89 F(IsConcurrentRecompilationSupported, 0, 1) \
97 F(OptimizeFunctionOnNextCall, -1, 1) \ 90 F(OptimizeFunctionOnNextCall, -1, 1) \
98 F(NeverOptimizeFunction, 1, 1) \ 91 F(NeverOptimizeFunction, 1, 1) \
99 F(GetOptimizationStatus, -1, 1) \ 92 F(GetOptimizationStatus, -1, 1) \
100 F(GetOptimizationCount, 1, 1) \ 93 F(GetOptimizationCount, 1, 1) \
101 F(UnblockConcurrentRecompilation, 0, 1) \ 94 F(UnblockConcurrentRecompilation, 0, 1) \
102 F(CompileForOnStackReplacement, 1, 1) \ 95 F(CompileForOnStackReplacement, 1, 1) \
103 F(SetAllocationTimeout, -1 /* 2 || 3 */, 1) \ 96 F(SetAllocationTimeout, -1 /* 2 || 3 */, 1) \
104 F(AllocateInNewSpace, 1, 1) \
105 F(AllocateInTargetSpace, 2, 1) \
106 F(SetNativeFlag, 1, 1) \ 97 F(SetNativeFlag, 1, 1) \
107 F(SetInlineBuiltinFlag, 1, 1) \ 98 F(SetInlineBuiltinFlag, 1, 1) \
108 F(StoreArrayLiteralElement, 5, 1) \ 99 F(StoreArrayLiteralElement, 5, 1) \
109 F(DebugCallbackSupportsStepping, 1, 1) \ 100 F(DebugCallbackSupportsStepping, 1, 1) \
110 F(DebugPrepareStepInIfStepping, 1, 1) \ 101 F(DebugPrepareStepInIfStepping, 1, 1) \
111 F(FlattenString, 1, 1) \ 102 F(FlattenString, 1, 1) \
112 F(TryMigrateInstance, 1, 1) \ 103 F(TryMigrateInstance, 1, 1) \
113 F(NotifyContextDisposed, 0, 1) \ 104 F(NotifyContextDisposed, 0, 1) \
114 \ 105 \
115 /* Array join support */ \ 106 /* Array join support */ \
116 F(PushIfAbsent, 2, 1) \ 107 F(PushIfAbsent, 2, 1) \
117 F(ArrayConcat, 1, 1) \ 108 F(ArrayConcat, 1, 1) \
118 \ 109 \
119 /* Conversions */ \ 110 /* Conversions */ \
120 F(ToBool, 1, 1) \ 111 F(ToBool, 1, 1) \
121 F(Typeof, 1, 1) \ 112 F(Typeof, 1, 1) \
122 \ 113 \
123 F(StringToNumber, 1, 1) \ 114 F(StringToNumber, 1, 1) \
124 F(StringParseInt, 2, 1) \ 115 F(StringParseInt, 2, 1) \
125 F(StringParseFloat, 1, 1) \ 116 F(StringParseFloat, 1, 1) \
126 F(StringToLowerCase, 1, 1) \ 117 F(StringToLowerCase, 1, 1) \
127 F(StringToUpperCase, 1, 1) \ 118 F(StringToUpperCase, 1, 1) \
128 F(StringSplit, 3, 1) \ 119 F(StringSplit, 3, 1) \
129 F(CharFromCode, 1, 1) \ 120 F(CharFromCode, 1, 1) \
130 F(URIEscape, 1, 1) \ 121 F(URIEscape, 1, 1) \
131 F(URIUnescape, 1, 1) \ 122 F(URIUnescape, 1, 1) \
132 \ 123 \
133 F(NumberToStringSkipCache, 1, 1) \
134 F(NumberToInteger, 1, 1) \ 124 F(NumberToInteger, 1, 1) \
135 F(NumberToPositiveInteger, 1, 1) \
136 F(NumberToIntegerMapMinusZero, 1, 1) \ 125 F(NumberToIntegerMapMinusZero, 1, 1) \
137 F(NumberToJSUint32, 1, 1) \ 126 F(NumberToJSUint32, 1, 1) \
138 F(NumberToJSInt32, 1, 1) \ 127 F(NumberToJSInt32, 1, 1) \
139 F(NumberToSmi, 1, 1) \
140 F(AllocateHeapNumber, 0, 1) \
141 \ 128 \
142 /* Arithmetic operations */ \ 129 /* Arithmetic operations */ \
143 F(NumberAdd, 2, 1) \ 130 F(NumberAdd, 2, 1) \
144 F(NumberSub, 2, 1) \ 131 F(NumberSub, 2, 1) \
145 F(NumberMul, 2, 1) \ 132 F(NumberMul, 2, 1) \
146 F(NumberDiv, 2, 1) \ 133 F(NumberDiv, 2, 1) \
147 F(NumberMod, 2, 1) \ 134 F(NumberMod, 2, 1) \
148 F(NumberUnaryMinus, 1, 1) \ 135 F(NumberUnaryMinus, 1, 1) \
149 F(NumberAlloc, 0, 1) \ 136 F(NumberAlloc, 0, 1) \
150 F(NumberImul, 2, 1) \ 137 F(NumberImul, 2, 1) \
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 \ 238 \
252 /* Dates */ \ 239 /* Dates */ \
253 F(DateCurrentTime, 0, 1) \ 240 F(DateCurrentTime, 0, 1) \
254 F(DateParseString, 2, 1) \ 241 F(DateParseString, 2, 1) \
255 F(DateLocalTimezone, 1, 1) \ 242 F(DateLocalTimezone, 1, 1) \
256 F(DateToUTC, 1, 1) \ 243 F(DateToUTC, 1, 1) \
257 F(DateMakeDay, 2, 1) \ 244 F(DateMakeDay, 2, 1) \
258 F(DateSetValue, 3, 1) \ 245 F(DateSetValue, 3, 1) \
259 F(DateCacheVersion, 0, 1) \ 246 F(DateCacheVersion, 0, 1) \
260 \ 247 \
261 /* Numbers */ \
262 \
263 /* Globals */ \ 248 /* Globals */ \
264 F(CompileString, 2, 1) \ 249 F(CompileString, 2, 1) \
265 F(GlobalPrint, 1, 1) \
266 \ 250 \
267 /* Eval */ \ 251 /* Eval */ \
268 F(GlobalReceiver, 1, 1) \ 252 F(GlobalReceiver, 1, 1) \
269 F(IsAttachedGlobal, 1, 1) \ 253 F(IsAttachedGlobal, 1, 1) \
270 F(ResolvePossiblyDirectEval, 5, 2) \
271 \ 254 \
272 F(SetProperty, -1 /* 4 or 5 */, 1) \ 255 F(SetProperty, -1 /* 4 or 5 */, 1) \
273 F(DefineOrRedefineDataProperty, 4, 1) \ 256 F(DefineOrRedefineDataProperty, 4, 1) \
274 F(DefineOrRedefineAccessorProperty, 5, 1) \ 257 F(DefineOrRedefineAccessorProperty, 5, 1) \
275 F(IgnoreAttributesAndSetProperty, -1 /* 3 or 4 */, 1) \ 258 F(IgnoreAttributesAndSetProperty, -1 /* 3 or 4 */, 1) \
276 F(GetDataProperty, 2, 1) \ 259 F(GetDataProperty, 2, 1) \
277 F(SetHiddenProperty, 3, 1) \ 260 F(SetHiddenProperty, 3, 1) \
278 \ 261 \
279 /* Arrays */ \ 262 /* Arrays */ \
280 F(RemoveArrayHoles, 2, 1) \ 263 F(RemoveArrayHoles, 2, 1) \
281 F(GetArrayKeys, 2, 1) \ 264 F(GetArrayKeys, 2, 1) \
282 F(MoveArrayContents, 2, 1) \ 265 F(MoveArrayContents, 2, 1) \
283 F(EstimateNumberOfElements, 1, 1) \ 266 F(EstimateNumberOfElements, 1, 1) \
284 F(ArrayConstructor, -1, 1) \
285 F(InternalArrayConstructor, -1, 1) \
286 \ 267 \
287 /* Getters and Setters */ \ 268 /* Getters and Setters */ \
288 F(LookupAccessor, 3, 1) \ 269 F(LookupAccessor, 3, 1) \
289 \ 270 \
290 /* Literals */ \
291 F(MaterializeRegExpLiteral, 4, 1)\
292 F(CreateObjectLiteral, 4, 1) \
293 F(CreateArrayLiteral, 4, 1) \
294 F(CreateArrayLiteralStubBailout, 3, 1) \
295 \
296 /* Harmony generators */ \
297 F(CreateJSGeneratorObject, 0, 1) \
298 F(SuspendJSGeneratorObject, 1, 1) \
299 F(ResumeJSGeneratorObject, 3, 1) \
300 F(ThrowGeneratorStateError, 1, 1) \
301 \
302 /* ES5 */ \ 271 /* ES5 */ \
303 F(ObjectFreeze, 1, 1) \ 272 F(ObjectFreeze, 1, 1) \
304 \ 273 \
305 /* Harmony microtasks */ \ 274 /* Harmony microtasks */ \
306 F(GetMicrotaskState, 0, 1) \ 275 F(GetMicrotaskState, 0, 1) \
307 \ 276 \
308 /* Harmony modules */ \ 277 /* Harmony modules */ \
309 F(IsJSModule, 1, 1) \ 278 F(IsJSModule, 1, 1) \
310 \ 279 \
311 /* Harmony symbols */ \ 280 /* Harmony symbols */ \
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 F(DataViewSetInt8, 4, 1) \ 359 F(DataViewSetInt8, 4, 1) \
391 F(DataViewSetUint8, 4, 1) \ 360 F(DataViewSetUint8, 4, 1) \
392 F(DataViewSetInt16, 4, 1) \ 361 F(DataViewSetInt16, 4, 1) \
393 F(DataViewSetUint16, 4, 1) \ 362 F(DataViewSetUint16, 4, 1) \
394 F(DataViewSetInt32, 4, 1) \ 363 F(DataViewSetInt32, 4, 1) \
395 F(DataViewSetUint32, 4, 1) \ 364 F(DataViewSetUint32, 4, 1) \
396 F(DataViewSetFloat32, 4, 1) \ 365 F(DataViewSetFloat32, 4, 1) \
397 F(DataViewSetFloat64, 4, 1) \ 366 F(DataViewSetFloat64, 4, 1) \
398 \ 367 \
399 /* Statements */ \ 368 /* Statements */ \
400 F(NewClosure, 3, 1) \
401 F(NewClosureFromStubFailure, 1, 1) \
402 F(NewObject, 1, 1) \
403 F(NewObjectWithAllocationSite, 2, 1) \
404 F(NewObjectFromBound, 1, 1) \ 369 F(NewObjectFromBound, 1, 1) \
405 F(FinalizeInstanceSize, 1, 1) \
406 F(Throw, 1, 1) \
407 F(ReThrow, 1, 1) \
408 F(ThrowReferenceError, 1, 1) \
409 F(ThrowNotDateError, 0, 1) \
410 F(ThrowMessage, 1, 1) \
411 F(StackGuard, 0, 1) \
412 F(Interrupt, 0, 1) \
413 F(PromoteScheduledException, 0, 1) \
414 \
415 /* Contexts */ \
416 F(NewGlobalContext, 2, 1) \
417 F(NewFunctionContext, 1, 1) \
418 F(PushWithContext, 2, 1) \
419 F(PushCatchContext, 3, 1) \
420 F(PushBlockContext, 2, 1) \
421 F(PushModuleContext, 2, 1) \
422 F(DeleteContextSlot, 2, 1) \
423 F(LoadContextSlot, 2, 2) \
424 F(LoadContextSlotNoReferenceError, 2, 2) \
425 F(StoreContextSlot, 4, 1) \
426 \ 370 \
427 /* Declarations and initialization */ \ 371 /* Declarations and initialization */ \
428 F(DeclareGlobals, 3, 1) \
429 F(DeclareModules, 1, 1) \
430 F(DeclareContextSlot, 4, 1) \
431 F(InitializeVarGlobal, -1 /* 2 or 3 */, 1) \ 372 F(InitializeVarGlobal, -1 /* 2 or 3 */, 1) \
432 F(InitializeConstGlobal, 2, 1) \
433 F(InitializeConstContextSlot, 3, 1) \
434 F(OptimizeObjectForAddingMultipleProperties, 2, 1) \ 373 F(OptimizeObjectForAddingMultipleProperties, 2, 1) \
435 \ 374 \
436 /* Debugging */ \ 375 /* Debugging */ \
437 F(DebugPrint, 1, 1) \ 376 F(DebugPrint, 1, 1) \
377 F(GlobalPrint, 1, 1) \
438 F(DebugTrace, 0, 1) \ 378 F(DebugTrace, 0, 1) \
439 F(TraceEnter, 0, 1) \ 379 F(TraceEnter, 0, 1) \
440 F(TraceExit, 1, 1) \ 380 F(TraceExit, 1, 1) \
441 F(Abort, 1, 1) \ 381 F(Abort, 1, 1) \
442 F(AbortJS, 1, 1) \ 382 F(AbortJS, 1, 1) \
443 /* ES5 */ \ 383 /* ES5 */ \
444 F(LocalKeys, 1, 1) \ 384 F(LocalKeys, 1, 1) \
445 \ 385 \
446 /* Message objects */ \ 386 /* Message objects */ \
447 F(MessageGetStartPosition, 1, 1) \ 387 F(MessageGetStartPosition, 1, 1) \
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 // Entries have the form F(name, number of arguments, number of return values). 548 // Entries have the form F(name, number of arguments, number of return values).
609 #define RUNTIME_HIDDEN_FUNCTION_LIST(F) \ 549 #define RUNTIME_HIDDEN_FUNCTION_LIST(F) \
610 F(NumberToString, 1, 1) \ 550 F(NumberToString, 1, 1) \
611 F(RegExpConstructResult, 3, 1) \ 551 F(RegExpConstructResult, 3, 1) \
612 F(RegExpExec, 4, 1) \ 552 F(RegExpExec, 4, 1) \
613 F(StringAdd, 2, 1) \ 553 F(StringAdd, 2, 1) \
614 F(SubString, 3, 1) \ 554 F(SubString, 3, 1) \
615 F(StringCompare, 2, 1) \ 555 F(StringCompare, 2, 1) \
616 F(StringCharCodeAt, 2, 1) \ 556 F(StringCharCodeAt, 2, 1) \
617 F(Log, 3, 1) \ 557 F(Log, 3, 1) \
618 F(GetFromCache, 2, 1) 558 F(GetFromCache, 2, 1) \
559 \
560 /* Compilation */ \
561 F(CompileUnoptimized, 1, 1) \
562 F(CompileOptimized, 2, 1) \
563 F(TryInstallOptimizedCode, 1, 1) \
564 F(NotifyDeoptimized, 1, 1) \
565 F(NotifyStubFailure, 0, 1) \
566 \
567 /* Utilities */ \
568 F(AllocateInNewSpace, 1, 1) \
569 F(AllocateInTargetSpace, 2, 1) \
570 F(AllocateHeapNumber, 0, 1) \
571 F(NumberToSmi, 1, 1) \
572 F(NumberToStringSkipCache, 1, 1) \
573 \
574 F(NewArgumentsFast, 3, 1) \
575 F(NewStrictArgumentsFast, 3, 1) \
576 \
577 /* Harmony generators */ \
578 F(CreateJSGeneratorObject, 0, 1) \
579 F(SuspendJSGeneratorObject, 1, 1) \
580 F(ResumeJSGeneratorObject, 3, 1) \
581 F(ThrowGeneratorStateError, 1, 1) \
582 \
583 /* Arrays */ \
584 F(ArrayConstructor, -1, 1) \
585 F(InternalArrayConstructor, -1, 1) \
586 \
587 /* Literals */ \
588 F(MaterializeRegExpLiteral, 4, 1)\
589 F(CreateObjectLiteral, 4, 1) \
590 F(CreateArrayLiteral, 4, 1) \
591 F(CreateArrayLiteralStubBailout, 3, 1) \
592 \
593 /* Statements */ \
594 F(NewClosure, 3, 1) \
595 F(NewClosureFromStubFailure, 1, 1) \
596 F(NewObject, 1, 1) \
597 F(NewObjectWithAllocationSite, 2, 1) \
598 F(FinalizeInstanceSize, 1, 1) \
599 F(Throw, 1, 1) \
600 F(ReThrow, 1, 1) \
601 F(ThrowReferenceError, 1, 1) \
602 F(ThrowNotDateError, 0, 1) \
603 F(ThrowMessage, 1, 1) \
604 F(StackGuard, 0, 1) \
605 F(Interrupt, 0, 1) \
606 F(PromoteScheduledException, 0, 1) \
607 \
608 /* Contexts */ \
609 F(NewGlobalContext, 2, 1) \
610 F(NewFunctionContext, 1, 1) \
611 F(PushWithContext, 2, 1) \
612 F(PushCatchContext, 3, 1) \
613 F(PushBlockContext, 2, 1) \
614 F(PushModuleContext, 2, 1) \
615 F(DeleteContextSlot, 2, 1) \
616 F(LoadContextSlot, 2, 2) \
617 F(LoadContextSlotNoReferenceError, 2, 2) \
618 F(StoreContextSlot, 4, 1) \
619 \
620 /* Declarations and initialization */ \
621 F(DeclareGlobals, 3, 1) \
622 F(DeclareModules, 1, 1) \
623 F(DeclareContextSlot, 4, 1) \
624 F(InitializeConstGlobal, 2, 1) \
625 F(InitializeConstContextSlot, 3, 1) \
626 \
627 /* Eval */ \
628 F(ResolvePossiblyDirectEval, 5, 2)
619 629
620 // ---------------------------------------------------------------------------- 630 // ----------------------------------------------------------------------------
621 // INLINE_FUNCTION_LIST defines all inlined functions accessed 631 // INLINE_FUNCTION_LIST defines all inlined functions accessed
622 // with a native call of the form %_name from within JS code. 632 // with a native call of the form %_name from within JS code.
623 // Entries have the form F(name, number of arguments, number of return values). 633 // Entries have the form F(name, number of arguments, number of return values).
624 #define INLINE_FUNCTION_LIST(F) \ 634 #define INLINE_FUNCTION_LIST(F) \
625 F(IsSmi, 1, 1) \ 635 F(IsSmi, 1, 1) \
626 F(IsNonNegativeSmi, 1, 1) \ 636 F(IsNonNegativeSmi, 1, 1) \
627 F(IsArray, 1, 1) \ 637 F(IsArray, 1, 1) \
628 F(IsRegExp, 1, 1) \ 638 F(IsRegExp, 1, 1) \
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; 897 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {};
888 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; 898 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {};
889 899
890 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; 900 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {};
891 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; 901 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {};
892 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; 902 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {};
893 903
894 } } // namespace v8::internal 904 } } // namespace v8::internal
895 905
896 #endif // V8_RUNTIME_H_ 906 #endif // V8_RUNTIME_H_
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698